feat(FN-3620): wire Hermes chat message tools and document mailbox behavior

Merges FN-3620, completing the Hermes chat mailbox integration with wired message tools, locked sender/recipient contract tests, and mailbox behavior documentation, plus a small CSS polish adding `focus-visible` styles and token radius to the render toggle. A changeset for FN-3710 (cluster task ID o

Fusion-Task-Id: FN-3620
This commit is contained in:
Fusion
2026-05-07 16:50:58 -07:00
committed by gsxdsm
parent 240421419f
commit d5ee17759a
7 changed files with 138 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ import type {
ChatStore,
ChatSession,
ChatSessionCreateInput,
MessageStore,
Settings,
} from "@fusion/core";
import { summarizeTitle } from "@fusion/core";
@@ -35,6 +36,8 @@ import {
promptWithFallback as enginePromptWithFallback,
extractRuntimeHint,
extractRuntimeModel,
createSendMessageTool,
createReadMessagesTool,
} from "@fusion/engine";
import * as engineModule from "@fusion/engine";
@@ -500,6 +503,7 @@ export class ChatManager {
createRuntimeContext?(pluginId: string): Promise<unknown>;
},
private getSettings?: () => Promise<Pick<Settings, "fallbackProvider" | "fallbackModelId" | "defaultProvider" | "defaultModelId"> | undefined> | Pick<Settings, "fallbackProvider" | "fallbackModelId" | "defaultProvider" | "defaultModelId"> | undefined,
private messageStore?: MessageStore,
) {}
private async getChatModelSettings(): Promise<{
@@ -946,10 +950,18 @@ export class ChatManager {
|| usesConfiguredDefaultModel
);
const messagingTools = agent?.id && this.messageStore
? [
createSendMessageTool(this.messageStore, agent.id),
createReadMessagesTool(this.messageStore, agent.id),
]
: undefined;
const sessionOptions = {
cwd: this.rootDir,
systemPrompt,
tools: "coding" as const,
...(messagingTools ? { customTools: messagingTools } : {}),
sessionManager,
...(effectiveModelProvider && effectiveModelId
? {