fix: land #33992 from @darkamenosa

Co-authored-by: Tom <hxtxmu@gmail.com>
This commit is contained in:
Peter Steinberger
2026-03-08 04:48:05 +00:00
parent d9670093cb
commit fcdc1a13e1
14 changed files with 1398 additions and 166 deletions

View File

@@ -123,6 +123,17 @@ export function createPluginRuntimeMock(overrides: DeepPartial<PluginRuntime> =
})) as unknown as PluginRuntime["channel"]["reply"]["resolveEnvelopeFormatOptions"],
},
routing: {
buildAgentSessionKey: vi.fn(
({
agentId,
channel,
peer,
}: {
agentId: string;
channel: string;
peer?: { kind?: string; id?: string };
}) => `agent:${agentId}:${channel}:${peer?.kind ?? "direct"}:${peer?.id ?? "peer"}`,
) as unknown as PluginRuntime["channel"]["routing"]["buildAgentSessionKey"],
resolveAgentRoute: vi.fn(() => ({
agentId: "main",
accountId: "default",