@sabaiway/agent-workflow-kit 23.3.0 → 23.4.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 +24 -0
- package/README.md +1 -1
- package/SKILL.md +1 -1
- package/bridges/antigravity-cli-bridge/SKILL.md +2 -2
- package/bridges/antigravity-cli-bridge/bin/agy-review-harness.test.mjs +7 -1
- package/bridges/antigravity-cli-bridge/bin/agy-review-honesty.test.mjs +2 -1
- package/bridges/antigravity-cli-bridge/bin/agy-review-model-screen.test.mjs +2 -1
- package/bridges/antigravity-cli-bridge/bin/agy-review.sh +18 -10
- package/bridges/antigravity-cli-bridge/bin/agy-review.test.mjs +50 -50
- package/bridges/antigravity-cli-bridge/bin/agy.sh +6 -2
- package/bridges/antigravity-cli-bridge/bin/agy.test.mjs +5 -5
- package/bridges/antigravity-cli-bridge/capability.json +2 -2
- package/bridges/antigravity-cli-bridge/references/models-and-flags.md +1 -1
- package/bridges/antigravity-cli-bridge/setup/README.md +1 -1
- package/bridges/codex-cli-bridge/SKILL.md +1 -1
- package/bridges/codex-cli-bridge/bin/codex-exec-jev.test.mjs +73 -93
- package/bridges/codex-cli-bridge/bin/codex-exec.sh +7 -3
- package/bridges/codex-cli-bridge/bin/codex-exec.test.mjs +6 -10
- package/bridges/codex-cli-bridge/bin/codex-fixtures-harness.test.mjs +77 -0
- package/bridges/codex-cli-bridge/bin/codex-fixtures.test.mjs +215 -0
- package/bridges/codex-cli-bridge/bin/codex-model-posture.test.mjs +18 -18
- package/bridges/codex-cli-bridge/bin/codex-review-honesty.test.mjs +2 -1
- package/bridges/codex-cli-bridge/bin/codex-review-jev.test.mjs +13 -13
- package/bridges/codex-cli-bridge/bin/codex-review.sh +17 -10
- package/bridges/codex-cli-bridge/bin/codex-review.test.mjs +30 -29
- package/bridges/codex-cli-bridge/capability.json +1 -1
- package/bridges/typesafe-jev-bridge/SKILL.md +19 -12
- package/bridges/typesafe-jev-bridge/bin/jev-ask-harness.test.mjs +109 -0
- package/bridges/typesafe-jev-bridge/bin/jev-ask.sh +9 -4
- package/bridges/typesafe-jev-bridge/bin/jev-ask.test.mjs +109 -105
- package/bridges/typesafe-jev-bridge/bin/jev-client.mjs +27 -13
- package/bridges/typesafe-jev-bridge/capability.json +11 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/modes/bridge-settings.md +6 -5
- package/tools/bridge-settings-read.mjs +8 -3
- package/tools/bridge-settings.mjs +28 -43
- package/tools/detect-backends.mjs +1 -1
- package/tools/manifest/schema.md +4 -1
- package/tools/manifest/validate.mjs +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,30 @@ Semantically versioned ([semver](https://semver.org)), newest first. The `versio
|
|
|
4
4
|
is the current release. `upgrade` mode reads a project's `docs/ai/.workflow-version` and applies
|
|
5
5
|
every `migrations/<version>-<slug>.md` newer than it, in semver order.
|
|
6
6
|
|
|
7
|
+
## 23.4.0 — the judge's model is a setting you choose once (AD-229)
|
|
8
|
+
|
|
9
|
+
**You now pick the Jev version the judge asks in `/agent-workflow-kit bridge-settings`, from the versions the bridge
|
|
10
|
+
offers, and every `jev-ask` run uses it.** The setting is `JEV_MODEL`; with none set, the judge runs its default
|
|
11
|
+
version, as before. A version the bridge does not offer is turned away before anything is sent, with a line naming
|
|
12
|
+
the offered versions and how to set one.
|
|
13
|
+
|
|
14
|
+
- **Notes from another version say so.** The default version is the calibrated one. On any other offered version the
|
|
15
|
+
posture line carries `uncalibrated` and the output's new `calibrated` field is `false`; on the default it is `true`.
|
|
16
|
+
- **An environment `JEV_MODEL` sets that run's version**, turned away like a set one when the bridge does not offer
|
|
17
|
+
it; an empty `JEV_MODEL=` selects the default. A `bridge-settings` change warns when the environment also sets the key.
|
|
18
|
+
- **`codex-review` and `agy-review` now refuse a Node older than 22.21**, the family floor, by name before any run is
|
|
19
|
+
spent; Node 22.0 to 22.20 used to pass their check.
|
|
20
|
+
- **The bridges refresh by version:** the judge goes to 1.1.0, codex to 6.0.2 and agy to 8.0.2, and your next `init` or
|
|
21
|
+
`/agent-workflow-kit upgrade` refreshes each one you placed.
|
|
22
|
+
|
|
23
|
+
## 23.3.1 — the judge prints no runtime warning under a proxy on Node 22 (AD-228)
|
|
24
|
+
|
|
25
|
+
**On Node 22, a `jev-ask` run under a proxy no longer prints Node's experimental-feature warning for its proxy agent,
|
|
26
|
+
so its stderr again holds only the bridge's own lines: the posture line once the request is sent, and one line on a failure.** Node 22 prints that warning (code `UNDICI-EHPA`) at
|
|
27
|
+
start whenever its proxy switch meets a set `HTTPS_PROXY`, as inside a sandbox; Node 24 does not. The wrapper now
|
|
28
|
+
starts node with `--disable-warning=UNDICI-EHPA`, which turns off exactly that warning; every other warning stays. A
|
|
29
|
+
placed judge refreshes from 1.0.0 to 1.0.1 on your next `init` or `/agent-workflow-kit upgrade`.
|
|
30
|
+
|
|
7
31
|
## 23.3.0 — the kit ships the judge bridge, placed when you name it, and needs Node.js 22.21 (AD-228)
|
|
8
32
|
|
|
9
33
|
**An agent can now ask Jev a choice question through `jev-ask`: the kit carries the judge bridge
|
package/README.md
CHANGED
|
@@ -268,7 +268,7 @@ file), or run the guarded `/agent-workflow-kit uninstall`.
|
|
|
268
268
|
| `/agent-workflow-kit agents` | Claude Code · opt-in | **subagent vehicles** — places the five bundled subagent definitions into `.claude/agents/`: **four read-only vehicles + one full-tool `executor`**. **No read-only vehicle gets `Bash`**, and that is the load-bearing property: a read-only fan-out on a full-tool subagent shells out for facts it could have read, and every shelled command is an approval prompt you never needed to see. Three of the four ride a **cheap model** (haiku, low effort) for mechanical work — extraction sweeps, changelog fact-skeletons, gate-failure triage; the fourth, **`review-lens`**, is an ADDITIONAL independent read-only review opinion on code your configured backends have already seen (never a replacement for your plan or diff review recipe, advisory like every review; an epic is reviewed by the lens alone, whatever `epic.review` resolves to). The fifth, **`executor`** (all tools; model and effort from `docs/ai/vehicles.json`), is the ONE vehicle with a shell and the instrument behind the **Subagent** recipe: dispatched only for a bounded, file-disjoint execution / authoring / routine slice you verify afterwards — never for read-only work, never as a review backend, and it never commits. Its state (`placed` / `customized` / `unusable` / `missing`) is what a `subagent` slot's readiness resolves from. Writing code and running gates stay off the four read-only vehicles; the executor carries a bounded slice you re-verify on your main lane, and every vehicle's output is verified. Preview by default (`--apply` writes); every kit agent file (the five bundled names and each configured roster-derived lens) is **written current with no question** — an absent one placed, a differing one written with the body the kit writes for it, the executor's and the bundled `review-lens`'s (opus / high by default, set in the file's optional `review-lens` section) derived from `docs/ai/vehicles.json`, no copy kept; a link at a kit agent path stops the run naming it, nothing written; a vehicle of your own goes in `.claude/agents/<name>.local.md` with a `name:` of its own; never touches `settings*.json`, never commits. |
|
|
269
269
|
| `/agent-workflow-kit hook` | Claude Code · opt-in | **gate-approval hook** — places a self-contained PreToolUse hook (`.claude/hooks/`) and wires it into `.claude/settings.json`: a Bash command **byte-identical** to a gate you declared in `docs/ai/gates.json` (run from the project root) is auto-approved — no prompt, no idle; a seeded read-only command carrying a runtime residual (output redirection, command substitution, `--output` writes) now **asks** even where an allow rule would have silently passed it (proven live — hook `ask` overrides an allow rule). Detection is a conservative string scan, so it over-asks on a byte that is ordinary text — searching for `=>`, or a read wearing `2>/dev/null`, prompts. That is a documented open limit: 4.1.0 built three mechanisms to narrow it and removed all three in review, each counterexample kept as a test (see Mode: hook). Exact matches only, never patterns; never `deny`; a broken `gates.json` only disables auto-approval, never the guard. An opt-in **read-lane** (`--read-lane` → `docs/ai/lanes.json`, a **separate** file from `gates.json`) additionally auto-approves *compounds* of seeded read-only commands carrying no shell metaprogramming; `--apply --read-lane` verifies the placed hook is current first. Within a hook you wired, its file is placed when absent and written with the kit's body when it differs, with no question and no copy kept (the upgrade's `gate-hook.not-current`); a hook of your own goes in `.claude/hooks/<name>.local.mjs`, which you wire. Preview by default; never writes `settings.local.json`; never commits. |
|
|
270
270
|
| `/agent-workflow-kit state-block-guard` | Claude Code · opt-in | **closing-block detector** — a `Stop` hook that reads the turn's final assistant message and warns when the closing state block is defective: the «what I need from you» slot answering *nothing* (a turn that ENDS always needs a resume, so the answer is false, not merely unhelpful), or a first-person promise of imminent work in a turn that is over. Judged on the slot's first clause, so a real ask followed by a clause break and "nothing else" passes, and a promise gated on something named passes; matching is word-bounded and Unicode-aware, quoted and fenced examples are stripped, and the last STARTED block decides — an incomplete tail counts as no block rather than falling back to an earlier one. A message carrying no block at all is silent unless you pass `--require-block` — this kit does not mandate the block, and a hook that runs every turn must not warn every turn. The judgement is lexical and the mode doc names every residual it leaves. **Detection, never prevention** — a `Stop` hook cannot un-send the message it judges; what it buys is that a silent recurrence becomes a visible one. Warns via `systemMessage` and **exits 0 on every path**: never `deny`, never blocks the stop, never re-enters the model. Reads nothing but the message, makes no network call, approves nothing. Its writer is `tools/state-block-hook.mjs`: it places the self-contained hook and merges its `Stop` entry into `.claude/settings.json` by the three merge cases, keeping every foreign hook — the agent applies it on the chat yes after the danger check. Within the wired hook its runtime file is written with the kit's body when absent or differing, with no question (the upgrade's `state-block.not-current`); a hook of your own goes in `.claude/hooks/<name>.local.mjs`, which you wire. |
|
|
271
|
-
| `/agent-workflow-kit bridge-settings` | opt-in, any time | **host-level bridge settings** — read or change the bridges' `KEY=VALUE` config file (`${XDG_CONFIG_HOME:-~/.config}/agent-workflow/bridge-settings.conf`), the **one place a knob survives kit upgrades** (it lives outside every kit tree; a refresh never touches it, and now states loudly if it ever overwrote a local edit). The **model each bridge runs**: `CODEX_MODEL` + `CODEX_EFFORT` (default `gpt-6.1-sol` at `high`) and `AGY_MODEL` (default `Gemini 3.8 Flash (High)`) — the read-out shows the models each installed CLI offers, and a set one is checked against that list before anything is written. Other knobs: the **codex Fast tier** (`CODEX_SERVICE_TIER=priority` — "2x speed, **increased usage**" in the catalog's own words, quality-neutral, default off — a consented spend), the codex/agy hard timeouts, the codex review byte cap, and `AGY_REVIEW_MAX_TOTAL_BYTES` (the ceiling on what an oversized agy code review may feed before it refuses pre-spend). `AGY_REVIEW_ALLOW_ADDDIR` is a **retired** compatibility key: still recognized so an existing line never warns as unknown, but it arms nothing — the writer refuses to set it and `--unset` clears it. Allowed keys + value rules come from the bundled bridge manifests. **Previews by default**; refuses an unknown key, an out-of-range value, a model or effort the catalog does not offer, or a duplicate-carrying file; writes atomically (symlink/TOCTOU-safe). Never commits, never runs a model (only the read-only catalog commands). |
|
|
271
|
+
| `/agent-workflow-kit bridge-settings` | opt-in, any time | **host-level bridge settings** — read or change the bridges' `KEY=VALUE` config file (`${XDG_CONFIG_HOME:-~/.config}/agent-workflow/bridge-settings.conf`), the **one place a knob survives kit upgrades** (it lives outside every kit tree; a refresh never touches it, and now states loudly if it ever overwrote a local edit). The **model each bridge runs**: `CODEX_MODEL` + `CODEX_EFFORT` (default `gpt-6.1-sol` at `high`) and `AGY_MODEL` (default `Gemini 3.8 Flash (High)`) — the read-out shows the models each installed CLI offers, and a set one is checked against that list before anything is written. The judge's `JEV_MODEL` defaults to its manifest's `posture.model` and is checked against the versions its manifest offers. Other knobs: the **codex Fast tier** (`CODEX_SERVICE_TIER=priority` — "2x speed, **increased usage**" in the catalog's own words, quality-neutral, default off — a consented spend), the codex/agy hard timeouts, the codex review byte cap, and `AGY_REVIEW_MAX_TOTAL_BYTES` (the ceiling on what an oversized agy code review may feed before it refuses pre-spend). `AGY_REVIEW_ALLOW_ADDDIR` is a **retired** compatibility key: still recognized so an existing line never warns as unknown, but it arms nothing — the writer refuses to set it and `--unset` clears it. Allowed keys + value rules come from the bundled bridge manifests. **Previews by default**; refuses an unknown key, an out-of-range value, a model or effort the catalog does not offer, or a duplicate-carrying file; writes atomically (symlink/TOCTOU-safe). Never commits, never runs a model (only the read-only catalog commands). |
|
|
272
272
|
| `/agent-workflow-kit autonomy-doctor` | opt-in, any time | **guarded sandbox provisioner "doctor"** — can this machine run the Claude sandbox, and (only with your consent) fix it: macOS Seatbelt built-in / Linux+WSL2 needs `bwrap`+`socat` / native Windows → WSL2. Flagless = **FS-only preview** (the diagnosis, the exact absolute-path command it WOULD run, the exact `--apply <pm>:<pkgs>` consent tuple — runs nothing, never claims ready); `--verify` runs the unprivileged proof (a `bwrap` user-namespace smoke + `socat -V`) — the **only** source of a Linux "ready (verified)" claim; `--apply <pm>:<pkgs>` is the consent-gated privileged install (the tuple must equal the previewed plan; everything executed resolves to absolute paths inside `/usr/bin:/bin:/usr/sbin:/sbin`; the exact command is re-printed immediately before execution), then verifies. Honest loud degrades (unknown PM, untrusted location, nested-sandbox INDETERMINATE, root-unproven) and a stated restart step. Sits **outside every velocity auto-approve tier**; never auto-runs, never writes repo files, never commits. |
|
|
273
273
|
|
|
274
274
|
It **never auto-commits** and **never overwrites** an existing `AGENTS.md` without asking (its kit
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: agent-workflow-kit
|
|
|
3
3
|
description: Deploy or upgrade a portable AI-agent memory-and-workflow system in any project. Use when the user wants to bootstrap `docs/ai/` + an entry-point `AGENTS.md` (+ `CLAUDE.md` alias) + cap/archive/index enforcement in a new or existing repo, set up the Memory Map and session protocols, install the docs-rotation pre-commit hook, or run `/agent-workflow-kit` / `/agent-workflow-kit upgrade`. Triggers on phrases like "set up the memory system", "deploy the AI workflow here", "bootstrap docs/ai", "upgrade the workflow". New to the epic, story and task tier? Run `/agent-workflow-kit tier`. A typed decision with a confidence from Jev? Run `/agent-workflow-kit jev`.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
metadata:
|
|
6
|
-
version: '23.
|
|
6
|
+
version: '23.4.0'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-kit
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: antigravity-cli-bridge
|
|
3
3
|
description: Delegate work to Google's Antigravity CLI (`agy`) — the successor to Gemini CLI — to reach Gemini, Claude, and GPT-OSS models under a Google AI Pro/Ultra subscription from the terminal. Use when the user wants to run a headless `agy` prompt, hand a focused task or second-opinion review to `agy`, install or authenticate Antigravity CLI, check or economise its quota/models, bridge project context into `agy`, set up a second delegated-execution backend beside Codex, or troubleshoot `agy` flags, models, auth, conversations, or its headless behaviour.
|
|
4
4
|
metadata:
|
|
5
|
-
version: '8.0.
|
|
5
|
+
version: '8.0.2'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# antigravity-cli-bridge
|
|
@@ -142,7 +142,7 @@ turn** exits non-zero the captured stdout is published as-is (the CLI's own fail
|
|
|
142
142
|
envelope is parsed only on a zero exit), so a failing run may print a JSON or partial payload — an
|
|
143
143
|
**intermediate** feed turn is the exception, its output stays private (Invariant E) and its failure
|
|
144
144
|
prints only a named error. So it **probes before
|
|
145
|
-
spending anything**: `agy --help` must advertise both flags, **Node ≥ 22** must be on `PATH`, and
|
|
145
|
+
spending anything**: `agy --help` must advertise both flags, **Node ≥ 22.21** must be on `PATH`, and
|
|
146
146
|
`bin/agy-envelope.mjs` must be present — each refusal names the missing capability and its recovery.
|
|
147
147
|
A version floor is deliberately not used (the release that introduced a flag is not measurable from
|
|
148
148
|
one installed build, so a guessed floor would refuse working installs), and a failed probe is never
|
|
@@ -166,6 +166,12 @@ export const farmFor = (exclude) => {
|
|
|
166
166
|
return farms.get(key);
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
+
export const makeFixtureRepo = (run, dir, initArgs = []) => {
|
|
170
|
+
run(['init', ...initArgs, dir]);
|
|
171
|
+
run(['-C', dir, 'config', 'maintenance.auto', 'false']);
|
|
172
|
+
return dir;
|
|
173
|
+
};
|
|
174
|
+
|
|
169
175
|
const TEMPLATE_HOME = (() => {
|
|
170
176
|
const home = join(SHARED_ROOT, 'template-home');
|
|
171
177
|
const bin = join(home, '.local', 'bin');
|
|
@@ -174,7 +180,7 @@ const TEMPLATE_HOME = (() => {
|
|
|
174
180
|
const repo = join(home, 'repo');
|
|
175
181
|
mkdirSync(repo);
|
|
176
182
|
const g = (...args) => spawnSync('git', args, { cwd: repo, encoding: 'utf8' });
|
|
177
|
-
g(
|
|
183
|
+
makeFixtureRepo((args) => g(...args), repo, ['-q']);
|
|
178
184
|
g('config', 'user.email', 'probe@example.com');
|
|
179
185
|
g('config', 'user.name', 'probe');
|
|
180
186
|
writeFileSync(join(repo, 'base.txt'), 'committed base\n');
|
|
@@ -12,6 +12,7 @@ import { tmpdir } from 'node:os';
|
|
|
12
12
|
import { join, dirname, resolve } from 'node:path';
|
|
13
13
|
import { fileURLToPath } from 'node:url';
|
|
14
14
|
import { spawnSync } from 'node:child_process';
|
|
15
|
+
import { makeFixtureRepo } from './agy-review-harness.test.mjs';
|
|
15
16
|
|
|
16
17
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
17
18
|
const WRAPPER = join(HERE, 'agy-review.sh');
|
|
@@ -77,7 +78,7 @@ const TEMPLATE_HOME = (() => {
|
|
|
77
78
|
const repo = join(home, 'repo');
|
|
78
79
|
mkdirSync(repo);
|
|
79
80
|
const g = (...args) => spawnSync('git', args, { cwd: repo, encoding: 'utf8' });
|
|
80
|
-
g(
|
|
81
|
+
makeFixtureRepo((args) => g(...args), repo, ['-q']);
|
|
81
82
|
g('config', 'user.email', 'probe@example.com');
|
|
82
83
|
g('config', 'user.name', 'probe');
|
|
83
84
|
writeFileSync(join(repo, 'base.txt'), 'committed base\n');
|
|
@@ -10,6 +10,7 @@ import { tmpdir } from 'node:os';
|
|
|
10
10
|
import { join, dirname, resolve } from 'node:path';
|
|
11
11
|
import { fileURLToPath } from 'node:url';
|
|
12
12
|
import { spawnSync } from 'node:child_process';
|
|
13
|
+
import { makeFixtureRepo } from './agy-review-harness.test.mjs';
|
|
13
14
|
|
|
14
15
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
15
16
|
const WRAPPER = join(HERE, 'agy-review.sh');
|
|
@@ -42,7 +43,7 @@ describe('agy-review — the control-byte screen precedes EVERY interpolation of
|
|
|
42
43
|
const repo = join(home, 'repo');
|
|
43
44
|
mkdirSync(repo);
|
|
44
45
|
const g = (...args) => spawnSync('git', args, { cwd: repo, encoding: 'utf8' });
|
|
45
|
-
g(
|
|
46
|
+
makeFixtureRepo((args) => g(...args), repo, ['-q']);
|
|
46
47
|
g('config', 'user.email', 'probe@example.com');
|
|
47
48
|
g('config', 'user.name', 'probe');
|
|
48
49
|
writeFileSync(join(repo, 'base.txt'), 'base\n');
|
|
@@ -162,7 +162,7 @@ Notes:
|
|
|
162
162
|
envelope is parsed only on a zero exit); an INTERMEDIATE feed turn is the exception, its output
|
|
163
163
|
stays private (Invariant E) and its failure prints only a named error. Enforced by a PRE-SPEND
|
|
164
164
|
capability probe, not a version floor: agy --help must advertise --output-format and
|
|
165
|
-
--disable-slash-commands, node must be >= 22, and bin/agy-envelope.mjs must be present — otherwise
|
|
165
|
+
--disable-slash-commands, node must be >= 22.21, and bin/agy-envelope.mjs must be present — otherwise
|
|
166
166
|
the review refuses before any run is spent and names the missing capability
|
|
167
167
|
pre-dispatch host-diff: before the FIRST dispatch of this bridge, diff the hosts of the services its manifest names
|
|
168
168
|
against the live sandbox allow-list — a missing host is surfaced to the maintainer BEFORE
|
|
@@ -242,7 +242,7 @@ Honesty + posture (D4/D5):
|
|
|
242
242
|
mode.
|
|
243
243
|
|
|
244
244
|
Closed grammar: unknown flags are rejected; no '--' passthrough (the flag escape is --ungrounded; the env escape is AGY_PROBE=1).
|
|
245
|
-
Requires at run time: the agy CLI on PATH, a Google AI subscription login, Node >= 22 (--help needs none of these).
|
|
245
|
+
Requires at run time: the agy CLI on PATH, a Google AI subscription login, Node >= 22.21 (--help needs none of these).
|
|
246
246
|
HELP
|
|
247
247
|
exit 0
|
|
248
248
|
;;
|
|
@@ -271,7 +271,7 @@ aw_settings_file() {
|
|
|
271
271
|
printf '%s/agent-workflow/bridge-settings.conf' "${XDG_CONFIG_HOME:-$HOME/.config}"
|
|
272
272
|
}
|
|
273
273
|
aw_settings_known() {
|
|
274
|
-
case " CODEX_SERVICE_TIER CODEX_HARD_TIMEOUT CODEX_REVIEW_MAX_TOTAL_BYTES AGY_HARD_TIMEOUT AGY_REVIEW_ALLOW_ADDDIR AGY_REVIEW_MAX_TOTAL_BYTES CODEX_MODEL CODEX_EFFORT AGY_MODEL " in
|
|
274
|
+
case " CODEX_SERVICE_TIER CODEX_HARD_TIMEOUT CODEX_REVIEW_MAX_TOTAL_BYTES AGY_HARD_TIMEOUT AGY_REVIEW_ALLOW_ADDDIR AGY_REVIEW_MAX_TOTAL_BYTES CODEX_MODEL CODEX_EFFORT AGY_MODEL JEV_MODEL " in
|
|
275
275
|
*" $1 "*) return 0 ;;
|
|
276
276
|
*) return 1 ;;
|
|
277
277
|
esac
|
|
@@ -371,7 +371,11 @@ aw_read_posture() {
|
|
|
371
371
|
AW_HOST_VALUE="$value"
|
|
372
372
|
AW_HOST_SOURCE="setting"
|
|
373
373
|
elif (( notify )); then
|
|
374
|
-
|
|
374
|
+
if [[ -n "$default" ]]; then
|
|
375
|
+
echo "warning: $key in bridge settings file '$file' is empty or carries a control byte — using the built-in default '$default'." >&2
|
|
376
|
+
else
|
|
377
|
+
echo "warning: $key in bridge settings file '$file' is empty or carries a control byte — using the manifest's default." >&2
|
|
378
|
+
fi
|
|
375
379
|
fi
|
|
376
380
|
fi
|
|
377
381
|
fi
|
|
@@ -459,7 +463,7 @@ aw_scrub_billing_keys() {
|
|
|
459
463
|
# Review-receipt identity (AD-038). AW_BRIDGE_VERSION mirrors this bridge's SKILL.md/capability.json
|
|
460
464
|
# version (drift-guarded by agy-review.test.mjs against capability.json).
|
|
461
465
|
AW_RECEIPT_BACKEND="agy"
|
|
462
|
-
AW_BRIDGE_VERSION="8.0.
|
|
466
|
+
AW_BRIDGE_VERSION="8.0.2" # aw-version-anchor
|
|
463
467
|
# D5 control-byte screen — IMMEDIATELY after resolution, BEFORE any interpolation can echo raw
|
|
464
468
|
# newline/ESC bytes into stderr/the terminal (round-2 fold).
|
|
465
469
|
if [[ "$AGY_MODEL" == *[$'\x01'-$'\x1f'$'\x7f']* ]]; then
|
|
@@ -644,6 +648,7 @@ AGY_RUN="$HERE/agy.sh"
|
|
|
644
648
|
# a usable node. A probe that FAILS is never read as "capability present" (fail closed).
|
|
645
649
|
AW_REQUIRED_AGY_FLAGS=(--output-format --disable-slash-commands)
|
|
646
650
|
AW_MIN_NODE_MAJOR=22
|
|
651
|
+
AW_MIN_NODE_MINOR=21
|
|
647
652
|
aw_agy_version() {
|
|
648
653
|
local v
|
|
649
654
|
v="$(agy --version 2>/dev/null | LC_ALL=C awk 'NR == 1 { print }' || true)"
|
|
@@ -713,17 +718,20 @@ if (( ${#aw_missing_flags[@]} > 0 )); then
|
|
|
713
718
|
exit 127
|
|
714
719
|
fi
|
|
715
720
|
if ! command -v node >/dev/null 2>&1; then
|
|
716
|
-
echo "error: 'node' is not on PATH, and this review parses agy's JSON envelope in node (Node >= ${AW_MIN_NODE_MAJOR})." >&2
|
|
717
|
-
echo " Refusing BEFORE any run is spent. Install Node >= ${AW_MIN_NODE_MAJOR}, then re-run." >&2
|
|
721
|
+
echo "error: 'node' is not on PATH, and this review parses agy's JSON envelope in node (Node >= ${AW_MIN_NODE_MAJOR}.${AW_MIN_NODE_MINOR})." >&2
|
|
722
|
+
echo " Refusing BEFORE any run is spent. Install Node >= ${AW_MIN_NODE_MAJOR}.${AW_MIN_NODE_MINOR}, then re-run." >&2
|
|
718
723
|
exit 127
|
|
719
724
|
fi
|
|
720
725
|
aw_node_version="$(node --version 2>/dev/null || true)"
|
|
721
726
|
aw_node_major="${aw_node_version#v}"
|
|
722
727
|
aw_node_major="${aw_node_major%%.*}"
|
|
723
|
-
|
|
724
|
-
|
|
728
|
+
aw_node_minor="${aw_node_version#*.}"
|
|
729
|
+
aw_node_minor="${aw_node_minor%%.*}"
|
|
730
|
+
if [[ ! "$aw_node_major" =~ ^[0-9]+$ || ! "$aw_node_minor" =~ ^[0-9]+$ ]] ||
|
|
731
|
+
(( 10#$aw_node_major < AW_MIN_NODE_MAJOR || (10#$aw_node_major == AW_MIN_NODE_MAJOR && 10#$aw_node_minor < AW_MIN_NODE_MINOR) )); then
|
|
732
|
+
echo "error: node '${aw_node_version:-<unreadable>}' is below the family floor (Node >= ${AW_MIN_NODE_MAJOR}.${AW_MIN_NODE_MINOR}) this review needs" >&2
|
|
725
733
|
echo " to parse agy's JSON envelope. Refusing BEFORE any run is spent." >&2
|
|
726
|
-
echo " Upgrade Node to >= ${AW_MIN_NODE_MAJOR}, then re-run." >&2
|
|
734
|
+
echo " Upgrade Node to >= ${AW_MIN_NODE_MAJOR}.${AW_MIN_NODE_MINOR}, then re-run." >&2
|
|
727
735
|
exit 127
|
|
728
736
|
fi
|
|
729
737
|
if [[ ! -f "$AGY_ENVELOPE_READER" ]]; then
|
|
@@ -17,14 +17,11 @@ import {
|
|
|
17
17
|
isAssemblerBanner, seedFedChangeSet, inlineArtifactOf, bodyOf, requestedBlockOf, requestedOf, fedRun,
|
|
18
18
|
} from './agy-review-harness.test.mjs';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// the invocation sentinel, so a probe can never read as a spent run.
|
|
26
|
-
const FAKE_OLD_NODE = '#!/usr/bin/env bash\nprintf "v18.20.0\\n"\n';
|
|
27
|
-
|
|
20
|
+
const makeFakeNode = (version) => `#!/usr/bin/env bash
|
|
21
|
+
if [[ "\${1:-}" == "--version" ]]; then printf '%s\\n' '${version}'; else exec '${process.execPath.replaceAll("'", "'\\''")}' "$@"; fi
|
|
22
|
+
`;
|
|
23
|
+
const NODE_FLOOR = /\bnode(?: must be)?\s*(?:>=|\u2265)?\s*22\.21\b/i;
|
|
24
|
+
const BARE_NODE_FLOOR = /\bnode(?:\.js)?(?: must be)?\s*(?:>=|\u2265)?\s*22(?!\.21\b)\b/i;
|
|
28
25
|
describe('agy-review.sh — the pre-spend capability door (Decision 2)', { concurrency: 2 }, () => {
|
|
29
26
|
for (const flag of ['--output-format', '--disable-slash-commands']) {
|
|
30
27
|
it(`a --help that does not advertise ${flag} refuses pre-spend and names it`, async () => {
|
|
@@ -39,11 +36,6 @@ describe('agy-review.sh — the pre-spend capability door (Decision 2)', { concu
|
|
|
39
36
|
assert.equal(receipts.length, 0);
|
|
40
37
|
});
|
|
41
38
|
}
|
|
42
|
-
|
|
43
|
-
// Each required flag buys something DIFFERENT, so the refusal must name the cost of the flag that
|
|
44
|
-
// is actually missing: a build lacking --disable-slash-commands answers perfectly readably and
|
|
45
|
-
// corrupts the delivered BODY instead, which the envelope explanation would send an operator
|
|
46
|
-
// hunting the wrong bug.
|
|
47
39
|
it('the refusal names what the MISSING flag buys, not one blanket envelope explanation', async () => {
|
|
48
40
|
const sb = makeSandbox();
|
|
49
41
|
const r = await run(sb, { args: ['code', '--facts', 'f'], env: { AGY_FAKE_HELP_OMIT: '--disable-slash-commands' } });
|
|
@@ -53,7 +45,6 @@ describe('agy-review.sh — the pre-spend capability door (Decision 2)', { concu
|
|
|
53
45
|
assert.match(r.stderr, /slash command/i, 'the stated cost is command expansion of the change-set body');
|
|
54
46
|
assert.doesNotMatch(r.stderr, /cannot read/, 'the unreadable-answer cost belongs to --output-format alone');
|
|
55
47
|
});
|
|
56
|
-
|
|
57
48
|
it('`agy --help` exiting non-zero refuses with a DISTINCT cause — never read as "capability present"', async () => {
|
|
58
49
|
const sb = makeSandbox();
|
|
59
50
|
const r = await run(sb, { args: ['code', '--facts', 'f'], env: { AGY_FAKE_HELP_EXIT: '3' } });
|
|
@@ -63,35 +54,48 @@ describe('agy-review.sh — the pre-spend capability door (Decision 2)', { concu
|
|
|
63
54
|
assert.match(r.stderr, /'agy --help' exited 3/, 'the failed probe is the stated cause');
|
|
64
55
|
assert.doesNotMatch(r.stderr, /does not advertise the flag/, 'a failed probe is not a missing-flag verdict');
|
|
65
56
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
describe('Node 22.21 family floor — spec:jev-judge/S11', () => {
|
|
58
|
+
it('node ABSENT refuses pre-spend, naming Node 22.21', async () => {
|
|
59
|
+
const sb = makeSandbox();
|
|
60
|
+
const r = await run(sb, { args: ['code', '--facts', 'f'], env: { PATH: `${sb.bin}:${farmFor(['agy', 'agy-run', 'node'])}` } });
|
|
61
|
+
rmSync(sb.home, { recursive: true, force: true });
|
|
62
|
+
assert.notEqual(r.status, 0, r.stderr);
|
|
63
|
+
assert.equal(r.invoked, false);
|
|
64
|
+
assert.match(r.stderr, /'node' is not on PATH/);
|
|
65
|
+
assert.match(r.stderr, NODE_FLOOR);
|
|
66
|
+
});
|
|
67
|
+
for (const [version, admitted] of [['v22.3.0', false], ['v22.20.0', false], ['v22.21.0', true], ['v23.0.0', true]]) {
|
|
68
|
+
it(`node ${version} ${admitted ? 'passes the floor check (unchanged behavior)' : 'refuses pre-spend, naming Node 22.21'}`, async () => {
|
|
69
|
+
const sb = makeSandbox();
|
|
70
|
+
writeFileSync(join(sb.bin, 'node'), makeFakeNode(version), { mode: 0o755 });
|
|
71
|
+
writeFileSync(join(sb.home, 'plan.md'), '# Plan\n');
|
|
72
|
+
const r = await run(sb, { args: ['plan', join(sb.home, 'plan.md'), '--facts', 'f'] });
|
|
73
|
+
const receipts = readReceipts(sb.repo);
|
|
74
|
+
rmSync(sb.home, { recursive: true, force: true });
|
|
75
|
+
if (admitted) {
|
|
76
|
+
assert.doesNotMatch(r.stderr, /below the family floor/);
|
|
77
|
+
assert.equal(r.status, 0, r.stderr);
|
|
78
|
+
assert.equal(r.invoked, true);
|
|
79
|
+
} else {
|
|
80
|
+
assert.equal(r.invoked, false, 'the door refuses BEFORE any paid dispatch');
|
|
81
|
+
assert.notEqual(r.status, 0, r.stderr);
|
|
82
|
+
assert.ok(r.stderr.includes(version), 'the refusal quotes the version it read');
|
|
83
|
+
assert.match(r.stderr, NODE_FLOOR);
|
|
84
|
+
assert.equal(receipts.length, 0);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
it('help, review contract notes and shipped floor text name Node 22.21', () => {
|
|
89
|
+
const root = join(HERE, '..');
|
|
90
|
+
const files = readdirSync(root, { recursive: true }).filter((path) =>
|
|
91
|
+
!path.split(/[\\/]/).includes('node_modules') && (/\.md$/i.test(path) || /^bin\/[^/]+\.sh$/.test(path)));
|
|
92
|
+
const bareFloors = files.flatMap((path) => readFileSync(join(root, path), 'utf8').split('\n')
|
|
93
|
+
.flatMap((line, index) => BARE_NODE_FLOOR.test(line) ? [`${path}:${index + 1}: ${line.trim()}`] : []));
|
|
94
|
+
const notes = REVIEW_CONTRACT.notes.join('\n');
|
|
95
|
+
assert.deepEqual({ help: NODE_FLOOR.test(runHelp('--help').stdout), notes: NODE_FLOOR.test(notes),
|
|
96
|
+
bareNotes: BARE_NODE_FLOOR.test(notes), bareFloors }, { help: true, notes: true, bareNotes: false, bareFloors: [] });
|
|
72
97
|
});
|
|
73
|
-
rmSync(sb.home, { recursive: true, force: true });
|
|
74
|
-
assert.notEqual(r.status, 0, r.stderr);
|
|
75
|
-
assert.equal(r.invoked, false);
|
|
76
|
-
assert.match(r.stderr, /'node' is not on PATH/);
|
|
77
|
-
assert.match(r.stderr, /Node >= 22/);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('node PRESENT but BELOW the floor refuses pre-spend — the version comparison really runs', async () => {
|
|
81
|
-
const sb = makeSandbox();
|
|
82
|
-
// Into $HOME/.local/bin, which the wrapper itself prepends — so the fake wins over the real node.
|
|
83
|
-
writeFileSync(join(sb.bin, 'node'), FAKE_OLD_NODE, { mode: 0o755 });
|
|
84
|
-
const r = await run(sb, { args: ['code', '--facts', 'f'] });
|
|
85
|
-
rmSync(sb.home, { recursive: true, force: true });
|
|
86
|
-
assert.notEqual(r.status, 0, r.stderr);
|
|
87
|
-
assert.equal(r.invoked, false, 'an existence-only check would have dispatched here');
|
|
88
|
-
assert.match(r.stderr, /v18\.20\.0/, 'the refusal quotes the version it read');
|
|
89
|
-
assert.match(r.stderr, /below the family floor \(Node >= 22\)/);
|
|
90
98
|
});
|
|
91
|
-
|
|
92
|
-
// The door reads option DECLARATIONS, not substrings. A near-miss flag and a prose mention are the
|
|
93
|
-
// two ways a substring search opens the door to a build that cannot honour the flag — and the
|
|
94
|
-
// failure would then surface only AFTER a subscription turn was already spent.
|
|
95
99
|
for (const [name, extraHelpLine] of [
|
|
96
100
|
['a NEAR-MISS flag name', ' --output-formatting a longer flag that is not the one we pass'],
|
|
97
101
|
['a prose mention outside any declaration', 'Note: pass --output-format json to get structured output.'],
|
|
@@ -112,8 +116,6 @@ describe('agy-review.sh — the pre-spend capability door (Decision 2)', { concu
|
|
|
112
116
|
});
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
// The other direction: a declaration the parser fails to READ refuses a build that CAN honour the
|
|
116
|
-
// flag — the false refusal Decision 2 exists to avoid. Both common clustered renderings count.
|
|
117
119
|
for (const [name, extraHelpLine] of [
|
|
118
120
|
['a comma-clustered alias', ' -o, --output-format the clustered rendering'],
|
|
119
121
|
['a metavar rendering', ' -o FORMAT, --output-format FORMAT the metavar rendering'],
|
|
@@ -2641,9 +2643,9 @@ describe('agy-review.sh — bridge settings file (bridges 2.3.0)', { concurrency
|
|
|
2641
2643
|
// ── settings surface ⟷ manifest (drift guard, D6) — same contract as the codex bridge ──
|
|
2642
2644
|
const SETTINGS_HEADER = 'Settings file (KEY=VALUE, parsed never sourced; env wins over file, file wins over built-in default):';
|
|
2643
2645
|
const SIBLING_MANIFEST = JSON.parse(readFileSync(join(HERE, '..', '..', 'codex-cli-bridge', 'capability.json'), 'utf8'));
|
|
2644
|
-
const
|
|
2646
|
+
const JUDGE_MANIFEST = JSON.parse(readFileSync(join(HERE, '..', '..', 'typesafe-jev-bridge', 'capability.json'), 'utf8'));
|
|
2647
|
+
const ALL_SETTINGS = [MANIFEST, SIBLING_MANIFEST, JUDGE_MANIFEST].flatMap((manifest) => manifest.settings ?? []);
|
|
2645
2648
|
const SETTINGS_CMD = 'agy-review';
|
|
2646
|
-
|
|
2647
2649
|
describe('agy-review.sh — settings surface ⟷ manifest (D6, manifest-pinned)', { concurrency: 2 }, () => {
|
|
2648
2650
|
it('--help Settings section keys set-EQUAL the manifest appliesTo subset', async () => {
|
|
2649
2651
|
const help = runHelp('--help').stdout;
|
|
@@ -2656,14 +2658,12 @@ describe('agy-review.sh — settings surface ⟷ manifest (D6, manifest-pinned)'
|
|
|
2656
2658
|
});
|
|
2657
2659
|
|
|
2658
2660
|
const source = readFileSync(WRAPPER, 'utf8');
|
|
2659
|
-
|
|
2660
|
-
it('aw_settings_known carries exactly the UNION of both bridges settings keys', async () => {
|
|
2661
|
+
it('aw_settings_known carries exactly the UNION of three bridges settings keys, JEV_MODEL among them', async () => {
|
|
2661
2662
|
const m = source.match(/aw_settings_known\(\) \{\n case " ([^"]+) " in/);
|
|
2662
2663
|
assert.ok(m, 'aw_settings_known registry case not found');
|
|
2663
|
-
assert.ok(
|
|
2664
|
-
setEq(m[1].trim().split(/\s+/), ALL_SETTINGS.map((s) => s.key), 'shell registry ⟷ manifest union');
|
|
2664
|
+
assert.ok(m[1].trim().split(/\s+/).includes('JEV_MODEL'), 'the registry must know the judge model setting');
|
|
2665
|
+
setEq(m[1].trim().split(/\s+/), ALL_SETTINGS.map((s) => s.key), 'shell registry ⟷ three-manifest union');
|
|
2665
2666
|
});
|
|
2666
|
-
|
|
2667
2667
|
it('AW_SETTINGS_APPLIED equals the manifest appliesTo subset for this wrapper', async () => {
|
|
2668
2668
|
const m = source.match(/^AW_SETTINGS_APPLIED="([^"]*)"$/m);
|
|
2669
2669
|
assert.ok(m, 'AW_SETTINGS_APPLIED not found');
|
|
@@ -158,7 +158,7 @@ aw_settings_file() {
|
|
|
158
158
|
printf '%s/agent-workflow/bridge-settings.conf' "${XDG_CONFIG_HOME:-$HOME/.config}"
|
|
159
159
|
}
|
|
160
160
|
aw_settings_known() {
|
|
161
|
-
case " CODEX_SERVICE_TIER CODEX_HARD_TIMEOUT CODEX_REVIEW_MAX_TOTAL_BYTES AGY_HARD_TIMEOUT AGY_REVIEW_ALLOW_ADDDIR AGY_REVIEW_MAX_TOTAL_BYTES CODEX_MODEL CODEX_EFFORT AGY_MODEL " in
|
|
161
|
+
case " CODEX_SERVICE_TIER CODEX_HARD_TIMEOUT CODEX_REVIEW_MAX_TOTAL_BYTES AGY_HARD_TIMEOUT AGY_REVIEW_ALLOW_ADDDIR AGY_REVIEW_MAX_TOTAL_BYTES CODEX_MODEL CODEX_EFFORT AGY_MODEL JEV_MODEL " in
|
|
162
162
|
*" $1 "*) return 0 ;;
|
|
163
163
|
*) return 1 ;;
|
|
164
164
|
esac
|
|
@@ -258,7 +258,11 @@ aw_read_posture() {
|
|
|
258
258
|
AW_HOST_VALUE="$value"
|
|
259
259
|
AW_HOST_SOURCE="setting"
|
|
260
260
|
elif (( notify )); then
|
|
261
|
-
|
|
261
|
+
if [[ -n "$default" ]]; then
|
|
262
|
+
echo "warning: $key in bridge settings file '$file' is empty or carries a control byte — using the built-in default '$default'." >&2
|
|
263
|
+
else
|
|
264
|
+
echo "warning: $key in bridge settings file '$file' is empty or carries a control byte — using the manifest's default." >&2
|
|
265
|
+
fi
|
|
262
266
|
fi
|
|
263
267
|
fi
|
|
264
268
|
fi
|
|
@@ -479,8 +479,8 @@ describe('agy.sh — default model pin', () => {
|
|
|
479
479
|
// resolves identically in the repo layout and in the kit's bridges/ mirror layout.
|
|
480
480
|
const SETTINGS_HEADER = 'Settings file (KEY=VALUE, parsed never sourced; env wins over file, file wins over built-in default):';
|
|
481
481
|
const MANIFEST = JSON.parse(readFileSync(join(HERE, '..', 'capability.json'), 'utf8'));
|
|
482
|
-
const
|
|
483
|
-
|
|
482
|
+
const ALL_SETTINGS = [MANIFEST, ...['codex-cli-bridge', 'typesafe-jev-bridge'].map((bridge) =>
|
|
483
|
+
JSON.parse(readFileSync(join(HERE, '..', '..', bridge, 'capability.json'), 'utf8')))].flatMap((manifest) => manifest.settings ?? []);
|
|
484
484
|
const SETTINGS_CMD = 'agy-run';
|
|
485
485
|
const setEq = (got, want, msg) => assert.deepEqual([...got].sort(), [...want].sort(), msg);
|
|
486
486
|
const helpSection = (text, header) => {
|
|
@@ -519,11 +519,11 @@ describe('agy.sh — settings surface ⟷ manifest (D6, manifest-pinned)', () =>
|
|
|
519
519
|
|
|
520
520
|
const source = readFileSync(WRAPPER, 'utf8');
|
|
521
521
|
|
|
522
|
-
it('aw_settings_known carries exactly the UNION of
|
|
522
|
+
it('aw_settings_known carries exactly the UNION of three bridges settings keys', () => {
|
|
523
523
|
const m = source.match(/aw_settings_known\(\) \{\n case " ([^"]+) " in/);
|
|
524
524
|
assert.ok(m, 'aw_settings_known registry case not found');
|
|
525
|
-
assert.ok(ALL_SETTINGS.
|
|
526
|
-
setEq(m[1].trim().split(/\s+/), ALL_SETTINGS.map((s) => s.key), 'shell registry ⟷ manifest union');
|
|
525
|
+
assert.ok(ALL_SETTINGS.some((s) => s.key === 'JEV_MODEL'), 'the three-manifest union must include JEV_MODEL');
|
|
526
|
+
setEq(m[1].trim().split(/\s+/), ALL_SETTINGS.map((s) => s.key), 'shell registry ⟷ three-manifest union');
|
|
527
527
|
});
|
|
528
528
|
|
|
529
529
|
it('AW_SETTINGS_APPLIED equals the manifest appliesTo subset for this wrapper', () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"name": "antigravity-cli-bridge",
|
|
5
5
|
"kind": "execution-backend",
|
|
6
|
-
"version": "8.0.
|
|
6
|
+
"version": "8.0.2",
|
|
7
7
|
"provides": ["review", "probe"],
|
|
8
8
|
"posture": { "model": "Gemini 3.8 Flash (High)" },
|
|
9
9
|
"roles": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"receipt": "side effect — a successful review appends one JSON receipt line to <git dir>/agent-workflow-review-receipts.jsonl (AW_REVIEW_RECEIPTS overrides; plan/diff outside a git tree: warn + skip unless overridden): fingerprint = sha256 over the canonical uncommitted-state payload (staged diff + unstaged diff + untracked-not-ignored contents — the review-payload domain; never-committable untracked paths — character/block devices, FIFOs, sockets — are excluded from the domain entirely, untracked symlinks/directories ride as name-only notes) in code mode, the artifact-file sha256 in plan/diff mode; durationS = integer wall-clock seconds from CLI start through verdict parsing and the wrapper prints review duration: <n>s; blocking = the count of numbered items in the first ### Blocking section; artifactPath = the normalized realpath on plan/diff receipts only (repo-relative inside the work tree, absolute otherwise), while a double quote, backslash or control byte refuses pre-spend because the receipt encoder cannot carry it; verdict recorded verbatim from the mandated '### Verdict' section (SHIP / SHIP WITH NITS / REWORK); grounded = whether a NON-EMPTY --facts payload was supplied (code mode refuses pre-spend without one — no run, no receipt — unless --ungrounded/AGY_PROBE=1; in plan/diff an empty payload records grounded:false — fail-closed, the state gate rejects it), factsHash = sha256 of the facts payload; a continuation receipt is fresh:false (informational-only — it cannot attest the folded tree); probe = whether the run relaxed the quality guards (AGY_PROBE=1), written on EVERY receipt so it self-declares — the kit's review-state gate rejects a probe-marked receipt (a probe review never attests) and equally rejects an unmarked one (silence is not a declaration); posture = the ACTUAL run posture {model} (agy has no tier), written on EVERY receipt (D5) — the gate rejects a receipt with an absent/invalid posture (a pre-D5 wrapper minted it; re-run the review), one stderr banner line states the same posture, a one-off model (an explicitly empty AGY_MODEL included) refuses pre-spend unless AGY_PROBE=1, and a model string carrying control bytes refuses pre-spend in every mode; delivery = how the change set REACHED the model, currently emitted as 'inline' (the whole set rode one prompt — proven by construction) or 'fed' (a chunked feed whose per-part echo proof verified); REQUIRED on every agy code receipt and its ABSENCE is what stops a pre-fed-lane receipt attesting, while the gate accepts any well-formed declaration rather than a particular value; absent by construction on plan/diff/continuation receipts, which carry no change set; a run whose output carries NO recognized '### Verdict' section — empty output included — exits 4 with NO receipt (D4: a FAILED review to RE-RUN, never a fatal session error); when the dispatch nonce seam is supplied — the AW_REVIEW_NONCE environment value or its plain-argument equivalent --nonce <n> (one seam: the flag assigns the same value; supplying both with different values refuses pre-spend) — under the safe grammar [A-Za-z0-9._-]{1,64} (anything else refuses pre-spend), the wrapper first mints the finding MANIFEST {schema, backend, nonce, fingerprint, findings} beside the receipts file (agent-workflow-finding-manifest-<backend>-<nonce>.json; atomic, no-clobber — a byte-identical rewrite is an idempotent no-op, different bytes refuse loudly) ORDERED before the receipt append — a failed manifest write EXCLUDES the receipt append, so a nonce-supplied dispatch can never land a receipt without its readable manifest; a nonce-less invocation adds NO nonce field and mints NO finding manifest (the existing wrapperVersion field still changes with each bridge release); a write failure warns, never fails the review",
|
|
35
35
|
"notes": [
|
|
36
|
-
"transport: every review dispatch drives the CLI in --output-format json (plus --disable-slash-commands) and the returned envelope is parsed in node (bin/agy-envelope.mjs) — the operator-facing invocations and flags above do NOT change, and on a ZERO exit the wrapper still PRINTS the review text, never JSON. A missing or unreadable envelope on a zero exit is a loud failure with NO receipt, never a downgraded verdict and never a fallback to raw-stdout parsing; a non-zero CLI exit keeps its own code and message, and publishes the captured stdout unchanged from the SINGLE dispatch or the FINAL fed turn (which may therefore be a JSON or partial payload — the envelope is parsed only on a zero exit); an INTERMEDIATE feed turn is the exception, its output stays private (Invariant E) and its failure prints only a named error. Enforced by a PRE-SPEND capability probe, not a version floor: agy --help must advertise --output-format and --disable-slash-commands, node must be >= 22, and bin/agy-envelope.mjs must be present — otherwise the review refuses before any run is spent and names the missing capability",
|
|
36
|
+
"transport: every review dispatch drives the CLI in --output-format json (plus --disable-slash-commands) and the returned envelope is parsed in node (bin/agy-envelope.mjs) — the operator-facing invocations and flags above do NOT change, and on a ZERO exit the wrapper still PRINTS the review text, never JSON. A missing or unreadable envelope on a zero exit is a loud failure with NO receipt, never a downgraded verdict and never a fallback to raw-stdout parsing; a non-zero CLI exit keeps its own code and message, and publishes the captured stdout unchanged from the SINGLE dispatch or the FINAL fed turn (which may therefore be a JSON or partial payload — the envelope is parsed only on a zero exit); an INTERMEDIATE feed turn is the exception, its output stays private (Invariant E) and its failure prints only a named error. Enforced by a PRE-SPEND capability probe, not a version floor: agy --help must advertise --output-format and --disable-slash-commands, node must be >= 22.21, and bin/agy-envelope.mjs must be present — otherwise the review refuses before any run is spent and names the missing capability",
|
|
37
37
|
"pre-dispatch host-diff: before the FIRST dispatch of this bridge, diff the hosts of the services its manifest names against the live sandbox allow-list — a missing host is surfaced to the maintainer BEFORE dispatching, never fired into a known prompt",
|
|
38
38
|
"the review posture banner appends a banner-only source=model:<s> field — where the model came from: default, setting or environment — then a banner-only timeout=<duration> field — exactly the duration agy-run hands to timeout(1); the hard-timeout preflight fails CLOSED when no timeout/gtimeout binary exists (the wrapper refuses by name before any CLI run, so an uncapped review run can no longer happen), and neither field enters the receipt posture or the D5 banner↔receipt parity",
|
|
39
39
|
"quote the posture banner verbatim when labeling this dispatch — the banner is the machine-stated posture; a prose re-type drifts"
|
|
@@ -84,7 +84,7 @@ passthrough (it owns the posture). The service can still **stall on large/substa
|
|
|
84
84
|
(Issue-001), so keep reviews **focused**; the hard timeout is the guard.
|
|
85
85
|
|
|
86
86
|
**Host requirements, enforced BEFORE any run is spent.** Because the review reads agy's JSON
|
|
87
|
-
envelope in node, `agy-review` needs **Node ≥ 22** on `PATH`; and because it passes flags the CLI
|
|
87
|
+
envelope in node, `agy-review` needs **Node ≥ 22.21** on `PATH`; and because it passes flags the CLI
|
|
88
88
|
must honour, it probes `agy --help` for **`--output-format`** and **`--disable-slash-commands`**
|
|
89
89
|
first. A missing flag, an unreadable `agy --help`, a missing or too-old node, or a missing
|
|
90
90
|
`bin/agy-envelope.mjs` each refuse with a named cause and spend nothing. This is a **capability
|
|
@@ -18,7 +18,7 @@ agy --version # captured here from 1.1.13 — see the c
|
|
|
18
18
|
release that introduced each flag is not measurable from one installed build, so a guessed floor
|
|
19
19
|
would refuse working installs. What actually gates a review is a **capability probe** —
|
|
20
20
|
`agy-review` reads `agy --help` and refuses BEFORE spending a run unless the install advertises
|
|
21
|
-
both **`--output-format`** and **`--disable-slash-commands`**, plus **Node ≥ 22** on `PATH` (the
|
|
21
|
+
both **`--output-format`** and **`--disable-slash-commands`**, plus **Node ≥ 22.21** on `PATH` (the
|
|
22
22
|
review parses agy's JSON envelope in node) and the skill's own `bin/agy-envelope.mjs`. Each
|
|
23
23
|
refusal names the missing capability and the recovery. `agy-run` needs none of these.
|
|
24
24
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: codex-cli-bridge
|
|
3
3
|
description: Delegate work to the OpenAI Codex CLI (`codex`) under a ChatGPT subscription — run plan/instruction EXECUTION in a sandboxed workspace, or get a read-only ADVISORY review of a plan or working-tree diff — as a second delegated-execution backend beside Antigravity. Use when the user wants to hand a bounded coding task or plan to `codex exec`, get a second-opinion review from codex, install or authenticate Codex CLI, understand its sandbox/network/approval policy, drive codex efficiently from the main agent (exec vs review, resume, the commit boundary), bridge project context (`AGENTS.md`) into codex, or troubleshoot codex flags, models, auth, or its no-TTY headless behaviour.
|
|
4
4
|
metadata:
|
|
5
|
-
version: '6.0.
|
|
5
|
+
version: '6.0.2'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# codex-cli-bridge
|