@sharpee/engine 1.0.0 → 1.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.
- package/README.md +73 -72
- package/action-context-factory.d.ts +3 -3
- package/action-context-factory.d.ts.map +1 -1
- package/action-context-factory.js +3 -3
- package/capability-dispatch-helper.d.ts +3 -3
- package/capability-dispatch-helper.d.ts.map +1 -1
- package/capability-dispatch-helper.js +1 -1
- package/command-executor.d.ts +6 -6
- package/command-executor.d.ts.map +1 -1
- package/command-executor.js +2 -2
- package/events/event-emitter.d.ts +2 -2
- package/events/event-emitter.d.ts.map +1 -1
- package/game-engine.d.ts +7 -7
- package/game-engine.d.ts.map +1 -1
- package/game-engine.js +7 -7
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/language-provider-interface.d.ts +1 -1
- package/language-provider-interface.d.ts.map +1 -1
- package/narrative/index.d.ts.map +1 -1
- package/narrative/narrative-settings.d.ts +1 -1
- package/narrative/narrative-settings.d.ts.map +1 -1
- package/package.json +12 -12
- package/parser-interface.d.ts +2 -2
- package/parser-interface.d.ts.map +1 -1
- package/platform-operations.d.ts +2 -2
- package/platform-operations.d.ts.map +1 -1
- package/platform-operations.js +1 -1
- package/prose-pipeline/assemble.d.ts +1 -1
- package/prose-pipeline/assemble.d.ts.map +1 -1
- package/prose-pipeline/decorations/index.d.ts.map +1 -1
- package/prose-pipeline/decorations/parser.d.ts.map +1 -1
- package/prose-pipeline/decorations/parser.js +26 -8
- package/prose-pipeline/decorations/parser.js.map +1 -1
- package/prose-pipeline/decorations/platform-vocabulary.d.ts +9 -1
- package/prose-pipeline/decorations/platform-vocabulary.d.ts.map +1 -1
- package/prose-pipeline/decorations/platform-vocabulary.js +17 -1
- package/prose-pipeline/decorations/platform-vocabulary.js.map +1 -1
- package/prose-pipeline/decorations/resolver.d.ts.map +1 -1
- package/prose-pipeline/decorations/types.d.ts +1 -1
- package/prose-pipeline/decorations/types.d.ts.map +1 -1
- package/prose-pipeline/handlers/about.d.ts +2 -2
- package/prose-pipeline/handlers/about.d.ts.map +1 -1
- package/prose-pipeline/handlers/audibility.d.ts +2 -2
- package/prose-pipeline/handlers/audibility.d.ts.map +1 -1
- package/prose-pipeline/handlers/audibility.js +1 -1
- package/prose-pipeline/handlers/banner.d.ts +1 -1
- package/prose-pipeline/handlers/banner.d.ts.map +1 -1
- package/prose-pipeline/handlers/client-query.d.ts +2 -2
- package/prose-pipeline/handlers/client-query.d.ts.map +1 -1
- package/prose-pipeline/handlers/client-query.js +1 -1
- package/prose-pipeline/handlers/command-failed.d.ts +2 -2
- package/prose-pipeline/handlers/command-failed.d.ts.map +1 -1
- package/prose-pipeline/handlers/command-failed.js +1 -1
- package/prose-pipeline/handlers/domain-message.d.ts +2 -2
- package/prose-pipeline/handlers/domain-message.d.ts.map +1 -1
- package/prose-pipeline/handlers/domain-message.js +1 -1
- package/prose-pipeline/handlers/game.d.ts +2 -2
- package/prose-pipeline/handlers/game.d.ts.map +1 -1
- package/prose-pipeline/handlers/generic.d.ts +2 -2
- package/prose-pipeline/handlers/generic.d.ts.map +1 -1
- package/prose-pipeline/handlers/generic.js +1 -1
- package/prose-pipeline/handlers/help.d.ts +2 -2
- package/prose-pipeline/handlers/help.d.ts.map +1 -1
- package/prose-pipeline/handlers/implicit-take.d.ts +2 -2
- package/prose-pipeline/handlers/implicit-take.d.ts.map +1 -1
- package/prose-pipeline/handlers/implicit-take.js +1 -1
- package/prose-pipeline/handlers/index.d.ts.map +1 -1
- package/prose-pipeline/handlers/revealed.d.ts +2 -2
- package/prose-pipeline/handlers/revealed.d.ts.map +1 -1
- package/prose-pipeline/handlers/revealed.js +1 -1
- package/prose-pipeline/handlers/room.d.ts +2 -2
- package/prose-pipeline/handlers/room.d.ts.map +1 -1
- package/prose-pipeline/handlers/room.js +1 -1
- package/prose-pipeline/handlers/types.d.ts +3 -3
- package/prose-pipeline/handlers/types.d.ts.map +1 -1
- package/prose-pipeline/index.d.ts.map +1 -1
- package/prose-pipeline/pipeline.d.ts +3 -3
- package/prose-pipeline/pipeline.d.ts.map +1 -1
- package/prose-pipeline/stages/filter.d.ts +1 -1
- package/prose-pipeline/stages/filter.d.ts.map +1 -1
- package/prose-pipeline/stages/index.d.ts.map +1 -1
- package/prose-pipeline/stages/sort.d.ts +1 -1
- package/prose-pipeline/stages/sort.d.ts.map +1 -1
- package/prose-pipeline/types.d.ts +2 -2
- package/prose-pipeline/types.d.ts.map +1 -1
- package/save-restore-service.d.ts +3 -3
- package/save-restore-service.d.ts.map +1 -1
- package/save-restore-service.js +1 -1
- package/scene-evaluation-plugin.d.ts +2 -2
- package/scene-evaluation-plugin.d.ts.map +1 -1
- package/scene-evaluation-plugin.js +1 -1
- package/shared-data-keys.d.ts +3 -3
- package/shared-data-keys.d.ts.map +1 -1
- package/sound/dispatcher.d.ts +3 -3
- package/sound/dispatcher.d.ts.map +1 -1
- package/sound/dispatcher.js +2 -2
- package/sound/index.d.ts.map +1 -1
- package/sound/propagation.d.ts +3 -3
- package/sound/propagation.d.ts.map +1 -1
- package/sound/propagation.js +2 -2
- package/story.d.ts +4 -4
- package/story.d.ts.map +1 -1
- package/test-helpers/mock-prose-pipeline.d.ts +2 -2
- package/test-helpers/mock-prose-pipeline.d.ts.map +1 -1
- package/turn-event-processor.d.ts +3 -3
- package/turn-event-processor.d.ts.map +1 -1
- package/turn-event-processor.js +1 -1
- package/types.d.ts +4 -4
- package/types.d.ts.map +1 -1
- package/vocabulary-manager.d.ts +1 -1
- package/vocabulary-manager.d.ts.map +1 -1
- package/vocabulary-manager.js +1 -1
- package/event-adapter.d.ts +0 -44
- package/event-adapter.d.ts.map +0 -1
- package/event-adapter.js +0 -127
- package/event-adapter.js.map +0 -1
- package/event-sequencer.d.ts +0 -73
- package/event-sequencer.d.ts.map +0 -1
- package/event-sequencer.js +0 -134
- package/event-sequencer.js.map +0 -1
- package/test-helpers/mock-text-service.d.ts +0 -11
- package/test-helpers/mock-text-service.d.ts.map +0 -1
- package/test-helpers/mock-text-service.js +0 -47
- package/test-helpers/mock-text-service.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/engine/src/prose-pipeline/stages/sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;GAEG;AACH,UAAU,aAAa;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAUD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAgD7E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,CAQrE"}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @see ADR-174 §Internal interfaces
|
|
20
20
|
*/
|
|
21
|
-
import type { ISemanticEvent } from
|
|
22
|
-
import type { ITextBlock } from
|
|
21
|
+
import type { ISemanticEvent } from '@sharpee/core';
|
|
22
|
+
import type { ITextBlock } from '@sharpee/text-blocks';
|
|
23
23
|
/**
|
|
24
24
|
* Per-turn prose translator.
|
|
25
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/engine/src/prose-pipeline/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;OASG;IACH,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;CACrD"}
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* the ScoreLedger, capabilities, world state values, relationships,
|
|
19
19
|
* ID counters, and sub-container containment.
|
|
20
20
|
*/
|
|
21
|
-
import { WorldModel } from
|
|
22
|
-
import { ISaveData, ISerializedTurn, ISemanticEventSource } from
|
|
23
|
-
import { PluginRegistry } from
|
|
21
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
22
|
+
import { ISaveData, ISerializedTurn, ISemanticEventSource } from '@sharpee/core';
|
|
23
|
+
import { PluginRegistry } from '@sharpee/plugins';
|
|
24
24
|
import { TurnResult, GameContext } from './types';
|
|
25
25
|
import { Story } from './story';
|
|
26
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-restore-service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"save-restore-service.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/save-restore-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,SAAS,EAIT,eAAe,EAEf,oBAAoB,EAErB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA0DhC;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,IAAI,UAAU,CAAC;IACvB,UAAU,IAAI,WAAW,CAAC;IA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;IACH,OAAO,CAAC,oBAAoB;CAU7B;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,kBAAkB,CAEhF"}
|
package/save-restore-service.js
CHANGED
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.SaveRestoreService = void 0;
|
|
24
24
|
exports.createSaveRestoreService = createSaveRestoreService;
|
|
25
25
|
const fflate_1 = require("fflate");
|
|
26
|
-
const core_1 = require("
|
|
26
|
+
const core_1 = require("@sharpee/core");
|
|
27
27
|
/**
|
|
28
28
|
* Save format version. Bumped from `1.0.0` → `2.0.0` when the partial
|
|
29
29
|
* `spatialIndex` serializer was replaced with the full `worldSnapshot`
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* Public interface: SceneEvaluationPlugin (TurnPlugin implementation).
|
|
13
13
|
* Owner context: @sharpee/engine — turn cycle
|
|
14
14
|
*/
|
|
15
|
-
import { ISemanticEvent } from
|
|
16
|
-
import type { TurnPlugin, TurnPluginContext } from
|
|
15
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
16
|
+
import type { TurnPlugin, TurnPluginContext } from '@sharpee/plugins';
|
|
17
17
|
export declare class SceneEvaluationPlugin implements TurnPlugin {
|
|
18
18
|
id: string;
|
|
19
19
|
priority: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-evaluation-plugin.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"scene-evaluation-plugin.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/scene-evaluation-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAiBtE,qBAAa,qBAAsB,YAAW,UAAU;IACtD,EAAE,SAA8B;IAChC,QAAQ,SAAM;IAEd;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,cAAc,EAAE;CAmE5D"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SceneEvaluationPlugin = void 0;
|
|
18
|
-
const world_model_1 = require("
|
|
18
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
19
19
|
let eventCounter = 0;
|
|
20
20
|
/**
|
|
21
21
|
* Creates a minimal ISemanticEvent with the given type and data.
|
package/shared-data-keys.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* This file defines only engine-level keys. Actions define their own
|
|
8
8
|
* action-specific keys as needed.
|
|
9
9
|
*/
|
|
10
|
-
import type { ISemanticEvent } from
|
|
11
|
-
import type { IFEntity } from
|
|
12
|
-
import type { ValidationResult } from
|
|
10
|
+
import type { ISemanticEvent } from '@sharpee/core';
|
|
11
|
+
import type { IFEntity } from '@sharpee/world-model';
|
|
12
|
+
import type { ValidationResult } from '@sharpee/stdlib';
|
|
13
13
|
/**
|
|
14
14
|
* Constants for engine-level sharedData keys.
|
|
15
15
|
* Using constants prevents typos and enables IDE autocomplete.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-data-keys.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"shared-data-keys.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/shared-data-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB,wDAAwD;;IAGxD,kDAAkD;;IAGlD,iDAAiD;;IAGjD,kDAAkD;;IAGlD,gDAAgD;;CAExC,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC;IAE/C,kDAAkD;IAClD,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,EAAE,QAAQ,CAAC;IAE5C,iDAAiD;IACjD,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,EAAE,QAAQ,CAAC;IAE5C,wCAAwC;IACxC,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC;IAEzD,gDAAgD;IAChD,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAEtD,4CAA4C;IAC5C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
package/sound/dispatcher.d.ts
CHANGED
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* @see ADR-172 — Spatial Sound Propagation
|
|
23
23
|
* @see ADR-163 — Channel-Service Platform (audibility channel)
|
|
24
24
|
*/
|
|
25
|
-
import { type ISemanticEvent } from
|
|
26
|
-
import type { IAudibilityEvent, ISound } from
|
|
27
|
-
import { type WorldModel } from
|
|
25
|
+
import { type ISemanticEvent } from '@sharpee/core';
|
|
26
|
+
import type { IAudibilityEvent, ISound } from '@sharpee/if-domain';
|
|
27
|
+
import { type WorldModel } from '@sharpee/world-model';
|
|
28
28
|
/**
|
|
29
29
|
* Semantic-event type fired by the dispatcher when a listener perceives
|
|
30
30
|
* a propagated sound. Mirrors `SOUND_EVENT_TYPES.AUDIBILITY_HEARD` in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/engine/src/sound/dispatcher.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGjF;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAEpE;;;;;;;;GAQG;AACH,qBAAa,eAAe;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAKG;gBAG3B,WAAW,GAAE,CACX,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,KACd,gBAAgB,GAAG,IAAuB;IAKjD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,GAChB,cAAc,EAAE;CAsBpB"}
|
package/sound/dispatcher.js
CHANGED
|
@@ -26,8 +26,8 @@ exports.SoundDispatcher = exports.AUDIBILITY_HEARD_EVENT_TYPE = void 0;
|
|
|
26
26
|
* @see ADR-172 — Spatial Sound Propagation
|
|
27
27
|
* @see ADR-163 — Channel-Service Platform (audibility channel)
|
|
28
28
|
*/
|
|
29
|
-
const core_1 = require("
|
|
30
|
-
const world_model_1 = require("
|
|
29
|
+
const core_1 = require("@sharpee/core");
|
|
30
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
31
31
|
const propagation_1 = require("./propagation");
|
|
32
32
|
/**
|
|
33
33
|
* Semantic-event type fired by the dispatcher when a listener perceives
|
package/sound/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/engine/src/sound/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
|
package/sound/propagation.d.ts
CHANGED
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
* @see ADR-172 — Spatial Sound Propagation
|
|
33
33
|
* @see ADR-173 — Wall Adjacency Primitive (substrate)
|
|
34
34
|
*/
|
|
35
|
-
import type { EntityId } from
|
|
36
|
-
import { type AudibilityTier, type IAudibilityEvent, type ISound } from
|
|
37
|
-
import { WorldModel } from
|
|
35
|
+
import type { EntityId } from '@sharpee/core';
|
|
36
|
+
import { type AudibilityTier, type IAudibilityEvent, type ISound } from '@sharpee/if-domain';
|
|
37
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
38
38
|
/**
|
|
39
39
|
* Propagate a sound emission to a single listener.
|
|
40
40
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propagation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"propagation.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/engine/src/sound/propagation.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAUL,UAAU,EACX,MAAM,sBAAsB,CAAC;AAM9B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,QAAQ,EACpB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,GAChB,gBAAgB,GAAG,IAAI,CAuBzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAM7D"}
|
package/sound/propagation.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.propagate = propagate;
|
|
5
5
|
exports.clarityToTier = clarityToTier;
|
|
6
|
-
const if_domain_1 = require("
|
|
7
|
-
const world_model_1 = require("
|
|
6
|
+
const if_domain_1 = require("@sharpee/if-domain");
|
|
7
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
8
8
|
// =============================================================================
|
|
9
9
|
// Public API
|
|
10
10
|
// =============================================================================
|
package/story.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Story configuration and interfaces
|
|
3
3
|
*/
|
|
4
|
-
import { WorldModel, IFEntity, IGameEvent, SimpleEventHandler } from
|
|
5
|
-
import { LanguageProvider, IChannelRegistry } from
|
|
6
|
-
import { Parser } from
|
|
7
|
-
import { ISemanticEvent } from
|
|
4
|
+
import { WorldModel, IFEntity, IGameEvent, SimpleEventHandler } from '@sharpee/world-model';
|
|
5
|
+
import { LanguageProvider, IChannelRegistry } from '@sharpee/if-domain';
|
|
6
|
+
import { Parser } from '@sharpee/stdlib';
|
|
7
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
8
8
|
import type { GameEngine } from './game-engine';
|
|
9
9
|
import { NarrativeConfig } from './narrative';
|
|
10
10
|
/**
|
package/story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"story.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"story.d.ts","sourceRoot":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,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,cAAc,CAAC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAElD;;;;;OAKG;IACH,aAAa,CAAC,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEzC;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,KAAK;IAC3C,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,WAAW;IAK/B;;OAEG;IACH,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAIxD;;OAEG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAIzD;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,EAAE;IAKzC,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAIxC,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ;CAG1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAU7D"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* @see ADR-174 §Internal interfaces
|
|
14
14
|
*/
|
|
15
15
|
import type { ITextService } from '../prose-pipeline/types';
|
|
16
|
-
import type { ITextBlock } from
|
|
17
|
-
import type { ISemanticEvent } from
|
|
16
|
+
import type { ITextBlock } from '@sharpee/text-blocks';
|
|
17
|
+
import type { ISemanticEvent } from '@sharpee/core';
|
|
18
18
|
export declare class MockProsePipeline implements ITextService {
|
|
19
19
|
processTurn(events: ISemanticEvent[]): ITextBlock[];
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-prose-pipeline.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"mock-prose-pipeline.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/engine/src/test-helpers/mock-prose-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,qBAAa,iBAAkB,YAAW,YAAY;IACpD,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE;CAgCpD;AAED,wBAAgB,uBAAuB,IAAI,YAAY,CAEtD"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Extracted from GameEngine as part of Phase 4 remediation.
|
|
5
5
|
* Handles event enrichment, perception filtering, and event emission.
|
|
6
6
|
*/
|
|
7
|
-
import { ISemanticEvent, ISemanticEventSource, IPlatformEvent } from
|
|
8
|
-
import { WorldModel, IFEntity } from
|
|
9
|
-
import { IPerceptionService } from
|
|
7
|
+
import { ISemanticEvent, ISemanticEventSource, IPlatformEvent } from '@sharpee/core';
|
|
8
|
+
import { WorldModel, IFEntity } from '@sharpee/world-model';
|
|
9
|
+
import { IPerceptionService } from '@sharpee/stdlib';
|
|
10
10
|
import { EngineConfig } from './types';
|
|
11
11
|
/**
|
|
12
12
|
* Context for event processing pipeline
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-event-processor.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"turn-event-processor.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/turn-event-processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,oBAAoB,EAEpB,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OA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AiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,UAAU,GAChB,qBAAqB;IA8BxB;;;;;;;;;;OAUG;IACH,UAAU,CACR,cAAc,EAAE,cAAc,EAAE,EAChC,WAAW,EAAE,oBAAoB,EACjC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EACzC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,iBAAiB,EAC/B,gBAAgB,CAAC,EAAE,uBAAuB,GACzC,IAAI;IA4BP;;;;;OAKG;IACH,eAAe,CACb,MAAM,EAAE,cAAc,EAAE,GACvB;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CAY5C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,CAAC,EAAE,kBAAkB,GACrC,kBAAkB,CAEpB"}
|
package/turn-event-processor.js
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.TurnEventProcessor = void 0;
|
|
10
10
|
exports.processEvent = processEvent;
|
|
11
11
|
exports.createTurnEventProcessor = createTurnEventProcessor;
|
|
12
|
-
const core_1 = require("
|
|
12
|
+
const core_1 = require("@sharpee/core");
|
|
13
13
|
/**
|
|
14
14
|
* Generate a unique event ID
|
|
15
15
|
*/
|
package/types.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The engine manages game state, turn execution, and event sequencing
|
|
5
5
|
*/
|
|
6
|
-
import { ISemanticEvent } from
|
|
7
|
-
import { IParsedCommand, IValidatedCommand, IFEntity, WorldModel } from
|
|
8
|
-
import { ITextBlock } from
|
|
9
|
-
export { IPerceptionService, Sense } from
|
|
6
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
7
|
+
import { IParsedCommand, IValidatedCommand, IFEntity, WorldModel } from '@sharpee/world-model';
|
|
8
|
+
import { ITextBlock } from '@sharpee/text-blocks';
|
|
9
|
+
export { IPerceptionService, Sense } from '@sharpee/stdlib';
|
|
10
10
|
/**
|
|
11
11
|
* Timing data for performance tracking
|
|
12
12
|
*/
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG5D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,MAAM,EAAE,cAAc,EAAE,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OA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AC3B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,mDAAmD;IACnD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,gFAAgF;IAChF,IAAI,EAAE,YAAY,GAAG,aAAa,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,6DAA6D;IAC7D,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,wDAAwD;IACxD,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,sEAAsE;IACtE,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B"}
|
package/vocabulary-manager.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Handles registering entity nouns/adjectives with the vocabulary registry
|
|
6
6
|
* to enable parser noun resolution within the current scope.
|
|
7
7
|
*/
|
|
8
|
-
import { IFEntity, WorldModel } from
|
|
8
|
+
import { IFEntity, WorldModel } from '@sharpee/world-model';
|
|
9
9
|
/**
|
|
10
10
|
* Manages vocabulary registration for entities in scope
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary-manager.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"vocabulary-manager.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/vocabulary-manager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;GAEG;AACH,qBAAa,iBAAiB;IAC5B;;;;;OAKG;IACH,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IA2BhE;;;;;;;;OAQG;IACH,qBAAqB,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAgBjE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,CAE3D"}
|
package/vocabulary-manager.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.VocabularyManager = void 0;
|
|
11
11
|
exports.createVocabularyManager = createVocabularyManager;
|
|
12
|
-
const stdlib_1 = require("
|
|
12
|
+
const stdlib_1 = require("@sharpee/stdlib");
|
|
13
13
|
/**
|
|
14
14
|
* Manages vocabulary registration for entities in scope
|
|
15
15
|
*/
|
package/event-adapter.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Adapter - Converts between SemanticEvent and SequencedEvent
|
|
3
|
-
*
|
|
4
|
-
* This adapter handles:
|
|
5
|
-
* - Event normalization for consistent structure
|
|
6
|
-
* - Event enrichment pipeline for adding metadata
|
|
7
|
-
*/
|
|
8
|
-
import { ISemanticEvent } from "../core/index";
|
|
9
|
-
import { SequencedEvent } from './types';
|
|
10
|
-
/**
|
|
11
|
-
* Event normalization - ensures consistent event structure
|
|
12
|
-
* Preserves all original properties (including requiresClientAction for platform events)
|
|
13
|
-
*/
|
|
14
|
-
export declare function normalizeEvent(event: ISemanticEvent): ISemanticEvent;
|
|
15
|
-
/**
|
|
16
|
-
* Event enrichment pipeline - adds additional metadata
|
|
17
|
-
*/
|
|
18
|
-
export declare function enrichEvent(event: ISemanticEvent, context?: EventProcessingContext): ISemanticEvent;
|
|
19
|
-
/**
|
|
20
|
-
* Event processing context for enrichment
|
|
21
|
-
*/
|
|
22
|
-
export interface EventProcessingContext {
|
|
23
|
-
turn?: number;
|
|
24
|
-
playerId?: string;
|
|
25
|
-
locationId?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Process an event through the pipeline.
|
|
29
|
-
*
|
|
30
|
-
* Pipeline stages:
|
|
31
|
-
* 1. Normalization (ensure required fields, lowercase type)
|
|
32
|
-
* 2. Enrichment (add turn info, default entities)
|
|
33
|
-
*/
|
|
34
|
-
export declare function processEvent(event: ISemanticEvent, context?: EventProcessingContext): ISemanticEvent;
|
|
35
|
-
/**
|
|
36
|
-
* Convert a SemanticEvent to a SequencedEvent
|
|
37
|
-
*/
|
|
38
|
-
export declare function toSequencedEvent(event: ISemanticEvent, turn: number, sequence: number): SequencedEvent;
|
|
39
|
-
/**
|
|
40
|
-
* Convert a SequencedEvent back to a SemanticEvent
|
|
41
|
-
* Preserves all original properties (including requiresClientAction for platform events)
|
|
42
|
-
*/
|
|
43
|
-
export declare function toSemanticEvent(event: SequencedEvent): ISemanticEvent;
|
|
44
|
-
//# sourceMappingURL=event-adapter.d.ts.map
|
package/event-adapter.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-adapter.d.ts","sourceRoot":"","sources":["../../../../../repos/sharpee/packages/engine/src/event-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAcpE;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,cAAc,EACrB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,cAAc,CAmChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,EACrB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,cAAc,CAIhB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,cAAc,CAYhB;AAsBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CASrE"}
|
package/event-adapter.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event Adapter - Converts between SemanticEvent and SequencedEvent
|
|
4
|
-
*
|
|
5
|
-
* This adapter handles:
|
|
6
|
-
* - Event normalization for consistent structure
|
|
7
|
-
* - Event enrichment pipeline for adding metadata
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.normalizeEvent = normalizeEvent;
|
|
11
|
-
exports.enrichEvent = enrichEvent;
|
|
12
|
-
exports.processEvent = processEvent;
|
|
13
|
-
exports.toSequencedEvent = toSequencedEvent;
|
|
14
|
-
exports.toSemanticEvent = toSemanticEvent;
|
|
15
|
-
/**
|
|
16
|
-
* Event normalization - ensures consistent event structure
|
|
17
|
-
* Preserves all original properties (including requiresClientAction for platform events)
|
|
18
|
-
*/
|
|
19
|
-
function normalizeEvent(event) {
|
|
20
|
-
const normalized = {
|
|
21
|
-
...event, // Preserve all original properties (e.g., requiresClientAction)
|
|
22
|
-
id: event.id || generateEventId(),
|
|
23
|
-
type: event.type.toLowerCase(),
|
|
24
|
-
timestamp: event.timestamp || Date.now(),
|
|
25
|
-
entities: event.entities || {},
|
|
26
|
-
data: event.data,
|
|
27
|
-
tags: event.tags,
|
|
28
|
-
priority: event.priority,
|
|
29
|
-
narrate: event.narrate
|
|
30
|
-
};
|
|
31
|
-
return normalized;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Event enrichment pipeline - adds additional metadata
|
|
35
|
-
*/
|
|
36
|
-
function enrichEvent(event, context) {
|
|
37
|
-
const enriched = { ...event };
|
|
38
|
-
if (context) {
|
|
39
|
-
// Add turn information to data
|
|
40
|
-
if (context.turn !== undefined && enriched.data && typeof enriched.data === 'object') {
|
|
41
|
-
enriched.data = { ...enriched.data, turn: context.turn };
|
|
42
|
-
}
|
|
43
|
-
// Add player as actor if not specified
|
|
44
|
-
if (context.playerId && !enriched.entities.actor) {
|
|
45
|
-
enriched.entities = { ...enriched.entities, actor: context.playerId };
|
|
46
|
-
}
|
|
47
|
-
// Add location if not specified
|
|
48
|
-
if (context.locationId && !enriched.entities.location) {
|
|
49
|
-
enriched.entities = { ...enriched.entities, location: context.locationId };
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
// Add default tags based on event type
|
|
53
|
-
if (!enriched.tags) {
|
|
54
|
-
enriched.tags = [];
|
|
55
|
-
}
|
|
56
|
-
// Add category tags
|
|
57
|
-
if (enriched.type.startsWith('action.') && !enriched.tags.includes('action')) {
|
|
58
|
-
enriched.tags = [...enriched.tags, 'action'];
|
|
59
|
-
}
|
|
60
|
-
else if (enriched.type.startsWith('system.') && !enriched.tags.includes('system')) {
|
|
61
|
-
enriched.tags = [...enriched.tags, 'system'];
|
|
62
|
-
}
|
|
63
|
-
else if (enriched.type.startsWith('game.') && !enriched.tags.includes('game')) {
|
|
64
|
-
enriched.tags = [...enriched.tags, 'game'];
|
|
65
|
-
}
|
|
66
|
-
return enriched;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Process an event through the pipeline.
|
|
70
|
-
*
|
|
71
|
-
* Pipeline stages:
|
|
72
|
-
* 1. Normalization (ensure required fields, lowercase type)
|
|
73
|
-
* 2. Enrichment (add turn info, default entities)
|
|
74
|
-
*/
|
|
75
|
-
function processEvent(event, context) {
|
|
76
|
-
const normalized = normalizeEvent(event);
|
|
77
|
-
const enriched = enrichEvent(normalized, context);
|
|
78
|
-
return enriched;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Convert a SemanticEvent to a SequencedEvent
|
|
82
|
-
*/
|
|
83
|
-
function toSequencedEvent(event, turn, sequence) {
|
|
84
|
-
const processed = processEvent(event, { turn });
|
|
85
|
-
return {
|
|
86
|
-
type: processed.type,
|
|
87
|
-
data: processed.data,
|
|
88
|
-
sequence,
|
|
89
|
-
timestamp: new Date(processed.timestamp),
|
|
90
|
-
turn,
|
|
91
|
-
scope: determineScope(processed),
|
|
92
|
-
source: processed.id
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Generate a unique event ID
|
|
97
|
-
*/
|
|
98
|
-
function generateEventId() {
|
|
99
|
-
return `event-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Determine the scope of an event
|
|
103
|
-
*/
|
|
104
|
-
function determineScope(event) {
|
|
105
|
-
if (event.type.startsWith('platform.')) {
|
|
106
|
-
return 'system';
|
|
107
|
-
}
|
|
108
|
-
if (event.type === 'action.error') {
|
|
109
|
-
return 'turn';
|
|
110
|
-
}
|
|
111
|
-
return 'turn';
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Convert a SequencedEvent back to a SemanticEvent
|
|
115
|
-
* Preserves all original properties (including requiresClientAction for platform events)
|
|
116
|
-
*/
|
|
117
|
-
function toSemanticEvent(event) {
|
|
118
|
-
return {
|
|
119
|
-
...event, // Preserve all original properties (e.g., requiresClientAction, payload)
|
|
120
|
-
id: event.source || `${event.turn}-${event.sequence}`,
|
|
121
|
-
type: event.type,
|
|
122
|
-
timestamp: event.timestamp.getTime(),
|
|
123
|
-
data: event.data,
|
|
124
|
-
entities: event.entities || {}
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=event-adapter.js.map
|
package/event-adapter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-adapter.js","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/engine/src/event-adapter.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AASH,wCAcC;AAKD,kCAsCC;AAkBD,oCAOC;AAKD,4CAgBC;AA0BD,0CASC;AA9ID;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAqB;IAClD,MAAM,UAAU,GAAmB;QACjC,GAAI,KAAa,EAAG,gEAAgE;QACpF,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,eAAe,EAAE;QACjC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE;QAC9B,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;QACxC,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE;QAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CACzB,KAAqB,EACrB,OAAgC;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,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,KAAqB;IAC3C,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAgB,eAAe,CAAC,KAAqB;IACnD,OAAO;QACL,GAAI,KAAa,EAAG,yEAAyE;QAC7F,EAAE,EAAE,KAAK,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE;QACrD,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE;QACpC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,QAAQ,EAAG,KAAa,CAAC,QAAQ,IAAI,EAAE;KACxC,CAAC;AACJ,CAAC"}
|
package/event-sequencer.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Sequencer - Manages event ordering within turns
|
|
3
|
-
*
|
|
4
|
-
* Ensures all events have proper sequence numbers for ordering
|
|
5
|
-
* and grouping within a turn.
|
|
6
|
-
*/
|
|
7
|
-
import { GameEvent, SequencedEvent } from './types';
|
|
8
|
-
/**
|
|
9
|
-
* Event sequencer class
|
|
10
|
-
*/
|
|
11
|
-
declare class EventSequencer {
|
|
12
|
-
private counter;
|
|
13
|
-
/**
|
|
14
|
-
* Get next sequence number
|
|
15
|
-
*/
|
|
16
|
-
next(): number;
|
|
17
|
-
/**
|
|
18
|
-
* Reset turn counter (optional, for testing)
|
|
19
|
-
*/
|
|
20
|
-
resetTurn(turn: number): void;
|
|
21
|
-
/**
|
|
22
|
-
* Sequence a single event
|
|
23
|
-
*/
|
|
24
|
-
sequence(event: GameEvent, turn: number): SequencedEvent;
|
|
25
|
-
/**
|
|
26
|
-
* Sequence multiple events
|
|
27
|
-
*/
|
|
28
|
-
sequenceAll(events: GameEvent[], turn: number): SequencedEvent[];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Event sequence utilities
|
|
32
|
-
*/
|
|
33
|
-
export declare class EventSequenceUtils {
|
|
34
|
-
/**
|
|
35
|
-
* Sort events by sequence number
|
|
36
|
-
*/
|
|
37
|
-
static sort(events: SequencedEvent[]): SequencedEvent[];
|
|
38
|
-
/**
|
|
39
|
-
* Filter events by type
|
|
40
|
-
*/
|
|
41
|
-
static filterByType(events: SequencedEvent[], type: string): SequencedEvent[];
|
|
42
|
-
/**
|
|
43
|
-
* Filter events by turn
|
|
44
|
-
*/
|
|
45
|
-
static filterByTurn(events: SequencedEvent[], turn: number): SequencedEvent[];
|
|
46
|
-
/**
|
|
47
|
-
* Filter events by scope
|
|
48
|
-
*/
|
|
49
|
-
static filterByScope(events: SequencedEvent[], scope: SequencedEvent['scope']): SequencedEvent[];
|
|
50
|
-
/**
|
|
51
|
-
* Group events by type
|
|
52
|
-
*/
|
|
53
|
-
static groupByType(events: SequencedEvent[]): Record<string, SequencedEvent[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Group events by turn
|
|
56
|
-
*/
|
|
57
|
-
static groupByTurn(events: SequencedEvent[]): Record<number, SequencedEvent[]>;
|
|
58
|
-
/**
|
|
59
|
-
* Get latest event by type
|
|
60
|
-
*/
|
|
61
|
-
static getLatestByType(events: SequencedEvent[], type: string): SequencedEvent | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Count events by type
|
|
64
|
-
*/
|
|
65
|
-
static countByType(events: SequencedEvent[]): Record<string, number>;
|
|
66
|
-
/**
|
|
67
|
-
* Get events in sequence range
|
|
68
|
-
*/
|
|
69
|
-
static getInRange(events: SequencedEvent[], start: number, end: number, inclusive?: boolean): SequencedEvent[];
|
|
70
|
-
}
|
|
71
|
-
export declare const eventSequencer: EventSequencer;
|
|
72
|
-
export {};
|
|
73
|
-
//# sourceMappingURL=event-sequencer.d.ts.map
|
package/event-sequencer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-sequencer.d.ts","sourceRoot":"","sources":["../../../../../repos/sharpee/packages/engine/src/event-sequencer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,OAAO,CAAsB;IAErC;;OAEG;IACH,IAAI,IAAI,MAAM;IAId;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc;IAUxD;;OAEG;IACH,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE;CAGjE;AAED;;GAEG;AACH,qBAAa,kBAAkB;IAC7B;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;IAIvD;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE;IAI7E;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE;IAI7E;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,cAAc,EAAE;IAIhG;;OAEG;IACH,MAAM,CAAC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