agent-bios 0.20.0 → 0.21.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/DEPENDENCIES.md +3 -2
- package/README.md +25 -9
- package/claude/guides/cli-multi-model-workflow.md +6 -6
- package/claude/guides/gpt-prompting.md +151 -75
- package/codex/agents/frontier.toml +1 -1
- package/codex/agents/reviewer.toml +1 -1
- package/codex/agents/workhorse.toml +1 -1
- package/codex/guides/cli-multi-model-workflow.md +6 -6
- package/codex/guides/gpt-prompting.md +151 -75
- package/compose/app_bridge/scripts/bridge.py +8 -0
- package/compose/instructions_app.py +20 -2
- package/compose/instructions_install.py +34 -8
- package/compose/instructions_setup.py +4 -1
- package/docs/advanced-launch.md +1 -1
- package/docs/macos-linux.md +92 -0
- package/docs/recovery.md +1 -1
- package/docs/releases/0.20.1.md +76 -0
- package/docs/releases/0.21.0.md +101 -0
- package/docs/setup.md +7 -3
- package/docs/windows.md +23 -14
- package/install.sh +72 -41
- package/launch/agent-launch.toml +11 -9
- package/launch/provision-venv.sh +3 -2
- package/package.json +3 -2
- package/provenance.json +1 -1
- package/session-distill/distill.py +22 -2
- package/session-distill/runlib/declare.py +70 -3
- package/session-distill/runlib/dispatch.py +26 -20
- package/session-distill/runlib/gate.py +149 -11
- package/session-distill/runlib/packet.py +3 -2
- package/session-distill/runlib/stage_form.py +1 -1
- package/session-distill/runlib/stage_judge.py +8 -4
- package/session-distill/runlib/views.py +1 -1
- package/session-distill/schemas/run.schema.json +10 -1
- package/session-distill/seats.json +35 -60
- package/wrappers/claude-run.sh +10 -7
- package/wrappers/codex-helm.sh +8 -8
- package/wrappers/codex-run.sh +9 -6
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# agent-bios 0.20.1
|
|
2
|
+
|
|
3
|
+
Release changes relative to 0.20.0.
|
|
4
|
+
|
|
5
|
+
## Codex seats on GPT-6.2
|
|
6
|
+
|
|
7
|
+
The Codex catalogue now lists GPT-6.2 Astra and GPT-6.2 Sol as its current models
|
|
8
|
+
and calls GPT-6 Astra and GPT-6.1 Sol the previous generation. The shipped launch
|
|
9
|
+
profile's Codex column now binds:
|
|
10
|
+
|
|
11
|
+
| Seat | Codex |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| FRONTIER | `gpt-6.2-astra` · max |
|
|
14
|
+
| HELM | `gpt-6.2-sol` · xhigh |
|
|
15
|
+
| WORKHORSE | `gpt-6.2-sol` · high |
|
|
16
|
+
| SWEEP | `gpt-6-luna` · max (unchanged) |
|
|
17
|
+
|
|
18
|
+
The Claude column is unchanged. WORKHORSE keeps HELM's model and differs by effort
|
|
19
|
+
alone: the catalogue's other current model, `gpt-6.1-terra`, is described for visual
|
|
20
|
+
understanding and computer use rather than for that seat's coding work. The deep
|
|
21
|
+
reviewer that the Deep review and Session distill presets dispatch from a Claude
|
|
22
|
+
session is now `gpt-6.2-sol` at `ultra`. The Codex agent files and the `codex-helm`
|
|
23
|
+
defaults follow the same bindings.
|
|
24
|
+
|
|
25
|
+
## The GPT prompting guide covers GPT-6.2
|
|
26
|
+
|
|
27
|
+
The guide was re-derived from the vendor's documents before the bindings moved, and
|
|
28
|
+
its Korean reference follows. A GPT-6.2 section states what the vendor observes on
|
|
29
|
+
6.2 Astra and Sol: more concise output by default, final answers that must stand on
|
|
30
|
+
their own, and how to state completion and coding expectations. It also states what
|
|
31
|
+
changes in the API from 6.2:
|
|
32
|
+
|
|
33
|
+
- editing earlier history drops the reasoning carried after it;
|
|
34
|
+
- top-level `instructions` are placed after `input`, past the cache, and billed as
|
|
35
|
+
uncached input, so reusable instructions belong in the first `developer` message;
|
|
36
|
+
- `prompt_cache_options.ttl` replaces `prompt_cache_retention`.
|
|
37
|
+
|
|
38
|
+
The 6.2 models' instructions in the Codex client skip new tests unless a test is
|
|
39
|
+
requested, required by the repository, or needed for a specific regression, so a 6.2
|
|
40
|
+
run that must add tests has to say so.
|
|
41
|
+
|
|
42
|
+
The guide also drops claims its sources no longer make and corrects one they
|
|
43
|
+
contradict: a conversation that changed its reasoning effort mid-way can still use
|
|
44
|
+
automatic compaction through `context_management`.
|
|
45
|
+
|
|
46
|
+
## Session distill
|
|
47
|
+
|
|
48
|
+
The driver's Codex pin moves to codex-cli 0.171.0, because the versioned 0.167.0 binary
|
|
49
|
+
it named is no longer installed after the Codex CLI's update. Its Codex seats (S6's second judge, S7b and S9b)
|
|
50
|
+
move to `gpt-6.2-sol`, and each seat's context window is read from the catalogue the
|
|
51
|
+
0.171.0 binary carries. Two things a Codex call shows about itself have not been
|
|
52
|
+
observed on 0.171.0: the trace shape its capture reads, and the built-in skills the
|
|
53
|
+
host loads. The first Codex call of a run is that observation, and a capture that
|
|
54
|
+
differs is refused by name. The Codex host allowance is not measured on 0.171.0
|
|
55
|
+
either; only the stage that reads session windows (S3, a Claude seat) needs one, so
|
|
56
|
+
it holds no Codex stage back. The checkout's re-pin runbook lists these measurements
|
|
57
|
+
and the others a model change requires. Running the driver still requires an
|
|
58
|
+
agent-bios checkout.
|
|
59
|
+
|
|
60
|
+
## Upgrading
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm i -g agent-bios@0.20.1
|
|
64
|
+
agent-bios install
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Install the exact version: right after a release, `@latest` can still resolve to the
|
|
68
|
+
previous one.
|
|
69
|
+
|
|
70
|
+
## Not established by this release
|
|
71
|
+
|
|
72
|
+
No call was made to a GPT-6.2 model for this release. The instruction-behavior
|
|
73
|
+
benchmark has not been re-run on the new bindings. The driver has made no Codex call on
|
|
74
|
+
codex-cli 0.171.0, so neither the capture's trace shape nor the host's built-in skills
|
|
75
|
+
are confirmed there, and its Codex host allowance is unmeasured. OpenAI's Codex documentation lists the GPT-6.2 models for
|
|
76
|
+
the Codex app and CLI and not for the IDE extension.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# agent-bios 0.21.0
|
|
2
|
+
|
|
3
|
+
Release changes relative to 0.20.1.
|
|
4
|
+
|
|
5
|
+
## macOS and Linux install without npm, Node.js or a preinstalled Python
|
|
6
|
+
|
|
7
|
+
The README's macOS and Linux install command is unchanged, and from this release on it
|
|
8
|
+
needs only `curl`, `tar` and `bash`. The package's command was always `install.sh`, so
|
|
9
|
+
Node.js never ran agent-bios; npm only fetched the package and checked it. The script
|
|
10
|
+
behind the command now does both itself:
|
|
11
|
+
|
|
12
|
+
- It reads the npm registry's latest release. It extracts the package only after the
|
|
13
|
+
package matches the registry's SHA-512, the check npm makes.
|
|
14
|
+
- An existing `python3` that is CPython 3.12 or newer, and not a virtual environment,
|
|
15
|
+
is used.
|
|
16
|
+
- Otherwise a pinned CPython 3.13.18 build from python-build-standalone is downloaded
|
|
17
|
+
into `~/.local/share/agent-bios-standalone`. It is used only after its size and
|
|
18
|
+
SHA-256 match. Builds are pinned for Apple silicon and Intel Macs and for x86_64 and
|
|
19
|
+
ARM64 Linux with glibc.
|
|
20
|
+
- It writes the `agent-bios` command to `~/.local/bin`. When that folder is not on
|
|
21
|
+
PATH, it appends one marked block to the shell's startup file.
|
|
22
|
+
- It opens setup, or refreshes an existing work environment with its saved choices.
|
|
23
|
+
|
|
24
|
+
Options are environment variables, since `curl | bash` passes no arguments.
|
|
25
|
+
`AGENT_BIOS_NO_MODIFY_PATH=1` prints the PATH line instead of adding it.
|
|
26
|
+
`AGENT_BIOS_PYTHON` selects an interpreter. The others are in
|
|
27
|
+
[macOS and Linux installation](../macos-linux.md).
|
|
28
|
+
|
|
29
|
+
Running the command again is the update, and `agent-bios update` prints it.
|
|
30
|
+
`sh ~/.local/share/agent-bios-standalone/uninstall.sh` removes the work environment,
|
|
31
|
+
the command, the PATH block and the program folder. Personal instructions, learning
|
|
32
|
+
records, session records and any Python outside that folder are kept.
|
|
33
|
+
|
|
34
|
+
An npm installation is never removed. When both exist, the command says which
|
|
35
|
+
`agent-bios` a terminal runs afterwards and how to keep one:
|
|
36
|
+
`npm uninstall -g agent-bios` removes the npm one.
|
|
37
|
+
|
|
38
|
+
The route applies to releases whose `package.json` declares `"agentBiosStandalone": 1`,
|
|
39
|
+
and 0.21.0 is the first. For an earlier release, such as one pinned with
|
|
40
|
+
`AGENT_BIOS_VERSION`, the command installs with npm as before or names the missing
|
|
41
|
+
prerequisite.
|
|
42
|
+
|
|
43
|
+
## One interpreter for every Python step
|
|
44
|
+
|
|
45
|
+
`AGENT_BIOS_PYTHON`, which the standalone command sets, holds these to one interpreter:
|
|
46
|
+
|
|
47
|
+
- `install.sh`
|
|
48
|
+
- the `agent-launch` launcher it deploys, which records the interpreter and exports it
|
|
49
|
+
- the Claude and Codex shell adapters
|
|
50
|
+
- the managed-environment provisioner
|
|
51
|
+
- the dependency chooser's Python row
|
|
52
|
+
- the app bridge, whose registration records it because the app starts the bridge
|
|
53
|
+
without it
|
|
54
|
+
|
|
55
|
+
A PATH lookup no longer decides which Python runs. With the variable unset, every one
|
|
56
|
+
of these resolves `python3` as before, and an existing launcher keeps its bytes. When
|
|
57
|
+
npm is absent, `agent-bios update --check` says that no registry was asked, instead of
|
|
58
|
+
reporting an unreachable one.
|
|
59
|
+
|
|
60
|
+
## Windows installation command
|
|
61
|
+
|
|
62
|
+
The Windows installation page's PowerShell command is now
|
|
63
|
+
`irm <installation page>/install.ps1 | iex`, shown verbatim in the README. The
|
|
64
|
+
Command Prompt and Run-box form wraps the same line in `powershell -c`. The address
|
|
65
|
+
serves a short first stage. It downloads the promoted Windows installer, checks the
|
|
66
|
+
SHA-256 pinned for it, warns that the preview is unsigned, and runs it in the same
|
|
67
|
+
window, where the commands then work at once. The earlier long command keeps working.
|
|
68
|
+
Windows script releases are cut separately from npm releases, and the installation
|
|
69
|
+
page names the one it serves.
|
|
70
|
+
|
|
71
|
+
## Session distill
|
|
72
|
+
|
|
73
|
+
The driver's stage seats are now the launch profile's tiers rather than model names
|
|
74
|
+
of their own, so moving a tier's model moves the seats that use it. No stage sits on
|
|
75
|
+
SWEEP. Resolved against this profile, the seats are unchanged except S6's absence
|
|
76
|
+
sweeps, which move to WORKHORSE (`claude-sonnet-5-5` and `gpt-6.2-sol` at `high`). A
|
|
77
|
+
cross review must resolve to the other host. Every call is still reserved against S6's
|
|
78
|
+
remaining budget before it is sent. Running the driver still requires an agent-bios
|
|
79
|
+
checkout.
|
|
80
|
+
|
|
81
|
+
## Upgrading
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm i -g agent-bios@0.21.0
|
|
85
|
+
agent-bios install
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Install the exact version: right after a release, `@latest` can still resolve to the
|
|
89
|
+
previous one. On macOS and Linux, rerunning the README's install command installs this
|
|
90
|
+
release without npm instead.
|
|
91
|
+
|
|
92
|
+
## Not established by this release
|
|
93
|
+
|
|
94
|
+
The install command was qualified before and after its deployment on Linux x86_64 and
|
|
95
|
+
ARM64 and on Apple silicon and Intel macOS runners. Those runs installed a packed
|
|
96
|
+
checkout from a loopback registry, from a PATH without python, node or npm. Until this
|
|
97
|
+
release was published, no release in the real registry declared the route, so its
|
|
98
|
+
first install from the real registry is the publication's own check. Machines whose
|
|
99
|
+
management software restricts which programs run are not covered by those runners.
|
|
100
|
+
Whether the stronger S6 sweeps change its results, and how much they add to a run's
|
|
101
|
+
usage, is unmeasured, and the Codex host allowance remains unmeasured.
|
package/docs/setup.md
CHANGED
|
@@ -12,12 +12,13 @@ Commands below use the installed `agent-bios` CLI. From a source checkout, run
|
|
|
12
12
|
| Route | Requirements | Interface |
|
|
13
13
|
| --- | --- | --- |
|
|
14
14
|
| Codex app | A local task with command/file access on the intended machine, Bash, Python 3.12+ | Questions and effect review in the conversation; no extra Codex CLI or model login |
|
|
15
|
-
| Terminal | macOS or Linux, Bash, Python 3.12
|
|
15
|
+
| Terminal | macOS or Linux and an input/output terminal; the install command needs only curl, tar and Bash, the npm package Python 3.12+ and Node.js 18+/npm | Included Textual wizard |
|
|
16
16
|
| Automation | Bash, Python 3.12+, explicit machine commands | JSON inspection, review and results |
|
|
17
17
|
|
|
18
18
|
Host CLIs and their authentication are needed when you choose to launch them.
|
|
19
19
|
Node/npm are needed to obtain the npm package and for any selected capability that
|
|
20
|
-
uses them
|
|
20
|
+
uses them; the macOS and Linux install command obtains the same package without
|
|
21
|
+
them and supplies a Python when none is installed. Source acquisition through the app does not require npm. The app and
|
|
21
22
|
storage routes do not require every host CLI. Full versions,
|
|
22
23
|
purposes and provisioning boundaries are in [Dependencies](../DEPENDENCIES.md).
|
|
23
24
|
|
|
@@ -30,7 +31,10 @@ older installation mode.
|
|
|
30
31
|
|
|
31
32
|
## Guided terminal installation
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
On macOS or Linux, the README's one-line install command installs the latest
|
|
35
|
+
release without npm and opens setup ([macOS and Linux installation](macos-linux.md)).
|
|
36
|
+
|
|
37
|
+
With npm, install the exact package version, then start setup:
|
|
34
38
|
|
|
35
39
|
```bash
|
|
36
40
|
npm install -g agent-bios@0.19.0
|
package/docs/windows.md
CHANGED
|
@@ -31,19 +31,28 @@ Windows workflow builds and exercises this route on every change; the Windows
|
|
|
31
31
|
script release workflow publishes it as a GitHub release whose page carries the
|
|
32
32
|
one-line PowerShell command for that exact release.
|
|
33
33
|
|
|
34
|
-
The repository's GitHub Pages installation page also provides a
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
PowerShell
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
The repository's GitHub Pages installation page also provides a short command at
|
|
35
|
+
a fixed address: `irm <address>/install.ps1 | iex` in PowerShell, or the same
|
|
36
|
+
program behind `powershell -c` from the Command Prompt and the Run box. The address
|
|
37
|
+
serves a generated first stage, not the release bootstrap. Evaluated as text, the
|
|
38
|
+
first stage is not subject to the execution policy. It downloads the promoted
|
|
39
|
+
release's bootstrap from its immutable release asset, refuses it unless its SHA-256
|
|
40
|
+
matches the value pinned inside, relaxes the execution policy for the current
|
|
41
|
+
PowerShell process only, and invokes the checked file in that session, so the
|
|
42
|
+
installed commands work there at once; from the Command Prompt they work in a new
|
|
43
|
+
window. Because `irm | iex` cannot pass arguments, the installer's options are
|
|
44
|
+
environment variables: `AGENT_BIOS_INSTALL_ROOT` installs into another folder and
|
|
45
|
+
`AGENT_BIOS_NO_LAUNCH` skips opening setup. For a preview release the first stage
|
|
46
|
+
prints a warning and supplies `-AcceptUnsignedPreview` itself. The older form of
|
|
47
|
+
the command, which saves the address's script and invokes it with that flag, runs
|
|
48
|
+
the same first stage.
|
|
49
|
+
|
|
50
|
+
This convenience command trusts the HTTPS site for the first stage; it does not
|
|
51
|
+
check that script's hash before execution. The fixed address serves an explicitly
|
|
52
|
+
promoted release, so publishing another release does not silently change it.
|
|
53
|
+
Endpoint-protection products can treat evaluating downloaded text as suspicious.
|
|
54
|
+
On a managed machine that refuses it, use the release page's command, which saves
|
|
55
|
+
the bootstrap and checks it before invoking the file.
|
|
47
56
|
|
|
48
57
|
The same page carries a `curl` one-liner for macOS and Linux. That route is not
|
|
49
58
|
this Windows distribution: it installs the published npm package, which needs
|
|
@@ -64,7 +73,7 @@ it prints a warning when accepted; the manifest and asset hashes pinned inside
|
|
|
64
73
|
the script are still enforced. New preview release pages carry a tag-pinned command with that flag and a
|
|
65
74
|
bootstrap digest check before execution. Older preview pages may require the user
|
|
66
75
|
to compare the published bootstrap digest separately; their assets are not rewritten. Each published
|
|
67
|
-
command relaxes the execution policy for
|
|
76
|
+
command relaxes the execution policy for one PowerShell process, because a machine
|
|
68
77
|
nobody configured refuses scripts under the default Restricted policy. Neither
|
|
69
78
|
that relaxation nor anything installed edits the machine's saved policy, and a
|
|
70
79
|
policy imposed by a domain still refuses: the invocation's own error names it.
|
package/install.sh
CHANGED
|
@@ -94,6 +94,24 @@ PROJECTION_FAILED=0
|
|
|
94
94
|
# because the closing summary must not claim a clean removal that did not happen.
|
|
95
95
|
UNBACKED=0
|
|
96
96
|
|
|
97
|
+
# The interpreter every Python step below runs under. A command that bound one (the
|
|
98
|
+
# standalone route's ~/.local/bin/agent-bios exports AGENT_BIOS_PYTHON) is held to it,
|
|
99
|
+
# so a later PATH lookup cannot reach a different, older or missing python3; with the
|
|
100
|
+
# variable unset, PATH decides exactly as it always has.
|
|
101
|
+
if [ -n "${AGENT_BIOS_PYTHON:-}" ]; then
|
|
102
|
+
case "$AGENT_BIOS_PYTHON" in
|
|
103
|
+
/*) ;;
|
|
104
|
+
*) printf 'agent-bios: AGENT_BIOS_PYTHON must be an absolute path, not %s\n' "$AGENT_BIOS_PYTHON" >&2; exit 2 ;;
|
|
105
|
+
esac
|
|
106
|
+
if [ -d "$AGENT_BIOS_PYTHON" ] || [ ! -x "$AGENT_BIOS_PYTHON" ]; then
|
|
107
|
+
printf 'agent-bios: the bound Python %s is missing or not executable; rerun the install command to repair it\n' "$AGENT_BIOS_PYTHON" >&2
|
|
108
|
+
exit 2
|
|
109
|
+
fi
|
|
110
|
+
PY="$AGENT_BIOS_PYTHON"
|
|
111
|
+
else
|
|
112
|
+
PY=python3
|
|
113
|
+
fi
|
|
114
|
+
|
|
97
115
|
log() { printf '%s\n' "$*"; }
|
|
98
116
|
info() { printf ' %s\n' "$*"; }
|
|
99
117
|
run() { if [ "$DRY_RUN" = 1 ]; then printf ' [dry-run] %s\n' "$*"; else "$@"; fi; }
|
|
@@ -102,9 +120,9 @@ run() { if [ "$DRY_RUN" = 1 ]; then printf ' [dry-run] %s\n' "$*"; else "$@";
|
|
|
102
120
|
check_prereqs() {
|
|
103
121
|
local ok=0
|
|
104
122
|
command -v git >/dev/null 2>&1 || { log "missing prerequisite: git"; ok=1; }
|
|
105
|
-
command -v
|
|
106
|
-
if command -v
|
|
107
|
-
|
|
123
|
+
command -v "$PY" >/dev/null 2>&1 || { log "missing prerequisite: python3"; ok=1; }
|
|
124
|
+
if command -v "$PY" >/dev/null 2>&1; then
|
|
125
|
+
"$PY" -c 'import sys; sys.exit(0 if sys.version_info>=(3,12) else 1)' 2>/dev/null \
|
|
108
126
|
|| { log "python3 >= 3.12 required (tomllib)"; ok=1; }
|
|
109
127
|
fi
|
|
110
128
|
command -v zsh >/dev/null 2>&1 || log "note: zsh not found; the shell hook targets zsh"
|
|
@@ -189,7 +207,7 @@ selection_args() { # -> SEL_ARGS
|
|
|
189
207
|
# not cover is treated exactly like a file a later release withdrew.
|
|
190
208
|
selected_skills() {
|
|
191
209
|
selection_args
|
|
192
|
-
|
|
210
|
+
"$PY" "$REPO/compose/assemble.py" --selected-skills --state-dir "$STATE_DIR" \
|
|
193
211
|
${SEL_ARGS[@]+"${SEL_ARGS[@]}"}
|
|
194
212
|
}
|
|
195
213
|
|
|
@@ -255,7 +273,7 @@ prune_stale_skills() {
|
|
|
255
273
|
# run cannot leave the user with neither the change nor its backup.
|
|
256
274
|
prune_backups() {
|
|
257
275
|
[ -f "$REPO/compose/prune-backups.py" ] || return 0
|
|
258
|
-
|
|
276
|
+
"$PY" "$REPO/compose/prune-backups.py" --state-dir "$STATE_DIR" \
|
|
259
277
|
--claude-dir "$CLAUDE_DIR" --codex-dir "$CODEX_DIR" \
|
|
260
278
|
$([ "$DRY_RUN" = 1 ] && echo --dry-run) || log "note: backup pruning skipped"
|
|
261
279
|
}
|
|
@@ -275,7 +293,7 @@ prune_backups() {
|
|
|
275
293
|
# is a broken payload rather than a configuration a user might have.
|
|
276
294
|
author_only_guides() {
|
|
277
295
|
local out
|
|
278
|
-
if ! out=$(
|
|
296
|
+
if ! out=$("$PY" - "$REPO" <<'PY'
|
|
279
297
|
import pathlib, sys
|
|
280
298
|
root = pathlib.Path(sys.argv[1])
|
|
281
299
|
sys.path.insert(0, str(root / "compose"))
|
|
@@ -340,7 +358,7 @@ prune_withheld() {
|
|
|
340
358
|
# dropped later by re-assembling, with no need to know which bytes came from where; and uninstall
|
|
341
359
|
# can take everything of ours because nothing of theirs is mixed into it.
|
|
342
360
|
all_domains_csv() {
|
|
343
|
-
|
|
361
|
+
"$PY" -c "import json,sys;print(','.join(sorted(json.load(open(sys.argv[1]))['domains'])))" \
|
|
344
362
|
"$REPO/compose/domains.json"
|
|
345
363
|
}
|
|
346
364
|
|
|
@@ -355,7 +373,7 @@ assemble_instructions() {
|
|
|
355
373
|
local prior="$PRIOR_MANIFEST"
|
|
356
374
|
[ "$DRY_RUN" = 1 ] && prior="$MANIFEST"
|
|
357
375
|
[ -f "$prior" ] && args+=(--prior-manifest "$prior")
|
|
358
|
-
|
|
376
|
+
"$PY" "$REPO/compose/assemble.py" "${args[@]}" || rc=$?
|
|
359
377
|
if [ "$rc" = 2 ]; then
|
|
360
378
|
ENTRY_NEEDS_ACTION=1
|
|
361
379
|
log "entry file needs user action (import line missing); central content will not load until it is added"
|
|
@@ -383,7 +401,7 @@ assemble_instructions() {
|
|
|
383
401
|
local source_guides="$REPO/claude/guides" codex_guides="$REPO/codex/guides"
|
|
384
402
|
manifest_guide_members() {
|
|
385
403
|
# Pin the installed resolver file independently of the selected content tree.
|
|
386
|
-
|
|
404
|
+
"$PY" - "$REPO/compose/assemble.py" "$1" "$2" <<'PY'
|
|
387
405
|
import pathlib
|
|
388
406
|
import sys
|
|
389
407
|
|
|
@@ -459,7 +477,7 @@ migrate_state() {
|
|
|
459
477
|
# tomllib-validated before any write. Modes: merge | check | remove.
|
|
460
478
|
codex_config_additions() {
|
|
461
479
|
AB_MODE="$1" AB_CODEX_DIR="$CODEX_DIR" AB_FRAGMENT="$REPO/codex/config-additions.toml" \
|
|
462
|
-
AB_BACKUP="${BACKUP_DIR:-}" AB_DRY="$DRY_RUN"
|
|
480
|
+
AB_BACKUP="${BACKUP_DIR:-}" AB_DRY="$DRY_RUN" "$PY" - <<'PY'
|
|
463
481
|
import os, pathlib, sys, tomllib
|
|
464
482
|
|
|
465
483
|
mode = os.environ["AB_MODE"]
|
|
@@ -601,7 +619,7 @@ PY
|
|
|
601
619
|
# need it. launch/agent-launch.toml is the single source for both the command
|
|
602
620
|
# that gates a route and the install line offered here.
|
|
603
621
|
capability_table() {
|
|
604
|
-
|
|
622
|
+
"$PY" - "$REPO/launch/agent-launch.toml" <<'PY'
|
|
605
623
|
import sys, tomllib
|
|
606
624
|
# `${backend}` means "the CLI of the host this capability offers on". Resolved HERE because
|
|
607
625
|
# the probe below runs `command -v` on whatever this prints, and the literal sentinel is not
|
|
@@ -681,7 +699,7 @@ migrate_user_presets() {
|
|
|
681
699
|
local dst="$LAUNCH_DIR/profiles.toml"
|
|
682
700
|
local user="$LAUNCH_DIR/$USER_PRESETS_NAME"
|
|
683
701
|
[ -f "$dst" ] || return 0
|
|
684
|
-
|
|
702
|
+
"$PY" - "$src" "$dst" "$user" "$DRY_RUN" <<'PY' || { log "user preset migration failed; not overwriting $LAUNCH_DIR/profiles.toml"; return 1; }
|
|
685
703
|
import os, pathlib, re, sys, tomllib
|
|
686
704
|
|
|
687
705
|
src, dst, user, dry_run = pathlib.Path(sys.argv[1]), pathlib.Path(sys.argv[2]), pathlib.Path(sys.argv[3]), sys.argv[4] == "1"
|
|
@@ -767,9 +785,9 @@ migrate_learnings() {
|
|
|
767
785
|
[ "$DRY_RUN" = 1 ] && dry=(--dry-run) || dry=()
|
|
768
786
|
# ${dry[@]+...}: expanding an empty array as "${dry[@]}" is an unbound-variable
|
|
769
787
|
# error under `set -u` on bash 3.2 (macOS default) and would abort the install.
|
|
770
|
-
|
|
788
|
+
"$PY" "$script" --host claude --config-dir "$CLAUDE_DIR" "${sel[@]}" ${dry[@]+"${dry[@]}"} \
|
|
771
789
|
|| info "learnings migrate (claude) skipped"
|
|
772
|
-
|
|
790
|
+
"$PY" "$script" --host codex --config-dir "$CODEX_DIR" "${sel[@]}" ${dry[@]+"${dry[@]}"} \
|
|
773
791
|
|| info "learnings migrate (codex) skipped"
|
|
774
792
|
}
|
|
775
793
|
|
|
@@ -915,7 +933,7 @@ cmd_install() {
|
|
|
915
933
|
else
|
|
916
934
|
local projection_log
|
|
917
935
|
projection_log="$(mktemp "${TMPDIR:-/tmp}/instructions-projection.XXXXXX")"
|
|
918
|
-
if
|
|
936
|
+
if "$PY" "$REPO/compose/instructions-state.py" project --repo "$REPO" >"$projection_log" 2>&1; then
|
|
919
937
|
info "instructions-status projected"
|
|
920
938
|
rm -f "$projection_log"
|
|
921
939
|
else
|
|
@@ -930,7 +948,7 @@ cmd_install() {
|
|
|
930
948
|
# package.json (version + releaseDate) — distinct from the instructions content
|
|
931
949
|
# version. Best-effort: a failure here never fails the install.
|
|
932
950
|
if [ "$DRY_RUN" != 1 ]; then
|
|
933
|
-
if
|
|
951
|
+
if "$PY" - "$REPO/package.json" "$STATE_DIR/version.json" "$REPO/provenance.json" \
|
|
934
952
|
"$([ -e "$REPO/.git" ] && echo clone || echo package)" <<'PY' 2>/dev/null
|
|
935
953
|
import json, os, sys
|
|
936
954
|
pkg = json.load(open(sys.argv[1]))
|
|
@@ -1031,7 +1049,7 @@ cmd_verify() {
|
|
|
1031
1049
|
# Instructions surfaces are selection-derived, not repo-identical, so verify reads the assembled
|
|
1032
1050
|
# shape rather than byte-comparing against the repo. The entry file is user-owned — READ-check
|
|
1033
1051
|
# the import line, never rewrite it.
|
|
1034
|
-
|
|
1052
|
+
"$PY" "$REPO/compose/check-domains.py" >/dev/null 2>&1 && info "domains gate OK" || { log "domains gate FAILED"; fail=1; }
|
|
1035
1053
|
verify_present "$CLAUDE_DIR/central/bundle.md" || fail=1
|
|
1036
1054
|
if grep -qF '@central/bundle.md' "$CLAUDE_DIR/CLAUDE.md" 2>/dev/null; then
|
|
1037
1055
|
info "entry import line present"
|
|
@@ -1088,7 +1106,7 @@ cmd_verify() {
|
|
|
1088
1106
|
for lang in en ko ja; do
|
|
1089
1107
|
verify_match "$REPO/launch/i18n/$lang.toml" "$LAUNCH_DIR/i18n/$lang.toml" || fail=1
|
|
1090
1108
|
done
|
|
1091
|
-
|
|
1109
|
+
"$PY" - "$CODEX_DIR/agents" <<'PY' && info "agent TOMLs OK" || fail=1
|
|
1092
1110
|
import sys, pathlib, tomllib
|
|
1093
1111
|
root = pathlib.Path(sys.argv[1])
|
|
1094
1112
|
required = {"frontier.toml", "workhorse.toml", "sweep.toml", "reviewer.toml"}
|
|
@@ -1221,7 +1239,7 @@ cmd_uninstall() {
|
|
|
1221
1239
|
# the end went on saying "nothing of ours is left on this machine" — while the spans this
|
|
1222
1240
|
# step exists to remove were still in the user's settings.json, now pointing at hook files
|
|
1223
1241
|
# the next step deletes. A warning nobody reads is how the two came to disagree.
|
|
1224
|
-
|
|
1242
|
+
"$PY" "$REPO/compose/assemble.py" --remove-owned --claude-dir "$CLAUDE_DIR" \
|
|
1225
1243
|
--codex-dir "$CODEX_DIR" --state-dir "$STATE_DIR" ${DRY_RUN:+} \
|
|
1226
1244
|
$([ "$DRY_RUN" = 1 ] && echo --dry-run) \
|
|
1227
1245
|
|| { CLEANUP_FAILED=1; log "warning: could not remove assembler-owned regions"; }
|
|
@@ -1359,7 +1377,7 @@ archive_and_purge() {
|
|
|
1359
1377
|
# match here, which also claims a `notes.bak-old` the user saved by hand; these sit in
|
|
1360
1378
|
# directories we share with them and with other tools, so the name must carry the ownership.
|
|
1361
1379
|
if [ -f "$REPO/compose/prune-backups.py" ]; then
|
|
1362
|
-
|
|
1380
|
+
"$PY" "$REPO/compose/prune-backups.py" --list-owned \
|
|
1363
1381
|
--claude-dir "$CLAUDE_DIR" --codex-dir "$CODEX_DIR" >"$list" 2>/dev/null || : >"$list"
|
|
1364
1382
|
else
|
|
1365
1383
|
log "note: compose/prune-backups.py is absent, so loose backup copies are left where they are"
|
|
@@ -1436,7 +1454,7 @@ cmd_onboard() {
|
|
|
1436
1454
|
log "agent-bios onboarding — pick your domain packages (core + infra always install)"
|
|
1437
1455
|
local names=() line i=1 choice sel="" n picks
|
|
1438
1456
|
while IFS= read -r line; do names+=("$line"); done \
|
|
1439
|
-
< <(
|
|
1457
|
+
< <("$PY" -c "import json;print('\n'.join(sorted(json.load(open('$REPO/compose/domains.json'))['domains'])))")
|
|
1440
1458
|
[ "${#names[@]}" -ge 1 ] || { log "no domains found in compose/domains.json"; exit 1; }
|
|
1441
1459
|
if [ "$DOMAINS_SET" = 1 ]; then
|
|
1442
1460
|
# Non-interactive path, per this installer's input contract (stdin is
|
|
@@ -1480,7 +1498,7 @@ cmd_onboard() {
|
|
|
1480
1498
|
apply_rc=$?
|
|
1481
1499
|
set -e
|
|
1482
1500
|
if [ "$apply_rc" -ne 0 ]; then
|
|
1483
|
-
|
|
1501
|
+
"$PY" "$REPO/compose/instructions-state.py" record-apply \
|
|
1484
1502
|
--requested "$sel" --outcome install_failed >/dev/null 2>&1 || true
|
|
1485
1503
|
exit "$apply_rc"
|
|
1486
1504
|
fi
|
|
@@ -1494,7 +1512,7 @@ cmd_onboard() {
|
|
|
1494
1512
|
# probe" (no CLI/auth). Both leave the apply unproven, so both record as
|
|
1495
1513
|
# canary_failed — the tail carries which, so the panel's loud line does
|
|
1496
1514
|
# not send the operator to debug imports over an auth problem.
|
|
1497
|
-
|
|
1515
|
+
"$PY" "$REPO/compose/instructions-state.py" record-apply \
|
|
1498
1516
|
--requested "$sel" --outcome canary_failed \
|
|
1499
1517
|
--error-tail "canary exit $canary_rc$([ "$canary_rc" = 3 ] && printf ' (could not probe)')" \
|
|
1500
1518
|
>/dev/null 2>&1 || true
|
|
@@ -1508,7 +1526,7 @@ cmd_onboard() {
|
|
|
1508
1526
|
# selection was applied. That is the state this whole change exists to remove, so it
|
|
1509
1527
|
# cannot be the one still guarded by `|| true`.
|
|
1510
1528
|
record_log="$(mktemp "${TMPDIR:-/tmp}/instructions-record-apply.XXXXXX")"
|
|
1511
|
-
if !
|
|
1529
|
+
if ! "$PY" "$REPO/compose/instructions-state.py" record-apply \
|
|
1512
1530
|
--requested "$sel" --outcome applied >"$record_log" 2>&1; then
|
|
1513
1531
|
log "ONBOARDING INCOMPLETE: the instructions applied, but recording that outcome failed —"
|
|
1514
1532
|
log "the instructions panel would not show this selection as applied. Its own output:"
|
|
@@ -1530,7 +1548,7 @@ cmd_onboard() {
|
|
|
1530
1548
|
# registry cannot see this, which is why it went unnoticed three times.
|
|
1531
1549
|
json_field() { # $1=file $2=key
|
|
1532
1550
|
[ -f "$1" ] || return 1
|
|
1533
|
-
|
|
1551
|
+
"$PY" -c 'import json,sys
|
|
1534
1552
|
try:
|
|
1535
1553
|
v=json.load(open(sys.argv[1])).get(sys.argv[2])
|
|
1536
1554
|
except Exception:
|
|
@@ -1545,7 +1563,7 @@ json_true() { # exit 0 iff $2 in $1 is JSON true — json.dump writes '"k": tru
|
|
|
1545
1563
|
# with a space, so byte-matching a compact spelling read the real writer's
|
|
1546
1564
|
# output as false forever.
|
|
1547
1565
|
[ -f "$1" ] || return 1
|
|
1548
|
-
|
|
1566
|
+
"$PY" -c 'import json,sys
|
|
1549
1567
|
try:
|
|
1550
1568
|
v=json.load(open(sys.argv[1])).get(sys.argv[2])
|
|
1551
1569
|
except Exception:
|
|
@@ -1736,7 +1754,9 @@ refresh_update_cache() {
|
|
|
1736
1754
|
if ! pwd -P >/dev/null 2>&1; then
|
|
1737
1755
|
cd "$HOME" 2>/dev/null || cd /
|
|
1738
1756
|
fi
|
|
1757
|
+
local asked=0
|
|
1739
1758
|
if command -v npm >/dev/null 2>&1; then
|
|
1759
|
+
asked=1
|
|
1740
1760
|
# `|| latest=""` is not defensive noise: this file runs under `set -euo pipefail`,
|
|
1741
1761
|
# so an npm that exits non-zero (offline, firewalled, private registry down) makes
|
|
1742
1762
|
# the PIPELINE fail and `set -e` abort the function before it can record the
|
|
@@ -1747,9 +1767,13 @@ refresh_update_cache() {
|
|
|
1747
1767
|
mkdir -p "$STATE_DIR" || return 1
|
|
1748
1768
|
out="$STATE_DIR/update-check.json"
|
|
1749
1769
|
# Atomic: a half-written cache read by the launcher is a crash in the TUI.
|
|
1750
|
-
|
|
1770
|
+
"$PY" "$REPO/compose/write-update-cache.py" "$out" "$now" "$latest" "$(source_version)" || return 1
|
|
1751
1771
|
if [ -n "$latest" ]; then
|
|
1752
1772
|
log "update check: latest $latest (installed $(source_version))"
|
|
1773
|
+
elif [ "$asked" = 0 ]; then
|
|
1774
|
+
# The standalone route installs without npm, so its absence is the normal case
|
|
1775
|
+
# there; calling that an unreachable registry blamed a network nobody asked.
|
|
1776
|
+
log "update check: npm is not installed, so no registry was asked; recorded the attempt"
|
|
1753
1777
|
else
|
|
1754
1778
|
log "update check: could not reach the registry; recorded the attempt"
|
|
1755
1779
|
fi
|
|
@@ -1766,8 +1790,14 @@ cmd_update() {
|
|
|
1766
1790
|
if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" = 1 ]; then
|
|
1767
1791
|
cmd_install
|
|
1768
1792
|
else
|
|
1769
|
-
|
|
1793
|
+
"$PY" "$REPO/compose/instructions_install.py" --repo "$REPO" install --non-interactive
|
|
1770
1794
|
fi
|
|
1795
|
+
elif [ -n "${AGENT_BIOS_INSTALL_COMMAND:-}" ]; then
|
|
1796
|
+
# Set by the standalone command. Rerunning the install command is the update: it
|
|
1797
|
+
# installs the latest release beside this one and refreshes the private library.
|
|
1798
|
+
log "Installed by the install command. Update by running it again:"
|
|
1799
|
+
log " $(printf '%s' "$AGENT_BIOS_INSTALL_COMMAND" | tr -d '\000-\037\177')"
|
|
1800
|
+
log "It keeps your saved selection and personal instructions."
|
|
1771
1801
|
else
|
|
1772
1802
|
log "Installed as an npm package. Update with:"
|
|
1773
1803
|
log " npm install -g agent-bios@latest && agent-bios install"
|
|
@@ -1812,7 +1842,7 @@ agent-bios — manage private instructions content for explicitly activated sess
|
|
|
1812
1842
|
agent-bios status show what is installed and where
|
|
1813
1843
|
agent-bios cost the session cost / context meter (session-cost.py), from any
|
|
1814
1844
|
directory: agent-bios cost [--context [--budget N]] <transcript>
|
|
1815
|
-
agent-bios update git pull + reinstall (clone), or print the npm update line
|
|
1845
|
+
agent-bios update git pull + reinstall (clone), or print the npm or install-command update line
|
|
1816
1846
|
agent-bios update --check ask the registry for the latest version and cache it
|
|
1817
1847
|
for the launcher's badge; sends the package name and nothing
|
|
1818
1848
|
else, runs at most daily, AGENT_BIOS_UPDATE_CHECK=0 disables it
|
|
@@ -1846,6 +1876,7 @@ Flags: --dry-run print actions without changing anything
|
|
|
1846
1876
|
Env: AGENT_BIOS_STATE_DIR, AGENT_BIOS_INSTRUCTIONS_DIR (private runtime and user roots)
|
|
1847
1877
|
CLAUDE_CONFIG_DIR, CODEX_HOME (native host configuration)
|
|
1848
1878
|
AGENT_LAUNCH_VENV, ZDOTDIR
|
|
1879
|
+
AGENT_BIOS_PYTHON (absolute interpreter every Python step uses; default: python3 on PATH)
|
|
1849
1880
|
EOF
|
|
1850
1881
|
# DERIVED, not typed: the hardcoded pair went stale the moment a capability was renamed,
|
|
1851
1882
|
# and the name it still advertised selected a different capability than the one that
|
|
@@ -1871,37 +1902,37 @@ if [ $# -gt 0 ]; then shift; fi
|
|
|
1871
1902
|
# compatibility installation and its regression fixtures. No private operation
|
|
1872
1903
|
# falls through to a global writer.
|
|
1873
1904
|
if [ "$CMD" = "instructions" ] || [ "$CMD" = "corpus" ]; then
|
|
1874
|
-
exec
|
|
1905
|
+
exec "$PY" "$REPO/compose/instructions.py" --repo "$REPO" "$@" <&3
|
|
1875
1906
|
fi
|
|
1876
1907
|
if [ "$CMD" = "shell" ]; then
|
|
1877
|
-
exec
|
|
1908
|
+
exec "$PY" "$REPO/launch/shell_integration.py" "$@" <&3
|
|
1878
1909
|
fi
|
|
1879
1910
|
if [ "$CMD" = "understand" ]; then
|
|
1880
|
-
exec
|
|
1911
|
+
exec "$PY" "$REPO/compose/instructions_understand.py" --repo "$REPO" "$@" <&3
|
|
1881
1912
|
fi
|
|
1882
1913
|
if [ "$CMD" = "app" ]; then
|
|
1883
|
-
exec
|
|
1914
|
+
exec "$PY" "$REPO/compose/instructions_app.py" --repo "$REPO" "$@" <&3
|
|
1884
1915
|
fi
|
|
1885
1916
|
if [ "$CMD" = "import" ]; then
|
|
1886
|
-
exec
|
|
1917
|
+
exec "$PY" "$REPO/compose/instructions_import.py" --repo "$REPO" "$@" <&3
|
|
1887
1918
|
fi
|
|
1888
1919
|
if [ "$CMD" = "setup" ]; then
|
|
1889
|
-
if ! command -v
|
|
1920
|
+
if ! command -v "$PY" >/dev/null 2>&1 || ! "$PY" -c 'import sys; sys.exit(sys.version_info < (3, 12))' </dev/null; then
|
|
1890
1921
|
log "Python 3.12 or newer is required for conversation setup."
|
|
1891
1922
|
log "Install Python with your operating system package manager, then rerun this command."
|
|
1892
1923
|
exit 1
|
|
1893
1924
|
fi
|
|
1894
|
-
exec
|
|
1925
|
+
exec "$PY" "$REPO/compose/instructions_setup_cli.py" --repo "$REPO" "$@" <&3
|
|
1895
1926
|
fi
|
|
1896
1927
|
if [ "${AGENT_BIOS_LEGACY_INSTALL:-0}" != 1 ]; then
|
|
1897
1928
|
case "$CMD" in
|
|
1898
1929
|
install|onboard|verify|status|uninstall|migrate|reset)
|
|
1899
|
-
if ! command -v
|
|
1930
|
+
if ! command -v "$PY" >/dev/null 2>&1 || ! "$PY" -c 'import sys; sys.exit(sys.version_info < (3, 12))' </dev/null; then
|
|
1900
1931
|
log "Python 3.12 or newer is required for the installer and dependency chooser."
|
|
1901
1932
|
log "Install Python with your operating system package manager, then rerun this command."
|
|
1902
1933
|
exit 1
|
|
1903
1934
|
fi
|
|
1904
|
-
exec
|
|
1935
|
+
exec "$PY" "$REPO/compose/instructions_install.py" --repo "$REPO" "$CMD" "$@" <&3
|
|
1905
1936
|
;;
|
|
1906
1937
|
esac
|
|
1907
1938
|
fi
|
|
@@ -1914,8 +1945,8 @@ fi
|
|
|
1914
1945
|
if [ "$CMD" = "learn" ]; then
|
|
1915
1946
|
collector="$REPO/learn/collect-learning.py"
|
|
1916
1947
|
[ -f "$collector" ] || { log "learn: collector missing at $collector"; exit 1; }
|
|
1917
|
-
learning_python="
|
|
1918
|
-
if !
|
|
1948
|
+
learning_python="$PY"
|
|
1949
|
+
if ! "$PY" -c 'from jsonschema import Draft202012Validator' </dev/null >/dev/null 2>&1; then
|
|
1919
1950
|
learning_python="${AGENT_LAUNCH_VENV:-$HOME/.local/share/agent-launch/venv}/bin/python"
|
|
1920
1951
|
if [ ! -x "$learning_python" ] || ! "$learning_python" -c 'from jsonschema import Draft202012Validator' </dev/null >/dev/null 2>&1; then
|
|
1921
1952
|
log "learn: JSON Schema support is missing; select jsonschema in agent-bios install --interactive."
|
|
@@ -1932,7 +1963,7 @@ fi
|
|
|
1932
1963
|
if [ "$CMD" = "cost" ]; then
|
|
1933
1964
|
meter="$REPO/session-cost.py"
|
|
1934
1965
|
[ -f "$meter" ] || { log "cost: meter missing at $meter"; exit 1; }
|
|
1935
|
-
exec
|
|
1966
|
+
exec "$PY" "$meter" "$@" <&3
|
|
1936
1967
|
fi
|
|
1937
1968
|
|
|
1938
1969
|
WITH=""
|