Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
remember points an agent's source parameter at provenance, not source_id
garrytan732bce852205
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 288f01eb88..0afd80ffb5 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,11 +14,14 @@ identifiers and attribution are available in the pre-removal Git revision**A team member's `forget` now says who can withdraw a fact, instead of answering that the fact does not exist.** A remote credential bound to a member, the brain owner's included, withdraws only the facts on its own member page. When it tried to forget a fact it can read but that lives elsewhere (one it saved with `share: true`, or a teammate's shared fact), it got `not_found`, so its agent believed the fact was gone while every reader still recalled it. It is now refused with a reply saying the brain host withdraws it with `gbrain forget <id>`, and the fact stays. A fact the caller cannot read still answers `not_found`, so the reply never confirms a hidden fact exists. The docs that said `remember` defaults to `world` now say that a member-bound credential saves privately on its member page unless it passes `share: true`. Reported by @andreineacsu (#9101).+**An agent that passes `source` to `remember` is now pointed at `provenance`.** The `remember` description said "provenance (required: source)", and agents read that as a parameter named `source`. The call was refused, and since v0.60.635.0 the refusal suggested `source_id`, the write source, which is not what the agent meant. In the nightly write evals, that one refusal caused every failed refresh-barrier episode on master. The description now says "provenance (required)", and an unknown `source` on `remember` suggests `provenance`.+### Itemized changes- `src/core/persistence/memory-mutations.ts`: when a member caller's `forget` misses its own member page, the fact is checked against the same visibility, privacy and eligibility filters `recall` uses for that caller; a readable fact is refused (`scope_denied` from `forget`, `permission_denied` from `forget_fact`, class `host_only`) and an unreadable one stays `not_found`.- Docs: `docs/guides/access-designations.md` (fact visibility), `docs/mcp/TOOL_REFERENCE.md` (`remember`), `skills/brain-ops/SKILL.md` (and the generated plugin copies), and the `facts.default_visibility` bootstrap check's detail now name the member-bound default.- Tests: `test/member-forget-refusal-9101.test.ts` on PGLite and Postgres with member- and owner-bound OAuth credentials on a repo-less brain.+- `src/mcp/validate-params.ts`: `remember`'s parameter hints map `source` to `provenance` ahead of the source-scope aliases; `src/core/verbs.ts` drops "source" from the description (the starter tool list stays inside its budget). Test in `test/validate-params.test.ts`.## [0.60.648.0] - 2026-11-10diff --git a/docs/TOOL_CATALOG.md b/docs/TOOL_CATALOG.mdindex 06983e1c48..a06ffd2c2a 100644--- a/docs/TOOL_CATALOG.md+++ b/docs/TOOL_CATALOG.md@@ -167,7 +167,7 @@ Every non-localOnly operation on the MCP surface: 171 tools across 26 areas. **S| `entity` | Person/company/account card, zero LLM. | read | yes | || `forget` | Expire a remembered fact by its fact_id (never a page slug). | write | yes | || `recall` | Read facts by entity, since or session_id; `query` also searches pages. | read | yes | |-| `remember` | Save {fact, provenance (required: source), `entity` (subject; recall needs it)} or items[]. | write | yes | |+| `remember` | Save {fact, provenance (required), `entity` (subject; recall needs it)} or items[]. | write | yes | || `synthesize` | [EXPENSIVE / SLOW: LLM calls] Cited answer to a broad question across pages. | read | yes | |## ontologydiff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.tsindex 59ee67bd76..4aaba10f37 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": "Save {fact, provenance (required: source), `entity` (subject; recall needs it)} or items[]. Branch on `status`; write_pending: poll get_write_request.",+ "description": "Save {fact, provenance (required), `entity` (subject; recall needs it)} or items[]. Branch on `status`; write_pending: poll get_write_request.","callShape": "A valid call: {\"fact\": \"<one claim>\", \"entity\": \"<subject-slug>\", \"provenance\": \"<where you learned it, with the date>\"}; several: items: [{fact, entity, provenance}, ...]. provenance (where the fact came from) is required.","params": {"source_id": {diff --git a/src/core/verbs.ts b/src/core/verbs.tsindex 4b5ced8f39..76031d1e52 100644--- a/src/core/verbs.ts+++ b/src/core/verbs.ts@@ -67,7 +67,7 @@ const remember: Operation = {name: 'remember',idempotent: true,outputRedaction: 'no_stored_text',- description: 'Save {fact, provenance (required: source), `entity` (subject; recall needs it)} or items[]. Branch on `status`; write_pending: poll get_write_request.',+ description: 'Save {fact, provenance (required), `entity` (subject; recall needs it)} or items[]. Branch on `status`; write_pending: poll get_write_request.',callShape: REMEMBER_CALL_SHAPE,params: {...AGENT_CONTENT_PARAMS,diff --git a/src/mcp/validate-params.ts b/src/mcp/validate-params.tsindex 98dab13d19..46f59676f6 100644--- a/src/mcp/validate-params.ts+++ b/src/mcp/validate-params.ts@@ -192,7 +192,7 @@ export const UNKNOWN_PARAM_ALLOWLIST: ReadonlySet<string> = new Set(['_meta', 'd*/const PARAM_ALIAS_HINTS: Readonly<Record<string, Readonly<Record<string, string>>>> = {add_timeline_entry: { content: 'detail', text: 'detail', body: 'detail' },- remember: { facts: 'items', text: 'fact' },+ remember: { facts: 'items', text: 'fact', source: 'provenance' },};/** GBRA-431: source-scope spellings edit distance ties or misses (`sources` is as near `source_id` as `source_ids`). */diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.jsonindex 9df7158564..664c05c799 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": 283203,- "stdoutSha256": "23664efbc72f9a715e0ba28ccb01c58cf4c23153946044b5fd49202391570778",+ "stdoutBytes": 283195,+ "stdoutSha256": "7e43ff7a847b439fa2f86ec741776e4be19459cdc2b9f0a039888bac3ae7b6cd","toolNames": ["remember","entity",@@ -202,7 +202,7 @@],"tools": [{- "description": "Save {fact, provenance (required: source), `entity` (subject; recall needs it)} or items[]. Branch on `status`; write_pending: poll get_write_request.",+ "description": "Save {fact, provenance (required), `entity` (subject; recall needs it)} or items[]. Branch on `status`; write_pending: poll get_write_request.","idempotent": true,"local_only": false,"mutating": true,diff --git a/test/validate-params.test.ts b/test/validate-params.test.tsindex 6b0f66d7ba..572be4bad8 100644--- a/test/validate-params.test.ts+++ b/test/validate-params.test.ts@@ -133,6 +133,12 @@ describe('warn mode (default) — accept + _meta.warnings only, never a contentexpect(foreign[0].suggestion).not.toBe('query');});+ test('remember\'s `source` points at provenance, not source_id: agents pass it for where a fact came from (GST-2351)', () => {+ const found = findUnknownParams(operationsByName['remember'], { fact: 'x', source: 'user said in chat' });+ expect(found).toEqual([{ code: 'unknown_param', param: 'source', suggestion: 'provenance' }]);+ expect(operationsByName['remember'].description).not.toMatch(/\bsource\b/);+ });+test('buildUnknownParamWarnBlock joins one line per unknown key', () => {const block = buildUnknownParamWarnBlock([{ code: 'unknown_param', param: 'a', suggestion: 'b' },