@plasius/ai-game
v0.1.7
Published
Game-domain AI contracts for player action validation, NPC actions, gossip, and feedback.
Maintainers
Readme
@plasius/ai-game
Game-domain AI contracts for player action validation, NPC actions, gossip, Quiet Measure mission probes, and Judgment disclosure surfaces.
Scope
This package is part of the layered @plasius/ai-* package family. It exports canonical public contracts for world events, world-event ingestion, incident impact state, gossip topic projection, and Quiet Measure hidden-runtime integration surfaces.
Install
npm install @plasius/ai-gameExports
import {
AI_GAME_PACKAGE,
AI_GAME_FEATURE_FLAG_ID,
aiGameFeatureFlags,
packageDescriptor,
AI_GAME_QUIET_MEASURE_FEATURE_FLAG_ID,
type GameWorldEvent,
type WorldEventIngestionPort,
type WorldIncidentThread,
type GossipTopic,
type GossipPerspectiveProjection,
type QuietMeasureAxisSummary,
type QuietMeasureMissionProbe,
type QuietMeasureJudgmentResponse
} from "@plasius/ai-game";Quiet Measure contracts
The Quiet Measure surface is intentionally structured as a hidden-runtime contract, not a turnkey morality meter.
- Axis and derived-read contracts expose bounded summaries, confidence bands, evidence windows, and perspective scope without publishing host-specific raw score storage.
- Mission probe contracts model
Clarify,Tempt, andReinforcemodes plusRestorative,Dominant,Detached, and optionalPerformativeresolution shapes. - Judgment contracts model request, eligibility, insufficient-evidence, and verdict responses with
title-and-verdict-onlydisclosure as the default public output. - Runtime helpers validate and defensively copy public Quiet Measure request, title, dominant-read, and reason-code payloads so malformed host input fails closed without leaking hidden-score internals.
- Evaluation fixtures for hero, villain, counterfeit, tyrant, and redemption regression cases belong in
@plasius/ai-evals, not this package.
Development
npm install
npm run build
npm test
npm run test:coverage
npm run pack:checkFeature flags
ai.game.event-recorder.contracts.enabledai.game.event-recorder.ingestion.enabledai.game.event-recorder.impact.enabledai.game.npc-gossip.topics.enabledai.game.npc-gossip.perspective.enabledai.game.npc-gossip.lifecycle.enabledisekai.player-system.quiet-measure.enabled
Governance
- Security policy: SECURITY.md
- Code of conduct: CODE_OF_CONDUCT.md
- ADRs: docs/adrs
- CLA and legal docs: legal
License
Apache-2.0
