Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(mcp): dispatch-context key list carries B's onBehalfOf, asserted empty without a header
garrytancbcb6da415e3
diff --git a/test/serve-http-mcp-dispatch-context.serial.test.ts b/test/serve-http-mcp-dispatch-context.serial.test.tsindex 55f0b44f1b..eef38a12fa 100644--- a/test/serve-http-mcp-dispatch-context.serial.test.ts+++ b/test/serve-http-mcp-dispatch-context.serial.test.ts@@ -89,7 +89,7 @@ async function rpc(base: string, token: string, method: string, params?: unknownreturn JSON.parse(dataLine ? dataLine.slice('data:'.length) : text).result;}-const FULL_SURFACE_KEYS = ['admissionOrigin', 'auth', 'config', 'inboundFrameBytes', 'isListed', 'logger', 'metaHook', 'noticeLedger', 'remote', 'resultRows', 'sourceId', 'surface', 'surfaceCeiling', 'takesHoldersAllowList', 'transport'];+const FULL_SURFACE_KEYS = ['admissionOrigin', 'auth', 'config', 'inboundFrameBytes', 'isListed', 'logger', 'metaHook', 'noticeLedger', 'onBehalfOf', 'remote', 'resultRows', 'sourceId', 'surface', 'surfaceCeiling', 'takesHoldersAllowList', 'transport'];describe('POST /mcp dispatch context', () => {test('full surface: remote http dispatch with the verified auth and token source scope', async () => {@@ -107,6 +107,7 @@ describe('POST /mcp dispatch context', () => {expect(opts.resultRows).toBe('lean');expect(opts.transport).toBe('http');expect(opts.takesHoldersAllowList).toEqual(['world']);+ expect(opts.onBehalfOf).toEqual({ header: undefined, requestMeta: undefined });expect(opts.sourceId).toBe('default');expect(opts.metaHook).toBe(getBrainHotMemoryMeta);expect(opts.surface).toBe('full');