Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(mcp-host): specify that Grok projects a GFS read to its tool source
Alfredo Lopez143e65faad2a
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex d32a2ca19..88ca0c35a 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.446",+ "version": "0.1.447","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.446",+ "version": "0.1.447","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 0f9eb847c..3f2614c66 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.446",+ "version": "0.1.447","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/llm/__tests__/grokSubscription.test.ts b/mcp-host/src/llm/__tests__/grokSubscription.test.tsindex cbf4740cc..56a207e16 100644--- a/mcp-host/src/llm/__tests__/grokSubscription.test.ts+++ b/mcp-host/src/llm/__tests__/grokSubscription.test.ts@@ -960,6 +960,44 @@ describe('GrokSubscriptionProvider image input (#784)', () => {})})+ it('T-G4b-2b projects a GFS read to its tool-call source on the Grok wire', async () => {+ // The twin of the Codex test #670 added: a GFS image names the read that+ // produced it, and the contract's closed source union carries it as `tool`.+ const wired = deps()+ const provider = new GrokSubscriptionProvider('grok-4.6', wired as never)++ await provider.completeSingleTurnWithTools(+ userWithImages([+ {+ type: 'image',+ mimeType: 'image/png',+ data: GROK_PNG_2X2_BASE64,+ source: {+ kind: 'gfs',+ drive: 'main',+ resourceId: 'a'.repeat(32),+ gfsUri: `gfs://main/${'a'.repeat(32)}`,+ version: 7,+ name: 'image.png',+ attachmentId: 'gfs-read-attachment',+ toolCallId: 'gfs-read-call',+ },+ },+ ]),+ []+ )++ const body = wired.authorizer.authorize.mock.calls[0][0]+ expect(body.request.messages[0].contentParts[1].source).toEqual({+ kind: 'tool',+ attachmentId: 'gfs-read-attachment',+ toolCallId: 'gfs-read-call',+ })+ const rederived = hashCanonicalGrokRequest(JSON.parse(JSON.stringify(body.request)))+ if (!rederived.ok) throw new Error(rederived.message)+ expect(rederived.value.requestHash).toBe(body.requestHash)+ })+it('T-G4b-3 keeps text and image parts in their original order', async () => {const wired = deps()const provider = new GrokSubscriptionProvider('grok-4.6', wired as never)