@erichll/pi-sandbox 0.17.0 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.1 - 2026-09-06
4
+
5
+ - Move the `pi-subagents` compatibility floor to 0.66.0 for protected native
6
+ mode and drop the upper pin: new minors are accepted, and the real
7
+ compatibility gates remain the `./capability-ceiling` export check and the
8
+ capability-ceiling version check.
9
+ - Revalidated the adapter against the published pi-subagents 0.66.0 package:
10
+ the ceiling registry (`SUBAGENT_CAPABILITY_CEILING_VERSION` 1),
11
+ `registerSubagentCapabilityCeiling` options and handle, agent discovery and
12
+ resolution, config loading with `scheduledRuns`, and the
13
+ `runtimeAcknowledgedExtensions` acknowledgement mechanism are unchanged.
14
+ - Widen the `pi-subagents` peer and dev ranges to `>=0.66.0`. Protected mode
15
+ now requires pi-subagents 0.66.0 or newer; 0.65.x installs fail closed with
16
+ an explicit version error.
17
+
3
18
  ## 0.17.0 - 2026-09-05
4
19
 
5
20
  - Depend on the coordinated `@erichll/pi-auto-review 0.17.0` release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erichll/pi-sandbox",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Linux (bubblewrap) and macOS (Seatbelt) process sandbox for Pi backed by Anthropic's @anthropic-ai/sandbox-runtime. Fail-closed static filesystem policy plus per-connection network approval from pi-auto-review; sandboxes main-agent Bash and built-in subagent process trees.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@earendil-works/pi-coding-agent": "^0.85.0",
59
- "pi-subagents": ">=0.65.0 <0.66.0",
59
+ "pi-subagents": ">=0.66.0",
60
60
  "typebox": ">=1.0.0"
61
61
  },
62
62
  "peerDependenciesMeta": {
@@ -68,7 +68,7 @@
68
68
  "@earendil-works/pi-coding-agent": "^0.85.0",
69
69
  "@earendil-works/pi-server": "^0.85.0",
70
70
  "@types/node": "^26.2.0",
71
- "pi-subagents": ">=0.65.0 <0.66.0",
71
+ "pi-subagents": ">=0.66.0",
72
72
  "typescript": "^6.0.3"
73
73
  }
74
74
  }
@@ -4,12 +4,14 @@ import { fileURLToPath, pathToFileURL } from "node:url";
4
4
  import { createJiti } from "jiti";
5
5
 
6
6
  /**
7
- * Compatible pi-subagents line: 0.65.x. Patch updates (e.g. 0.65.1) are accepted;
8
- * any minor or major bump fails closed until this adapter is revalidated against
9
- * the new internal layout. The exports/ceiling checks below are the real
10
- * compatibility gate; this range only guards against blind accept-on-drift.
7
+ * Compatible pi-subagents line: 0.66.0 and above (no upper pin). Any new minor
8
+ * is accepted, so the exports/ceiling checks below are the real compatibility
9
+ * gate; this range only rejects old lines and guards against blind
10
+ * accept-on-drift. Revalidated against 0.66.0: ceiling registry, discovery,
11
+ * and config internals unchanged (verified 2026-09-06 against the published
12
+ * 0.66.0 package).
11
13
  */
12
- export const PI_SUBAGENTS_COMPAT_RANGE = ">=0.65.0 <0.66.0";
14
+ export const PI_SUBAGENTS_COMPAT_RANGE = ">=0.66.0";
13
15
  export const NATIVE_CHILD_TOOLS = ["bash", "read", "grep", "find", "ls"] as const;
14
16
  export const PI_SANDBOX_ACKNOWLEDGEMENT = "@erichll:pi-sandbox";
15
17
 
@@ -63,22 +65,23 @@ function requiredFunction(
63
65
  name: string,
64
66
  ): asserts value is (...args: never[]) => unknown {
65
67
  if (typeof value !== "function") {
66
- throw new Error(`pi-subagents 0.65.x compatibility failure: missing ${name}`);
68
+ throw new Error(`pi-subagents compatibility failure: missing ${name}`);
67
69
  }
68
70
  }
69
71
 
70
72
  /**
71
- * Accept only versions inside PI_SUBAGENTS_COMPAT_RANGE (0.65.x, including
72
- * prerelease suffixes like 0.65.2-beta.1) without pulling in a semver runtime.
73
+ * Accept only versions at or above PI_SUBAGENTS_COMPAT_RANGE (>= 0.66.0,
74
+ * including prerelease suffixes like 0.66.1-beta.1) without pulling in a
75
+ * semver runtime.
73
76
  */
74
77
  export function isCompatiblePiSubagentsVersion(version: unknown): boolean {
75
78
  if (typeof version !== "string") return false;
76
79
  const match = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(version);
77
80
  if (!match) return false;
78
- return Number(match[1] ?? "") === 0 && Number(match[2] ?? "") === 65;
81
+ return Number(match[1] ?? "") === 0 && Number(match[2] ?? "") >= 66;
79
82
  }
80
83
 
81
- /** Load the public ceiling API and the 0.65.x discovery/config internals.
84
+ /** Load the public ceiling API and the discovery/config internals.
82
85
  * This intentionally fails closed on package version, export, or layout drift.
83
86
  */
84
87
  export async function loadPiSubagentsNativeRuntime(
@@ -96,7 +99,7 @@ export async function loadPiSubagentsNativeRuntime(
96
99
  }
97
100
  if (packageJson.exports?.["./capability-ceiling"] !== "./src/api/capability-ceiling.ts") {
98
101
  throw new Error(
99
- "pi-subagents 0.65.x compatibility failure: capability-ceiling export changed",
102
+ "pi-subagents compatibility failure: capability-ceiling export changed",
100
103
  );
101
104
  }
102
105
 
@@ -110,11 +113,11 @@ export async function loadPiSubagentsNativeRuntime(
110
113
  jiti.import(pathToFileURL(join(root, "src/extension/config.ts")).href) as Promise<ConfigModule>,
111
114
  ]).catch((error) => {
112
115
  throw new Error(
113
- `pi-subagents 0.65.x compatibility failure: ${error instanceof Error ? error.message : String(error)}`,
116
+ `pi-subagents compatibility failure: ${error instanceof Error ? error.message : String(error)}`,
114
117
  );
115
118
  });
116
119
  if (ceiling.SUBAGENT_CAPABILITY_CEILING_VERSION !== 1) {
117
- throw new Error("pi-subagents 0.65.x compatibility failure: unsupported capability ceiling version");
120
+ throw new Error("pi-subagents compatibility failure: unsupported capability ceiling version");
118
121
  }
119
122
  requiredFunction(ceiling.registerSubagentCapabilityCeiling, "registerSubagentCapabilityCeiling");
120
123
  requiredFunction(discovery.discoverAgents, "discoverAgents");
@@ -211,7 +214,7 @@ export function nativeSubagentCallBlockReason(
211
214
  }
212
215
  const isDirect = typeof input.agent === "string" && input.agent.trim() !== "";
213
216
  if (input.workflowScript !== undefined || input.workflowScriptPath !== undefined) {
214
- return "workflowScript and workflowScriptPath are disabled because pi-subagents 0.65.x disables ambient extensions for their native children";
217
+ return "workflowScript and workflowScriptPath are disabled because pi-subagents disables ambient extensions for their native children";
215
218
  }
216
219
  if (!isDirect) {
217
220
  return "protected mode supports only direct agent launches";