Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(mcp-host): make csv local processing guidance explicit
Alfredo Lopez09a55fb82ab8
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex abfaeaddd..72e547824 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.496",+ "version": "0.1.497","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.496",+ "version": "0.1.497","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 4c3a21aba..986221fc3 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.496",+ "version": "0.1.497","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/tools/__tests__/shell.test.ts b/mcp-host/src/core/tools/__tests__/shell.test.tsindex e147698bb..4e089e12d 100644--- a/mcp-host/src/core/tools/__tests__/shell.test.ts+++ b/mcp-host/src/core/tools/__tests__/shell.test.ts@@ -84,6 +84,8 @@ describe('ShellTool', () => {const resolverBase = JSON.parse(description.match(/createRequire\(("(?:[^"\\]|\\.)*")\)/)![1]) as string+ expect(description).toContain('load fast-csv through that resolver and use parseStream')+ expect(description).toContain('exceljs.csv is not available')await writeFile(join(workspacePath, 'input.csv'),'id,"label,name",notes\r\n' +diff --git a/mcp-host/src/core/tools/shell.ts b/mcp-host/src/core/tools/shell.tsindex c1010eb7a..dc861f55f 100644--- a/mcp-host/src/core/tools/shell.ts+++ b/mcp-host/src/core/tools/shell.ts@@ -104,7 +104,7 @@ export class ShellTool implements Tool {'Supports full shell syntax (pipes, redirects, &&, etc.). ' +'Commands run with a timeout and restricted environment. ' +`Node.js executable: ${JSON.stringify(process.execPath)}. ` +- `Resolve installed Host libraries with require('node:module').createRequire(${JSON.stringify(require.resolve('exceljs'))}); the existing exceljs dependency includes fast-csv for streaming CSV parsing. ` ++ `Resolve installed Host libraries with require('node:module').createRequire(${JSON.stringify(require.resolve('exceljs'))}); load fast-csv through that resolver and use parseStream for streaming CSV parsing (exceljs.csv is not available). ` +'Verify any other executable or library before using it. ' +'This tool requires approval before execution.')diff --git a/mcp-host/src/internalTools/gfsReadTypes.ts b/mcp-host/src/internalTools/gfsReadTypes.tsindex 61cfeb78f..f2167bcd9 100644--- a/mcp-host/src/internalTools/gfsReadTypes.ts+++ b/mcp-host/src/internalTools/gfsReadTypes.ts@@ -4,6 +4,7 @@ import type { GfsImageSource, MemoryReservation, VisualInputBudget } from '../viexport const GFS_LOCAL_PROCESSING_GUIDANCE ='Use the Node executable and installed-library resolver advertised by shell_exec; verify any other executable or library instead of assuming Python or additional packages are installed. ' +'Prefer an installed streaming parser for the actual file format and keep memory and output bounded. ' ++ 'For CSV, load fast-csv through that resolver and use its parseStream API; this installation does not expose exceljs.csv. ' +'Count logical records and parse fields according to that format: CSV can contain quoted delimiters, escaped quotes and embedded newlines, so splitting on commas or counting physical lines is not a CSV parser. ' +'Have the script compute and label every reported quantity, including field counts; do not estimate or recount an array in your reply. ' +'Return all requested metadata names within the output budget. A brief summary must still answer every requested part; do not defer an already requested list to another message. ' +