antechamber 1.0.40 → 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 (70) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +88 -141
  3. package/bin/opencode-antechamber +14 -4
  4. package/dist/approvals.d.ts +9 -1
  5. package/dist/approvals.js +10 -2
  6. package/dist/catalog.d.ts +13 -2
  7. package/dist/catalog.js +88 -52
  8. package/dist/cli.d.ts +1 -1
  9. package/dist/cli.js +1 -1
  10. package/dist/commands/context.d.ts +5 -2
  11. package/dist/commands/context.js +8 -4
  12. package/dist/commands/doctor.js +4 -3
  13. package/dist/commands/setup.js +9 -28
  14. package/dist/config.d.ts +6 -2
  15. package/dist/config.js +18 -4
  16. package/dist/file-watch.d.ts +35 -0
  17. package/dist/file-watch.js +163 -0
  18. package/dist/latency.d.ts +10 -0
  19. package/dist/latency.js +115 -0
  20. package/dist/misc-routes.js +14 -12
  21. package/dist/pi-event-translation.js +44 -2
  22. package/dist/route-services.d.ts +8 -3
  23. package/dist/routes-v1.d.ts +1 -1
  24. package/dist/routes-v1.js +29 -418
  25. package/dist/routes-v2.js +252 -34
  26. package/dist/self-update.d.ts +2 -1
  27. package/dist/self-update.js +5 -1
  28. package/dist/server.d.ts +17 -3
  29. package/dist/server.js +191 -18
  30. package/dist/session-commands.d.ts +3 -1
  31. package/dist/session-commands.js +13 -7
  32. package/dist/session-history.js +3 -0
  33. package/dist/session-store.d.ts +19 -10
  34. package/dist/session-store.js +266 -128
  35. package/dist/session-tree.d.ts +15 -1
  36. package/dist/session-tree.js +2 -2
  37. package/dist/sessions.d.ts +85 -1
  38. package/dist/sessions.js +238 -10
  39. package/dist/sse.d.ts +0 -2
  40. package/dist/sse.js +13 -46
  41. package/dist/text-generation.d.ts +20 -0
  42. package/dist/text-generation.js +93 -0
  43. package/dist/tool-map.js +1 -3
  44. package/dist/types.d.ts +60 -0
  45. package/dist/v2.d.ts +8 -1
  46. package/dist/v2.js +24 -4
  47. package/dist/work-status.js +1 -1
  48. package/extensions/antechamber/README.md +100 -0
  49. package/extensions/antechamber/bin/opencode-antechamber +42 -0
  50. package/extensions/{omo-dag/docs/DESIGN.md → antechamber/docs/GRAPH.md} +5 -5
  51. package/extensions/{omo-work/docs/DESIGN.md → antechamber/docs/WORK.md} +3 -3
  52. package/extensions/antechamber/package.json +60 -0
  53. package/extensions/{omo-dag → antechamber}/panel/index.html +8 -1
  54. package/extensions/antechamber/panel/main.js +261 -0
  55. package/extensions/antechamber/runtime/launcher.js +201 -0
  56. package/extensions/antechamber/service/main.js +884 -0
  57. package/package.json +75 -26
  58. package/extensions/omo-compat/README.md +0 -48
  59. package/extensions/omo-compat/icon.svg +0 -1
  60. package/extensions/omo-compat/package.json +0 -43
  61. package/extensions/omo-dag/README.md +0 -167
  62. package/extensions/omo-dag/package.json +0 -33
  63. package/extensions/omo-dag/panel/main.js +0 -176
  64. package/extensions/omo-dag/service/main.js +0 -457
  65. package/extensions/omo-work/README.md +0 -88
  66. package/extensions/omo-work/package.json +0 -30
  67. package/extensions/omo-work/service/main.js +0 -149
  68. /package/extensions/{omo-dag → antechamber}/icon.svg +0 -0
  69. /package/extensions/{omo-work → antechamber}/status/index.html +0 -0
  70. /package/extensions/{omo-work → antechamber}/status/main.js +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,132 @@ 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
+
107
+ ## [1.0.41] - 2026-11-09
108
+
109
+ ### Fixed
110
+
111
+ OpenChamber 2.6.1 against OpenCode 2.2.5 was captured and replayed against antechamber; these close the differences
112
+ that OpenChamber relies on.
113
+
114
+ - Permission cards on `/api/event` now use OpenCode 2.x's fields (`action`, `resources`, `save`, `source`), and
115
+ "Allow always" advertises the scope OmO saves for reads, edits, lists, globs, greps and eval. The pending-form list
116
+ only shows questions from the current project.
117
+ - Session lists honor `parentID=null` and `archived`, so message search indexes existing conversations. A metadata
118
+ update no longer sends a rename and an agent switch; renames, agent switches, archive and unarchive are announced
119
+ once, when they really happen, and a new session announces its model.
120
+ - OpenChamber's per-session guidance, checkout info, memory, pinned messages and response style now reach the agent:
121
+ instruction entries are stored and sent to OmO before the next prompt, removals are announced, and compaction
122
+ re-sends them. Unread state is kept (`/view` no longer fails), and the inbox lists inputs still waiting for the agent.
123
+ - A reloaded transcript keeps the turn boundaries and compaction records the live one had. `/compact` answers as soon
124
+ as the compaction starts instead of waiting for it, and slash commands keep their attachments and delivery mode.
125
+ - Rename with AI and other small-model actions work: `/api/experimental/generate/text` runs a one-off OmO turn with
126
+ no tools and no session. The image-model picker only lists image models, directory search finds folders, open
127
+ files reload when they change on disk, and project, provider, model, command and Git branch changes reach an open
128
+ OpenChamber without a reload. Nothing polls: refreshes ride on finished turns, client reads and a watch on Git's
129
+ HEAD. Usage limits and the debug location list answer like OpenCode instead of 404.
130
+ - Text generation picks its model at agent start, so Rename with AI never changes OmO's saved default model; it is
131
+ bounded by one deadline and two concurrent runs, and stops when the caller disconnects or the server stops.
132
+ - File watches are 24-hour leases that OpenChamber's renewals extend, so closed editors no longer leave watchers
133
+ behind; a reverted, forked or compacted conversation gets back the instruction entries it lost; and a turn still
134
+ running tools no longer shows as finished in a reloaded transcript.
135
+
10
136
  ## [1.0.40] - 2026-11-06
11
137
 
12
138
  ### 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
@@ -47,7 +47,15 @@ export declare function parsePermissionTitle(title: string): {
47
47
  permission: string;
48
48
  patterns: string[];
49
49
  };
50
- export declare function toV2Permission(card: PermissionRequest): PermissionV2Request;
50
+ /** OpenCode 2.2.5 names the tool source `{type, messageID, id}` (packages/schema/src/permission.ts); the SDK types predate it. */
51
+ type V2PermissionCard = Omit<PermissionV2Request, "source"> & {
52
+ source?: {
53
+ type: "tool";
54
+ messageID: string;
55
+ id: string;
56
+ };
57
+ };
58
+ export declare function toV2Permission(card: PermissionRequest): V2PermissionCard;
51
59
  /** Session-scoped dialog lifecycle; RPC select replies are labels, never indices. */
52
60
  export declare class ApprovalBridge {
53
61
  private sessionID;
package/dist/approvals.js CHANGED
@@ -91,7 +91,7 @@ export function toV2Permission(card) {
91
91
  resources: card.patterns,
92
92
  save: card.always,
93
93
  metadata: card.metadata,
94
- ...(card.tool ? { source: { type: "tool", ...card.tool } } : {}),
94
+ ...(card.tool ? { source: { type: "tool", messageID: card.tool.messageID, id: card.tool.callID } } : {}),
95
95
  };
96
96
  }
97
97
  /** Session-scoped dialog lifecycle; RPC select replies are labels, never indices. */
@@ -339,7 +339,15 @@ export class ApprovalBridge {
339
339
  id: request.id,
340
340
  sessionID: context.sessionID,
341
341
  ...parsed,
342
- always: [],
342
+ // The UI request carries display patterns, not the native `always` array. Only advertise
343
+ // scopes whose native parser saves exactly these patterns (or a known blanket scope).
344
+ always: request.options.includes("Allow always")
345
+ ? ["read", "edit", "list", "glob"].includes(parsed.permission)
346
+ ? parsed.patterns
347
+ : ["grep", "eval"].includes(parsed.permission)
348
+ ? ["*"]
349
+ : []
350
+ : [],
343
351
  metadata: { title: request.title },
344
352
  ...(callID !== undefined ? { tool: { messageID: context.messageID, callID } } : {}),
345
353
  };
package/dist/catalog.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * Model/provider catalog: obtained from a throwaway `pi --mode rpc` process
3
3
  * (`get_available_models` + `get_state`), translated into OpenCode v2
4
- * Provider/Model shapes, cached for the adapter lifetime.
4
+ * Provider/Model shapes, refreshed from live agents or bounded cold reads.
5
5
  */
6
+ import { PiRpcClient } from "./pi-rpc.js";
6
7
  interface OCv2Model {
7
8
  id: string;
8
9
  providerID: string;
@@ -84,5 +85,15 @@ export declare function agentDefaults(cat: Catalog): {
84
85
  };
85
86
  variant?: string;
86
87
  };
87
- export declare function loadCatalog(directory: string): Promise<Catalog>;
88
+ /**
89
+ * The configured default plus the provider/model inventory in a fixed order, so a reordering alone is not
90
+ * reported as a catalog change but a new default is.
91
+ */
92
+ export declare function catalogFingerprint(catalog: Catalog): string;
93
+ /**
94
+ * `configured` is the previous snapshot when `client` is a live session's agent: that agent's `get_state.model`
95
+ * is the session's own selection, not the configured default, so only the model inventory is re-read and the
96
+ * snapshot's default is kept. Only a fresh `--no-session` agent defines the default.
97
+ */
98
+ export declare function loadCatalog(directory: string, client?: PiRpcClient, configured?: Catalog): Promise<Catalog>;
88
99
  export {};