antechamber 0.2.7 → 0.2.9

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,19 @@ and this project uses [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.9] - 2026-10-16
11
+
12
+ ### Fixed
13
+
14
+ - Mobile: sessions whose newest 30 messages contain no user prompt no longer
15
+ open blank on OpenChamber's mobile surface. v1 `GET /session/{id}/message`
16
+ now returns `x-next-cursor` and honors `before`, so the client pages back
17
+ until it finds the start of a turn.
18
+
19
+ ## [0.2.8] - 2026-10-15
20
+
21
+ - fix(session): resend bare /<skill> commands as /skill:<name>
22
+
10
23
  ## [0.2.7] - 2026-10-15
11
24
 
12
25
  ### Fixed
@@ -50,6 +63,12 @@ and this project uses [Semantic Versioning](https://semver.org/).
50
63
  pointer capture, which can happen while the button is still held; the drag
51
64
  now ends only on release, cancel, or a move without the button held.
52
65
 
66
+ ### Fixed
67
+
68
+ - Invoking a skill as `/<name>` (as OpenChamber offers it) no longer fails with
69
+ `Unknown command /<name>. Did you mean /skill:<name>?`. When OmO suggests the
70
+ matching skill, antechamber resends the prompt as `/skill:<name>`.
71
+
53
72
  ## [0.2.4] - 2026-10-15
54
73
 
55
74
  ### Added
package/dist/pi-rpc.d.ts CHANGED
@@ -46,6 +46,8 @@ export type PiRpcResponse<T = unknown> = {
46
46
  } | {
47
47
  readonly success: false;
48
48
  readonly error?: string;
49
+ readonly errorCode?: string;
50
+ readonly errorData?: unknown;
49
51
  readonly data?: never;
50
52
  });
51
53
  interface PiRpcClientOptions {
package/dist/pi-rpc.js CHANGED
@@ -225,6 +225,8 @@ export class PiRpcClient extends EventEmitter {
225
225
  command: msg.command,
226
226
  success: false,
227
227
  ...(msg.error !== undefined ? { error: msg.error } : {}),
228
+ ...(typeof msg.errorCode === "string" ? { errorCode: msg.errorCode } : {}),
229
+ ...(msg.errorData !== undefined ? { errorData: msg.errorData } : {}),
228
230
  };
229
231
  pending?.resolve(response);
230
232
  return;
package/dist/routes-v1.js CHANGED
@@ -134,9 +134,24 @@ export async function handleV1(services, req, res, url, path, method, directory)
134
134
  json(res, 200, await services.sessions.remove(sessionId));
135
135
  return;
136
136
  case "GET /message": {
137
+ // OpenCode pages backwards from the newest message: `before` is the
138
+ // x-next-cursor of the previous page (here, its oldest message ID).
139
+ // Without the cursor, OpenChamber's loader treats a partial page as the
140
+ // whole history; mobile's 30-message first page then has no user
141
+ // message to anchor a turn on, and the transcript renders blank.
137
142
  const messages = services.sessions.messages(sessionId) ?? [];
138
143
  const limit = numberParam(url.searchParams.get("limit"));
139
- json(res, 200, limit === undefined ? messages : limit === 0 ? [] : messages.slice(-limit));
144
+ const before = url.searchParams.get("before");
145
+ const end = before === null ? messages.length : messages.findIndex((message) => message.info.id === before);
146
+ if (end < 0 || limit === 0) {
147
+ json(res, 200, []);
148
+ return;
149
+ }
150
+ const start = limit === undefined ? 0 : Math.max(0, end - limit);
151
+ const page = messages.slice(start, end);
152
+ if (start > 0 && page[0] !== undefined)
153
+ res.setHeader("x-next-cursor", page[0].info.id);
154
+ json(res, 200, page);
140
155
  return;
141
156
  }
142
157
  case "GET /children":
@@ -67,6 +67,14 @@ export declare function parseSlashCommand(value: unknown): SlashCommandInput | u
67
67
  export declare function slashTitlePrompt(text: string): {
68
68
  sessionTitlePrompt?: string;
69
69
  };
70
+ /**
71
+ * OpenCode clients invoke skills as `/<name>`, but OmO only knows them as `/skill:<name>` and rejects
72
+ * the bare form with `unknown_command`. Return the rewritten prompt when OmO suggests that exact skill.
73
+ */
74
+ export declare function skillCommandText(text: string, failure: {
75
+ errorCode?: string;
76
+ errorData?: unknown;
77
+ }): string | undefined;
70
78
  export declare function runSlashCommand(sessions: SessionManager, sessionId: string, input: SlashCommandInput): Promise<OCMessageWithParts | undefined>;
71
79
  export declare function parseShellCommand(value: unknown): string | undefined;
72
80
  export declare function createShellMessage(session: ManagedSession, command: string): ShellMessage;
@@ -133,6 +133,20 @@ export function slashTitlePrompt(text) {
133
133
  const match = /^\s*\/\S+\s+([\s\S]*\S)/.exec(text);
134
134
  return match?.[1] !== undefined && !match[1].startsWith("/") ? { sessionTitlePrompt: match[1] } : {};
135
135
  }
136
+ /**
137
+ * OpenCode clients invoke skills as `/<name>`, but OmO only knows them as `/skill:<name>` and rejects
138
+ * the bare form with `unknown_command`. Return the rewritten prompt when OmO suggests that exact skill.
139
+ */
140
+ export function skillCommandText(text, failure) {
141
+ if (failure.errorCode !== "unknown_command" || !isRecord(failure.errorData))
142
+ return undefined;
143
+ const { command, suggestions } = failure.errorData;
144
+ if (typeof command !== "string" || !Array.isArray(suggestions) || !suggestions.includes(`skill:${command}`)) {
145
+ return undefined;
146
+ }
147
+ const match = /^\/(\S+)([\s\S]*)$/.exec(text);
148
+ return match?.[1] === command ? `/skill:${command}${match[2]}` : undefined;
149
+ }
136
150
  function slashCommandPrompt(input) {
137
151
  return input.arguments === "" ? `/${input.command}` : `/${input.command} ${input.arguments}`;
138
152
  }
package/dist/sessions.js CHANGED
@@ -18,7 +18,7 @@ import { bindMessageEntries, durableShellTree, forkConversation, getEntries, nav
18
18
  import { SubagentBridge } from "./subagents.js";
19
19
  import { MonitorSessions } from "./monitor-sessions.js";
20
20
  import { sessionDiff } from "./session-diff.js";
21
- import { announceSessionNotice, slashTitlePrompt } from "./session-commands.js";
21
+ import { announceSessionNotice, skillCommandText, slashTitlePrompt } from "./session-commands.js";
22
22
  import { ocIdFor, piSessionDir, piSessionsRootMtime, scanAllPiSessions, scanPiSessions, SessionStore, readSessionTitle, } from "./session-store.js";
23
23
  import { ADAPTER_VERSION } from "./version.js";
24
24
  export { ADAPTER_VERSION } from "./version.js";
@@ -990,14 +990,23 @@ export class SessionManager {
990
990
  };
991
991
  if (text.startsWith("/"))
992
992
  pi.onExtensionUI(onNotification);
993
- const res = await pi
994
- .command({
993
+ const send = (message) => pi.command({
995
994
  type: "prompt",
996
995
  ...native,
996
+ message,
997
997
  streamingBehavior: delivery === "queue" ? "followUp" : "steer",
998
998
  clientMessageId: userMsg.id,
999
999
  ...slashTitlePrompt(text),
1000
- })
1000
+ });
1001
+ const res = await (async () => {
1002
+ const first = await send(native.message);
1003
+ // OmO rejects unknown commands before admission, so the same clientMessageId can be resent.
1004
+ const skill = first.success ? undefined : skillCommandText(native.message, first);
1005
+ if (skill === undefined)
1006
+ return first;
1007
+ input.text = skill;
1008
+ return send(skill);
1009
+ })()
1001
1010
  .catch((error) => {
1002
1011
  rejectInput();
1003
1012
  throw error;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber-omo-graph",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "OpenChamber extension: live, interactive graph of the OmO sub-agents behind the current session",
5
5
  "private": true,
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
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",