@sharpee/if-services 1.0.8 → 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 +14 -18
- package/package.json +4 -4
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
|
-
- **
|
|
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 {
|
|
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/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharpee/if-services",
|
|
3
|
-
"version": "1.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
|
|
9
|
-
"@sharpee/if-domain": "^1.0
|
|
10
|
-
"@sharpee/world-model": "^1.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",
|