@sharpee/event-processor 1.0.0 → 1.0.8
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/effects/effect-processor.d.ts +2 -2
- package/effects/effect-processor.d.ts.map +1 -1
- package/effects/effect-processor.js +1 -1
- package/effects/index.d.ts.map +1 -1
- package/effects/types.d.ts +1 -1
- package/effects/types.d.ts.map +1 -1
- package/effects/world-query.d.ts +1 -1
- package/effects/world-query.d.ts.map +1 -1
- package/handler-types.d.ts +1 -1
- package/handler-types.d.ts.map +1 -1
- package/handlers/complex-manipulation.d.ts +1 -1
- package/handlers/complex-manipulation.d.ts.map +1 -1
- package/handlers/complex-manipulation.js +2 -2
- package/handlers/device/index.d.ts +1 -1
- package/handlers/device/index.d.ts.map +1 -1
- package/handlers/device/index.js +3 -3
- package/handlers/index.d.ts +1 -1
- package/handlers/index.d.ts.map +1 -1
- package/handlers/meta.d.ts +2 -2
- package/handlers/meta.d.ts.map +1 -1
- package/handlers/movement.d.ts +1 -1
- package/handlers/movement.d.ts.map +1 -1
- package/handlers/movement.js +2 -2
- package/handlers/observation/index.d.ts.map +1 -1
- package/handlers/observation/observation-handlers.d.ts +2 -2
- package/handlers/observation/observation-handlers.d.ts.map +1 -1
- package/handlers/observation/sensory.d.ts +1 -1
- package/handlers/observation/sensory.d.ts.map +1 -1
- package/handlers/observation/sensory.js +3 -3
- package/handlers/state-change.d.ts +1 -1
- package/handlers/state-change.d.ts.map +1 -1
- package/handlers/state-change.js +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/processor.d.ts +3 -3
- package/processor.d.ts.map +1 -1
- package/types.d.ts +2 -2
- package/types.d.ts.map +1 -1
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This is the ONLY place effects become mutations. It validates effects,
|
|
5
5
|
* ensures atomicity (all-or-nothing), and applies them through proper channels.
|
|
6
6
|
*/
|
|
7
|
-
import { ISemanticEvent } from
|
|
8
|
-
import { WorldModel } from
|
|
7
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
8
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
9
9
|
import { Effect, EffectResult } from './types';
|
|
10
10
|
/**
|
|
11
11
|
* Callback to emit events (provided by EventProcessor)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect-processor.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"effect-processor.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/event-processor/src/effects/effect-processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAa,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,MAAM,EAEN,YAAY,EASb,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;AAEnE;;GAEG;AACH,qBAAa,eAAe;IAExB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,UAAU,CAAC;gBADX,KAAK,EAAE,UAAU,EACjB,UAAU,CAAC,EAAE,iBAAiB,YAAA;IAIxC,OAAO,CAAC,oBAAoB,CAAwB;IAEpD;;;;;OAKG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,YAAY;IAwBxC;;OAEG;IACH,OAAO,CAAC,WAAW;IAWnB;;OAEG;IACH,OAAO,CAAC,QAAQ;IA2FhB;;OAEG;IACH,OAAO,CAAC,KAAK;IAgDb,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,sBAAsB;CAsB/B"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.EffectProcessor = void 0;
|
|
10
|
-
const world_model_1 = require("
|
|
10
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
11
11
|
/**
|
|
12
12
|
* EffectProcessor validates and applies effects atomically
|
|
13
13
|
*/
|
package/effects/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/event-processor/src/effects/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/effects/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Effects are intents, not mutations. They describe what should happen, not how.
|
|
5
5
|
* Handlers return effects, which are validated and applied by EffectProcessor.
|
|
6
6
|
*/
|
|
7
|
-
import { ISemanticEvent } from
|
|
7
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
8
8
|
/**
|
|
9
9
|
* Effect for adding/subtracting score
|
|
10
10
|
*/
|
package/effects/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/event-processor/src/effects/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO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M,WAAW,cAAc;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GACd,WAAW,GACX,UAAU,GACV,aAAa,GACb,UAAU,GACV,cAAc,GACd,aAAa,GACb,WAAW,GACX,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,iBAAiB,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gEAAgE;IAChE,aAAa,CAAC,EAAE,cAAc,EAAE,CAAC;CAClC"}
|
package/effects/world-query.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Per ADR-075, handlers receive a read-only query interface instead of
|
|
5
5
|
* full world access. This preserves stdlib as the gatekeeper for mutations.
|
|
6
6
|
*/
|
|
7
|
-
import type { IFEntity, TraitType, ICapabilityData, IWorldModel } from
|
|
7
|
+
import type { IFEntity, TraitType, ICapabilityData, IWorldModel } from '@sharpee/world-model';
|
|
8
8
|
/**
|
|
9
9
|
* Read-only query interface for handlers
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-query.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"world-query.d.ts","sourceRoot":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+4,7 @@
|
|
|
4
4
|
* Entity `on` handler types were removed in ISSUE-068.
|
|
5
5
|
* Only story-level handler types remain.
|
|
6
6
|
*/
|
|
7
|
-
import type { ISemanticEvent } from
|
|
7
|
+
import type { ISemanticEvent } from '@sharpee/core';
|
|
8
8
|
import type { WorldQuery } from './effects/world-query';
|
|
9
9
|
import type { Effect } from './effects/types';
|
|
10
10
|
/**
|
package/handler-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler-types.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"handler-types.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/event-processor/src/handler-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,KAAK,MAAM,EAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These handlers process events for complex object interactions
|
|
5
5
|
* like giving, showing, and throwing.
|
|
6
6
|
*/
|
|
7
|
-
import { WorldModel, EventHandler } from
|
|
7
|
+
import { WorldModel, EventHandler } from '@sharpee/world-model';
|
|
8
8
|
/**
|
|
9
9
|
* Handle GIVEN event - transfer item to recipient or refuse
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complex-manipulation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"complex-manipulation.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/event-processor/src/handlers/complex-manipulation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAa,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAG3E;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAUzB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,YAazB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YAgB1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAQjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAK3E"}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.handleItemDestroyed = exports.handleThrown = exports.handleShown = exports.handleGiven = void 0;
|
|
10
10
|
exports.registerComplexManipulationHandlers = registerComplexManipulationHandlers;
|
|
11
|
-
const core_1 = require("
|
|
12
|
-
const if_domain_1 = require("
|
|
11
|
+
const core_1 = require("@sharpee/core");
|
|
12
|
+
const if_domain_1 = require("@sharpee/if-domain");
|
|
13
13
|
/**
|
|
14
14
|
* Handle GIVEN event - transfer item to recipient or refuse
|
|
15
15
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These handlers process events for device interactions like
|
|
5
5
|
* pushing, pulling, turning, and using objects.
|
|
6
6
|
*/
|
|
7
|
-
import { WorldModel, EventHandler } from
|
|
7
|
+
import { WorldModel, EventHandler } from '@sharpee/world-model';
|
|
8
8
|
/**
|
|
9
9
|
* Handle PUSHED event - process pushing objects/buttons
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/event-processor/src/handlers/device/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAa,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAG3E;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YA0C1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YAmC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YA+B1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAmCxB,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAK9D"}
|
package/handlers/device/index.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.handleUsed = exports.handleTurned = exports.handlePulled = exports.handlePushed = void 0;
|
|
10
10
|
exports.registerDeviceHandlers = registerDeviceHandlers;
|
|
11
|
-
const core_1 = require("
|
|
12
|
-
const world_model_1 = require("
|
|
13
|
-
const if_domain_1 = require("
|
|
11
|
+
const core_1 = require("@sharpee/core");
|
|
12
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
13
|
+
const if_domain_1 = require("@sharpee/if-domain");
|
|
14
14
|
/**
|
|
15
15
|
* Handle PUSHED event - process pushing objects/buttons
|
|
16
16
|
*/
|
package/handlers/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export * from './observation';
|
|
|
9
9
|
export * from './meta';
|
|
10
10
|
export * from './complex-manipulation';
|
|
11
11
|
export * from './device';
|
|
12
|
-
import { WorldModel } from
|
|
12
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
13
13
|
/**
|
|
14
14
|
* Register all standard IF event handlers with the world model
|
|
15
15
|
*/
|
package/handlers/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/event-processor/src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AASlD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAQhE"}
|
package/handlers/meta.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Handles events for meta-game actions like waiting, scoring, help, etc.
|
|
5
5
|
*/
|
|
6
|
-
import { ISemanticEvent } from
|
|
7
|
-
import { WorldModel } from
|
|
6
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
7
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
8
8
|
/**
|
|
9
9
|
* Handle waited event
|
|
10
10
|
*
|
package/handlers/meta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/event-processor/src/handlers/meta.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAiBpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAqB5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAiC3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAuB5E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAK5D"}
|
package/handlers/movement.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* These handlers apply movement-related events to the world model
|
|
5
5
|
*/
|
|
6
|
-
import { WorldModel, EventHandler } from
|
|
6
|
+
import { WorldModel, EventHandler } from '@sharpee/world-model';
|
|
7
7
|
/**
|
|
8
8
|
* Handle TAKEN event - move item to actor
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"movement.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"movement.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/event-processor/src/handlers/movement.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,UAAU,EAAiD,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAG/G;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAkBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAO3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAc3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAiC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAKzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAKzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAK/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAM3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YAO1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAI3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAWhE"}
|
package/handlers/movement.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.handleClimbed = exports.handleExited = exports.handleEntered = exports.handleRemovedFrom = exports.handlePutOn = exports.handlePutIn = exports.handleActorMoved = exports.handleRemoved = exports.handleDropped = exports.handleTaken = void 0;
|
|
9
9
|
exports.registerMovementHandlers = registerMovementHandlers;
|
|
10
|
-
const world_model_1 = require("
|
|
11
|
-
const if_domain_1 = require("
|
|
10
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
11
|
+
const if_domain_1 = require("@sharpee/if-domain");
|
|
12
12
|
/**
|
|
13
13
|
* Handle TAKEN event - move item to actor
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/event-processor/src/handlers/observation/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC"}
|
|
@@ -39,8 +39,8 @@ export declare function handleTextInventoryList(event: ISemanticEvent, world: an
|
|
|
39
39
|
*
|
|
40
40
|
* Handles events related to looking, examining, and other observation actions
|
|
41
41
|
*/
|
|
42
|
-
import { ISemanticEvent } from
|
|
43
|
-
import { WorldModel } from
|
|
42
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
43
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
44
44
|
/**
|
|
45
45
|
* Handle player.looked event
|
|
46
46
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation-handlers.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"observation-handlers.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/event-processor/src/handlers/observation/observation-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAqBpF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAQlF;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAW/E;AAED;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAyB1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAS5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CASjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAS9E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAWnE"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* These handlers process sensory observation events (search, listen, smell, touch)
|
|
5
5
|
*/
|
|
6
|
-
import { WorldModel, EventHandler } from
|
|
6
|
+
import { WorldModel, EventHandler } from '@sharpee/world-model';
|
|
7
7
|
/**
|
|
8
8
|
* Handle SEARCHED event - reveal concealed items
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sensory.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sensory.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/event-processor/src/handlers/observation/sensory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,UAAU,EAAsC,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpG;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,YAgB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAI5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,YAI3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,YAY3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAK/D"}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.handleTouched = exports.handleSmelled = exports.handleListened = exports.handleSearched = void 0;
|
|
9
9
|
exports.registerSensoryHandlers = registerSensoryHandlers;
|
|
10
|
-
const core_1 = require("
|
|
11
|
-
const world_model_1 = require("
|
|
12
|
-
const if_domain_1 = require("
|
|
10
|
+
const core_1 = require("@sharpee/core");
|
|
11
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
12
|
+
const if_domain_1 = require("@sharpee/if-domain");
|
|
13
13
|
/**
|
|
14
14
|
* Handle SEARCHED event - reveal concealed items
|
|
15
15
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* These handlers apply state-changing events to the world model
|
|
5
5
|
*/
|
|
6
|
-
import { WorldModel, EventHandler } from
|
|
6
|
+
import { WorldModel, EventHandler } from '@sharpee/world-model';
|
|
7
7
|
/**
|
|
8
8
|
* Handle OPENED event - set openable trait to open
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-change.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"state-change.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/event-processor/src/handlers/state-change.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,UAAU,EAAkH,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGhL;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YAa1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YAY1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,YAY1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,YAY5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAgB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAgB/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAUxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAKzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAKzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAUnE"}
|
package/handlers/state-change.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.handleDrunk = exports.handleEaten = exports.handleWorn = exports.handleSwitchedOff = exports.handleSwitchedOn = exports.handleUnlocked = exports.handleLocked = exports.handleClosed = exports.handleOpened = void 0;
|
|
9
9
|
exports.registerStateChangeHandlers = registerStateChangeHandlers;
|
|
10
|
-
const world_model_1 = require("
|
|
11
|
-
const if_domain_1 = require("
|
|
10
|
+
const world_model_1 = require("@sharpee/world-model");
|
|
11
|
+
const if_domain_1 = require("@sharpee/if-domain");
|
|
12
12
|
/**
|
|
13
13
|
* Handle OPENED event - set openable trait to open
|
|
14
14
|
*/
|
package/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export * from './processor';
|
|
|
9
9
|
export * from './handlers';
|
|
10
10
|
export * from './effects';
|
|
11
11
|
export * from './handler-types';
|
|
12
|
-
export { ISemanticEvent } from
|
|
13
|
-
export { WorldModel, WorldChange } from
|
|
12
|
+
export { ISemanticEvent } from '@sharpee/core';
|
|
13
|
+
export { WorldModel, WorldChange } from '@sharpee/world-model';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/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/event-processor/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAG3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
package/index.js
CHANGED
|
@@ -27,6 +27,6 @@ __exportStar(require("./handlers"), exports);
|
|
|
27
27
|
// Effects system (ADR-075)
|
|
28
28
|
__exportStar(require("./effects"), exports);
|
|
29
29
|
__exportStar(require("./handler-types"), exports);
|
|
30
|
-
var world_model_1 = require("
|
|
30
|
+
var world_model_1 = require("@sharpee/world-model");
|
|
31
31
|
Object.defineProperty(exports, "WorldModel", { enumerable: true, get: function () { return world_model_1.WorldModel; } });
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharpee/event-processor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Event processor for applying semantic events to the world model",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@sharpee/core": "^1.0.
|
|
9
|
-
"@sharpee/if-domain": "^1.0.
|
|
10
|
-
"@sharpee/world-model": "^1.0.
|
|
8
|
+
"@sharpee/core": "^1.0.8",
|
|
9
|
+
"@sharpee/if-domain": "^1.0.8",
|
|
10
|
+
"@sharpee/world-model": "^1.0.8"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"sharpee",
|
package/processor.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Applies semantic events to the world model through registered handlers.
|
|
5
5
|
* ADR-075: Entity handlers receive WorldQuery and return Effect[].
|
|
6
6
|
*/
|
|
7
|
-
import { ISemanticEvent } from
|
|
8
|
-
import { WorldModel } from
|
|
9
|
-
import { ProcessedEvents, ProcessorOptions } from
|
|
7
|
+
import { ISemanticEvent } from '@sharpee/core';
|
|
8
|
+
import { WorldModel } from '@sharpee/world-model';
|
|
9
|
+
import { ProcessedEvents, ProcessorOptions } from '@sharpee/if-domain';
|
|
10
10
|
import type { StoryEventHandler } from './handler-types';
|
|
11
11
|
export type { StoryEventHandler, IGameEvent } from './handler-types';
|
|
12
12
|
export type { Effect, WorldQuery } from './effects';
|
package/processor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/event-processor/src/processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAe,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQpF,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQpD,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,UAAU,CAAa;IAG/B,OAAO,CAAC,aAAa,CAA+C;gBAExD,KAAK,EAAE,UAAU,EAAE,OAAO,GAAE,gBAAqB;IAmB7D;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAMpE;;OAEG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAatE;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,eAAe;IAsCxD;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA4C1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAgDxB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAuG5B;;OAEG;IACH,QAAQ,IAAI,UAAU;IAItB;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI;CAMrD"}
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Event processor types
|
|
3
3
|
*/
|
|
4
|
-
export { WorldChange, ProcessedEvents, ProcessorOptions } from
|
|
5
|
-
export { EventHandler } from
|
|
4
|
+
export { WorldChange, ProcessedEvents, ProcessorOptions } from '@sharpee/if-domain';
|
|
5
|
+
export { EventHandler } from '@sharpee/world-model';
|
|
6
6
|
//# sourceMappingURL=types.d.ts.map
|
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/event-processor/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGpF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|