@plasius/ai-game 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -178,6 +178,97 @@ declare function createAiGamePlayerSystemPreferenceProfile(input: {
178
178
  }): AiGamePlayerSystemPreferenceProfile;
179
179
  declare function createAiGamePlayerSystemSession(input: CreateAiGamePlayerSystemSessionInput): AiGamePlayerSystemSession;
180
180
 
181
+ declare const AI_GAME_IDENTITY_FEATURE_FLAG_ID = "isekai.player-system.identity.enabled";
182
+ declare const AI_GAME_IDENTITY_CONTRACT_VERSION: "1.0";
183
+ type AiGameIdentityContractVersion = typeof AI_GAME_IDENTITY_CONTRACT_VERSION;
184
+ declare const AI_GAME_IDENTITY_PROJECTION_READS: readonly ["self", "partial", "full"];
185
+ type AiGameIdentityProjectionRead = (typeof AI_GAME_IDENTITY_PROJECTION_READS)[number];
186
+ declare const AI_GAME_IDENTITY_TARGET_CATEGORIES: readonly ["allied", "neutral", "unknown", "unfriendly"];
187
+ type AiGameIdentityTargetCategory = (typeof AI_GAME_IDENTITY_TARGET_CATEGORIES)[number];
188
+ declare const AI_GAME_IDENTITY_KNOWLEDGE_STATES: readonly ["unknown", "partial", "full"];
189
+ type AiGameIdentityKnowledgeState = (typeof AI_GAME_IDENTITY_KNOWLEDGE_STATES)[number];
190
+ declare const AI_GAME_IDENTITY_VISIBILITY_STATES: readonly ["visible", "occluded"];
191
+ type AiGameIdentityVisibilityState = (typeof AI_GAME_IDENTITY_VISIBILITY_STATES)[number];
192
+ interface AiGameIdentityProjectionField {
193
+ readonly contractVersion: AiGameIdentityContractVersion;
194
+ readonly label: string;
195
+ readonly value: string;
196
+ readonly redacted: boolean;
197
+ }
198
+ interface AiGameIdentitySelfProjection {
199
+ readonly contractVersion: AiGameIdentityContractVersion;
200
+ readonly entityId: string;
201
+ readonly label: string;
202
+ readonly projectionRead: "self";
203
+ readonly summary: string;
204
+ readonly fields: readonly AiGameIdentityProjectionField[];
205
+ }
206
+ interface AiGameIdentityTargetProjection {
207
+ readonly contractVersion: AiGameIdentityContractVersion;
208
+ readonly targetId: string;
209
+ readonly label: string;
210
+ readonly category: AiGameIdentityTargetCategory;
211
+ readonly knowledgeState: AiGameIdentityKnowledgeState;
212
+ readonly visibility: AiGameIdentityVisibilityState;
213
+ readonly lineOfSight: boolean;
214
+ readonly projectionRead: "partial" | "full";
215
+ readonly summary: string;
216
+ readonly combatSummary: string;
217
+ readonly fields: readonly AiGameIdentityProjectionField[];
218
+ }
219
+ interface AiGameIdentityDisclosurePolicy {
220
+ readonly self: "full";
221
+ readonly visibleTargets: "partial-or-full-by-knowledge";
222
+ readonly occludedTargets: "partial-redacted";
223
+ }
224
+ interface AiGameIdentityProjectionContract {
225
+ readonly contractVersion: AiGameIdentityContractVersion;
226
+ readonly featureFlagId: typeof AI_GAME_IDENTITY_FEATURE_FLAG_ID;
227
+ readonly authorityOwner: "identity-card";
228
+ readonly authorityMode: "projection-only";
229
+ readonly disclosurePolicy: AiGameIdentityDisclosurePolicy;
230
+ readonly self: AiGameIdentitySelfProjection;
231
+ readonly targets: readonly AiGameIdentityTargetProjection[];
232
+ }
233
+ interface CreateAiGameIdentitySelfProjectionInput {
234
+ readonly entityId: string;
235
+ readonly label: string;
236
+ readonly summary: string;
237
+ readonly fields: readonly (Omit<AiGameIdentityProjectionField, "contractVersion" | "redacted"> & {
238
+ readonly redacted?: boolean;
239
+ })[];
240
+ }
241
+ interface CreateAiGameIdentityTargetProjectionInput {
242
+ readonly targetId: string;
243
+ readonly label: string;
244
+ readonly category: AiGameIdentityTargetCategory;
245
+ readonly knowledgeState: AiGameIdentityKnowledgeState;
246
+ readonly lineOfSight: boolean;
247
+ readonly summary: string;
248
+ readonly combatSummary: string;
249
+ readonly fields: readonly (Omit<AiGameIdentityProjectionField, "contractVersion" | "redacted"> & {
250
+ readonly redacted?: boolean;
251
+ })[];
252
+ }
253
+ interface CreateAiGameIdentityProjectionContractInput {
254
+ readonly self: CreateAiGameIdentitySelfProjectionInput;
255
+ readonly targets?: readonly CreateAiGameIdentityTargetProjectionInput[];
256
+ }
257
+ declare const AI_GAME_IDENTITY_DISCLOSURE_POLICY: AiGameIdentityDisclosurePolicy;
258
+ declare function isAiGameIdentityProjectionRead(value: string): value is AiGameIdentityProjectionRead;
259
+ declare function isAiGameIdentityTargetCategory(value: string): value is AiGameIdentityTargetCategory;
260
+ declare function isAiGameIdentityKnowledgeState(value: string): value is AiGameIdentityKnowledgeState;
261
+ declare function isAiGameIdentityVisibilityState(value: string): value is AiGameIdentityVisibilityState;
262
+ declare function resolveAiGameIdentityProjectionRead(input: {
263
+ readonly knowledgeState: AiGameIdentityKnowledgeState;
264
+ readonly lineOfSight: boolean;
265
+ }): "partial" | "full";
266
+ declare function createAiGameIdentitySelfProjection(input: CreateAiGameIdentitySelfProjectionInput): AiGameIdentitySelfProjection;
267
+ declare function createAiGameIdentityTargetProjection(input: CreateAiGameIdentityTargetProjectionInput): AiGameIdentityTargetProjection;
268
+ declare function selectAiGameVisibleIdentityTargets(targets: readonly AiGameIdentityTargetProjection[]): readonly AiGameIdentityTargetProjection[];
269
+ declare function createAiGameIdentityProjectionContract(input: CreateAiGameIdentityProjectionContractInput): AiGameIdentityProjectionContract;
270
+ declare function assertAiGameIdentityProjectionContractVersion(value: string): void;
271
+
181
272
  type Version = string;
182
273
  type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
183
274
  readonly [key: string]: JsonValue;
@@ -699,4 +790,4 @@ declare const aiGameFeatureFlags: Readonly<{
699
790
  }>;
700
791
  declare const gameEventFeatureFlags: readonly ("ai.game.event-recorder.contracts.enabled" | "ai.game.event-recorder.ingestion.enabled" | "ai.game.event-recorder.impact.enabled" | "ai.game.npc-gossip.topics.enabled" | "ai.game.npc-gossip.perspective.enabled" | "ai.game.npc-gossip.lifecycle.enabled")[];
701
792
 
702
- export { AI_GAME_ACTOR_ROLES, AI_GAME_ENV_PREFIX, AI_GAME_EVENT_CONTRACTS_FEATURE_FLAG_ID, AI_GAME_EVENT_INGESTION_FEATURE_FLAG_ID, AI_GAME_FEATURE_FLAGS, AI_GAME_FEATURE_FLAG_ID, AI_GAME_GOSSIP_LIFECYCLE_FEATURE_FLAG_ID, AI_GAME_GOSSIP_TOPICS_FEATURE_FLAG_ID, AI_GAME_INCIDENT_IMPACT_FEATURE_FLAG_ID, AI_GAME_PACKAGE, AI_GAME_PERSPECTIVE_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_ALERT_PRIORITIES, AI_GAME_PLAYER_SYSTEM_CONFIDENCE_BANDS, AI_GAME_PLAYER_SYSTEM_CONTRACT_VERSION, AI_GAME_PLAYER_SYSTEM_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_FOCUS_MODES, AI_GAME_PLAYER_SYSTEM_FOCUS_MODE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_INPUT_MODALITIES, AI_GAME_PLAYER_SYSTEM_MODULES, AI_GAME_PLAYER_SYSTEM_MODULE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_KINDS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_SOURCES, AI_GAME_QUIET_MEASURE_FEATURE_FLAG_ID, AI_GAME_TASK_AUTHORITY_BOUNDARIES, AI_GAME_TASK_DECISIONS, AI_GAME_TASK_KINDS, AI_GAME_TASK_RESULTS, AI_GAME_TASK_RISK_CLASSES, AI_GAME_TRAINING_RECOMMENDATION_CONFIDENCE_BANDS, AI_GAME_TRAINING_RECOMMENDATION_READINESS, AI_GAME_TRAINING_STAGE_GATES, AI_GAME_TTS_CACHE_POLICIES, type AiGameAcademicTrainingSnapshot, type AiGameActorRole, type AiGameAuthorityBoundary, type AiGameFeatureFlagKey, type AiGameFeatureFlagSnapshot, type AiGameInstitutionEligibility, type AiGameMartialTrainingSnapshot, type AiGamePlayerSystemAlert, type AiGamePlayerSystemAlertPriority, type AiGamePlayerSystemConfidenceBand, type AiGamePlayerSystemContractVersion, type AiGamePlayerSystemFocusMode, type AiGamePlayerSystemFocusModeContract, type AiGamePlayerSystemInputModality, type AiGamePlayerSystemModule, type AiGamePlayerSystemModuleContract, type AiGamePlayerSystemPreferenceConfidenceState, type AiGamePlayerSystemPreferenceInput, type AiGamePlayerSystemPreferenceKind, type AiGamePlayerSystemPreferenceProfile, type AiGamePlayerSystemPreferenceSource, type AiGamePlayerSystemSession, type AiGamePolicyAuditBase, type AiGameSpecializationRecommendation, type AiGameTaskDecision, type AiGameTaskDecisionResult, type AiGameTaskKind, type AiGameTaskRequest, type AiGameTaskResolution, type AiGameTaskResult, type AiGameTaskRiskClass, type AiGameTrainingRecommendationConfidenceBand, type AiGameTrainingRecommendationReadiness, type AiGameTrainingStageGate, type AiGameTrainingStateSnapshot, type AiGameTrainingTrustMarker, type AiGameTtsCachePolicy, type AiPackageDescriptor, type CreateAiGamePlayerSystemSessionInput, type CreateQuietMeasureJudgmentResponseInput, type DungeonClearedPayload, type DungeonCreatedPayload, type EventSourceLink, type FamineStartedPayload, type GameEventActor, type GameEventActorKind, type GameEventCausation, type GameEventCommitReceipt, type GameEventLocation, type GameEventParticipant, type GameEventParticipantRole, type GameEventRecordType, type GameEventSeverity, type GameEventSubmissionChannel, type GameEventSubmissionReceipt, type GameEventValidationIssue, type GameEventValidationResult, type GameEventVisibilityClass, type GameWorldEvent, type GameWorldEventCandidate, type GameWorldEventCanonical, type GameWorldEventEnvelope, type GameWorldEventPayload, type GameWorldEventPayloadBase, type GameWorldEventType, type GossipAudienceSegment, type GossipConfidence, type GossipLifecyclePort, type GossipPerspectiveProjection, type GossipProjectionMode, type GossipSalience, type GossipSpeechHint, type GossipTopic, type GossipTopicEnvelope, type GossipTopicPayload, type GossipTopicStatus, type JsonValue, type KnowledgeSource, type MonsterKilledPayload, type MonsterSpawnedPayload, type PerspectiveRule, type ProjectedGossipEnvelope, type ProjectionCheckpointStore, type ProjectionProjectorCheckpoint, QUIET_MEASURE_AXES, QUIET_MEASURE_CONFIDENCE_BANDS, QUIET_MEASURE_DERIVED_READS, QUIET_MEASURE_EVIDENCE_CLASSES, QUIET_MEASURE_JUDGMENT_DISCLOSURES, QUIET_MEASURE_JUDGMENT_MISSING_EVIDENCE, QUIET_MEASURE_JUDGMENT_REQUESTERS, QUIET_MEASURE_MISSION_PROBE_MODES, QUIET_MEASURE_MISSION_RESOLUTION_SHAPES, QUIET_MEASURE_PERSPECTIVES, QUIET_MEASURE_SIGNAL_BANDS, type QuietMeasureAxis, type QuietMeasureAxisSummary, type QuietMeasureConfidenceBand, type QuietMeasureDerivedRead, type QuietMeasureDerivedReadSummary, type QuietMeasureEvidenceClass, type QuietMeasureEvidenceWindow, type QuietMeasureJudgmentDisclosure, type QuietMeasureJudgmentEligibility, type QuietMeasureJudgmentEligibilityInput, type QuietMeasureJudgmentInsufficientEvidenceResponse, type QuietMeasureJudgmentMissingEvidence, type QuietMeasureJudgmentRequest, type QuietMeasureJudgmentRequester, type QuietMeasureJudgmentResponse, type QuietMeasureJudgmentVerdictResponse, type QuietMeasureMissionProbe, type QuietMeasureMissionProbeMode, type QuietMeasureMissionResolutionMetadata, type QuietMeasureMissionResolutionShape, type QuietMeasurePerspective, type QuietMeasureSignalBand, type QuietMeasureTitleDescriptor, type ResolveAiGamePlayerAddressInput, type ResolveAiGamePlayerAddressResult, type ResolveAiGameTaskInput, type SurplusUpdatedPayload, type SystemCheckpointPayload, type Version, type WarDeclaredPayload, type WarResolvedPayload, type WitnessChannel, type WorldEventIngestionPort, type WorldEventProjectorPort, type WorldIncidentImpactKey, type WorldIncidentImpactVector, type WorldIncidentLifecycle, type WorldIncidentRegistry, type WorldIncidentResolution, type WorldIncidentScope, type WorldIncidentThread, aiGameFeatureFlags, classifyAiGameTask, createAiGameAcademicTrainingSnapshot, createAiGameInstitutionEligibility, createAiGameMartialTrainingSnapshot, createAiGamePlayerSystemAlert, createAiGamePlayerSystemPreferenceConfidenceState, createAiGamePlayerSystemPreferenceInput, createAiGamePlayerSystemPreferenceProfile, createAiGamePlayerSystemSession, createAiGameSpecializationRecommendation, createAiGameTrainingStateSnapshot, createAiGameTrainingTrustMarker, createQuietMeasureJudgmentEligibility, createQuietMeasureJudgmentResponse, gameEventFeatureFlags, getAiGamePlayerSystemFocusModeContract, getAiGamePlayerSystemModuleContract, isAiGamePlayerSystemAlertDeliverable, isAiGamePlayerSystemAlertPriority, isAiGamePlayerSystemConfidenceBand, isAiGamePlayerSystemFocusMode, isAiGamePlayerSystemInputModality, isAiGamePlayerSystemModule, isAiGamePlayerSystemPreferenceKind, isAiGamePlayerSystemPreferenceSource, isAiGameTrainingRecommendationConfidenceBand, isAiGameTrainingRecommendationReadiness, isAiGameTrainingStageGate, isCandidateWorldEvent, isCanonicalWorldEvent, isGossipTopicActive, isGossipTopicCorrected, isIncidentResolved, isQuietMeasureAxis, isQuietMeasureMissionProbeMode, isQuietMeasureMissionResolutionShape, listQuietMeasureMissingEvidence, normalizeIncidentImpactVector, packageDescriptor, projectTopicForAudience, resolveAiGamePlayerAddressText, resolveAiGamePlayerSystemConfidenceBand, resolveAiGameTaskBatch, selectAiGamePlayerSystemAlertsForFocusMode };
793
+ export { AI_GAME_ACTOR_ROLES, AI_GAME_ENV_PREFIX, AI_GAME_EVENT_CONTRACTS_FEATURE_FLAG_ID, AI_GAME_EVENT_INGESTION_FEATURE_FLAG_ID, AI_GAME_FEATURE_FLAGS, AI_GAME_FEATURE_FLAG_ID, AI_GAME_GOSSIP_LIFECYCLE_FEATURE_FLAG_ID, AI_GAME_GOSSIP_TOPICS_FEATURE_FLAG_ID, AI_GAME_IDENTITY_CONTRACT_VERSION, AI_GAME_IDENTITY_DISCLOSURE_POLICY, AI_GAME_IDENTITY_FEATURE_FLAG_ID, AI_GAME_IDENTITY_KNOWLEDGE_STATES, AI_GAME_IDENTITY_PROJECTION_READS, AI_GAME_IDENTITY_TARGET_CATEGORIES, AI_GAME_IDENTITY_VISIBILITY_STATES, AI_GAME_INCIDENT_IMPACT_FEATURE_FLAG_ID, AI_GAME_PACKAGE, AI_GAME_PERSPECTIVE_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_ALERT_PRIORITIES, AI_GAME_PLAYER_SYSTEM_CONFIDENCE_BANDS, AI_GAME_PLAYER_SYSTEM_CONTRACT_VERSION, AI_GAME_PLAYER_SYSTEM_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_FOCUS_MODES, AI_GAME_PLAYER_SYSTEM_FOCUS_MODE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_INPUT_MODALITIES, AI_GAME_PLAYER_SYSTEM_MODULES, AI_GAME_PLAYER_SYSTEM_MODULE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_KINDS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_SOURCES, AI_GAME_QUIET_MEASURE_FEATURE_FLAG_ID, AI_GAME_TASK_AUTHORITY_BOUNDARIES, AI_GAME_TASK_DECISIONS, AI_GAME_TASK_KINDS, AI_GAME_TASK_RESULTS, AI_GAME_TASK_RISK_CLASSES, AI_GAME_TRAINING_RECOMMENDATION_CONFIDENCE_BANDS, AI_GAME_TRAINING_RECOMMENDATION_READINESS, AI_GAME_TRAINING_STAGE_GATES, AI_GAME_TTS_CACHE_POLICIES, type AiGameAcademicTrainingSnapshot, type AiGameActorRole, type AiGameAuthorityBoundary, type AiGameFeatureFlagKey, type AiGameFeatureFlagSnapshot, type AiGameIdentityContractVersion, type AiGameIdentityDisclosurePolicy, type AiGameIdentityKnowledgeState, type AiGameIdentityProjectionContract, type AiGameIdentityProjectionField, type AiGameIdentityProjectionRead, type AiGameIdentitySelfProjection, type AiGameIdentityTargetCategory, type AiGameIdentityTargetProjection, type AiGameIdentityVisibilityState, type AiGameInstitutionEligibility, type AiGameMartialTrainingSnapshot, type AiGamePlayerSystemAlert, type AiGamePlayerSystemAlertPriority, type AiGamePlayerSystemConfidenceBand, type AiGamePlayerSystemContractVersion, type AiGamePlayerSystemFocusMode, type AiGamePlayerSystemFocusModeContract, type AiGamePlayerSystemInputModality, type AiGamePlayerSystemModule, type AiGamePlayerSystemModuleContract, type AiGamePlayerSystemPreferenceConfidenceState, type AiGamePlayerSystemPreferenceInput, type AiGamePlayerSystemPreferenceKind, type AiGamePlayerSystemPreferenceProfile, type AiGamePlayerSystemPreferenceSource, type AiGamePlayerSystemSession, type AiGamePolicyAuditBase, type AiGameSpecializationRecommendation, type AiGameTaskDecision, type AiGameTaskDecisionResult, type AiGameTaskKind, type AiGameTaskRequest, type AiGameTaskResolution, type AiGameTaskResult, type AiGameTaskRiskClass, type AiGameTrainingRecommendationConfidenceBand, type AiGameTrainingRecommendationReadiness, type AiGameTrainingStageGate, type AiGameTrainingStateSnapshot, type AiGameTrainingTrustMarker, type AiGameTtsCachePolicy, type AiPackageDescriptor, type CreateAiGameIdentityProjectionContractInput, type CreateAiGameIdentitySelfProjectionInput, type CreateAiGameIdentityTargetProjectionInput, type CreateAiGamePlayerSystemSessionInput, type CreateQuietMeasureJudgmentResponseInput, type DungeonClearedPayload, type DungeonCreatedPayload, type EventSourceLink, type FamineStartedPayload, type GameEventActor, type GameEventActorKind, type GameEventCausation, type GameEventCommitReceipt, type GameEventLocation, type GameEventParticipant, type GameEventParticipantRole, type GameEventRecordType, type GameEventSeverity, type GameEventSubmissionChannel, type GameEventSubmissionReceipt, type GameEventValidationIssue, type GameEventValidationResult, type GameEventVisibilityClass, type GameWorldEvent, type GameWorldEventCandidate, type GameWorldEventCanonical, type GameWorldEventEnvelope, type GameWorldEventPayload, type GameWorldEventPayloadBase, type GameWorldEventType, type GossipAudienceSegment, type GossipConfidence, type GossipLifecyclePort, type GossipPerspectiveProjection, type GossipProjectionMode, type GossipSalience, type GossipSpeechHint, type GossipTopic, type GossipTopicEnvelope, type GossipTopicPayload, type GossipTopicStatus, type JsonValue, type KnowledgeSource, type MonsterKilledPayload, type MonsterSpawnedPayload, type PerspectiveRule, type ProjectedGossipEnvelope, type ProjectionCheckpointStore, type ProjectionProjectorCheckpoint, QUIET_MEASURE_AXES, QUIET_MEASURE_CONFIDENCE_BANDS, QUIET_MEASURE_DERIVED_READS, QUIET_MEASURE_EVIDENCE_CLASSES, QUIET_MEASURE_JUDGMENT_DISCLOSURES, QUIET_MEASURE_JUDGMENT_MISSING_EVIDENCE, QUIET_MEASURE_JUDGMENT_REQUESTERS, QUIET_MEASURE_MISSION_PROBE_MODES, QUIET_MEASURE_MISSION_RESOLUTION_SHAPES, QUIET_MEASURE_PERSPECTIVES, QUIET_MEASURE_SIGNAL_BANDS, type QuietMeasureAxis, type QuietMeasureAxisSummary, type QuietMeasureConfidenceBand, type QuietMeasureDerivedRead, type QuietMeasureDerivedReadSummary, type QuietMeasureEvidenceClass, type QuietMeasureEvidenceWindow, type QuietMeasureJudgmentDisclosure, type QuietMeasureJudgmentEligibility, type QuietMeasureJudgmentEligibilityInput, type QuietMeasureJudgmentInsufficientEvidenceResponse, type QuietMeasureJudgmentMissingEvidence, type QuietMeasureJudgmentRequest, type QuietMeasureJudgmentRequester, type QuietMeasureJudgmentResponse, type QuietMeasureJudgmentVerdictResponse, type QuietMeasureMissionProbe, type QuietMeasureMissionProbeMode, type QuietMeasureMissionResolutionMetadata, type QuietMeasureMissionResolutionShape, type QuietMeasurePerspective, type QuietMeasureSignalBand, type QuietMeasureTitleDescriptor, type ResolveAiGamePlayerAddressInput, type ResolveAiGamePlayerAddressResult, type ResolveAiGameTaskInput, type SurplusUpdatedPayload, type SystemCheckpointPayload, type Version, type WarDeclaredPayload, type WarResolvedPayload, type WitnessChannel, type WorldEventIngestionPort, type WorldEventProjectorPort, type WorldIncidentImpactKey, type WorldIncidentImpactVector, type WorldIncidentLifecycle, type WorldIncidentRegistry, type WorldIncidentResolution, type WorldIncidentScope, type WorldIncidentThread, aiGameFeatureFlags, assertAiGameIdentityProjectionContractVersion, classifyAiGameTask, createAiGameAcademicTrainingSnapshot, createAiGameIdentityProjectionContract, createAiGameIdentitySelfProjection, createAiGameIdentityTargetProjection, createAiGameInstitutionEligibility, createAiGameMartialTrainingSnapshot, createAiGamePlayerSystemAlert, createAiGamePlayerSystemPreferenceConfidenceState, createAiGamePlayerSystemPreferenceInput, createAiGamePlayerSystemPreferenceProfile, createAiGamePlayerSystemSession, createAiGameSpecializationRecommendation, createAiGameTrainingStateSnapshot, createAiGameTrainingTrustMarker, createQuietMeasureJudgmentEligibility, createQuietMeasureJudgmentResponse, gameEventFeatureFlags, getAiGamePlayerSystemFocusModeContract, getAiGamePlayerSystemModuleContract, isAiGameIdentityKnowledgeState, isAiGameIdentityProjectionRead, isAiGameIdentityTargetCategory, isAiGameIdentityVisibilityState, isAiGamePlayerSystemAlertDeliverable, isAiGamePlayerSystemAlertPriority, isAiGamePlayerSystemConfidenceBand, isAiGamePlayerSystemFocusMode, isAiGamePlayerSystemInputModality, isAiGamePlayerSystemModule, isAiGamePlayerSystemPreferenceKind, isAiGamePlayerSystemPreferenceSource, isAiGameTrainingRecommendationConfidenceBand, isAiGameTrainingRecommendationReadiness, isAiGameTrainingStageGate, isCandidateWorldEvent, isCanonicalWorldEvent, isGossipTopicActive, isGossipTopicCorrected, isIncidentResolved, isQuietMeasureAxis, isQuietMeasureMissionProbeMode, isQuietMeasureMissionResolutionShape, listQuietMeasureMissingEvidence, normalizeIncidentImpactVector, packageDescriptor, projectTopicForAudience, resolveAiGameIdentityProjectionRead, resolveAiGamePlayerAddressText, resolveAiGamePlayerSystemConfidenceBand, resolveAiGameTaskBatch, selectAiGamePlayerSystemAlertsForFocusMode, selectAiGameVisibleIdentityTargets };
package/dist/index.d.ts CHANGED
@@ -178,6 +178,97 @@ declare function createAiGamePlayerSystemPreferenceProfile(input: {
178
178
  }): AiGamePlayerSystemPreferenceProfile;
179
179
  declare function createAiGamePlayerSystemSession(input: CreateAiGamePlayerSystemSessionInput): AiGamePlayerSystemSession;
180
180
 
181
+ declare const AI_GAME_IDENTITY_FEATURE_FLAG_ID = "isekai.player-system.identity.enabled";
182
+ declare const AI_GAME_IDENTITY_CONTRACT_VERSION: "1.0";
183
+ type AiGameIdentityContractVersion = typeof AI_GAME_IDENTITY_CONTRACT_VERSION;
184
+ declare const AI_GAME_IDENTITY_PROJECTION_READS: readonly ["self", "partial", "full"];
185
+ type AiGameIdentityProjectionRead = (typeof AI_GAME_IDENTITY_PROJECTION_READS)[number];
186
+ declare const AI_GAME_IDENTITY_TARGET_CATEGORIES: readonly ["allied", "neutral", "unknown", "unfriendly"];
187
+ type AiGameIdentityTargetCategory = (typeof AI_GAME_IDENTITY_TARGET_CATEGORIES)[number];
188
+ declare const AI_GAME_IDENTITY_KNOWLEDGE_STATES: readonly ["unknown", "partial", "full"];
189
+ type AiGameIdentityKnowledgeState = (typeof AI_GAME_IDENTITY_KNOWLEDGE_STATES)[number];
190
+ declare const AI_GAME_IDENTITY_VISIBILITY_STATES: readonly ["visible", "occluded"];
191
+ type AiGameIdentityVisibilityState = (typeof AI_GAME_IDENTITY_VISIBILITY_STATES)[number];
192
+ interface AiGameIdentityProjectionField {
193
+ readonly contractVersion: AiGameIdentityContractVersion;
194
+ readonly label: string;
195
+ readonly value: string;
196
+ readonly redacted: boolean;
197
+ }
198
+ interface AiGameIdentitySelfProjection {
199
+ readonly contractVersion: AiGameIdentityContractVersion;
200
+ readonly entityId: string;
201
+ readonly label: string;
202
+ readonly projectionRead: "self";
203
+ readonly summary: string;
204
+ readonly fields: readonly AiGameIdentityProjectionField[];
205
+ }
206
+ interface AiGameIdentityTargetProjection {
207
+ readonly contractVersion: AiGameIdentityContractVersion;
208
+ readonly targetId: string;
209
+ readonly label: string;
210
+ readonly category: AiGameIdentityTargetCategory;
211
+ readonly knowledgeState: AiGameIdentityKnowledgeState;
212
+ readonly visibility: AiGameIdentityVisibilityState;
213
+ readonly lineOfSight: boolean;
214
+ readonly projectionRead: "partial" | "full";
215
+ readonly summary: string;
216
+ readonly combatSummary: string;
217
+ readonly fields: readonly AiGameIdentityProjectionField[];
218
+ }
219
+ interface AiGameIdentityDisclosurePolicy {
220
+ readonly self: "full";
221
+ readonly visibleTargets: "partial-or-full-by-knowledge";
222
+ readonly occludedTargets: "partial-redacted";
223
+ }
224
+ interface AiGameIdentityProjectionContract {
225
+ readonly contractVersion: AiGameIdentityContractVersion;
226
+ readonly featureFlagId: typeof AI_GAME_IDENTITY_FEATURE_FLAG_ID;
227
+ readonly authorityOwner: "identity-card";
228
+ readonly authorityMode: "projection-only";
229
+ readonly disclosurePolicy: AiGameIdentityDisclosurePolicy;
230
+ readonly self: AiGameIdentitySelfProjection;
231
+ readonly targets: readonly AiGameIdentityTargetProjection[];
232
+ }
233
+ interface CreateAiGameIdentitySelfProjectionInput {
234
+ readonly entityId: string;
235
+ readonly label: string;
236
+ readonly summary: string;
237
+ readonly fields: readonly (Omit<AiGameIdentityProjectionField, "contractVersion" | "redacted"> & {
238
+ readonly redacted?: boolean;
239
+ })[];
240
+ }
241
+ interface CreateAiGameIdentityTargetProjectionInput {
242
+ readonly targetId: string;
243
+ readonly label: string;
244
+ readonly category: AiGameIdentityTargetCategory;
245
+ readonly knowledgeState: AiGameIdentityKnowledgeState;
246
+ readonly lineOfSight: boolean;
247
+ readonly summary: string;
248
+ readonly combatSummary: string;
249
+ readonly fields: readonly (Omit<AiGameIdentityProjectionField, "contractVersion" | "redacted"> & {
250
+ readonly redacted?: boolean;
251
+ })[];
252
+ }
253
+ interface CreateAiGameIdentityProjectionContractInput {
254
+ readonly self: CreateAiGameIdentitySelfProjectionInput;
255
+ readonly targets?: readonly CreateAiGameIdentityTargetProjectionInput[];
256
+ }
257
+ declare const AI_GAME_IDENTITY_DISCLOSURE_POLICY: AiGameIdentityDisclosurePolicy;
258
+ declare function isAiGameIdentityProjectionRead(value: string): value is AiGameIdentityProjectionRead;
259
+ declare function isAiGameIdentityTargetCategory(value: string): value is AiGameIdentityTargetCategory;
260
+ declare function isAiGameIdentityKnowledgeState(value: string): value is AiGameIdentityKnowledgeState;
261
+ declare function isAiGameIdentityVisibilityState(value: string): value is AiGameIdentityVisibilityState;
262
+ declare function resolveAiGameIdentityProjectionRead(input: {
263
+ readonly knowledgeState: AiGameIdentityKnowledgeState;
264
+ readonly lineOfSight: boolean;
265
+ }): "partial" | "full";
266
+ declare function createAiGameIdentitySelfProjection(input: CreateAiGameIdentitySelfProjectionInput): AiGameIdentitySelfProjection;
267
+ declare function createAiGameIdentityTargetProjection(input: CreateAiGameIdentityTargetProjectionInput): AiGameIdentityTargetProjection;
268
+ declare function selectAiGameVisibleIdentityTargets(targets: readonly AiGameIdentityTargetProjection[]): readonly AiGameIdentityTargetProjection[];
269
+ declare function createAiGameIdentityProjectionContract(input: CreateAiGameIdentityProjectionContractInput): AiGameIdentityProjectionContract;
270
+ declare function assertAiGameIdentityProjectionContractVersion(value: string): void;
271
+
181
272
  type Version = string;
182
273
  type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
183
274
  readonly [key: string]: JsonValue;
@@ -699,4 +790,4 @@ declare const aiGameFeatureFlags: Readonly<{
699
790
  }>;
700
791
  declare const gameEventFeatureFlags: readonly ("ai.game.event-recorder.contracts.enabled" | "ai.game.event-recorder.ingestion.enabled" | "ai.game.event-recorder.impact.enabled" | "ai.game.npc-gossip.topics.enabled" | "ai.game.npc-gossip.perspective.enabled" | "ai.game.npc-gossip.lifecycle.enabled")[];
701
792
 
702
- export { AI_GAME_ACTOR_ROLES, AI_GAME_ENV_PREFIX, AI_GAME_EVENT_CONTRACTS_FEATURE_FLAG_ID, AI_GAME_EVENT_INGESTION_FEATURE_FLAG_ID, AI_GAME_FEATURE_FLAGS, AI_GAME_FEATURE_FLAG_ID, AI_GAME_GOSSIP_LIFECYCLE_FEATURE_FLAG_ID, AI_GAME_GOSSIP_TOPICS_FEATURE_FLAG_ID, AI_GAME_INCIDENT_IMPACT_FEATURE_FLAG_ID, AI_GAME_PACKAGE, AI_GAME_PERSPECTIVE_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_ALERT_PRIORITIES, AI_GAME_PLAYER_SYSTEM_CONFIDENCE_BANDS, AI_GAME_PLAYER_SYSTEM_CONTRACT_VERSION, AI_GAME_PLAYER_SYSTEM_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_FOCUS_MODES, AI_GAME_PLAYER_SYSTEM_FOCUS_MODE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_INPUT_MODALITIES, AI_GAME_PLAYER_SYSTEM_MODULES, AI_GAME_PLAYER_SYSTEM_MODULE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_KINDS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_SOURCES, AI_GAME_QUIET_MEASURE_FEATURE_FLAG_ID, AI_GAME_TASK_AUTHORITY_BOUNDARIES, AI_GAME_TASK_DECISIONS, AI_GAME_TASK_KINDS, AI_GAME_TASK_RESULTS, AI_GAME_TASK_RISK_CLASSES, AI_GAME_TRAINING_RECOMMENDATION_CONFIDENCE_BANDS, AI_GAME_TRAINING_RECOMMENDATION_READINESS, AI_GAME_TRAINING_STAGE_GATES, AI_GAME_TTS_CACHE_POLICIES, type AiGameAcademicTrainingSnapshot, type AiGameActorRole, type AiGameAuthorityBoundary, type AiGameFeatureFlagKey, type AiGameFeatureFlagSnapshot, type AiGameInstitutionEligibility, type AiGameMartialTrainingSnapshot, type AiGamePlayerSystemAlert, type AiGamePlayerSystemAlertPriority, type AiGamePlayerSystemConfidenceBand, type AiGamePlayerSystemContractVersion, type AiGamePlayerSystemFocusMode, type AiGamePlayerSystemFocusModeContract, type AiGamePlayerSystemInputModality, type AiGamePlayerSystemModule, type AiGamePlayerSystemModuleContract, type AiGamePlayerSystemPreferenceConfidenceState, type AiGamePlayerSystemPreferenceInput, type AiGamePlayerSystemPreferenceKind, type AiGamePlayerSystemPreferenceProfile, type AiGamePlayerSystemPreferenceSource, type AiGamePlayerSystemSession, type AiGamePolicyAuditBase, type AiGameSpecializationRecommendation, type AiGameTaskDecision, type AiGameTaskDecisionResult, type AiGameTaskKind, type AiGameTaskRequest, type AiGameTaskResolution, type AiGameTaskResult, type AiGameTaskRiskClass, type AiGameTrainingRecommendationConfidenceBand, type AiGameTrainingRecommendationReadiness, type AiGameTrainingStageGate, type AiGameTrainingStateSnapshot, type AiGameTrainingTrustMarker, type AiGameTtsCachePolicy, type AiPackageDescriptor, type CreateAiGamePlayerSystemSessionInput, type CreateQuietMeasureJudgmentResponseInput, type DungeonClearedPayload, type DungeonCreatedPayload, type EventSourceLink, type FamineStartedPayload, type GameEventActor, type GameEventActorKind, type GameEventCausation, type GameEventCommitReceipt, type GameEventLocation, type GameEventParticipant, type GameEventParticipantRole, type GameEventRecordType, type GameEventSeverity, type GameEventSubmissionChannel, type GameEventSubmissionReceipt, type GameEventValidationIssue, type GameEventValidationResult, type GameEventVisibilityClass, type GameWorldEvent, type GameWorldEventCandidate, type GameWorldEventCanonical, type GameWorldEventEnvelope, type GameWorldEventPayload, type GameWorldEventPayloadBase, type GameWorldEventType, type GossipAudienceSegment, type GossipConfidence, type GossipLifecyclePort, type GossipPerspectiveProjection, type GossipProjectionMode, type GossipSalience, type GossipSpeechHint, type GossipTopic, type GossipTopicEnvelope, type GossipTopicPayload, type GossipTopicStatus, type JsonValue, type KnowledgeSource, type MonsterKilledPayload, type MonsterSpawnedPayload, type PerspectiveRule, type ProjectedGossipEnvelope, type ProjectionCheckpointStore, type ProjectionProjectorCheckpoint, QUIET_MEASURE_AXES, QUIET_MEASURE_CONFIDENCE_BANDS, QUIET_MEASURE_DERIVED_READS, QUIET_MEASURE_EVIDENCE_CLASSES, QUIET_MEASURE_JUDGMENT_DISCLOSURES, QUIET_MEASURE_JUDGMENT_MISSING_EVIDENCE, QUIET_MEASURE_JUDGMENT_REQUESTERS, QUIET_MEASURE_MISSION_PROBE_MODES, QUIET_MEASURE_MISSION_RESOLUTION_SHAPES, QUIET_MEASURE_PERSPECTIVES, QUIET_MEASURE_SIGNAL_BANDS, type QuietMeasureAxis, type QuietMeasureAxisSummary, type QuietMeasureConfidenceBand, type QuietMeasureDerivedRead, type QuietMeasureDerivedReadSummary, type QuietMeasureEvidenceClass, type QuietMeasureEvidenceWindow, type QuietMeasureJudgmentDisclosure, type QuietMeasureJudgmentEligibility, type QuietMeasureJudgmentEligibilityInput, type QuietMeasureJudgmentInsufficientEvidenceResponse, type QuietMeasureJudgmentMissingEvidence, type QuietMeasureJudgmentRequest, type QuietMeasureJudgmentRequester, type QuietMeasureJudgmentResponse, type QuietMeasureJudgmentVerdictResponse, type QuietMeasureMissionProbe, type QuietMeasureMissionProbeMode, type QuietMeasureMissionResolutionMetadata, type QuietMeasureMissionResolutionShape, type QuietMeasurePerspective, type QuietMeasureSignalBand, type QuietMeasureTitleDescriptor, type ResolveAiGamePlayerAddressInput, type ResolveAiGamePlayerAddressResult, type ResolveAiGameTaskInput, type SurplusUpdatedPayload, type SystemCheckpointPayload, type Version, type WarDeclaredPayload, type WarResolvedPayload, type WitnessChannel, type WorldEventIngestionPort, type WorldEventProjectorPort, type WorldIncidentImpactKey, type WorldIncidentImpactVector, type WorldIncidentLifecycle, type WorldIncidentRegistry, type WorldIncidentResolution, type WorldIncidentScope, type WorldIncidentThread, aiGameFeatureFlags, classifyAiGameTask, createAiGameAcademicTrainingSnapshot, createAiGameInstitutionEligibility, createAiGameMartialTrainingSnapshot, createAiGamePlayerSystemAlert, createAiGamePlayerSystemPreferenceConfidenceState, createAiGamePlayerSystemPreferenceInput, createAiGamePlayerSystemPreferenceProfile, createAiGamePlayerSystemSession, createAiGameSpecializationRecommendation, createAiGameTrainingStateSnapshot, createAiGameTrainingTrustMarker, createQuietMeasureJudgmentEligibility, createQuietMeasureJudgmentResponse, gameEventFeatureFlags, getAiGamePlayerSystemFocusModeContract, getAiGamePlayerSystemModuleContract, isAiGamePlayerSystemAlertDeliverable, isAiGamePlayerSystemAlertPriority, isAiGamePlayerSystemConfidenceBand, isAiGamePlayerSystemFocusMode, isAiGamePlayerSystemInputModality, isAiGamePlayerSystemModule, isAiGamePlayerSystemPreferenceKind, isAiGamePlayerSystemPreferenceSource, isAiGameTrainingRecommendationConfidenceBand, isAiGameTrainingRecommendationReadiness, isAiGameTrainingStageGate, isCandidateWorldEvent, isCanonicalWorldEvent, isGossipTopicActive, isGossipTopicCorrected, isIncidentResolved, isQuietMeasureAxis, isQuietMeasureMissionProbeMode, isQuietMeasureMissionResolutionShape, listQuietMeasureMissingEvidence, normalizeIncidentImpactVector, packageDescriptor, projectTopicForAudience, resolveAiGamePlayerAddressText, resolveAiGamePlayerSystemConfidenceBand, resolveAiGameTaskBatch, selectAiGamePlayerSystemAlertsForFocusMode };
793
+ export { AI_GAME_ACTOR_ROLES, AI_GAME_ENV_PREFIX, AI_GAME_EVENT_CONTRACTS_FEATURE_FLAG_ID, AI_GAME_EVENT_INGESTION_FEATURE_FLAG_ID, AI_GAME_FEATURE_FLAGS, AI_GAME_FEATURE_FLAG_ID, AI_GAME_GOSSIP_LIFECYCLE_FEATURE_FLAG_ID, AI_GAME_GOSSIP_TOPICS_FEATURE_FLAG_ID, AI_GAME_IDENTITY_CONTRACT_VERSION, AI_GAME_IDENTITY_DISCLOSURE_POLICY, AI_GAME_IDENTITY_FEATURE_FLAG_ID, AI_GAME_IDENTITY_KNOWLEDGE_STATES, AI_GAME_IDENTITY_PROJECTION_READS, AI_GAME_IDENTITY_TARGET_CATEGORIES, AI_GAME_IDENTITY_VISIBILITY_STATES, AI_GAME_INCIDENT_IMPACT_FEATURE_FLAG_ID, AI_GAME_PACKAGE, AI_GAME_PERSPECTIVE_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_ALERT_PRIORITIES, AI_GAME_PLAYER_SYSTEM_CONFIDENCE_BANDS, AI_GAME_PLAYER_SYSTEM_CONTRACT_VERSION, AI_GAME_PLAYER_SYSTEM_FEATURE_FLAG_ID, AI_GAME_PLAYER_SYSTEM_FOCUS_MODES, AI_GAME_PLAYER_SYSTEM_FOCUS_MODE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_INPUT_MODALITIES, AI_GAME_PLAYER_SYSTEM_MODULES, AI_GAME_PLAYER_SYSTEM_MODULE_CONTRACTS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_KINDS, AI_GAME_PLAYER_SYSTEM_PREFERENCE_SOURCES, AI_GAME_QUIET_MEASURE_FEATURE_FLAG_ID, AI_GAME_TASK_AUTHORITY_BOUNDARIES, AI_GAME_TASK_DECISIONS, AI_GAME_TASK_KINDS, AI_GAME_TASK_RESULTS, AI_GAME_TASK_RISK_CLASSES, AI_GAME_TRAINING_RECOMMENDATION_CONFIDENCE_BANDS, AI_GAME_TRAINING_RECOMMENDATION_READINESS, AI_GAME_TRAINING_STAGE_GATES, AI_GAME_TTS_CACHE_POLICIES, type AiGameAcademicTrainingSnapshot, type AiGameActorRole, type AiGameAuthorityBoundary, type AiGameFeatureFlagKey, type AiGameFeatureFlagSnapshot, type AiGameIdentityContractVersion, type AiGameIdentityDisclosurePolicy, type AiGameIdentityKnowledgeState, type AiGameIdentityProjectionContract, type AiGameIdentityProjectionField, type AiGameIdentityProjectionRead, type AiGameIdentitySelfProjection, type AiGameIdentityTargetCategory, type AiGameIdentityTargetProjection, type AiGameIdentityVisibilityState, type AiGameInstitutionEligibility, type AiGameMartialTrainingSnapshot, type AiGamePlayerSystemAlert, type AiGamePlayerSystemAlertPriority, type AiGamePlayerSystemConfidenceBand, type AiGamePlayerSystemContractVersion, type AiGamePlayerSystemFocusMode, type AiGamePlayerSystemFocusModeContract, type AiGamePlayerSystemInputModality, type AiGamePlayerSystemModule, type AiGamePlayerSystemModuleContract, type AiGamePlayerSystemPreferenceConfidenceState, type AiGamePlayerSystemPreferenceInput, type AiGamePlayerSystemPreferenceKind, type AiGamePlayerSystemPreferenceProfile, type AiGamePlayerSystemPreferenceSource, type AiGamePlayerSystemSession, type AiGamePolicyAuditBase, type AiGameSpecializationRecommendation, type AiGameTaskDecision, type AiGameTaskDecisionResult, type AiGameTaskKind, type AiGameTaskRequest, type AiGameTaskResolution, type AiGameTaskResult, type AiGameTaskRiskClass, type AiGameTrainingRecommendationConfidenceBand, type AiGameTrainingRecommendationReadiness, type AiGameTrainingStageGate, type AiGameTrainingStateSnapshot, type AiGameTrainingTrustMarker, type AiGameTtsCachePolicy, type AiPackageDescriptor, type CreateAiGameIdentityProjectionContractInput, type CreateAiGameIdentitySelfProjectionInput, type CreateAiGameIdentityTargetProjectionInput, type CreateAiGamePlayerSystemSessionInput, type CreateQuietMeasureJudgmentResponseInput, type DungeonClearedPayload, type DungeonCreatedPayload, type EventSourceLink, type FamineStartedPayload, type GameEventActor, type GameEventActorKind, type GameEventCausation, type GameEventCommitReceipt, type GameEventLocation, type GameEventParticipant, type GameEventParticipantRole, type GameEventRecordType, type GameEventSeverity, type GameEventSubmissionChannel, type GameEventSubmissionReceipt, type GameEventValidationIssue, type GameEventValidationResult, type GameEventVisibilityClass, type GameWorldEvent, type GameWorldEventCandidate, type GameWorldEventCanonical, type GameWorldEventEnvelope, type GameWorldEventPayload, type GameWorldEventPayloadBase, type GameWorldEventType, type GossipAudienceSegment, type GossipConfidence, type GossipLifecyclePort, type GossipPerspectiveProjection, type GossipProjectionMode, type GossipSalience, type GossipSpeechHint, type GossipTopic, type GossipTopicEnvelope, type GossipTopicPayload, type GossipTopicStatus, type JsonValue, type KnowledgeSource, type MonsterKilledPayload, type MonsterSpawnedPayload, type PerspectiveRule, type ProjectedGossipEnvelope, type ProjectionCheckpointStore, type ProjectionProjectorCheckpoint, QUIET_MEASURE_AXES, QUIET_MEASURE_CONFIDENCE_BANDS, QUIET_MEASURE_DERIVED_READS, QUIET_MEASURE_EVIDENCE_CLASSES, QUIET_MEASURE_JUDGMENT_DISCLOSURES, QUIET_MEASURE_JUDGMENT_MISSING_EVIDENCE, QUIET_MEASURE_JUDGMENT_REQUESTERS, QUIET_MEASURE_MISSION_PROBE_MODES, QUIET_MEASURE_MISSION_RESOLUTION_SHAPES, QUIET_MEASURE_PERSPECTIVES, QUIET_MEASURE_SIGNAL_BANDS, type QuietMeasureAxis, type QuietMeasureAxisSummary, type QuietMeasureConfidenceBand, type QuietMeasureDerivedRead, type QuietMeasureDerivedReadSummary, type QuietMeasureEvidenceClass, type QuietMeasureEvidenceWindow, type QuietMeasureJudgmentDisclosure, type QuietMeasureJudgmentEligibility, type QuietMeasureJudgmentEligibilityInput, type QuietMeasureJudgmentInsufficientEvidenceResponse, type QuietMeasureJudgmentMissingEvidence, type QuietMeasureJudgmentRequest, type QuietMeasureJudgmentRequester, type QuietMeasureJudgmentResponse, type QuietMeasureJudgmentVerdictResponse, type QuietMeasureMissionProbe, type QuietMeasureMissionProbeMode, type QuietMeasureMissionResolutionMetadata, type QuietMeasureMissionResolutionShape, type QuietMeasurePerspective, type QuietMeasureSignalBand, type QuietMeasureTitleDescriptor, type ResolveAiGamePlayerAddressInput, type ResolveAiGamePlayerAddressResult, type ResolveAiGameTaskInput, type SurplusUpdatedPayload, type SystemCheckpointPayload, type Version, type WarDeclaredPayload, type WarResolvedPayload, type WitnessChannel, type WorldEventIngestionPort, type WorldEventProjectorPort, type WorldIncidentImpactKey, type WorldIncidentImpactVector, type WorldIncidentLifecycle, type WorldIncidentRegistry, type WorldIncidentResolution, type WorldIncidentScope, type WorldIncidentThread, aiGameFeatureFlags, assertAiGameIdentityProjectionContractVersion, classifyAiGameTask, createAiGameAcademicTrainingSnapshot, createAiGameIdentityProjectionContract, createAiGameIdentitySelfProjection, createAiGameIdentityTargetProjection, createAiGameInstitutionEligibility, createAiGameMartialTrainingSnapshot, createAiGamePlayerSystemAlert, createAiGamePlayerSystemPreferenceConfidenceState, createAiGamePlayerSystemPreferenceInput, createAiGamePlayerSystemPreferenceProfile, createAiGamePlayerSystemSession, createAiGameSpecializationRecommendation, createAiGameTrainingStateSnapshot, createAiGameTrainingTrustMarker, createQuietMeasureJudgmentEligibility, createQuietMeasureJudgmentResponse, gameEventFeatureFlags, getAiGamePlayerSystemFocusModeContract, getAiGamePlayerSystemModuleContract, isAiGameIdentityKnowledgeState, isAiGameIdentityProjectionRead, isAiGameIdentityTargetCategory, isAiGameIdentityVisibilityState, isAiGamePlayerSystemAlertDeliverable, isAiGamePlayerSystemAlertPriority, isAiGamePlayerSystemConfidenceBand, isAiGamePlayerSystemFocusMode, isAiGamePlayerSystemInputModality, isAiGamePlayerSystemModule, isAiGamePlayerSystemPreferenceKind, isAiGamePlayerSystemPreferenceSource, isAiGameTrainingRecommendationConfidenceBand, isAiGameTrainingRecommendationReadiness, isAiGameTrainingStageGate, isCandidateWorldEvent, isCanonicalWorldEvent, isGossipTopicActive, isGossipTopicCorrected, isIncidentResolved, isQuietMeasureAxis, isQuietMeasureMissionProbeMode, isQuietMeasureMissionResolutionShape, listQuietMeasureMissingEvidence, normalizeIncidentImpactVector, packageDescriptor, projectTopicForAudience, resolveAiGameIdentityProjectionRead, resolveAiGamePlayerAddressText, resolveAiGamePlayerSystemConfidenceBand, resolveAiGameTaskBatch, selectAiGamePlayerSystemAlertsForFocusMode, selectAiGameVisibleIdentityTargets };
package/dist/index.js CHANGED
@@ -551,6 +551,146 @@ function createAiGamePlayerSystemSession(input) {
551
551
  });
552
552
  }
553
553
 
554
+ // src/identity.ts
555
+ var AI_GAME_IDENTITY_FEATURE_FLAG_ID = "isekai.player-system.identity.enabled";
556
+ var AI_GAME_IDENTITY_CONTRACT_VERSION = "1.0";
557
+ var AI_GAME_IDENTITY_PROJECTION_READS = [
558
+ "self",
559
+ "partial",
560
+ "full"
561
+ ];
562
+ var AI_GAME_IDENTITY_TARGET_CATEGORIES = [
563
+ "allied",
564
+ "neutral",
565
+ "unknown",
566
+ "unfriendly"
567
+ ];
568
+ var AI_GAME_IDENTITY_KNOWLEDGE_STATES = [
569
+ "unknown",
570
+ "partial",
571
+ "full"
572
+ ];
573
+ var AI_GAME_IDENTITY_VISIBILITY_STATES = ["visible", "occluded"];
574
+ var AI_GAME_IDENTITY_DISCLOSURE_POLICY = Object.freeze({
575
+ self: "full",
576
+ visibleTargets: "partial-or-full-by-knowledge",
577
+ occludedTargets: "partial-redacted"
578
+ });
579
+ function freezeReadonlyArray3(items) {
580
+ return Object.freeze([...items]);
581
+ }
582
+ function assertNonEmptyString3(value, label) {
583
+ if (value.trim().length === 0) {
584
+ throw new Error(`${label} must be a non-empty string`);
585
+ }
586
+ }
587
+ function assertContractVersion2(value, label = "contractVersion") {
588
+ if (value !== AI_GAME_IDENTITY_CONTRACT_VERSION) {
589
+ throw new Error(`${label} must be ${AI_GAME_IDENTITY_CONTRACT_VERSION}`);
590
+ }
591
+ }
592
+ function isMember2(value, members) {
593
+ return members.includes(value);
594
+ }
595
+ function createField(field) {
596
+ assertNonEmptyString3(field.label, "field.label");
597
+ assertNonEmptyString3(field.value, "field.value");
598
+ return Object.freeze({
599
+ contractVersion: AI_GAME_IDENTITY_CONTRACT_VERSION,
600
+ label: field.label,
601
+ value: field.value,
602
+ redacted: field.redacted ?? false
603
+ });
604
+ }
605
+ function redactField(field, value) {
606
+ return createField({
607
+ label: field.label,
608
+ value,
609
+ redacted: true
610
+ });
611
+ }
612
+ function isAiGameIdentityProjectionRead(value) {
613
+ return isMember2(value, AI_GAME_IDENTITY_PROJECTION_READS);
614
+ }
615
+ function isAiGameIdentityTargetCategory(value) {
616
+ return isMember2(value, AI_GAME_IDENTITY_TARGET_CATEGORIES);
617
+ }
618
+ function isAiGameIdentityKnowledgeState(value) {
619
+ return isMember2(value, AI_GAME_IDENTITY_KNOWLEDGE_STATES);
620
+ }
621
+ function isAiGameIdentityVisibilityState(value) {
622
+ return isMember2(value, AI_GAME_IDENTITY_VISIBILITY_STATES);
623
+ }
624
+ function resolveAiGameIdentityProjectionRead(input) {
625
+ return input.lineOfSight && input.knowledgeState === "full" ? "full" : "partial";
626
+ }
627
+ function createAiGameIdentitySelfProjection(input) {
628
+ assertNonEmptyString3(input.entityId, "entityId");
629
+ assertNonEmptyString3(input.label, "label");
630
+ assertNonEmptyString3(input.summary, "summary");
631
+ return Object.freeze({
632
+ contractVersion: AI_GAME_IDENTITY_CONTRACT_VERSION,
633
+ entityId: input.entityId,
634
+ label: input.label,
635
+ projectionRead: "self",
636
+ summary: input.summary,
637
+ fields: freezeReadonlyArray3(input.fields.map((field) => createField(field)))
638
+ });
639
+ }
640
+ function createAiGameIdentityTargetProjection(input) {
641
+ assertNonEmptyString3(input.targetId, "targetId");
642
+ assertNonEmptyString3(input.label, "label");
643
+ assertNonEmptyString3(input.summary, "summary");
644
+ assertNonEmptyString3(input.combatSummary, "combatSummary");
645
+ if (!isAiGameIdentityTargetCategory(input.category)) {
646
+ throw new Error("category must be a supported identity target category");
647
+ }
648
+ if (!isAiGameIdentityKnowledgeState(input.knowledgeState)) {
649
+ throw new Error("knowledgeState must be a supported identity knowledge state");
650
+ }
651
+ const projectionRead = resolveAiGameIdentityProjectionRead(input);
652
+ const visibility = input.lineOfSight ? "visible" : "occluded";
653
+ const fields = input.fields.map(
654
+ (field) => projectionRead === "full" ? createField(field) : redactField(field, input.lineOfSight ? "Unknown" : "Withheld")
655
+ );
656
+ return Object.freeze({
657
+ contractVersion: AI_GAME_IDENTITY_CONTRACT_VERSION,
658
+ targetId: input.targetId,
659
+ label: input.label,
660
+ category: input.category,
661
+ knowledgeState: input.knowledgeState,
662
+ visibility,
663
+ lineOfSight: input.lineOfSight,
664
+ projectionRead,
665
+ summary: input.summary,
666
+ combatSummary: input.combatSummary,
667
+ fields: freezeReadonlyArray3(fields)
668
+ });
669
+ }
670
+ function selectAiGameVisibleIdentityTargets(targets) {
671
+ return freezeReadonlyArray3(
672
+ targets.filter((target) => target.visibility === "visible" && target.lineOfSight)
673
+ );
674
+ }
675
+ function createAiGameIdentityProjectionContract(input) {
676
+ const self = createAiGameIdentitySelfProjection(input.self);
677
+ const targets = freezeReadonlyArray3(
678
+ (input.targets ?? []).map((target) => createAiGameIdentityTargetProjection(target))
679
+ );
680
+ return Object.freeze({
681
+ contractVersion: AI_GAME_IDENTITY_CONTRACT_VERSION,
682
+ featureFlagId: AI_GAME_IDENTITY_FEATURE_FLAG_ID,
683
+ authorityOwner: "identity-card",
684
+ authorityMode: "projection-only",
685
+ disclosurePolicy: AI_GAME_IDENTITY_DISCLOSURE_POLICY,
686
+ self,
687
+ targets
688
+ });
689
+ }
690
+ function assertAiGameIdentityProjectionContractVersion(value) {
691
+ assertContractVersion2(value);
692
+ }
693
+
554
694
  // src/world-events.ts
555
695
  function isCanonicalWorldEvent(event) {
556
696
  return event.recordType === "canonical";
@@ -702,7 +842,7 @@ var QUIET_MEASURE_JUDGMENT_MISSING_EVIDENCE = [
702
842
  "private-or-low-witness-evidence",
703
843
  "costly-pressure-event"
704
844
  ];
705
- function isMember2(value, members) {
845
+ function isMember3(value, members) {
706
846
  return members.includes(value);
707
847
  }
708
848
  function assertRecord(value, label) {
@@ -743,7 +883,7 @@ function normalizeTimestamp(value, label) {
743
883
  }
744
884
  function normalizeMember(value, members, label) {
745
885
  const normalized = normalizeNonEmptyString(value, label);
746
- if (!isMember2(normalized, members)) {
886
+ if (!isMember3(normalized, members)) {
747
887
  throw new TypeError(`${label} must be one of: ${members.join(", ")}.`);
748
888
  }
749
889
  return normalized;
@@ -876,13 +1016,13 @@ function normalizeDominantReads(value) {
876
1016
  return Object.freeze(value.map((entry, index) => normalizeDerivedReadSummary(entry, index)));
877
1017
  }
878
1018
  function isQuietMeasureAxis(value) {
879
- return isMember2(value, QUIET_MEASURE_AXES);
1019
+ return isMember3(value, QUIET_MEASURE_AXES);
880
1020
  }
881
1021
  function isQuietMeasureMissionProbeMode(value) {
882
- return isMember2(value, QUIET_MEASURE_MISSION_PROBE_MODES);
1022
+ return isMember3(value, QUIET_MEASURE_MISSION_PROBE_MODES);
883
1023
  }
884
1024
  function isQuietMeasureMissionResolutionShape(value) {
885
- return isMember2(value, QUIET_MEASURE_MISSION_RESOLUTION_SHAPES);
1025
+ return isMember3(value, QUIET_MEASURE_MISSION_RESOLUTION_SHAPES);
886
1026
  }
887
1027
  function createQuietMeasureJudgmentEligibility(input = {}) {
888
1028
  const repeatedMeaningfulEvidence = normalizeOptionalBoolean(
@@ -1387,6 +1527,13 @@ export {
1387
1527
  AI_GAME_FEATURE_FLAG_ID,
1388
1528
  AI_GAME_GOSSIP_LIFECYCLE_FEATURE_FLAG_ID,
1389
1529
  AI_GAME_GOSSIP_TOPICS_FEATURE_FLAG_ID,
1530
+ AI_GAME_IDENTITY_CONTRACT_VERSION,
1531
+ AI_GAME_IDENTITY_DISCLOSURE_POLICY,
1532
+ AI_GAME_IDENTITY_FEATURE_FLAG_ID,
1533
+ AI_GAME_IDENTITY_KNOWLEDGE_STATES,
1534
+ AI_GAME_IDENTITY_PROJECTION_READS,
1535
+ AI_GAME_IDENTITY_TARGET_CATEGORIES,
1536
+ AI_GAME_IDENTITY_VISIBILITY_STATES,
1390
1537
  AI_GAME_INCIDENT_IMPACT_FEATURE_FLAG_ID,
1391
1538
  AI_GAME_PACKAGE,
1392
1539
  AI_GAME_PERSPECTIVE_FEATURE_FLAG_ID,
@@ -1436,8 +1583,12 @@ export {
1436
1583
  QUIET_MEASURE_PERSPECTIVES,
1437
1584
  QUIET_MEASURE_SIGNAL_BANDS,
1438
1585
  aiGameFeatureFlags,
1586
+ assertAiGameIdentityProjectionContractVersion,
1439
1587
  classifyAiGameTask,
1440
1588
  createAiGameAcademicTrainingSnapshot,
1589
+ createAiGameIdentityProjectionContract,
1590
+ createAiGameIdentitySelfProjection,
1591
+ createAiGameIdentityTargetProjection,
1441
1592
  createAiGameInstitutionEligibility,
1442
1593
  createAiGameMartialTrainingSnapshot,
1443
1594
  createAiGamePlayerSystemAlert,
@@ -1457,6 +1608,10 @@ export {
1457
1608
  gameEventFeatureFlags,
1458
1609
  getAiGamePlayerSystemFocusModeContract,
1459
1610
  getAiGamePlayerSystemModuleContract,
1611
+ isAiGameIdentityKnowledgeState,
1612
+ isAiGameIdentityProjectionRead,
1613
+ isAiGameIdentityTargetCategory,
1614
+ isAiGameIdentityVisibilityState,
1460
1615
  isAiGamePlayerSystemAlertDeliverable,
1461
1616
  isAiGamePlayerSystemAlertPriority,
1462
1617
  isAiGamePlayerSystemConfidenceBand,
@@ -1492,9 +1647,11 @@ export {
1492
1647
  normalizeIncidentImpactVector,
1493
1648
  packageDescriptor,
1494
1649
  projectTopicForAudience,
1650
+ resolveAiGameIdentityProjectionRead,
1495
1651
  resolveAiGamePlayerAddressText,
1496
1652
  resolveAiGamePlayerSystemConfidenceBand,
1497
1653
  resolveAiGameTaskBatch,
1498
- selectAiGamePlayerSystemAlertsForFocusMode
1654
+ selectAiGamePlayerSystemAlertsForFocusMode,
1655
+ selectAiGameVisibleIdentityTargets
1499
1656
  };
1500
1657
  //# sourceMappingURL=index.js.map