fix(ci): repair contract and interaction drift

This commit is contained in:
Peter Steinberger
2026-04-03 19:56:53 +01:00
parent c9dfc35dfd
commit 4b71a94450
5 changed files with 39 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
export { discordPlugin } from "./src/channel.js";
export { buildFinalizedDiscordDirectInboundContext } from "./src/monitor/inbound-context.test-helpers.js";
export { __testing as discordThreadBindingTesting } from "./src/monitor/thread-bindings.manager.js";
export { discordOutbound } from "./src/outbound-adapter.js";

View File

@@ -1,3 +1,4 @@
export { feishuPlugin } from "./src/channel.js";
export * from "./src/conversation-id.js";
export * from "./src/setup-core.js";
export * from "./src/setup-surface.js";

View File

@@ -1,3 +1,4 @@
export { imessagePlugin } from "./src/channel.js";
export * from "./src/accounts.js";
export * from "./src/conversation-bindings.js";
export * from "./src/conversation-id.js";

View File

@@ -354,12 +354,42 @@ describe("registerSlackInteractionEvents", () => {
});
expect(ack).toHaveBeenCalled();
expect(dispatchPluginInteractiveHandlerMock).toHaveBeenCalledWith(
const dispatchCall = dispatchPluginInteractiveHandlerMock.mock.calls[0]?.[0] as
| {
channel?: string;
data?: string;
dedupeId?: string;
invoke?: (params: {
registration: { handler: (ctx: unknown) => unknown };
namespace: string;
payload: string;
}) => Promise<unknown>;
}
| undefined;
expect(dispatchCall).toMatchObject({
channel: "slack",
data: "codex:approve:thread-1",
dedupeId: "U123:C1:100.200:123.trigger:codex:approve:thread-1",
});
const registrationHandler = vi.fn();
await dispatchCall?.invoke?.({
registration: { handler: registrationHandler },
namespace: "codex",
payload: "approve:thread-1",
});
expect(registrationHandler).toHaveBeenCalledWith(
expect.objectContaining({
channel: "slack",
data: "codex:approve:thread-1",
dedupeId: "U123:C1:100.200:123.trigger:codex:approve:thread-1",
invoke: expect.any(Function),
accountId: ctx.accountId,
conversationId: "C1",
interactionId: "U123:C1:100.200:123.trigger:codex:approve:thread-1",
threadId: "100.100",
interaction: expect.objectContaining({
actionId: "codex",
value: "approve:thread-1",
data: "codex:approve:thread-1",
namespace: "codex",
payload: "approve:thread-1",
}),
}),
);
expect(enqueueSystemEventMock).not.toHaveBeenCalled();

View File

@@ -165,7 +165,7 @@ const record = registry.plugins.find((entry) => entry.id === pluginId);
assert.ok(record, "smoke plugin missing from registry");
assert.equal(record.status, "loaded", record.error ?? "smoke plugin failed to load");
assert.deepEqual(getPluginCommandSpecs("telegram"), [
assert.deepEqual(getPluginCommandSpecs(), [
{ name: "pair", description: "Pair a device", acceptsArgs: true },
]);