@henryqw/pi-subagent 26.4.0 → 26.5.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
@@ -6,7 +6,7 @@ Delegate work to configured Pi Roles with [Herdr](https://herdr.dev/). Authorize
6
6
 
7
7
  ## Install
8
8
 
9
- Requires Pi 1.1.0 or later in the 1.x series. Development and automated checks use Pi 1.1.0. Older Pi releases are no longer supported.
9
+ Requires Pi 1.1.0 or later in the 1.x series. Development and automated checks use Pi 1.1.0. Older Pi releases are no longer supported. Isolated work requires Herdr 0.9.3 or later, with a running Herdr server on API protocol 22 or later; Pi Subagent checks both before it starts.
10
10
 
11
11
  ```bash
12
12
  pi install npm:@henryqw/pi-task-models
@@ -11,7 +11,7 @@ import { runProcess as defaultRunProcess } from "./process.js";
11
11
  import { EXECUTION_BUDGET_ENV } from "./ephemeral.js";
12
12
  import { assertPrivateLease, scanProcessLease } from "./process-lease.js";
13
13
  import { exactDirectTerminalTurn } from "./direct-herdr.js";
14
- const MIN_HERDR_VERSION = [0, 9, 0];
14
+ const MIN_HERDR_VERSION = [0, 9, 3];
15
15
  const MIN_HERDR_PROTOCOL = 22;
16
16
  const HERDR_OPERATION_CAP_MS = 30_000;
17
17
  const LSOF_OPERATION_CAP_MS = 3_000;
@@ -276,7 +276,7 @@ export class HerdrHostRuntime {
276
276
  const versionOutput = await this.herdr.run(["--version"], this.processOptions(root, context, HERDR_OPERATION_CAP_MS));
277
277
  const versionMatch = /^herdr (\S+)\s*$/.exec(versionOutput);
278
278
  if (!versionMatch || !compareVersion(versionMatch[1], MIN_HERDR_VERSION)) {
279
- throw new Error("Herdr client version must be at least 0.9.0.");
279
+ throw new Error("Herdr client version must be at least 0.9.3.");
280
280
  }
281
281
  const status = statusFields(await this.herdr.run(["status", "server"], this.processOptions(root, context, HERDR_OPERATION_CAP_MS)));
282
282
  if (status.get("status") !== "running"
@@ -285,7 +285,7 @@ export class HerdrHostRuntime {
285
285
  || status.get("private_protocol_compatible") !== "yes"
286
286
  || !/^\d+$/.test(status.get("private_protocol") ?? "")
287
287
  || Number(status.get("private_protocol")) < MIN_HERDR_PROTOCOL) {
288
- throw new Error("Herdr server must be compatible version >=0.9.0 with private protocol >=22.");
288
+ throw new Error("Herdr server must be compatible version >=0.9.3 with private protocol >=22.");
289
289
  }
290
290
  const schema = await this.herdr.json(["api", "schema", "--json"], this.processOptions(root, context, HERDR_OPERATION_CAP_MS));
291
291
  requireSchemaCapabilities(schema);
@@ -733,7 +733,7 @@ export default function subagentExtension(pi: ExtensionAPI): void {
733
733
  }
734
734
  })();
735
735
  return {
736
- content: [{ type: "text" as const, text: capOutput(`Direct delegation started · ${ref} · ${taskId}\nHerdr tab: ${first.tabId} · pane: ${first.paneId} · agent: ${first.name}\nExact session: ${first.sessionFile}\nAll launched tabs: /subagent (on this session branch).\n${entries.length} task(s); result will arrive in one follow-up message. Direct work shares this checkout; completion is an exact answer, not checked integration. ${writes ? "Potential writers run serially; competing Pi writes stay blocked until owned workers are proved stopped. If termination is uncertain, use /subagent ${ref} Close/cancel-and-release (stops ALL its owned workers); changes are not rolled back." : "Concurrent changes may make reads stale."}`) }],
736
+ content: [{ type: "text" as const, text: capOutput(`Direct delegation started · ${ref} · ${taskId}\nHerdr tab: ${first.tabId} · pane: ${first.paneId} · agent: ${first.name}\nExact session: ${first.sessionFile}\nAll launched tabs: /subagent (on this session branch).\n${entries.length} task(s); result will arrive in one follow-up message. Direct work shares this checkout; completion is an exact answer, not checked integration. ${writes ? `Potential writers run serially; competing Pi writes stay blocked until owned workers are proved stopped. If termination is uncertain, use /subagent ${ref} Close/cancel-and-release (stops ALL its owned workers); changes are not rolled back.` : "Concurrent changes may make reads stale."}`) }],
737
737
  details: { taskId, mode: workflow.mode, tabId: first.tabId, sessionFile: first.sessionFile,
738
738
  entries: entries.map(({ id, index, delegation }) => ({ id, index, name: delegation.name, role: delegation.role })) },
739
739
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-subagent",
3
- "version": "26.4.0",
3
+ "version": "26.5.0",
4
4
  "description": "Delegate bounded direct work or durable checked isolated task graphs to Pi roles.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@henryqw/pi-config-store": "^3.0.0",
70
- "@henryqw/pi-herdr": "^0.4.9",
70
+ "@henryqw/pi-herdr": "^0.5.0",
71
71
  "@henryqw/pi-multi-codex": "^3.0.0",
72
72
  "@henryqw/pi-process": "^0.2.0",
73
73
  "@henryqw/pi-task-models": "^8.0.0",