feat(FN-3593): add test isolation CI enforcement, fix stuck-requeue race, a
This merge lands five FN-3593 commits establishing a test isolation contract with a new `scripts/check-test-isolation.mjs` guard that scans for accidental `beforeEach`/`afterEach`/`beforeAll`/`afterAll` in setup helpers, plus per-package `setup-test-isolation.ts` bootstraps that canonicalize the pat Fusion-Task-Id: FN-3593
This commit is contained in:
@@ -113,13 +113,6 @@ export const sendMessageParams = Type.Object({
|
||||
reply_to_message_id: Type.Optional(
|
||||
Type.String({ description: "Optional ID of the message you are replying to (use IDs from fn_read_messages output)" }),
|
||||
),
|
||||
wake_recipient: Type.Optional(
|
||||
Type.Boolean({
|
||||
description:
|
||||
"If true, wake the recipient agent immediately on receipt regardless of their messageResponseMode. " +
|
||||
"Use sparingly for urgent messages. Ignored when the recipient is a user.",
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
export const readMessagesParams = Type.Object({
|
||||
@@ -1417,8 +1410,7 @@ export function createSendMessageTool(messageStore: MessageStore, fromAgentId: s
|
||||
label: "Send Message",
|
||||
description:
|
||||
"Send a message to another agent or user. The recipient will be woken if they have " +
|
||||
"`messageResponseMode: 'immediate'` configured, or if you set `wake_recipient: true` " +
|
||||
"to override their setting for an urgent message. When replying to an existing message, " +
|
||||
"`messageResponseMode: 'immediate'` configured. When replying to an existing message, " +
|
||||
"include `reply_to_message_id` to preserve threading.",
|
||||
parameters: sendMessageParams,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
@@ -1453,15 +1445,6 @@ export function createSendMessageTool(messageStore: MessageStore, fromAgentId: s
|
||||
};
|
||||
}
|
||||
|
||||
const wakeRecipient = params.wake_recipient === true && recipient.type === "agent";
|
||||
const metadata =
|
||||
replyToMessageId || wakeRecipient
|
||||
? {
|
||||
...(replyToMessageId ? { replyTo: { messageId: replyToMessageId } } : {}),
|
||||
...(wakeRecipient ? { wakeRecipient: true } : {}),
|
||||
}
|
||||
: undefined;
|
||||
|
||||
const message = messageStore.sendMessage({
|
||||
fromId: fromAgentId,
|
||||
fromType: "agent",
|
||||
@@ -1469,7 +1452,7 @@ export function createSendMessageTool(messageStore: MessageStore, fromAgentId: s
|
||||
toType: recipient.type,
|
||||
content,
|
||||
type: messageType,
|
||||
...(metadata ? { metadata } : {}),
|
||||
...(replyToMessageId ? { metadata: { replyTo: { messageId: replyToMessageId } } } : {}),
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user