@plasius/ai-game 0.2.0 → 0.4.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/CHANGELOG.md +31 -0
- package/README.md +50 -2
- package/dist/index.cjs +682 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +323 -1
- package/dist/index.d.ts +323 -1
- package/dist/index.js +628 -6
- package/dist/index.js.map +1 -1
- package/docs/adrs/adr-0012-identity-projection-contract-boundary.md +55 -0
- package/docs/adrs/adr-0013-adaptive-mission-contract-boundary.md +63 -0
- package/docs/adrs/index.md +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/)**, and this project adheres to **[Semantic Versioning](https://semver.org/spec/v2.0.0.html)**.
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
- **Added**
|
|
9
|
+
- (placeholder)
|
|
10
|
+
|
|
11
|
+
- **Changed**
|
|
12
|
+
- (placeholder)
|
|
13
|
+
|
|
14
|
+
- **Fixed**
|
|
15
|
+
- (placeholder)
|
|
16
|
+
|
|
17
|
+
- **Security**
|
|
18
|
+
- (placeholder)
|
|
19
|
+
|
|
20
|
+
## [0.4.0] - 2026-07-10
|
|
21
|
+
|
|
22
|
+
- **Added**
|
|
23
|
+
- Added adaptive System mission contracts under `isekai.player-system.missions.enabled`, including mission-definition, objective-state, player-response, player-model influence, and bounded reward-envelope payloads.
|
|
24
|
+
|
|
25
|
+
- **Changed**
|
|
26
|
+
- Extended the public package surface with progression-safe mission guidance metadata, explicit audio and visual feedback channels, and reward cap semantics for Player System consumers.
|
|
27
|
+
|
|
28
|
+
- **Fixed**
|
|
29
|
+
- (placeholder)
|
|
30
|
+
|
|
31
|
+
- **Security**
|
|
32
|
+
- (placeholder)
|
|
33
|
+
|
|
34
|
+
## [0.3.0] - 2026-07-10
|
|
35
|
+
|
|
8
36
|
- **Added**
|
|
9
37
|
- (placeholder)
|
|
10
38
|
|
|
@@ -21,6 +49,7 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
|
|
|
21
49
|
|
|
22
50
|
- **Added**
|
|
23
51
|
- Added versioned Player System session, focus-mode, module, alert-priority, and preference-learning contracts under `isekai.player-system.core.enabled`.
|
|
52
|
+
- Added identity projection and target-classification contracts under `isekai.player-system.identity.enabled`, with self/full, knowledge-gated partial, and line-of-sight-safe target payloads.
|
|
24
53
|
|
|
25
54
|
- **Changed**
|
|
26
55
|
- (placeholder)
|
|
@@ -165,3 +194,5 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
|
|
|
165
194
|
[0.1.12]: https://github.com/Plasius-LTD/ai-game/releases/tag/v0.1.12
|
|
166
195
|
[0.1.13]: https://github.com/Plasius-LTD/ai-game/releases/tag/v0.1.13
|
|
167
196
|
[0.2.0]: https://github.com/Plasius-LTD/ai-game/releases/tag/v0.2.0
|
|
197
|
+
[0.3.0]: https://github.com/Plasius-LTD/ai-game/releases/tag/v0.3.0
|
|
198
|
+
[0.4.0]: https://github.com/Plasius-LTD/ai-game/releases/tag/v0.4.0
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @plasius/ai-game
|
|
2
2
|
|
|
3
|
-
Game-domain AI contracts for player action validation, NPC actions, gossip, Quiet Measure mission probes, Judgment disclosure surfaces, and Player System-readable training recommendations.
|
|
3
|
+
Game-domain AI contracts for player action validation, adaptive System missions, NPC actions, gossip, Quiet Measure mission probes, Judgment disclosure surfaces, and Player System-readable training recommendations.
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
|
7
|
-
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, Quiet Measure hidden-runtime integration surfaces, and the Player System bridge layer that consumes `@plasius/training`.
|
|
7
|
+
This package is part of the layered `@plasius/ai-*` package family. It exports canonical public contracts for adaptive System missions, world events, world-event ingestion, incident impact state, gossip topic projection, Quiet Measure hidden-runtime integration surfaces, and the Player System bridge layer that consumes `@plasius/training`.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -86,6 +86,35 @@ Use `createAiGamePlayerSystemSession()`,
|
|
|
86
86
|
contracts intentionally contain no account identifiers, credentials, or raw
|
|
87
87
|
player telemetry.
|
|
88
88
|
|
|
89
|
+
## Adaptive mission contracts
|
|
90
|
+
|
|
91
|
+
Adaptive System missions are versioned, dependency-free shared contracts under
|
|
92
|
+
`isekai.player-system.missions.enabled`. They keep the Player System's internal
|
|
93
|
+
mission vocabulary portable while preserving progression safety.
|
|
94
|
+
|
|
95
|
+
- `AiGameMissionDefinition` captures bootstrap, short-term, medium-term, and
|
|
96
|
+
long-horizon mission guidance with explicit readiness context, nearby
|
|
97
|
+
opportunity codes, world-pressure codes, and dual `audio` / `visual`
|
|
98
|
+
feedback channels.
|
|
99
|
+
- `AiGameMissionObjectiveState` freezes bounded progress snapshots for mission
|
|
100
|
+
objectives without leaking host runtime internals.
|
|
101
|
+
- `AiGameMissionPlayerResponse` explicitly models acceptance, refusal,
|
|
102
|
+
ignored or declined outcomes, pinning, completion, failure, and abandonment
|
|
103
|
+
so those events can feed the player model safely.
|
|
104
|
+
- `AiGameMissionPlayerModelInfluenceInput` carries preference dimensions,
|
|
105
|
+
bounded confidence, evidence metadata, repeated-signal handling, MCC focus
|
|
106
|
+
influence, and readiness or gate context.
|
|
107
|
+
- `AiGameMissionRewardEnvelope` encodes progression-safe accelerants only:
|
|
108
|
+
bounded currencies, items, recipes, temporary modifiers, and knowledge
|
|
109
|
+
unlocks with minimum, maximum, cap, cap semantic, readiness context, stage
|
|
110
|
+
gates, and explicit `cannotSkipReasonCodes`.
|
|
111
|
+
|
|
112
|
+
Use `createAiGameMissionDefinition()`,
|
|
113
|
+
`createAiGameMissionPlayerResponse()`, and
|
|
114
|
+
`createAiGameMissionRewardEnvelope()` at package boundaries. The mission
|
|
115
|
+
surface intentionally avoids raw telemetry, progression writes, and
|
|
116
|
+
authority-owned tuning data.
|
|
117
|
+
|
|
89
118
|
## Quiet Measure contracts
|
|
90
119
|
|
|
91
120
|
The Quiet Measure surface is intentionally structured as a hidden-runtime contract, not a turnkey morality meter.
|
|
@@ -96,6 +125,24 @@ The Quiet Measure surface is intentionally structured as a hidden-runtime contra
|
|
|
96
125
|
- 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.
|
|
97
126
|
- Evaluation fixtures for hero, villain, counterfeit, tyrant, and redemption regression cases belong in `@plasius/ai-evals`, not this package.
|
|
98
127
|
|
|
128
|
+
## Identity projection contracts
|
|
129
|
+
|
|
130
|
+
Identity projections are versioned, projection-only payloads under
|
|
131
|
+
`isekai.player-system.identity.enabled`. The identity-card boundary remains the
|
|
132
|
+
authority of record; `@plasius/ai-game` only defines portable consumer
|
|
133
|
+
contracts.
|
|
134
|
+
|
|
135
|
+
- Self projections are full reads.
|
|
136
|
+
- Visible targets are full only when both line of sight and full knowledge are
|
|
137
|
+
present; otherwise fields are redacted into a partial read.
|
|
138
|
+
- Occluded targets always become partial reads with `Withheld` field values.
|
|
139
|
+
- Target categories are `allied`, `neutral`, `unknown`, and `unfriendly`.
|
|
140
|
+
|
|
141
|
+
Use `createAiGameIdentityProjectionContract()` to build an immutable payload
|
|
142
|
+
and `selectAiGameVisibleIdentityTargets()` before rendering line-of-sight
|
|
143
|
+
surfaces. The contract does not carry hidden truth or authority-owned mutation
|
|
144
|
+
data.
|
|
145
|
+
|
|
99
146
|
## Development
|
|
100
147
|
|
|
101
148
|
```bash
|
|
@@ -116,6 +163,7 @@ npm run pack:check
|
|
|
116
163
|
- `ai.game.npc-gossip.lifecycle.enabled`
|
|
117
164
|
- `isekai.player-system.quiet-measure.enabled`
|
|
118
165
|
- `isekai.player-system.core.enabled`
|
|
166
|
+
- `isekai.player-system.identity.enabled`
|
|
119
167
|
- `isekai.training.institutions.enabled`
|
|
120
168
|
- `isekai.training.academies.enabled`
|
|
121
169
|
- `isekai.training.martial.enabled`
|