@sharpee/ext-testing 1.0.8 → 1.1.1

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 (2) hide show
  1. package/README.md +63 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @sharpee/ext-testing
2
+
3
+ Debug and testing tools extension for the Sharpee Interactive Fiction platform.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @sharpee/ext-testing
9
+ ```
10
+
11
+ ## Overview
12
+
13
+ This extension provides authoring and QA tooling for Sharpee stories:
14
+
15
+ - **Debug mode** - interactive GDT-style commands with short codes
16
+ - **Test commands** - `$teleport`, `$take`, `$assert`, and friends for transcripts
17
+ - **Checkpoints** - save/restore world state to file, memory, or local storage
18
+ - **Deterministic testing** - seeded randomness for repeatable transcript runs
19
+ - **Annotations** - playtester note capture (ADR-109)
20
+
21
+ ## Usage
22
+
23
+ ```typescript
24
+ import { TestingExtension } from '@sharpee/ext-testing';
25
+
26
+ const testing = new TestingExtension({
27
+ debugMode: { enabled: true, prefix: 'gdt' },
28
+ testMode: { enabled: true, deterministicRandom: true },
29
+ checkpoints: { directory: './saves' }
30
+ });
31
+
32
+ // Execute a GDT debug command
33
+ const debugResult = testing.executeGdtCommand('AH west-of-house', world);
34
+
35
+ // Execute a test command (e.g. in a transcript)
36
+ const testResult = testing.executeTestCommand('$teleport west-of-house', world);
37
+
38
+ // Save and restore checkpoints
39
+ await testing.saveCheckpoint('before-troll', world);
40
+ await testing.restoreCheckpoint('before-troll', world);
41
+ ```
42
+
43
+ Checkpoint stores can be created directly for custom wiring:
44
+
45
+ ```typescript
46
+ import {
47
+ createFileStore,
48
+ createMemoryStore,
49
+ createLocalStorageStore,
50
+ } from '@sharpee/ext-testing';
51
+
52
+ const store = createFileStore('./saves');
53
+ ```
54
+
55
+ ## Related Packages
56
+
57
+ - [@sharpee/sharpee](https://www.npmjs.com/package/@sharpee/sharpee) - Full platform bundle
58
+ - [@sharpee/stdlib](https://www.npmjs.com/package/@sharpee/stdlib) - Standard actions
59
+ - [@sharpee/world-model](https://www.npmjs.com/package/@sharpee/world-model) - Entity system
60
+
61
+ ## License
62
+
63
+ MIT
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sharpee/ext-testing",
3
- "version": "1.0.8",
3
+ "version": "1.1.1",
4
4
  "description": "Debug and testing tools extension for Sharpee IF engine",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "dependencies": {
8
- "@sharpee/core": "^1.0.8",
9
- "@sharpee/world-model": "^1.0.8",
10
- "@sharpee/if-domain": "^1.0.8"
8
+ "@sharpee/core": "^1.1.1",
9
+ "@sharpee/world-model": "^1.1.1",
10
+ "@sharpee/if-domain": "^1.1.1"
11
11
  },
12
12
  "exports": {
13
13
  ".": {