oira666_pi-watcher 0.0.10 → 0.0.12

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/EVERGREEN.md CHANGED
@@ -21,6 +21,8 @@ The child registers `live_main_tools`/`steer_main`, adds prompt sections in `bef
21
21
  and persists its main-session link using `appendEntry`/session entries.
22
22
  RPC supplies prompts, state/history/models, queue clearing, abort, extension dialogs, and settlement.
23
23
  The package manifest exposes `src/index.ts`; credentials/settings/resources follow normal Pi loading.
24
+ The bridge imports `Type` from host-provided `typebox` (also a development dependency), not pi-ai.
25
+ Its tool parameters use plain JSON Schema supported by Pi's pi-schema validation.
24
26
 
25
27
  ## Internal Pi APIs
26
28
  Internal/undocumented coupling is present: `runtime-child.mjs` calls exported CLI `main()` and
@@ -44,7 +46,8 @@ then `test/e2e/watcher.test.ts`. No lint script is configured.
44
46
  Unit tests cover bounded live state, prompt identity/policy, CLI filtering, JSONL transport, and UI.
45
47
  `runtime-integration.test.ts` uses real RPC children and an offline provider to protect prompt-free
46
48
  startup, inheritance/exclusions, nested Pi launches, isolated models, resume, approval refusal,
47
- session guards, locks, shutdown, and recovery. `extension.test.cjs` exercises command → overlay →
49
+ session guards, locks, shutdown, and recovery. Busy reload is refused; RPC abort cancels
50
+ in-flight bridge calls before an idle reload succeeds. `extension.test.cjs` exercises command → overlay →
48
51
  RPC → approval → main delivery, including compaction refusal and shutdown cancellation.
49
52
  It also verifies that Watcher registers no keyboard shortcuts and that `/watcher` opens and reopens
50
53
  the panel without prompting or losing the side conversation.
@@ -57,5 +60,12 @@ The child uses the latest modular npm Pi from devDependencies, even with a stand
57
60
  ## Relevant changelog topics
58
61
  Watch extension loading/package-manager resources, CLI entry/layout/flags, trust and built-in MCP;
59
62
  RPC framing/dialogs/settlement; session JSONL/resume/tools and model persistence; steering/compaction;
60
- TUI key parsing, overlay focus/disposal, and clipboard support. Pi 1.4.0 includes relevant fixes for
61
- concurrent dialogs and resumed extension-tool activation. Tested against Pi 1.4.0.
63
+ TUI key parsing, overlay focus/disposal, and clipboard support. Pi 1.5.0 removes published pi-ai
64
+ TypeBox exports while retaining loader compatibility. Its package refresh/retry, session-write,
65
+ deferred editor replacement, and compaction OAuth fixes require no Watcher-specific workaround.
66
+ Pi 1.5.1 refuses reload during responses/compaction and waits for tool abort/results before
67
+ runtime disposal; cancellation tests must not depend on a busy reload reaching session_shutdown.
68
+ Its RPC shutdown/cleanup, overlay disposal/blocked status, async-hook serialization, stable model
69
+ selection, and package-update result progress events require no Watcher runtime workaround:
70
+ Watcher patches resource resolution, not PackageManager.update or its progress events.
71
+ Tested against Pi 1.5.1.
package/README.md CHANGED
@@ -12,7 +12,7 @@ pi install npm:oira666_pi-watcher
12
12
 
13
13
  Then restart Pi or run `/reload`. Requires Node.js **22.19+** and the modular Pi installation. The child launcher uses Pi's package-manager loading interfaces. Standalone compiled Pi binaries are not supported.
14
14
 
15
- Tested against Pi 1.4.0.
15
+ Tested against Pi 1.5.1.
16
16
 
17
17
  For local development:
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oira666_pi-watcher",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "A persistent side-agent conversation for observing and steering your running Pi agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,17 +42,19 @@
42
42
  "prepack": "npm run check && npm test"
43
43
  },
44
44
  "peerDependencies": {
45
- "@earendil-works/pi-agent-core": ">=1.4.0",
46
- "@earendil-works/pi-ai": ">=1.4.0",
47
- "@earendil-works/pi-coding-agent": ">=1.4.0",
48
- "@earendil-works/pi-tui": ">=1.4.0"
45
+ "@earendil-works/pi-agent-core": ">=1.5.0",
46
+ "@earendil-works/pi-ai": ">=1.5.0",
47
+ "@earendil-works/pi-coding-agent": ">=1.5.0",
48
+ "@earendil-works/pi-tui": ">=1.5.0",
49
+ "typebox": "^1.0.0"
49
50
  },
50
51
  "devDependencies": {
51
- "@earendil-works/pi-agent-core": "^1.4.0",
52
- "@earendil-works/pi-ai": "^1.4.0",
53
- "@earendil-works/pi-coding-agent": "^1.4.0",
54
- "@earendil-works/pi-tui": "^1.4.0",
52
+ "@earendil-works/pi-agent-core": "^1.5.1",
53
+ "@earendil-works/pi-ai": "^1.5.1",
54
+ "@earendil-works/pi-coding-agent": "^1.5.1",
55
+ "@earendil-works/pi-tui": "^1.5.1",
55
56
  "@types/node": "^26.6.6",
57
+ "typebox": "^1.4.3",
56
58
  "typescript": "^7.0.2"
57
59
  }
58
60
  }
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { randomUUID } from "node:crypto";
14
- import { Type } from "@earendil-works/pi-ai";
14
+ import { Type } from "typebox";
15
15
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
16
16
  import { buildWatcherSystemPrompt, WATCHER_SECTION_KEY } from "./runtime-prompt.ts";
17
17
  import {