pi-spiral 0.2.2 → 0.3.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/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ ## [0.3.0]
4
+
5
+ ### Changed
6
+
7
+ - Host runtime binding: the extension now hands the host Pi modules
8
+ (`@earendil-works/pi-coding-agent`, `@earendil-works/pi-tui`, `typebox`) to
9
+ `pi-agent-runner` via `bindHostRuntime`. ralplan and ralph subagents run on
10
+ the Pi version you have installed instead of a stale copy bundled in
11
+ `node_modules`.
12
+ - Human-wait tracking: Spiral tracks permission prompts on its own events
13
+ facade (`humanWaitTracker`), so subagent timers pause while you answer a
14
+ dialog.
15
+ - The Pi packages (`pi-ai`, `pi-coding-agent`, `pi-tui`, `typebox`) are now
16
+ optional peer dependencies.
17
+ - Requires `pi-agent-runner` `^0.11.0` and Pi 1.1.0 or newer.
18
+
19
+ ## [0.2.2]
20
+
21
+ Previous release.
@@ -5,8 +5,14 @@
5
5
  // - delegate each role to a child agent through pi-agent-runner
6
6
  // - expose `/ralplan` + `ralplan` tool and `/ralph` + `ralph` tool
7
7
 
8
+ import * as hostTui from '@earendil-works/pi-tui';
8
9
  import { Text } from '@earendil-works/pi-tui';
10
+ import * as hostPi from '@earendil-works/pi-coding-agent';
11
+ import { Unsafe } from 'typebox';
12
+ import { Compile } from 'typebox/compile';
9
13
  import {
14
+ bindHostRuntime,
15
+ humanWaitTracker,
10
16
  mountRunsView,
11
17
  registerAgentsCommand,
12
18
  type ParentContext,
@@ -242,6 +248,12 @@ const makeCheckpointHandler =
242
248
  };
243
249
 
244
250
  export default function spiralExtension(pi: ExtensionAPI) {
251
+ // Hand the host Pi modules to the runner before any runner UI registration
252
+ // or delegation: the runner never imports them itself.
253
+ bindHostRuntime({ pi: hostPi, tui: hostTui, typebox: { Unsafe, Compile } });
254
+ // Each extension has its own events facade; track human waits on ours.
255
+ humanWaitTracker(pi.events);
256
+
245
257
  pi.registerEntryRenderer<ProgressEntryData>(
246
258
  PROGRESS_ENTRY_TYPE,
247
259
  (entry, _options, theme) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-spiral",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "Pi extension: ralplan (consensus planning: planner + architect + critic) and ralph (persistent execution loop), ported from oh-my-claudecode",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,8 @@
30
30
  "docs/ARCHITECTURE.md",
31
31
  "docs/adr",
32
32
  "spiral.config.example.jsonc",
33
- "README.md"
33
+ "README.md",
34
+ "CHANGELOG.md"
34
35
  ],
35
36
  "scripts": {
36
37
  "typecheck": "tsc --noEmit",
@@ -45,9 +46,24 @@
45
46
  "@earendil-works/pi-tui": "*",
46
47
  "typebox": "*"
47
48
  },
49
+ "peerDependenciesMeta": {
50
+ "@earendil-works/pi-ai": {
51
+ "optional": true
52
+ },
53
+ "@earendil-works/pi-coding-agent": {
54
+ "optional": true
55
+ },
56
+ "@earendil-works/pi-tui": {
57
+ "optional": true
58
+ },
59
+ "typebox": {
60
+ "optional": true
61
+ }
62
+ },
48
63
  "devDependencies": {
49
- "@earendil-works/pi-ai": "^1.1.0",
50
- "@earendil-works/pi-coding-agent": "^1.1.0",
64
+ "@earendil-works/pi-ai": "^1.5.0",
65
+ "@earendil-works/pi-coding-agent": "^1.5.0",
66
+ "@earendil-works/pi-tui": "^1.5.0",
51
67
  "@types/node": "^24.0.0",
52
68
  "eslint": "^9.0.0",
53
69
  "eslint-config-metarhia": "^9.0.0",
@@ -57,6 +73,6 @@
57
73
  "typescript-eslint": "^8.71.1"
58
74
  },
59
75
  "dependencies": {
60
- "pi-agent-runner": "^0.10.1"
76
+ "pi-agent-runner": "^0.11.0"
61
77
  }
62
78
  }