Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(mcp): query and search route people/companies/projects by topic to query; starter list keeps 200 chars of headroom (#6040, wave 16)

garrytane186b73105fa
diff --git a/docs/TOOL_CATALOG.md b/docs/TOOL_CATALOG.md
index 7d6123d9b7..ea48fb2065 100644
--- a/docs/TOOL_CATALOG.md
+++ b/docs/TOOL_CATALOG.md
@@ -15,7 +15,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
| `get_status_snapshot` | Snapshot for `gbrain status` thin-client mode: sync freshness + last cycle + queue depths + worker liveness. | admin | | |
| `get_usage` | Aggregate chat usage + cost from the chat_usage_log ledger (per-model and per-phase token counts, cache reads/writes, USD estimates) with explicit coverage fields. | admin | | |
| `get_write_attribution` | Admin read: who created and who last changed a page, or one of its facts, takes or timeline entries. | admin | | |
-| `mute_notice` | Mute a coaching or info notice (or first_run_decisions) for this client; muted: false unmutes. | write | yes | |
+| `mute_notice` | Mute a coaching or info notice (or first_run_decisions) for this client. | write | yes | |
| `quarantine_list` | List quarantined (hidden) and optionally content-flagged pages by scanning page frontmatter, newest-updated first. | admin | | |
| `run_doctor` | Run brain health checks and return a structured DoctorReport (thin-client doctor surface). | admin | | |
| `run_onboard` | Probe brain health + optionally submit onboard remediations. | admin | | |
@@ -52,7 +52,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
| Tool | Description | Scope | Starter | Gate |
|---|---|---|---|---|
-| `request_tools` | More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per OAuth client or stdio session). | read | yes | |
+| `request_tools` | More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per client or stdio session). | read | yes | |
## entities
@@ -146,13 +146,13 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
| Tool | Description | Scope | Starter | Gate |
|---|---|---|---|---|
-| `context_pack` | MEMORY VERB (v1): core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. | read | yes | |
-| `delta` | MEMORY VERB (v1): pages, facts, thread events changed since a cursor, zero LLM. | read | yes | |
+| `context_pack` | MEMORY VERB: core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. | read | yes | |
+| `delta` | MEMORY VERB: pages, facts, thread events changed since a cursor, zero LLM. | read | yes | |
| `entity` | MEMORY VERB (v1): person/company/account card, zero LLM. | read | yes | |
-| `forget` | MEMORY VERB (v1): expire a remembered fact by its fact_id (never a page slug). | write | yes | |
-| `recall` | MEMORY VERB (v1): read saved facts by entity, since or session_id; `query` also searches pages. | read | yes | |
-| `remember` | MEMORY VERB (v1): save facts with provenance. | write | yes | |
-| `synthesize` | [EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB (v1): answer a broad question across pages with citations. | read | yes | |
+| `forget` | MEMORY VERB: expire a remembered fact by its fact_id (never a page slug). | write | yes | |
+| `recall` | MEMORY VERB: read saved facts by entity, since or session_id; `query` also searches pages. | read | yes | |
+| `remember` | MEMORY VERB: save facts with provenance. | write | yes | |
+| `synthesize` | [EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB: answer a broad question across pages with citations. | read | yes | |
## ontology
@@ -167,7 +167,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
| Tool | Description | Scope | Starter | Gate |
|---|---|---|---|---|
-| `cancel_write_request` | Cancel your accepted write before it publishes. | write | yes | |
+| `cancel_write_request` | Cancel your accepted write before it publishes; returns the receipt. | write | yes | |
| `capture` | Quick note ("just remember this"): slugged under inbox/ by date + content hash, so recapturing is idempotent. | write | yes | |
| `delete_page` | Soft-delete a page and remove its markdown file from the source working tree (the source local_path, or sync.repo_path when the source has none). | write | | |
| `edit_page` | Change part of a page: prefer this over put_page for small changes. | write | yes | |
@@ -176,10 +176,10 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
| `get_page` | Read a page by slug. | read | yes | |
| `get_raw_data` | Retrieve raw data for a page. | read | | |
| `get_versions` | Page version history, newest snapshot first. | read | | |
-| `get_write_request` | Read your write's receipt by request_id (after write_pending or a lost reply). | write | yes | |
+| `get_write_request` | Your write's receipt by request_id (after write_pending or a lost reply). | write | yes | |
| `list_page_purges` | Owner-only (`gbrain pages purges list`). | admin | | |
| `list_pages` | List pages with filters. | read | yes | |
-| `list_write_requests` | List your write receipts in one source, newest first, for a lost request_id. | write | yes | |
+| `list_write_requests` | Your write receipts in one source, newest first (for a lost request_id). | write | yes | |
| `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 | | |
@@ -218,7 +218,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
|---|---|---|---|---|
| `assemble_evidence` | Deliver whole evidence for an ordered list of search hits (each {source_id, slug, chunk_id} from a prior search/query result): the same windows, sections or pages `query` returns with return_unit, packed into token_budget. | read | | |
| `cache_stats` | Semantic query-cache introspection: resolved knobs (enabled, similarity threshold, TTL) plus row counts and total hits. | admin | | |
-| `query` | Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). | read | yes | |
+| `query` | Hybrid search plus multi-query expansion for concept/landscape questions and people/companies/projects by topic (expansion recovers synonyms). | read | yes | |
| `rate_answer` | Rate how useful an answer's retrieved evidence was, so this brain ranks better next time (zero LLM calls). | write | | |
| `search` | Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. | read | yes | |
| `search_by_image` | Image-as-query retrieval. | read | | |
@@ -232,11 +232,11 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
|---|---|---|---|---|
| `delete_skill` | CAS-delete a canonical shared skill and revoke future managed activation. | write + skill_editor | yes | |
| `get_skill` | Fetch a skill's prose and follow it: when it says search or store, call the same-named MCP tool here. | read | yes | `mcp.publish_skills` |
-| `get_skill_asset` | Read an approved file from an exact skill revision (data only; never executed). | read | yes | `mcp.publish_skills` |
+| `get_skill_asset` | Read an approved file from an exact skill revision (data, never executed). | read | yes | `mcp.publish_skills` |
| `get_skill_policy` | Read the owner publication policy and CAS epoch, including when sharing is disabled. | admin + skill_publisher | | |
| `join_brain` | Enroll this authenticated principal to follow approved shared skills. | read + skills_member_self | yes | |
| `leave_brain` | Stop only this principal’s enrollment. | read + skills_member_self | yes | |
-| `list_brain_skillpack` | Skillpacks this brain ships, with skills and a scaffold spec to offer the user. | read | yes | `mcp.publish_skills` |
+| `list_brain_skillpack` | Skillpacks this brain ships: skills and a scaffold spec to offer the user. | read | yes | `mcp.publish_skills` |
| `list_skills` | Skills: prose instruction sets (NOT executable code) for tasks with this server's tools, with triggers, usable_tools and unavailable_tools. | read | yes | `mcp.publish_skills` |
| `put_skill` | Publish a complete file-canonical skill revision with CAS and a durable receipt. | write + skill_editor | yes | |
| `set_skill_policy` | Explicitly approve a versioned shared-skill disclosure and follow policy. | admin + skill_publisher | | |
diff --git a/docs/architecture/key-files/core-utilities-1.md b/docs/architecture/key-files/core-utilities-1.md
index 52d0f42e89..dc0df7664a 100644
--- a/docs/architecture/key-files/core-utilities-1.md
+++ b/docs/architecture/key-files/core-utilities-1.md
@@ -52,7 +52,7 @@ The `src/core/cycle.ts` entry is on its own page: [Core Cycle primitive](core-cy
- `src/core/npm-squat-check.ts` — classifies `gbrain` PATH entries as real, foreign npm package, broken, or unknown for doctor's `npm_squat` check. On Windows it normalizes Git Bash/MSYS drive paths (`/c/...` → `C:/...`) and tries the native `.exe` suffix before reporting a broken entry; non-Windows classification keeps the original single-candidate behavior. Pinned by `test/npm-squat-check.test.ts`.
-- `src/core/operations-descriptions.ts` — Constants module for tool descriptions. Pinned via `test/operations-descriptions.test.ts`. Houses `GET_RECENT_SALIENCE_DESCRIPTION`, `FIND_ANOMALIES_DESCRIPTION`, `GET_RECENT_TRANSCRIPTS_DESCRIPTION` plus `LIST_PAGES_DESCRIPTION`, `QUERY_DESCRIPTION`, `SEARCH_DESCRIPTION`. Stable surface for the Tier-2 LLM routing eval — keeping them here keeps the test from binding to whatever is in `operations.ts` at test-run time.
+- `src/core/operations-descriptions.ts` — Constants module for tool descriptions. Pinned via `test/operations-descriptions.test.ts`. Houses `GET_RECENT_SALIENCE_DESCRIPTION`, `FIND_ANOMALIES_DESCRIPTION`, `GET_RECENT_TRANSCRIPTS_DESCRIPTION` plus `LIST_PAGES_DESCRIPTION`, `QUERY_DESCRIPTION`, `SEARCH_DESCRIPTION`. Stable surface for the Tier-2 LLM routing eval — keeping them here keeps the test from binding to whatever is in `operations.ts` at test-run time. Description-edit checklist for `QUERY_DESCRIPTION` / `SEARCH_DESCRIPTION` (and any other text a starter tool serves): no pre-merge lane carries a provider key, so run the routing eval yourself with `GBRAIN_TEST_KEEP_PROVIDER_KEYS=1 bun test test/e2e/salience-llm-routing.test.ts` (Haiku 4.5 at temperature 0, ≈ $0.04; a `search`/`query` rewrite can move concept phrasings such as "all the people that work on X" from `query` to `search` without any unit test noticing), then `bun test test/mcp-schema-budget.test.ts` (per-tool budget, 25,000-character served starter ceiling and its 200-character headroom floor, `MINIMUM_GUIDANCE` pins), `test/operations-descriptions.test.ts`, `test/mcp-instructions-batching.test.ts`, and regenerate with `bun run build:operation-manifest`, `bun run scripts/generate-tool-catalog.ts` and `GBRAIN_TEST_UPDATE_GOLDENS=1 bun test test/cli-goldens.test.ts`. Both descriptions say that people/companies/projects by topic are `query` work: Haiku 4.5 otherwise reads "all the X that do Y" as a `search` list lookup (measured at temperature 1: 28/80 concept phrasings misrouted without the clause, 1/80 with it).
- `src/core/operations.ts` — Contract-first operation contract, served through a ~300-line assembly façade: the op definitions live in the domain modules under `src/core/ops/` (next entry) and are spread into the single exported `operations` array here; the registration loop replaces each handler with `withOutputRedaction(op)`, so a `'retrieval'` op's output is redacted on every dispatch path (see `src/core/ops/contract.ts`); the shared contract types (`src/core/ops/contract.ts`) and the security/scope layer (`src/core/ops/context.ts`) are re-exported through this file, so every import path below resolves through the façade unchanged. The rest of this entry describes the surface as consumers see it. Fresh same-source graph mutations (`add_link`, `add_timeline_entry`) preflight each endpoint against the scalar write source via `requireWritablePage` (`ops/context.ts`); `add_timeline_entry` resolves an authorized stored request before that fresh-write preflight so exact replay retains its outcome after page purge or recreation: a page readable only from another granted source returns endpoint-specific `permission_denied` naming the boundary, pages outside the caller's `get_page` visibility scope stay `page_not_found` (a soft-deleted foreign page is indistinguishable from absence), and a mutation-time engine miss — the typed `PageMissingError` from `src/core/engine-errors.ts`, thrown by both engines' single-statement endpoint resolution — is reclassified into the same envelope by `instanceof`, never message matching. Exports upload validators `validateUploadPath`, `validatePageSlug`, `validateFilename`, plus `matchesSlugAllowList(slug, prefixes)` (glob matcher: `<prefix>/*` matches recursive children; bare `<prefix>` matches exact only). `OperationContext.remote` is a REQUIRED field flagging untrusted callers; `OperationContext.allowedSlugPrefixes` is the trusted-workspace allow-list set by the dream cycle; `OperationContext.auth?: AuthInfo` is threaded through HTTP dispatch for scope enforcement in `serve-http.ts` before the op runs. OAuth `whoami` exposes the authenticated `AuthInfo.sourceId` and `AuthInfo.allowedSources` grants as `source_id` and `federated_read`; absent grants serialize fail-closed as `null` and `[]`, while local, legacy, and stdio response shapes stay unchanged. `enforceSubagentSlugFence(ctx, slug, opName)` is the shared fail-closed subagent write fence: when `viaSubagent` and `allowedSlugPrefixes` is set, the slug must match the allow-list; else the legacy `wiki/agents/<id>/...` namespace check applies. Both `put_page` and `add_timeline_entry` (subagent-allowlisted) route through it. Auto-link/timeline hooks are skipped for remote-owned subagents even with explicit prefixes; only local subagents qualify as trusted workspaces. `enforceClientSlugFence(ctx, slug, opName)` is the OAuth-client write fence: when `ctx.auth.boundSlugPrefixes` is present (threaded from `oauth_clients.bound_slug_prefixes` at token-verification time), every direct slug-mutating write op — `put_page`, `delete_page`, `restore_page`, `add_tag`, `remove_tag`, `add_link`/`remove_link` (`from` endpoint only; linking TO a readable page is a reference), `add_timeline_entry`, `revert_version`, `put_raw_data` — rejects out-of-prefix slugs with `permission_denied`, BEFORE each op's dry-run short-circuit. Direct writes use the shared boundary-aware prefix rules; empty-array binding is deny-all (fail-closed); no auth / no binding = no fence. The match rule itself lives in the exported `slugUnderBoundPrefixes(prefixes, slug)` so non-op write surfaces reuse it verbatim. It is BOUNDARY-AWARE (a prefix matches whole segments, so `emp-alice` does not admit `emp-alice-2/…`), lowercases both sides (stored slugs are lowercased by `validateSlug`, so comparing the caller's raw string would let a mixed-case slug commit and only then trip the resolved-slug re-check), accepts BOTH the trailing-slash and the `<prefix>/*` glob spelling via `normalizeSlugPrefix` (direct and delegated fences share normalization while storing independently reviewed spans), and ignores empty-string prefixes. `assertValidSlugPrefixes` (`oauth-provider.ts`) rejects empty, whitespace-bearing, non-lowercase, and boundary-less entries at registration and rescope. `submit_agent` validates tools and namespaces against the independently stored `bound_tools`, `delegated_slug_prefixes`, and `delegated_namespace` grants. It normalizes accepted prefixes for `matchesSlugAllowList` and rejects explicit empty remote tool or prefix overrides. Workers interpret explicit empty tool lists as no tools, with defaults reserved for absent trusted-local bindings. `put_page` deduplication may resolve another slug by content hash or `frontmatter.id`, but returns an authorized read-only `duplicate` outcome. The original target's revision never authorizes publication to that other page. Preparation and guarded validation recheck the duplicate's current authority, readability, concrete page identity and revision; neither its canonical fields nor its file are written. OAuth and delegated subagent fences still apply, and denials do not name an inaccessible duplicate. Pinned by `test/put-page-dedup-fence.test.ts`. `CLIENT_FENCED_WRITE_OPS` + `enforceBoundClientOpAllowList(auth, op)` are the fail-closed companion, applied once in `src/mcp/dispatch.ts` (the choke point both MCP transports share): a slug-bound client calling ANY `write`/`admin` op not on the allow-list gets `permission_denied`. This covers the ops that write by a key other than a slug and therefore cannot be fenced — `extract_entities`/`extract_facts` (mutate `people/*`, `companies/*`), `forget_fact` (numeric fact id, crosses sources), `ontology_propose` — and makes a write op added later denied-by-default instead of silently unfenced. `think` is on the allow-list because remote callers cannot persist from it. Pinned by `test/client-slug-fence.test.ts` and over-the-wire by `test/qm-provisioning.test.ts`. Every `Operation` carries `scope?: 'read' | 'write' | 'admin'` + `localOnly?: boolean`; `think` is read-scoped for OAuth/MCP because remote callers have `save`/`take` forced off before persistence, while local CLI can still persist via `remote:false`; `sync_brain`, `file_upload`, `file_list`, `file_url` are `admin + localOnly` (rejected over HTTP). Four trust-boundary call sites (`put_page` allowlist, file_upload trust-narrowing, submit_job protected-name guard, auto-link skip) use FAIL-CLOSED semantics: `ctx.remote === false` for trusted-only sites, `ctx.remote !== false` for "untrust unless explicit-false" — anything not strictly `false` is treated as remote (so a read+write OAuth token over HTTP MCP cannot submit `shell` jobs). `sourceScopeOpts(ctx)` encodes the source-scoped read precedence ladder — federated array (`ctx.auth.allowedSources`) wins over scalar (`ctx.sourceId`/`ctx.auth.sourceId`) over nothing; every read-side op handler routes through it so a source-bound OAuth client can't see neighboring sources via `search`/`query`/`list_pages`/`get_page`/`find_experts`/query's image path, plus the by-slug reads `get_tags`/`get_links`/`get_backlinks`/`get_timeline`/`get_chunks` (chunks follow the same ladder as `get_page`, so a federated grant that can open a page can read its chunks — and the chunk payload never carries embedding vectors) (and `get_page`'s tag fetch, which resolves against the concrete page's own `source_id`). `get_tags` resolves `readPolicyOpts`, so an untrusted caller gets no tags for a `visibility: private` page (unless the operator's private-pages opt-out is on) or a soft-deleted page. `assertExplicitSourceLive(ctx, sourceIdParam)` is the async companion for the ops that accept a per-call `source_id` (`get_page`, `list_pages`, `search`, `query`): called right after `federatedSearchScope` (so the grant check has already run and it can only name a granted source), an explicit id with no live unarchived `sources` row throws `unknown_source` instead of silently scoping the read to an empty source — the CLI's `--source` existence rule applied to the op path; `__all__` and an omitted param skip it. `linkReadScopeOpts(ctx, scope?)` is the link-read sibling for `get_links`/`get_backlinks`/`traverse_graph` (`scope` defaults to `sourceScopeOpts(ctx)`; the link ops pass their resolved per-call `federatedSearchScope`): a link row references three pages (from/to/origin), and the engine's federated (`sourceIds[]`) branch scopes ALL THREE while its scalar (`sourceId`) branch scopes only the near endpoint (by design — trusted internal callers like `reconcileLinks` and back-link validators call the engine with a scalar scope and need the cross-source view). For an UNTRUSTED remote caller (`ctx.remote !== false`) carrying only a scalar scope it promotes that scope to a single-element `sourceIds:[id]`, routing them through the all-endpoint branch so a far/origin slug from outside the grant isn't disclosed; a federated array passes through unchanged and trusted local CLI (`ctx.remote === false`) keeps the scalar cross-source view. `thinkSourceScopeOpts(ctx)` maps the same precedence ladder onto `runThink`'s public options (`allowedSources`/`sourceId`) so the `think` op's gather and trajectory stages inherit the caller's source grant. `put_page` submits through `submitPageMutation` to the durable journal. Existing-page replacements require `expected_revision` or explicit `force`; omission is create-only. The designated owner publishes under native root and database guards, with recoverable file replacement and a terminal receipt committed with canonical state. Accepted contention returns `write_pending` after the synchronous wait; admission failure does not fabricate a queued receipt. Git and embeddings report separate effect outcomes. Trusted-local `delete_page` with `purge: true` uses the same journal, revision and recovery protocol: artifact-removal failure preserves the prior row, and exact replay retains the original terminal outcome after deletion. Link provenance surface: `add_link` (`gbrain link`/`link-add`) + `remove_link` (`gbrain unlink`/`link-rm`) expose `link_source`/`link_type`; `add_link` rejects the reconciliation-managed built-ins via `MANAGED_LINK_SOURCES` (`markdown`/`frontmatter`/`mentions`/`wikilink-resolved`) and defaults omitted provenance to `'manual'` (the engine's own default stays `'markdown'` for internal callers); `list_link_sources` (`gbrain link-sources`, read) lists provenances via `sourceScopeOpts`. CLI aliases register through `cliHints.aliases` (collision-guarded in `src/cli.ts`).
- `src/core/ops/contract.ts` — the shared operation types (`Operation`, `OperationContext`, `ParamDef`, `OperationError`). `Operation.outputRedaction: OutputRedactionPolicy` is REQUIRED, so typecheck forces every op to say how its response treats stored text: `'retrieval'` (the whole response passes `redactRetrievalOutput`, uncapped, assignment rule on), `{ retrieval: { localVerbatim: [...] } }` (same, but the named top-level keys stay raw for the trusted local CLI, `ctx.remote === false`; the memory verbs' `facts`), `{ exempt: reason }` (deliberately raw with a one-line reason: page reads `get_page`/`fetch`/`get_chunks`/`get_raw_data`/`get_versions`, skill-catalog files, admin job ops) or `'no_stored_text'` (returns no page, chunk, fact, take or transcript text). `operations.ts` applies the policy at registration (`withOutputRedaction` in `src/core/search/output-redaction.ts`); `test/retrieval-op-redaction.test.ts` sweeps every classified op with a planted secret. `whoami` and the HTTP `gbrain://capabilities` resource choose `oauth` vs `legacy` through `authTransport`, which trusts the verifier-set `AuthInfo.principal` and falls back to the `gbrain_cl_` id prefix only when no principal is present.
diff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.ts
index a602ba4632..1776248cd3 100644
--- a/src/core/operation-manifest.generated.ts
+++ b/src/core/operation-manifest.generated.ts
@@ -14,7 +14,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "remember",
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "MEMORY VERB (v1): save facts with provenance. Set `entity` (the subject) or recall misses it. Branch on `status` (inserted|duplicate|superseded); write_pending: poll get_write_request.",
+ "description": "MEMORY VERB: save facts with provenance. Set `entity` (the subject) or recall misses it. Branch on `status` (inserted|duplicate|superseded); write_pending: poll get_write_request.",
"params": {
"source_id": {
"type": "string",
@@ -30,7 +30,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"content_origin": {
"type": "string",
@@ -151,7 +151,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"mutating": false,
"idempotent": true,
"outputRedaction": "retrieval",
- "description": "[EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB (v1): answer a broad question across pages with citations. For lookups use recall or entity.",
+ "description": "[EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB: answer a broad question across pages with citations. For lookups use recall or entity.",
"params": {
"question": {
"type": "string",
@@ -185,11 +185,11 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "forget",
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "MEMORY VERB (v1): expire a remembered fact by its fact_id (never a page slug). Idempotent; the audit trail is kept.",
+ "description": "MEMORY VERB: expire a remembered fact by its fact_id (never a page slug). Idempotent; the audit trail is kept.",
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"id": {
"type": "string",
@@ -306,7 +306,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"content_origin": {
"type": "string",
@@ -326,7 +326,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"content": {
"type": "string",
"required": true,
- "description": "Complete markdown (get_page include_content:true)."
+ "description": "Complete markdown."
},
"allow_empty": {
"type": "boolean",
@@ -389,7 +389,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"slug": {
"type": "string",
@@ -415,7 +415,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "list_pages",
"idempotent": true,
"outputRedaction": "retrieval",
- "description": "List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; a full page may be truncated: continue with updated_after + updated_after_slug from the last row.",
+ "description": "List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; truncated: continue with updated_after + updated_after_slug from the last row.",
"params": {
"type": {
"type": "string",
@@ -435,7 +435,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"updated_after": {
"type": "string",
- "description": "Only pages updated after this ISO time."
+ "description": "Pages updated after this ISO time."
},
"updated_after_slug": {
"type": "string",
@@ -487,7 +487,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"slug": {
"type": "string",
@@ -542,7 +542,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "capture",
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "Quick note (\"just remember this\"): slugged under inbox/ by date + content hash, so recapturing is idempotent. Use put_page to control slug or type; remember for facts about entities.",
+ "description": "Quick note (\"just remember this\"): slugged under inbox/ by date + content hash, so recapturing is idempotent. put_page controls slug or type; remember is for facts about entities.",
"params": {
"source_id": {
"type": "string",
@@ -558,7 +558,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"content_origin": {
"type": "string",
@@ -694,7 +694,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"expected_revision": {
"type": "string",
"required": true,
- "description": "revision from get_page include_content:true."
+ "description": "From get_page include_content:true."
},
"edits": {
"type": "array",
@@ -706,7 +706,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"old_text": {
"type": "string",
"required": true,
- "description": "Exact text to replace (must occur once)."
+ "description": "Exact text to replace."
},
"new_text": {
"type": "string",
@@ -722,7 +722,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
}
},
"mutating": true,
@@ -791,7 +791,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "get_write_request",
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "Read your write's receipt by request_id (after write_pending or a lost reply). Poll at retry_after_ms until final.",
+ "description": "Your write's receipt by request_id (after write_pending or a lost reply). Poll at retry_after_ms until final.",
"params": {
"request_id": {
"type": "string",
@@ -813,7 +813,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "list_write_requests",
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "List your write receipts in one source, newest first, for a lost request_id.",
+ "description": "Your write receipts in one source, newest first (for a lost request_id).",
"params": {
"source_id": {
"type": "string",
@@ -826,7 +826,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"before": {
"type": "string",
- "description": "next cursor from the previous page."
+ "description": "Previous page's next cursor."
}
},
"scope": "write",
@@ -840,7 +840,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "cancel_write_request",
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "Cancel your accepted write before it publishes. Returns the actual receipt.",
+ "description": "Cancel your accepted write before it publishes; returns the receipt.",
"params": {
"request_id": {
"type": "string",
@@ -862,7 +862,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "search",
"idempotent": true,
"outputRedaction": "retrieval",
- "description": "Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts/landscape: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.",
+ "description": "Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts/landscape or people/companies/projects by topic: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.",
"params": {
"query": {
"type": "string",
@@ -981,7 +981,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "query",
"idempotent": true,
"outputRedaction": "retrieval",
- "description": "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
+ "description": "Hybrid search plus multi-query expansion for concept/landscape questions and people/companies/projects by topic (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
"params": {
"query": {
"type": "string",
@@ -1359,7 +1359,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -1401,7 +1401,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -1693,7 +1693,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"link_type": {
"type": "string",
- "description": "Follow only this link type."
+ "description": "Only this link type."
},
"direction": {
"type": "string",
@@ -1777,7 +1777,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -1969,7 +1969,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"slug": {
"type": "string",
@@ -2166,7 +2166,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"source_id": {
"type": "string",
- "description": "Fetch a brain-resident pack skill from this source."
+ "description": "Brain-resident pack skill from this source."
}
},
"scope": "read",
@@ -2185,7 +2185,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"outputRedaction": {
"exempt": "skill catalog files are installed instructions read verbatim; redaction would corrupt approved revisions"
},
- "description": "Skillpacks this brain ships, with skills and a scaffold spec to offer the user.",
+ "description": "Skillpacks this brain ships: skills and a scaffold spec to offer the user.",
"publishGateKey": "mcp.publish_skills",
"params": {},
"scope": "read",
@@ -2223,7 +2223,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
{
"name": "get_skill_asset",
- "description": "Read an approved file from an exact skill revision (data only; never executed).",
+ "description": "Read an approved file from an exact skill revision (data, never executed).",
"mutating": false,
"idempotent": true,
"outputRedaction": {
@@ -2820,7 +2820,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"partial": {
"type": "string",
"required": true,
- "description": "Partial slug or title, e.g. 'alice-ex'."
+ "description": "Partial slug or title."
},
"source_id": {
"type": "string",
@@ -3571,7 +3571,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -3641,7 +3641,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -3695,7 +3695,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -3765,7 +3765,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -3840,7 +3840,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"expected_revision": {
"type": "string",
@@ -3882,7 +3882,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"slug": {
"type": "string",
@@ -4069,7 +4069,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "request_tools",
"idempotent": false,
"outputRedaction": "no_stored_text",
- "description": "More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per OAuth client or stdio session).",
+ "description": "More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per client or stdio session).",
"area": "discovery",
"agentCallable": true,
"params": {
@@ -4112,7 +4112,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"slugPrefix": {
"type": "string",
- "description": "Slug prefix, e.g. 'wiki/people'."
+ "description": "Slug prefix."
},
"recency_bias": {
"type": "string",
@@ -4818,7 +4818,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry. Managed extraction returns durable receipts; when omitted, each call gets a new UUID. Unmanaged extraction retains its legacy non-journaled behavior."
+ "description": "Reuse only to retry. Managed extraction returns durable receipts; when omitted, each call gets a new UUID. Unmanaged extraction retains its legacy non-journaled behavior."
},
"turn_text": {
"type": "string",
@@ -4868,7 +4868,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
]
}
},
- "description": "MEMORY VERB (v1): read saved facts by entity, since or session_id; `query` also searches pages. Remote callers see world facts only. One card: entity; reasoning: synthesize.",
+ "description": "MEMORY VERB: read saved facts by entity, since or session_id; `query` also searches pages. Remote callers see world facts only. One card: entity; reasoning: synthesize.",
"params": {
"entity": {
"type": "string",
@@ -4974,7 +4974,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
]
}
},
- "description": "MEMORY VERB (v1): core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.",
+ "description": "MEMORY VERB: core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.",
"params": {
"entities": {
"type": "string",
@@ -4986,7 +4986,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"since": {
"type": "string",
- "description": "Only open-thread events after this ISO time."
+ "description": "Open-thread events after this ISO time."
},
"session_id": {
"type": "string",
@@ -5037,7 +5037,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
]
}
},
- "description": "MEMORY VERB (v1): pages, facts, thread events changed since a cursor, zero LLM. Pass session_id, cursor or since.",
+ "description": "MEMORY VERB: pages, facts, thread events changed since a cursor, zero LLM. Pass session_id, cursor or since.",
"params": {
"since": {
"type": "string",
@@ -5100,7 +5100,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"id": {
"type": "number",
@@ -5125,7 +5125,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"params": {
"request_id": {
"type": "string",
- "description": "Optional; reuse only to retry."
+ "description": "Reuse only to retry."
},
"id": {
"type": "number",
@@ -6183,12 +6183,12 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"mutating": true,
"idempotent": true,
"outputRedaction": "no_stored_text",
- "description": "Mute a coaching or info notice (or first_run_decisions) for this client; muted: false unmutes.",
+ "description": "Mute a coaching or info notice (or first_run_decisions) for this client.",
"params": {
"code": {
"type": "string",
"required": true,
- "description": "Notice code, the word after `[gbrain notice` in the block."
+ "description": "The word after `[gbrain notice` in the block."
},
"muted": {
"type": "boolean",
diff --git a/src/core/operations-descriptions.ts b/src/core/operations-descriptions.ts
index 22c1bfb377..5d555848c5 100644
--- a/src/core/operations-descriptions.ts
+++ b/src/core/operations-descriptions.ts
@@ -46,13 +46,13 @@ export const GET_RECENT_TRANSCRIPTS_DESCRIPTION =
// ──────────────────────────────────────────────────────────────────────────────
export const LIST_PAGES_DESCRIPTION =
- "List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; a full page may be truncated: continue with updated_after + updated_after_slug from the last row.";
+ "List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; truncated: continue with updated_after + updated_after_slug from the last row.";
export const QUERY_DESCRIPTION =
- "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.";
+ "Hybrid search plus multi-query expansion for concept/landscape questions and people/companies/projects by topic (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.";
export const SEARCH_DESCRIPTION =
- "Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts/landscape: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.";
+ "Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts/landscape or people/companies/projects by topic: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.";
/** `search`'s `match` param (Cat 40 Hard F2). */
export const SEARCH_MATCH_DESCRIPTION = 'keyword: every match, paged.';
@@ -203,4 +203,4 @@ export const SKILL_CLIENT_GUIDANCE = {
* test/operations-descriptions.test.ts.
*/
export const CAPTURE_DESCRIPTION =
- "Quick note (\"just remember this\"): slugged under inbox/ by date + content hash, so recapturing is idempotent. Use put_page to control slug or type; remember for facts about entities.";
+ "Quick note (\"just remember this\"): slugged under inbox/ by date + content hash, so recapturing is idempotent. put_page controls slug or type; remember is for facts about entities.";
diff --git a/src/core/ops/chunks.ts b/src/core/ops/chunks.ts
index 43cbc80095..af606d3223 100644
--- a/src/core/ops/chunks.ts
+++ b/src/core/ops/chunks.ts
@@ -21,7 +21,7 @@ const resolve_slugs: Operation = {
outputRedaction: 'no_stored_text',
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'." },
+ partial: { type: 'string', required: true, description: 'Partial slug or title.' },
source_id: {
type: 'string',
description: "One source, or '__all__'.",
diff --git a/src/core/ops/facts.ts b/src/core/ops/facts.ts
index fcc0f94929..7c608ee3b5 100644
--- a/src/core/ops/facts.ts
+++ b/src/core/ops/facts.ts
@@ -240,7 +240,7 @@ const recall: Operation = {
mutating: false,
idempotent: true,
outputRedaction: { retrieval: { localVerbatim: ['facts'] } },
- description: 'MEMORY VERB (v1): read saved facts by entity, since or session_id; `query` also searches pages. Remote callers see world facts only. One card: entity; reasoning: synthesize.',
+ description: 'MEMORY VERB: read saved facts by entity, since or session_id; `query` also searches pages. Remote callers see world facts only. One card: entity; reasoning: synthesize.',
params: {
entity: { type: 'string', description: 'Entity slug; its facts.' },
question: { type: 'string', description: 'Rank facts by relevance to it.' },
@@ -661,11 +661,11 @@ const context_pack: Operation = {
mutating: false,
idempotent: true,
outputRedaction: { retrieval: { localVerbatim: ['facts'] } },
- description: 'MEMORY VERB (v1): core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.',
+ description: 'MEMORY VERB: core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.',
params: {
entities: { type: 'string', description: 'Comma-separated names or slugs (max 8).' },
budget_tokens: { type: 'number', description: 'Token budget; cards pack first.' },
- since: { type: 'string', description: 'Only open-thread events after this ISO time.' },
+ since: { type: 'string', description: 'Open-thread events after this ISO time.' },
session_id: { type: 'string', description: 'Opaque session id.' },
include_private: { type: 'boolean', description: 'Local trusted callers only.' },
min_trust: MIN_TRUST_PARAM,
@@ -822,7 +822,7 @@ const delta: Operation = {
mutating: false,
idempotent: true,
outputRedaction: { retrieval: { localVerbatim: ['facts'] } },
- description: 'MEMORY VERB (v1): pages, facts, thread events changed since a cursor, zero LLM. Pass session_id, cursor or since.',
+ description: 'MEMORY VERB: pages, facts, thread events changed since a cursor, zero LLM. Pass session_id, cursor or since.',
params: {
since: { type: 'string', description: 'ISO 8601 start time.' },
since_slug: { type: 'string', description: 'Legacy: next_cursor.slug.' },
diff --git a/src/core/ops/links.ts b/src/core/ops/links.ts
index f496558410..3dbc1560f2 100644
--- a/src/core/ops/links.ts
+++ b/src/core/ops/links.ts
@@ -526,7 +526,7 @@ const traverse_graph: Operation = {
params: {
slug: { type: 'string', description: 'Start page slug.', required: true },
depth: { type: 'number', description: `Max depth (cap ${TRAVERSE_DEPTH_CAP}).` },
- link_type: { type: 'string', description: 'Follow only this link type.' },
+ link_type: { type: 'string', description: 'Only this link type.' },
direction: { type: 'string', description: 'Remote default both.', enum: ['in', 'out', 'both'] },
hops: {
type: 'array',
diff --git a/src/core/ops/notices.ts b/src/core/ops/notices.ts
index 78223ae892..1e51ac8740 100644
--- a/src/core/ops/notices.ts
+++ b/src/core/ops/notices.ts
@@ -16,9 +16,9 @@ const mute_notice: Operation = {
mutating: true,
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'Mute a coaching or info notice (or first_run_decisions) for this client; muted: false unmutes.',
+ description: 'Mute a coaching or info notice (or first_run_decisions) for this client.',
params: {
- code: { type: 'string', required: true, description: 'Notice code, the word after `[gbrain notice` in the block.' },
+ code: { type: 'string', required: true, description: 'The word after `[gbrain notice` in the block.' },
muted: { type: 'boolean', description: 'false unmutes. Default true.' },
},
scope: 'write',
diff --git a/src/core/ops/page-edit.ts b/src/core/ops/page-edit.ts
index 5960703c88..3389443006 100644
--- a/src/core/ops/page-edit.ts
+++ b/src/core/ops/page-edit.ts
@@ -14,14 +14,14 @@ const edit_page: Operation = {
description: 'Change part of a page: prefer this over put_page for small changes. expected_revision is the revision from get_page include_content:true. Each old_text must match exactly once; edits apply in order, all or none. Stale revision: revision_conflict.',
params: {
slug: { type: 'string', description: 'Page slug.', required: true },
- expected_revision: { type: 'string', required: true, description: 'revision from get_page include_content:true.' },
+ expected_revision: { type: 'string', required: true, description: 'From get_page include_content:true.' },
edits: {
type: 'array', required: true,
description: `1 to ${EDIT_PAGE_MAX_EDITS} {old_text, new_text} replacements.`,
items: {
type: 'object',
properties: {
- old_text: { type: 'string', required: true, description: 'Exact text to replace (must occur once).' },
+ old_text: { type: 'string', required: true, description: 'Exact text to replace.' },
new_text: { type: 'string', required: true, description: 'Replacement; empty deletes.' },
},
},
diff --git a/src/core/ops/pages.ts b/src/core/ops/pages.ts
index e65a02bbd0..2d3e0c9625 100644
--- a/src/core/ops/pages.ts
+++ b/src/core/ops/pages.ts
@@ -305,7 +305,7 @@ const put_page: Operation = {
params: {
...AGENT_CONTENT_PARAMS,
slug: { type: 'string', description: 'Page slug.', required: true },
- content: { type: 'string', required: true, description: 'Complete markdown (get_page include_content:true).' },
+ content: { type: 'string', required: true, description: 'Complete markdown.' },
allow_empty: { type: 'boolean', required: false, description: 'Allow emptying the page.' },
drop_timeline: { type: 'boolean', required: false, description: 'No Timeline in content: delete its entries.' },
wait_ms: WRITE_WAIT_PARAM,
@@ -474,7 +474,7 @@ const list_pages: Operation = {
// v0.29 — surface filter that already exists on PageFilters.
updated_after: {
type: 'string',
- description: 'Only pages updated after this ISO time.',
+ description: 'Pages updated after this ISO time.',
},
updated_after_slug: {
type: 'string',
diff --git a/src/core/ops/persistence.ts b/src/core/ops/persistence.ts
index cd9ee52b75..4d762d85e9 100644
--- a/src/core/ops/persistence.ts
+++ b/src/core/ops/persistence.ts
@@ -140,7 +140,7 @@ export const persistenceOperations: Operation[] = [
name: 'get_write_request',
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'Read your write\'s receipt by request_id (after write_pending or a lost reply). Poll at retry_after_ms until final.',
+ description: 'Your write\'s receipt by request_id (after write_pending or a lost reply). Poll at retry_after_ms until final.',
params: { request_id: requestParam },
scope: 'write', mutating: false, area: 'pages',
cliHints: { name: 'write-request', positional: ['request_id'] },
@@ -157,11 +157,11 @@ export const persistenceOperations: Operation[] = [
name: 'list_write_requests',
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'List your write receipts in one source, newest first, for a lost request_id.',
+ description: 'Your write receipts in one source, newest first (for a lost request_id).',
params: {
source_id: { type: 'string', description: 'Default: yours.' },
limit: { type: 'number', default: 25, description: '1-100 (default 25).' },
- before: { type: 'string', description: 'next cursor from the previous page.' },
+ before: { type: 'string', description: "Previous page's next cursor." },
},
scope: 'write', mutating: false, area: 'pages',
cliHints: { name: 'write-requests' },
@@ -190,7 +190,7 @@ export const persistenceOperations: Operation[] = [
name: 'cancel_write_request',
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'Cancel your accepted write before it publishes. Returns the actual receipt.',
+ description: 'Cancel your accepted write before it publishes; returns the receipt.',
params: { request_id: requestParam },
scope: 'write', mutating: true, area: 'pages',
cliHints: { name: 'cancel-write-request', positional: ['request_id'] },
diff --git a/src/core/ops/request-tools.ts b/src/core/ops/request-tools.ts
index 74d9f626c7..711ec08332 100644
--- a/src/core/ops/request-tools.ts
+++ b/src/core/ops/request-tools.ts
@@ -159,7 +159,7 @@ const request_tools: Operation = {
name: 'request_tools',
idempotent: false,
outputRedaction: 'no_stored_text',
- description: 'More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per OAuth client or stdio session).',
+ description: 'More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per client or stdio session).',
area: 'discovery',
// FOV-4: callable by read OR agent scope — discovery for every token class.
agentCallable: true,
diff --git a/src/core/ops/salience.ts b/src/core/ops/salience.ts
index f167d00345..9ab610402f 100644
--- a/src/core/ops/salience.ts
+++ b/src/core/ops/salience.ts
@@ -29,7 +29,7 @@ const get_recent_salience: Operation = {
limit: { type: 'number', description: 'Max results (default 20).' },
slugPrefix: {
type: 'string',
- description: "Slug prefix, e.g. 'wiki/people'.",
+ description: 'Slug prefix.',
},
recency_bias: {
type: 'string',
diff --git a/src/core/ops/skills-catalog.ts b/src/core/ops/skills-catalog.ts
index a627530d15..09d34b456e 100644
--- a/src/core/ops/skills-catalog.ts
+++ b/src/core/ops/skills-catalog.ts
@@ -93,7 +93,7 @@ const get_skill: Operation = {
},
source_id: {
type: 'string',
- description: 'Fetch a brain-resident pack skill from this source.',
+ description: 'Brain-resident pack skill from this source.',
},
},
handler: async (ctx, p) => {
@@ -139,7 +139,7 @@ const sharedSkillMutationParams: Operation['params'] = {
expected_revision: { type: 'string', description: 'Current revision UUID; JSON null for creation.' },
};
const get_skill_asset: Operation = {
- name: 'get_skill_asset', description: 'Read an approved file from an exact skill revision (data only; never executed).',
+ name: 'get_skill_asset', description: 'Read an approved file from an exact skill revision (data, never executed).',
mutating: false,
idempotent: true,
outputRedaction: { exempt: 'skill catalog files are installed instructions read verbatim; redaction would corrupt approved revisions' },
@@ -241,7 +241,7 @@ const list_brain_skillpack: Operation = {
mutating: false,
idempotent: true,
outputRedaction: { exempt: 'skill catalog files are installed instructions read verbatim; redaction would corrupt approved revisions' },
- description: 'Skillpacks this brain ships, with skills and a scaffold spec to offer the user.',
+ description: 'Skillpacks this brain ships: skills and a scaffold spec to offer the user.',
publishGateKey: 'mcp.publish_skills',
params: {},
handler: async (ctx) => {
diff --git a/src/core/persistence/params.ts b/src/core/persistence/params.ts
index 31b0e1a44d..6f067a75ad 100644
--- a/src/core/persistence/params.ts
+++ b/src/core/persistence/params.ts
@@ -36,7 +36,7 @@ import { WRITE_REQUEST_STATES, WRITE_HEALTH_REASONS, WRITE_HEALTH_ASSESSMENTS, W
*/
export const WRITE_REQUEST_PARAM: ParamDef = {
type: 'string',
- description: 'Optional; reuse only to retry.',
+ description: 'Reuse only to retry.',
};
/** #6007: transport-only long-poll; never stored with the write or compared on replay. */
diff --git a/src/core/verbs.ts b/src/core/verbs.ts
index 8069dd5845..58b2c8fd04 100644
--- a/src/core/verbs.ts
+++ b/src/core/verbs.ts
@@ -62,7 +62,7 @@ const remember: Operation = {
name: 'remember',
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'MEMORY VERB (v1): save facts with provenance. Set `entity` (the subject) or recall misses it. Branch on `status` (inserted|duplicate|superseded); write_pending: poll get_write_request.',
+ description: 'MEMORY VERB: save facts with provenance. Set `entity` (the subject) or recall misses it. Branch on `status` (inserted|duplicate|superseded); write_pending: poll get_write_request.',
params: {
...AGENT_CONTENT_PARAMS,
fact: { type: 'string', description: 'One claim.' },
@@ -287,7 +287,7 @@ const synthesize: Operation = {
mutating: false,
idempotent: true,
outputRedaction: 'retrieval',
- description: '[EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB (v1): answer a broad question across pages with citations. For lookups use recall or entity.',
+ description: '[EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB: answer a broad question across pages with citations. For lookups use recall or entity.',
params: {
question: { type: 'string', description: 'The question.', required: true },
since: { type: 'string', description: 'Window start (ISO 8601).' },
@@ -422,7 +422,7 @@ const forget: Operation = {
name: 'forget',
idempotent: true,
outputRedaction: 'no_stored_text',
- description: 'MEMORY VERB (v1): expire a remembered fact by its fact_id (never a page slug). Idempotent; the audit trail is kept.',
+ description: 'MEMORY VERB: expire a remembered fact by its fact_id (never a page slug). Idempotent; the audit trail is kept.',
params: {
request_id: WRITE_REQUEST_PARAM,
id: { type: 'string', required: true, description: 'fact_id from remember or recall.' },
diff --git a/test/fixtures/goldens/cli/help-and-errors.json b/test/fixtures/goldens/cli/help-and-errors.json
index 4a4310b130..edd7ef59f6 100644
--- a/test/fixtures/goldens/cli/help-and-errors.json
+++ b/test/fixtures/goldens/cli/help-and-errors.json
@@ -685,7 +685,7 @@
"stdout": [
"Usage: gbrain query <query> [options]",
"",
- "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
+ "Hybrid search plus multi-query expansion for concept/landscape questions and people/companies/projects by topic (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
"",
"Options:",
" <query> Question or topic (required unless image).",
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index 5180c3c803..eeee95d95d 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": 231864,
- "stdoutSha256": "7c78c1bc5229533a82e47b508d6208d0d9e993b8e1129664b363a3656b0a193f",
+ "stdoutBytes": 231494,
+ "stdoutSha256": "78ab1dc6f65163ab0b701afd0a1123f275be689d1b37eba9dab98e8b334f8d90",
"toolNames": [
"remember",
"entity",
@@ -178,7 +178,7 @@
],
"tools": [
{
- "description": "MEMORY VERB (v1): save facts with provenance. Set `entity` (the subject) or recall misses it. Branch on `status` (inserted|duplicate|superseded); write_pending: poll get_write_request.",
+ "description": "MEMORY VERB: save facts with provenance. Set `entity` (the subject) or recall misses it. Branch on `status` (inserted|duplicate|superseded); write_pending: poll get_write_request.",
"idempotent": true,
"local_only": false,
"mutating": true,
@@ -259,7 +259,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"source_id": {
@@ -319,7 +319,7 @@
"scope": "read"
},
{
- "description": "[EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB (v1): answer a broad question across pages with citations. For lookups use recall or entity.",
+ "description": "[EXPENSIVE / SLOW: LLM calls, costs money] MEMORY VERB: answer a broad question across pages with citations. For lookups use recall or entity.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -353,7 +353,7 @@
"scope": "read"
},
{
- "description": "MEMORY VERB (v1): expire a remembered fact by its fact_id (never a page slug). Idempotent; the audit trail is kept.",
+ "description": "MEMORY VERB: expire a remembered fact by its fact_id (never a page slug). Idempotent; the audit trail is kept.",
"idempotent": true,
"local_only": false,
"mutating": true,
@@ -376,7 +376,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"semantic_review": {
@@ -497,7 +497,7 @@
"type": "boolean"
},
"content": {
- "description": "Complete markdown (get_page include_content:true).",
+ "description": "Complete markdown.",
"type": "string"
},
"content_origin": {
@@ -526,7 +526,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -588,7 +588,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -608,7 +608,7 @@
"scope": "write"
},
{
- "description": "List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; a full page may be truncated: continue with updated_after + updated_after_slug from the last row.",
+ "description": "List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; truncated: continue with updated_after + updated_after_slug from the last row.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -662,7 +662,7 @@
"type": "string"
},
"updated_after": {
- "description": "Only pages updated after this ISO time.",
+ "description": "Pages updated after this ISO time.",
"type": "string"
},
"updated_after_slug": {
@@ -700,7 +700,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -747,7 +747,7 @@
"scope": "admin"
},
{
- "description": "Quick note (\"just remember this\"): slugged under inbox/ by date + content hash, so recapturing is idempotent. Use put_page to control slug or type; remember for facts about entities.",
+ "description": "Quick note (\"just remember this\"): slugged under inbox/ by date + content hash, so recapturing is idempotent. put_page controls slug or type; remember is for facts about entities.",
"idempotent": true,
"local_only": false,
"mutating": true,
@@ -812,7 +812,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -923,7 +923,7 @@
"type": "string"
},
"old_text": {
- "description": "Exact text to replace (must occur once).",
+ "description": "Exact text to replace.",
"type": "string"
}
},
@@ -936,11 +936,11 @@
"type": "array"
},
"expected_revision": {
- "description": "revision from get_page include_content:true.",
+ "description": "From get_page include_content:true.",
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -1031,7 +1031,7 @@
"scope": "write"
},
{
- "description": "Read your write's receipt by request_id (after write_pending or a lost reply). Poll at retry_after_ms until final.",
+ "description": "Your write's receipt by request_id (after write_pending or a lost reply). Poll at retry_after_ms until final.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -1055,7 +1055,7 @@
"scope": "write"
},
{
- "description": "List your write receipts in one source, newest first, for a lost request_id.",
+ "description": "Your write receipts in one source, newest first (for a lost request_id).",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -1069,7 +1069,7 @@
"schema": {
"properties": {
"before": {
- "description": "next cursor from the previous page.",
+ "description": "Previous page's next cursor.",
"type": "string"
},
"limit": {
@@ -1088,7 +1088,7 @@
"scope": "write"
},
{
- "description": "Cancel your accepted write before it publishes. Returns the actual receipt.",
+ "description": "Cancel your accepted write before it publishes; returns the receipt.",
"idempotent": true,
"local_only": false,
"mutating": true,
@@ -1112,7 +1112,7 @@
"scope": "write"
},
{
- "description": "Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts/landscape: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.",
+ "description": "Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts/landscape or people/companies/projects by topic: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -1247,7 +1247,7 @@
"scope": "read"
},
{
- "description": "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
+ "description": "Hybrid search plus multi-query expansion for concept/landscape questions and people/companies/projects by topic (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -1714,7 +1714,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -1759,7 +1759,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -2096,7 +2096,7 @@
"type": "array"
},
"link_type": {
- "description": "Follow only this link type.",
+ "description": "Only this link type.",
"type": "string"
},
"slug": {
@@ -2188,7 +2188,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -2380,7 +2380,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -2610,7 +2610,7 @@
"type": "number"
},
"source_id": {
- "description": "Fetch a brain-resident pack skill from this source.",
+ "description": "Brain-resident pack skill from this source.",
"type": "string"
},
"source_incarnation": {
@@ -2624,7 +2624,7 @@
"scope": "read"
},
{
- "description": "Skillpacks this brain ships, with skills and a scaffold spec to offer the user.",
+ "description": "Skillpacks this brain ships: skills and a scaffold spec to offer the user.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -2669,7 +2669,7 @@
"scope": "admin"
},
{
- "description": "Read an approved file from an exact skill revision (data only; never executed).",
+ "description": "Read an approved file from an exact skill revision (data, never executed).",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -3347,7 +3347,7 @@
"schema": {
"properties": {
"partial": {
- "description": "Partial slug or title, e.g. 'alice-ex'.",
+ "description": "Partial slug or title.",
"type": "string"
},
"source_id": {
@@ -4342,7 +4342,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"since": {
@@ -4405,7 +4405,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"row_num": {
@@ -4486,7 +4486,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"resolved_by": {
@@ -4573,7 +4573,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"row_num": {
@@ -4636,7 +4636,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"row_num": {
@@ -4670,7 +4670,7 @@
"schema": {
"properties": {
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"slug": {
@@ -4880,7 +4880,7 @@
"scope": "read"
},
{
- "description": "More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per OAuth client or stdio session).",
+ "description": "More tools: no arguments lists your catalog; {tools: [names]} returns schemas; {surface} widens it (per client or stdio session).",
"idempotent": false,
"local_only": false,
"mutating": true,
@@ -4947,7 +4947,7 @@
"type": "string"
},
"slugPrefix": {
- "description": "Slug prefix, e.g. 'wiki/people'.",
+ "description": "Slug prefix.",
"type": "string"
}
},
@@ -5738,7 +5738,7 @@
"type": "boolean"
},
"request_id": {
- "description": "Optional; reuse only to retry. Managed extraction returns durable receipts; when omitted, each call gets a new UUID. Unmanaged extraction retains its legacy non-journaled behavior.",
+ "description": "Reuse only to retry. Managed extraction returns durable receipts; when omitted, each call gets a new UUID. Unmanaged extraction retains its legacy non-journaled behavior.",
"type": "string"
},
"session_id": {
@@ -5770,7 +5770,7 @@
"scope": "write"
},
{
- "description": "MEMORY VERB (v1): read saved facts by entity, since or session_id; `query` also searches pages. Remote callers see world facts only. One card: entity; reasoning: synthesize.",
+ "description": "MEMORY VERB: read saved facts by entity, since or session_id; `query` also searches pages. Remote callers see world facts only. One card: entity; reasoning: synthesize.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -5886,7 +5886,7 @@
"scope": "read"
},
{
- "description": "MEMORY VERB (v1): core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.",
+ "description": "MEMORY VERB: core memory, budget-packed cards, open threads and hot facts for up to 8 entities, zero LLM. Call at session start and after compaction.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -5936,7 +5936,7 @@
"type": "string"
},
"since": {
- "description": "Only open-thread events after this ISO time.",
+ "description": "Open-thread events after this ISO time.",
"type": "string"
}
},
@@ -5946,7 +5946,7 @@
"scope": "read"
},
{
- "description": "MEMORY VERB (v1): pages, facts, thread events changed since a cursor, zero LLM. Pass session_id, cursor or since.",
+ "description": "MEMORY VERB: pages, facts, thread events changed since a cursor, zero LLM. Pass session_id, cursor or since.",
"idempotent": true,
"local_only": false,
"mutating": false,
@@ -6033,7 +6033,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
}
},
@@ -6095,7 +6095,7 @@
"type": "string"
},
"request_id": {
- "description": "Optional; reuse only to retry.",
+ "description": "Reuse only to retry.",
"type": "string"
},
"source_id": {
@@ -7316,7 +7316,7 @@
"scope": "write"
},
{
- "description": "Mute a coaching or info notice (or first_run_decisions) for this client; muted: false unmutes.",
+ "description": "Mute a coaching or info notice (or first_run_decisions) for this client.",
"idempotent": true,
"local_only": false,
"mutating": true,
@@ -7329,7 +7329,7 @@
"schema": {
"properties": {
"code": {
- "description": "Notice code, the word after `[gbrain notice` in the block.",
+ "description": "The word after `[gbrain notice` in the block.",
"type": "string"
},
"muted": {
diff --git a/test/mcp-schema-budget.test.ts b/test/mcp-schema-budget.test.ts
index e37e3395d5..9a194b6788 100644
--- a/test/mcp-schema-budget.test.ts
+++ b/test/mcp-schema-budget.test.ts
@@ -38,6 +38,12 @@
* disclosure), get_write_request (poll cadence and final states),
* add_timeline_entry (when no call is needed) and the instructions (write
* guidance); the served list still fits 25,000 model-visible characters.
+ * Wave 16 (#6040 item 1): query and search both name people/companies/projects
+ * by topic as `query` work (+77, the measured routing fix), paid for by
+ * redundant words in unowned tool text (`(v1)` on six verb labels, `Optional;`
+ * on request_id, examples that repeat the description); the served list is
+ * measured at 24,768 and must keep SERVED_STARTER_MIN_HEADROOM free so the
+ * next description edit does not land on the ceiling again.
*/
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
import { PGLiteEngine } from '../src/core/pglite-engine.ts';
@@ -49,6 +55,8 @@ import { GBRAIN_MCP_INSTRUCTIONS } from '../src/mcp/instructions.ts';
import { cl100kAvailable, estimateTokens } from '../src/core/chunkers/token-estimate.ts';
const SERVED_STARTER_MAX_CHARS = 25_000;
+/** Headroom the served starter list must keep under the ceiling (wave 16: 24,998 of 25,000 left 2 characters; 200 is what the wave reaches without touching text other threads own, raised to 300 once the entity card and query/search trims land). */
+const SERVED_STARTER_MIN_HEADROOM = 200;
const SERVED_STARTER_MAX_TOKENS = 5_700;
/** The whole tools/list JSON, annotations included (25,735 measured at v0.60.46.0; traverse_graph's `hops` is full-surface-only, 25,941 measured; 26,402 once mute_notice, the dismissal for the coaching notices starter sessions receive, joined starter; 26,671 with #6007's put_page wait_ms param and write guidance, which carry the put_pages hint and the receipt poll rule starter agents need; 26,679 with delta's opaque `cursor` param, paid for by trimming delta's own descriptions, model-visible 24,985; 26,692 with recall's `question` param, paid for by trimming recall's own parameter text, model-visible 24,998; 24,996 after the #6446 merge, recall's grep text trimmed again). */
const SERVED_STARTER_MAX_JSON_CHARS = 26_700;
@@ -73,6 +81,11 @@ const PARAM_DESCRIPTION_HARD_CAP = 200;
* 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.
+ * search 1800 -> 1830 (wave 16, #6040 item 1): the redirect reads
+ * `Concepts/landscape or people/companies/projects by topic: \`query\``, measured
+ * at 1,826. Without it Haiku 4.5 routes "all the people that work on X" to
+ * search (28/80 at temperature 1; 1/80 with the clause); the batching sentence
+ * `Name lists: entity names.` stays, so the growth is paid by other tools.
*/
const TOOL_BUDGETS: Record<string, number> = {
add_timeline_entry: 730, cancel_job: 270, cancel_write_request: 350, capture: 1250, context_pack: 760,
@@ -80,7 +93,7 @@ const TOOL_BUDGETS: Record<string, number> = {
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,
list_link_sources: 220, list_pages: 1060, list_skills: 670, list_write_requests: 450, put_page: 1460,
- mute_notice: 460, put_skill: 1420, query: 3100, recall: 1540, remember: 1370, request_tools: 560, resolve_slugs: 410, search: 1800,
+ mute_notice: 460, put_skill: 1420, query: 3100, recall: 1540, remember: 1370, request_tools: 560, resolve_slugs: 410, search: 1830,
submit_agent: 750, sync_brain_skills: 770, synthesize: 550, traverse_graph: 810, whoami: 230,
};
@@ -148,6 +161,13 @@ describe('served starter tool list (Cat 40 configuration)', () => {
expect(size(ops)).toBeLessThanOrEqual(SERVED_STARTER_MAX_CHARS);
});
+ test('the served list keeps headroom under the ceiling, publish_skills on and off (wave 16)', async () => {
+ for (const publishSkills of [true, false]) {
+ const ops = await served(publishSkills);
+ expect(SERVED_STARTER_MAX_CHARS - size(ops), `publish_skills=${publishSkills}`).toBeGreaterThanOrEqual(SERVED_STARTER_MIN_HEADROOM);
+ }
+ });
+
test('cl100k token ceiling', async () => {
if (!cl100kAvailable()) return;
expect(estimateTokens(JSON.stringify(modelVisible(await served(true))))).toBeLessThanOrEqual(SERVED_STARTER_MAX_TOKENS);