@sharpee/engine 2.0.0 → 2.1.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.
Files changed (46) hide show
  1. package/capability-dispatch-helper.d.ts +5 -3
  2. package/capability-dispatch-helper.d.ts.map +1 -1
  3. package/capability-dispatch-helper.js +6 -4
  4. package/capability-dispatch-helper.js.map +1 -1
  5. package/command-executor.d.ts.map +1 -1
  6. package/command-executor.js +2 -2
  7. package/command-executor.js.map +1 -1
  8. package/game-engine.d.ts.map +1 -1
  9. package/game-engine.js +25 -4
  10. package/game-engine.js.map +1 -1
  11. package/package.json +12 -12
  12. package/prose-pipeline/handlers/banner.d.ts +5 -6
  13. package/prose-pipeline/handlers/banner.d.ts.map +1 -1
  14. package/prose-pipeline/handlers/banner.js +4 -4
  15. package/prose-pipeline/handlers/banner.js.map +1 -1
  16. package/prose-pipeline/handlers/domain-message.d.ts +5 -0
  17. package/prose-pipeline/handlers/domain-message.d.ts.map +1 -1
  18. package/prose-pipeline/handlers/domain-message.js +14 -2
  19. package/prose-pipeline/handlers/domain-message.js.map +1 -1
  20. package/prose-pipeline/handlers/index.d.ts +1 -2
  21. package/prose-pipeline/handlers/index.d.ts.map +1 -1
  22. package/prose-pipeline/handlers/index.js +3 -5
  23. package/prose-pipeline/handlers/index.js.map +1 -1
  24. package/prose-pipeline/handlers/platform.d.ts +25 -0
  25. package/prose-pipeline/handlers/platform.d.ts.map +1 -0
  26. package/prose-pipeline/handlers/platform.js +48 -0
  27. package/prose-pipeline/handlers/platform.js.map +1 -0
  28. package/prose-pipeline/index.d.ts +1 -1
  29. package/prose-pipeline/index.d.ts.map +1 -1
  30. package/prose-pipeline/index.js +1 -3
  31. package/prose-pipeline/index.js.map +1 -1
  32. package/prose-pipeline/pipeline.d.ts.map +1 -1
  33. package/prose-pipeline/pipeline.js +11 -6
  34. package/prose-pipeline/pipeline.js.map +1 -1
  35. package/prose-pipeline/stages/filter.d.ts +9 -2
  36. package/prose-pipeline/stages/filter.d.ts.map +1 -1
  37. package/prose-pipeline/stages/filter.js +10 -3
  38. package/prose-pipeline/stages/filter.js.map +1 -1
  39. package/prose-pipeline/handlers/about.d.ts +0 -31
  40. package/prose-pipeline/handlers/about.d.ts.map +0 -1
  41. package/prose-pipeline/handlers/about.js +0 -50
  42. package/prose-pipeline/handlers/about.js.map +0 -1
  43. package/prose-pipeline/handlers/help.d.ts +0 -21
  44. package/prose-pipeline/handlers/help.d.ts.map +0 -1
  45. package/prose-pipeline/handlers/help.js +0 -68
  46. package/prose-pipeline/handlers/help.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharpee/engine",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Runtime engine for Sharpee IF Platform - game loop, command execution, and turn management",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -12,17 +12,17 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@sharpee/channel-service": "^2.0.0",
16
- "@sharpee/core": "^2.0.0",
17
- "@sharpee/event-processor": "^2.0.0",
18
- "@sharpee/plugins": "^2.0.0",
19
- "@sharpee/if-domain": "^2.0.0",
20
- "@sharpee/if-services": "^2.0.0",
21
- "@sharpee/lang-en-us": "^2.0.0",
22
- "@sharpee/parser-en-us": "^2.0.0",
23
- "@sharpee/stdlib": "^2.0.0",
24
- "@sharpee/text-blocks": "^2.0.0",
25
- "@sharpee/world-model": "^2.0.0",
15
+ "@sharpee/channel-service": "^2.1.0",
16
+ "@sharpee/core": "^2.1.0",
17
+ "@sharpee/event-processor": "^2.1.0",
18
+ "@sharpee/plugins": "^2.1.0",
19
+ "@sharpee/if-domain": "^2.1.0",
20
+ "@sharpee/if-services": "^2.1.0",
21
+ "@sharpee/lang-en-us": "^2.1.0",
22
+ "@sharpee/parser-en-us": "^2.1.0",
23
+ "@sharpee/stdlib": "^2.1.0",
24
+ "@sharpee/text-blocks": "^2.1.0",
25
+ "@sharpee/world-model": "^2.1.0",
26
26
  "fflate": "^0.8.2"
27
27
  },
28
28
  "keywords": [
@@ -2,9 +2,9 @@
2
2
  * Shared banner-block builder.
3
3
  *
4
4
  * Emits the opening banner as a sequence of semantically-classed
5
- * blocks. Used by both `handleGameStarted` and `handleAboutDisplayed`
6
- * so the banner shown at game-start and via the ABOUT command are
7
- * structurally identical.
5
+ * blocks. Used by `handleGameStarted` for the game-start banner.
6
+ * (ABOUT renders via the lang-en-us `if.action.about.success` template
7
+ * since 2026-07-02; its dedicated handler was removed.)
8
8
  *
9
9
  * Pieces (in order):
10
10
  *
@@ -25,8 +25,7 @@ import type { ITextBlock } from '@sharpee/text-blocks';
25
25
  import type { HandlerContext } from './types';
26
26
  /**
27
27
  * Subset of story metadata used by the banner builder.
28
- * Both `handleGameStarted` (`event.data.story`) and
29
- * `handleAboutDisplayed` (`event.data.params`) project into this shape.
28
+ * `handleGameStarted` projects `event.data.story` into this shape.
30
29
  */
31
30
  export interface BannerStoryInfo {
32
31
  title?: string;
@@ -38,7 +37,7 @@ export interface BannerStoryInfo {
38
37
  }
39
38
  /**
40
39
  * Build the structured banner blocks for a `key` (typically
41
- * `'game.banner'` from `game.started` or `'about.text'` from ABOUT).
40
+ * `'game.banner'` from `game.started`).
42
41
  */
43
42
  export declare function buildBannerBlocks(key: string, story: BannerStoryInfo | undefined, engineVersion: string | undefined, context: HandlerContext): ITextBlock[];
44
43
  //# sourceMappingURL=banner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/banner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,CAmDd"}
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/banner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,CAmDd"}
@@ -3,9 +3,9 @@
3
3
  * Shared banner-block builder.
4
4
  *
5
5
  * Emits the opening banner as a sequence of semantically-classed
6
- * blocks. Used by both `handleGameStarted` and `handleAboutDisplayed`
7
- * so the banner shown at game-start and via the ABOUT command are
8
- * structurally identical.
6
+ * blocks. Used by `handleGameStarted` for the game-start banner.
7
+ * (ABOUT renders via the lang-en-us `if.action.about.success` template
8
+ * since 2026-07-02; its dedicated handler was removed.)
9
9
  *
10
10
  * Pieces (in order):
11
11
  *
@@ -28,7 +28,7 @@ const assemble_1 = require("../assemble");
28
28
  const STORY_TAIL_MESSAGE_ID = 'game.banner.story-tail';
29
29
  /**
30
30
  * Build the structured banner blocks for a `key` (typically
31
- * `'game.banner'` from `game.started` or `'about.text'` from ABOUT).
31
+ * `'game.banner'` from `game.started`).
32
32
  */
33
33
  function buildBannerBlocks(key, story, engineVersion, context) {
34
34
  if (!story)
@@ -1 +1 @@
1
- {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/banner.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AA0BH,8CAwDC;AA/ED,0CAAwD;AAGxD,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAgBvD;;;GAGG;AACH,SAAgB,iBAAiB,CAC/B,GAAW,EACX,KAAkC,EAClC,aAAiC,EACjC,OAAuB;IAEvB,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,IAAA,sBAAW,EAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACnD,MAAM,WAAW,GAAG,SAAS;YAC3B,CAAC,CAAC,UAAU,KAAK,CAAC,OAAO,WAAW,SAAS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CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC7E,IAAI,IAAI,IAAI,IAAI,KAAK,qBAAqB,EAAE,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,GAAG,IAAA,uBAAY,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAS,eAAe,CAAC,SAA6B;IACpD,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/banner.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAyBH,8CAwDC;AA9ED,0CAAwD;AAGxD,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAevD;;;GAGG;AACH,SAAgB,iBAAiB,CAC/B,GAAW,EACX,KAAkC,EAClC,aAAiC,EACjC,OAAuB;IAEvB,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,IAAA,sBAAW,EAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,SAAS,GAAG,eAA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,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,UAAU,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC7E,IAAI,IAAI,IAAI,IAAI,KAAK,qBAAqB,EAAE,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,GAAG,IAAA,uBAAY,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAS,eAAe,CAAC,SAA6B;IACpD,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9C,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -6,6 +6,11 @@
6
6
  * story actions emitting `action.success` / `action.blocked` events
7
7
  * also flow through here.
8
8
  *
9
+ * Params bind nested-preferred with flat fallback (`data.params ?? data`,
10
+ * ADR-206 unified rule) — emitters may nest template params under
11
+ * `params` or carry them flat on the event data; nested wins when both
12
+ * exist.
13
+ *
9
14
  * Public interface: `tryProcessDomainEventMessage`. The pipeline
10
15
  * consults this first; on null, it falls through to the type-keyed
11
16
  * handlers (room, revealed, generic, etc.).
@@ -1 +1 @@
1
- {"version":3,"file":"domain-message.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/domain-message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAW9C;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,GAAG,IAAI,CA+CrB"}
1
+ {"version":3,"file":"domain-message.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/domain-message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAW9C;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,GAAG,IAAI,CAuDrB"}
@@ -7,6 +7,11 @@
7
7
  * story actions emitting `action.success` / `action.blocked` events
8
8
  * also flow through here.
9
9
  *
10
+ * Params bind nested-preferred with flat fallback (`data.params ?? data`,
11
+ * ADR-206 unified rule) — emitters may nest template params under
12
+ * `params` or carry them flat on the event data; nested wins when both
13
+ * exist.
14
+ *
10
15
  * Public interface: `tryProcessDomainEventMessage`. The pipeline
11
16
  * consults this first; on null, it falls through to the type-keyed
12
17
  * handlers (room, revealed, generic, etc.).
@@ -58,13 +63,20 @@ function tryProcessDomainEventMessage(event, context) {
58
63
  // messageId for semantic association, not for text rendering.
59
64
  return null;
60
65
  };
66
+ // Params binding (ADR-206 unified rule, 2026-07-02): prefer the nested
67
+ // `data.params` object; fall back to the flat event data — the same
68
+ // nested-preferred/flat-fallback rule handleGameMessage uses. Before
69
+ // this, the domain path was nested-only while the generic fallback bound
70
+ // flat, so a messageId + flat-params event failed here (stderr "param not
71
+ // bound" noise) and only rendered by accident via the generic handler.
72
+ const params = (data.params ?? data);
61
73
  // Phrase path (ADR-192): render the template to a phrase tree and realize it.
62
74
  if ((0, phrase_render_1.phraseAvailable)(context)) {
63
- const blocks = (0, phrase_render_1.renderViaPhrase)(context, data.messageId, data.params ?? {}, blockKey);
75
+ const blocks = (0, phrase_render_1.renderViaPhrase)(context, data.messageId, params, blockKey);
64
76
  return blocks ?? inlineFallback();
65
77
  }
66
78
  // Legacy string path — only when the pipeline has no world (some unit tests).
67
- const message = context.languageProvider.getMessage(data.messageId, data.params);
79
+ const message = context.languageProvider.getMessage(data.messageId, params);
68
80
  if (message === data.messageId || !message) {
69
81
  return inlineFallback();
70
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"domain-message.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/domain-message.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAwBH,oEAkDC;AAvED,sDAAkD;AAGlD,0CAA2C;AAC3C,oDAAoE;AASpE;;;;;;;GAOG;AACH,SAAgB,4BAA4B,CAC1C,KAAqB,EACrB,OAAuB;IAEvB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAqC,CAAC;IAEzD,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oEAAoE;IACpE,mCAAmC;IACnC,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,4CAA4C;IAC5C,MAAM,QAAQ,GACZ,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC9D,CAAC,CAAC,wBAAU,CAAC,cAAc;QAC3B,CAAC,CAAC,wBAAU,CAAC,aAAa,CAAC;IAE/B,MAAM,cAAc,GAAG,GAAwB,EAAE;QAC/C,0EAA0E;QAC1E,iEAAiE;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC;QAC3C,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,EAAE,CAAC;YAC7C,OAAO,IAAA,uBAAY,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,qEAAqE;QACrE,8DAA8D;QAC9D,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,8EAA8E;IAC9E,IAAI,IAAA,+BAAe,EAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,IAAA,+BAAe,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;QACrF,OAAO,MAAM,IAAI,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,8EAA8E;IAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjF,IAAI,OAAO,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC;QAC3C,OAAO,cAAc,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,IAAA,uBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"domain-message.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/domain-message.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAwBH,oEA0DC;AA/ED,sDAAkD;AAGlD,0CAA2C;AAC3C,oDAAoE;A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,MAAM,GAAG,IAAA,+BAAe,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1E,OAAO,MAAM,IAAI,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,8EAA8E;IAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,OAAO,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC;QAC3C,OAAO,cAAc,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,IAAA,uBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC"}
@@ -14,9 +14,8 @@ export { handleRoomDescription } from './room';
14
14
  export { handleRevealed } from './revealed';
15
15
  export { handleGameMessage, handleGenericEvent } from './generic';
16
16
  export { handleGameStarted } from './game';
17
- export { handleHelpDisplayed } from './help';
18
- export { handleAboutDisplayed } from './about';
19
17
  export { handleAudibilityHeard } from './audibility';
18
+ export { handlePlatformEvent } from './platform';
20
19
  export { tryProcessDomainEventMessage } from './domain-message';
21
20
  export { handleImplicitTake } from './implicit-take';
22
21
  export { handleCommandFailed } from './command-failed';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@
11
11
  * @see ADR-174 §Engine-internal prose pipeline
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.handleClientQuery = exports.handleCommandFailed = exports.handleImplicitTake = exports.tryProcessDomainEventMessage = exports.handleAudibilityHeard = exports.handleAboutDisplayed = exports.handleHelpDisplayed = exports.handleGameStarted = exports.handleGenericEvent = exports.handleGameMessage = exports.handleRevealed = exports.handleRoomDescription = void 0;
14
+ exports.handleClientQuery = exports.handleCommandFailed = exports.handleImplicitTake = exports.tryProcessDomainEventMessage = exports.handlePlatformEvent = exports.handleAudibilityHeard = exports.handleGameStarted = exports.handleGenericEvent = exports.handleGameMessage = exports.handleRevealed = exports.handleRoomDescription = void 0;
15
15
  // Type-keyed handlers (former text-service handlers/*.ts).
16
16
  var room_1 = require("./room");
17
17
  Object.defineProperty(exports, "handleRoomDescription", { enumerable: true, get: function () { return room_1.handleRoomDescription; } });
@@ -22,12 +22,10 @@ Object.defineProperty(exports, "handleGameMessage", { enumerable: true, get: fun
22
22
  Object.defineProperty(exports, "handleGenericEvent", { enumerable: true, get: function () { return generic_1.handleGenericEvent; } });
23
23
  var game_1 = require("./game");
24
24
  Object.defineProperty(exports, "handleGameStarted", { enumerable: true, get: function () { return game_1.handleGameStarted; } });
25
- var help_1 = require("./help");
26
- Object.defineProperty(exports, "handleHelpDisplayed", { enumerable: true, get: function () { return help_1.handleHelpDisplayed; } });
27
- var about_1 = require("./about");
28
- Object.defineProperty(exports, "handleAboutDisplayed", { enumerable: true, get: function () { return about_1.handleAboutDisplayed; } });
29
25
  var audibility_1 = require("./audibility");
30
26
  Object.defineProperty(exports, "handleAudibilityHeard", { enumerable: true, get: function () { return audibility_1.handleAudibilityHeard; } });
27
+ var platform_1 = require("./platform");
28
+ Object.defineProperty(exports, "handlePlatformEvent", { enumerable: true, get: function () { return platform_1.handlePlatformEvent; } });
31
29
  // Inline handlers extracted from text-service.ts in this sub-phase.
32
30
  var domain_message_1 = require("./domain-message");
33
31
  Object.defineProperty(exports, "tryProcessDomainEventMessage", { enumerable: true, get: function () { return domain_message_1.tryProcessDomainEventMessage; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AASH,2DAA2D;AAC3D,+BAA+C;AAAtC,6GAAA,qBAAqB,OAAA;AAC9B,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,qCAAkE;AAAzD,4GAAA,iBAAiB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAC9C,+BAA2C;AAAlC,yGAAA,iBAAiB,OAAA;AAC1B,+BAA6C;AAApC,2GAAA,mBAAmB,OAAA;AAC5B,iCAA+C;AAAtC,6GAAA,oBAAoB,OAAA;AAC7B,2CAAqD;AAA5C,mHAAA,qBAAqB,OAAA;AAE9B,oEAAoE;AACpE,mDAAgE;AAAvD,8HAAA,4BAA4B,OAAA;AACrC,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AASH,2DAA2D;AAC3D,+BAA+C;AAAtC,6GAAA,qBAAqB,OAAA;AAC9B,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,qCAAkE;AAAzD,4GAAA,iBAAiB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAC9C,+BAA2C;AAAlC,yGAAA,iBAAiB,OAAA;AAC1B,2CAAqD;AAA5C,mHAAA,qBAAqB,OAAA;AAC9B,uCAAiD;AAAxC,+GAAA,mBAAmB,OAAA;AAE5B,oEAAoE;AACpE,mDAAgE;AAAvD,8HAAA,4BAA4B,OAAA;AACrC,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Platform-event handler — renders `platform.*` lifecycle events.
3
+ *
4
+ * Platform events (core `createPlatformEvent`) carry their information in
5
+ * `payload`, not `data`, so the ADR-097 domain-message path never sees them.
6
+ * This handler renders them in the same prose-pipeline manner: the event
7
+ * type itself is the messageId (`platform.save_completed`,
8
+ * `platform.undo_failed`, ...) and params bind from the payload. lang-en-us
9
+ * registers the standard texts; stories override by registering the same id.
10
+ *
11
+ * Events with no registered message render nothing — request-phase events
12
+ * (`platform.save_requested`, ...) are intentionally silent by default.
13
+ *
14
+ * Public interface: `handlePlatformEvent`.
15
+ * Owner context: `@sharpee/engine` — internal prose pipeline.
16
+ */
17
+ import type { ITextBlock } from '@sharpee/text-blocks';
18
+ import type { ISemanticEvent } from '@sharpee/core';
19
+ import type { HandlerContext } from './types';
20
+ /**
21
+ * Render a `platform.*` event via the message registered under its event
22
+ * type. Returns [] when no message is registered (silent by design).
23
+ */
24
+ export declare function handlePlatformEvent(event: ISemanticEvent, context: HandlerContext): ITextBlock[];
25
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,CA0Bd"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Platform-event handler — renders `platform.*` lifecycle events.
4
+ *
5
+ * Platform events (core `createPlatformEvent`) carry their information in
6
+ * `payload`, not `data`, so the ADR-097 domain-message path never sees them.
7
+ * This handler renders them in the same prose-pipeline manner: the event
8
+ * type itself is the messageId (`platform.save_completed`,
9
+ * `platform.undo_failed`, ...) and params bind from the payload. lang-en-us
10
+ * registers the standard texts; stories override by registering the same id.
11
+ *
12
+ * Events with no registered message render nothing — request-phase events
13
+ * (`platform.save_requested`, ...) are intentionally silent by default.
14
+ *
15
+ * Public interface: `handlePlatformEvent`.
16
+ * Owner context: `@sharpee/engine` — internal prose pipeline.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.handlePlatformEvent = handlePlatformEvent;
20
+ const text_blocks_1 = require("@sharpee/text-blocks");
21
+ const assemble_1 = require("../assemble");
22
+ const phrase_render_1 = require("../phrase-render");
23
+ /**
24
+ * Render a `platform.*` event via the message registered under its event
25
+ * type. Returns [] when no message is registered (silent by design).
26
+ */
27
+ function handlePlatformEvent(event, context) {
28
+ if (!context.languageProvider) {
29
+ return [];
30
+ }
31
+ const payload = event.payload ?? {};
32
+ // Failure/cancellation outcomes block-key as blocked; successes as result
33
+ // (mirrors the domain-message handler's event-type semantics).
34
+ const blockKey = event.type.includes('failed') || event.type.includes('cancelled')
35
+ ? text_blocks_1.BLOCK_KEYS.ACTION_BLOCKED
36
+ : text_blocks_1.BLOCK_KEYS.ACTION_RESULT;
37
+ // Phrase path (ADR-192).
38
+ if ((0, phrase_render_1.phraseAvailable)(context)) {
39
+ return (0, phrase_render_1.renderViaPhrase)(context, event.type, payload, blockKey) ?? [];
40
+ }
41
+ // Legacy string path — only when the pipeline has no world (unit tests).
42
+ const message = context.languageProvider.getMessage(event.type, payload);
43
+ if (!message || message === event.type) {
44
+ return [];
45
+ }
46
+ return (0, assemble_1.createBlocks)(blockKey, message);
47
+ }
48
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/platform.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAaH,kDA6BC;AAvCD,sDAAkD;AAGlD,0CAA2C;AAC3C,oDAAoE;AAEpE;;;GAGG;AACH,SAAgB,mBAAmB,CACjC,KAAqB,EACrB,OAAuB;IAEvB,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC9B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,OAAO,GACV,KAA+C,CAAC,OAAO,IAAI,EAAE,CAAC;IAEjE,0EAA0E;IAC1E,+DAA+D;IAC/D,MAAM,QAAQ,GACZ,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC/D,CAAC,CAAC,wBAAU,CAAC,cAAc;QAC3B,CAAC,CAAC,wBAAU,CAAC,aAAa,CAAC;IAE/B,yBAAyB;IACzB,IAAI,IAAA,+BAAe,EAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAA,+BAAe,EAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;IAED,yEAAyE;IACzE,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzE,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC;QACvC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,IAAA,uBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC"}
@@ -17,5 +17,5 @@ export { filterEvents } from './stages/filter';
17
17
  export { sortEventsForProse, getChainMetadata, } from './stages/sort';
18
18
  export { createBlock, createBlocks, extractValue } from './assemble';
19
19
  export type { EventHandler, HandlerContext, ChainableEventData, GenericEventData, } from './handlers/types';
20
- export { handleRoomDescription, handleRevealed, handleGameMessage, handleGenericEvent, handleGameStarted, handleHelpDisplayed, handleAboutDisplayed, handleAudibilityHeard, tryProcessDomainEventMessage, handleImplicitTake, handleCommandFailed, handleClientQuery, } from './handlers';
20
+ export { handleRoomDescription, handleRevealed, handleGameMessage, handleGenericEvent, handleGameStarted, handleAudibilityHeard, tryProcessDomainEventMessage, handleImplicitTake, handleCommandFailed, handleClientQuery, } from './handlers';
21
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGhE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/D,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGrE,YAAY,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGhE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/D,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGrE,YAAY,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
@@ -11,7 +11,7 @@
11
11
  * @see ADR-174 §Engine-internal prose pipeline
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.handleClientQuery = exports.handleCommandFailed = exports.handleImplicitTake = exports.tryProcessDomainEventMessage = exports.handleAudibilityHeard = exports.handleAboutDisplayed = exports.handleHelpDisplayed = exports.handleGameStarted = exports.handleGenericEvent = exports.handleGameMessage = exports.handleRevealed = exports.handleRoomDescription = exports.extractValue = exports.createBlocks = exports.createBlock = exports.getChainMetadata = exports.sortEventsForProse = exports.filterEvents = exports.PLATFORM_VOCABULARY_NAMES = exports.PLATFORM_VOCABULARY = exports.resolveClassName = exports.parseDecorations = exports.createRenderContextFactory = exports.createRenderWorld = exports.createProsePipeline = exports.ProsePipeline = void 0;
14
+ exports.handleClientQuery = exports.handleCommandFailed = exports.handleImplicitTake = exports.tryProcessDomainEventMessage = exports.handleAudibilityHeard = exports.handleGameStarted = exports.handleGenericEvent = exports.handleGameMessage = exports.handleRevealed = exports.handleRoomDescription = exports.extractValue = exports.createBlocks = exports.createBlock = exports.getChainMetadata = exports.sortEventsForProse = exports.filterEvents = exports.PLATFORM_VOCABULARY_NAMES = exports.PLATFORM_VOCABULARY = exports.resolveClassName = exports.parseDecorations = exports.createRenderContextFactory = exports.createRenderWorld = exports.createProsePipeline = exports.ProsePipeline = void 0;
15
15
  // Pipeline class and factory.
16
16
  var pipeline_1 = require("./pipeline");
17
17
  Object.defineProperty(exports, "ProsePipeline", { enumerable: true, get: function () { return pipeline_1.ProsePipeline; } });
@@ -44,8 +44,6 @@ Object.defineProperty(exports, "handleRevealed", { enumerable: true, get: functi
44
44
  Object.defineProperty(exports, "handleGameMessage", { enumerable: true, get: function () { return handlers_1.handleGameMessage; } });
45
45
  Object.defineProperty(exports, "handleGenericEvent", { enumerable: true, get: function () { return handlers_1.handleGenericEvent; } });
46
46
  Object.defineProperty(exports, "handleGameStarted", { enumerable: true, get: function () { return handlers_1.handleGameStarted; } });
47
- Object.defineProperty(exports, "handleHelpDisplayed", { enumerable: true, get: function () { return handlers_1.handleHelpDisplayed; } });
48
- Object.defineProperty(exports, "handleAboutDisplayed", { enumerable: true, get: function () { return handlers_1.handleAboutDisplayed; } });
49
47
  Object.defineProperty(exports, "handleAudibilityHeard", { enumerable: true, get: function () { return handlers_1.handleAudibilityHeard; } });
50
48
  Object.defineProperty(exports, "tryProcessDomainEventMessage", { enumerable: true, get: function () { return handlers_1.tryProcessDomainEventMessage; } });
51
49
  Object.defineProperty(exports, "handleImplicitTake", { enumerable: true, get: function () { return handlers_1.handleImplicitTake; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,8BAA8B;AAC9B,uCAAgE;AAAvD,yGAAA,aAAa,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAK3C,gEAAgE;AAChE,mDAK0B;AAJxB,mHAAA,iBAAiB,OAAA;AACjB,4HAAA,0BAA0B,OAAA;AAK5B,oEAAoE;AACpE,oEAAoE;AACpE,8BAA8B;AAC9B,6CAQuB;AAPrB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,kHAAA,mBAAmB,OAAA;AACnB,wHAAA,yBAAyB,OAAA;AAM3B,oCAAoC;AACpC,0CAA+C;AAAtC,sGAAA,YAAY,OAAA;AACrB,sCAGuB;AAFrB,0GAAA,kBAAkB,OAAA;AAClB,wGAAA,gBAAgB,OAAA;AAElB,uCAAqE;AAA5D,uGAAA,WAAW,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,wGAAA,YAAY,OAAA;AAShD,uCAaoB;AAZlB,iHAAA,qBAAqB,OAAA;AACrB,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,+GAAA,mBAAmB,OAAA;AACnB,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,wHAAA,4BAA4B,OAAA;AAC5B,8GAAA,kBAAkB,OAAA;AAClB,+GAAA,mBAAmB,OAAA;AACnB,6GAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,8BAA8B;AAC9B,uCAAgE;AAAvD,yGAAA,aAAa,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAK3C,gEAAgE;AAChE,mDAK0B;AAJxB,mHAAA,iBAAiB,OAAA;AACjB,4HAAA,0BAA0B,OAAA;AAK5B,oEAAoE;AACpE,oEAAoE;AACpE,8BAA8B;AAC9B,6CAQuB;AAPrB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,kHAAA,mBAAmB,OAAA;AACnB,wHAAA,yBAAyB,OAAA;AAM3B,oCAAoC;AACpC,0CAA+C;AAAtC,sGAAA,YAAY,OAAA;AACrB,sCAGuB;AAFrB,0GAAA,kBAAkB,OAAA;AAClB,wGAAA,gBAAgB,OAAA;AAElB,uCAAqE;AAA5D,uGAAA,WAAW,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,wGAAA,YAAY,OAAA;AAShD,uCAWoB;AAVlB,iHAAA,qBAAqB,OAAA;AACrB,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,iHAAA,qBAAqB,OAAA;AACrB,wHAAA,4BAA4B,OAAA;AAC5B,8GAAA,kBAAkB,OAAA;AAClB,+GAAA,mBAAmB,OAAA;AACnB,6GAAA,iBAAiB,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;A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c,EACpB,MAAM,kBAAkB,CAAC;AAiB1B,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;GAQG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAiB;IACxC,wFAAwF;IACxF,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyB;IAE1D;;;;;OAKG;gBACS,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,cAAc;IAUtE;;;;;;OAMG;IACH,uBAAuB,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAI3D,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE;IA2CnD;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;CAkDvB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,CAAC,EAAE,cAAc,GACrB,cAAc,CAEhB"}
@@ -32,8 +32,7 @@ const room_1 = require("./handlers/room");
32
32
  const revealed_1 = require("./handlers/revealed");
33
33
  const generic_1 = require("./handlers/generic");
34
34
  const game_1 = require("./handlers/game");
35
- const help_1 = require("./handlers/help");
36
- const about_1 = require("./handlers/about");
35
+ const platform_1 = require("./handlers/platform");
37
36
  const audibility_1 = require("./handlers/audibility");
38
37
  const domain_message_1 = require("./handlers/domain-message");
39
38
  const implicit_take_1 = require("./handlers/implicit-take");
@@ -131,10 +130,11 @@ class ProsePipeline {
131
130
  return (0, generic_1.handleGameMessage)(event, context);
132
131
  case 'if.event.revealed':
133
132
  return (0, revealed_1.handleRevealed)(event, context);
134
- case 'if.event.help_displayed':
135
- return (0, help_1.handleHelpDisplayed)(event, context);
136
- case 'if.event.about_displayed':
137
- return (0, about_1.handleAboutDisplayed)(event, context);
133
+ // if.event.help_displayed / if.event.about_displayed carry messageIds
134
+ // with lang-en-us templates (if.action.help.*, if.action.about.success)
135
+ // and render via tryProcessDomainEventMessage above; their dedicated
136
+ // handlers (help.text/about.text blocks MAIN_KEYS never routed) were
137
+ // removed 2026-07-02 (dungeo regression findings P3).
138
138
  case 'sound.audibility.heard':
139
139
  return (0, audibility_1.handleAudibilityHeard)(event, context);
140
140
  case 'if.event.implicit_take':
@@ -144,6 +144,11 @@ class ProsePipeline {
144
144
  case 'client.query':
145
145
  return (0, client_query_1.handleClientQuery)(event, context);
146
146
  default:
147
+ // Platform lifecycle events carry `payload` (not `data`) and render
148
+ // via the message registered under the event type itself.
149
+ if (event.type.startsWith('platform.')) {
150
+ return (0, platform_1.handlePlatformEvent)(event, context);
151
+ }
147
152
  return (0, generic_1.handleGenericEvent)(event, context);
148
153
  }
149
154
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/pipeline.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAmLH,kDAKC;AAlLD,4CAA+C;AAC/C,wCAAmD;AACnD,qDAK0B;AAG1B,0CAAwD;AACxD,kDAAqD;AACrD,gDAG4B;AAC5B,0CAAoD;AACpD,0CAAsD;AACtD,4CAAwD;AACxD,sDAA8D;AAC9D,8DAAyE;AACzE,4DAA8D;AAC9D,8DAAgE;AAChE,0DAA4D;AAI5D;;;;;;;;GAQG;AACH,MAAa,aAAa;IACP,gBAAgB,CAAmB;IACnC,KAAK,CAAkB;IACxC,wFAAwF;IACvE,gBAAgB,GAAsB,EAAE,CAAC;IAE1D;;;;;OAKG;IACH,YAAY,gBAAkC,EAAE,KAAsB;QACpE,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAA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C;YAE7C,KAAK,cAAc;gBACjB,OAAO,IAAA,gCAAiB,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAE3C;gBACE,OAAO,IAAA,4BAAkB,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AAhID,sCAgIC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CACjC,gBAAkC,EAClC,KAAsB;IAEtB,OAAO,IAAI,aAAa,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC"}
1
+ {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/pipeline.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAuLH,kDAKC;AAtLD,4CAA+C;AAC/C,wCAAmD;AACnD,qDAK0B;AAG1B,0CAAwD;AACxD,kDAAqD;AACrD,gDAG4B;AAC5B,0CAAoD;AACpD,kDAA0D;AAC1D,sDAA8D;AAC9D,8DAAyE;AACzE,4DAA8D;AAC9D,8DAAgE;AAChE,0DAA4D;AAI5D;;;;;;;;GAQG;AACH,MAAa,aAAa;IACP,gBAAgB,CAAmB;IACnC,KAAK,CAAkB;IACxC,wFAAwF;IACvE,gBAAgB,GAAsB,EAAE,CAAC;IAE1D;;;;;OAKG;IACH,YAAY,gBAAkC,EAAE,KAAsB;QACpE,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;;;;;OAMG;IACH,uBAAuB,CAAC,WAA4B;QAClD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED,WAAW,CAAC,MAAwB;QAClC,MAAM,Q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BAAkB,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AArID,sCAqIC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CACjC,gBAAkC,EAClC,KAAsB;IAEtB,OAAO,IAAI,aAAa,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Event filtering stage — drops events that should not produce
3
- * text output (system.* and platform.*).
3
+ * text output (system.* and platform request-phase events).
4
4
  *
5
5
  * Public interface: `filterEvents`. Used internally by the prose
6
6
  * pipeline as the first per-turn stage.
@@ -17,7 +17,14 @@ import type { ISemanticEvent } from '@sharpee/core';
17
17
  *
18
18
  * Drops:
19
19
  * - `system.*` — internal turn-cycle bookkeeping the player never sees.
20
- * - `platform.*`save/restore/quit/restart requests and completions.
20
+ * - `platform.*_requested`request-phase platform events are control
21
+ * flow, never narration.
22
+ *
23
+ * Platform OUTCOME events (`platform.save_completed`,
24
+ * `platform.undo_failed`, ...) pass through to the handlers stage, where
25
+ * `handlePlatformEvent` renders the lang message registered under the
26
+ * event type (silent when none is registered — quit/restart outcomes stay
27
+ * quiet by default).
21
28
  *
22
29
  * Pass-through for everything else (domain events, action results,
23
30
  * lifecycle events, sound, etc.) — they reach the handlers stage.
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/stages/filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAUvE"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/stages/filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAUvE"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Event filtering stage — drops events that should not produce
4
- * text output (system.* and platform.*).
4
+ * text output (system.* and platform request-phase events).
5
5
  *
6
6
  * Public interface: `filterEvents`. Used internally by the prose
7
7
  * pipeline as the first per-turn stage.
@@ -19,7 +19,14 @@ exports.filterEvents = filterEvents;
19
19
  *
20
20
  * Drops:
21
21
  * - `system.*` — internal turn-cycle bookkeeping the player never sees.
22
- * - `platform.*`save/restore/quit/restart requests and completions.
22
+ * - `platform.*_requested`request-phase platform events are control
23
+ * flow, never narration.
24
+ *
25
+ * Platform OUTCOME events (`platform.save_completed`,
26
+ * `platform.undo_failed`, ...) pass through to the handlers stage, where
27
+ * `handlePlatformEvent` renders the lang message registered under the
28
+ * event type (silent when none is registered — quit/restart outcomes stay
29
+ * quiet by default).
23
30
  *
24
31
  * Pass-through for everything else (domain events, action results,
25
32
  * lifecycle events, sound, etc.) — they reach the handlers stage.
@@ -30,7 +37,7 @@ function filterEvents(events) {
30
37
  return false;
31
38
  }
32
39
  if (event.type.startsWith('platform.')) {
33
- return false;
40
+ return !event.type.endsWith('_requested');
34
41
  }
35
42
  return true;
36
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/stages/filter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAcH,oCAUC;AApBD;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAAC,MAAwB;IACnD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAC7B,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/stages/filter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAqBH,oCAUC;AA3BD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,YAAY,CAAC,MAAwB;IACnD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAC7B,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * About event handler — `if.event.about_displayed`.
3
- *
4
- * Produces the same structured banner as `handleGameStarted`, via the
5
- * shared `buildBannerBlocks` helper. The ABOUT action gives us a
6
- * flat `params: Record<string, string>` that mirrors `event.data.story`
7
- * — we project it into the `BannerStoryInfo` shape and reuse the
8
- * builder.
9
- *
10
- * Public interface: `handleAboutDisplayed`. Used by the pipeline's
11
- * event-type dispatch.
12
- *
13
- * Owner context: `@sharpee/engine` — internal prose pipeline.
14
- *
15
- * @see ADR-174 §Engine-internal prose pipeline (port from text-service)
16
- */
17
- import type { ITextBlock } from '@sharpee/text-blocks';
18
- import type { ISemanticEvent } from '@sharpee/core';
19
- import type { HandlerContext } from './types';
20
- /**
21
- * Handle `if.event.about_displayed` by showing the structured banner.
22
- *
23
- * Reads the about action's `params` payload (title, author, version,
24
- * description, engineVersion, buildDate, portedBy). The ABOUT action
25
- * does not currently pass `credits` directly; when present, the
26
- * builder falls back to `By {author}` for a single author-list line.
27
- * Stories that want richer ABOUT credit blocks should propagate
28
- * `credits` through the about action's params.
29
- */
30
- export declare function handleAboutDisplayed(event: ISemanticEvent, context: HandlerContext): ITextBlock[];
31
- //# sourceMappingURL=about.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/about.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,CAoBd"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- /**
3
- * About event handler — `if.event.about_displayed`.
4
- *
5
- * Produces the same structured banner as `handleGameStarted`, via the
6
- * shared `buildBannerBlocks` helper. The ABOUT action gives us a
7
- * flat `params: Record<string, string>` that mirrors `event.data.story`
8
- * — we project it into the `BannerStoryInfo` shape and reuse the
9
- * builder.
10
- *
11
- * Public interface: `handleAboutDisplayed`. Used by the pipeline's
12
- * event-type dispatch.
13
- *
14
- * Owner context: `@sharpee/engine` — internal prose pipeline.
15
- *
16
- * @see ADR-174 §Engine-internal prose pipeline (port from text-service)
17
- */
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.handleAboutDisplayed = handleAboutDisplayed;
20
- const banner_1 = require("./banner");
21
- /**
22
- * Handle `if.event.about_displayed` by showing the structured banner.
23
- *
24
- * Reads the about action's `params` payload (title, author, version,
25
- * description, engineVersion, buildDate, portedBy). The ABOUT action
26
- * does not currently pass `credits` directly; when present, the
27
- * builder falls back to `By {author}` for a single author-list line.
28
- * Stories that want richer ABOUT credit blocks should propagate
29
- * `credits` through the about action's params.
30
- */
31
- function handleAboutDisplayed(event, context) {
32
- const data = event.data;
33
- const params = (data?.params ?? {});
34
- const story = {
35
- title: stringOrUndef(params.title),
36
- version: stringOrUndef(params.version),
37
- buildDate: stringOrUndef(params.buildDate),
38
- description: stringOrUndef(params.description),
39
- author: stringOrUndef(params.author),
40
- credits: Array.isArray(params.credits)
41
- ? params.credits.filter((s) => typeof s === 'string' && s.length > 0)
42
- : undefined,
43
- };
44
- const engineVersion = stringOrUndef(params.engineVersion);
45
- return (0, banner_1.buildBannerBlocks)('about.text', story, engineVersion, context);
46
- }
47
- function stringOrUndef(value) {
48
- return typeof value === 'string' && value.length > 0 ? value : undefined;
49
- }
50
- //# sourceMappingURL=about.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"about.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/about.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAiBH,oDAuBC;AAnCD,qCAAmE;AAEnE;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAClC,KAAqB,EACrB,OAAuB;IAEvB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAwD,CAAC;IAC5E,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAA4B,CAAC;IAE/D,MAAM,KAAK,GAAoB;QAC7B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;QAClC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC;QACtC,SAAS,EAAE,aAAa,CAAC,M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