Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
gate: keep the F10 description template and the 60-character floor after the starter-list trims
garrytan64c3a01673d3
diff --git a/docs/TOOL_CATALOG.md b/docs/TOOL_CATALOG.mdindex 6a1e694cff..7d6123d9b7 100644--- a/docs/TOOL_CATALOG.md+++ b/docs/TOOL_CATALOG.md@@ -79,7 +79,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S| Tool | Description | Scope | Starter | Gate ||---|---|---|---|---|-| `get_ingest_log` | Recent ingestion log entries: what was already imported. | read | yes | |+| `get_ingest_log` | Recent ingestion log entries: what was already imported, and when. | read | yes | || `log_ingest` | Record one ingestion event (source type, reference, pages updated, summary) in the brain's ingest log. | write | | |## insights@@ -183,7 +183,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S| `put_page` | Complete content REPLACES the whole page: read get_page include_content:true; send its revision as expected_revision. | write | yes | || `put_pages` | Write up to 50 complete Markdown pages (8 MB total) in one call; use instead of put_page for more than 3 pages. | write | | || `put_raw_data` | Store a raw provider payload (API response JSON) alongside a page, keyed by source. | write | | |-| `resolve_slugs` | Fuzzy-match a partial slug or title to page slugs when a slug is uncertain. | read | yes | |+| `resolve_slugs` | Fuzzy-match a partial slug or title to page slugs. | read | yes | || `restore_page` | Restore a soft-deleted page (clear deleted_at) and re-create its markdown file on disk (the counterpart to delete_page removing it; the result write_through field reports the outcome). | write | | || `revert_version` | Restore a page to an earlier version from its history (a new revision; history is kept). | write | | || `unpurge_page` | Owner-only (`gbrain pages unpurge <slug>`). | admin | | |diff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.tsindex 7ee1beef8a..11954c9b84 100644--- a/src/core/operation-manifest.generated.ts+++ b/src/core/operation-manifest.generated.ts@@ -1649,7 +1649,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = ["mutating": false,"idempotent": true,"outputRedaction": "no_stored_text",- "description": "Link provenances (e.g. markdown, manual) with edge counts.",+ "description": "Link provenances (e.g. markdown, manual) with their edge counts.","params": {},"scope": "read","cliHints": {@@ -1755,7 +1755,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = ["name": "add_timeline_entry","idempotent": true,"outputRedaction": "retrieval",- "description": "Append a dated entry to a page timeline. Replays change nothing; the Timeline section needs no call. To change or remove one, edit its bullet via edit_page (expected_revision from get_page).",+ "description": "Append a dated entry to a page timeline. Replays change nothing; the Timeline section needs no call. To change or remove one, edit its bullet via edit_page with expected_revision.","params": {"request_id": {"type": "string",@@ -1788,11 +1788,11 @@ export const OPERATION_MANIFEST: OperationMeta[] = [},"detail": {"type": "string",- "description": "Longer text."+ "description": "Details."},"source": {"type": "string",- "description": "Provenance slug or URL."+ "description": "Source slug or URL."}},"mutating": true,@@ -2792,7 +2792,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = ["mutating": false,"idempotent": true,"outputRedaction": "no_stored_text",- "description": "Fuzzy-match a partial slug or title to page slugs when a slug is uncertain. Needs read scope.",+ "description": "Fuzzy-match a partial slug or title to page slugs. Use when a slug is uncertain. Needs read scope.","params": {"partial": {"type": "string",@@ -2877,7 +2877,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = ["mutating": false,"idempotent": true,"outputRedaction": "retrieval",- "description": "Recent ingestion log entries: what was already imported.",+ "description": "Recent ingestion log entries: what was already imported, and when.","params": {"limit": {"type": "number",diff --git a/src/core/ops/chunks.ts b/src/core/ops/chunks.tsindex 509a6431f3..43cbc80095 100644--- a/src/core/ops/chunks.ts+++ b/src/core/ops/chunks.ts@@ -19,7 +19,7 @@ const resolve_slugs: Operation = {mutating: false,idempotent: true,outputRedaction: 'no_stored_text',- description: 'Fuzzy-match a partial slug or title to page slugs when a slug is uncertain. Needs read scope.',+ description: 'Fuzzy-match a partial slug or title to page slugs. Use when a slug is uncertain. Needs read scope.',params: {partial: { type: 'string', required: true, description: "Partial slug or title, e.g. 'alice-ex'." },source_id: {diff --git a/src/core/ops/ingest-log.ts b/src/core/ops/ingest-log.tsindex 93ca261b1f..2235a2dfb7 100644--- a/src/core/ops/ingest-log.ts+++ b/src/core/ops/ingest-log.ts@@ -47,7 +47,7 @@ const get_ingest_log: Operation = {mutating: false,idempotent: true,outputRedaction: 'retrieval',- description: 'Recent ingestion log entries: what was already imported.',+ description: 'Recent ingestion log entries: what was already imported, and when.',params: {limit: { type: 'number', description: 'Default 20.' },},diff --git a/src/core/ops/links.ts b/src/core/ops/links.tsindex 363c73c5a4..f496558410 100644--- a/src/core/ops/links.ts+++ b/src/core/ops/links.ts@@ -427,7 +427,7 @@ const list_link_sources: Operation = {// v114 (#1941): the read-side counterpart to link-add/link-rm. Since// link_source is now an open kebab provenance (no allowlist), this is how an// agent discovers which provenances a brain actually carries.- description: 'Link provenances (e.g. markdown, manual) with edge counts.',+ description: 'Link provenances (e.g. markdown, manual) with their edge counts.',params: {},handler: async (ctx) => {// Route through sourceScopeOpts so the read honors both scalar ctx.sourceIddiff --git a/src/core/ops/timeline.ts b/src/core/ops/timeline.tsindex 5aeea9cc5a..13a392c113 100644--- a/src/core/ops/timeline.ts+++ b/src/core/ops/timeline.ts@@ -24,15 +24,15 @@ const add_timeline_entry: Operation = {name: 'add_timeline_entry',idempotent: true,outputRedaction: 'retrieval',- description: 'Append a dated entry to a page timeline. Replays change nothing; the Timeline section needs no call. To change or remove one, edit its bullet via edit_page (expected_revision from get_page).',+ description: 'Append a dated entry to a page timeline. Replays change nothing; the Timeline section needs no call. To change or remove one, edit its bullet via edit_page with expected_revision.',params: {request_id: WRITE_REQUEST_PARAM,...MERGE_PRECONDITION_PARAMS,slug: { type: 'string', description: 'Page slug.', required: true },date: { type: 'string', required: true, description: 'YYYY-MM-DD.' },summary: { type: 'string', required: true, description: 'One line.' },- detail: { type: 'string', description: 'Longer text.' },- source: { type: 'string', description: 'Provenance slug or URL.' },+ detail: { type: 'string', description: 'Details.' },+ source: { type: 'string', description: 'Source slug or URL.' },},mutating: true,scope: 'write',diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.jsonindex a515ec88ae..96f6d69555 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": 230856,- "stdoutSha256": "1cfbe67abedfc85e1125062fa7f74015e75573f597c65f94262f914110cdbe6b",+ "stdoutBytes": 230858,+ "stdoutSha256": "4bcd48788a03811e88996b3f24ecf2c827ffef82e6f612b4074ffd87a0d4822e","toolNames": ["remember","entity",@@ -2014,7 +2014,7 @@"scope": "read"},{- "description": "Link provenances (e.g. markdown, manual) with edge counts.",+ "description": "Link provenances (e.g. markdown, manual) with their edge counts.","idempotent": true,"local_only": false,"mutating": false,@@ -2138,7 +2138,7 @@"scope": "read"},{- "description": "Append a dated entry to a page timeline. Replays change nothing; the Timeline section needs no call. To change or remove one, edit its bullet via edit_page (expected_revision from get_page).",+ "description": "Append a dated entry to a page timeline. Replays change nothing; the Timeline section needs no call. To change or remove one, edit its bullet via edit_page with expected_revision.","idempotent": true,"local_only": false,"mutating": true,@@ -2161,7 +2161,7 @@"type": "string"},"detail": {- "description": "Longer text.",+ "description": "Details.","type": "string"},"expected_revision": {@@ -2181,7 +2181,7 @@"type": "string"},"source": {- "description": "Provenance slug or URL.",+ "description": "Source slug or URL.","type": "string"},"summary": {@@ -3314,7 +3314,7 @@"scope": "read"},{- "description": "Fuzzy-match a partial slug or title to page slugs when a slug is uncertain. Needs read scope.",+ "description": "Fuzzy-match a partial slug or title to page slugs. Use when a slug is uncertain. Needs read scope.","idempotent": true,"local_only": false,"mutating": false,@@ -3425,7 +3425,7 @@"scope": "write"},{- "description": "Recent ingestion log entries: what was already imported.",+ "description": "Recent ingestion log entries: what was already imported, and when.","idempotent": true,"local_only": false,"mutating": false,diff --git a/test/mcp-schema-budget.test.ts b/test/mcp-schema-budget.test.tsindex c5ec91e93f..e37e3395d5 100644--- a/test/mcp-schema-budget.test.ts+++ b/test/mcp-schema-budget.test.ts@@ -67,14 +67,15 @@ const PARAM_DESCRIPTION_HARD_CAP = 200;* entity 470 -> 550: the additive `names` param (resolve up to 50 names in one* call, Cat 40 Hard round 4), measured at 546 with the `name` example and part* of the miss sentence trimmed so the served starter list stays under 25,000.- * add_timeline_entry 680 -> 740 (#5970, wave 15): the description names the+ * add_timeline_entry 680 -> 730 (#5970, wave 15): the description names the* correction route (edit its bullet via edit_page with expected_revision),- * measured at 739; paid for by trimming get_ingest_log, list_write_requests,- * traverse_graph, resolve_slugs and list_link_sources text (no pinned phrase- * touched) so the served starter list stays under 25,000.+ * measured at 720 after its own text was tightened; get_ingest_log,+ * list_write_requests, traverse_graph and list_link_sources lost redundant+ * words (no pinned phrase, every description still >= 60 characters) so the+ * served starter list stays at or under 25,000.*/const TOOL_BUDGETS: Record<string, number> = {- add_timeline_entry: 740, cancel_job: 270, cancel_write_request: 350, capture: 1250, context_pack: 760,+ add_timeline_entry: 730, cancel_job: 270, cancel_write_request: 350, capture: 1250, context_pack: 760,delete_skill: 810, delta: 830, edit_page: 1090, entity: 550, find_anomalies: 520, forget: 560, get_agent_job: 270,get_backlinks: 770, get_ingest_log: 280, get_page: 930, get_recent_salience: 660, get_skill: 910,get_skill_asset: 790, get_write_request: 360, join_brain: 560, leave_brain: 540, list_brain_skillpack: 230,