@sharpee/if-services 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 CHANGED
@@ -2,16 +2,21 @@
2
2
 
3
3
  Runtime service interfaces for the Sharpee Interactive Fiction Platform.
4
4
 
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @sharpee/if-services
9
+ ```
10
+
5
11
  ## Purpose
6
12
 
7
13
  This package provides runtime service interfaces that need access to the world model. It separates these interfaces from the pure domain package (`@sharpee/if-domain`) to maintain clean architectural boundaries.
8
14
 
15
+ > **Note (ADR-174):** Rendering is no longer a separate text service. The engine's prose pipeline produces `ITextBlock[]`, which are carried to the UI by channels (ADR-163). The former `TextService` interface has been removed from this package.
16
+
9
17
  ## Contents
10
18
 
11
- - **TextService**: Interface for text generation services that process game events and produce formatted output
12
- - (Future) Audio service interfaces
13
- - (Future) Graphics service interfaces
14
- - (Future) Analytics service interfaces
19
+ - **Perception service**: Interface for computing what an actor can perceive of the world (visibility, audibility) — used by rendering and sound propagation.
15
20
 
16
21
  ## Architecture
17
22
 
@@ -25,20 +30,7 @@ This pattern ensures that domain packages remain pure and don't have runtime dep
25
30
  ## Usage
26
31
 
27
32
  ```typescript
28
- import { TextService, TextServiceContext } from '@sharpee/if-services';
29
-
30
- // Implement the TextService interface
31
- class MyTextService implements TextService {
32
- initialize(context: TextServiceContext): void {
33
- // Initialize with game context
34
- }
35
-
36
- processTurn(): TextOutput {
37
- // Generate output for the current turn
38
- }
39
-
40
- // ... other methods
41
- }
33
+ import { IPerceptionService } from '@sharpee/if-services';
42
34
  ```
43
35
 
44
36
  ## Dependencies
@@ -46,3 +38,7 @@ class MyTextService implements TextService {
46
38
  - `@sharpee/core`: Core event system
47
39
  - `@sharpee/if-domain`: Domain types and contracts
48
40
  - `@sharpee/world-model`: World state management
41
+
42
+ ## License
43
+
44
+ MIT
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../repos/sharpee/packages/if-services/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/if-services/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sharpee/if-services",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Runtime service interfaces for Sharpee Interactive Fiction Platform",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "dependencies": {
8
- "@sharpee/core": "^1.0.0",
9
- "@sharpee/if-domain": "^1.0.0",
10
- "@sharpee/world-model": "^1.0.0"
8
+ "@sharpee/core": "^1.1.0",
9
+ "@sharpee/if-domain": "^1.1.0",
10
+ "@sharpee/world-model": "^1.1.0"
11
11
  },
12
12
  "keywords": [
13
13
  "sharpee",
@@ -8,8 +8,8 @@
8
8
  *
9
9
  * @see ADR-069 Perception-Based Event Filtering
10
10
  */
11
- import type { ISemanticEvent } from "../core/index";
12
- import type { IFEntity, IWorldModel } from "../world-model/index";
11
+ import type { ISemanticEvent } from '@sharpee/core';
12
+ import type { IFEntity, IWorldModel } from '@sharpee/world-model';
13
13
  /**
14
14
  * Sense types for perception checks
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"perception-service.d.ts","sourceRoot":"","sources":["../../../../../repos/sharpee/packages/if-services/src/perception-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,WAAW,GACX,aAAa,GACb,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,8BAA8B;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,YAAY,CACV,MAAM,EAAE,cAAc,EAAE,EACxB,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,WAAW,GACjB,cAAc,EAAE,CAAC;IAEpB;;;;;;;;OAQG;IACH,WAAW,CACT,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,KAAK,GACX,OAAO,CAAC;CACZ"}
1
+ {"version":3,"file":"perception-service.d.ts","sourceRoot":"","sources":["../../../../../../repos/sharpee/packages/if-services/src/perception-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,WAAW,GACX,aAAa,GACb,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,8BAA8B;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,YAAY,CACV,MAAM,EAAE,cAAc,EAAE,EACxB,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,WAAW,GACjB,cAAc,EAAE,CAAC;IAEpB;;;;;;;;OAQG;IACH,WAAW,CACT,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,KAAK,GACX,OAAO,CAAC;CACZ"}