@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
@@ -1,21 +0,0 @@
1
- /**
2
- * Help event handler — `if.event.help_displayed`.
3
- *
4
- * Produces the canonical "HOW TO PLAY INTERACTIVE FICTION" block.
5
- * Content based on the PR-IF "How to Play" reference card.
6
- *
7
- * Public interface: `handleHelpDisplayed`. Used by the pipeline's
8
- * event-type dispatch.
9
- *
10
- * Owner context: `@sharpee/engine` — internal prose pipeline.
11
- *
12
- * @see ADR-174 §Engine-internal prose pipeline (port from text-service)
13
- */
14
- import type { ITextBlock } from '@sharpee/text-blocks';
15
- import type { ISemanticEvent } from '@sharpee/core';
16
- import type { HandlerContext } from './types';
17
- /**
18
- * Handle `if.event.help_displayed` to produce the help text block.
19
- */
20
- export declare function handleHelpDisplayed(_event: ISemanticEvent, _context: HandlerContext): ITextBlock[];
21
- //# sourceMappingURL=help.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;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;AAgD9C;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,cAAc,GACvB,UAAU,EAAE,CAEd"}
@@ -1,68 +0,0 @@
1
- "use strict";
2
- /**
3
- * Help event handler — `if.event.help_displayed`.
4
- *
5
- * Produces the canonical "HOW TO PLAY INTERACTIVE FICTION" block.
6
- * Content based on the PR-IF "How to Play" reference card.
7
- *
8
- * Public interface: `handleHelpDisplayed`. Used by the pipeline's
9
- * event-type dispatch.
10
- *
11
- * Owner context: `@sharpee/engine` — internal prose pipeline.
12
- *
13
- * @see ADR-174 §Engine-internal prose pipeline (port from text-service)
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.handleHelpDisplayed = handleHelpDisplayed;
17
- const assemble_1 = require("../assemble");
18
- const HELP_TEXT = `HOW TO PLAY INTERACTIVE FICTION
19
-
20
- Interactive fiction is a conversation between you and the game. You type commands; the game describes what happens.
21
-
22
- MOVING AROUND
23
- Type a direction to move: NORTH (N), SOUTH (S), EAST (E), WEST (W),
24
- NORTHEAST (NE), NORTHWEST (NW), SOUTHEAST (SE), SOUTHWEST (SW),
25
- UP (U), DOWN (D), IN, OUT, ENTER, EXIT.
26
-
27
- LOOKING AND EXAMINING
28
- LOOK (L) - Describe your surroundings.
29
- EXAMINE (X) something - Look closely at an object.
30
-
31
- INTERACTING WITH OBJECTS
32
- TAKE (GET) something - Pick it up.
33
- DROP something - Put it down.
34
- OPEN / CLOSE something - Open or close a door, container, etc.
35
- PUT something IN / ON something - Place an object in a container or on a surface.
36
- LOCK / UNLOCK something WITH something - Lock or unlock with a key.
37
- TURN ON / TURN OFF something - Operate a switch or device.
38
- WEAR / TAKE OFF something - Put on or remove clothing.
39
- EAT / DRINK something - Consume food or drink.
40
- READ something - Read text on an object.
41
- SEARCH something - Search a container or area.
42
- LOOK UNDER / LOOK BEHIND something - Check hidden spots.
43
-
44
- TALKING TO CHARACTERS
45
- TALK TO someone - Start a conversation.
46
- ASK someone ABOUT something - Ask about a topic.
47
- TELL someone ABOUT something - Tell them something.
48
- GIVE something TO someone - Hand over an item.
49
- SHOW something TO someone - Display an item.
50
-
51
- OTHER COMMANDS
52
- INVENTORY (I) - List what you're carrying.
53
- WAIT (Z) - Let time pass.
54
- AGAIN (G) - Repeat your last command.
55
- SCORE - Check your progress.
56
- SAVE / RESTORE - Save or load your game.
57
- UNDO - Take back your last move.
58
- QUIT - End the game.
59
- ABOUT - Information about this game.
60
-
61
- When in doubt, EXAMINE everything.`;
62
- /**
63
- * Handle `if.event.help_displayed` to produce the help text block.
64
- */
65
- function handleHelpDisplayed(_event, _context) {
66
- return (0, assemble_1.createBlocks)('help.text', HELP_TEXT);
67
- }
68
- //# sourceMappingURL=help.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../../../../../../../../repos/sharpee_v2/packages/engine/src/prose-pipeline/handlers/help.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAuDH,kDAKC;AAvDD,0CAA2C;AAE3C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2CiB,CAAC;AAEpC;;GAEG;AACH,SAAgB,mBAAmB,CACjC,MAAsB,EACtB,QAAwB;IAExB,OAAO,IAAA,uBAAY,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAC9C,CAAC"}