antechamber 1.0.41 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +88 -141
  3. package/bin/opencode-antechamber +14 -4
  4. package/dist/cli.d.ts +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/commands/context.d.ts +5 -2
  7. package/dist/commands/context.js +8 -4
  8. package/dist/commands/doctor.js +4 -3
  9. package/dist/commands/setup.js +9 -28
  10. package/dist/config.d.ts +6 -2
  11. package/dist/config.js +18 -4
  12. package/dist/latency.d.ts +10 -0
  13. package/dist/latency.js +115 -0
  14. package/dist/misc-routes.js +2 -10
  15. package/dist/route-services.d.ts +0 -2
  16. package/dist/routes-v1.d.ts +1 -1
  17. package/dist/routes-v1.js +29 -418
  18. package/dist/routes-v2.js +1 -1
  19. package/dist/self-update.d.ts +2 -1
  20. package/dist/self-update.js +5 -1
  21. package/dist/server.d.ts +1 -3
  22. package/dist/server.js +9 -12
  23. package/dist/session-store.d.ts +12 -10
  24. package/dist/session-store.js +238 -128
  25. package/dist/session-tree.js +2 -2
  26. package/dist/sse.d.ts +0 -2
  27. package/dist/sse.js +13 -46
  28. package/dist/tool-map.js +1 -3
  29. package/dist/work-status.js +1 -1
  30. package/extensions/antechamber/README.md +100 -0
  31. package/extensions/antechamber/bin/opencode-antechamber +42 -0
  32. package/extensions/{omo-dag/docs/DESIGN.md → antechamber/docs/GRAPH.md} +5 -5
  33. package/extensions/{omo-work/docs/DESIGN.md → antechamber/docs/WORK.md} +3 -3
  34. package/extensions/antechamber/package.json +60 -0
  35. package/extensions/{omo-dag → antechamber}/panel/index.html +8 -1
  36. package/extensions/antechamber/panel/main.js +261 -0
  37. package/extensions/antechamber/runtime/launcher.js +201 -0
  38. package/extensions/antechamber/service/main.js +884 -0
  39. package/package.json +75 -26
  40. package/extensions/omo-compat/README.md +0 -48
  41. package/extensions/omo-compat/icon.svg +0 -1
  42. package/extensions/omo-compat/package.json +0 -43
  43. package/extensions/omo-dag/README.md +0 -167
  44. package/extensions/omo-dag/package.json +0 -33
  45. package/extensions/omo-dag/panel/main.js +0 -176
  46. package/extensions/omo-dag/service/main.js +0 -457
  47. package/extensions/omo-work/README.md +0 -88
  48. package/extensions/omo-work/package.json +0 -30
  49. package/extensions/omo-work/service/main.js +0 -149
  50. /package/extensions/{omo-dag → antechamber}/icon.svg +0 -0
  51. /package/extensions/{omo-work → antechamber}/status/index.html +0 -0
  52. /package/extensions/{omo-work → antechamber}/status/main.js +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,103 @@ and this project uses [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.0.1] - 2026-11-11
11
+
12
+ - test: remove two races the v2 release run hit
13
+
14
+ ## [2.0.0] - 2026-11-11
15
+
16
+ ### Added
17
+
18
+ - **One OpenChamber extension for everything.** `extensions/antechamber` replaces OmO Graph, OmO Work and OmO
19
+ Compatibility: the Graph rail panel and page, the Work Status section and the OmO tool-card headers come in one
20
+ package, behind one approval. Install it from `https://github.com/eliottness/antechamber` (the repository root is the
21
+ extension; `#extension/antechamber` also works), then
22
+ set Settings → OpenCode CLI to its `bin/opencode-antechamber` (the Graph panel's settings show the path). On its
23
+ first start the launcher installs, with Bun, the antechamber release the extension's version names and the OmO
24
+ that release pins, into `~/.antechamber/runtime/<version>`; the extension's service installs it ahead of time when a
25
+ panel opens. Updating the extension in Settings → Extensions updates antechamber and OmO together, and OpenChamber's
26
+ own Update action points there. `ANTECHAMBER_RUNTIME_DIR` and `ANTECHAMBER_RUNTIME_SPEC` move or replace the runtime.
27
+ - Warn when the event loop is blocked for more than 250 ms or an HTTP request takes more than 1000 ms.
28
+ Configure these thresholds with `ANTECHAMBER_EVENT_LOOP_LAG_MS` and `ANTECHAMBER_SLOW_REQUEST_MS`.
29
+ Request warnings use route patterns and omit query strings and path identifiers.
30
+
31
+ ### Removed
32
+
33
+ - **Breaking:** OpenChamber 1.x frontend support. OpenChamber **2.3.2+** is now required.
34
+ The following legacy routes now use the ordinary 404 response; `/global/health`,
35
+ the 2.x event streams, retained uncertain compatibility probes and the CLI
36
+ `--version` / `upgrade` commands remain available:
37
+ - `GET /session`
38
+ - `POST /session`
39
+ - `GET /session/status`
40
+ - `GET /project/current`
41
+ - `GET /project`
42
+ - `GET /config`
43
+ - `GET /global/config`
44
+ - `GET /provider`
45
+ - `GET /config/providers`
46
+ - `GET /experimental/session`
47
+ - `GET /question`
48
+ - `GET /permission`
49
+ - `GET /lsp`
50
+ - `GET /experimental/tool/ids`
51
+ - `GET /provider/auth`
52
+ - `GET /command`
53
+ - `GET /path`
54
+ - `GET /vcs`
55
+ - `GET /agent`
56
+ - `GET /find/file`
57
+ - `PATCH /config`
58
+ - `POST /experimental/control-plane/move-session`
59
+ - `GET /global/event`
60
+ - `GET /session/{sessionID}`
61
+ - `PATCH /session/{sessionID}`
62
+ - `DELETE /session/{sessionID}`
63
+ - `GET /session/{sessionID}/message`
64
+ - `GET /session/{sessionID}/todo`
65
+ - `POST /session/{sessionID}/prompt_async`
66
+ - `POST /session/{sessionID}/message`
67
+ - `POST /session/{sessionID}/abort`
68
+ - `POST /session/{sessionID}/fork`
69
+ - `POST /session/{sessionID}/revert`
70
+ - `POST /session/{sessionID}/unrevert`
71
+ - `POST /session/{sessionID}/summarize`
72
+ - `POST /session/{sessionID}/shell`
73
+ - `POST /session/{sessionID}/command`
74
+ - `POST /session/{sessionID}/share`
75
+ - `DELETE /session/{sessionID}/share`
76
+ - `POST /question/{requestID}/reply`
77
+ - `POST /question/{requestID}/reject`
78
+ - `POST /permission/{requestID}/reply`
79
+ - `PUT /auth/{providerID}`
80
+ - `POST /provider/{providerID}/oauth/authorize`
81
+ - `POST /provider/{providerID}/oauth/callback`
82
+ - `POST /global/upgrade`
83
+ - `GET /event`
84
+
85
+ ### Changed
86
+
87
+ - **Breaking:** the `omo-graph`, `omo-work` and `omo-compat` extensions and their `extension/omo-*` branches are
88
+ retired. Remove them in Settings → Extensions and install the `antechamber` extension; its Graph paths and Work
89
+ settings start empty because OpenChamber keys stored data by extension id.
90
+ - **Breaking:** the antechamber npm package depends on `omo-ai` at an exact version, and antechamber runs that OmO by
91
+ default. `ANTECHAMBER_PI_BINARY` still selects another agent, and `omo` on PATH is used only when the pinned one is
92
+ not installed.
93
+ - When the extension launches antechamber (`ANTECHAMBER_MANAGED=openchamber-extension`), `antechamber upgrade` and
94
+ `ANTECHAMBER_AUTO_UPDATE` refuse to touch npm and say to update the extension instead, and `antechamber doctor`
95
+ gives the same advice.
96
+ - Move the session registry to SQLite with WAL and row-level writes. Existing `sessions.json` registries migrate
97
+ automatically and remain on disk as timestamped backups. After a rollback to 1.x and back, the sessions 1.x created
98
+ or changed in the meantime are merged in.
99
+ - **Breaking:** antechamber now runs on Bun 1.4+ instead of Node.js. OmO already requires Bun, and under Bun the
100
+ server starts about 3 times faster and idles at about half the memory. `dist/cli.js` has a `bun` shebang,
101
+ `bin/opencode-antechamber` finds Bun on PATH, in `$BUN_INSTALL/bin` or in `~/.bun/bin`, and `antechamber doctor`
102
+ replaces its `node` check with a `bun` check. Launchers written by `antechamber setup --auto-update` now put
103
+ Bun's directory on PATH. A launcher written by an older version needs `bun` on OpenChamber's PATH; if it is not
104
+ there, rerun `antechamber setup --auto-update`. npm still installs and updates the package; building from source
105
+ still needs Node.js 22+.
106
+
10
107
  ## [1.0.41] - 2026-11-09
11
108
 
12
109
  ### Fixed
package/README.md CHANGED
@@ -27,8 +27,7 @@ an **external OpenCode server** and sessions run on OmO.
27
27
  - Tool calls rendered as native OpenChamber tool parts (bash, write, edit,
28
28
  and so on), including subagent/task cards.
29
29
  - Approvals and questions bridged through pi's extension-UI protocol.
30
- - Todo list bridging from pi/OmO's todo tool to OpenChamber's task panel
31
- (OpenChamber 1.x; on 2.x, the OmO Work section shows it by phase).
30
+ - OmO's todo list, grouped by phase, in the extension's OmO Work section.
32
31
  - Fork, revert, and unrevert backed by the agent's session tree, not a
33
32
  filesystem snapshot. Reverting changes conversation context only; it never
34
33
  touches files on disk.
@@ -38,10 +37,10 @@ an **external OpenCode server** and sessions run on OmO.
38
37
  ownership tracking for detached task-host processes it spawned.
39
38
  - Idle reaping and a live-process cap (`ANTECHAMBER_MAX_LIVE`) so long-running
40
39
  deployments don't accumulate agent processes.
41
- - Optional [OpenChamber extensions](#openchamber-extensions): **OmO Graph**
42
- draws the OmO sub-agents behind the open session as a live, clickable graph,
43
- and **OmO Work** (OpenChamber 2.x) shows the session's todo phases,
44
- monitors, eval cells and other background work in the Work Status panel.
40
+ - [One OpenChamber extension](#the-openchamber-extension) that installs and
41
+ updates antechamber and OmO for you, draws the OmO sub-agents behind the open
42
+ session as a live graph (**OmO Graph**), shows the todo phases and goal timer
43
+ in the Work Status panel (**OmO Work**), and titles OmO's tool cards.
45
44
 
46
45
  ## Supported backends
47
46
 
@@ -50,15 +49,17 @@ an **external OpenCode server** and sessions run on OmO.
50
49
  | [OmO](https://github.com/code-yeongyu/oh-my-openagent) (`omo`, package `omo-ai`) | **default and supported**: titles, steering, subagent cards, structured questions, and private task-host teardown are built and tested against it |
51
50
  | [pi](https://github.com/badlogic/pi-mono) (`@earendil-works/pi-coding-agent`) | opt-in, best effort: set `ANTECHAMBER_PI_BINARY=pi`; OmO-specific features are unavailable |
52
51
 
53
- antechamber spawns `omo` from `PATH` unless `ANTECHAMBER_PI_BINARY` names
54
- another executable (see [docs/configuration.md](docs/configuration.md)).
52
+ Each antechamber release depends on one exact `omo-ai` version and runs that
53
+ OmO, so the pair you get is the pair that was tested together.
54
+ `ANTECHAMBER_PI_BINARY` selects another executable; `omo` on `PATH` is the
55
+ fallback when the pinned one is not installed (see
56
+ [docs/configuration.md](docs/configuration.md)).
55
57
 
56
58
  ## Compatibility
57
59
 
58
60
  | OpenChamber | API | Status |
59
61
  |---|---|---|
60
- | >= 2.0.4 | v2 (`@opencode-ai/sdk/v2`) | primary target; antechamber advertises `opencode v2.1.0` on `--version` (OpenChamber 2.5.2 requires 2.1.0) |
61
- | 1.24.x | v1 | supported |
62
+ | >= 2.3.2 | v2 (`/api/*`) | supported; antechamber advertises `opencode v2.999.0` on `--version` |
62
63
  | other versions | - | not tested |
63
64
 
64
65
  OpenChamber changes which OpenCode API calls it makes between releases. If a
@@ -69,7 +70,25 @@ and event-stream inventory.
69
70
 
70
71
  ## Quick start
71
72
 
72
- Needs Node.js 22+ and OmO's `omo` command on PATH (`bun add -g omo-ai`).
73
+ Needs [Bun](https://bun.sh) 1.4+ on the machine OpenChamber runs on.
74
+
75
+ ### As an OpenChamber extension (recommended)
76
+
77
+ 1. In OpenChamber 2.3.2 or newer, open **Settings → Extensions → Add → URL** and
78
+ enter `https://github.com/eliottness/antechamber`.
79
+ 2. Approve **sessions** and the **local service** (it runs `bun`).
80
+ 3. Open the **OmO** rail panel's settings: the **Runtime** block shows the
81
+ install and the launcher path,
82
+ `<OpenChamber data dir>/extensions/antechamber/extensions/antechamber/bin/opencode-antechamber`
83
+ for the repository URL.
84
+ 4. Paste that path into **Settings → OpenCode CLI**.
85
+
86
+ The launcher installs the antechamber release named by the extension's version,
87
+ and the OmO it pins, into `~/.antechamber/runtime/<version>` the first time it
88
+ starts. Updating the extension in Settings → Extensions is how antechamber and
89
+ OmO are updated. Details: [extensions/antechamber/README.md](extensions/antechamber/README.md).
90
+
91
+ ### From npm
73
92
 
74
93
  ```bash
75
94
  npm i -g antechamber
@@ -78,9 +97,10 @@ antechamber doctor
78
97
  antechamber setup --auto-update
79
98
  ```
80
99
 
81
- `setup` updates OpenChamber's `opencodeBinary`, preserves all other settings,
82
- and backs up an existing settings file before changing it. Restart OpenChamber
83
- after setup. Preview changes with `antechamber setup --dry-run`.
100
+ The npm package brings its pinned OmO along. `setup` updates OpenChamber's
101
+ `opencodeBinary`, preserves all other settings, and backs up an existing
102
+ settings file before changing it. Restart OpenChamber after setup. Preview
103
+ changes with `antechamber setup --dry-run`.
84
104
 
85
105
  `--auto-update` keeps antechamber current without any action from you. It
86
106
  writes a small launcher, `~/.config/antechamber/opencode-antechamber`, and points
@@ -92,13 +112,10 @@ skips the check. It needs a global npm or bun install, so it is refused for
92
112
  source checkouts and `npx`. Drop the flag (plain `antechamber setup`) to point
93
113
  OpenChamber back at the `antechamber` bin and stop auto-updates.
94
114
 
95
- Optionally, add the bundled [OpenChamber extensions](#openchamber-extensions):
96
- `setup` ends by printing their folders (under
97
- `$(npm root -g)/antechamber/extensions/`). In OpenChamber, open
98
- **Settings → Extensions → Add → Folder**, paste a path, and approve the
99
- permissions it asks for. On OpenChamber 2.x, add OmO Work to see monitors,
100
- eval cells and the todo list in the Work Status panel. The folders are updated
101
- in place by `npm update -g`.
115
+ `setup` ends by printing the bundled extension's folder (under
116
+ `$(npm root -g)/antechamber/extensions/antechamber`); add it with
117
+ **Settings → Extensions → Add → Folder** for the Graph, Work and tool headers.
118
+ OpenChamber can keep using the npm-installed `antechamber` as its OpenCode CLI.
102
119
 
103
120
  For an isolated OpenChamber instance, leaving your main settings untouched:
104
121
 
@@ -146,9 +163,9 @@ antechamber serve --hostname 127.0.0.1 --port 4096
146
163
  |---|---|
147
164
  | `antechamber serve` | OpenCode-compatible server; `--hostname`/`--host`, `--port`, `--directory`. Bare `antechamber` also starts the server. |
148
165
  | `antechamber setup` | Configure OpenChamber; `--settings <file>`, `--profile <dir>`, `--binary <path>`, `--dry-run`, `--systemd [unit]`, `--pi-binary <path>`, `--restart`, `--auto-update`. |
149
- | `antechamber doctor` | Read-only Node, backend, agent/state directories, teardown, OpenChamber and auth checks, plus the installed, latest released and running adapter versions (a running server older than the install needs an OpenChamber restart); `--json`, `--settings <file>`, `--profile <dir>`. Exits 1 on any FAIL; warnings do not fail. |
150
- | `antechamber upgrade` | Install the latest release over a global npm or bun install, with the package manager that owns it. Refused for source checkouts and `npx`. |
151
- | `antechamber version` | Package version plus OpenCode API contract version. `--version`/`-v` deliberately print exactly `opencode v2.1.0` for OpenChamber. |
166
+ | `antechamber doctor` | Read-only Bun, backend, agent/state directories, teardown, OpenChamber and auth checks, plus the installed, latest released and running adapter versions (a running server older than the install needs an OpenChamber restart); `--json`, `--settings <file>`, `--profile <dir>`. Exits 1 on any FAIL; warnings do not fail. |
167
+ | `antechamber upgrade` | Install the latest release over a global npm or bun install, with the package manager that owns it. Refused for source checkouts, `npx`, and when the extension's launcher manages antechamber (see Upgrade, uninstall and rollback below). |
168
+ | `antechamber version` | Package version plus OpenCode API contract version. `--version`/`-v` deliberately print exactly `opencode v2.999.0` for OpenChamber. |
152
169
  | `antechamber help` | Usage and options; also `--help`/`-h`. |
153
170
 
154
171
  ## Upgrade, uninstall and rollback
@@ -165,13 +182,11 @@ Restart OpenChamber, or `systemctl --user restart openchamber.service` for a
165
182
  managed service. Run `antechamber doctor` again. If the executable moved,
166
183
  rerun `antechamber setup`.
167
184
 
168
- OpenChamber 2.3.2 and later can show an "OpenCode update" notice because antechamber
169
- reports OpenCode API 2.1.0, the minimum OpenChamber 2.5.2 accepts. The notice names
170
- an OpenCode version, but its **Update** button runs `<opencodeBinary> upgrade`,
171
- which upgrades antechamber itself (a no-op when it is already current). Click
172
- **Reload OpenCode** afterwards to restart onto the new version. OpenChamber
173
- 1.x shows no notice; its `POST /global/upgrade` call upgrades antechamber the
174
- same way.
185
+ OpenChamber can show an "OpenCode update" notice. Its **Update** button runs
186
+ `<opencodeBinary> upgrade`: for an npm install that upgrades antechamber itself
187
+ (a no-op when it is already current); for the extension's launcher it only says
188
+ to update the extension in Settings → Extensions. Click **Reload OpenCode**
189
+ afterwards to restart onto the new version.
175
190
 
176
191
  To roll back wiring, copy the backup printed by setup over the settings file:
177
192
 
@@ -196,119 +211,53 @@ git clone https://github.com/eliottness/antechamber.git
196
211
  cd antechamber
197
212
  npm ci
198
213
  npm run build
199
- node dist/cli.js doctor
200
- node dist/cli.js setup --binary "$PWD/bin/opencode-antechamber"
214
+ bun dist/cli.js doctor
215
+ bun dist/cli.js setup --binary "$PWD/bin/opencode-antechamber"
201
216
  # isolated alternative:
202
- node dist/cli.js setup --profile ~/.config/antechamber-openchamber \
217
+ bun dist/cli.js setup --profile ~/.config/antechamber-openchamber \
203
218
  --binary "$PWD/bin/opencode-antechamber"
204
219
  ```
205
220
 
206
- The source launcher requires the built `dist/cli.js`. Pull updates, run
221
+ Building needs Node.js 22+ for the development tooling; the built CLI runs on
222
+ Bun. The source launcher requires the built `dist/cli.js` and finds Bun on PATH,
223
+ in `$BUN_INSTALL/bin` or in `~/.bun/bin`. Pull updates, run
207
224
  `npm ci && npm run build`, and restart OpenChamber.
208
225
 
209
- `npm run build` also builds the OmO Graph and OmO Work extensions; `setup`
210
- prints their folders (`$PWD/extensions/omo-dag`, `$PWD/extensions/omo-work`) to
211
- add in **Settings → Extensions → Add → Folder**.
212
-
213
- ## OpenChamber extensions
214
-
215
- antechamber ships three optional OpenChamber extensions, in the npm package and
216
- attached to every GitHub release. None is required to run sessions.
217
-
218
- | Extension | Adds | OpenChamber | Asks for |
219
- |---|---|---|---|
220
- | [OmO Graph](#omo-graph) (`extensions/omo-dag`) | a rail panel drawing the session's OmO sub-agents as a live graph | 1.22 or newer | sessions, local service |
221
- | [OmO Work](#omo-work) (`extensions/omo-work`) | a Work Status section with the session's todo phases, monitors, eval cells, background sessions and goal timer | 2.3.2 or newer | local service |
222
- | [OmO Compatibility](#omo-compatibility) (`extensions/omo-compat`) | headers for OmO tool cards, such as `JS Eval` on eval cells | 1.24 or newer | nothing |
223
-
224
- All three run on OpenChamber web and desktop; VS Code and mobile load no
225
- extensions.
226
-
227
- ### Installing an extension
228
-
229
- In OpenChamber, open **Settings → Extensions → Add** and pick the source that
230
- fits where OpenChamber runs:
231
-
232
- | OpenChamber runs | Add | OmO Graph | OmO Work | OmO Compatibility |
233
- |---|---|---|---|---|
234
- | anywhere (recommended) | **URL** (Git) | `https://github.com/eliottness/antechamber#extension/omo-graph` | `…#extension/omo-work` | `…#extension/omo-compat` |
235
- | on the machine where antechamber is installed | **Folder** | `extensions/omo-dag` | `extensions/omo-work` | `extensions/omo-compat` |
236
- | anywhere, offline | **ZIP file** | `antechamber-omo-graph.zip` | `antechamber-omo-work.zip` | `antechamber-omo-compat.zip` |
237
-
238
- - **URL**: a Git install from the branch every release publishes. OpenChamber
239
- offers to update it after each release. Keep the `#extension/...` part: the
240
- bare repository URL makes OpenChamber clone antechamber itself, whose
241
- `package.json` is not an extension, and OpenChamber words that rejection as
242
- "panel.id must be kebab-case".
243
- - **Folder**: the paths `antechamber setup` prints, under
244
- `$(npm root -g)/antechamber/` for npm installs or the checkout after
245
- `npm run build`.
246
- - **ZIP file**: attached to every GitHub release, or built with
247
- `npm run build && npm run pack:extension -- antechamber-omo-graph.zip` (OmO
248
- Graph) or `npm run pack:work-extension -- antechamber-omo-work.zip` (OmO
249
- Work). OpenChamber never updates ZIP installs.
250
-
251
- Then approve the permissions it asks for. See
252
- [Upgrading the OpenChamber extensions](#upgrading-the-openchamber-extensions)
253
- for how each source moves to a new release.
254
-
255
- ### OmO Graph
256
-
257
- With the default OmO backend, OmO Graph adds a rail panel showing the open
258
- session's orchestrator and every sub-agent OmO launched, grouped in waves:
259
-
260
- - each card shows the sub-agent's live state, duration, agent and model;
261
- - hovering a card highlights its input and output edges;
262
- - clicking a card opens that sub-agent's session.
263
-
264
- Its local service reads OmO's task store and antechamber's session registry
265
- read-only. Details: [extensions/omo-dag/README.md](extensions/omo-dag/README.md).
266
-
267
- ### OmO Work
268
-
269
- OmO Work adds an **OmO Work** section to OpenChamber 2.x's Work Status panel,
270
- for the background work of the open session:
271
-
272
- - the OmO todo list grouped by phase, with progress per phase;
273
- - terminal monitors, with their command, filter and latest matched lines (on
274
- 2.x, monitors appear here instead of as subagent sessions);
275
- - detached eval cells, with their output and a **Stop** button;
276
- - background terminal sessions that are still running;
277
- - the goal continuation timer, what it waits on, and a **Fire now** button.
278
-
279
- Its local service talks to the running antechamber through the
280
- `/antechamber/work-status` routes, authenticated by a token antechamber writes
281
- into its private run record, so it never needs the server password. It needs
282
- antechamber running on the same machine as OpenChamber. Details:
283
- [extensions/omo-work/README.md](extensions/omo-work/README.md).
284
-
285
- ### OmO Compatibility
286
-
287
- OmO Compatibility is a manifest with no code. It tells OpenChamber how to
288
- display OmO tool calls that antechamber maps onto OpenChamber's cards; today
289
- it heads eval cells with `JS Eval` or `Python Eval` and the cell's summary. It
290
- needs no build. Details:
291
- [extensions/omo-compat/README.md](extensions/omo-compat/README.md).
292
-
293
- ## Upgrading the OpenChamber extensions
294
-
295
- Every antechamber release ships the three extensions at its own version. How
296
- an installed extension moves to a new release depends on how it was added:
297
-
298
- - **Git URL** (`https://github.com/eliottness/antechamber#extension/...`):
299
- Settings → Extensions shows **Update available** once a release is out
300
- (OpenChamber checks at most hourly; **Check for updates** checks now).
301
- **Update** replaces it in place and keeps its approvals and settings.
302
- - **Folder**: the folder belongs to the antechamber installation, so it
303
- changes with `antechamber upgrade` (or `git pull && npm ci && npm run build`
304
- in a checkout). Toggle the extension off and on to restart its service.
305
- - **ZIP** (file or release URL): OpenChamber never checks these. Add the new
306
- archive and choose **Reinstall**, or switch to the Git URL once: remove the
307
- extension, then add it by URL.
308
-
309
- Each extension is built against the antechamber of the same release, so
310
- upgrade antechamber too and restart OpenChamber to run it; `antechamber
311
- doctor` shows the running version.
226
+ `npm run build` also builds the extension; `setup` prints its folder
227
+ (`$PWD/extensions/antechamber`) to add in **Settings → Extensions → Add →
228
+ Folder**. To run a checkout through the extension's launcher instead, `npm pack`
229
+ it and set `ANTECHAMBER_RUNTIME_SPEC` to the tarball in OpenChamber's
230
+ environment.
231
+
232
+ ## The OpenChamber extension
233
+
234
+ `extensions/antechamber` is one OpenChamber 2.3.2+ extension (web and desktop;
235
+ VS Code and mobile load no extensions). It replaces the OmO Graph, OmO Work and
236
+ OmO Compatibility extensions of antechamber 1.x: remove those, then add this
237
+ one.
238
+
239
+ | Part | What it does |
240
+ |---|---|
241
+ | Runtime | `bin/opencode-antechamber`, OpenChamber's OpenCode CLI: installs and runs the pinned antechamber and OmO with Bun |
242
+ | OmO Graph | a rail panel (and page) drawing the open session's OmO sub-agents as a live, clickable graph |
243
+ | OmO Work | a Work Status section with the session's todo phases, goal timer and other wake sources |
244
+ | Tool headers | eval cells read `JS Eval`/`Python Eval` and their summary; sub-agent cards read their agent and description |
245
+
246
+ Add it from **Settings → Extensions → Add**:
247
+
248
+ | Source | Add | Updates |
249
+ |---|---|---|
250
+ | **URL** (Git, recommended) | `https://github.com/eliottness/antechamber` (the repository root is the extension), or `…#extension/antechamber` for a clone of just the extension | OpenChamber offers **Update** after each release |
251
+ | **Folder** | `extensions/antechamber` of an npm install or a built checkout | changes with the installation |
252
+ | **ZIP** | `antechamber-openchamber.zip` from a GitHub release, or `npm run build && npm run pack:extension -- out.zip` | never; reinstall the new archive |
253
+
254
+ Both URLs install the same extension: the root `package.json` carries its
255
+ manifest, pointing into `extensions/antechamber/`, whose built files are
256
+ committed. It asks
257
+ for **sessions** and a **local service** (`bun`). Details, data paths and the
258
+ design: [extensions/antechamber/README.md](extensions/antechamber/README.md),
259
+ [docs/GRAPH.md](extensions/antechamber/docs/GRAPH.md),
260
+ [docs/WORK.md](extensions/antechamber/docs/WORK.md).
312
261
 
313
262
  ## Configuration
314
263
 
@@ -401,9 +350,7 @@ provenance and creates the GitHub release from the CHANGELOG. See
401
350
  - [docs/backends/omo.md](docs/backends/omo.md) - OmO backend details (agent name, task hosts, transcripts)
402
351
  - [RELEASE.md](RELEASE.md) - automatic patch releases to npm and GitHub on every push to `main`
403
352
 
404
- - [extensions/omo-dag/README.md](extensions/omo-dag/README.md) - the OmO Graph OpenChamber extension ([design](extensions/omo-dag/docs/DESIGN.md))
405
- - [extensions/omo-work/README.md](extensions/omo-work/README.md) - the OmO Work status section for OpenChamber 2.x ([design](extensions/omo-work/docs/DESIGN.md))
406
- - [extensions/omo-compat/README.md](extensions/omo-compat/README.md) - the OmO Compatibility display rules
353
+ - [extensions/antechamber/README.md](extensions/antechamber/README.md) - the OpenChamber extension: runtime launcher, OmO Graph ([design](extensions/antechamber/docs/GRAPH.md)), OmO Work ([design](extensions/antechamber/docs/WORK.md)) and tool headers
407
354
 
408
355
  ## Credits
409
356
 
@@ -3,7 +3,7 @@
3
3
  # at this file. OpenChamber runs `<binary> serve --hostname H --port P` and
4
4
  # `<binary> --version`, and OpenChamber 2.x's Update action runs `<binary> upgrade`;
5
5
  # anything else is rejected.
6
- # Requires a build (`npm run build`) so that dist/cli.js exists.
6
+ # Requires a build (`npm run build`) so that dist/cli.js exists, and Bun to run it.
7
7
  set -eu
8
8
  SCRIPT_PATH=$0
9
9
  while [ -h "$SCRIPT_PATH" ]; do
@@ -20,10 +20,20 @@ if [ ! -f "$CLI" ]; then
20
20
  echo "opencode-antechamber: $CLI not found; run 'npm run build' first" >&2
21
21
  exit 1
22
22
  fi
23
+ # antechamber runs on Bun. GUI apps and services often have a PATH without
24
+ # Bun's install directory, so also look where the Bun installer puts it.
25
+ BUN=$(command -v bun || true)
26
+ for CANDIDATE in "${BUN_INSTALL:-${HOME:-}/.bun}/bin/bun" "${HOME:-}/.bun/bin/bun"; do
27
+ if [ -z "$BUN" ] && [ -x "$CANDIDATE" ]; then BUN=$CANDIDATE; fi
28
+ done
29
+ if [ -z "$BUN" ]; then
30
+ echo "opencode-antechamber: bun not found on PATH or in ~/.bun/bin; install it from https://bun.sh" >&2
31
+ exit 1
32
+ fi
23
33
  case "${1:-}" in
24
- serve) shift; exec node "$CLI" serve "$@" ;;
25
- --version|-v) exec node "$CLI" --version ;;
26
- upgrade) exec node "$CLI" upgrade ;;
34
+ serve) shift; exec "$BUN" "$CLI" serve "$@" ;;
35
+ --version|-v) exec "$BUN" "$CLI" --version ;;
36
+ upgrade) exec "$BUN" "$CLI" upgrade ;;
27
37
  esac
28
38
  echo "opencode-antechamber: unsupported command '${1:-}' (only 'serve', '--version' and 'upgrade' are implemented)" >&2
29
39
  exit 1
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  export {};
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  /** CLI parsing and dispatch. Server code is loaded only for serve/default mode. */
3
3
  import { parseArgs } from "node:util";
4
4
  import { ADAPTER_VERSION, OPENCODE_API_VERSION } from "./version.js";
@@ -7,7 +7,10 @@ export interface CommandContext {
7
7
  readonly exec: (binary: string, args: readonly string[]) => string;
8
8
  readonly now: () => Date;
9
9
  readonly platform: NodeJS.Platform;
10
- readonly nodeVersion: string;
10
+ /** Bun's version, or undefined when this process is not running on Bun. */
11
+ readonly bunVersion: string | undefined;
12
+ /** The running Bun executable, or undefined when this process is not running on Bun. */
13
+ readonly bunBinary: string | undefined;
11
14
  readonly output: (line: string) => void;
12
15
  readonly cliPath: string;
13
16
  readonly launcherPath: string;
@@ -24,6 +27,6 @@ export declare function readSettings(path: string, ctx: CommandContext): Record<
24
27
  export declare function shellQuote(value: string): string;
25
28
  /** OpenChamber launcher written by `setup --auto-update`, kept beside the session registry. */
26
29
  export declare function autoUpdateLauncherPath(ctx: CommandContext): string;
27
- export declare function autoUpdateLauncherText(binary: string): string;
30
+ export declare function autoUpdateLauncherText(binary: string, bunBinary?: string): string;
28
31
  export declare function autoUpdateLauncherTarget(text: string): string | undefined;
29
32
  export declare function isPackageBinary(binary: string, ctx: CommandContext): boolean;
@@ -1,7 +1,7 @@
1
1
  import { spawnSync } from "node:child_process";
2
2
  import * as fs from "node:fs";
3
3
  import { homedir } from "node:os";
4
- import { delimiter, isAbsolute, join, resolve } from "node:path";
4
+ import { delimiter, dirname, isAbsolute, join, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { defaultStateDir, envSetting } from "../config.js";
7
7
  export function createContext(overrides = {}) {
@@ -29,7 +29,8 @@ export function createContext(overrides = {}) {
29
29
  },
30
30
  now: () => new Date(),
31
31
  platform: process.platform,
32
- nodeVersion: process.versions.node,
32
+ bunVersion: process.versions.bun,
33
+ bunBinary: process.versions.bun === undefined ? undefined : process.execPath,
33
34
  output: console.log,
34
35
  cliPath: packageCliPath,
35
36
  launcherPath: fileURLToPath(new URL("../../bin/opencode-antechamber", import.meta.url)),
@@ -85,13 +86,16 @@ export function shellQuote(value) {
85
86
  export function autoUpdateLauncherPath(ctx) {
86
87
  return resolve(ctx.cwd, envSetting("STATE_DIR", ctx.env) ?? defaultStateDir(ctx.home, ctx.fs.existsSync), "opencode-antechamber");
87
88
  }
88
- export function autoUpdateLauncherText(binary) {
89
+ export function autoUpdateLauncherText(binary, bunBinary) {
90
+ const quote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
89
91
  return [
90
92
  "#!/bin/sh",
91
93
  "# Written by `antechamber setup --auto-update`; rerun `antechamber setup` without it to stop auto-updates.",
92
94
  "ANTECHAMBER_AUTO_UPDATE=1",
93
95
  "export ANTECHAMBER_AUTO_UPDATE",
94
- `exec '${binary.replaceAll("'", "'\\''")}' "$@"`,
96
+ // The CLI's `env bun` shebang must find Bun even when OpenChamber's PATH lacks its directory.
97
+ ...(bunBinary === undefined ? [] : [`PATH=${quote(dirname(bunBinary))}:"$PATH"`, "export PATH"]),
98
+ `exec ${quote(binary)} "$@"`,
95
99
  "",
96
100
  ].join("\n");
97
101
  }
@@ -1,7 +1,7 @@
1
1
  import { dirname, resolve } from "node:path";
2
2
  import { piAgentDir } from "../agent-dir.js";
3
3
  import { detectAgentName } from "../agent-name.js";
4
- import { agentBinary, defaultStateDir, envSetting, isPlainPi } from "../config.js";
4
+ import { agentBinary, defaultStateDir, envSetting, isPlainPi, managedByExtension } from "../config.js";
5
5
  import { findPidfdPython } from "../pidfd.js";
6
6
  import { readRunningServers } from "../running-servers.js";
7
7
  import { isNewerVersion } from "../self-update.js";
@@ -23,7 +23,8 @@ export function doctor(options = {}, ctx = createContext(), latestVersion) {
23
23
  const add = (name, status, message) => {
24
24
  checks.push({ name, status, message });
25
25
  };
26
- add("node", Number(ctx.nodeVersion.split(".")[0]) >= 22 ? "PASS" : "FAIL", `Node ${ctx.nodeVersion}; requires >=22`);
26
+ const [bunMajor = 0, bunMinor = 0] = (ctx.bunVersion ?? "").split(".").map(Number);
27
+ add("bun", bunMajor > 1 || (bunMajor === 1 && bunMinor >= 4) ? "PASS" : "FAIL", ctx.bunVersion === undefined ? "not running on Bun; requires Bun >=1.4" : `Bun ${ctx.bunVersion}; requires >=1.4`);
27
28
  const backend = agentBinary(ctx.env);
28
29
  const binary = resolveBinary(backend, ctx);
29
30
  if (binary === undefined)
@@ -59,7 +60,7 @@ export function doctor(options = {}, ctx = createContext(), latestVersion) {
59
60
  if (latestVersion instanceof Error)
60
61
  add("version", "INFO", `${ADAPTER_VERSION}; latest unknown (${latestVersion.message})`);
61
62
  else if (latest !== undefined && isNewerVersion(latest, ADAPTER_VERSION))
62
- add("version", "WARN", `${ADAPTER_VERSION} installed; ${latest} is released: run antechamber upgrade`);
63
+ add("version", "WARN", `${ADAPTER_VERSION} installed; ${latest} is released: ${managedByExtension(ctx.env) ? "update the antechamber extension in OpenChamber" : "run antechamber upgrade"}`);
63
64
  else
64
65
  add("version", "PASS", ADAPTER_VERSION);
65
66
  // A released fix is live only once OpenChamber relaunches the adapter.
@@ -12,23 +12,12 @@ function writeAtomically(path, content, ctx) {
12
12
  ctx.fs.writeFileSync(temporary, content, { mode: 0o600, flag: "wx" });
13
13
  ctx.fs.renameSync(temporary, path);
14
14
  }
15
- /** The bundled OmO Graph extension folder, when this installation has its built files. */
16
- function omoGraphExtensionDir(ctx) {
17
- const dir = resolve(dirname(ctx.cliPath), "..", "extensions", "omo-dag");
18
- const built = ["package.json", "panel/main.js", "service/main.js"].every((file) => ctx.fs.existsSync(join(dir, file)));
15
+ /** The bundled antechamber OpenChamber extension folder, when this installation has its built files. */
16
+ function antechamberExtensionDir(ctx) {
17
+ const dir = resolve(dirname(ctx.cliPath), "..", "extensions", "antechamber");
18
+ const built = ["package.json", "panel/main.js", "status/main.js", "service/main.js", "runtime/launcher.js"].every((file) => ctx.fs.existsSync(join(dir, file)));
19
19
  return built ? dir : undefined;
20
20
  }
21
- /** The bundled OmO Work status-section extension folder, when this installation has its built files. */
22
- function omoWorkExtensionDir(ctx) {
23
- const dir = resolve(dirname(ctx.cliPath), "..", "extensions", "omo-work");
24
- const built = ["package.json", "status/main.js", "service/main.js"].every((file) => ctx.fs.existsSync(join(dir, file)));
25
- return built ? dir : undefined;
26
- }
27
- /** The bundled OmO Compatibility extension folder; it is a manifest only, so it needs no build. */
28
- function omoCompatExtensionDir(ctx) {
29
- const dir = resolve(dirname(ctx.cliPath), "..", "extensions", "omo-compat");
30
- return ctx.fs.existsSync(join(dir, "package.json")) ? dir : undefined;
31
- }
32
21
  /** Plan all inputs before applying changes; dependencies are injected for hermetic tests. */
33
22
  export function setup(options, ctx = createContext()) {
34
23
  const lines = [];
@@ -49,8 +38,8 @@ export function setup(options, ctx = createContext()) {
49
38
  : ctx.cliPath;
50
39
  if (binary === undefined)
51
40
  throw new Error(`Cannot resolve executable --binary ${options.binary}`);
52
- if (binary === ctx.cliPath && !ctx.fs.readFileSync(binary, "utf8").startsWith("#!/usr/bin/env node\n")) {
53
- throw new Error(`Package CLI ${binary} is missing its node shebang; run npm run build`);
41
+ if (binary === ctx.cliPath && !ctx.fs.readFileSync(binary, "utf8").startsWith("#!/usr/bin/env bun\n")) {
42
+ throw new Error(`Package CLI ${binary} is missing its bun shebang; run npm run build`);
54
43
  }
55
44
  let launcher;
56
45
  let launcherText;
@@ -63,7 +52,7 @@ export function setup(options, ctx = createContext()) {
63
52
  realpath: (path) => ctx.fs.realpathSync(path),
64
53
  }, () => ctx.exec(npmBinaryFor(), ["root", "-g"]));
65
54
  launcher = autoUpdateLauncherPath(ctx);
66
- launcherText = autoUpdateLauncherText(binary);
55
+ launcherText = autoUpdateLauncherText(binary, ctx.bunBinary);
67
56
  if (ctx.fs.existsSync(launcher))
68
57
  oldLauncher = ctx.fs.readFileSync(launcher, "utf8");
69
58
  }
@@ -181,17 +170,9 @@ export function setup(options, ctx = createContext()) {
181
170
  if (options.profile !== undefined && options.settings === undefined) {
182
171
  report(`OPENCHAMBER_DATA_DIR=${shellQuote(resolve(ctx.cwd, options.profile))} openchamber serve`);
183
172
  }
184
- const extension = omoGraphExtensionDir(ctx);
173
+ const extension = antechamberExtensionDir(ctx);
185
174
  if (extension !== undefined) {
186
- report(`Optional OmO Graph extension: in OpenChamber, Settings \u2192 Extensions \u2192 Add \u2192 Folder: ${extension}`);
187
- }
188
- const work = omoWorkExtensionDir(ctx);
189
- if (work !== undefined) {
190
- report(`Optional OmO Work section (todo phases, monitors, eval cells; OpenChamber 2.x): Settings \u2192 Extensions \u2192 Add \u2192 Folder: ${work}`);
191
- }
192
- const compat = omoCompatExtensionDir(ctx);
193
- if (compat !== undefined) {
194
- report(`Optional OmO Compatibility extension (eval card headers): Settings \u2192 Extensions \u2192 Add \u2192 Folder: ${compat}`);
175
+ report(`Optional antechamber extension (OmO Graph, OmO Work, OmO tool headers; OpenChamber 2.3.2+): Settings \u2192 Extensions \u2192 Add \u2192 Folder: ${extension}`);
195
176
  }
196
177
  return lines;
197
178
  }
package/dist/config.d.ts CHANGED
@@ -12,7 +12,11 @@ export declare function envSetting(name: string, env?: NodeJS.ProcessEnv): strin
12
12
  * mappings survive the upgrade.
13
13
  */
14
14
  export declare function defaultStateDir(home?: string, exists?: typeof existsSync): string;
15
- /** Agent executable spawned per session: OmO by default, plain pi when configured. */
16
- export declare function agentBinary(env?: NodeJS.ProcessEnv): string;
15
+ /** The OmO that antechamber's package.json pins, when it is installed beside antechamber. */
16
+ export declare function bundledOmo(): string | undefined;
17
+ /** Agent executable spawned per session: the pinned OmO by default, else `omo` on PATH, plain pi when configured. */
18
+ export declare function agentBinary(env?: NodeJS.ProcessEnv, bundled?: () => string | undefined): string;
19
+ /** Set by the OpenChamber extension's launcher: the extension, not npm, installs and updates antechamber. */
20
+ export declare function managedByExtension(env?: NodeJS.ProcessEnv): boolean;
17
21
  /** True when the configured backend is upstream pi rather than OmO. */
18
22
  export declare function isPlainPi(env?: NodeJS.ProcessEnv): boolean;