diff --git a/apps/e2e/src/e2e.test.ts b/apps/e2e/src/e2e.test.ts index c156aeb6..75984f74 100644 --- a/apps/e2e/src/e2e.test.ts +++ b/apps/e2e/src/e2e.test.ts @@ -30,8 +30,10 @@ for (const [i, fixtureSuite] of fixtureSuites.entries()) { headers: expectedHeaders, body: expectedBody } = fixture.response ?? {} - const { snapshot = status >= 200 && status < 300 } = - fixture.response ?? {} + const snapshot = + fixture.response?.snapshot ?? + fixtureSuite.snapshot ?? + (status >= 200 && status < 300) const debugFixture = !!(fixture.debug ?? fixtureSuite.debug) let testFn = fixture.only ? test.only : test diff --git a/apps/e2e/src/fixtures.ts b/apps/e2e/src/fixtures.ts index 52fef201..48843740 100644 --- a/apps/e2e/src/fixtures.ts +++ b/apps/e2e/src/fixtures.ts @@ -47,6 +47,9 @@ export type E2ETestFixtureSuite = { /** @default false */ debug?: boolean + + /** @default undefined */ + snapshot?: boolean } const now = Date.now() @@ -354,7 +357,6 @@ export const fixtureSuites: E2ETestFixtureSuite[] = [ { title: 'Basic MCP origin "add" tool call success', compareResponseBodies: true, - // debug: true, fixtures: [ { path: '@dev/test-basic-mcp/add', @@ -385,8 +387,7 @@ export const fixtureSuites: E2ETestFixtureSuite[] = [ }, { title: 'Basic MCP origin "echo" tool call success', - only: true, - debug: true, + snapshot: false, fixtures: [ { path: '@dev/test-basic-mcp/echo', @@ -394,12 +395,38 @@ export const fixtureSuites: E2ETestFixtureSuite[] = [ method: 'POST', json: { nala: 'kitten', + num: 123, now } }, response: { body: [ - { type: 'text', text: JSON.stringify({ nala: 'kitten', now }) } + { + type: 'text', + text: JSON.stringify({ nala: 'kitten', num: 123, now }) + } + ] + } + }, + { + path: '@dev/test-basic-mcp/echo', + request: { + searchParams: { + nala: 'kitten', + num: 123, + now + } + }, + response: { + body: [ + { + type: 'text', + text: JSON.stringify({ + nala: 'kitten', + num: '123', + now: `${now}` + }) + } ] } } diff --git a/apps/gateway/src/lib/update-origin-request.ts b/apps/gateway/src/lib/update-origin-request.ts index cda22bda..247d5c59 100644 --- a/apps/gateway/src/lib/update-origin-request.ts +++ b/apps/gateway/src/lib/update-origin-request.ts @@ -32,7 +32,7 @@ export function updateOriginRequest( // } // Delete all Cloudflare headers since we want origin requests to be agnostic - // to Agentic's choice of API gateway hosting provider. + // to Agentic's choice of hosting provider. for (const headerKey of Object.keys( Object.fromEntries(originRequest.headers.entries()) )) { diff --git a/packages/fixtures/valid/basic-mcp/src/index.ts b/packages/fixtures/valid/basic-mcp/src/index.ts index 3921d035..494109bd 100644 --- a/packages/fixtures/valid/basic-mcp/src/index.ts +++ b/packages/fixtures/valid/basic-mcp/src/index.ts @@ -24,7 +24,7 @@ server.addTool({ server.addTool({ name: 'echo', - description: 'Echos back the input parameters.', + description: 'Echoes back the input parameters.', parameters: z.record(z.string(), z.any()), execute: async (args) => { return JSON.stringify(args)