Skip to content

Commit cf125c1

Browse files
committed
test(plugins): align release validation fixtures
1 parent 30a2b30 commit cf125c1

6 files changed

Lines changed: 38 additions & 7 deletions

File tree

extensions/acpx/src/codex-auth-bridge.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ describe("prepareAcpxCodexAuthConfig", () => {
177177
});
178178

179179
const wrapper = await fs.readFile(generated.wrapperPath, "utf8");
180-
expect(wrapper).toContain('"@agentclientprotocol/[email protected].0"');
180+
expect(wrapper).toContain('"@agentclientprotocol/[email protected].1"');
181181
expect(wrapper).toContain('"--", "claude-agent-acp"');
182182
expect(wrapper).not.toContain("@agentclientprotocol/claude-agent-acp@^0.31.0");
183-
expect(wrapper).not.toContain("@agentclientprotocol/[email protected].1");
183+
expect(wrapper).not.toContain("@agentclientprotocol/[email protected].0");
184184
});
185185

186186
it("uses the bundled Codex ACP dependency by default when it is installed", async () => {
@@ -379,7 +379,7 @@ describe("prepareAcpxCodexAuthConfig", () => {
379379
rawConfig: {
380380
agents: {
381381
claude: {
382-
command: "npx -y @agentclientprotocol/[email protected].0 --permission-mode bypass",
382+
command: "npx -y @agentclientprotocol/[email protected].1 --permission-mode bypass",
383383
},
384384
},
385385
},
@@ -425,7 +425,7 @@ describe("prepareAcpxCodexAuthConfig", () => {
425425
const root = await makeTempDir();
426426
const stateDir = path.join(root, "state");
427427
const command =
428-
"node ./custom-claude-wrapper.mjs @agentclientprotocol/[email protected].0 --flag";
428+
"node ./custom-claude-wrapper.mjs @agentclientprotocol/[email protected].1 --flag";
429429
const pluginConfig = resolveAcpxPluginConfig({
430430
rawConfig: {
431431
agents: {

extensions/acpx/src/codex-auth-bridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const CODEX_ACP_PACKAGE = "@zed-industries/codex-acp";
77
const CODEX_ACP_PACKAGE_RANGE = "^0.12.0";
88
const CODEX_ACP_BIN = "codex-acp";
99
const CLAUDE_ACP_PACKAGE = "@agentclientprotocol/claude-agent-acp";
10-
const CLAUDE_ACP_PACKAGE_VERSION = "0.31.0";
10+
const CLAUDE_ACP_PACKAGE_VERSION = "0.31.1";
1111
const CLAUDE_ACP_BIN = "claude-agent-acp";
1212
const RUN_CONFIGURED_COMMAND_SENTINEL = "--openclaw-run-configured";
1313
const requireFromHere = createRequire(import.meta.url);

extensions/acpx/src/manifest.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("acpx package manifest", () => {
1919

2020
expect(packageJson.dependencies?.acpx).toBeDefined();
2121
expect(packageJson.dependencies?.["@zed-industries/codex-acp"]).toBe("0.12.0");
22-
expect(packageJson.dependencies?.["@agentclientprotocol/claude-agent-acp"]).toBe("0.31.0");
22+
expect(packageJson.dependencies?.["@agentclientprotocol/claude-agent-acp"]).toBe("0.31.1");
2323
expect(packageJson.devDependencies?.["@agentclientprotocol/claude-agent-acp"]).toBeUndefined();
2424
expect(packageJson.openclaw?.bundle?.stageRuntimeDependencies).toBe(true);
2525
});

extensions/feishu/src/bot.broadcast.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ describe("broadcast dispatch", () => {
9292
},
9393
session: {
9494
resolveStorePath: vi.fn(() => "/tmp/feishu-session-store.json"),
95+
recordInboundSession: vi.fn().mockResolvedValue(undefined),
9596
},
9697
reply: {
9798
resolveEnvelopeFormatOptions: resolveEnvelopeFormatOptionsMock,
@@ -109,6 +110,28 @@ describe("broadcast dispatch", () => {
109110
media: {
110111
saveMediaBuffer: mockSaveMediaBuffer,
111112
},
113+
turn: {
114+
runPrepared: vi.fn(
115+
async (turn: Parameters<PluginRuntime["channel"]["turn"]["runPrepared"]>[0]) => {
116+
await turn.recordInboundSession({
117+
storePath: turn.storePath,
118+
sessionKey: turn.ctxPayload.SessionKey ?? turn.routeSessionKey,
119+
ctx: turn.ctxPayload,
120+
groupResolution: turn.record?.groupResolution,
121+
createIfMissing: turn.record?.createIfMissing,
122+
updateLastRoute: turn.record?.updateLastRoute,
123+
onRecordError: turn.record?.onRecordError ?? (() => undefined),
124+
});
125+
return {
126+
admission: { kind: "dispatch" as const },
127+
dispatched: true,
128+
ctxPayload: turn.ctxPayload,
129+
routeSessionKey: turn.routeSessionKey,
130+
dispatchResult: await turn.runDispatch(),
131+
};
132+
},
133+
),
134+
},
112135
pairing: {
113136
readAllowFromStore: vi.fn().mockResolvedValue([]),
114137
upsertPairingRequest: vi.fn().mockResolvedValue({ code: "ABCDEFGH", created: false }),

extensions/telegram/src/bot-message-context.session-recreate.test-support.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ describe("Telegram direct session recreation after delete", () => {
110110
},
111111
sessionRuntime: null,
112112
});
113+
expect(context).not.toBeNull();
114+
await context?.turn.recordInboundSession({
115+
storePath: context.turn.storePath,
116+
sessionKey: String(context.ctxPayload.SessionKey),
117+
ctx: context.ctxPayload as never,
118+
updateLastRoute: context.turn.record.updateLastRoute,
119+
onRecordError: context.turn.record.onRecordError,
120+
});
113121

114122
const store = loadSessionStore(storePath, { skipCache: true });
115123
expect(context?.ctxPayload?.SessionKey).toBe(TELEGRAM_DIRECT_KEY);

extensions/tokenjuice/manifest.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("tokenjuice package manifest", () => {
2222
fs.readFileSync(new URL("./package.json", import.meta.url), "utf8"),
2323
) as TokenjuicePackageManifest;
2424

25-
expect(packageJson.dependencies?.tokenjuice).toBe("0.6.4");
25+
expect(packageJson.dependencies?.tokenjuice).toBe("0.7.0");
2626
expect(packageJson.openclaw?.bundle?.stageRuntimeDependencies).toBe(true);
2727
});
2828

0 commit comments

Comments
 (0)