antechamber 0.2.7 → 0.2.8
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 +10 -0
- package/dist/pi-rpc.d.ts +2 -0
- package/dist/pi-rpc.js +2 -0
- package/dist/session-commands.d.ts +8 -0
- package/dist/session-commands.js +14 -0
- package/dist/sessions.js +13 -4
- package/extensions/omo-dag/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.8] - 2026-10-15
|
|
11
|
+
|
|
12
|
+
- fix(session): resend bare /<skill> commands as /skill:<name>
|
|
13
|
+
|
|
10
14
|
## [0.2.7] - 2026-10-15
|
|
11
15
|
|
|
12
16
|
### Fixed
|
|
@@ -50,6 +54,12 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
50
54
|
pointer capture, which can happen while the button is still held; the drag
|
|
51
55
|
now ends only on release, cancel, or a move without the button held.
|
|
52
56
|
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- Invoking a skill as `/<name>` (as OpenChamber offers it) no longer fails with
|
|
60
|
+
`Unknown command /<name>. Did you mean /skill:<name>?`. When OmO suggests the
|
|
61
|
+
matching skill, antechamber resends the prompt as `/skill:<name>`.
|
|
62
|
+
|
|
53
63
|
## [0.2.4] - 2026-10-15
|
|
54
64
|
|
|
55
65
|
### Added
|
package/dist/pi-rpc.d.ts
CHANGED
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;
|
|
@@ -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;
|
package/dist/session-commands.js
CHANGED
|
@@ -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
|
|
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;
|