chore: version packages

This commit is contained in:
Codeman maintainer
2026-09-04 14:01:20 +02:00
parent a81e87f440
commit 80626567b2
5 changed files with 20 additions and 61 deletions
-57
View File
@@ -1,57 +0,0 @@
---
'aicodeman': minor
---
CLI backends are now a data-driven registry instead of a hardcoded set of run modes. Every
CLI (Claude Code, Terminal/Shell, OpenCode, Codex, Gemini, Antigravity, Pi, Grok, DeepSeek
Harness and OMP) is a `CliEntry` in `src/config/cli-registry/`, and the code that used to
branch on a CLI's name now reads capability flags off that entry instead.
This is an **internal refactor with no behaviour change**: no new endpoints, no new settings,
no change to any request or response shape, and the spawn command every CLI receives is
byte-identical to what the hand-written builders produced. `test/cli-registry-spawn-golden.test.ts`
pins those command lines as literal strings, captured from the previous builders before they
were removed, and `test/location-overlay-commands.test.ts` does the same for every remote and
in-container pane command.
What the registry owns: binary discovery (search paths, version and identity probes), the
launch argv template, environment handling (exports, `tmux setenv` keys, the env-override
allowlist), the multi-user privileged-parameter and privileged-env-key clamps, the
remote/docker location overlays, and the behavioural capabilities the rest of the app reads
(`isExternalCliMode`, `isAltScreenStripMode`, `hooksAvailableForMode`, alt-screen strip class,
echo policy, transcript format, and friends). `codeman doctor`'s per-CLI rows are generated
from the same entries, so its version rules and the run modes' resolvers can no longer
disagree about whether a given binary counts as installed.
Registry data is resolved **at call time**, never frozen at module import: session-mode and
env-prefix validation, the doctor's tool list, and each resolver's search directories all
re-read the catalog, so a CLI enabled while the server is running moves every surface at once
rather than only the run menu.
Four user-visible changes, all small and all deliberate:
- `probeDockerCliVersion()` derives the in-container binary name from the registry rather
than assuming it equals the mode name. Only Claude reaches that path today, so nothing was
broken in practice, but `antigravity` runs `agy` and the assumption would not have survived
the next CLI that needs a version.
- The remote CLI version probe now covers **Grok and DeepSeek**, which the hardcoded map it
replaces simply omitted — its own comment said the rule was "every mode except shell", so
the two were an oversight from when those CLIs were added, and a remote session in either
mode reported no version at all.
- OMP now requires tmux like its seven siblings. `session.ts` carried a hand-written list of
modes with no direct-PTY fallback and omp was missing from it, even though CLAUDE.md's own
text says "all eight require tmux" — so an omp session whose mux creation failed silently
fell back to a direct PTY. `requiresMux` comes off the entry now, so the list cannot drift
from the rule again.
- `codeman doctor`'s CLI rows come from the registry, so Claude's install hint is now the
documented install command rather than a docs URL, five CLIs gain install hints they never
had, and the row order follows the catalog (Claude now sorts below tmux).
A user-editable `~/.codeman/clis.json` can override any stock entry or add a custom CLI. It
is READ-ONLY in this release — nothing writes it, so importing the registry has no filesystem
side effects. Config never contains shell text: an entry declares typed argv tokens, every
literal is validated against a safe-word pattern at load, and values resolve through named
patterns that live in code, so a `clis.json` cannot widen its own validation.
`test/cli-registry-no-id-branching.test.ts` fails the build if per-CLI-id branching reappears
outside the stock catalog, in any of its four shapes (`===`, `!==`, `switch`/`case`, and
`includes`).
+16
View File
@@ -1,5 +1,21 @@
# aicodeman
## 1.24.6
### Patch Changes
- CLI backends are now a data-driven registry (#347, @opticon454). Every run mode (Claude Code, Terminal/Shell, OpenCode, Codex, Gemini, Antigravity, Pi, Grok, DeepSeek Harness and OMP) is a `CliEntry` in `src/config/cli-registry/`: binary discovery (search dirs, version and identity probes), the launch argv template, environment handling, the multi-user privileged-parameter and privileged-env-key clamps, the remote and Docker pane commands, and the capability flags the rest of the app reads instead of branching on a CLI's name. `~/.codeman/clis.json` can override any stock entry or add a custom CLI; it is read-only in this release, must be mode 0600, and every reason it was ignored is now logged once on first load (`docs/cli-registry.md`). Config never contains shell text: entries declare typed argv tokens, literals are validated at load time, and values resolve through patterns named in code. Registry data resolves at call time rather than at module import, so a CLI enabled while the server runs moves every surface at once, and a guard test fails the build if per-CLI-id branching reappears outside the stock catalog.
This is an internal refactor. The spawn command every CLI receives is byte-identical to the previous hand-written builders, verified by pinned golden strings in the test suite and by diffing both implementations across 11,602 option combinations for all ten modes. Five small deliberate changes ride along: the in-container version probe derives the binary from the registry (`antigravity` runs `agy`), the remote version probe now covers Grok and DeepSeek, `codeman doctor`'s CLI rows are generated from the registry (Claude's install hint is the install command, five CLIs gain hints, the row order follows the catalog), OMP now requires tmux like its siblings instead of silently falling back to a direct PTY, and an OMP session's attach client now receives `COLORTERM=truecolor` like the other truecolor CLIs.
Remote sessions are no longer auto-revived after a clean agent exit (#355, @timkjr). The reconnect watcher could not tell a transport drop from a Ctrl-C, Ctrl-D or `exit` inside the remote CLI, so a clean exit relaunched a fresh agent (OpenCode and OMP started a new conversation every time; Claude only looked fine because its `--resume` fallback masked it). The watcher now revives a dead pane only when the durable remote tmux session is verifiably still alive, via a `has-session` probe over ssh, and an unreachable host means do not revive. A follow-up classifies that probe by exit status, since `tmux has-session` prints nothing on success and reading its stdout had marked every live session as gone, forgets the cached answer whenever the pane is seen alive again so a stale result cannot revive a later clean exit, and caps the probe at one in flight per session.
The test suite can no longer reach the production `~/.codeman` data dir (#356, @timkjr). `test/setup.ts` now points `CODEMAN_DATA_DIR` at a throwaway directory, which is the absolute override that bypasses the suite's temporary HOME when inherited from the shell, and every test that deletes a case tree goes through a containment gate that refuses paths outside the temporary HOME. A bare suite run had overwritten a real `remote-hosts.json` with a route test's fixture. The comments around it and CLAUDE.md's testing section now name that variable as the cause; `os.homedir()` itself does follow `$HOME`.
### Thanks
- @opticon454 for the CLI registry (#347), the phased resubmission of #343, and the review rounds that hardened it.
- @timkjr for the remote auto-revive fix (#355) and the test-isolation sweep (#356).
## 1.24.5
### Patch Changes
+1 -1
View File
@@ -75,7 +75,7 @@ When user says "COM":
CI runs `npm run check:lockfile` on every push/PR, so lockfile drift fails the build even if the `version-packages` script is bypassed.
**Version**: 1.24.5 (must match `package.json`)
**Version**: 1.24.6 (must match `package.json`)
## Project Overview
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "aicodeman",
"version": "1.24.5",
"version": "1.24.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "aicodeman",
"version": "1.24.5",
"version": "1.24.6",
"hasInstallScript": true,
"license": "MIT",
"workspaces": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "aicodeman",
"version": "1.24.5",
"version": "1.24.6",
"description": "Mission control for AI coding agents - run 20 autonomous agents with real-time monitoring and session persistence",
"type": "module",
"main": "dist/index.js",