Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Keep query's token_budget description as published in memory-provider contracts v3 to v5

garrytan07c603d2b66f
diff --git a/docs/contracts/qm-memory-provider/v3.json b/docs/contracts/qm-memory-provider/v3.json
index faf5987cdd..d8b9d8f2d7 100644
--- a/docs/contracts/qm-memory-provider/v3.json
+++ b/docs/contracts/qm-memory-provider/v3.json
@@ -889,7 +889,7 @@
},
"token_budget": {
"type": "number",
- "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused)."
+ "description": "Evidence token cap."
},
"expand": {
"type": "boolean",
diff --git a/docs/contracts/qm-memory-provider/v4.json b/docs/contracts/qm-memory-provider/v4.json
index ec9e0f2b95..6e4f25180f 100644
--- a/docs/contracts/qm-memory-provider/v4.json
+++ b/docs/contracts/qm-memory-provider/v4.json
@@ -981,7 +981,7 @@
},
"token_budget": {
"type": "number",
- "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused)."
+ "description": "Evidence token cap."
},
"expand": {
"type": "boolean",
diff --git a/docs/contracts/qm-memory-provider/v5.json b/docs/contracts/qm-memory-provider/v5.json
index 47bb2ebb52..12264cfd0c 100644
--- a/docs/contracts/qm-memory-provider/v5.json
+++ b/docs/contracts/qm-memory-provider/v5.json
@@ -982,7 +982,7 @@
},
"token_budget": {
"type": "number",
- "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused)."
+ "description": "Evidence token cap."
},
"expand": {
"type": "boolean",
diff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.ts
index 2410848f19..907281e8ca 100644
--- a/src/core/operation-manifest.generated.ts
+++ b/src/core/operation-manifest.generated.ts
@@ -1592,7 +1592,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"token_budget": {
"type": "number",
- "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).",
+ "description": "Evidence token cap.",
"fullSurfaceOnly": true
},
"expand": {
diff --git a/src/core/ops/search.ts b/src/core/ops/search.ts
index 471499e998..47d6f885f4 100644
--- a/src/core/ops/search.ts
+++ b/src/core/ops/search.ts
@@ -894,7 +894,7 @@ const query: Operation = {
snippet_chars: SNIPPET_CHARS_PARAM,
return_unit: RETURN_UNIT_PARAM,
return_window: RETURN_WINDOW_PARAM,
- token_budget: { type: 'number', description: 'Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).', fullSurfaceOnly: true },
+ token_budget: { type: 'number', description: 'Evidence token cap.', fullSurfaceOnly: true },
expand: { type: 'boolean', description: 'Default off; one LLM call, rarely helps.' },
detail: { type: 'string', description: 'low (compiled truth), medium (default) or high (all chunks).', fullSurfaceOnly: true },
fields: FIELDS_PARAM,
diff --git a/test/fixtures/goldens/cli/help-and-errors.json b/test/fixtures/goldens/cli/help-and-errors.json
index 10d847ed51..1a98c6399a 100644
--- a/test/fixtures/goldens/cli/help-and-errors.json
+++ b/test/fixtures/goldens/cli/help-and-errors.json
@@ -755,7 +755,7 @@
" --snippet-chars Chars per row (0 = full).",
" --return-unit Default auto: whole conversations.",
" --return-window Window radius 1-3.",
- " --token-budget Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).",
+ " --token-budget Evidence token cap.",
" --expand Default off; one LLM call, rarely helps.",
" --detail low (compiled truth), medium (default) or high (all chunks).",
" --fields lean (remote default) or full.",
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index 3c653610ca..50608ea264 100644
--- a/test/fixtures/goldens/cli/tools-json.json
+++ b/test/fixtures/goldens/cli/tools-json.json
@@ -2,8 +2,8 @@
"golden": {
"exitCode": 0,
"stderr": "",
- "stdoutBytes": 287391,
- "stdoutSha256": "51a7dcc245905a6d87a0154f6fd702442eee4e536026bcba4512a8481ed43962",
+ "stdoutBytes": 287261,
+ "stdoutSha256": "11bcd0f833dfdd13c8911e943508f53e2eaef4ec0aa7baf3f65a983f8fa64d8f",
"toolNames": [
"remember",
"entity",
@@ -2059,7 +2059,7 @@
"type": "string"
},
"token_budget": {
- "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).",
+ "description": "Evidence token cap.",
"type": "number"
},
"types": {