@sharpee/if-domain 5.4.0 → 5.5.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/channels/index.d.ts +3 -1
- package/channels/index.d.ts.map +1 -1
- package/channels/index.js +2 -0
- package/channels/index.js.map +1 -1
- package/channels/types.d.ts +80 -2
- package/channels/types.d.ts.map +1 -1
- package/channels/types.js.map +1 -1
- package/endings.d.ts +8 -19
- package/endings.d.ts.map +1 -1
- package/endings.js +9 -20
- package/endings.js.map +1 -1
- package/grammar/grammar-builder.d.ts +162 -156
- package/grammar/grammar-builder.d.ts.map +1 -1
- package/grammar/grammar-builder.js +1 -1
- package/grammar/grammar-builder.js.map +1 -1
- package/grammar/grammar-engine.d.ts +8 -10
- package/grammar/grammar-engine.d.ts.map +1 -1
- package/grammar/grammar-engine.js +129 -182
- package/grammar/grammar-engine.js.map +1 -1
- package/grammar/index.d.ts +1 -0
- package/grammar/index.d.ts.map +1 -1
- package/grammar/index.js +1 -0
- package/grammar/index.js.map +1 -1
- package/grammar/pattern-compiler.d.ts +20 -16
- package/grammar/pattern-compiler.d.ts.map +1 -1
- package/grammar/pattern-compiler.js +6 -1
- package/grammar/pattern-compiler.js.map +1 -1
- package/grammar/rule-order.d.ts +53 -0
- package/grammar/rule-order.d.ts.map +1 -0
- package/grammar/rule-order.js +47 -0
- package/grammar/rule-order.js.map +1 -0
- package/grammar/scope-builder.d.ts +10 -3
- package/grammar/scope-builder.d.ts.map +1 -1
- package/grammar/scope-builder.js +12 -13
- package/grammar/scope-builder.js.map +1 -1
- package/language-provider.d.ts +10 -1
- package/language-provider.d.ts.map +1 -1
- package/package.json +3 -3
- package/parser-contracts/parser-internals.d.ts +0 -12
- package/parser-contracts/parser-internals.d.ts.map +1 -1
- package/parser-contracts/parser-internals.js.map +1 -1
- package/parser-contracts/parser-types.d.ts +0 -12
- package/parser-contracts/parser-types.d.ts.map +1 -1
- package/parser-language-provider.d.ts +28 -35
- package/parser-language-provider.d.ts.map +1 -1
- package/sound/types.d.ts +21 -0
- package/sound/types.d.ts.map +1 -1
- package/sound/types.js +21 -1
- package/sound/types.js.map +1 -1
- package/vocabulary-contracts/vocabulary-adapters.d.ts +6 -2
- package/vocabulary-contracts/vocabulary-adapters.d.ts.map +1 -1
- package/vocabulary-contracts/vocabulary-adapters.js +8 -33
- package/vocabulary-contracts/vocabulary-adapters.js.map +1 -1
- package/vocabulary-contracts/vocabulary-registry.d.ts +9 -23
- package/vocabulary-contracts/vocabulary-registry.d.ts.map +1 -1
- package/vocabulary-contracts/vocabulary-registry.js +10 -66
- package/vocabulary-contracts/vocabulary-registry.js.map +1 -1
- package/vocabulary-contracts/vocabulary-types.d.ts +22 -25
- package/vocabulary-contracts/vocabulary-types.d.ts.map +1 -1
- package/vocabulary-contracts/vocabulary-types.js.map +1 -1
package/channels/index.d.ts
CHANGED
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
* configuration enums (§3, §4, §5).
|
|
14
14
|
* - `ClientCapabilities`, `CapabilityFlag` — capability declaration and
|
|
15
15
|
* the gating discriminator (§2, §6).
|
|
16
|
+
* - `HeadingPart`, `LocationHeadingValue` — the `location` channel's
|
|
17
|
+
* structured payload (ADR-349 D11, D12).
|
|
16
18
|
* - `ChannelDefinition`, `HelloPacket`, `CmgtPacket`, `TurnPacket`,
|
|
17
19
|
* `CommandPacket`, `WirePacket` — wire-protocol packets (§1, §11).
|
|
18
20
|
*
|
|
19
21
|
* @see ADR-163 — Channel-Service Platform
|
|
20
22
|
*/
|
|
21
|
-
export type { ChannelContentType, ChannelMode, ChannelEmitPolicy, ClientCapabilities, CapabilityFlag, ChannelProduceContext, IOChannel, IChannelRegistry, ProseEntry, PreferredLayout, ProseChannelId, } from './types.js';
|
|
23
|
+
export type { ChannelContentType, ChannelMode, ChannelEmitPolicy, ClientCapabilities, CapabilityFlag, ChannelProduceContext, IOChannel, IChannelRegistry, ChannelRegistrationPosition, ProseEntry, PreferredLayout, ProseChannelId, HeadingPart, LocationHeadingValue, } from './types.js';
|
|
22
24
|
export { PREFERRED_LAYOUT_CHANNEL, PROSE_CHANNEL_IDS } from './types.js';
|
|
23
25
|
export type { ChannelDefinition, HelloPacket, CmgtPacket, TurnPacket, CommandPacket, WirePacket, } from './wire.js';
|
|
24
26
|
//# sourceMappingURL=index.d.ts.map
|
package/channels/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,SAAS,EACT,gBAAgB,EAChB,2BAA2B,EAC3B,UAAU,EACV,eAAe,EACf,cAAc,EACd,WAAW,EACX,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEzE,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,GACX,MAAM,WAAW,CAAC"}
|
package/channels/index.js
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* configuration enums (§3, §4, §5).
|
|
15
15
|
* - `ClientCapabilities`, `CapabilityFlag` — capability declaration and
|
|
16
16
|
* the gating discriminator (§2, §6).
|
|
17
|
+
* - `HeadingPart`, `LocationHeadingValue` — the `location` channel's
|
|
18
|
+
* structured payload (ADR-349 D11, D12).
|
|
17
19
|
* - `ChannelDefinition`, `HelloPacket`, `CmgtPacket`, `TurnPacket`,
|
|
18
20
|
* `CommandPacket`, `WirePacket` — wire-protocol packets (§1, §11).
|
|
19
21
|
*
|
package/channels/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAmBH,uCAAyE;AAAhE,oHAAA,wBAAwB,OAAA;AAAE,6GAAA,iBAAiB,OAAA"}
|
package/channels/types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @see ADR-163 — Channel-Service Platform — §6, §7, §14
|
|
25
25
|
*/
|
|
26
26
|
import type { ISemanticEvent, Presence } from '@sharpee/core';
|
|
27
|
-
import type { ITextBlock, TextContent } from '@sharpee/text-blocks';
|
|
27
|
+
import type { IBlockSource, ITextBlock, TextContent } from '@sharpee/text-blocks';
|
|
28
28
|
/**
|
|
29
29
|
* Channel content types (ADR-163 §3).
|
|
30
30
|
*
|
|
@@ -88,6 +88,13 @@ export interface ProseEntry {
|
|
|
88
88
|
* Mirrors `ITextBlock.location`; set only alongside `presence`.
|
|
89
89
|
*/
|
|
90
90
|
readonly location?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The message the entry's text was rendered from (ADR-333 D1). Mirrors
|
|
93
|
+
* `ITextBlock.source` — the same `IBlockSource` type, imported, never
|
|
94
|
+
* redeclared — so a client can address the paragraph's source by id.
|
|
95
|
+
* Absent on entries not rendered from a message.
|
|
96
|
+
*/
|
|
97
|
+
readonly source?: IBlockSource;
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
100
|
* Wire value of the `preferred-layout` channel (ADR-300 D9).
|
|
@@ -127,6 +134,60 @@ export declare const PREFERRED_LAYOUT_CHANNEL = "preferred-layout";
|
|
|
127
134
|
export declare const PROSE_CHANNEL_IDS: readonly ["room-name", "room-description", "room-contents", "action-result", "action-blocked", "error", "game-message"];
|
|
128
135
|
/** One of the platform's prose channel ids. */
|
|
129
136
|
export type ProseChannelId = (typeof PROSE_CHANNEL_IDS)[number];
|
|
137
|
+
/**
|
|
138
|
+
* One contributor's text for the current location heading (ADR-349 D11).
|
|
139
|
+
*
|
|
140
|
+
* A heading is an ordered list of these, emitted place then enclosure. A region
|
|
141
|
+
* contributes no part (ADR-360 D6). The projection that builds them lives
|
|
142
|
+
* in `@sharpee/world-model` (`LocationHeadingBehavior.resolve`); the type lives
|
|
143
|
+
* here because the projection's producer and the wire's consumers are in
|
|
144
|
+
* different packages and must share the shape by import, never by mirroring.
|
|
145
|
+
*/
|
|
146
|
+
export interface HeadingPart {
|
|
147
|
+
/** The entity that supplied this text — the place or the enclosure. */
|
|
148
|
+
readonly ownerId: string;
|
|
149
|
+
/** The winning arm's resolved prose, pre-decoration. */
|
|
150
|
+
readonly text: string;
|
|
151
|
+
readonly role: 'place' | 'enclosure';
|
|
152
|
+
/**
|
|
153
|
+
* This contributor declared at least one conditional arm, so its text was
|
|
154
|
+
* chosen by consulting the world (ADR-364 D4; amends ADR-349 D11).
|
|
155
|
+
*
|
|
156
|
+
* Static, not a report of what happened this turn: it is true whenever any
|
|
157
|
+
* arm carries a condition, whether or not that arm won, because a heading
|
|
158
|
+
* that *can* vary is the thing auto-assertion must not pin (ADR-349 D14).
|
|
159
|
+
*
|
|
160
|
+
* **Its reader is `@sharpee/lang-en-us`**, which wraps a variable part so the
|
|
161
|
+
* realized run carries provenance to the wire. It rides `HeadingPart` because
|
|
162
|
+
* that is the only channel from the projection to the locale — and because
|
|
163
|
+
* `HeadingPart` is also the `location` channel's payload, it reaches clients
|
|
164
|
+
* too, where nothing reads it. That double duty is ADR-349's design, recorded
|
|
165
|
+
* here rather than left to be rediscovered.
|
|
166
|
+
*/
|
|
167
|
+
readonly variable?: boolean;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Wire value of the `location` channel (ADR-349 D12).
|
|
171
|
+
*
|
|
172
|
+
* Structured, not a bare string: a client that wants to style or drop a part
|
|
173
|
+
* needs the parts, and a client that just writes a status field needs the
|
|
174
|
+
* realized text. Both ride together so neither consumer re-derives the other.
|
|
175
|
+
*
|
|
176
|
+
* `text` is the locale's realization of `parts` — the English Assembler joins
|
|
177
|
+
* them as a `Sequence` under its punctuation authority (D13), so a client
|
|
178
|
+
* displays it verbatim and never re-joins.
|
|
179
|
+
*
|
|
180
|
+
* `parts` is empty when no contributor declared a `room name` and every
|
|
181
|
+
* contributor's arms failed. In that case `text` carries the place entity's own
|
|
182
|
+
* name, which is D16a's fallback: the entity name appears only when the whole
|
|
183
|
+
* heading would otherwise be empty.
|
|
184
|
+
*/
|
|
185
|
+
export interface LocationHeadingValue {
|
|
186
|
+
/** The heading as the player reads it, already joined by the locale. */
|
|
187
|
+
readonly text: string;
|
|
188
|
+
/** The parts it was realized from, in emission order. Empty on the fallback. */
|
|
189
|
+
readonly parts: ReadonlyArray<HeadingPart>;
|
|
190
|
+
}
|
|
130
191
|
/**
|
|
131
192
|
* Channel update modes (ADR-163 §4).
|
|
132
193
|
*
|
|
@@ -281,6 +342,13 @@ export interface IOChannel<T = unknown> {
|
|
|
281
342
|
*/
|
|
282
343
|
readonly produce: (ctx: ChannelProduceContext) => T | T[] | undefined | null;
|
|
283
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Where a NEW channel lands in registration order: immediately before
|
|
347
|
+
* the channel with the named id. See `IChannelRegistry.add`.
|
|
348
|
+
*/
|
|
349
|
+
export interface ChannelRegistrationPosition {
|
|
350
|
+
readonly before: string;
|
|
351
|
+
}
|
|
284
352
|
/**
|
|
285
353
|
* Channel registry contract (ADR-163 §7, §14).
|
|
286
354
|
*
|
|
@@ -292,6 +360,16 @@ export interface IOChannel<T = unknown> {
|
|
|
292
360
|
* id replaces the prior definition. This is how stories override
|
|
293
361
|
* standard channels (per §6).
|
|
294
362
|
*
|
|
363
|
+
* Registration order is the order `all()` returns, which is the order
|
|
364
|
+
* the manifest lists channels and the order a client dispatches a turn's
|
|
365
|
+
* payload (ADR-165). A channel that must reach the client before another
|
|
366
|
+
* — a chapter title card ahead of the prose flush, say — passes
|
|
367
|
+
* `position: { before: <id> }` and lands immediately before that id.
|
|
368
|
+
* The position is consulted only when the id is NEW: re-registering an
|
|
369
|
+
* existing id replaces it in place and keeps the place it already has,
|
|
370
|
+
* so last-write-wins and ordering never contradict each other. An
|
|
371
|
+
* unknown `before` id is an error, never a silent append.
|
|
372
|
+
*
|
|
295
373
|
* Implementations live elsewhere:
|
|
296
374
|
*
|
|
297
375
|
* - `@sharpee/stdlib` exports a populated `channelRegistry` instance
|
|
@@ -300,7 +378,7 @@ export interface IOChannel<T = unknown> {
|
|
|
300
378
|
* stories add or override channels.
|
|
301
379
|
*/
|
|
302
380
|
export interface IChannelRegistry {
|
|
303
|
-
add(channel: IOChannel): void;
|
|
381
|
+
add(channel: IOChannel, position?: ChannelRegistrationPosition): void;
|
|
304
382
|
get(id: string): IOChannel | undefined;
|
|
305
383
|
all(): readonly IOChannel[];
|
|
306
384
|
}
|
package/channels/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE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,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACtE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IACvC,GAAG,IAAI,SAAS,SAAS,EAAE,CAAC;CAC7B"}
|
package/channels/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../work/sharpee/sharpee/packages/if-domain/src/channels/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;AAoGH;;GAEG;AACU,QAAA,wBAAwB,GAAG,kBAAkB,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACU,QAAA,iBAAiB,GAAG;IAC/B,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,OAAO;IACP,cAAc;CACN,CAAC"}
|
package/endings.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Story ending contract (ADR-210 Platform Prerequisite 3).
|
|
3
3
|
*
|
|
4
|
-
* Purpose: bless the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Purpose: bless the story-ending convention as a stable wire contract — the
|
|
5
|
+
* event types stories/loaders emit when a story ends, and the shape of the
|
|
6
|
+
* Ending the world carries (ADR-347 D2a). No behavior lives here; emitters
|
|
7
|
+
* build the events with existing primitives.
|
|
8
8
|
*
|
|
9
|
-
* Public interface: `StoryEndingEvents`, `
|
|
10
|
-
* `
|
|
9
|
+
* Public interface: `StoryEndingEvents`, `StoryEndingKind`,
|
|
10
|
+
* `IStoryEndingData`, `IStoryEnding`.
|
|
11
11
|
*
|
|
12
12
|
* Owner context: `@sharpee/if-domain` — shared by the story-loader (emits on
|
|
13
13
|
* `win`/`lose`), the engine/clients (react to endings), and transcript tests
|
|
14
14
|
* (assert on the event types), so per the co-located wire-type rule it lives
|
|
15
|
-
* here. INVARIANT: values are frozen contract — changing them
|
|
16
|
-
*
|
|
15
|
+
* here. INVARIANT: the event-type values are frozen contract — changing them
|
|
16
|
+
* breaks golden transcripts; additions only.
|
|
17
17
|
*/
|
|
18
18
|
/** Semantic event types emitted when a story ends. */
|
|
19
19
|
export declare const StoryEndingEvents: {
|
|
@@ -24,17 +24,6 @@ export declare const StoryEndingEvents: {
|
|
|
24
24
|
};
|
|
25
25
|
/** How a story ended. */
|
|
26
26
|
export type StoryEndingKind = 'victory' | 'defeat';
|
|
27
|
-
/**
|
|
28
|
-
* World-state key that once held the ending.
|
|
29
|
-
*
|
|
30
|
-
* **Superseded by {@link IStoryEnding}** (ADR-347 D2a), which is a real
|
|
31
|
-
* `WorldModel` member rather than a key in an untyped state bag. Nothing
|
|
32
|
-
* reads or writes this key any more — the constant survives only because
|
|
33
|
-
* this file's values are frozen contract. Do not reach for it: an ending
|
|
34
|
-
* recorded here is invisible to the engine, the scheduler and every
|
|
35
|
-
* client.
|
|
36
|
-
*/
|
|
37
|
-
export declare const STORY_ENDING_FLAG = "story.ending";
|
|
38
27
|
/** Payload carried by a `StoryEndingEvents` event. */
|
|
39
28
|
export interface IStoryEndingData {
|
|
40
29
|
ending: StoryEndingKind;
|
package/endings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endings.d.ts","sourceRoot":"","sources":["../../../../../../work/sharpee/sharpee/packages/if-domain/src/endings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,sDAAsD;AACtD,eAAO,MAAM,iBAAiB;IAC5B,0EAA0E;;IAE1E,2EAA2E;;CAEnE,CAAC;AAEX,yBAAyB;AACzB,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEnD
|
|
1
|
+
{"version":3,"file":"endings.d.ts","sourceRoot":"","sources":["../../../../../../work/sharpee/sharpee/packages/if-domain/src/endings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,sDAAsD;AACtD,eAAO,MAAM,iBAAiB;IAC5B,0EAA0E;;IAE1E,2EAA2E;;CAEnE,CAAC;AAEX,yBAAyB;AACzB,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEnD,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,eAAe,CAAC;IACxB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAE/B;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,gEAAgE;IAChE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
package/endings.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @file Story ending contract (ADR-210 Platform Prerequisite 3).
|
|
4
4
|
*
|
|
5
|
-
* Purpose: bless the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Purpose: bless the story-ending convention as a stable wire contract — the
|
|
6
|
+
* event types stories/loaders emit when a story ends, and the shape of the
|
|
7
|
+
* Ending the world carries (ADR-347 D2a). No behavior lives here; emitters
|
|
8
|
+
* build the events with existing primitives.
|
|
9
9
|
*
|
|
10
|
-
* Public interface: `StoryEndingEvents`, `
|
|
11
|
-
* `
|
|
10
|
+
* Public interface: `StoryEndingEvents`, `StoryEndingKind`,
|
|
11
|
+
* `IStoryEndingData`, `IStoryEnding`.
|
|
12
12
|
*
|
|
13
13
|
* Owner context: `@sharpee/if-domain` — shared by the story-loader (emits on
|
|
14
14
|
* `win`/`lose`), the engine/clients (react to endings), and transcript tests
|
|
15
15
|
* (assert on the event types), so per the co-located wire-type rule it lives
|
|
16
|
-
* here. INVARIANT: values are frozen contract — changing them
|
|
17
|
-
*
|
|
16
|
+
* here. INVARIANT: the event-type values are frozen contract — changing them
|
|
17
|
+
* breaks golden transcripts; additions only.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.StoryEndingEvents = void 0;
|
|
21
21
|
/** Semantic event types emitted when a story ends. */
|
|
22
22
|
exports.StoryEndingEvents = {
|
|
23
23
|
/** The player has won (`win` in Chord; `story.victory` by convention). */
|
|
@@ -25,15 +25,4 @@ exports.StoryEndingEvents = {
|
|
|
25
25
|
/** The player has lost (`lose` in Chord; `story.defeat` by convention). */
|
|
26
26
|
DEFEAT: 'story.defeat',
|
|
27
27
|
};
|
|
28
|
-
/**
|
|
29
|
-
* World-state key that once held the ending.
|
|
30
|
-
*
|
|
31
|
-
* **Superseded by {@link IStoryEnding}** (ADR-347 D2a), which is a real
|
|
32
|
-
* `WorldModel` member rather than a key in an untyped state bag. Nothing
|
|
33
|
-
* reads or writes this key any more — the constant survives only because
|
|
34
|
-
* this file's values are frozen contract. Do not reach for it: an ending
|
|
35
|
-
* recorded here is invisible to the engine, the scheduler and every
|
|
36
|
-
* client.
|
|
37
|
-
*/
|
|
38
|
-
exports.STORY_ENDING_FLAG = 'story.ending';
|
|
39
28
|
//# sourceMappingURL=endings.js.map
|
package/endings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endings.js","sourceRoot":"","sources":["../../../../../../work/sharpee/sharpee/packages/if-domain/src/endings.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,sDAAsD;AACzC,QAAA,iBAAiB,GAAG;IAC/B,0EAA0E;IAC1E,OAAO,EAAE,eAAe;IACxB,2EAA2E;IAC3E,MAAM,EAAE,cAAc;CACd,CAAC
|
|
1
|
+
{"version":3,"file":"endings.js","sourceRoot":"","sources":["../../../../../../work/sharpee/sharpee/packages/if-domain/src/endings.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,sDAAsD;AACzC,QAAA,iBAAiB,GAAG;IAC/B,0EAA0E;IAC1E,OAAO,EAAE,eAAe;IACxB,2EAA2E;IAC3E,MAAM,EAAE,cAAc;CACd,CAAC"}
|