@tranhoangnguyen0310/pi-flow-external 5.4.0-external.0 → 5.4.1-external.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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to pi-flow external are documented here.
4
4
 
5
+ ## [5.4.1-external.0] - 2026-10-23
6
+
7
+ ### Fixed
8
+ - Bounded-repair now rejects non-Codex harnesses before starting any editor. Supporting edit and readonly permissions alone does not provide the shell access and structured output required by QA.
9
+ - Repair guidance now states the Codex-only limit and requires checks compatible with its read-only sandbox. Regression tests cover rejection before edits and default/explicit Codex execution.
10
+
5
11
  ## [5.4.0-external.0] - 2026-10-23
6
12
 
7
13
  ### Added
@@ -44,7 +44,9 @@ Example for parallel-sweep.js:
44
44
 
45
45
  Before launch the parent should explain the split, selected harnesses, permissions, which checks run in parallel, and what evidence will come back. Foreground is the default when the result is needed next.
46
46
 
47
- The example pins Codex because it supports the explicit readonly tier (and edit for the repair recipe); **it does not automatically switch backends**. Set harness to a verified available backend that enforces the required tier. Antigravity supports only danger, so these restricted examples do not work on it.
47
+ The example pins Codex because it supports the explicit readonly tier; **it does not automatically switch backends**. For the read-only recipes, set harness to a verified available backend that enforces the required tier. Antigravity supports only danger, so these restricted examples do not work on it.
48
+
49
+ **Bounded repair is Codex-only.** It rejects other harnesses before any editor starts. Supporting edit and readonly tiers is not enough: QA must also have shell access and structured output. OpenCode rejects the required schema, while Claude, Muse, and named Pi harnesses cannot shell-run tests at readonly. Before launch, confirm Codex is available and the checks can run in its read-only sandbox; checks that need workspace writes or network access may fail. Do not silently raise permissions to run them.
48
50
 
49
51
  ## What good behavior looks like
50
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tranhoangnguyen0310/pi-flow-external",
3
- "version": "5.4.0-external.0",
3
+ "version": "5.4.1-external.0",
4
4
  "description": "External Claude Code, Codex CLI, Antigravity, Grok Build CLI, Muse Code, and OpenCode delegation for pi.",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -34,9 +34,9 @@ Read [pattern-selection.md](references/pattern-selection.md) for failure modes a
34
34
  - [parallel-sweep.js](recipes/parallel-sweep.js) — independent scopes, partial failures kept.
35
35
  - [branch-and-converge.js](recipes/branch-and-converge.js) — parallel discovery with explicit evidence handoff into a final synthesis.
36
36
  - [adversarial-review.js](recipes/adversarial-review.js) — draft and independent critique (not a self-review).
37
- - [bounded-repair.js](recipes/bounded-repair.js) — authorized edits, structured checks, limited iterations.
37
+ - [bounded-repair.js](recipes/bounded-repair.js) — Codex-only authorized edits, structured checks, limited iterations. Other harnesses are rejected before any child starts.
38
38
 
39
- These are adaptable **examples**, not new runtime functions. Copy a recipe into a trusted saved workflow root or pass its text as the script to external_workflow, and pass JSON inputs through the tool's args. A scriptPath must be inside an allowed workflow root; a package skill directory is not automatically such a root. Recipes assume Codex as a restricted-permission demonstration backend, not an automatic fallback. Set harness inputs to an available backend that enforces the required tier.
39
+ These are adaptable **examples**, not new runtime functions. Copy a recipe into a trusted saved workflow root or pass its text as the script to external_workflow, and pass JSON inputs through the tool's args. A scriptPath must be inside an allowed workflow root; a package skill directory is not automatically such a root. Recipes assume Codex as a restricted-permission demonstration backend, not an automatic fallback. For the read-only recipes, set harness inputs to an available backend that enforces the required tier. Bounded repair requires Codex: QA needs both shell access at readonly and structured output. Before launch, confirm Codex is available and the specified checks can run in its read-only sandbox; checks that need workspace writes or network access may fail.
40
40
 
41
41
  ## Flow rules that prevent common failures
42
42
 
@@ -18,7 +18,11 @@ if (typeof input.checks !== "string" || !input.checks.trim()) throw new Error("a
18
18
  if (!Number.isInteger(input.maxAttempts) || input.maxAttempts < 1 || input.maxAttempts > 3) {
19
19
  throw new Error("args.maxAttempts must be an authorized number in 1-3");
20
20
  }
21
- const harness = input.harness || "codex"; // Must enforce both edit and readonly.
21
+ // shortcut: Codex-only QA; expand after verifying shell access and structured output at readonly.
22
+ const harness = input.harness === undefined ? "codex" : input.harness;
23
+ if (harness !== "codex") {
24
+ throw new Error('bounded-repair requires harness "codex" for shell checks and structured QA; no agents started');
25
+ }
22
26
  const attempts = [];
23
27
  let feedback = "";
24
28
  for (let attempt = 1; attempt <= input.maxAttempts; attempt++) {
@@ -19,7 +19,7 @@ Use the installed version's external_help({topic:"workflow"}) and external_help(
19
19
  - Claude readonly and edit have native tool restrictions, not kernel isolation; headless shell is denied at those tiers. Codex supports read-only and workspace-write OS sandboxes. Do not promise the same security guarantee across backends.
20
20
  - For inspection-only work, prefer a harness that can enforce readonly. A prompt saying "don't edit" alone is insufficient.
21
21
  - Do not execute parallel edits in the same working tree unless the parent has verified disjoint ownership and no shared-file changes. No built-in worktree isolation or merge arbitration exists in Flow.
22
- - A repair recipe needs the user to authorize edits and the expected fix/test cycle. Do not auto-retry failed children or expand permission without authorization.
22
+ - A repair recipe needs the user to authorize edits and the expected fix/test cycle. The bundled bounded-repair recipe accepts only Codex and rejects other harnesses before starting children: QA requires shell access at readonly plus structured output, not just support for the permission tiers. Confirm the checks can run in Codex's read-only sandbox before editing. Do not auto-retry failed children or expand permission without authorization.
23
23
 
24
24
  ## Context and handoff
25
25