feat(FN-3484): normalize dashboard mailbox and user identity for messaging
This merge normalizes dashboard user identity and mailbox messaging (FN-3484, 4 steps), adds workflow step execution for plugins (FN-3490), and updates the restart integration store mock for plugin templates (FN-3096). Core changes touch the message store and store modules with identity normalizatio Fusion-Task-Id: FN-3484
This commit is contained in:
@@ -1607,22 +1607,26 @@ describe("executeHeartbeat", () => {
|
||||
const sendMessageTool = callArgs.customTools?.find((tool: { name: string }) => tool.name === "fn_send_message");
|
||||
expect(sendMessageTool).toBeDefined();
|
||||
|
||||
await sendMessageTool!.execute(
|
||||
"tool-call",
|
||||
{
|
||||
to_id: "dashboard",
|
||||
content: "Status: I am on it.",
|
||||
type: "agent-to-user",
|
||||
reply_to_message_id: inboundFromUser.id,
|
||||
},
|
||||
undefined,
|
||||
undefined,
|
||||
{} as any,
|
||||
);
|
||||
for (const [index, alias] of ["dashboard", "user:dashboard", "User: user:dashboard"].entries()) {
|
||||
await sendMessageTool!.execute(
|
||||
`tool-call-${index}`,
|
||||
{
|
||||
to_id: alias,
|
||||
content: `Status: I am on it. (${index})`,
|
||||
type: "agent-to-user",
|
||||
reply_to_message_id: inboundFromUser.id,
|
||||
},
|
||||
undefined,
|
||||
undefined,
|
||||
{} as any,
|
||||
);
|
||||
}
|
||||
|
||||
const dashboardInbox = fakeMessageStore.getInbox("dashboard", "user");
|
||||
const linkedReply = dashboardInbox.find((message) => message.content === "Status: I am on it.");
|
||||
expect(linkedReply?.metadata).toEqual({ replyTo: { messageId: inboundFromUser.id } });
|
||||
for (const index of [0, 1, 2]) {
|
||||
const linkedReply = dashboardInbox.find((message) => message.content === `Status: I am on it. (${index})`);
|
||||
expect(linkedReply?.metadata).toEqual({ replyTo: { messageId: inboundFromUser.id } });
|
||||
}
|
||||
|
||||
await monitor.stop();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user