antechamber 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +4 -4
- package/dist/routes-v2.js +8 -1
- package/dist/session-tree.d.ts +2 -0
- package/dist/session-tree.js +38 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -1
- package/extensions/omo-compat/package.json +1 -1
- package/extensions/omo-dag/package.json +1 -1
- package/extensions/omo-work/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,24 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.20] - 2026-10-26
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Work with OpenChamber 2.5.2, which refuses OpenCode older than 2.1.0 and showed an "Update OpenCode" screen
|
|
15
|
+
that never cleared. antechamber now reports OpenCode API 2.1.0, and `PATCH /api/session/{id}` accepts 2.1's
|
|
16
|
+
`archived: true|false`, so archiving and unarchiving from OpenChamber 2.5.2 take effect instead of answering 204
|
|
17
|
+
and changing nothing.
|
|
18
|
+
|
|
19
|
+
## [1.0.19] - 2026-10-25
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Keep the parent's last reply in a `/btw` side thread. OpenChamber forks `/btw` at the last completed assistant
|
|
24
|
+
reply, and the adapter cut strictly before it, so the fork ended mid-turn on the reply's tool calls and the side
|
|
25
|
+
agent never saw the answer the main thread had just given. An assistant boundary now keeps that reply and the
|
|
26
|
+
results of its own tool calls.
|
|
27
|
+
|
|
10
28
|
## [1.0.18] - 2026-10-25
|
|
11
29
|
|
|
12
30
|
- fix(session): accept late OmO extension entries after a fork refresh (#68)
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ another executable (see [docs/configuration.md](docs/configuration.md)).
|
|
|
57
57
|
|
|
58
58
|
| OpenChamber | API | Status |
|
|
59
59
|
|---|---|---|
|
|
60
|
-
| >= 2.0.4 | v2 (`@opencode-ai/sdk/v2`) | primary target; antechamber advertises `opencode v2.0
|
|
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
61
|
| 1.24.x | v1 | supported |
|
|
62
62
|
| other versions | - | not tested |
|
|
63
63
|
|
|
@@ -148,7 +148,7 @@ antechamber serve --hostname 127.0.0.1 --port 4096
|
|
|
148
148
|
| `antechamber setup` | Configure OpenChamber; `--settings <file>`, `--profile <dir>`, `--binary <path>`, `--dry-run`, `--systemd [unit]`, `--pi-binary <path>`, `--restart`, `--auto-update`. |
|
|
149
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
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.0
|
|
151
|
+
| `antechamber version` | Package version plus OpenCode API contract version. `--version`/`-v` deliberately print exactly `opencode v2.1.0` for OpenChamber. |
|
|
152
152
|
| `antechamber help` | Usage and options; also `--help`/`-h`. |
|
|
153
153
|
|
|
154
154
|
## Upgrade, uninstall and rollback
|
|
@@ -165,8 +165,8 @@ Restart OpenChamber, or `systemctl --user restart openchamber.service` for a
|
|
|
165
165
|
managed service. Run `antechamber doctor` again. If the executable moved,
|
|
166
166
|
rerun `antechamber setup`.
|
|
167
167
|
|
|
168
|
-
OpenChamber 2.3.2
|
|
169
|
-
reports OpenCode API 2.0
|
|
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
170
|
an OpenCode version, but its **Update** button runs `<opencodeBinary> upgrade`,
|
|
171
171
|
which upgrades antechamber itself (a no-op when it is already current). Click
|
|
172
172
|
**Reload OpenCode** afterwards to restart onto the new version. OpenChamber
|
package/dist/routes-v2.js
CHANGED
|
@@ -510,9 +510,16 @@ export async function handleV2(services, req, res, url, path, method, directory)
|
|
|
510
510
|
}
|
|
511
511
|
case "PATCH ": {
|
|
512
512
|
const body = (await services.body(req));
|
|
513
|
+
// OpenCode 2.1 takes `archived: boolean` (repeating the current state is a no-op);
|
|
514
|
+
// older clients send `time.archived` as a timestamp, 0 to unarchive.
|
|
515
|
+
const archived = typeof body.archived === "boolean"
|
|
516
|
+
? body.archived
|
|
517
|
+
? (managed.info.time.archived ?? Date.now())
|
|
518
|
+
: 0
|
|
519
|
+
: body.time?.archived;
|
|
513
520
|
await services.sessions.update(sessionId, {
|
|
514
521
|
title: body.title,
|
|
515
|
-
archived
|
|
522
|
+
archived,
|
|
516
523
|
metadata: sessionMetadata(body.metadata),
|
|
517
524
|
});
|
|
518
525
|
res.writeHead(204).end();
|
package/dist/session-tree.d.ts
CHANGED
package/dist/session-tree.js
CHANGED
|
@@ -318,24 +318,56 @@ function entryForMessage(s, tree, messageID) {
|
|
|
318
318
|
}
|
|
319
319
|
return entry;
|
|
320
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* The last entry of an assistant reply: the reply, or the latest result of its own tool calls.
|
|
323
|
+
* OpenChamber 2.x /btw names a final reply (no tool calls); 1.24's /btw can name any completed
|
|
324
|
+
* step, whose tool results belong to the same OpenChamber message.
|
|
325
|
+
*/
|
|
326
|
+
function replyEnd(tree, reply, leafId) {
|
|
327
|
+
const content = reply.message?.content;
|
|
328
|
+
const calls = new Set(Array.isArray(content) ? content.flatMap((part) => (part.type === "toolCall" && part.id ? [part.id] : [])) : []);
|
|
329
|
+
const branch = branchEntries(tree, leafId);
|
|
330
|
+
const start = branch.indexOf(reply);
|
|
331
|
+
if (calls.size === 0 || start < 0)
|
|
332
|
+
return reply.id;
|
|
333
|
+
let end = reply.id;
|
|
334
|
+
for (const entry of branch.slice(start + 1)) {
|
|
335
|
+
const role = entry.message?.role;
|
|
336
|
+
if (role === "toolResult" && entry.message?.toolCallId !== undefined && calls.has(entry.message.toolCallId))
|
|
337
|
+
end = entry.id;
|
|
338
|
+
else if (role === "assistant" || role === "user")
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
return end;
|
|
342
|
+
}
|
|
321
343
|
export async function forkConversation(s, pi, tree, messageID) {
|
|
322
344
|
const entry = messageID === undefined ? branchEntries(tree).at(-1) : entryForMessage(s, tree, messageID);
|
|
323
345
|
if (!entry)
|
|
324
346
|
throw new SessionTreeError("Cannot fork an empty conversation");
|
|
325
347
|
const shellUser = entry.message?.role === "bashExecution" &&
|
|
326
348
|
s.messages?.find((message) => message.info.id === messageID)?.info.role === "user";
|
|
327
|
-
// OpenCode forks strictly before any selected message
|
|
328
|
-
//
|
|
329
|
-
//
|
|
330
|
-
|
|
331
|
-
|
|
349
|
+
// OpenCode forks strictly before any selected message, but OpenChamber only names an
|
|
350
|
+
// assistant reply as the boundary from /btw, which forks at the last completed reply
|
|
351
|
+
// so the side thread starts from a settled conversation: keep that reply. OmO's
|
|
352
|
+
// default "before" position only accepts user entries, so other non-user boundaries
|
|
353
|
+
// fork "at" the entry preceding them.
|
|
354
|
+
const reply = messageID !== undefined && entry.message?.role === "assistant";
|
|
355
|
+
const beforeOther = messageID !== undefined && !reply && entry.message?.role !== "user" && entry.message?.role !== "bashExecution";
|
|
356
|
+
const forkEntryId = reply
|
|
357
|
+
? // A staged revert hides the reply's results from the live leaf.
|
|
358
|
+
replyEnd(tree, entry, s.tree.revert?.previousLeafId ?? tree.leafId)
|
|
359
|
+
: shellUser || beforeOther
|
|
360
|
+
? entry.parentId
|
|
361
|
+
: entry.id;
|
|
332
362
|
if (forkEntryId === null) {
|
|
333
363
|
throw new SessionTreeError(shellUser ? "Cannot fork before a root shell entry" : "Cannot fork before the first entry");
|
|
334
364
|
}
|
|
335
365
|
const response = await pi.command({
|
|
336
366
|
type: "fork",
|
|
337
367
|
entryId: forkEntryId,
|
|
338
|
-
...(messageID === undefined || beforeOther || entry.message?.role === "bashExecution"
|
|
368
|
+
...(messageID === undefined || reply || beforeOther || entry.message?.role === "bashExecution"
|
|
369
|
+
? { position: "at" }
|
|
370
|
+
: {}),
|
|
339
371
|
});
|
|
340
372
|
if (!response.success)
|
|
341
373
|
throw new SessionTreeError(response.error ?? "OmO fork failed");
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const ADAPTER_VERSION: string;
|
|
2
|
-
export declare const OPENCODE_API_VERSION = "2.0
|
|
2
|
+
export declare const OPENCODE_API_VERSION = "2.1.0";
|
package/dist/version.js
CHANGED
|
@@ -10,4 +10,5 @@ if (typeof manifest !== "object" ||
|
|
|
10
10
|
export const ADAPTER_VERSION = manifest.version;
|
|
11
11
|
// OpenChamber parses --version as an OpenCode version and requires major 2.
|
|
12
12
|
// This API contract version must not follow the npm package version.
|
|
13
|
-
|
|
13
|
+
// OpenChamber 2.5.2 requires 2.1.0, which added top-level `archived` to PATCH /api/session/{id}.
|
|
14
|
+
export const OPENCODE_API_VERSION = "2.1.0";
|