@imenam/xls-reader 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -100,7 +100,7 @@ Exports a workbook as a JSON file, with **no size limit**, and writes it **on th
100
100
  | `destination_overwrite` | `boolean` | ❌ | Replace the destination file if it exists (default: `false`) |
101
101
  | `destination_relay` | `boolean` | ❌ | Filled in by the relay, never by the agent |
102
102
 
103
- The exported file never passes through the conversation. When this MCP runs next to the agent (stdio), it writes the file itself. Behind [`@imenam/mcp-http-gateway`](https://www.npmjs.com/package/@imenam/mcp-http-gateway) it runs on the gateway's machine and cannot reach the agent's disk: it then returns the bytes, and the relay — which *does* run on the agent machine — writes them at `destination_path`. That path requires `GATEWAY_INLINE_WRITE_ROOTS` in the relay's `env` block; without it the call fails explicitly rather than dropping the file on the wrong machine.
103
+ The exported file never passes through the conversation. When this MCP runs next to the agent (stdio), it writes the file itself. Behind [`@imenam/mcp-http-gateway`](https://www.npmjs.com/package/@imenam/mcp-http-gateway) it runs on the gateway's machine and cannot reach the agent's disk: it then returns the bytes, and the relay — which *does* run on the agent machine — writes them at `destination_path`. The relay keeps that path to itself and never forwards it, which is why the tool schema declares it optional; the tool rejects a call that lacks it when it has to write the file itself. That path requires `GATEWAY_INLINE_WRITE_ROOTS` in the relay's `env` block; without it the call fails explicitly rather than dropping the file on the wrong machine.
104
104
 
105
105
  The file content is:
106
106
 
package/dist/index.js CHANGED
@@ -125,7 +125,12 @@ server.tool("export_workbook", [
125
125
  .boolean()
126
126
  .optional()
127
127
  .describe("Treat the first row as a column header (default: true)"),
128
- destination_path: z.string().describe(RELAY_SHAPE_DESCRIPTIONS.destination_path),
128
+ // Optionnel au niveau du schéma : le relais retient ce chemin et ne le transmet pas.
129
+ // deliverFile l'exige quand l'écriture a lieu ici.
130
+ destination_path: z
131
+ .string()
132
+ .optional()
133
+ .describe(`${RELAY_SHAPE_DESCRIPTIONS.destination_path}. Required`),
129
134
  filename: z.string().describe(RELAY_SHAPE_DESCRIPTIONS.filename),
130
135
  destination_overwrite: z
131
136
  .boolean()
package/dist/relay.js CHANGED
@@ -50,6 +50,9 @@ export function deliverFile(data, mimeType, target) {
50
50
  ];
51
51
  }
52
52
  // Pas de relais : le MCP tourne à côté de l'agent, son disque est le bon.
53
+ if (!target.destination_path) {
54
+ throw new Error("destination_path is required: the absolute directory where the file is written.");
55
+ }
53
56
  if (!path.isAbsolute(target.destination_path)) {
54
57
  throw new Error(`destination_path must be an absolute directory path: ${target.destination_path}`);
55
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imenam/xls-reader",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "MCP server that lets AI agents read Excel files: list sheets and render any sheet as a Markdown table.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",