antechamber 2.0.5 → 2.0.7

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 CHANGED
@@ -7,6 +7,21 @@ and this project uses [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.0.7] - 2026-11-19
11
+
12
+ ### Added
13
+
14
+ - OmO now follows its releases weekly: a scheduled workflow moves the pinned `omo-ai` to the latest version and
15
+ releases it once CI and an end-to-end run with the latest OpenChamber pass.
16
+
17
+ ## [2.0.6] - 2026-11-19
18
+
19
+ ### Fixed
20
+
21
+ - Sending chat quotes with comments but no text of your own no longer fails with `session.prompt failed (400):
22
+ prompt requires non-whitespace text, files, or agents`. OpenChamber sends the quotes ahead of the prompt, so the
23
+ prompt had no text; the quotes were kept anyway, and a retry sent them a second time.
24
+
10
25
  ## [2.0.5] - 2026-11-19
11
26
 
12
27
  - fix(v2): open a turn for a ! shell command in OpenChamber 2.x (#92)
@@ -56,6 +56,9 @@ export function promptAsync(services, session, text, model, noReply = false, mes
56
56
  void services.sessions
57
57
  .prompt(session.info.id, text, model, noReply, messageID, delivery, parts, metadata)
58
58
  .catch((error) => {
59
+ // Context that never reached the agent cannot stand in for a prompt's text.
60
+ if (noReply && messageID !== undefined)
61
+ session.pendingContext?.delete(messageID);
59
62
  // The agent stopped: the session's exit handler already shows why, once.
60
63
  if (error instanceof PiStoppedError)
61
64
  return;
package/dist/routes-v2.js CHANGED
@@ -810,6 +810,8 @@ export async function handleV2(services, req, res, url, path, method, directory)
810
810
  const body = (await services.body(req));
811
811
  if (body.delivery !== undefined && body.delivery !== "steer" && body.delivery !== "queue")
812
812
  throw new RequestBodyError(400, 'delivery must be "steer" or "queue"');
813
+ // The command carries the quotes sent before it; ones sent while it runs wait for the next prompt.
814
+ const quotes = [...(managed.pendingContext ?? [])];
813
815
  const result = await runSessionSlash(services, sessionId, {
814
816
  command: body.name,
815
817
  arguments: body.text ?? "",
@@ -821,6 +823,8 @@ export async function handleV2(services, req, res, url, path, method, directory)
821
823
  json(res, 400, errorBody("BadRequestError", "command is required"));
822
824
  return;
823
825
  }
826
+ for (const quote of quotes)
827
+ managed.pendingContext?.delete(quote);
824
828
  res.writeHead(204).end();
825
829
  return;
826
830
  }
@@ -840,7 +844,11 @@ export async function handleV2(services, req, res, url, path, method, directory)
840
844
  const parts = explicit.length > 0
841
845
  ? [...explicit, ...v2PromptParts("", body.files, body.agents)]
842
846
  : v2PromptParts(text, body.files, body.agents);
843
- if (text.trim() === "" && !parts.some((part) => part.type === "file" || part.type === "agent")) {
847
+ // OpenChamber sends chat quotes as context ahead of the prompt, so a prompt of quotes alone has no text;
848
+ // OmO runs it as an empty user message after the quotes (RPC probe 2026-11-19).
849
+ if (text.trim() === "" &&
850
+ !parts.some((part) => part.type === "file" || part.type === "agent") &&
851
+ !managed.pendingContext?.size) {
844
852
  json(res, 400, {
845
853
  _tag: "InvalidRequestError",
846
854
  message: "prompt requires non-whitespace text, files, or agents",
@@ -870,6 +878,7 @@ export async function handleV2(services, req, res, url, path, method, directory)
870
878
  return;
871
879
  }
872
880
  const delivery = body.delivery ?? "steer";
881
+ managed.pendingContext?.clear();
873
882
  promptAsync(services, managed, text, model, false, messageID, delivery, parts.length > 0 ? parts : undefined, metadata);
874
883
  json(res, 200, {
875
884
  data: {
@@ -910,6 +919,7 @@ export async function handleV2(services, req, res, url, path, method, directory)
910
919
  throw new RequestBodyError(400, "description must be a string");
911
920
  if (body.description !== undefined)
912
921
  (managed.tree.promptDescriptions ??= {})[messageID] = body.description;
922
+ (managed.pendingContext ??= new Set()).add(messageID);
913
923
  promptAsync(services, managed, text, undefined, true, messageID, body.delivery ?? "steer", undefined, metadata);
914
924
  // OpenChamber 2.3.2 treats anything but 200 + the admitted record as a failed send (captured OpenCode shape).
915
925
  json(res, 200, {
@@ -235,7 +235,8 @@ export function parsePiSessionText(s, agentName, raw) {
235
235
  if (m.role === "user") {
236
236
  endRun();
237
237
  const text = textOf(m.content);
238
- if (text === "")
238
+ // An empty prompt antechamber sent (chat quotes alone) is a real turn; its reply answers it.
239
+ if (text === "" && m.clientMessageId === undefined)
239
240
  continue;
240
241
  const msgId = m.clientMessageId ??
241
242
  Object.keys(s.tree.messageEntries).find((key) => s.tree.messageEntries[key] === e.id) ??
@@ -33,6 +33,11 @@ export interface ManagedSession extends ThinkingState {
33
33
  accepted: boolean;
34
34
  delivered: boolean;
35
35
  }>;
36
+ /**
37
+ * Context (v2 synthetic) admitted since the last prompt or command: OpenChamber sends chat quotes this way, ahead of
38
+ * a prompt that may have no text of its own. Recorded when the route accepts it, before its queued admission runs.
39
+ */
40
+ pendingContext?: Set<string>;
36
41
  instructions?: Record<string, InstructionEntryState>;
37
42
  /** Suppress model-selection events until the session creation record has its final model. */
38
43
  initializing?: boolean;
package/dist/sessions.js CHANGED
@@ -1201,6 +1201,17 @@ export class SessionManager {
1201
1201
  }
1202
1202
  async promptLive(s, text, model, noReply = false, messageID, delivery = "steer", parts, metadata) {
1203
1203
  const pi = await this.preparePrompt(s, model);
1204
+ // The route accepts an empty prompt while quotes are pending, but a quote's admission can still fail after that:
1205
+ // an empty prompt with no context ahead of it would send OmO nothing.
1206
+ if (!noReply && text.trim() === "" && !parts?.some((part) => part.type === "file" || part.type === "agent")) {
1207
+ const messages = this.ensureMessages(s);
1208
+ const boundary = messages.findIndex((message) => message.info.id === s.tree.revert?.messageID);
1209
+ const visible = boundary < 0 ? messages : messages.slice(0, boundary);
1210
+ const user = visible.findLast((message) => message.info.role === "user")?.info;
1211
+ if (user?.role !== "user" || user.synthetic !== true) {
1212
+ throw new Error("prompt requires non-whitespace text, files, or agents");
1213
+ }
1214
+ }
1204
1215
  const native = nativePromptInput(text, parts ?? []);
1205
1216
  // OpenChamber treats instruction writes as best effort, so a rejected delivery must not fail the prompt;
1206
1217
  // the entries stay undelivered and are offered again before the next prompt.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber-openchamber",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "OpenChamber extension for antechamber: installs and pins the antechamber server and OmO, draws the OmO Graph and the OmO Work section, and titles OmO tool cards",
5
5
  "private": true,
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "OpenCode-compatible HTTP/SSE server that lets OpenChamber drive the pi coding agent (and OmO) over RPC",
5
5
  "type": "module",
6
6
  "license": "MIT",