antechamber 0.2.35 → 0.2.37
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 +15 -0
- package/dist/pi-rpc.d.ts +2 -0
- package/dist/pi-rpc.js +11 -0
- package/dist/question-forms.d.ts +2 -7
- package/dist/question-forms.js +2 -1
- package/dist/session-tree.d.ts +2 -0
- package/dist/session-tree.js +21 -4
- package/dist/sessions.js +1 -1
- package/extensions/omo-compat/package.json +1 -1
- package/extensions/omo-dag/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.37] - 2026-10-20
|
|
11
|
+
|
|
12
|
+
- fix(questions): drop optional comment field that OpenChamber 2.4 makes mandatory (#45)
|
|
13
|
+
|
|
14
|
+
## [0.2.36] - 2026-10-20
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Keep large sessions usable after their persisted history exceeds the 64 MiB RPC frame limit.
|
|
19
|
+
History synchronization now reads the persisted prefix locally and requests only the native tail,
|
|
20
|
+
preserving the selected branch when sending messages or reopening a session.
|
|
21
|
+
|
|
10
22
|
## [0.2.35] - 2026-10-19
|
|
11
23
|
|
|
12
24
|
### Fixed
|
|
@@ -16,6 +28,9 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
16
28
|
child an older version wrongly marked cancelled recovers from its running record. Stopping the turn
|
|
17
29
|
no longer unblocks fork and revert while a background subagent runs; the error now names the
|
|
18
30
|
running subagent instead of asking to stop the turn.
|
|
31
|
+
- Let OmO questions be submitted in OpenChamber 2.4 without typing a comment. The question form no
|
|
32
|
+
longer adds an optional `Comment` field, which OpenChamber 2.4's question dock treated as a required
|
|
33
|
+
final step.
|
|
19
34
|
|
|
20
35
|
## [0.2.34] - 2026-10-19
|
|
21
36
|
|
package/dist/pi-rpc.d.ts
CHANGED
|
@@ -71,8 +71,10 @@ export declare class PiRpcClient extends EventEmitter {
|
|
|
71
71
|
private disposing;
|
|
72
72
|
private agentActive;
|
|
73
73
|
private compacting;
|
|
74
|
+
private sessionPath;
|
|
74
75
|
get pid(): number | undefined;
|
|
75
76
|
get isBusy(): boolean;
|
|
77
|
+
get sessionFile(): string | undefined;
|
|
76
78
|
onEvent(listener: (payload: Record<string, unknown>) => void): this;
|
|
77
79
|
onExit(listener: (code: number | null, signal: string | null) => void): this;
|
|
78
80
|
onExtensionUI(listener: (request: Record<string, unknown>) => void): this;
|
package/dist/pi-rpc.js
CHANGED
|
@@ -70,12 +70,16 @@ export class PiRpcClient extends EventEmitter {
|
|
|
70
70
|
disposing;
|
|
71
71
|
agentActive = false;
|
|
72
72
|
compacting = false;
|
|
73
|
+
sessionPath;
|
|
73
74
|
get pid() {
|
|
74
75
|
return this.proc.pid;
|
|
75
76
|
}
|
|
76
77
|
get isBusy() {
|
|
77
78
|
return this.pending.size > 0;
|
|
78
79
|
}
|
|
80
|
+
get sessionFile() {
|
|
81
|
+
return this.sessionPath;
|
|
82
|
+
}
|
|
79
83
|
onEvent(listener) {
|
|
80
84
|
return super.on("event", listener);
|
|
81
85
|
}
|
|
@@ -231,6 +235,13 @@ export class PiRpcClient extends EventEmitter {
|
|
|
231
235
|
...(typeof msg.errorCode === "string" ? { errorCode: msg.errorCode } : {}),
|
|
232
236
|
...(msg.errorData !== undefined ? { errorData: msg.errorData } : {}),
|
|
233
237
|
};
|
|
238
|
+
if (pending && response.success && msg.command === "get_state") {
|
|
239
|
+
const data = response.data;
|
|
240
|
+
this.sessionPath =
|
|
241
|
+
typeof data === "object" && data !== null && "sessionFile" in data && typeof data.sessionFile === "string"
|
|
242
|
+
? data.sessionFile
|
|
243
|
+
: undefined;
|
|
244
|
+
}
|
|
234
245
|
pending?.resolve(response);
|
|
235
246
|
return;
|
|
236
247
|
}
|
package/dist/question-forms.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare function toQuestionForm(card: PendingQuestion): {
|
|
|
5
5
|
sessionID: string;
|
|
6
6
|
title: string;
|
|
7
7
|
metadata: Record<string, unknown>;
|
|
8
|
-
fields:
|
|
8
|
+
fields: {
|
|
9
9
|
key: string;
|
|
10
10
|
type: string;
|
|
11
11
|
title: string;
|
|
@@ -17,12 +17,7 @@ export declare function toQuestionForm(card: PendingQuestion): {
|
|
|
17
17
|
value: string;
|
|
18
18
|
}[];
|
|
19
19
|
custom?: boolean;
|
|
20
|
-
}
|
|
21
|
-
key: string;
|
|
22
|
-
type: string;
|
|
23
|
-
title: string;
|
|
24
|
-
required: boolean;
|
|
25
|
-
})[];
|
|
20
|
+
}[];
|
|
26
21
|
};
|
|
27
22
|
export declare function formQuestionAnswer(card: PendingQuestion, value: unknown): {
|
|
28
23
|
answers: string[][];
|
package/dist/question-forms.js
CHANGED
|
@@ -19,7 +19,8 @@ export function toQuestionForm(card) {
|
|
|
19
19
|
? { options: q.options.map((o) => ({ value: o.label, ...o })), custom: q.custom !== false }
|
|
20
20
|
: {}),
|
|
21
21
|
})),
|
|
22
|
-
|
|
22
|
+
// No optional "comment" field: OpenChamber 2.4's form dock only enables Submit once every field has a value,
|
|
23
|
+
// ignoring `required: false`. Replies that still carry `comment` are accepted below.
|
|
23
24
|
],
|
|
24
25
|
};
|
|
25
26
|
}
|
package/dist/session-tree.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface TreeEntry {
|
|
|
49
49
|
export interface Entries {
|
|
50
50
|
entries: TreeEntry[];
|
|
51
51
|
leafId: string | null;
|
|
52
|
+
/** A disk prefix is not proof that the live runtime has loaded every entry. */
|
|
53
|
+
unverifiedPrefix?: true;
|
|
52
54
|
}
|
|
53
55
|
export declare class SessionTreeError extends Error {
|
|
54
56
|
}
|
package/dist/session-tree.js
CHANGED
|
@@ -4,6 +4,7 @@ import { contextMessageID, nativePromptInput } from "./prompt-parts.js";
|
|
|
4
4
|
import { backgroundResult } from "./background-results.js";
|
|
5
5
|
export class SessionTreeError extends Error {
|
|
6
6
|
}
|
|
7
|
+
const INLINE_TREE_BYTES = 32 * 1024 * 1024;
|
|
7
8
|
export function durableShellTree(tree) {
|
|
8
9
|
return {
|
|
9
10
|
...tree,
|
|
@@ -12,10 +13,26 @@ export function durableShellTree(tree) {
|
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
export async function getEntries(pi, signal) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const path = pi.sessionFile;
|
|
17
|
+
const disk = path !== undefined && (statSync(path, { throwIfNoEntry: false })?.size ?? 0) >= INLINE_TREE_BYTES
|
|
18
|
+
? readSessionTree(path)
|
|
19
|
+
: undefined;
|
|
20
|
+
for (let index = (disk?.entries.length ?? 0) - 1;; index--) {
|
|
21
|
+
const since = disk?.entries[index]?.id;
|
|
22
|
+
const response = await pi.command({ type: "get_entries", ...(since === undefined ? {} : { since }) }, RPC_COMMAND_TIMEOUT_MS, signal);
|
|
23
|
+
// Another client may have appended entries the live runtime has not loaded.
|
|
24
|
+
if (!response.success && response.errorCode === "not_found" && since !== undefined)
|
|
25
|
+
continue;
|
|
26
|
+
if (!response.success || !response.data)
|
|
27
|
+
throw new SessionTreeError(response.error ?? "OmO returned no session entries");
|
|
28
|
+
return disk === undefined
|
|
29
|
+
? response.data
|
|
30
|
+
: {
|
|
31
|
+
entries: [...disk.entries.slice(0, index + 1), ...response.data.entries],
|
|
32
|
+
leafId: response.data.leafId,
|
|
33
|
+
unverifiedPrefix: true,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
19
36
|
}
|
|
20
37
|
export function readSessionTree(piPath) {
|
|
21
38
|
const lines = readFileSync(piPath, "utf8").trimEnd().split("\n");
|
package/dist/sessions.js
CHANGED
|
@@ -470,7 +470,7 @@ export class SessionManager {
|
|
|
470
470
|
if (treeOperation && s.piPath !== undefined) {
|
|
471
471
|
const disk = readSessionTree(s.piPath);
|
|
472
472
|
const known = new Set(tree.entries.map((entry) => entry.id));
|
|
473
|
-
if (disk.leafId !== tree.leafId || disk.entries.some((entry) => !known.has(entry.id))) {
|
|
473
|
+
if (tree.unverifiedPrefix || disk.leafId !== tree.leafId || disk.entries.some((entry) => !known.has(entry.id))) {
|
|
474
474
|
// Only idle user tree operations can replace a stale native runtime.
|
|
475
475
|
const saved = s.tree.leafId;
|
|
476
476
|
const response = await pi.command({ type: "switch_session", sessionPath: s.piPath }, RPC_COMMAND_TIMEOUT_MS);
|