Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
docs(mcp-host): state what summaryThresholdTokens means under the byte gauge (#731)
Alfredo Lopez3e55a884587c
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex 3e7f11ac3..78c295a2d 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.407",+ "version": "0.1.408","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.407",+ "version": "0.1.408","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex ac875e365..8583d1b03 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.407",+ "version": "0.1.408","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/extensions/prePrune.ts b/mcp-host/src/core/extensions/prePrune.tsindex c65acee45..38b1ac8b9 100644--- a/mcp-host/src/core/extensions/prePrune.ts+++ b/mcp-host/src/core/extensions/prePrune.ts@@ -47,8 +47,19 @@ export interface PrePruneOptions {/** Cuántos turns proteger del tail (default 3). */protectedTailTurns: number/**- * Pass 2: tool messages con `heuristicCount` > este threshold se reemplazan- * por un one-line summary (default 200 tokens).+ * Pass 2: tool messages whose `heuristicCount` exceeds this threshold are+ * replaced by a one-line summary (default 200 tokens).+ *+ * The unit is `heuristicCount`'s `ceil(bytes / 4) + 4`, so the default+ * collapses any tool result over 784 bytes of JSON-escaped content. For+ * prose that is about where the earlier word count put it (151 words); for+ * minified JSON it is far lower, because the word count read a result with+ * no whitespace as a handful of words and never collapsed it. The lower+ * point for JSON is intended: in the context managers pass 2 runs only+ * once pressure has selected compaction, and it never touches the protected+ * tail. The operator-enabled `token-trim` guardrail applies its own+ * `maxInputTokens` gate instead, and with `maxInputTokens` unset it prunes+ * every request.*/summaryThresholdTokens: number/**