mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 05:32:53 +00:00
fix(ci): repair contract and interaction drift
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 },
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user