Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs(mcp-host): say where chat files go now, and what the isolation covers

marcoteb908c7c790ab3
diff --git a/mcp-host/README.md b/mcp-host/README.md
index 5489ef3c9..acd1016d3 100644
--- a/mcp-host/README.md
+++ b/mcp-host/README.md
@@ -152,7 +152,7 @@ The schema is permissive (`additionalProperties: { type: boolean }`) so adding a
### Document and chart tools
-The `clerum__generate_*` tools write their files to the output folder: `/output` in a workflow run and `<workspace>/outputs` in chat, unless `CLERUM_OUTPUT_DIR` names another. Each generator loads its library on first use.
+The `clerum__generate_*` tools write their files to the output folder: `/output` in a workflow run, unless `CLERUM_OUTPUT_DIR` names another, and in chat each caller's own `<workspace>/users/<key>/.clerum-outputs`, which only that caller lists and downloads; `CLERUM_OUTPUT_DIR` is not used in chat. Files written to `<workspace>/outputs` before chat files became per caller stay there, are no longer listed or served, and are counted in a log line at startup. Each generator loads its library on first use.
Charts, PDFs, and the measuring of DOCX tables and slide text read system fonts through `@napi-rs/canvas`, a native module. The images install them: `font-dejavu font-noto font-noto-cjk font-noto-arabic font-noto-hebrew` on Alpine (`Dockerfile`), and `fonts-dejavu-core fonts-noto-core fonts-noto-cjk` on Debian (`Dockerfile.slim`, `Dockerfile.full`, `Dockerfile.desktop`). Without them, the bundled Roboto still draws Latin, Greek and Cyrillic, but CJK, Arabic, Hebrew, arrows and check marks have no glyph to draw. A machine that runs the tests needs the same packages: CI installs the Debian ones for mcp-host, and the font tests fail in CI when they are missing.
diff --git a/mcp-host/src/main.ts b/mcp-host/src/main.ts
index cf9be3611..01bd89e7e 100644
--- a/mcp-host/src/main.ts
+++ b/mcp-host/src/main.ts
@@ -2640,6 +2640,12 @@ function subscribeActivity(onEvent: (event: HostActivityEvent) => void): {
* unserved and untouched; one line says how many there are.
*/
function logSharedOutputs(): void {
+ if (process.env.CLERUM_OUTPUT_DIR) {
+ logger.warn(
+ { component: 'GeneratedOutputs' },
+ 'CLERUM_OUTPUT_DIR is not used in chat; generated files go to each caller folder'
+ )
+ }
countSharedOutputs(getOutputDir()).then(
found => {
if (found?.files) {
diff --git a/mcp-host/src/workspace/callerOutputs.ts b/mcp-host/src/workspace/callerOutputs.ts
index 5ef4b0557..c36099d65 100644
--- a/mcp-host/src/workspace/callerOutputs.ts
+++ b/mcp-host/src/workspace/callerOutputs.ts
@@ -2,9 +2,11 @@
* Where a chat caller's generated files live: a reserved directory inside the
* caller's own verified root (`<host>/users/<key>/.clerum-outputs`), the root
* file_read and file_write use, but out of reach of those tools. Generation,
- * attachment, listing and download all resolve it, so one user never reaches
- * another's files, not even by guessing a name. A directory that cannot be
- * verified is never replaced by a shared one.
+ * attachment, listing and download all resolve it, so through them one user
+ * never reaches another's files, not even by guessing a name. A directory that
+ * cannot be verified is never replaced by a shared one. shell_exec is not
+ * confined: an approved command runs as the Host and can read any caller's
+ * folder.
*/
import * as fs from 'node:fs'
import * as path from 'node:path'