Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(mcp-host): require download receipts for human gfs paths
Alfredo Lopez2bbd9917fcd6
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex 72e547824..f9d86951e 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.497",+ "version": "0.1.498","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.497",+ "version": "0.1.498","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 986221fc3..a7e1eacfc 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.497",+ "version": "0.1.498","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/core/reasoning/__tests__/promptBuilder.test.ts b/mcp-host/src/core/reasoning/__tests__/promptBuilder.test.tsindex c65bfbfdb..9b0964486 100644--- a/mcp-host/src/core/reasoning/__tests__/promptBuilder.test.ts+++ b/mcp-host/src/core/reasoning/__tests__/promptBuilder.test.ts@@ -45,6 +45,8 @@ describe('DefaultPromptBuilder — governed GFS workspace files', () => {const msg = builder.buildSystemPrompt([tool('clerum__gfs_download')])expect(msg.content).toContain(GFS_WORKSPACE_FILE_GUIDANCE_TEXT)expect(msg.content).toContain('never invent a resourceId')+ expect(msg.content).toContain('call `clerum__gfs_download` and use the exact `path`')+ expect(msg.content).toContain('never guess a `.gfs-downloads/<filename>` path')expect(msg.content).toContain('write outputs outside `.gfs-downloads`')})diff --git a/mcp-host/src/core/reasoning/promptBuilder.ts b/mcp-host/src/core/reasoning/promptBuilder.tsindex 80fc33ba3..f5e97d3d6 100644--- a/mcp-host/src/core/reasoning/promptBuilder.ts+++ b/mcp-host/src/core/reasoning/promptBuilder.ts@@ -64,6 +64,7 @@ export const DESKTOP_ENVIRONMENT_HINT =*/export const GFS_WORKSPACE_FILE_GUIDANCE_TEXT ='GFS RESOURCE IDs: GFS resource tools require the drive and a real resourceId from an accessible/list/resolve result or a turn file reference. When the user provides a human path, discover that exact path with `clerum__gfs_accessible` and `clerum__gfs_list` before downloading; never invent a resourceId or pass the path as the id. ' ++ 'After discovering a human path, call `clerum__gfs_download` and use the exact `path` from its `workspace_file` result; never guess a `.gfs-downloads/<filename>` path. ' +'GFS WORKSPACE FILES: When a GFS result says `delivery:"workspace_file"`, its `path` is relative to the caller workspace and the file is already present locally. ' +'Do not print, `file_read`, or paste the whole source. If analysis or conversion is needed, use an approved `shell_exec` command or script with that relative path, write outputs outside `.gfs-downloads`, and return only bounded counts, aggregates, errors, or small samples. ' +GFS_LOCAL_PROCESSING_GUIDANCE +