Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Check every pull request against stable's promise: removals need a deprecation record and notice (#9465)

Garry Tan86dbd5bb1718
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6ddebe0884..51bc58fade 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -440,7 +440,7 @@ to a sibling module. Every row also adds a behavior test of its own; the
| CLI-only command | The implementation in `src/commands/<name>.ts`; the dispatch module `src/cli/commands/<name>.ts`; a help line in `printHelp` (`src/cli.ts`, so raise its `module-size-limits.tsv` ceiling by one) | A record in `CLI_COMMANDS` (`src/cli/command-table.ts`): `phase: 'pre-connect'` when the command never touches the database, `'post-connect'` when its `run(engine, args, ctx)` needs an engine; `thinClient: 'none'` unless remote brains must refuse it (`'refuse'`, or `'route-then-refuse'` for subcommand routing); `selfHelp: true` when the command has flags or subcommands (its `run` then prints its own `--help`); optional `skipStartupHooks`; `load: () => import('<literal>')` | `bun run build:flag-registry`; the CLI goldens, deliberately: `GBRAIN_TEST_UPDATE_GOLDENS=1 bun test test/cli-goldens.test.ts test/cli-dispatch-phase.test.ts test/cli-dispatch-thin-client.test.ts` | `test/<name>.test.ts` spawning `bun src/cli.ts <name>` and asserting output and exit code, plus `bun test test/cli-command-table.test.ts test/cli-flag-validation.test.ts` |
| HTTP route (`gbrain serve --http`) | The route inside `mount<Area>(app, ctx)` in `src/commands/serve-http-<area>.ts` (`/admin/api/*` goes in `serve-http-admin-api.ts`, `/mcp` in `serve-http-mcp.ts`, OAuth in `serve-http-oauth.ts`); a new area is a new module plus one mount call in `buildServeHttpApp` (`src/commands/serve-http.ts`). An `/admin` route takes `ctx.requireAdmin` before its handler | None for a route in an existing area; a new area adds its mount call in `buildServeHttpApp` (order matters) | The route goldens, deliberately: `GBRAIN_TEST_UPDATE_GOLDENS=1 bun test test/serve-http-route-golden.test.ts test/serve-http-route-runtime-golden.test.ts` | A behavior test (`test/serve-http-<area>-<route>.test.ts`: mount the area on a bare `express()` app with a stub ctx; `mountAdminApi` reads `requireAdmin`, `sseClients` and `mcpResourceUrl` at mount time) plus `bun test test/serve-http-admin-route-guard.test.ts`, which finds the new route by itself |
| Sync phase | A module under `src/commands/sync/` taking `(run, Pick<SyncPlan, ...>, ...)` and returning `SyncResult \| undefined`; state it shares across awaits becomes a field on `SyncRun` (`src/commands/sync/sync-run.ts`). A value for the final summary flows `SyncRun` field -> `finalizeIncrementalSync` (`sync/finalize.ts`) -> `SyncResult` (`src/commands/sync.ts`, raise its ceiling) -> `printSyncResult` (`sync/report.ts`) when it should print | The phase call order in `performSyncInner` (`src/commands/sync/incremental.ts`) | Nothing | A case in `test/sync-run-ordering.serial.test.ts` (it has the git-repo + PGLite harness: `commitPages`, `performSync`), plus `bun test test/sync.test.ts test/sync-run-ordering.serial.test.ts` |
-| Release version and migration numbers | `changelog.d/<branch-slug>.md` (your entry, no version heading; /ship writes it) and one `behavior-changes.d/<id>.md` per new upgrade-notice row; number a new migration master's latest + 1 | None: the release PR writes every version stamp; never edit VERSION, the manifests or a released CHANGELOG section | On a migration-number collision, `bun run migrations:renumber`; a PR stamped the old way converts with `bun run release:unstamp` | `bun run verify` (check:regen-all builds the behavior-change table); `bun test test/scripts/release-restamp.test.ts test/scripts/build-behavior-changes.test.ts` when you change those scripts ([docs](docs/RELEASING.md#releases-per-batch)) |
+| Release version and migration numbers | `changelog.d/<branch-slug>.md` (your entry, no version heading; /ship writes it) and one `behavior-changes.d/<id>.md` per new upgrade-notice row (with its `kind:`); a removal or rename of something stable keeps first adds a [`deprecations.d/<id>.md`](deprecations.d/README.md) record; number a new migration master's latest + 1 | None: the release PR writes every version stamp; never edit VERSION, the manifests or a released CHANGELOG section | On a migration-number collision, `bun run migrations:renumber`; a PR stamped the old way converts with `bun run release:unstamp` | `bun run verify` (check:regen-all builds the behavior-change table); `bun test test/scripts/release-restamp.test.ts test/scripts/build-behavior-changes.test.ts` when you change those scripts ([docs](docs/RELEASING.md#releases-per-batch)) |
| Stress-test a touched test (flake hunt) | Nothing: `bun run test:stress [files…] [--iterations N] [--base <ref>] [--postgres]` (defaults: files changed versus `origin/master`, 10 iterations, a fresh database per iteration) | None | Nothing | The same command; a failing iteration prints its reproduce line |
| A bundled skill (`skills/<name>/SKILL.md`), or a command, flag or operation a skill names | The skill text, in the same PR as the code it describes; follow [Changing a skill](#changing-a-skill) | `skills/skill-budgets.tsv` only for a skill over 16 KB (a ceiling goes up only in a reviewer-visible edit); `scripts/skill-drift-baseline.txt` only shrinks | `bun run scripts/generate-skills-manifest.ts` (the skills lock) | `bash scripts/skills-commit-gate.sh` (it runs `bun run check:skill-health` and prints the `Skill-size:` lines for your commit message) |
diff --git a/behavior-changes.d/README.md b/behavior-changes.d/README.md
index a9d0620c96..2e56f4469f 100644
--- a/behavior-changes.d/README.md
+++ b/behavior-changes.d/README.md
@@ -18,7 +18,32 @@ line and nobody picks a version before the release.
<!-- behavior-change: sync_holds_unparsable_8123 -->
```
-That is all. `bun run verify` (check:regen-all) refuses a fragment with no
+3. Start the file with front matter that says what kind of change it is:
+
+ ```markdown
+ ---
+ kind: fix
+ ---
+ The notice text.
+ ```
+
+ `kind` is one of `breaking` (something documented stops working or
+ starts refusing what it accepted), `action` (users should do something),
+ `default` (a default changed), `fix` or `add`. A `breaking` row also
+ needs `exception: security` or `exception: data-loss` for a fix that
+ cannot wait, `exception: revert` for a revert of something that never
+ reached stable (the notice text names the reverted pull request,
+ `#<number>`), or `deprecation: <id>` naming the
+ [deprecations.d](../deprecations.d/) record whose `remove_after` date has
+ passed. The front matter is not part of the notice text.
+
+That is all. `bun run check:public-surface` refuses a new row without
+`kind`, and a `breaking` row without an exception or a matured deprecation.
+It also refuses a change to the CLI or agent-contract goldens
+(`test/fixtures/goldens/cli/`, `test/fixtures/agent-contract/`) that adds no
+row; when the change is not a behaviour change, say so in your changelog
+fragment with `<!-- public-surface: no-behavior-change: <reason> -->`.
+`bun run verify` (check:regen-all) refuses a fragment with no
marker, a marker with no fragment, a duplicate id (including an id marked
twice among unreleased changes, or marked again after its release) and an
over-long text.
diff --git a/changelog.d/capy-public-surface-check.md b/changelog.d/capy-public-surface-check.md
new file mode 100644
index 0000000000..1df3d94540
--- /dev/null
+++ b/changelog.d/capy-public-surface-check.md
@@ -0,0 +1,12 @@
+**Every pull request is now checked against stable's promise: removing a command, flag, MCP tool or parameter, config key or exit code needs a deprecation record whose 14-day notice has passed.**
+
+### Added
+- `bun run check:public-surface`, part of `bun run verify`. It compares this tree with the merge base against `docs/contracts/public-surface.json`, a list built from the code by `scripts/build-public-surface.ts` (refreshed by `bun run regen:all`). It refuses a pull request that drops a listed entry, or changes an exit code, before a `deprecations.d/<id>.md` record for it has reached its `remove_after` date. A `cli-command` or `mcp-tool` record also covers that command's flags or that tool's parameters.
+- Removals the promise does not cover go through with no record. That means anything missing from the list at the current stable release (the `stable` tag), and any removal in a pull request that adds a `kind: breaking` row with `exception: security` or `exception: data-loss`. The check fetches the tag when the clone lacks it, and in CI a fetch that fails or takes more than 20 seconds fails the check. Until a stable release carries the list, the check says so and counts everything as on stable; a revert then adds a row with `exception: revert` that names the pull request it reverts.
+- New deprecation records must give at least 14 days of notice. An announced `remove_after` date can move later but never earlier, and a merged record keeps the surface and name it announced.
+- New `behavior-changes.d` rows need `kind:` front matter (`breaking`, `action`, `default`, `fix` or `add`). A `breaking` row needs an exception or a `deprecation: <id>` naming a record whose date has passed.
+- A change to the CLI or agent-contract goldens needs a new behaviour-change row, or a `<!-- public-surface: no-behavior-change: <reason> -->` line in the changelog fragment.
+
+### For contributors
+- `docs/STABILITY.md` "How it is checked" says what the check enforces and what still rests on review: `--json` fields, the page format, wording, behaviour beyond names, the two-stable-releases rule, and the flags of the 124 CLI-only commands without a curated help record.
+- A branch converted with `bun run release:unstamp` gets rows without `kind:`; add one to each before pushing (docs/RELEASING.md).
diff --git a/deprecations.d/README.md b/deprecations.d/README.md
index e1f08750c3..0982e92638 100644
--- a/deprecations.d/README.md
+++ b/deprecations.d/README.md
@@ -28,7 +28,11 @@ key, a page-format rule, an exit code or a top-level `--json` field.
`surface` is one of `cli-command`, `cli-flag`, `mcp-tool`, `mcp-param`,
`config-key`, `page-format`, `exit-code` or `json-field`.
`remove_after` is at least 14 days after the stable release that first
- carries the announcement.
+ carries the announcement. `bun run check:public-surface` refuses a new
+ record whose date is less than 14 days after the day it is added; the
+ stable-release part is checked in review. Once a record is merged, its
+ `surface` and `name` stay as announced and `remove_after` can only move
+ later; to cover something else, add a new record.
3. Announce it in the same pull request: add a behaviour-change row with the
same id (`behavior-changes.d/<id>.md`, see its README) so the upgrade
notice carries it, and say it in your changelog fragment
@@ -40,10 +44,32 @@ The removal is a separate pull request, made after `remove_after` and once
the announcement has been in at least two stable releases. It deletes the old
name and the warning, keeps this file (the history of what was removed and
when) and adds a second behaviour-change row, with an id of its own, saying the
-old name is gone.
+old name is gone. That row's front matter is `kind: breaking` and
+`deprecation: <id>`, naming this record. Until `remove_after` has passed, the
+check refuses a pull request that drops a command, flag, MCP tool or
+parameter, config key or exit code this record names. A `cli-command` record
+also covers that command's flags, and an `mcp-tool` record its parameters,
+so retiring a whole command or tool takes one record. A page-format rule or
+`--json` field is not on the check's list, so its removal is checked in
+review.
## Security and data-loss fixes
A fix for a security hole or for something that loses data may change
-behaviour at once, with no record here. Its behaviour-change row says which
-of the two it is and what users need to do.
+behaviour at once, with no record here. Its behaviour-change row has
+`kind: breaking` and `exception: security` or `exception: data-loss`, and
+says what users need to do. The check lets the removal through when the
+pull request adds that row.
+
+## Reverts and things that never reached stable
+
+The promise covers what is on stable. The check compares with the list at
+the current stable release (the `stable` tag), so a command, flag, tool,
+config key or exit code added since then can be removed, or reverted, with
+no record here. When the clone lacks the tag, the check fetches it; in CI a
+fetch that fails or takes more than 20 seconds fails the check (rerun it).
+Until a stable release carries the list, the check says so and counts
+everything as on stable. A revert then adds a behaviour-change row with `kind: breaking`
+and `exception: revert` whose text names the reverted pull request
+(`#<number>`). Once stable carries the list, `exception: revert` no longer
+covers anything on it.
diff --git a/docs/RELEASING.md b/docs/RELEASING.md
index d4e7ba3f8c..3e44d7ec89 100644
--- a/docs/RELEASING.md
+++ b/docs/RELEASING.md
@@ -167,6 +167,9 @@ reader of the log should see.
- One `behavior-changes.d/<id>.md` file per new upgrade-notice row, named
in the fragment as `<!-- behavior-change: <id> -->`
([behavior-changes.d/README.md](../behavior-changes.d/README.md)).
+- A `deprecations.d/<id>.md` record before removing or renaming anything
+ stable promises to keep
+ ([deprecations.d/README.md](../deprecations.d/README.md)).
- Its own schema migrations, numbered master's latest + 1 when written.
- Nothing else that carries a version: no edit to VERSION, the package.json
version, the plugin manifests, the BOOTSTRAP stamp, the plugin or template
@@ -223,7 +226,8 @@ every stamp back to master's version, moves the branch's CHANGELOG entry to
`changelog.d/<branch-slug>.md` and its appended plain-text
`BEHAVIOR_CHANGES` rows to `behavior-changes.d/` (with their markers),
puts the notice file and its size-table row back to master's, and commits
-once. It refuses, with the fix, a branch with no entry of its own, one that
+once. The moved rows have no `kind:` yet: add one to each before pushing
+(`bun run check:public-surface` refuses a new row without it). It refuses, with the fix, a branch with no entry of its own, one that
edits a released CHANGELOG section, one that carries other PRs' entries (land
or convert those first), and notice rows it can't move (rows without an id,
rows whose text is a function, edits other than appending). Plain
diff --git a/docs/STABILITY.md b/docs/STABILITY.md
index f451321a63..126b9781ff 100644
--- a/docs/STABILITY.md
+++ b/docs/STABILITY.md
@@ -32,7 +32,16 @@ Since 16 November 2026, stable comes with a written promise about what a script
- Search ranking, speed and the exact results of model-backed features.
- Very large brains during an upgrade. The upgrade tests build small brains, on PGLite and on Postgres, with and without a git repository. The two-hour load test runs a 600,000-page brain on the new release but does not upgrade one. Until [#9192](https://github.com/garrytan/gbrain/issues/9192) is fixed, a large brain on a remote Postgres database can return no search results for hours after an upgrade while it catches up.
-**How it is checked.** Today each change is checked against these rules when its pull request is reviewed. A planned removal is recorded in [deprecations.d/](../deprecations.d/README.md) before it is announced. If a stable release breaks one of these rules anyway, that is a regression, and it is handled like any other: fixed, with the fix sent to stable as an important fix.
+**How it is checked.** Every pull request runs a check (`bun run check:public-surface`) against a list of the commands, MCP tools and their parameters, config keys and exit codes, built from the code into [docs/contracts/public-surface.json](contracts/public-surface.json). The list has the flags of every command defined as an operation, and of the 8 CLI-only commands (out of 132) that have a curated help record; the flags of the other 124, `recall` and `forget` among them, are checked in review. The check refuses a pull request that:
+
+- drops one of them, or changes an exit code, before a [deprecations.d/](../deprecations.d/README.md) record for it has reached its `remove_after` date, unless the pull request adds a behaviour-change row marked `exception: security` or `exception: data-loss`;
+- adds a deprecation record whose date is less than 14 days away, or changes what a merged record names, or moves its date earlier;
+- adds a behaviour-change row that doesn't say what kind of change it is, or marks a change `breaking` when it is neither a security or data-loss fix nor the removal of a deprecation whose date has passed;
+- changes the recorded output of the CLI or of agent errors with no behaviour-change row.
+
+What never reached stable isn't covered. The check compares with the list at the current stable release (the `stable` tag), so something added since then can be removed with no record. When the clone lacks the tag, the check fetches it from GitHub. In CI a fetch that fails or takes more than 20 seconds fails the check and asks for a rerun, so a missing tag never waives the rule; a local run without the tag says so and counts everything as on stable. Until a stable release carries the list, the check says so and counts everything as on stable; a revert then marks its behaviour-change row `exception: revert` and names the pull request it reverts.
+
+The rest is checked when the pull request is reviewed: `--json` fields, the page format, wording, what a command does beyond its name, and the part of the deprecation rule that asks for two stable releases. If a stable release breaks one of these rules anyway, that is a regression, and it is handled like any other: fixed, with the fix sent to stable as an important fix.
## How a release becomes stable
diff --git a/docs/contracts/public-surface.json b/docs/contracts/public-surface.json
new file mode 100644
index 0000000000..4b4d0a198e
--- /dev/null
+++ b/docs/contracts/public-surface.json
@@ -0,0 +1,3094 @@
+{
+ "version": 1,
+ "cli-command": [
+ "gbrain access",
+ "gbrain advisor",
+ "gbrain agent",
+ "gbrain anomalies",
+ "gbrain append",
+ "gbrain apply-migrations",
+ "gbrain attribution",
+ "gbrain auth",
+ "gbrain autopilot",
+ "gbrain backfill",
+ "gbrain backlinks",
+ "gbrain backup",
+ "gbrain beliefs",
+ "gbrain bench",
+ "gbrain book-mirror",
+ "gbrain bootstrap",
+ "gbrain brain-skillpack",
+ "gbrain brainstorm",
+ "gbrain bundled-skill",
+ "gbrain cache",
+ "gbrain calibration",
+ "gbrain call",
+ "gbrain cancel-write-request",
+ "gbrain capture",
+ "gbrain check-backlinks",
+ "gbrain check-resolvable",
+ "gbrain check-update",
+ "gbrain chronicle-backfill",
+ "gbrain claw-test",
+ "gbrain code-callees",
+ "gbrain code-callers",
+ "gbrain code-def",
+ "gbrain code-refs",
+ "gbrain compile-context",
+ "gbrain config",
+ "gbrain connect",
+ "gbrain connectors",
+ "gbrain context-pack",
+ "gbrain conversation-parser",
+ "gbrain core",
+ "gbrain creds",
+ "gbrain day",
+ "gbrain db-repair",
+ "gbrain decide",
+ "gbrain delete",
+ "gbrain delete-skill",
+ "gbrain delta",
+ "gbrain diag",
+ "gbrain doctor",
+ "gbrain dream",
+ "gbrain edge-proposals",
+ "gbrain edges-backfill",
+ "gbrain embed",
+ "gbrain embeddings",
+ "gbrain engine",
+ "gbrain enrich",
+ "gbrain entity",
+ "gbrain entity-identity-link",
+ "gbrain entity-identity-list",
+ "gbrain entity-identity-unlink",
+ "gbrain errors",
+ "gbrain eval",
+ "gbrain export",
+ "gbrain extract",
+ "gbrain extract-conversation-facts",
+ "gbrain extract-entities",
+ "gbrain extraction-pending",
+ "gbrain extraction-review",
+ "gbrain facts",
+ "gbrain features",
+ "gbrain feedback",
+ "gbrain fetch",
+ "gbrain files",
+ "gbrain find",
+ "gbrain find-contradictions",
+ "gbrain find-trajectory",
+ "gbrain forget",
+ "gbrain founder",
+ "gbrain friction",
+ "gbrain frontmatter",
+ "gbrain get",
+ "gbrain get_links",
+ "gbrain git",
+ "gbrain google",
+ "gbrain graph",
+ "gbrain graph-query",
+ "gbrain guests",
+ "gbrain health",
+ "gbrain history",
+ "gbrain hook",
+ "gbrain import",
+ "gbrain init",
+ "gbrain integrations",
+ "gbrain integrity",
+ "gbrain jobs",
+ "gbrain join-brain",
+ "gbrain last-seen",
+ "gbrain leave-brain",
+ "gbrain link",
+ "gbrain link-add",
+ "gbrain link-rm",
+ "gbrain link-sources",
+ "gbrain links",
+ "gbrain lint",
+ "gbrain list",
+ "gbrain loops",
+ "gbrain lsd",
+ "gbrain maintain",
+ "gbrain mcp",
+ "gbrain memory-proposals",
+ "gbrain memory-settings",
+ "gbrain migrate",
+ "gbrain models",
+ "gbrain mounts",
+ "gbrain notability-eval",
+ "gbrain notices",
+ "gbrain on-this-day",
+ "gbrain onboard",
+ "gbrain ontology",
+ "gbrain ontology-add",
+ "gbrain ontology-contradictions",
+ "gbrain ontology-dimensions",
+ "gbrain orient",
+ "gbrain orphans",
+ "gbrain pages",
+ "gbrain pglite-repair",
+ "gbrain post-upgrade",
+ "gbrain pricing",
+ "gbrain projections",
+ "gbrain protocol",
+ "gbrain providers",
+ "gbrain prune-skill-revisions",
+ "gbrain publish",
+ "gbrain put",
+ "gbrain put-pages",
+ "gbrain put-skill",
+ "gbrain quarantine",
+ "gbrain query",
+ "gbrain questions",
+ "gbrain rank-entities",
+ "gbrain rate",
+ "gbrain recall",
+ "gbrain reconcile-links",
+ "gbrain reindex",
+ "gbrain reindex-code",
+ "gbrain reindex-frontmatter",
+ "gbrain reindex-search-vector",
+ "gbrain reinit-pglite",
+ "gbrain remember",
+ "gbrain remote",
+ "gbrain repair",
+ "gbrain repair-jsonb",
+ "gbrain report",
+ "gbrain repos",
+ "gbrain resolvers",
+ "gbrain restore",
+ "gbrain retain-skill-revision",
+ "gbrain retrieval-upgrade",
+ "gbrain revert",
+ "gbrain routing-eval",
+ "gbrain salience",
+ "gbrain schema",
+ "gbrain search",
+ "gbrain search-by-image",
+ "gbrain search-exact",
+ "gbrain self-upgrade",
+ "gbrain serve",
+ "gbrain set-skill-policy",
+ "gbrain setup",
+ "gbrain since",
+ "gbrain skill",
+ "gbrain skill-asset",
+ "gbrain skill-policy",
+ "gbrain skill-resolver",
+ "gbrain skill-retention",
+ "gbrain skillify",
+ "gbrain skillopt",
+ "gbrain skillpack",
+ "gbrain skillpack-check",
+ "gbrain skills",
+ "gbrain smoke-test",
+ "gbrain sources",
+ "gbrain stats",
+ "gbrain status",
+ "gbrain storage",
+ "gbrain storage-find",
+ "gbrain storage-get",
+ "gbrain storage-list",
+ "gbrain storage-register",
+ "gbrain storage-update",
+ "gbrain sweep",
+ "gbrain sync",
+ "gbrain sync-brain-skills",
+ "gbrain synthesize",
+ "gbrain tag",
+ "gbrain tags",
+ "gbrain takes",
+ "gbrain takes-calibration",
+ "gbrain takes-list",
+ "gbrain takes-scorecard",
+ "gbrain takes-search",
+ "gbrain think",
+ "gbrain timeline",
+ "gbrain timeline-add",
+ "gbrain transcripts",
+ "gbrain trust",
+ "gbrain unlink",
+ "gbrain untag",
+ "gbrain upgrade",
+ "gbrain volunteer-context",
+ "gbrain waiting",
+ "gbrain wakeshift",
+ "gbrain wanted",
+ "gbrain watch",
+ "gbrain whoami",
+ "gbrain whois",
+ "gbrain whoknows",
+ "gbrain write-conflicts",
+ "gbrain write-request",
+ "gbrain write-requests"
+ ],
+ "cli-flag": [
+ "gbrain apply-migrations --accept-reviewed-inventory",
+ "gbrain apply-migrations --acknowledge-no-backup",
+ "gbrain apply-migrations --backup-confirmed",
+ "gbrain apply-migrations --confirm-quiesced",
+ "gbrain apply-migrations --content-root",
+ "gbrain apply-migrations --dry-run",
+ "gbrain apply-migrations --export-db-only",
+ "gbrain apply-migrations --export-source",
+ "gbrain apply-migrations --force",
+ "gbrain apply-migrations --force-all",
+ "gbrain apply-migrations --force-orchestrator",
+ "gbrain apply-migrations --force-retry",
+ "gbrain apply-migrations --force-schema",
+ "gbrain apply-migrations --host-dir",
+ "gbrain apply-migrations --json",
+ "gbrain apply-migrations --list",
+ "gbrain apply-migrations --migration",
+ "gbrain apply-migrations --mode",
+ "gbrain apply-migrations --no-autopilot-install",
+ "gbrain apply-migrations --non-interactive",
+ "gbrain apply-migrations --require-db",
+ "gbrain apply-migrations --skip-verify",
+ "gbrain apply-migrations --yes",
+ "gbrain attribution --fact",
+ "gbrain attribution --slug",
+ "gbrain attribution --take",
+ "gbrain attribution --timeline",
+ "gbrain attribution --versions",
+ "gbrain autopilot --force",
+ "gbrain autopilot --inject-bootstrap",
+ "gbrain autopilot --inline",
+ "gbrain autopilot --install",
+ "gbrain autopilot --interval",
+ "gbrain autopilot --json",
+ "gbrain autopilot --no-inject",
+ "gbrain autopilot --no-worker",
+ "gbrain autopilot --pause",
+ "gbrain autopilot --phase",
+ "gbrain autopilot --reason",
+ "gbrain autopilot --repo",
+ "gbrain autopilot --resume",
+ "gbrain autopilot --retry-global",
+ "gbrain autopilot --status",
+ "gbrain autopilot --target",
+ "gbrain autopilot --uninstall",
+ "gbrain backlinks --all",
+ "gbrain backlinks --all-sources",
+ "gbrain backlinks --as-of",
+ "gbrain backlinks --cursor",
+ "gbrain backlinks --group",
+ "gbrain backlinks --limit",
+ "gbrain backlinks --slug",
+ "gbrain backlinks --source-id",
+ "gbrain backlinks --status",
+ "gbrain backlinks --type",
+ "gbrain cancel-write-request --request-id",
+ "gbrain chronicle-backfill --dated-since",
+ "gbrain chronicle-backfill --dry-run",
+ "gbrain chronicle-backfill --limit",
+ "gbrain chronicle-backfill --max-usd",
+ "gbrain chronicle-backfill --recent",
+ "gbrain chronicle-backfill --since",
+ "gbrain chronicle-backfill --yes",
+ "gbrain context-pack --budget-tokens",
+ "gbrain context-pack --counterparty",
+ "gbrain context-pack --entities",
+ "gbrain context-pack --entity-refs",
+ "gbrain context-pack --include-private",
+ "gbrain context-pack --include-quarantined",
+ "gbrain context-pack --intent",
+ "gbrain context-pack --min-trust",
+ "gbrain context-pack --prefer-source-id",
+ "gbrain context-pack --session-id",
+ "gbrain context-pack --since",
+ "gbrain context-pack --source-id",
+ "gbrain day --date",
+ "gbrain day --limit",
+ "gbrain day --narrative",
+ "gbrain day --week",
+ "gbrain delete --expected-revision",
+ "gbrain delete --force",
+ "gbrain delete --purge",
+ "gbrain delete --request-id",
+ "gbrain delete --slug",
+ "gbrain delete --source-id",
+ "gbrain delete-skill --expected-revision",
+ "gbrain delete-skill --name",
+ "gbrain delete-skill --pack-id",
+ "gbrain delete-skill --request-id",
+ "gbrain delete-skill --source-id",
+ "gbrain delete-skill --source-incarnation",
+ "gbrain delta --beliefs",
+ "gbrain delta --budget-tokens",
+ "gbrain delta --cursor",
+ "gbrain delta --entities",
+ "gbrain delta --include-private",
+ "gbrain delta --min-trust",
+ "gbrain delta --session-id",
+ "gbrain delta --since",
+ "gbrain delta --since-slug",
+ "gbrain diag --budget-ms",
+ "gbrain diag --json",
+ "gbrain diag --query",
+ "gbrain doctor --alert",
+ "gbrain doctor --budget-ms",
+ "gbrain doctor --content-audit",
+ "gbrain doctor --dry-run",
+ "gbrain doctor --expect",
+ "gbrain doctor --fast",
+ "gbrain doctor --fix",
+ "gbrain doctor --include-repairs",
+ "gbrain doctor --index-audit",
+ "gbrain doctor --json",
+ "gbrain doctor --locks",
+ "gbrain doctor --max-cost",
+ "gbrain doctor --max-jobs",
+ "gbrain doctor --max-usd",
+ "gbrain doctor --no-embed",
+ "gbrain doctor --no-migrate",
+ "gbrain doctor --only",
+ "gbrain doctor --probe",
+ "gbrain doctor --probe-pglite",
+ "gbrain doctor --remediate",
+ "gbrain doctor --remediation-plan",
+ "gbrain doctor --resume",
+ "gbrain doctor --scope",
+ "gbrain doctor --skills-dir",
+ "gbrain doctor --source",
+ "gbrain doctor --target-score",
+ "gbrain doctor --tier",
+ "gbrain doctor --yes",
+ "gbrain entity --name",
+ "gbrain entity --names",
+ "gbrain entity --prefer-source-id",
+ "gbrain entity --source-id",
+ "gbrain entity --variants",
+ "gbrain entity-identity-link --canonical",
+ "gbrain entity-identity-link --confidence",
+ "gbrain entity-identity-link --entity-id",
+ "gbrain entity-identity-link --slug",
+ "gbrain entity-identity-link --source-id",
+ "gbrain entity-identity-list --entity-id",
+ "gbrain entity-identity-list --slug",
+ "gbrain entity-identity-unlink --entity-id",
+ "gbrain entity-identity-unlink --slug",
+ "gbrain entity-identity-unlink --source-id",
+ "gbrain extract-entities --source-slug",
+ "gbrain extract-entities --text",
+ "gbrain extract-entities --trusted-extraction",
+ "gbrain extraction-pending --include",
+ "gbrain extraction-pending --limit",
+ "gbrain extraction-pending --offset",
+ "gbrain extraction-pending --possible-duplicates-cursor",
+ "gbrain extraction-pending --since-days",
+ "gbrain extraction-pending --unattributed-offset",
+ "gbrain extraction-review --action",
+ "gbrain extraction-review --of",
+ "gbrain extraction-review --slugs",
+ "gbrain fetch --id",
+ "gbrain fetch --include-quarantined",
+ "gbrain fetch --min-trust",
+ "gbrain find --limit",
+ "gbrain find --pattern",
+ "gbrain find --source-id",
+ "gbrain find --type",
+ "gbrain find --types",
+ "gbrain find-contradictions --limit",
+ "gbrain find-contradictions --min-trust",
+ "gbrain find-contradictions --severity",
+ "gbrain find-contradictions --slug",
+ "gbrain find-trajectory --entity-slug",
+ "gbrain find-trajectory --kind",
+ "gbrain find-trajectory --limit",
+ "gbrain find-trajectory --metric",
+ "gbrain find-trajectory --since",
+ "gbrain find-trajectory --until",
+ "gbrain get --around-chunk-id",
+ "gbrain get --as-of",
+ "gbrain get --body",
+ "gbrain get --bytes",
+ "gbrain get --content-only",
+ "gbrain get --context",
+ "gbrain get --context-lines",
+ "gbrain get --cursor",
+ "gbrain get --fuzzy",
+ "gbrain get --grammar-diagnostics",
+ "gbrain get --grep",
+ "gbrain get --include-content",
+ "gbrain get --include-deleted",
+ "gbrain get --include-quarantined",
+ "gbrain get --include-timeline-entries",
+ "gbrain get --known-as-of",
+ "gbrain get --lines",
+ "gbrain get --max-bytes",
+ "gbrain get --min-trust",
+ "gbrain get --outline-from",
+ "gbrain get --section",
+ "gbrain get --slug",
+ "gbrain get --source-id",
+ "gbrain get --view",
+ "gbrain get_links --all",
+ "gbrain get_links --all-sources",
+ "gbrain get_links --as-of",
+ "gbrain get_links --cursor",
+ "gbrain get_links --during",
+ "gbrain get_links --limit",
+ "gbrain get_links --link-type",
+ "gbrain get_links --slug",
+ "gbrain get_links --source-id",
+ "gbrain get_links --status",
+ "gbrain graph --all-sources",
+ "gbrain graph --depth",
+ "gbrain graph --direction",
+ "gbrain graph --hops",
+ "gbrain graph --link-type",
+ "gbrain graph --slug",
+ "gbrain graph --source-id",
+ "gbrain history --diff",
+ "gbrain history --include-body",
+ "gbrain history --known-as-of",
+ "gbrain history --limit",
+ "gbrain history --slug",
+ "gbrain history --source-id",
+ "gbrain import --allow-noncanonical-root",
+ "gbrain import --calls",
+ "gbrain import --fresh",
+ "gbrain import --include-gitignored",
+ "gbrain import --json",
+ "gbrain import --log-noop",
+ "gbrain import --no-embed",
+ "gbrain import --prefix",
+ "gbrain import --source",
+ "gbrain import --source-id",
+ "gbrain import --workers",
+ "gbrain join-brain --adapter",
+ "gbrain join-brain --follow-policy",
+ "gbrain last-seen --asof",
+ "gbrain last-seen --entity",
+ "gbrain leave-brain --enrollment-epoch",
+ "gbrain leave-brain --installation-id",
+ "gbrain link --context",
+ "gbrain link --from",
+ "gbrain link --link-source",
+ "gbrain link --link-type",
+ "gbrain link --request-id",
+ "gbrain link --to",
+ "gbrain link --valid-from",
+ "gbrain link --valid-until",
+ "gbrain link-add --context",
+ "gbrain link-add --from",
+ "gbrain link-add --link-source",
+ "gbrain link-add --link-type",
+ "gbrain link-add --request-id",
+ "gbrain link-add --to",
+ "gbrain link-add --valid-from",
+ "gbrain link-add --valid-until",
+ "gbrain link-rm --from",
+ "gbrain link-rm --link-source",
+ "gbrain link-rm --link-type",
+ "gbrain link-rm --request-id",
+ "gbrain link-rm --to",
+ "gbrain links --all",
+ "gbrain links --all-sources",
+ "gbrain links --as-of",
+ "gbrain links --cursor",
+ "gbrain links --during",
+ "gbrain links --limit",
+ "gbrain links --link-type",
+ "gbrain links --slug",
+ "gbrain links --source-id",
+ "gbrain links --status",
+ "gbrain list --include-deleted",
+ "gbrain list --limit",
+ "gbrain list --offset",
+ "gbrain list --slug-prefix",
+ "gbrain list --sort",
+ "gbrain list --source-id",
+ "gbrain list --source-ids",
+ "gbrain list --tag",
+ "gbrain list --type",
+ "gbrain list --updated-after",
+ "gbrain list --updated-after-slug",
+ "gbrain list --where",
+ "gbrain on-this-day --date",
+ "gbrain on-this-day --limit",
+ "gbrain onboard --auto",
+ "gbrain onboard --check",
+ "gbrain onboard --explain",
+ "gbrain onboard --history",
+ "gbrain onboard --json",
+ "gbrain onboard --max-usd",
+ "gbrain onboard --target-score",
+ "gbrain ontology --asof",
+ "gbrain ontology --entity",
+ "gbrain ontology --include-quarantined",
+ "gbrain ontology --min-confidence",
+ "gbrain ontology-add --confidence",
+ "gbrain ontology-add --dimension",
+ "gbrain ontology-add --entity",
+ "gbrain ontology-add --source",
+ "gbrain ontology-add --valid-from",
+ "gbrain ontology-add --valid-to",
+ "gbrain ontology-add --value",
+ "gbrain ontology-add --visibility",
+ "gbrain ontology-contradictions --min-confidence",
+ "gbrain orient --days",
+ "gbrain orient --entities",
+ "gbrain orient --limit",
+ "gbrain prune-skill-revisions --source-id",
+ "gbrain put --allow-empty",
+ "gbrain put --allow-shrink",
+ "gbrain put --content",
+ "gbrain put --content-origin",
+ "gbrain put --drop-timeline",
+ "gbrain put --expected-revision",
+ "gbrain put --force",
+ "gbrain put --ingested-via",
+ "gbrain put --reason",
+ "gbrain put --request-id",
+ "gbrain put --slug",
+ "gbrain put --source-id",
+ "gbrain put --source-kind",
+ "gbrain put --source-uri",
+ "gbrain put --wait-ms",
+ "gbrain put-pages --pages",
+ "gbrain put-pages --request-id",
+ "gbrain put-pages --source-id",
+ "gbrain put-pages --wait-ms",
+ "gbrain put-skill --description",
+ "gbrain put-skill --expected-revision",
+ "gbrain put-skill --files",
+ "gbrain put-skill --name",
+ "gbrain put-skill --pack-id",
+ "gbrain put-skill --private",
+ "gbrain put-skill --request-id",
+ "gbrain put-skill --requirements",
+ "gbrain put-skill --source-id",
+ "gbrain put-skill --source-incarnation",
+ "gbrain put-skill --triggers",
+ "gbrain query --adaptive-return",
+ "gbrain query --autocut",
+ "gbrain query --cross-modal",
+ "gbrain query --detail",
+ "gbrain query --embedding-column",
+ "gbrain query --expand",
+ "gbrain query --explain",
+ "gbrain query --explain-target",
+ "gbrain query --fields",
+ "gbrain query --image",
+ "gbrain query --image-mime",
+ "gbrain query --lang",
+ "gbrain query --limit",
+ "gbrain query --min-trust",
+ "gbrain query --mode",
+ "gbrain query --near-symbol",
+ "gbrain query --offset",
+ "gbrain query --query",
+ "gbrain query --recency",
+ "gbrain query --relational",
+ "gbrain query --return-unit",
+ "gbrain query --return-window",
+ "gbrain query --salience",
+ "gbrain query --since",
+ "gbrain query --snippet-chars",
+ "gbrain query --source-id",
+ "gbrain query --source-ids",
+ "gbrain query --symbol-kind",
+ "gbrain query --token-budget",
+ "gbrain query --types",
+ "gbrain query --until",
+ "gbrain query --walk-depth",
+ "gbrain query --where",
+ "gbrain rank-entities --direction",
+ "gbrain rank-entities --include-mentions",
+ "gbrain rank-entities --limit",
+ "gbrain rank-entities --link-type",
+ "gbrain rank-entities --source-id",
+ "gbrain rank-entities --types",
+ "gbrain rate --answer-id",
+ "gbrain rate --pages",
+ "gbrain rate --rating",
+ "gbrain remember --claim-metric",
+ "gbrain remember --claim-period",
+ "gbrain remember --claim-unit",
+ "gbrain remember --claim-value",
+ "gbrain remember --content-origin",
+ "gbrain remember --entity",
+ "gbrain remember --expected-revision",
+ "gbrain remember --fact",
+ "gbrain remember --force",
+ "gbrain remember --infer-entity",
+ "gbrain remember --items",
+ "gbrain remember --kind",
+ "gbrain remember --provenance",
+ "gbrain remember --replaces",
+ "gbrain remember --request-id",
+ "gbrain remember --share",
+ "gbrain remember --source-id",
+ "gbrain remember --ttl",
+ "gbrain remember --valid-from",
+ "gbrain remember --visibility",
+ "gbrain restore --detach",
+ "gbrain restore --expected-revision",
+ "gbrain restore --force",
+ "gbrain restore --request-id",
+ "gbrain restore --slug",
+ "gbrain restore --source-id",
+ "gbrain retain-skill-revision --hours",
+ "gbrain retain-skill-revision --name",
+ "gbrain retain-skill-revision --pack-id",
+ "gbrain retain-skill-revision --revision",
+ "gbrain retain-skill-revision --source-id",
+ "gbrain retain-skill-revision --source-incarnation",
+ "gbrain revert --expected-revision",
+ "gbrain revert --force",
+ "gbrain revert --reason",
+ "gbrain revert --request-id",
+ "gbrain revert --slug",
+ "gbrain revert --source-id",
+ "gbrain revert --version-id",
+ "gbrain search --cursor",
+ "gbrain search --fields",
+ "gbrain search --limit",
+ "gbrain search --match",
+ "gbrain search --min-trust",
+ "gbrain search --mode",
+ "gbrain search --offset",
+ "gbrain search --query",
+ "gbrain search --recency",
+ "gbrain search --return-unit",
+ "gbrain search --return-window",
+ "gbrain search --salience",
+ "gbrain search --snippet-chars",
+ "gbrain search --source-id",
+ "gbrain search --source-ids",
+ "gbrain search --token-budget",
+ "gbrain search --types",
+ "gbrain search --where",
+ "gbrain search-by-image --image-data",
+ "gbrain search-by-image --image-mime",
+ "gbrain search-by-image --image-path",
+ "gbrain search-by-image --image-url",
+ "gbrain search-by-image --limit",
+ "gbrain search-by-image --offset",
+ "gbrain search-by-image --query",
+ "gbrain search-by-image --source-id",
+ "gbrain search-exact --after",
+ "gbrain search-exact --case-sensitive",
+ "gbrain search-exact --limit",
+ "gbrain search-exact --max-seconds",
+ "gbrain search-exact --min-trust",
+ "gbrain search-exact --phrase",
+ "gbrain search-exact --slug-prefix",
+ "gbrain search-exact --source-id",
+ "gbrain search-exact --types",
+ "gbrain serve --access",
+ "gbrain serve --advertise",
+ "gbrain serve --bind",
+ "gbrain serve --cli-socket",
+ "gbrain serve --enable-dcr",
+ "gbrain serve --enable-dcr-insecure",
+ "gbrain serve --fail-fast",
+ "gbrain serve --http",
+ "gbrain serve --log-full-params",
+ "gbrain serve --port",
+ "gbrain serve --print-admin-token",
+ "gbrain serve --public-url",
+ "gbrain serve --source-guard",
+ "gbrain serve --stdio-idle-timeout",
+ "gbrain serve --stdio-member",
+ "gbrain serve --suppress-bootstrap-token",
+ "gbrain serve --surface",
+ "gbrain serve --token-ttl",
+ "gbrain set-skill-policy --expected-policy-epoch",
+ "gbrain set-skill-policy --policy",
+ "gbrain set-skill-policy --source-id",
+ "gbrain since --date",
+ "gbrain since --kind",
+ "gbrain since --limit",
+ "gbrain skill --expected-brain-id",
+ "gbrain skill --name",
+ "gbrain skill --pack-id",
+ "gbrain skill --qualified-id",
+ "gbrain skill --revision",
+ "gbrain skill --schema-version",
+ "gbrain skill --source-id",
+ "gbrain skill --source-incarnation",
+ "gbrain skill-asset --expected-brain-id",
+ "gbrain skill-asset --name",
+ "gbrain skill-asset --pack-id",
+ "gbrain skill-asset --path",
+ "gbrain skill-asset --qualified-id",
+ "gbrain skill-asset --revision",
+ "gbrain skill-asset --source-id",
+ "gbrain skill-asset --source-incarnation",
+ "gbrain skill-policy --source-id",
+ "gbrain skill-retention --source-id",
+ "gbrain skills --cursor",
+ "gbrain skills --limit",
+ "gbrain skills --query",
+ "gbrain skills --schema-version",
+ "gbrain skills --section",
+ "gbrain skills --source-id",
+ "gbrain stats --by",
+ "gbrain stats --collapse-aliases",
+ "gbrain stats --since",
+ "gbrain status --deadline-ms",
+ "gbrain status --delete",
+ "gbrain status --enable",
+ "gbrain status --fast",
+ "gbrain status --funnel",
+ "gbrain status --json",
+ "gbrain status --section",
+ "gbrain storage-find --limit",
+ "gbrain storage-find --query",
+ "gbrain storage-find --status",
+ "gbrain storage-find --store",
+ "gbrain storage-get --id",
+ "gbrain storage-list --limit",
+ "gbrain storage-list --offset",
+ "gbrain storage-list --on-source-machine",
+ "gbrain storage-list --status",
+ "gbrain storage-list --store",
+ "gbrain storage-register --card",
+ "gbrain storage-update --expected-revision",
+ "gbrain storage-update --id",
+ "gbrain storage-update --patch",
+ "gbrain storage-update --restored-to",
+ "gbrain storage-update --restored-verified",
+ "gbrain sync-brain-skills --acknowledgment",
+ "gbrain sync-brain-skills --enrollment-epoch",
+ "gbrain sync-brain-skills --installation-id",
+ "gbrain synthesize --question",
+ "gbrain synthesize --since",
+ "gbrain synthesize --until",
+ "gbrain tag --expected-revision",
+ "gbrain tag --force",
+ "gbrain tag --request-id",
+ "gbrain tag --slug",
+ "gbrain tag --tag",
+ "gbrain tags --slug",
+ "gbrain takes-calibration --bucket-size",
+ "gbrain takes-calibration --holder",
+ "gbrain takes-list --active",
+ "gbrain takes-list --holder",
+ "gbrain takes-list --kind",
+ "gbrain takes-list --limit",
+ "gbrain takes-list --min-trust",
+ "gbrain takes-list --offset",
+ "gbrain takes-list --page-slug",
+ "gbrain takes-list --resolved",
+ "gbrain takes-list --sort-by",
+ "gbrain takes-scorecard --domain-prefix",
+ "gbrain takes-scorecard --group-by",
+ "gbrain takes-scorecard --holder",
+ "gbrain takes-scorecard --min-n",
+ "gbrain takes-scorecard --since",
+ "gbrain takes-scorecard --until",
+ "gbrain takes-search --limit",
+ "gbrain takes-search --min-trust",
+ "gbrain takes-search --query",
+ "gbrain timeline --after",
+ "gbrain timeline --before",
+ "gbrain timeline --limit",
+ "gbrain timeline --min-trust",
+ "gbrain timeline --since",
+ "gbrain timeline --slug",
+ "gbrain timeline --source-id",
+ "gbrain timeline --source-ids",
+ "gbrain timeline --until",
+ "gbrain timeline-add --date",
+ "gbrain timeline-add --detail",
+ "gbrain timeline-add --expected-revision",
+ "gbrain timeline-add --force",
+ "gbrain timeline-add --request-id",
+ "gbrain timeline-add --slug",
+ "gbrain timeline-add --source",
+ "gbrain timeline-add --summary",
+ "gbrain unlink --from",
+ "gbrain unlink --link-source",
+ "gbrain unlink --link-type",
+ "gbrain unlink --request-id",
+ "gbrain unlink --to",
+ "gbrain untag --expected-revision",
+ "gbrain untag --force",
+ "gbrain untag --request-id",
+ "gbrain untag --slug",
+ "gbrain untag --tag",
+ "gbrain volunteer-context --days",
+ "gbrain volunteer-context --max-pages",
+ "gbrain volunteer-context --min-confidence",
+ "gbrain volunteer-context --min-trust",
+ "gbrain volunteer-context --prior-context",
+ "gbrain volunteer-context --session-id",
+ "gbrain volunteer-context --source-ids",
+ "gbrain volunteer-context --stats",
+ "gbrain volunteer-context --turn",
+ "gbrain volunteer-context --window",
+ "gbrain wanted --count-only",
+ "gbrain wanted --limit",
+ "gbrain wanted --offset",
+ "gbrain wanted --source-id",
+ "gbrain whois --query",
+ "gbrain whois --source-id",
+ "gbrain whois --types",
+ "gbrain write-conflicts --cursor",
+ "gbrain write-conflicts --limit",
+ "gbrain write-conflicts --source-id",
+ "gbrain write-request --applied",
+ "gbrain write-request --request-id",
+ "gbrain write-requests --before",
+ "gbrain write-requests --limit",
+ "gbrain write-requests --source-id"
+ ],
+ "mcp-tool": [
+ "abort_page_upload",
+ "accept_wakeshift_terms",
+ "add_link",
+ "add_tag",
+ "add_timeline_entry",
+ "advisor",
+ "append_page",
+ "assemble_evidence",
+ "begin_page_upload",
+ "cache_stats",
+ "cancel_job",
+ "cancel_write_request",
+ "capture",
+ "chronicle_backfill",
+ "chronicle_day",
+ "chronicle_last_seen",
+ "chronicle_on_this_day",
+ "chronicle_since",
+ "code_blast",
+ "code_callees",
+ "code_callers",
+ "code_def",
+ "code_flow",
+ "code_refs",
+ "code_traversal_cache_clear",
+ "commit_page_upload",
+ "confirm_memory",
+ "context_pack",
+ "delete_page",
+ "delete_skill",
+ "delta",
+ "edit_page",
+ "entity",
+ "entity_identity_link",
+ "entity_identity_list",
+ "entity_identity_unlink",
+ "extract_entities",
+ "extract_facts",
+ "extraction_pending",
+ "fetch",
+ "file_list",
+ "file_upload",
+ "file_url",
+ "find_anomalies",
+ "find_contradictions",
+ "find_experts",
+ "find_orphans",
+ "find_pages",
+ "find_trajectory",
+ "forget",
+ "forget_fact",
+ "get_active_schema_pack",
+ "get_agent_job",
+ "get_backlinks",
+ "get_brain_health",
+ "get_brain_identity",
+ "get_calibration_profile",
+ "get_chunks",
+ "get_health",
+ "get_ingest_log",
+ "get_job",
+ "get_job_progress",
+ "get_job_stats",
+ "get_links",
+ "get_memory_settings",
+ "get_page",
+ "get_page_upload",
+ "get_raw_data",
+ "get_recent_salience",
+ "get_skill",
+ "get_skill_asset",
+ "get_skill_policy",
+ "get_stats",
+ "get_status_snapshot",
+ "get_tags",
+ "get_timeline",
+ "get_usage",
+ "get_versions",
+ "get_write_attribution",
+ "get_write_request",
+ "join_brain",
+ "leave_brain",
+ "list_brain_skillpack",
+ "list_jobs",
+ "list_link_sources",
+ "list_pages",
+ "list_schema_packs",
+ "list_skills",
+ "list_watches",
+ "list_write_conflicts",
+ "list_write_requests",
+ "log_ingest",
+ "loops_close",
+ "loops_mute",
+ "loops_unmute",
+ "memory_conversation_mode",
+ "memory_propose",
+ "memory_recall",
+ "memory_write",
+ "mute_notice",
+ "ontology_conflicts",
+ "ontology_dimensions",
+ "ontology_get",
+ "ontology_propose",
+ "open_loops",
+ "pause_job",
+ "promote_guest_note",
+ "put_page",
+ "put_pages",
+ "put_raw_data",
+ "put_skill",
+ "quarantine_list",
+ "query",
+ "questions_list",
+ "questions_pin",
+ "questions_refresh",
+ "questions_status",
+ "questions_unpin",
+ "rank_entities",
+ "rate_answer",
+ "recall",
+ "reload_schema_pack",
+ "remember",
+ "remove_link",
+ "remove_tag",
+ "replay_job",
+ "request_tools",
+ "resolve_slugs",
+ "restore_page",
+ "resume_job",
+ "retry_job",
+ "revert_version",
+ "run_doctor",
+ "run_onboard",
+ "run_skillopt",
+ "schema_apply_mutations",
+ "schema_explain_type",
+ "schema_graph",
+ "schema_lint",
+ "schema_review_orphans",
+ "schema_stats",
+ "search",
+ "search_by_image",
+ "search_exact",
+ "search_modes",
+ "search_stats",
+ "search_tune",
+ "send_job_message",
+ "set_memory_writeback",
+ "set_skill_policy",
+ "sources_add",
+ "sources_list",
+ "sources_remove",
+ "sources_resolve_path",
+ "sources_status",
+ "storage_find",
+ "storage_get",
+ "storage_list",
+ "submit_agent",
+ "submit_job",
+ "sync_brain",
+ "sync_brain_skills",
+ "synthesize",
+ "takes_add",
+ "takes_calibration",
+ "takes_list",
+ "takes_rebuild",
+ "takes_remove",
+ "takes_resolve",
+ "takes_scorecard",
+ "takes_search",
+ "takes_supersede",
+ "takes_update",
+ "think",
+ "traverse_graph",
+ "unwatch",
+ "upload_page_part",
+ "volunteer_chronicle",
+ "volunteer_context",
+ "wait_job",
+ "wanted_pages",
+ "watch_cron",
+ "watch_job",
+ "watch_write_request",
+ "whoami",
+ "whois"
+ ],
+ "mcp-param": [
+ "abort_page_upload.upload_id",
+ "accept_wakeshift_terms.terms_version",
+ "add_link.context",
+ "add_link.from",
+ "add_link.link_source",
+ "add_link.link_type",
+ "add_link.request_id",
+ "add_link.to",
+ "add_link.valid_from",
+ "add_link.valid_until",
+ "add_tag.expected_revision",
+ "add_tag.force",
+ "add_tag.request_id",
+ "add_tag.slug",
+ "add_tag.tag",
+ "add_timeline_entry.date",
+ "add_timeline_entry.detail",
+ "add_timeline_entry.expected_revision",
+ "add_timeline_entry.force",
+ "add_timeline_entry.request_id",
+ "add_timeline_entry.slug",
+ "add_timeline_entry.source",
+ "add_timeline_entry.summary",
+ "append_page.expected_revision",
+ "append_page.expected_tail_sha256",
+ "append_page.region",
+ "append_page.request_id",
+ "append_page.separator",
+ "append_page.slug",
+ "append_page.source_id",
+ "append_page.text",
+ "append_page.wait_ms",
+ "assemble_evidence.detail",
+ "assemble_evidence.hits",
+ "assemble_evidence.min_trust",
+ "assemble_evidence.return_unit",
+ "assemble_evidence.return_window",
+ "assemble_evidence.token_budget",
+ "begin_page_upload.expected_revision",
+ "begin_page_upload.mode",
+ "begin_page_upload.request_id",
+ "begin_page_upload.sha256",
+ "begin_page_upload.slug",
+ "begin_page_upload.source_id",
+ "begin_page_upload.total_bytes",
+ "cancel_job.id",
+ "cancel_write_request.request_id",
+ "capture.content",
+ "capture.content_origin",
+ "capture.depth",
+ "capture.expected_revision",
+ "capture.force",
+ "capture.ingested_via",
+ "capture.kind",
+ "capture.local_file",
+ "capture.request_id",
+ "capture.slug",
+ "capture.source_id",
+ "capture.source_kind",
+ "capture.source_uri",
+ "capture.type",
+ "capture.what",
+ "capture.where",
+ "capture.who",
+ "chronicle_backfill.dated_since",
+ "chronicle_backfill.dry_run",
+ "chronicle_backfill.limit",
+ "chronicle_backfill.max_usd",
+ "chronicle_backfill.recent",
+ "chronicle_backfill.since",
+ "chronicle_backfill.yes",
+ "chronicle_day.date",
+ "chronicle_day.limit",
+ "chronicle_day.narrative",
+ "chronicle_day.week",
+ "chronicle_last_seen.asof",
+ "chronicle_last_seen.entity",
+ "chronicle_on_this_day.date",
+ "chronicle_on_this_day.limit",
+ "chronicle_since.date",
+ "chronicle_since.kind",
+ "chronicle_since.limit",
+ "code_blast.depth",
+ "code_blast.exact",
+ "code_blast.max_nodes",
+ "code_blast.source_id",
+ "code_blast.symbol",
+ "code_callees.all_sources",
+ "code_callees.limit",
+ "code_callees.source_id",
+ "code_callees.symbol",
+ "code_callers.all_sources",
+ "code_callers.limit",
+ "code_callers.source_id",
+ "code_callers.symbol",
+ "code_def.lang",
+ "code_def.limit",
+ "code_def.symbol",
+ "code_flow.depth",
+ "code_flow.entry_point",
+ "code_flow.exact",
+ "code_flow.max_nodes",
+ "code_flow.source_id",
+ "code_refs.lang",
+ "code_refs.limit",
+ "code_refs.symbol",
+ "code_traversal_cache_clear.all_sources",
+ "code_traversal_cache_clear.source_id",
+ "commit_page_upload.allow_empty",
+ "commit_page_upload.allow_shrink",
+ "commit_page_upload.content_origin",
+ "commit_page_upload.drop_timeline",
+ "commit_page_upload.upload_id",
+ "commit_page_upload.wait_ms",
+ "confirm_memory.ref",
+ "context_pack.budget_tokens",
+ "context_pack.counterparty",
+ "context_pack.entities",
+ "context_pack.entity_refs",
+ "context_pack.include_private",
+ "context_pack.include_quarantined",
+ "context_pack.intent",
+ "context_pack.min_trust",
+ "context_pack.prefer_source_id",
+ "context_pack.session_id",
+ "context_pack.since",
+ "context_pack.source_id",
+ "delete_page.expected_revision",
+ "delete_page.force",
+ "delete_page.purge",
+ "delete_page.request_id",
+ "delete_page.slug",
+ "delete_page.source_id",
+ "delete_skill.expected_revision",
+ "delete_skill.name",
+ "delete_skill.pack_id",
+ "delete_skill.request_id",
+ "delete_skill.source_id",
+ "delete_skill.source_incarnation",
+ "delta.beliefs",
+ "delta.budget_tokens",
+ "delta.cursor",
+ "delta.entities",
+ "delta.include_private",
+ "delta.min_trust",
+ "delta.session_id",
+ "delta.since",
+ "delta.since_slug",
+ "edit_page.edits",
+ "edit_page.expected_revision",
+ "edit_page.reason",
+ "edit_page.request_id",
+ "edit_page.slug",
+ "edit_page.source_id",
+ "edit_page.within",
+ "entity.name",
+ "entity.names",
+ "entity.prefer_source_id",
+ "entity.source_id",
+ "entity.variants",
+ "entity_identity_link.canonical",
+ "entity_identity_link.confidence",
+ "entity_identity_link.entity_id",
+ "entity_identity_link.slug",
+ "entity_identity_link.source_id",
+ "entity_identity_list.entity_id",
+ "entity_identity_list.slug",
+ "entity_identity_unlink.entity_id",
+ "entity_identity_unlink.slug",
+ "entity_identity_unlink.source_id",
+ "extract_entities.source_slug",
+ "extract_entities.text",
+ "extract_entities.trusted_extraction",
+ "extract_facts.entity_hints",
+ "extract_facts.is_dream_generated",
+ "extract_facts.request_id",
+ "extract_facts.session_id",
+ "extract_facts.source_slug",
+ "extract_facts.turn_text",
+ "extract_facts.valid_from",
+ "extract_facts.visibility",
+ "extraction_pending.include",
+ "extraction_pending.limit",
+ "extraction_pending.offset",
+ "extraction_pending.possible_duplicates_cursor",
+ "extraction_pending.since_days",
+ "extraction_pending.unattributed_offset",
+ "fetch.id",
+ "fetch.include_quarantined",
+ "fetch.min_trust",
+ "file_list.slug",
+ "file_upload.page_slug",
+ "file_upload.path",
+ "file_url.storage_path",
+ "find_anomalies.lookback_days",
+ "find_anomalies.sigma",
+ "find_anomalies.since",
+ "find_contradictions.limit",
+ "find_contradictions.min_trust",
+ "find_contradictions.severity",
+ "find_contradictions.slug",
+ "find_experts.explain",
+ "find_experts.limit",
+ "find_experts.source_ids",
+ "find_experts.topic",
+ "find_orphans.count_only",
+ "find_orphans.cursor",
+ "find_orphans.include_pseudo",
+ "find_orphans.limit",
+ "find_orphans.mode",
+ "find_orphans.offset",
+ "find_orphans.source_id",
+ "find_pages.limit",
+ "find_pages.pattern",
+ "find_pages.source_id",
+ "find_pages.type",
+ "find_pages.types",
+ "find_trajectory.entity_slug",
+ "find_trajectory.kind",
+ "find_trajectory.limit",
+ "find_trajectory.metric",
+ "find_trajectory.since",
+ "find_trajectory.until",
+ "forget.id",
+ "forget.reason",
+ "forget.request_id",
+ "forget.semantic_review",
+ "forget_fact.id",
+ "forget_fact.reason",
+ "forget_fact.request_id",
+ "get_agent_job.id",
+ "get_backlinks.all",
+ "get_backlinks.all_sources",
+ "get_backlinks.as_of",
+ "get_backlinks.cursor",
+ "get_backlinks.group",
+ "get_backlinks.limit",
+ "get_backlinks.slug",
+ "get_backlinks.source_id",
+ "get_backlinks.status",
+ "get_backlinks.type",
+ "get_calibration_profile.holder",
+ "get_chunks.from_index",
+ "get_chunks.limit",
+ "get_chunks.min_trust",
+ "get_chunks.slug",
+ "get_ingest_log.limit",
+ "get_job.id",
+ "get_job_progress.id",
+ "get_job_stats.queue",
+ "get_job_stats.since_hours",
+ "get_links.all",
+ "get_links.all_sources",
+ "get_links.as_of",
+ "get_links.cursor",
+ "get_links.during",
+ "get_links.limit",
+ "get_links.link_type",
+ "get_links.slug",
+ "get_links.source_id",
+ "get_links.status",
+ "get_page.around_chunk_id",
+ "get_page.as_of",
+ "get_page.body",
+ "get_page.bytes",
+ "get_page.content_only",
+ "get_page.context",
+ "get_page.context_lines",
+ "get_page.cursor",
+ "get_page.fuzzy",
+ "get_page.grammar_diagnostics",
+ "get_page.grep",
+ "get_page.include_content",
+ "get_page.include_deleted",
+ "get_page.include_quarantined",
+ "get_page.include_timeline_entries",
+ "get_page.known_as_of",
+ "get_page.lines",
+ "get_page.max_bytes",
+ "get_page.min_trust",
+ "get_page.outline_from",
+ "get_page.section",
+ "get_page.slug",
+ "get_page.source_id",
+ "get_page.view",
+ "get_page_upload.upload_id",
+ "get_raw_data.slug",
+ "get_raw_data.source",
+ "get_recent_salience.days",
+ "get_recent_salience.limit",
+ "get_recent_salience.recency_bias",
+ "get_recent_salience.slugPrefix",
+ "get_skill.expected_brain_id",
+ "get_skill.name",
+ "get_skill.pack_id",
+ "get_skill.qualified_id",
+ "get_skill.revision",
+ "get_skill.schema_version",
+ "get_skill.source_id",
+ "get_skill.source_incarnation",
+ "get_skill_asset.expected_brain_id",
+ "get_skill_asset.name",
+ "get_skill_asset.pack_id",
+ "get_skill_asset.path",
+ "get_skill_asset.qualified_id",
+ "get_skill_asset.revision",
+ "get_skill_asset.source_id",
+ "get_skill_asset.source_incarnation",
+ "get_skill_policy.source_id",
+ "get_stats.by",
+ "get_stats.collapse_aliases",
+ "get_stats.since",
+ "get_tags.slug",
+ "get_timeline.after",
+ "get_timeline.before",
+ "get_timeline.limit",
+ "get_timeline.min_trust",
+ "get_timeline.since",
+ "get_timeline.slug",
+ "get_timeline.source_id",
+ "get_timeline.source_ids",
+ "get_timeline.until",
+ "get_usage.days",
+ "get_versions.diff",
+ "get_versions.include_body",
+ "get_versions.known_as_of",
+ "get_versions.limit",
+ "get_versions.slug",
+ "get_versions.source_id",
+ "get_write_attribution.fact",
+ "get_write_attribution.slug",
+ "get_write_attribution.take",
+ "get_write_attribution.timeline",
+ "get_write_attribution.versions",
+ "get_write_request.applied",
+ "get_write_request.request_id",
+ "join_brain.adapter",
+ "join_brain.follow_policy",
+ "leave_brain.enrollment_epoch",
+ "leave_brain.installation_id",
+ "list_jobs.cursor",
+ "list_jobs.fields",
+ "list_jobs.finished_since",
+ "list_jobs.limit",
+ "list_jobs.name",
+ "list_jobs.queue",
+ "list_jobs.status",
+ "list_pages.include_deleted",
+ "list_pages.limit",
+ "list_pages.offset",
+ "list_pages.slug_prefix",
+ "list_pages.sort",
+ "list_pages.source_id",
+ "list_pages.source_ids",
+ "list_pages.tag",
+ "list_pages.type",
+ "list_pages.updated_after",
+ "list_pages.updated_after_slug",
+ "list_pages.where",
+ "list_skills.cursor",
+ "list_skills.limit",
+ "list_skills.query",
+ "list_skills.schema_version",
+ "list_skills.section",
+ "list_skills.source_id",
+ "list_write_conflicts.cursor",
+ "list_write_conflicts.limit",
+ "list_write_conflicts.source_id",
+ "list_write_requests.before",
+ "list_write_requests.limit",
+ "list_write_requests.source_id",
+ "log_ingest.pages_updated",
+ "log_ingest.source_ref",
+ "log_ingest.source_type",
+ "log_ingest.summary",
+ "loops_close.id",
+ "loops_close.note",
+ "loops_close.source_id",
+ "loops_close.status",
+ "loops_mute.kind",
+ "loops_mute.source_id",
+ "loops_mute.value",
+ "loops_unmute.kind",
+ "loops_unmute.source_id",
+ "loops_unmute.value",
+ "memory_conversation_mode.mode",
+ "memory_propose.acting_user",
+ "memory_propose.context",
+ "memory_propose.date",
+ "memory_propose.detail",
+ "memory_propose.expected_revision",
+ "memory_propose.idempotency_key",
+ "memory_propose.kind",
+ "memory_propose.link_type",
+ "memory_propose.source",
+ "memory_propose.summary",
+ "memory_propose.target",
+ "memory_propose.to",
+ "memory_propose.valid_from",
+ "memory_propose.valid_until",
+ "memory_recall.acting_user",
+ "memory_recall.max_chars",
+ "memory_recall.query",
+ "memory_recall.query_keep",
+ "memory_recall.source_id",
+ "memory_recall.source_ids",
+ "memory_write.acting_user",
+ "memory_write.facts",
+ "memory_write.idempotency_key",
+ "memory_write.source_id",
+ "mute_notice.code",
+ "mute_notice.muted",
+ "ontology_conflicts.min_confidence",
+ "ontology_get.asof",
+ "ontology_get.entity",
+ "ontology_get.include_quarantined",
+ "ontology_get.min_confidence",
+ "ontology_propose.confidence",
+ "ontology_propose.dimension",
+ "ontology_propose.entity",
+ "ontology_propose.source",
+ "ontology_propose.valid_from",
+ "ontology_propose.valid_to",
+ "ontology_propose.value",
+ "ontology_propose.visibility",
+ "open_loops.all_sources",
+ "open_loops.as_of",
+ "open_loops.counterparty",
+ "open_loops.group_by",
+ "open_loops.id",
+ "open_loops.include_context",
+ "open_loops.limit",
+ "open_loops.loop_type",
+ "open_loops.source_id",
+ "open_loops.status",
+ "pause_job.id",
+ "promote_guest_note.guest_source",
+ "promote_guest_note.request_id",
+ "promote_guest_note.slug",
+ "promote_guest_note.source_id",
+ "promote_guest_note.to",
+ "put_page.allow_empty",
+ "put_page.allow_shrink",
+ "put_page.content",
+ "put_page.content_origin",
+ "put_page.drop_timeline",
+ "put_page.expected_revision",
+ "put_page.force",
+ "put_page.ingested_via",
+ "put_page.reason",
+ "put_page.request_id",
+ "put_page.slug",
+ "put_page.source_id",
+ "put_page.source_kind",
+ "put_page.source_uri",
+ "put_page.wait_ms",
+ "put_pages.pages",
+ "put_pages.request_id",
+ "put_pages.source_id",
+ "put_pages.wait_ms",
+ "put_raw_data.data",
+ "put_raw_data.slug",
+ "put_raw_data.source",
+ "put_skill.description",
+ "put_skill.expected_revision",
+ "put_skill.files",
+ "put_skill.name",
+ "put_skill.pack_id",
+ "put_skill.private",
+ "put_skill.request_id",
+ "put_skill.requirements",
+ "put_skill.source_id",
+ "put_skill.source_incarnation",
+ "put_skill.triggers",
+ "quarantine_list.include_flagged",
+ "quarantine_list.limit",
+ "quarantine_list.max_scan",
+ "query.adaptive_return",
+ "query.autocut",
+ "query.cross_modal",
+ "query.detail",
+ "query.embedding_column",
+ "query.expand",
+ "query.explain",
+ "query.explain_target",
+ "query.fields",
+ "query.image",
+ "query.image_mime",
+ "query.lang",
+ "query.limit",
+ "query.min_trust",
+ "query.mode",
+ "query.near_symbol",
+ "query.offset",
+ "query.query",
+ "query.recency",
+ "query.relational",
+ "query.return_unit",
+ "query.return_window",
+ "query.salience",
+ "query.since",
+ "query.snippet_chars",
+ "query.source_id",
+ "query.source_ids",
+ "query.symbol_kind",
+ "query.token_budget",
+ "query.types",
+ "query.until",
+ "query.walk_depth",
+ "query.where",
+ "questions_list.include_archived",
+ "questions_list.source",
+ "questions_pin.defer",
+ "questions_pin.id",
+ "questions_pin.publish",
+ "questions_pin.question",
+ "questions_pin.scope",
+ "questions_pin.wait_ms",
+ "questions_refresh.full",
+ "questions_refresh.id",
+ "questions_refresh.wait_ms",
+ "questions_status.id",
+ "questions_status.include_answer",
+ "questions_unpin.id",
+ "rank_entities.direction",
+ "rank_entities.include_mentions",
+ "rank_entities.limit",
+ "rank_entities.link_type",
+ "rank_entities.source_id",
+ "rank_entities.types",
+ "rate_answer.answer_id",
+ "rate_answer.pages",
+ "rate_answer.rating",
+ "recall.budget_policy",
+ "recall.budget_tokens",
+ "recall.entity",
+ "recall.grep",
+ "recall.include_expired",
+ "recall.include_pending",
+ "recall.limit",
+ "recall.max_chars",
+ "recall.min_trust",
+ "recall.query",
+ "recall.question",
+ "recall.return_unit",
+ "recall.return_window",
+ "recall.session_id",
+ "recall.since",
+ "recall.source_id",
+ "recall.source_ids",
+ "recall.supersessions",
+ "reload_schema_pack.pack",
+ "remember.claim_metric",
+ "remember.claim_period",
+ "remember.claim_unit",
+ "remember.claim_value",
+ "remember.content_origin",
+ "remember.entity",
+ "remember.expected_revision",
+ "remember.fact",
+ "remember.force",
+ "remember.infer_entity",
+ "remember.items",
+ "remember.kind",
+ "remember.provenance",
+ "remember.replaces",
+ "remember.request_id",
+ "remember.share",
+ "remember.source_id",
+ "remember.ttl",
+ "remember.valid_from",
+ "remember.visibility",
+ "remove_link.from",
+ "remove_link.link_source",
+ "remove_link.link_type",
+ "remove_link.request_id",
+ "remove_link.to",
+ "remove_tag.expected_revision",
+ "remove_tag.force",
+ "remove_tag.request_id",
+ "remove_tag.slug",
+ "remove_tag.tag",
+ "replay_job.data_overrides",
+ "replay_job.id",
+ "request_tools.surface",
+ "request_tools.tools",
+ "resolve_slugs.partial",
+ "resolve_slugs.source_id",
+ "restore_page.detach",
+ "restore_page.expected_revision",
+ "restore_page.force",
+ "restore_page.request_id",
+ "restore_page.slug",
+ "restore_page.source_id",
+ "resume_job.id",
+ "retry_job.id",
+ "revert_version.expected_revision",
+ "revert_version.force",
+ "revert_version.reason",
+ "revert_version.request_id",
+ "revert_version.slug",
+ "revert_version.source_id",
+ "revert_version.version_id",
+ "run_doctor.only",
+ "run_doctor.tier",
+ "run_onboard.max_usd",
+ "run_onboard.mode",
+ "run_onboard.target_score",
+ "run_skillopt.allow_mutate_bundled",
+ "run_skillopt.batch_size",
+ "run_skillopt.benchmark_path",
+ "run_skillopt.dry_run",
+ "run_skillopt.epochs",
+ "run_skillopt.expected_revision",
+ "run_skillopt.held_out_path",
+ "run_skillopt.lr",
+ "run_skillopt.max_cost_usd",
+ "run_skillopt.no_mutate",
+ "run_skillopt.optimizer_mode",
+ "run_skillopt.pack_id",
+ "run_skillopt.reflect_max_tokens",
+ "run_skillopt.request_id",
+ "run_skillopt.shared_skill",
+ "run_skillopt.skill_name",
+ "run_skillopt.source_id",
+ "run_skillopt.source_incarnation",
+ "schema_apply_mutations.force",
+ "schema_apply_mutations.mutations",
+ "schema_apply_mutations.pack",
+ "schema_explain_type.type",
+ "schema_lint.pack",
+ "schema_review_orphans.limit",
+ "search.cursor",
+ "search.fields",
+ "search.limit",
+ "search.match",
+ "search.min_trust",
+ "search.mode",
+ "search.offset",
+ "search.query",
+ "search.recency",
+ "search.return_unit",
+ "search.return_window",
+ "search.salience",
+ "search.snippet_chars",
+ "search.source_id",
+ "search.source_ids",
+ "search.token_budget",
+ "search.types",
+ "search.where",
+ "search_by_image.image_data",
+ "search_by_image.image_mime",
+ "search_by_image.image_path",
+ "search_by_image.image_url",
+ "search_by_image.limit",
+ "search_by_image.offset",
+ "search_by_image.query",
+ "search_by_image.source_id",
+ "search_exact.after",
+ "search_exact.case_sensitive",
+ "search_exact.limit",
+ "search_exact.max_seconds",
+ "search_exact.min_trust",
+ "search_exact.phrase",
+ "search_exact.slug_prefix",
+ "search_exact.source_id",
+ "search_exact.types",
+ "search_stats.days",
+ "send_job_message.id",
+ "send_job_message.payload",
+ "send_job_message.sender",
+ "set_memory_writeback.dry_run",
+ "set_memory_writeback.mode",
+ "set_skill_policy.expected_policy_epoch",
+ "set_skill_policy.policy",
+ "set_skill_policy.source_id",
+ "sources_add.clone_dir",
+ "sources_add.federated",
+ "sources_add.id",
+ "sources_add.name",
+ "sources_add.path",
+ "sources_add.url",
+ "sources_list.include_archived",
+ "sources_remove.confirm_destructive",
+ "sources_remove.dry_run",
+ "sources_remove.id",
+ "sources_remove.keep_storage",
+ "sources_resolve_path.id",
+ "sources_resolve_path.paths",
+ "sources_status.id",
+ "storage_find.limit",
+ "storage_find.query",
+ "storage_find.status",
+ "storage_find.store",
+ "storage_get.id",
+ "storage_list.limit",
+ "storage_list.offset",
+ "storage_list.on_source_machine",
+ "storage_list.status",
+ "storage_list.store",
+ "submit_agent.allowed_slug_prefixes",
+ "submit_agent.allowed_tools",
+ "submit_agent.max_turns",
+ "submit_agent.model",
+ "submit_agent.prompt",
+ "submit_agent.queue",
+ "submit_job.data",
+ "submit_job.delay",
+ "submit_job.lock_duration_ms",
+ "submit_job.max_attempts",
+ "submit_job.name",
+ "submit_job.priority",
+ "submit_job.queue",
+ "submit_job.timeout_ms",
+ "sync_brain.dry_run",
+ "sync_brain.full",
+ "sync_brain.no_embed",
+ "sync_brain.no_pull",
+ "sync_brain.repo",
+ "sync_brain.source_id",
+ "sync_brain_skills.acknowledgment",
+ "sync_brain_skills.enrollment_epoch",
+ "sync_brain_skills.installation_id",
+ "synthesize.question",
+ "synthesize.since",
+ "synthesize.until",
+ "takes_add.claim",
+ "takes_add.expected_revision",
+ "takes_add.force",
+ "takes_add.holder",
+ "takes_add.kind",
+ "takes_add.local_dir",
+ "takes_add.request_id",
+ "takes_add.since",
+ "takes_add.slug",
+ "takes_add.source",
+ "takes_add.weight",
+ "takes_calibration.bucket_size",
+ "takes_calibration.holder",
+ "takes_list.active",
+ "takes_list.holder",
+ "takes_list.kind",
+ "takes_list.limit",
+ "takes_list.min_trust",
+ "takes_list.offset",
+ "takes_list.page_slug",
+ "takes_list.resolved",
+ "takes_list.sort_by",
+ "takes_rebuild.request_id",
+ "takes_rebuild.slug",
+ "takes_remove.expected_revision",
+ "takes_remove.force",
+ "takes_remove.local_dir",
+ "takes_remove.request_id",
+ "takes_remove.row_num",
+ "takes_remove.slug",
+ "takes_resolve.evidence",
+ "takes_resolve.expected_revision",
+ "takes_resolve.force",
+ "takes_resolve.local_dir",
+ "takes_resolve.quality",
+ "takes_resolve.request_id",
+ "takes_resolve.resolved_by",
+ "takes_resolve.row_num",
+ "takes_resolve.slug",
+ "takes_resolve.unit",
+ "takes_resolve.value",
+ "takes_scorecard.domain_prefix",
+ "takes_scorecard.group_by",
+ "takes_scorecard.holder",
+ "takes_scorecard.min_n",
+ "takes_scorecard.since",
+ "takes_scorecard.until",
+ "takes_search.limit",
+ "takes_search.min_trust",
+ "takes_search.query",
+ "takes_supersede.claim",
+ "takes_supersede.expected_revision",
+ "takes_supersede.force",
+ "takes_supersede.holder",
+ "takes_supersede.kind",
+ "takes_supersede.local_dir",
+ "takes_supersede.request_id",
+ "takes_supersede.row_num",
+ "takes_supersede.since",
+ "takes_supersede.slug",
+ "takes_supersede.source",
+ "takes_supersede.weight",
+ "takes_update.expected_revision",
+ "takes_update.force",
+ "takes_update.local_dir",
+ "takes_update.request_id",
+ "takes_update.row_num",
+ "takes_update.since",
+ "takes_update.slug",
+ "takes_update.source",
+ "takes_update.weight",
+ "think.anchor",
+ "think.model",
+ "think.question",
+ "think.reference_date",
+ "think.rounds",
+ "think.save",
+ "think.since",
+ "think.take",
+ "think.until",
+ "traverse_graph.all_sources",
+ "traverse_graph.depth",
+ "traverse_graph.direction",
+ "traverse_graph.hops",
+ "traverse_graph.link_type",
+ "traverse_graph.slug",
+ "traverse_graph.source_id",
+ "unwatch.cron",
+ "unwatch.job",
+ "unwatch.request_id",
+ "unwatch.watch",
+ "upload_page_part.part",
+ "upload_page_part.part_sha256",
+ "upload_page_part.text",
+ "upload_page_part.upload_id",
+ "volunteer_chronicle.days",
+ "volunteer_chronicle.entities",
+ "volunteer_chronicle.limit",
+ "volunteer_context.days",
+ "volunteer_context.max_pages",
+ "volunteer_context.min_confidence",
+ "volunteer_context.min_trust",
+ "volunteer_context.prior_context",
+ "volunteer_context.session_id",
+ "volunteer_context.source_ids",
+ "volunteer_context.stats",
+ "volunteer_context.turn",
+ "volunteer_context.window",
+ "wait_job.id",
+ "wait_job.timeout_s",
+ "wanted_pages.count_only",
+ "wanted_pages.limit",
+ "wanted_pages.offset",
+ "wanted_pages.source_id",
+ "watch_cron.conversation_id",
+ "watch_cron.harness",
+ "watch_cron.name",
+ "watch_cron.session_key",
+ "watch_job.conversation_id",
+ "watch_job.harness",
+ "watch_job.id",
+ "watch_job.session_key",
+ "watch_write_request.conversation_id",
+ "watch_write_request.harness",
+ "watch_write_request.request_id",
+ "watch_write_request.session_key",
+ "whois.query",
+ "whois.source_id",
+ "whois.types"
+ ],
+ "config-key": [
+ "access.enforced_member_writes",
+ "access.members_read_lineage",
+ "access.owner_member",
+ "access.owner_reads_restricted",
+ "access.requester_scope_enforce",
+ "access.serves",
+ "agent.max_output_tokens",
+ "agent.search_snippet_chars",
+ "agent.use_gateway_loop",
+ "ai.chat.per_turn_timeout_ms",
+ "anthropic_api_key",
+ "artifacts_sync_mode",
+ "auto_chronicle",
+ "auto_link",
+ "auto_timeline",
+ "autopilot.git_pull",
+ "azure_openai_api_key",
+ "azure_openai_deployment",
+ "azure_openai_endpoint",
+ "azure_openai_use_entra",
+ "backup.check_enabled",
+ "backup.check_interval_days",
+ "backup.remote_timeout_ms",
+ "brain.audience",
+ "brain.timezone",
+ "chat_fallback_chain",
+ "chat_fallback_on_refusal",
+ "chat_model",
+ "chronicle.auto_daily_limit",
+ "chronicle.auto_recent_days",
+ "chronicle.auto_settle_seconds",
+ "chronicle.job_budget_usd",
+ "chronicle.judge_max_tokens",
+ "chronicle.max_events_per_page",
+ "consent.preapprove.paid.max_usd_per_run",
+ "consent.preapprove.persistent_install",
+ "content_sanity.bytes_block",
+ "content_sanity.bytes_warn",
+ "content_sanity.disabled",
+ "content_sanity.disabled_patterns",
+ "content_sanity.junk_disposition",
+ "content_sanity.junk_patterns_enabled",
+ "content_sanity.max_markup_ratio",
+ "content_sanity.prose_check_enabled",
+ "context.hot_memory.session_only",
+ "context.proactive_brief",
+ "conversation_parser.llm_fallback_enabled",
+ "cross_project_learnings",
+ "cycle.consolidate.cluster_threshold",
+ "cycle.consolidate.enabled",
+ "cycle.extract_atoms.budget_usd",
+ "cycle.extract_atoms.max_input_chars",
+ "cycle.extract_atoms.max_output_tokens",
+ "cycle.extract_atoms.max_source_chars",
+ "cycle.extract_atoms.pacing_ms",
+ "cycle.extract_atoms.page_discovery_budget",
+ "cycle.grade_takes.auto_resolve.enabled",
+ "cycle.grade_takes.write_gstack_learnings",
+ "cycle.lint.enabled",
+ "cycle.propose_takes.enabled",
+ "cycle.propose_takes.types",
+ "cycle.purge.mcp_request_log_retention_days",
+ "cycle.synthesize_concepts.budget_usd",
+ "cycle.timezone",
+ "dashscope_api_key",
+ "database_path",
+ "database_url",
+ "deepseek_api_key",
+ "derive.max_usd_per_page",
+ "doctor.background_refresh",
+ "doctor.default_budget_ms",
+ "doctor.entry_budget_ms",
+ "doctor.orphan_ratio.full_scan_max_pages",
+ "dream.attribution_checks",
+ "dream.breaker.max_dead_submissions",
+ "dream.claim_conflicts.max_pairs",
+ "dream.claim_conflicts.mode",
+ "dream.patterns.child_read_budget_kb",
+ "dream.patterns.lookback_days",
+ "dream.patterns.min_evidence",
+ "dream.patterns.min_interval_hours",
+ "dream.patterns.subagent_timeout_ms",
+ "dream.patterns.subagent_wait_timeout_ms",
+ "dream.propose_takes.call_timeout_ms",
+ "dream.propose_takes.max_tokens",
+ "dream.propose_takes.retry_max_tokens",
+ "dream.quote_verify",
+ "dream.synthesize.conversation_pages",
+ "dream.synthesize.inline_concurrency",
+ "dream.synthesize.last_completion_ts",
+ "dream.synthesize.link_manifest",
+ "dream.synthesize.max_chunks_per_transcript",
+ "dream.synthesize.max_prompt_tokens",
+ "dream.synthesize.max_submissions_per_source_per_day",
+ "dream.synthesize.max_turns",
+ "dream.synthesize.meeting_transcripts_dir",
+ "dream.synthesize.mode",
+ "dream.synthesize.output_root",
+ "dream.synthesize.quote_verify",
+ "dream.synthesize.session_corpus_dir",
+ "dream.synthesize.subagent_timeout_ms",
+ "dream.synthesize.subagent_wait_timeout_ms",
+ "dream.synthesize.verdict_model",
+ "dream.triage.concurrency",
+ "dream.triage.max_chars",
+ "dream.triage.max_ms",
+ "dream.triage.max_tokens",
+ "dream.triage.rescue_content_types",
+ "dream.triage.rescue_floor",
+ "dream.triage.rescue_min_segments",
+ "dream.triage.threshold",
+ "dream.write_deferral.enabled",
+ "embed.backfill_cooldown_min",
+ "embed.backfill_max_usd",
+ "embed.backfill_max_usd_per_source_24h",
+ "embed.content_drift.pass_interval_hours",
+ "embed.max_usd_per_page",
+ "embed.restamp.enabled",
+ "embedding_columns",
+ "embedding_dimensions",
+ "embedding_disabled",
+ "embedding_image_ocr",
+ "embedding_image_ocr_max_images",
+ "embedding_image_ocr_max_usd",
+ "embedding_image_ocr_model",
+ "embedding_model",
+ "embedding_multimodal",
+ "embedding_multimodal_model",
+ "embedding_query_prefix",
+ "emotional_weight.high_tags",
+ "emotional_weight.user_holder",
+ "engine",
+ "entity.name_variants",
+ "entity.names_references",
+ "entity.record_types",
+ "entity.row_page_status",
+ "entity_identity.union",
+ "eval",
+ "eval.capture",
+ "eval.scrub_pii",
+ "expansion_model",
+ "extraction.date_grounding",
+ "facts.absorb_retry.max_resubmits",
+ "facts.absorb_warn_threshold",
+ "facts.attribution",
+ "facts.candidate_fusion",
+ "facts.default_visibility",
+ "facts.drain_budget_usd",
+ "facts.drain_daily_budget_usd",
+ "facts.drain_max_jobs",
+ "facts.entity_inference",
+ "facts.extraction_enabled",
+ "facts.extraction_junk_filter",
+ "facts.extraction_max_tokens",
+ "facts.extraction_missing_confidence",
+ "facts.extraction_model",
+ "facts.extraction_prompt_appendix",
+ "facts.page_write_notability_filter",
+ "facts.supersession_thresholds",
+ "feedback.alpha",
+ "feedback.enabled",
+ "feedback.event_retention_days",
+ "feedback.implicit",
+ "feedback.influence",
+ "feedback.learn",
+ "feedback.max_ratings_per_hour",
+ "feedback.notice_shown",
+ "feedback.rating_prompt",
+ "fences.normalize",
+ "fences.repair.enabled",
+ "fences.repair.llm",
+ "fences.repair.max_usd_per_day",
+ "fences.repair.max_usd_per_page",
+ "fts.reindex_in_progress",
+ "generations.max_items",
+ "generations.restore_days",
+ "generations.shrink_floor",
+ "generations.synthesis.retire_previous",
+ "generations.valve.max_per_run",
+ "generations.valve.max_ratio",
+ "google_api_key",
+ "health.cache_ttl_ms",
+ "hooks.stop_push_debounce_min",
+ "import.analyze_every_pages",
+ "import.require_configured_root",
+ "integrations.memorable.enabled",
+ "line_grammar.allow_undeclared_types",
+ "line_grammar.effective_ranges",
+ "line_grammar.enabled",
+ "link_resolution",
+ "link_resolution.cross_source",
+ "link_resolution.global_basename",
+ "litellm_api_key",
+ "loops.extraction_enabled",
+ "loops.extraction_exclude_labels",
+ "loops.extraction_max_usd_per_day",
+ "loops.updates_require_reciprocity",
+ "maintenance.auto",
+ "maintenance.embed_daily_usd",
+ "mcp.allow_session_widen",
+ "mcp.instructions_governing_rule",
+ "mcp.publish_advisor",
+ "mcp.publish_memory_settings",
+ "mcp.publish_skills",
+ "mcp.publish_skills_prompted",
+ "mcp.result_rows",
+ "mcp.skills_dir",
+ "mcp.stdio_may_act_for",
+ "mcp.stdio_member",
+ "mcp.strict_params",
+ "mcp_surface",
+ "memory.agent_writeback",
+ "memory.auto_writeback",
+ "memory.auto_writeback_notice_shown",
+ "memory.auto_writeback_transient_ttl",
+ "memory.core.enabled",
+ "memory.core.max_chars",
+ "memory.core.remote_edit",
+ "memory.pressure.context_window",
+ "memory.pressure.enabled",
+ "memory.pressure.warn_ratio",
+ "mentions.alias_deny",
+ "mentions.auto_link",
+ "mentions.entity_types",
+ "mentions.exclude_slugs",
+ "mentions.ignore",
+ "mentions.multiword_aliases",
+ "mentions.newer_on_cards",
+ "mentions.sibling_merge",
+ "migrate.graduation",
+ "models.aliases",
+ "models.auto_think",
+ "models.brainstorm.judge",
+ "models.chat",
+ "models.contextual_synopsis",
+ "models.default",
+ "models.dream.extract_atoms",
+ "models.dream.patterns",
+ "models.dream.synthesize",
+ "models.dream.synthesize_verdict",
+ "models.dream.triage",
+ "models.drift",
+ "models.eval.cross_modal.slot_a",
+ "models.eval.cross_modal.slot_b",
+ "models.eval.cross_modal.slot_c",
+ "models.eval.longmemeval",
+ "models.expansion",
+ "models.fence_repair",
+ "models.standing_questions",
+ "models.subagent",
+ "models.think",
+ "models.tier.deep",
+ "models.tier.reasoning",
+ "models.tier.subagent",
+ "models.tier.utility",
+ "oauth.dcr_ttl_max_seconds",
+ "oauth.dcr_ttl_min_seconds",
+ "openai_api_key",
+ "openrouter_api_key",
+ "orphans.exclude_prefixes",
+ "orphans.exclude_slugs",
+ "pages.flip_retire_max_rows",
+ "pages.max_bytes",
+ "pages.segmented_storage",
+ "persistence.adopt_quiet_ms",
+ "persistence.capacity.background_pause_pct",
+ "persistence.capacity.fail_days",
+ "persistence.capacity.warn_days",
+ "persistence.housekeeping.receipt_target_bytes",
+ "persistence.limits.brain_intent_bytes",
+ "persistence.limits.brain_lifetime_ids",
+ "persistence.limits.brain_outstanding",
+ "persistence.limits.brain_recovery_bytes",
+ "persistence.limits.brain_staged_bytes",
+ "persistence.limits.brain_terminal_bytes",
+ "persistence.limits.principal_intent_bytes",
+ "persistence.limits.principal_lifetime_ids",
+ "persistence.limits.principal_outstanding",
+ "persistence.limits.principal_staged_bytes",
+ "persistence.limits.principal_terminal_bytes",
+ "persistence.limits.principal_uploads",
+ "persistence.limits.upload_idle_seconds",
+ "persistence.limits.upload_max_seconds",
+ "persistence.limits.worktree_recovery_bytes",
+ "persistence.maintenance.compaction_stale_hours",
+ "persistence.maintenance.refusal_breaker_threshold",
+ "persistence.maintenance_preparation_ms",
+ "persistence.max_claim_ms",
+ "persistence.max_preparation_attempts",
+ "persistence.max_transient_retries",
+ "persistence.preadmit_cache",
+ "persistence.preparation_ceiling_ms",
+ "persistence.preparation_deadlines",
+ "persistence.publication_ceiling_ms",
+ "persistence.receipt_retention_days",
+ "persistence.single_consumer",
+ "persistence.single_write_group",
+ "persistence.sync_preparation_ms",
+ "persistence.terminal_failures.spike_factor",
+ "persistence.terminal_failures.spike_min",
+ "persistence.terminal_failures.window_days",
+ "persistence.unbound_write",
+ "persistence.write_wait_ms",
+ "planner.auto_analyze",
+ "planner.first_read_budget_ms",
+ "pricing.overrides",
+ "proposals.max_payload_chars",
+ "proposals.max_pending_per_actor",
+ "proposals.max_pending_per_credential",
+ "proposals.max_reason_chars",
+ "proposals.retention_days",
+ "proposals.ttl_hours",
+ "protocol_installed_at",
+ "provider_base_urls",
+ "provider_chat_options",
+ "purge.retention_hours",
+ "push.allow_unverified_remote",
+ "put_page.similar_pages",
+ "recall.confidence_weighting",
+ "recall.group_by_entity",
+ "recall.question_admission",
+ "remote_mcp",
+ "schema.type_warnings",
+ "schema_pack",
+ "search.adaptive_return",
+ "search.adaptive_return_entity_max",
+ "search.adaptive_return_min_keep",
+ "search.adaptive_return_other_max",
+ "search.alias_fanout_max",
+ "search.alias_token_hop",
+ "search.auto_packing",
+ "search.autocut",
+ "search.autocut_jump",
+ "search.autocut_min_keep",
+ "search.autocut_min_top",
+ "search.cache.enabled",
+ "search.cache.similarity_threshold",
+ "search.cache.ttl_seconds",
+ "search.cjk_keyword_deadline_ms",
+ "search.collapse",
+ "search.contextual_retrieval",
+ "search.contextual_retrieval_disabled",
+ "search.crag_escalation",
+ "search.crag_think",
+ "search.cross_modal.both_mode_image_weight",
+ "search.cross_modal.both_mode_text_weight",
+ "search.cross_modal.llm_intent",
+ "search.demote_generated",
+ "search.diverse_pool_depth",
+ "search.entity_anchoring",
+ "search.evidence_cosine_floor",
+ "search.evidence_date_header",
+ "search.evidence_tail_trim",
+ "search.evidence_titles",
+ "search.expansion",
+ "search.expansion_variant_budget",
+ "search.fact_source_pages",
+ "search.floor_ratio",
+ "search.graph_signals",
+ "search.hnsw_iterative_scan",
+ "search.image_query.daily_budget_usd_per_client",
+ "search.image_query.image_refinement_weight",
+ "search.image_query.max_bytes",
+ "search.image_query.remote_max_bytes",
+ "search.image_query.text_refinement_weight",
+ "search.intentWeighting",
+ "search.intent_patterns",
+ "search.keywordOrFallback",
+ "search.keyword_arm_confidence_floor",
+ "search.keyword_phrase",
+ "search.keyword_statement_timeout_ms",
+ "search.keyword_timeout_negative_cache_seconds",
+ "search.long_page_min_chars",
+ "search.long_page_unit",
+ "search.mcp_keyword_only",
+ "search.metadata_boost_gate",
+ "search.mode",
+ "search.mode_source",
+ "search.mode_upgrade_notice_shown",
+ "search.page_rank_cut",
+ "search.page_rank_cut_factor",
+ "search.qualified_aliases",
+ "search.query_budget_unit",
+ "search.query_facts_arm",
+ "search.query_facts_block",
+ "search.rank_priors",
+ "search.relational_chain_slots",
+ "search.relational_orient_onehop",
+ "search.relational_planner",
+ "search.relational_rerank_pin",
+ "search.relational_retrieval",
+ "search.relational_retrieval_depth",
+ "search.remote_page_cap",
+ "search.remote_private_pages",
+ "search.reranker.enabled",
+ "search.reranker.gate",
+ "search.reranker.gate_min_gap",
+ "search.reranker.model",
+ "search.reranker.timeout_ms",
+ "search.reranker.top_n_in",
+ "search.reranker.top_n_out",
+ "search.return_budget_conversation",
+ "search.return_budget_default",
+ "search.return_budget_max_remote",
+ "search.return_unit",
+ "search.return_window",
+ "search.saved_facts_supersede",
+ "search.searchLimit",
+ "search.source_boosts",
+ "search.temporal_fact_reserve",
+ "search.title_boost",
+ "search.title_qualified",
+ "search.tokenBudget",
+ "search.track_retrieval",
+ "search.unified_multimodal",
+ "search.unified_multimodal_only",
+ "search.vector_legacy_guard",
+ "search_embedding_column",
+ "self_upgrade.attempting_version",
+ "self_upgrade.autopilot_launcher",
+ "self_upgrade.channel",
+ "self_upgrade.failed_versions",
+ "self_upgrade.last_applied_version",
+ "self_upgrade.last_check_ts",
+ "self_upgrade.mode",
+ "self_upgrade.mode_prompted",
+ "self_upgrade.quiet_hours",
+ "serve.cli_socket",
+ "serve.vector_prewarm",
+ "shared_skills.inventory.max_entries",
+ "shared_skills.inventory.max_file_bytes",
+ "shared_skills.inventory.max_files",
+ "shared_skills.inventory.max_total_bytes",
+ "shared_skills.migration.enabled",
+ "skillopt.allowed_skills",
+ "skillopt.capture_enabled",
+ "skillopt.models_strict",
+ "skillopt.reflect_max_tokens",
+ "skillpack.nag_disabled",
+ "sources.default",
+ "sources.refresh_drain_wait_ms",
+ "sources.refresh_fetch_timeout_ms",
+ "sources.refresh_publish_diverged",
+ "spend.posture",
+ "storage",
+ "storage.git_lfs",
+ "sync",
+ "sync.admission",
+ "sync.apply_held_deletions",
+ "sync.bulk",
+ "sync.bulk_size",
+ "sync.cost_gate_min_usd",
+ "sync.exclude",
+ "sync.federated_v2",
+ "sync.foreground_priority",
+ "sync.freshness_target_seconds",
+ "sync.git_first_commit_dates",
+ "sync.holds",
+ "sync.include_hidden",
+ "sync.include_working_tree",
+ "sync.job_drain",
+ "sync.lanes",
+ "sync.last_commit",
+ "sync.level_reuse",
+ "sync.max_delete_ratio",
+ "sync.max_deletes",
+ "sync.metafile_pages",
+ "sync.on_commit",
+ "sync.on_commit.sources",
+ "sync.origin_twins.auto_resolve",
+ "sync.repo_path",
+ "sync.slug_conflicts.auto_remove",
+ "sync.waive_batch",
+ "sync.write_through",
+ "takes.auto_embed",
+ "takes.bootstrap_budget_usd",
+ "takes.bootstrap_enabled",
+ "think.excerpt_ceiling_chars",
+ "think.pages_budget_chars",
+ "think.quote_verify",
+ "think.remote_models",
+ "think.return_unit",
+ "think.trajectory_enabled",
+ "together_api_key",
+ "transcripts.archive.backfill_days_per_run",
+ "transcripts.archive.enabled",
+ "transcripts.archive.maintenance_floor_min",
+ "transcripts.archive.quiet_minutes",
+ "transcripts.archive.run_window_days",
+ "transcripts.archive.source",
+ "transcripts.archive.stale_days",
+ "transcripts.archive.timezone",
+ "trust.agent_activation",
+ "trust.read_policy",
+ "versions.segmented_max_per_page",
+ "versions.segmented_max_pinned_bytes",
+ "visibility.honor_aliases",
+ "voyage_api_key",
+ "wanted_pages.enabled",
+ "wanted_pages.remote",
+ "write_gate.agent_mode",
+ "write_gate.external_mode",
+ "writer.lint_on_put_page"
+ ],
+ "exit-code": {
+ "absent_from_worktree": 1,
+ "access_command_failed": 1,
+ "access_denied_test_user": 1,
+ "access_env_missing": 1,
+ "access_identity_unavailable": 1,
+ "access_labelled_only_owner": 3,
+ "access_labelled_only_unnamed": 1,
+ "access_member_disabled": 1,
+ "access_member_id_retired": 1,
+ "access_member_invalid": 1,
+ "access_policy_history_unreadable": 1,
+ "access_policy_invalid": 1,
+ "access_policy_pending": 1,
+ "access_policy_store_mismatch": 1,
+ "access_policy_widening_held": 1,
+ "access_rule_invalid": 1,
+ "access_serves_key_dir_in_git": 1,
+ "access_serves_roster_empty": 1,
+ "acknowledgment_unavailable": 1,
+ "actor_not_attested": 1,
+ "actor_unlinked": 1,
+ "admin_policy_enforced": 1,
+ "admission_paused": 1,
+ "ambient_capture_off": 1,
+ "ambiguous_id": 1,
+ "ambiguous_ref": 1,
+ "ambiguous_skill": 1,
+ "answer_not_yours": 1,
+ "answer_pending": 1,
+ "answer_unavailable": 1,
+ "api_not_enabled": 1,
+ "append_links_fence": 1,
+ "approval_required": 1,
+ "archive_audience_unproven": 1,
+ "archive_gateway_auth": 1,
+ "archive_gateway_failed": 1,
+ "archive_gateway_unreachable": 1,
+ "archive_owner_unset": 1,
+ "archive_redaction_failed": 1,
+ "archive_run_busy": 1,
+ "atom_drain_incomplete": 11,
+ "atom_drain_no_progress": 1,
+ "atom_drain_provider_failure": 1,
+ "autopilot_job_owned_by_other_brain": 1,
+ "autopilot_no_repo": 1,
+ "autopilot_pglite_daemon": 1,
+ "backup_dump_failed": 1,
+ "backup_too_large": 1,
+ "belief_coverage_required": 1,
+ "belief_stale_preparation": 1,
+ "benchmark_duplicate_task_id": 1,
+ "benchmark_empty": 1,
+ "benchmark_exists": 1,
+ "benchmark_judge_llm_no_rubric": 1,
+ "benchmark_judge_qrels_no_expected": 1,
+ "benchmark_judge_rule_no_checks": 1,
+ "benchmark_judge_unknown_kind": 1,
+ "benchmark_malformed": 1,
+ "benchmark_missing_judge": 1,
+ "benchmark_missing_task": 1,
+ "benchmark_missing_task_id": 1,
+ "benchmark_not_found": 1,
+ "benchmark_rule_check_bad_arg": 1,
+ "benchmark_rule_check_malformed": 1,
+ "benchmark_rule_check_unknown_op": 1,
+ "body_staging_expired": 1,
+ "bootstrap_cleanup_pending": 14,
+ "bootstrap_empty": 1,
+ "bootstrap_pending_review": 1,
+ "bridge_ownership_conflict": 1,
+ "bucket_not_found": 1,
+ "budget_below_recent_runtime": 1,
+ "budget_unsatisfiable": 1,
+ "cache_quota_exceeded": 1,
+ "calendar_unreadable": 1,
+ "cancelled": 1,
+ "capacity_paused": 1,
+ "catalog_capacity_exceeded": 1,
+ "catalog_unavailable": 1,
+ "change_reason_rejected": 1,
+ "changed_since_preview": 1,
+ "checkout_not_a_source": 1,
+ "checkpoint_missing": 1,
+ "checkpoint_validation_timeout": 1,
+ "chronicle_skipped": 1,
+ "chunkless_pages_healable": 1,
+ "claim_already_used": 1,
+ "client_behind": 1,
+ "client_json_unreadable": 1,
+ "client_json_wrong_type": 1,
+ "client_not_found": 1,
+ "client_shape_invalid": 1,
+ "clock_mismatch": 1,
+ "code_callees_requires_symbol": 1,
+ "code_callers_requires_symbol": 1,
+ "code_def_requires_symbol": 1,
+ "code_refs_requires_symbol": 1,
+ "code_reused": 1,
+ "colon_slug_windows_write_through": 1,
+ "command_failed": 1,
+ "commit_base_moved": 1,
+ "commit_lock_busy": 1,
+ "commit_outside_source_root": 1,
+ "commit_paths_invalid": 1,
+ "commit_paths_skipped": 1,
+ "commit_prestaged_paths": 1,
+ "concurrent_write": 1,
+ "config_error": 1,
+ "confirmation_required": 3,
+ "conflicting_source_scope": 1,
+ "connection_inherited_read_only": 1,
+ "connection_lost": 1,
+ "connector_access_denied": 1,
+ "connector_account_changed": 1,
+ "connector_auth_required": 1,
+ "connector_binding_missing": 1,
+ "connector_fence_below_timeline": 1,
+ "connector_holds_exhausted": 1,
+ "connector_intent_outdated": 1,
+ "connector_item_too_large": 1,
+ "connector_response_too_large": 1,
+ "connector_shape_drift": 1,
+ "consent_required": 1,
+ "consent_timeout": 1,
+ "consumers_without_heartbeat": 1,
+ "content_filter_owned": 1,
+ "content_null_bytes": 1,
+ "content_receipt_stale": 1,
+ "content_rejected": 1,
+ "content_repair_needs_human": 1,
+ "continuation_unproven": 1,
+ "convergence_read_failed": 1,
+ "conversion_file_in_source_root": 1,
+ "core_budget_exceeded": 1,
+ "core_delete_owner_only": 1,
+ "core_mark_owner_only": 1,
+ "core_remote_edit_refused": 1,
+ "corpus_chat_unavailable": 1,
+ "corpus_window_backoff": 1,
+ "corpus_window_dead_lettered": 1,
+ "cost_cap_exceeded": 1,
+ "cost_preview_requires_yes": 1,
+ "coverage_from": 1,
+ "coverage_gap": 1,
+ "credential_scope_required": 1,
+ "cursor_incarnation_retired": 1,
+ "cycle_already_running": 1,
+ "cycle_failed": 1,
+ "d_sel_too_small": 1,
+ "database_error": 1,
+ "deep_health_probe_failed": 1,
+ "deleted_page_chunks_overdue": 1,
+ "delta_cursor_upgrade_required": 1,
+ "demo_graph_failed": 1,
+ "demo_import_failed": 1,
+ "demo_verification_failed": 1,
+ "derived_cap_exhausted": 1,
+ "destination_not_ready": 1,
+ "dirty_tree": 1,
+ "doctor_alert_act": 17,
+ "doctor_alert_unknown": 18,
+ "doctor_tier_unavailable": 1,
+ "downgrade_blocked_deferred_writes": 3,
+ "drain_holder_stalled": 1,
+ "drain_stalled": 1,
+ "dream_breaker_tripped": 1,
+ "effect_not_failed": 1,
+ "embed_backfill_stalled": 1,
+ "embedded_core_required": 1,
+ "embedded_engine_required": 1,
+ "embedding_auth_failed": 1,
+ "embedding_budget_below_worst_case": 1,
+ "embedding_configuration": 1,
+ "embedding_disabled": 1,
+ "embedding_failed": 1,
+ "embedding_identity_unqualified": 1,
+ "embedding_model_mismatch": 1,
+ "embedding_plane_split": 1,
+ "embedding_state_unknown": 1,
+ "embedding_storage_unavailable": 1,
+ "embedding_unavailable": 1,
+ "embedding_unconfigured": 1,
+ "embedding_width_mismatch": 1,
+ "enforced_member_refused": 3,
+ "engine_closed": 1,
+ "engine_degraded": 1,
+ "engine_embedding_mismatch": 1,
+ "engine_graduated": 1,
+ "engine_host_missing": 1,
+ "engine_scope_missing": 1,
+ "engine_scope_required": 1,
+ "engine_settings_invalid": 1,
+ "entity_types_unavailable": 1,
+ "eval_suite_unwired": 1,
+ "explicit_tasks_conflict": 1,
+ "export_limit": 1,
+ "extract_write_lost": 1,
+ "extraction_failed": 1,
+ "extractor_identity_mismatch": 1,
+ "fact_already_expired": 1,
+ "fact_not_found": 1,
+ "fact_rows_collide": 1,
+ "fact_withdrawn": 1,
+ "facts_absorb_write_refused": 1,
+ "facts_backstop_skipped": 1,
+ "facts_drain_deferred": 1,
+ "facts_drain_job_failed": 1,
+ "facts_payload_expired": 1,
+ "feedback_disabled": 1,
+ "feedback_not_authorized": 1,
+ "fence_row_changed": 1,
+ "fence_unrenderable": 1,
+ "fetch_failed": 1,
+ "file_database_drift": 1,
+ "file_drift": 1,
+ "file_drift_mixed_selection": 1,
+ "file_drift_state_required": 1,
+ "file_removed_during_scan": 1,
+ "file_too_large": 1,
+ "file_unreadable": 1,
+ "file_wins_rewrite": 1,
+ "fix_not_writable": 1,
+ "follow_approval_required": 1,
+ "foreign_table": 1,
+ "forget_requires_owner": 3,
+ "frontmatter_alias_limit": 1,
+ "frontmatter_slug_conflict": 1,
+ "full_resync_required": 1,
+ "gate_failed": 1,
+ "generation_fenced": 11,
+ "generation_held": 1,
+ "generation_live_conflict": 11,
+ "ghost_mass_delete_refused": 1,
+ "ghost_storage_unknown": 1,
+ "git_branch_unborn": 1,
+ "git_checkout_required": 1,
+ "git_conversion_blocked": 1,
+ "git_conversion_delta": 1,
+ "git_conversion_incomplete": 1,
+ "git_detached_head": 1,
+ "git_durability_not_enabled": 1,
+ "git_home_required": 1,
+ "git_index_conflict": 1,
+ "git_index_locked": 1,
+ "git_index_stale": 1,
+ "git_lfs_not_enabled": 1,
+ "git_object_missing": 1,
+ "git_operation_in_progress": 1,
+ "git_private_commit_refused": 1,
+ "git_protocol_required": 1,
+ "git_push_unavailable": 1,
+ "git_target_changed": 1,
+ "git_target_ignored": 1,
+ "git_target_pending": 1,
+ "git_target_unsafe": 1,
+ "git_unavailable": 1,
+ "git_worktree_link_broken": 1,
+ "gitlink_not_followed": 1,
+ "graduation_drain_timeout": 11,
+ "graduation_embedding_dimension_mismatch": 1,
+ "graduation_foreign_host_binding": 1,
+ "graduation_in_progress": 75,
+ "graduation_interrupted": 1,
+ "graduation_rollback_writes_lost": 1,
+ "graduation_source_writer_held": 1,
+ "graduation_split_brain": 1,
+ "graduation_target_auth_failed": 1,
+ "graduation_target_ddl_unreachable": 1,
+ "graduation_target_not_empty": 1,
+ "graduation_target_unsupported": 1,
+ "graduation_unclassified_table": 1,
+ "graduation_unsupported_platform": 1,
+ "graduation_verify_failed": 1,
+ "grant_scope": 1,
+ "graph_incomplete": 1,
+ "guest_attribution_missing": 1,
+ "guest_frontmatter_refused": 1,
+ "guest_mark_immutable": 1,
+ "guest_page_immutable": 1,
+ "guest_page_promoted": 1,
+ "guest_promotion_owner_only": 1,
+ "guest_readers_invalid": 1,
+ "guest_source_database_only": 1,
+ "harness_hook_duplicates": 1,
+ "harness_hook_unowned": 1,
+ "head_blocked": 1,
+ "held_failed": 1,
+ "held_out_overlaps_benchmark": 1,
+ "held_out_required_for_bundled": 1,
+ "hook_session_cwd": 1,
+ "host_identity_mismatch": 1,
+ "host_upgrade_required": 16,
+ "hosted_repo_refused": 1,
+ "idempotency_conflict": 1,
+ "independent_principal_required": 1,
+ "insufficient_scope": 1,
+ "integrate_conflict": 1,
+ "internal": 1,
+ "internal_error": 1,
+ "interrupted": 130,
+ "invalid_acknowledgment": 1,
+ "invalid_client": 1,
+ "invalid_connector_text": 1,
+ "invalid_fence": 1,
+ "invalid_frontmatter": 1,
+ "invalid_grant_clock_skew": 1,
+ "invalid_grant_revoked": 1,
+ "invalid_grant_testing_expiry": 1,
+ "invalid_params": 2,
+ "invalid_rating": 1,
+ "invalid_receipt": 1,
+ "invalid_receipt_transition": 1,
+ "invalid_request": 1,
+ "invalid_source": 1,
+ "invalid_source_pin": 1,
+ "invalid_source_uri": 1,
+ "invalid_token": 1,
+ "invalid_write_wait": 1,
+ "ipc_path_too_long": 1,
+ "item_failures_systemic": 1,
+ "keyword_candidates_incomplete": 1,
+ "keyword_skipped_after_timeout": 1,
+ "knock_on_exhausted": 1,
+ "known_as_of_unproven": 1,
+ "label_edit_refused": 1,
+ "legacy_job_selection_invalid": 1,
+ "legacy_jobs_active": 1,
+ "legacy_lock_removal_refused": 1,
+ "legacy_twin_mass_merge_refused": 1,
+ "legacy_twins_storage_unknown": 1,
+ "link_cursor_invalid": 1,
+ "link_dates_unattributed": 1,
+ "local_conflict": 1,
+ "lock_busy": 1,
+ "loops_extraction_skipped": 1,
+ "maintenance_backpressure": 12,
+ "maintenance_disabled": 0,
+ "maintenance_lock_busy": 1,
+ "maintenance_owned_by_autopilot": 0,
+ "maintenance_owned_by_serve": 0,
+ "managed_failure_unsettled": 1,
+ "managed_pull_skipped": 1,
+ "managed_remedy_unavailable": 1,
+ "managed_sync_flag_refused": 1,
+ "managed_sync_not_moving": 1,
+ "manual_only_skipped": 1,
+ "membership_inactive": 1,
+ "membership_not_found": 1,
+ "memory_setting_write_outcome_unknown": 1,
+ "merge_recommended": 1,
+ "method_not_allowed": 1,
+ "migration_declined": 3,
+ "migration_failed": 1,
+ "migration_host_work_pending": 1,
+ "migration_lease_lost": 1,
+ "migrations_pending": 1,
+ "migrations_running": 75,
+ "missing_source_scope": 1,
+ "missing_source_value": 1,
+ "models_strict_violation": 1,
+ "moved_pages_mass_fold_refused": 1,
+ "movement_unknown": 1,
+ "no_brain": 1,
+ "no_context_ceiling": 1,
+ "no_pricing": 1,
+ "no_refresh_token": 1,
+ "no_routing_eval": 1,
+ "no_skill_md": 1,
+ "no_worker": 1,
+ "no_worker_surface": 1,
+ "not_a_git_repo": 1,
+ "not_connected": 1,
+ "not_converged": 1,
+ "not_found": 1,
+ "not_owner_host": 1,
+ "notifier_stalled": 1,
+ "on_behalf_of_in_arguments": 1,
+ "on_behalf_of_invalid_audience": 1,
+ "on_behalf_of_not_permitted": 1,
+ "on_behalf_of_unknown_member": 1,
+ "openclaw_not_found": 1,
+ "origin_twin_mass_merge_refused": 1,
+ "overlapping_path": 1,
+ "owner_marker_missing": 1,
+ "owner_unavailable": 1,
+ "page_body_rows_unreadable": 1,
+ "page_body_segmented": 1,
+ "page_identity_changed": 1,
+ "page_not_found": 1,
+ "page_projection_conflict": 1,
+ "page_projection_stale": 1,
+ "page_shrink_refused": 1,
+ "page_too_large_for_inline": 1,
+ "parse_error": 1,
+ "parser_regression": 1,
+ "part_splits_code_point": 1,
+ "part_too_large": 1,
+ "pasted_wrong_url": 1,
+ "pat_file_unreadable": 1,
+ "path_not_utf8": 1,
+ "pattern_claims_pending": 1,
+ "patterns_min_interval": 1,
+ "payload_too_large": 1,
+ "pending_import_expired": 1,
+ "pending_verify": 13,
+ "pending_writes": 1,
+ "permission_denied": 1,
+ "persistence_restart_required": 1,
+ "persistence_write_stall": 1,
+ "pg_connection_recovery_failed": 1,
+ "pg_connection_stuck": 1,
+ "pg_pool_stalled": 1,
+ "pg_statement_build_failed": 1,
+ "pglite_busy": 1,
+ "pglite_vector_index_too_large": 1,
+ "plan_output_failed": 1,
+ "plan_stale": 1,
+ "pool_inflight_over_budget": 1,
+ "port_in_use": 1,
+ "postgres_tls_required": 1,
+ "preparation_stalled": 1,
+ "preview_changed": 1,
+ "profile_incompatible": 1,
+ "projection_owner_resident": 1,
+ "projection_pending": 1,
+ "proposal_closed": 1,
+ "proposal_expired": 1,
+ "proposals_pending_limit": 1,
+ "provenance_required": 1,
+ "publication_pending": 1,
+ "publish_scan_unreadable": 1,
+ "publish_secret_found": 1,
+ "pull_blocked_local_changes": 1,
+ "purge_blocked_pending_recovery": 1,
+ "purge_lookup_timeout": 1,
+ "purge_mirror_unwritable": 1,
+ "purged_content": 1,
+ "push_unconfirmed": 4,
+ "question_not_found": 1,
+ "question_owner_only": 1,
+ "queue_capacity": 1,
+ "rank_entities_timeout": 1,
+ "rate_limited": 1,
+ "read_budget_exhausted": 1,
+ "readable_by_invalid": 1,
+ "reason_purge_scan_capped": 3,
+ "reason_purge_scan_failed": 1,
+ "reason_scan_capped": 1,
+ "reason_scan_failed": 1,
+ "reason_trailer_secret": 1,
+ "receipt_conflict": 1,
+ "receipt_fence_changed": 1,
+ "receipt_fence_required": 1,
+ "receipt_identity_mismatch": 1,
+ "reconcile_host_required": 1,
+ "reconcile_read_incomplete": 1,
+ "recovery_prior_stage_unavailable": 1,
+ "recovery_required": 1,
+ "recovery_version_unsupported": 1,
+ "redirect_uri_mismatch": 1,
+ "ref_not_in_answer": 1,
+ "refresh_barrier_expired": 1,
+ "refresh_dirty": 1,
+ "refresh_diverged": 1,
+ "refresh_drain_timeout": 1,
+ "refresh_lock_timeout": 1,
+ "refresh_no_upstream": 1,
+ "refresh_not_managed": 1,
+ "refresh_not_owner": 1,
+ "refresh_required": 1,
+ "refresh_source_changed": 1,
+ "refresh_sync_timeout": 1,
+ "relay_disabled": 1,
+ "relay_session_expired": 1,
+ "relay_unreachable": 1,
+ "rename_held": 1,
+ "rename_identity_unreadable": 1,
+ "rename_reconcile_failed": 1,
+ "repair_preview_timeout": 1,
+ "repair_propose_dir_in_git": 1,
+ "request_already_submitted": 1,
+ "request_too_large": 1,
+ "requester_scope_required": 1,
+ "requester_scope_unknown": 1,
+ "requirements_changed": 1,
+ "requires_local_engine": 1,
+ "reserved_frontmatter_key": 1,
+ "reset_upstream_refused": 1,
+ "response_too_large": 1,
+ "restart_refused": 3,
+ "restart_unverified": 1,
+ "result_too_large": 1,
+ "resume_spec_mismatch": 1,
+ "revision_backfill_pending": 1,
+ "revision_changed": 1,
+ "revision_conflict": 1,
+ "revision_required": 1,
+ "revision_unavailable": 1,
+ "runtime_build_skew": 1,
+ "schedule_install_failed": 1,
+ "schedule_unsupported": 1,
+ "schema_lock_blocked": 1,
+ "schema_owner_required": 1,
+ "schema_pack_emit_mismatch": 1,
+ "schema_pack_too_large": 1,
+ "scope_denied": 1,
+ "scope_missing": 1,
+ "scorecard_group_by_local_only": 1,
+ "search_cursor_requires_keyword": 1,
+ "search_mode_local_only": 1,
+ "search_offset_over_cap": 1,
+ "segmented_mirror_writer_gate": 1,
+ "serve_build_drift": 1,
+ "serve_port_in_use": 1,
+ "serve_self_exit_suppressed": 1,
+ "serve_status_only": 1,
+ "serve_unhealthy_exit": 69,
+ "settle_mismatch": 1,
+ "setup_harness_unsupported": 2,
+ "setup_hosted_connection": 1,
+ "setup_owner_conflict": 1,
+ "setup_serves_several": 1,
+ "setup_serves_unreadable": 1,
+ "shared_skills_unavailable": 1,
+ "shared_skills_unsupported": 1,
+ "skill_asset_not_found": 1,
+ "skill_bundle_required": 1,
+ "skill_candidate_invalid": 1,
+ "skill_catalog_mismatch": 1,
+ "skill_catalog_too_large": 1,
+ "skill_catalog_unknown": 2,
+ "skill_index_incompatible": 1,
+ "skill_index_locked": 1,
+ "skill_index_missing": 1,
+ "skill_index_removed": 1,
+ "skill_not_found": 1,
+ "skill_resolve_invalid_input": 2,
+ "skill_resolve_no_input": 2,
+ "skill_resolve_timeout": 1,
+ "skill_resolver_config_invalid": 1,
+ "skill_resolver_config_unreadable": 1,
+ "skill_resolver_host_load_cut": 1,
+ "skill_resolver_host_not_local": 1,
+ "skill_resolver_internal": 1,
+ "skill_resolver_library_mismatch": 1,
+ "skill_resolver_library_missing": 1,
+ "skill_resolver_library_skew": 1,
+ "skill_resolver_pin_unknown": 1,
+ "skill_resolver_plugin_not_installed": 3,
+ "skill_resolver_selftest_failed": 1,
+ "skill_resolver_setup_incomplete": 1,
+ "skill_resolver_state_missing": 1,
+ "skill_resolver_worker_crash": 1,
+ "skill_resolver_worker_stuck": 1,
+ "skill_resolver_worker_unavailable": 1,
+ "skill_retention_capacity": 1,
+ "skill_source_invalid": 2,
+ "skill_source_unreadable": 1,
+ "skill_unavailable": 1,
+ "skillpack_backup_corrupt": 2,
+ "skillpack_journal_not_found": 2,
+ "skillpack_restore_conflict": 2,
+ "skillpack_state_locked": 2,
+ "skillpack_update_incomplete": 2,
+ "skillpack_workspace_locked": 2,
+ "slug_page_mismatch": 1,
+ "slug_root_mode_mismatch": 1,
+ "source_binding_required": 1,
+ "source_changed": 1,
+ "source_id_taken": 1,
+ "source_mismatch": 1,
+ "source_not_ready": 1,
+ "source_pages_remain": 1,
+ "source_profile_no_backfill": 1,
+ "source_referenced": 1,
+ "source_retire_superseded": 1,
+ "source_root_conflict": 1,
+ "source_root_unreadable": 1,
+ "source_writeback_required": 1,
+ "source_writer_restricted": 1,
+ "sources_not_readable": 1,
+ "split_bad_ratio": 1,
+ "split_unparseable": 1,
+ "stable_channel_unresolved": 1,
+ "stable_invalid": 1,
+ "stable_missing": 1,
+ "stable_unreadable": 1,
+ "stale_unavailable": 1,
+ "state_mismatch": 1,
+ "storage_adopt_field_refused": 1,
+ "storage_adopt_unverified": 1,
+ "storage_card_exists": 1,
+ "storage_error": 1,
+ "storage_manifest_missing": 1,
+ "storage_record_invalid": 1,
+ "storage_record_secret": 1,
+ "storage_revision_conflict": 1,
+ "storage_source_managed": 1,
+ "store_unavailable": 1,
+ "strict_requires_managed": 1,
+ "sync_admission_restricted": 1,
+ "sync_anchor_relative": 3,
+ "sync_cursor_replaced": 1,
+ "sync_deadline_stalled": 1,
+ "sync_drain_lease_held": 1,
+ "sync_first_run_in_progress": 1,
+ "sync_in_progress": 1,
+ "sync_no_successful_sync": 1,
+ "sync_not_applicable": 1,
+ "sync_parser_regression": 1,
+ "sync_pass_superseded": 1,
+ "tag_too_long": 1,
+ "tail_changed": 1,
+ "tail_exposure_approval": 1,
+ "take_row_collision": 1,
+ "target_escape": 1,
+ "timeline_comment_markup": 1,
+ "timeline_rows_would_be_removed": 1,
+ "timeout": 124,
+ "topology_change_required": 1,
+ "transcript_secret_exposure": 1,
+ "transcript_source_mismatch": 1,
+ "triage_unreliable_backoff": 1,
+ "trust_raise_refused": 3,
+ "trusted_local_only": 1,
+ "turn_hook_not_loaded": 1,
+ "two_consumers_on_host": 1,
+ "unavailable": 1,
+ "unclosed_ambiguous_tail": 1,
+ "unexpected_file_bytes": 1,
+ "unexpected_staging_bytes": 1,
+ "unknown": 1,
+ "unknown_command": 2,
+ "unknown_flag": 2,
+ "unknown_method": 1,
+ "unknown_source": 1,
+ "unknown_tool": 1,
+ "unknown_transport": 1,
+ "unmanaged_database_path": 1,
+ "unmanaged_path": 1,
+ "unpriced_model": 1,
+ "unsupported_export_data": 1,
+ "unsupported_mutation_protocol": 1,
+ "unsupported_path": 1,
+ "untrack_not_db_only": 1,
+ "upload_expired": 1,
+ "upload_not_found": 1,
+ "upload_protected_content": 1,
+ "upload_too_many_parts": 1,
+ "upstream": 1,
+ "upstream_diverged": 1,
+ "upstream_rewritten": 1,
+ "upstream_unknown": 1,
+ "valid_time_undeclared": 1,
+ "vector_prewarm_extension_missing": 1,
+ "vector_prewarm_unsupported_engine": 1,
+ "vector_prewarm_wont_fit": 1,
+ "verification_failed": 1,
+ "visibility_noncanonical": 1,
+ "visibility_not_applied": 1,
+ "wakeshift_key_invalid": 1,
+ "wakeshift_needs_conversation": 1,
+ "wakeshift_not_enabled": 1,
+ "wakeshift_refused": 1,
+ "wakeshift_shared_brain": 1,
+ "wakeshift_unavailable": 1,
+ "withdrawal_capacity": 1,
+ "withdrawal_mirror_failed": 1,
+ "withdrawal_mirror_pending": 1,
+ "withdrawal_provenance": 1,
+ "worktree_dirty": 1,
+ "worktree_refreshing": 1,
+ "write_capacity_backpressure": 12,
+ "write_capacity_low": 1,
+ "write_claim_lost": 1,
+ "write_gate_rejected": 1,
+ "write_held": 3,
+ "write_interrupted": 1,
+ "write_outcome_unknown": 1,
+ "write_pending": 10,
+ "write_quota_exhausted": 12,
+ "write_quota_insufficient": 12,
+ "writer_admin_intent_required": 1,
+ "writer_admin_locked": 1,
+ "writer_admin_state_changed": 1,
+ "writer_busy": 1,
+ "writer_coordinator_required": 1,
+ "writer_identity_invalid": 1,
+ "writer_identity_publish_failed": 1,
+ "writer_lock_unavailable": 1,
+ "writer_manifest_mismatch": 1,
+ "writer_manifest_rescope_required": 1,
+ "writer_manifest_unsafe": 1,
+ "writer_not_initialized": 1,
+ "writer_not_quiesced": 1,
+ "writer_pool_capacity": 1,
+ "writer_registration_required": 1,
+ "writer_regrant_required": 1,
+ "writer_transfer_conflict": 1,
+ "writer_transfer_required": 1,
+ "writer_upgrade_required": 1,
+ "wrong_account_consented": 1
+ }
+}
diff --git a/llms-full.txt b/llms-full.txt
index fa3f914797..738e47c1a6 100644
--- a/llms-full.txt
+++ b/llms-full.txt
@@ -2819,7 +2819,16 @@ Since 16 November 2026, stable comes with a written promise about what a script
- Search ranking, speed and the exact results of model-backed features.
- Very large brains during an upgrade. The upgrade tests build small brains, on PGLite and on Postgres, with and without a git repository. The two-hour load test runs a 600,000-page brain on the new release but does not upgrade one. Until [#9192](https://github.com/garrytan/gbrain/issues/9192) is fixed, a large brain on a remote Postgres database can return no search results for hours after an upgrade while it catches up.
-**How it is checked.** Today each change is checked against these rules when its pull request is reviewed. A planned removal is recorded in [deprecations.d/](../deprecations.d/README.md) before it is announced. If a stable release breaks one of these rules anyway, that is a regression, and it is handled like any other: fixed, with the fix sent to stable as an important fix.
+**How it is checked.** Every pull request runs a check (`bun run check:public-surface`) against a list of the commands, MCP tools and their parameters, config keys and exit codes, built from the code into [docs/contracts/public-surface.json](contracts/public-surface.json). The list has the flags of every command defined as an operation, and of the 8 CLI-only commands (out of 132) that have a curated help record; the flags of the other 124, `recall` and `forget` among them, are checked in review. The check refuses a pull request that:
+
+- drops one of them, or changes an exit code, before a [deprecations.d/](../deprecations.d/README.md) record for it has reached its `remove_after` date, unless the pull request adds a behaviour-change row marked `exception: security` or `exception: data-loss`;
+- adds a deprecation record whose date is less than 14 days away, or changes what a merged record names, or moves its date earlier;
+- adds a behaviour-change row that doesn't say what kind of change it is, or marks a change `breaking` when it is neither a security or data-loss fix nor the removal of a deprecation whose date has passed;
+- changes the recorded output of the CLI or of agent errors with no behaviour-change row.
+
+What never reached stable isn't covered. The check compares with the list at the current stable release (the `stable` tag), so something added since then can be removed with no record. When the clone lacks the tag, the check fetches it from GitHub. In CI a fetch that fails or takes more than 20 seconds fails the check and asks for a rerun, so a missing tag never waives the rule; a local run without the tag says so and counts everything as on stable. Until a stable release carries the list, the check says so and counts everything as on stable; a revert then marks its behaviour-change row `exception: revert` and names the pull request it reverts.
+
+The rest is checked when the pull request is reviewed: `--json` fields, the page format, wording, what a command does beyond its name, and the part of the deprecation rule that asks for two stable releases. If a stable release breaks one of these rules anyway, that is a regression, and it is handled like any other: fixed, with the fix sent to stable as an important fix.
## How a release becomes stable
diff --git a/llms.txt b/llms.txt
index 57893b47aa..147dab54d0 100644
--- a/llms.txt
+++ b/llms.txt
@@ -27,7 +27,7 @@ Repo: https://github.com/garrytan/gbrain
- [docs/architecture/thin-client.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/architecture/thin-client.md): The thin-client / remote-MCP / cross-modal routing seam: isThinClient detection, callRemoteTool, SSRF-hardened URL validation, per-command routing.
- [docs/architecture/brains-and-sources.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/architecture/brains-and-sources.md): The two axes: a brain is which database, a source is which repo inside it. Resolution precedence for --brain and --source, topologies, Git as the parent of a source with a checkout (mixed, strict, mirror, database-only), entity identity across sources, cross-source links and what confines remote callers.
- [INSTALL_FOR_AGENTS.md](https://raw.githubusercontent.com/garrytan/gbrain/master/INSTALL_FOR_AGENTS.md): Step-by-step agent installation (steps 0-9): install, keyless init, the first-run decision bundle, harness wiring, verification and upgrades.
-- [docs/STABILITY.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/STABILITY.md): Which release the default install follows (the stable channel), how a release becomes stable, how often stable moves, staying on stable, pinning a version, going back, where behaviour changes are announced, and what the alpha channel is for.
+- [docs/STABILITY.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/STABILITY.md): Which release the default install follows (the stable channel), what stays the same on stable and how much warning a change gets, how a release becomes stable, how often stable moves, staying on stable, pinning a version, going back, where behaviour changes are announced, and what the alpha channel is for.
- [docs/protocol/AGENT_OPERATOR_v1.md](https://raw.githubusercontent.com/garrytan/gbrain/master/docs/protocol/AGENT_OPERATOR_v1.md): The agent operator contract: read `code`, follow `fix.next` (run / ask_user / tell_user_to_run / wait / report), run `fix.verify`. Error envelope, notices and mute, effects/actor/next table, consent and preapproval, exit codes, marker grammar, compatibility policy, first run, and how to make gbrain work better for your user.
- [skills/RESOLVER.md](https://raw.githubusercontent.com/garrytan/gbrain/master/skills/RESOLVER.md): Skill dispatcher. Read first for any task.
- [README.md](https://raw.githubusercontent.com/garrytan/gbrain/master/README.md): Project overview, benchmarks, 30-minute setup.
diff --git a/package.json b/package.json
index f3489f4a34..b3b06f808c 100644
--- a/package.json
+++ b/package.json
@@ -188,6 +188,7 @@
"check:bash32": "bash scripts/check-bash32.sh",
"check:schema-migration-order": "bun scripts/check-schema-migration-order.ts",
"check:behavior-since": "bun scripts/check-behavior-since.ts",
+ "check:public-surface": "bun scripts/check-public-surface.ts",
"check:changelog-headings": "bun scripts/check-changelog-headings.ts",
"check:compile-autoload": "bash scripts/check-compile-autoload.sh",
"check:vendor-postgres": "bash scripts/check-vendor-postgres.sh",
diff --git a/scripts/build-behavior-changes.ts b/scripts/build-behavior-changes.ts
index 9fb71fc4ee..be54df67e1 100644
--- a/scripts/build-behavior-changes.ts
+++ b/scripts/build-behavior-changes.ts
@@ -46,6 +46,28 @@ const cmp = (a: string, b: string) => {
};
const markers = (text: string) => [...text.matchAll(MARKER)].map(m => m[1]!);
+export const KINDS = ['breaking', 'action', 'default', 'fix', 'add'] as const;
+export const EXCEPTIONS = ['security', 'data-loss', 'revert'] as const;
+const FRONT_KEYS = ['kind', 'exception', 'deprecation'];
+
+/** A notice fragment: optional front matter (kind, exception, deprecation), then the notice text. */
+export function parseNoticeFragment(raw: string): { front: Record<string, string>; body: string; problems: string[] } {
+ const m = /^---\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/.exec(raw);
+ const front: Record<string, string> = {};
+ const problems: string[] = [];
+ for (const line of (m?.[1] ?? '').split(/\r?\n/).filter(l => l.trim())) {
+ const kv = /^([a-z_]+)\s*:\s*(.*?)\s*$/.exec(line);
+ if (!kv || !FRONT_KEYS.includes(kv[1]!)) { problems.push(`front matter line "${line.trim()}" is not one of ${FRONT_KEYS.join(', ')}`); continue; }
+ front[kv[1]!] = kv[2]!.replace(/^(['"])(.*)\1$/, '$2');
+ }
+ if (front.kind !== undefined && !(KINDS as readonly string[]).includes(front.kind)) problems.push(`kind: ${front.kind} is not one of ${KINDS.join(', ')}`);
+ if (front.exception !== undefined && !(EXCEPTIONS as readonly string[]).includes(front.exception)) problems.push(`exception: ${front.exception} is not one of ${EXCEPTIONS.join(', ')}`);
+ if (front.exception !== undefined && front.kind !== 'breaking') problems.push('exception: applies only to kind: breaking');
+ if (front.exception === 'revert' && !/#\d+/.test(m ? raw.slice(m[0].length) : raw)) problems.push('exception: revert needs the notice text to name the pull request it reverts (#<number>)');
+ if (front.deprecation !== undefined && !ID.test(front.deprecation)) problems.push(`deprecation: ${front.deprecation} is not a deprecations.d id`);
+ return { front, body: m ? raw.slice(m[0].length) : raw, problems };
+}
+
/** CHANGELOG sections oldest first: each release heading with the ids its text marks; `## [Unreleased]` has version null. */
export function changelogReleases(changelog: string): Release[] {
const out: Release[] = [];
@@ -105,7 +127,9 @@ export function build(root: string): Built {
for (const f of files) {
const id = f.replace(/\.md$/, '');
if (!f.endsWith('.md') || !ID.test(id)) { problems.push(`${FRAGMENT_DIR}/${f}: a fragment is named <id>.md, the id lowercase letters, digits and _, starting with a letter (3-96 characters)`); continue; }
- const text = read(root, join(FRAGMENT_DIR, f)).trim().replace(/\s*\n\s*/g, ' ');
+ const parsed = parseNoticeFragment(read(root, join(FRAGMENT_DIR, f)));
+ for (const problem of parsed.problems) problems.push(`${FRAGMENT_DIR}/${f}: ${problem}`);
+ const text = parsed.body.trim().replace(/\s*\n\s*/g, ' ');
if (!text) problems.push(`${FRAGMENT_DIR}/${f} is empty`);
else if (text.length > NOTICE_CAP) problems.push(`${FRAGMENT_DIR}/${f} is ${text.length} characters; the notice renders at most ${NOTICE_CAP}`);
else if (/<!--|^---/.test(text)) problems.push(`${FRAGMENT_DIR}/${f} holds markup; it is the notice text only`);
diff --git a/scripts/build-public-surface.ts b/scripts/build-public-surface.ts
new file mode 100644
index 0000000000..7f873fe08e
--- /dev/null
+++ b/scripts/build-public-surface.ts
@@ -0,0 +1,90 @@
+#!/usr/bin/env bun
+/**
+ * The public surface stable promises to keep (docs/STABILITY.md "What stays the same on stable"), as one generated
+ * manifest: docs/contracts/public-surface.json.
+ *
+ * bun scripts/build-public-surface.ts write the manifest
+ * bun scripts/build-public-surface.ts --check read-only: exit 1 when the committed manifest is stale (regen:all)
+ *
+ * Documented surfaces only, each named the way a deprecations.d record names it:
+ * cli-command `gbrain <command>`: every operation's CLI name and aliases (hidden ones excluded) and every CLI_COMMANDS
+ * record; an operation with no CLI name is an MCP tool only, never a command
+ * cli-flag `gbrain <command> --<flag>`: the parameters of an operation with a CLI name, and the curated help flags
+ * of CLI-only commands
+ * mcp-tool `<tool>`: every operation an MCP client can call (not cliOnly)
+ * mcp-param `<tool>.<param>`
+ * config-key `<key>`: KNOWN_CONFIG_KEYS
+ * exit-code `<code>`: the CLI exit code of every registered error code
+ * scripts/check-public-surface.ts compares the manifest with the base branch's.
+ */
+import { existsSync, readFileSync, writeFileSync } from 'node:fs';
+import { join } from 'node:path';
+import { OPERATION_MANIFEST } from '../src/core/operation-manifest.generated.ts';
+import { CLI_COMMANDS } from '../src/cli/command-table.ts';
+import { KNOWN_CONFIG_KEYS } from '../src/core/config.ts';
+import { CODES, exitCodeForCode } from '../src/core/error-catalogue.ts';
+
+export const MANIFEST = 'docs/contracts/public-surface.json';
+export const SURFACES = ['cli-command', 'cli-flag', 'mcp-tool', 'mcp-param', 'config-key', 'exit-code'] as const;
+export type Surface = (typeof SURFACES)[number];
+export interface PublicSurface {
+ version: 1;
+ 'cli-command': string[];
+ 'cli-flag': string[];
+ 'mcp-tool': string[];
+ 'mcp-param': string[];
+ 'config-key': string[];
+ 'exit-code': Record<string, number>;
+}
+
+const flag = (param: string) => `--${param.replace(/_/g, '-')}`;
+const sorted = (values: Iterable<string>) => [...new Set(values)].sort();
+
+export async function buildSurface(): Promise<PublicSurface> {
+ const commands: string[] = [];
+ const flags: string[] = [];
+ const tools: string[] = [];
+ const params: string[] = [];
+ for (const op of OPERATION_MANIFEST) {
+ if (!op.cliOnly) {
+ tools.push(op.name);
+ for (const p of Object.keys(op.params)) params.push(`${op.name}.${p}`);
+ }
+ if (op.cliHints?.hidden || !op.cliHints?.name) continue;
+ for (const name of [op.cliHints.name, ...(op.cliHints.aliases ?? [])]) {
+ commands.push(`gbrain ${name}`);
+ for (const p of Object.keys(op.params)) flags.push(`gbrain ${name} ${flag(p)}`);
+ }
+ }
+ for (const record of CLI_COMMANDS) {
+ commands.push(`gbrain ${record.name}`);
+ if (record.help) for (const f of (await record.help()).help.flags) flags.push(`gbrain ${record.name} ${f.name}`);
+ }
+ const exits: Record<string, number> = {};
+ for (const code of Object.keys(CODES).sort()) exits[code] = exitCodeForCode(code);
+ return {
+ version: 1,
+ 'cli-command': sorted(commands),
+ 'cli-flag': sorted(flags),
+ 'mcp-tool': sorted(tools),
+ 'mcp-param': sorted(params),
+ 'config-key': sorted(KNOWN_CONFIG_KEYS),
+ 'exit-code': exits,
+ };
+}
+
+export const render = (surface: PublicSurface) => JSON.stringify(surface, null, 2) + '\n';
+
+export async function main(argv: string[], root = process.cwd()): Promise<number> {
+ const text = render(await buildSurface());
+ const path = join(root, MANIFEST);
+ if (argv.includes('--check')) {
+ if (existsSync(path) && readFileSync(path, 'utf8') === text) return 0;
+ console.error(`FAIL: ${MANIFEST} is stale.\nFix: bun scripts/build-public-surface.ts (or bun run regen:all), then commit it.\nSee: docs/STABILITY.md#what-stays-the-same-on-stable`);
+ return 1;
+ }
+ writeFileSync(path, text);
+ return 0;
+}
+
+if (import.meta.main) process.exit(await main(process.argv.slice(2)));
diff --git a/scripts/check-public-surface.ts b/scripts/check-public-surface.ts
new file mode 100644
index 0000000000..0003b86b96
--- /dev/null
+++ b/scripts/check-public-surface.ts
@@ -0,0 +1,215 @@
+#!/usr/bin/env bun
+/**
+ * check:public-surface: stable's promise (docs/STABILITY.md "What stays the same on stable"), checked against the
+ * base branch on every pull request.
+ *
+ * bun scripts/check-public-surface.ts
+ *
+ * Against the merge base with the base ref ($GBRAIN_SURFACE_BASE_REF, default origin/master; a shallow clone is
+ * deepened until it has one) it refuses:
+ * 1. an entry of docs/contracts/public-surface.json that the base has and this tree drops (or an exit code whose
+ * number changed), unless deprecations.d/<id>.md names it (same surface and name, or the command or MCP tool a
+ * dropped flag or parameter belongs to) and its remove_after date has passed. Exempt: an entry the manifest at the
+ * stable release ($GBRAIN_SURFACE_STABLE_REF, default refs/tags/stable; fetched from origin when the clone lacks
+ * it, and under CI=true a fetch that fails or times out refuses) lacks, every drop when a new kind: breaking row
+ * has exception: security or data-loss, and, while no stable manifest can be read (it is said so), every drop
+ * when one has exception: revert;
+ * 2. a deprecations.d record added here whose remove_after is less than 14 days away, a record whose remove_after
+ * moved earlier or whose surface or name changed, or any record with a bad field;
+ * 3. a behavior-changes.d fragment added here with no `kind:`, or with `kind: breaking` and neither
+ * `exception: security|data-loss` nor `deprecation: <id>` naming a record whose remove_after has passed;
+ * 4. a change to the CLI or agent-contract goldens with no new behavior-changes.d fragment and no changelog.d line
+ * `<!-- public-surface: no-behavior-change: <reason> -->`.
+ * The manifest's freshness is regen:all's (scripts/build-public-surface.ts --check). Dates are UTC days;
+ * GBRAIN_SURFACE_TODAY (YYYY-MM-DD) overrides today for tests. When the base ref or a merge base is unavailable the
+ * check fails under CI=true and skips locally. Fetches (the stable ref, deepening a shallow clone with
+ * --filter=tree:0) stop after 20 s and 30 s, or $GBRAIN_SURFACE_FETCH_TIMEOUT_S. Exit: 0 ok or skipped, 1 refused.
+ */
+import { spawnSync } from 'node:child_process';
+import { existsSync, readdirSync, readFileSync } from 'node:fs';
+import { join } from 'node:path';
+import { CHANGELOG_FRAGMENT_DIR, FRAGMENT_DIR, ID, parseNoticeFragment } from './build-behavior-changes.ts';
+import { MANIFEST, SURFACES, type PublicSurface, type Surface } from './build-public-surface.ts';
+
+export const DEPRECATION_DIR = 'deprecations.d';
+export const GOLDEN_DIRS = ['test/fixtures/goldens/cli/', 'test/fixtures/agent-contract/'];
+export const NO_BEHAVIOR_CHANGE = /<!--\s*public-surface:\s*no-behavior-change:\s*\S[^>]*-->/;
+const NOTICE_DAYS = 14;
+const SEE = 'See: docs/STABILITY.md#what-stays-the-same-on-stable and deprecations.d/README.md';
+const DATE = /^\d{4}-\d{2}-\d{2}$/;
+const RECORD_SURFACES: readonly string[] = [...SURFACES, 'page-format', 'json-field'];
+
+export interface Deprecation { id: string; surface: string; name: string; owner: string; remove_after: string }
+
+const frontOf = (raw: string) => {
+ const out: Record<string, string> = {};
+ const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(raw);
+ for (const line of (m?.[1] ?? '').split(/\r?\n/)) {
+ const kv = /^([a-z_]+)\s*:\s*(.*?)\s*$/.exec(line);
+ if (kv) out[kv[1]!] = kv[2]!.replace(/^(['"])(.*)\1$/, '$2');
+ }
+ return out;
+};
+const addDays = (day: string, n: number) => new Date(Date.parse(day + 'T00:00:00Z') + n * 86_400_000).toISOString().slice(0, 10);
+
+/** Entries the base has and the head lacks, as surface + name (an exit code whose number changed counts). */
+export function droppedEntries(base: PublicSurface, head: PublicSurface): Array<{ surface: string; name: string }> {
+ const out: Array<{ surface: string; name: string }> = [];
+ for (const surface of SURFACES) {
+ if (surface === 'exit-code') {
+ for (const [code, exit] of Object.entries(base['exit-code'] ?? {})) if (head['exit-code']?.[code] !== exit) out.push({ surface, name: code });
+ continue;
+ }
+ const kept = new Set(head[surface] ?? []);
+ for (const name of base[surface] ?? []) if (!kept.has(name)) out.push({ surface, name });
+ }
+ return out;
+}
+
+export function main(opts: { cwd?: string; env?: Record<string, string | undefined>; log?: (line: string) => void } = {}): number {
+ const root = opts.cwd ?? process.cwd();
+ const env = opts.env ?? process.env;
+ const log = opts.log ?? ((line: string) => console.log(line));
+ const today = env.GBRAIN_SURFACE_TODAY || new Date().toISOString().slice(0, 10);
+ const git = (...args: string[]) => {
+ const r = spawnSync('git', args, { cwd: root, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
+ return { ok: r.status === 0, out: r.stdout ?? '' };
+ };
+ const fetchTimeout = (seconds: number) => Number(env.GBRAIN_SURFACE_FETCH_TIMEOUT_S) || seconds;
+ const fetch = (seconds: number, ...args: string[]): 'ok' | 'timeout' | 'failed' => {
+ const r = spawnSync('git', ['fetch', '--no-tags', '--quiet', ...args], { cwd: root, stdio: 'ignore', timeout: fetchTimeout(seconds) * 1000, killSignal: 'SIGKILL' });
+ if (r.status === 0) return 'ok';
+ return (r.error as NodeJS.ErrnoException | undefined)?.code === 'ETIMEDOUT' ? 'timeout' : 'failed';
+ };
+ const ref = env.GBRAIN_SURFACE_BASE_REF || 'origin/master';
+ if (!git('rev-parse', '--verify', '-q', `${ref}^{commit}`).ok) {
+ if (env.CI === 'true') {
+ log(`FAIL: check-public-surface: base ref ${ref} is not available.`);
+ log('Fix: fetch it in the workflow (git fetch --no-tags --depth=1 origin +refs/heads/master:refs/remotes/origin/master)');
+ return 1;
+ }
+ log(`GBRAIN_CHECK_SKIPPED: base ref ${ref} unavailable`);
+ return 0;
+ }
+ let mergeBase = git('merge-base', ref, 'HEAD');
+ let deepened: ReturnType<typeof fetch> | null = null;
+ if (!mergeBase.ok && git('rev-parse', '--is-shallow-repository').out.trim() === 'true') {
+ const tip = git('rev-parse', `${ref}^{commit}`).out.trim();
+ const parents = git('cat-file', '-p', 'HEAD').out.split('\n').filter(l => l.startsWith('parent ')).map(l => l.slice('parent '.length));
+ if (parents.includes(tip)) mergeBase = { ok: true, out: tip };
+ for (const depth of [200, 2000]) {
+ if (mergeBase.ok || deepened === 'timeout') break;
+ deepened = fetch(30, '--filter=tree:0', `--deepen=${depth}`, 'origin', git('rev-parse', 'HEAD').out.trim(), tip);
+ mergeBase = git('merge-base', ref, 'HEAD');
+ }
+ }
+ if (!mergeBase.ok) {
+ if (env.CI === 'true') {
+ log(`FAIL: check-public-surface: no merge base between HEAD and ${ref}, ${deepened === 'timeout' ? `because the fetch that deepens the clone timed out after ${fetchTimeout(30)} s` : 'even after deepening the clone'}.`);
+ log('Fix: fetch more history in the workflow (actions/checkout fetch-depth: 0)');
+ return 1;
+ }
+ log(`GBRAIN_CHECK_SKIPPED: no merge base between HEAD and ${ref}`);
+ return 0;
+ }
+ const base = mergeBase.out.trim();
+ const onBase = (path: string) => git('cat-file', '-e', `${base}:${path}`).ok;
+ const listDir = (dir: string) => (existsSync(join(root, dir)) ? readdirSync(join(root, dir)).filter(f => f.endsWith('.md') && f !== 'README.md').sort() : []);
+ const problems: string[] = [];
+
+ const records = new Map<string, Deprecation>();
+ for (const f of listDir(DEPRECATION_DIR)) {
+ const id = f.replace(/\.md$/, '');
+ const path = `${DEPRECATION_DIR}/${f}`;
+ const front = frontOf(readFileSync(join(root, path), 'utf8'));
+ const record = { id, surface: front.surface ?? '', name: front.name ?? '', owner: front.owner ?? '', remove_after: front.remove_after ?? '' };
+ const bad = [
+ !ID.test(id) && 'its file name is not an id (lowercase letters, digits and _, starting with a letter)',
+ !RECORD_SURFACES.includes(record.surface) && `surface: must be one of ${RECORD_SURFACES.join(', ')}`,
+ !record.name && 'name: is missing',
+ !record.owner && 'owner: is missing',
+ !DATE.test(record.remove_after) && 'remove_after: must be a date (YYYY-MM-DD)',
+ ].filter(Boolean);
+ for (const b of bad) problems.push(`${path}: ${b}`);
+ const baseFront = onBase(path) ? frontOf(git('show', `${base}:${path}`).out) : null;
+ const baseDate = baseFront ? baseFront.remove_after ?? '' : null;
+ if (!bad.length && baseFront?.surface && baseFront.name && (baseFront.surface !== record.surface || baseFront.name !== record.name)) {
+ problems.push(`${path}: it named ${baseFront.surface} \`${baseFront.name}\` on ${ref}; a record keeps the surface and name it was announced with, so add a new record for ${record.surface} \`${record.name}\``);
+ }
+ if (!bad.length && baseDate !== null && DATE.test(baseDate) && record.remove_after < baseDate) {
+ problems.push(`${path}: remove_after moves from ${baseDate} to ${record.remove_after}; an announced date can move later, never earlier`);
+ }
+ if (!bad.length && baseDate === null && record.remove_after < addDays(today, NOTICE_DAYS)) {
+ problems.push(`${path}: remove_after ${record.remove_after} is less than ${NOTICE_DAYS} days away; a removal is announced at least ${NOTICE_DAYS} days ahead (${addDays(today, NOTICE_DAYS)} or later)`);
+ }
+ records.set(id, record);
+ }
+ const matured = (r: Deprecation | undefined) => !!r && DATE.test(r.remove_after) && r.remove_after <= today;
+
+ const newNotices = listDir(FRAGMENT_DIR).filter(f => !onBase(`${FRAGMENT_DIR}/${f}`))
+ .map(f => ({ path: `${FRAGMENT_DIR}/${f}`, ...parseNoticeFragment(readFileSync(join(root, FRAGMENT_DIR, f), 'utf8')) }));
+ const exceptions = new Set(newNotices.filter(n => n.front.kind === 'breaking' && n.front.exception).map(n => n.front.exception));
+
+ const baseManifest = git('show', `${base}:${MANIFEST}`);
+ if (baseManifest.ok && existsSync(join(root, MANIFEST))) {
+ const head: PublicSurface = JSON.parse(readFileSync(join(root, MANIFEST), 'utf8'));
+ const dropped = exceptions.has('security') || exceptions.has('data-loss') ? [] : droppedEntries(JSON.parse(baseManifest.out), head);
+ const stableRef = env.GBRAIN_SURFACE_STABLE_REF || 'refs/tags/stable';
+ const resolveStable = () => git('rev-parse', '--verify', '-q', `${stableRef}^{commit}`);
+ let stableCommit = resolveStable();
+ if (dropped.length && !stableCommit.ok && stableRef.startsWith('refs/')) {
+ const shallow = git('rev-parse', '--is-shallow-repository').out.trim() === 'true';
+ const fetched = fetch(20, ...(shallow ? ['--depth=1'] : []), 'origin', `+${stableRef}:${stableRef}`);
+ stableCommit = resolveStable();
+ if (!stableCommit.ok && env.CI === 'true') {
+ log(`FAIL: check-public-surface: this change drops public entries, and the stable ref ${stableRef} could not be fetched from origin${fetched === 'timeout' ? ` (timed out after ${fetchTimeout(20)} s)` : ''}, so it cannot tell which of them reached stable.`);
+ log(`Fix: rerun once origin answers, or fetch it in the workflow (git fetch --no-tags --depth=1 origin +${stableRef}:${stableRef})`);
+ return 1;
+ }
+ }
+ const stableManifest = stableCommit.ok ? git('show', `${stableCommit.out.trim()}:${MANIFEST}`) : null;
+ const stable: PublicSurface | null = stableManifest?.ok ? JSON.parse(stableManifest.out) : null;
+ if (!stableCommit.ok) log(`check-public-surface: stable ref ${stableRef} is unavailable (a shallow clone or a missing tag), so every entry counts as on stable`);
+ else if (!stable) log(`check-public-surface: stable (${stableRef}) has no ${MANIFEST} yet, so every entry counts as on stable`);
+ const onStable = (surface: string, name: string) => !stable
+ || (surface === 'exit-code' ? name in (stable['exit-code'] ?? {}) && stable['exit-code'][name] !== head['exit-code']?.[name] : (stable[surface as Exclude<Surface, 'exit-code'>] ?? []).includes(name));
+ for (const { surface, name } of dropped) {
+ if (!onStable(surface, name) || (exceptions.has('revert') && !stable)) continue;
+ const parent = surface === 'cli-flag' ? { surface: 'cli-command', name: name.slice(0, name.lastIndexOf(' --')) }
+ : surface === 'mcp-param' ? { surface: 'mcp-tool', name: name.slice(0, name.indexOf('.')) } : null;
+ const record = [...records.values()].find(r => r.surface === surface && r.name === name)
+ ?? [...records.values()].find(r => parent && r.surface === parent.surface && r.name === parent.name);
+ if (!record) problems.push(`${surface} \`${name}\` is removed or changed with no ${DEPRECATION_DIR}/<id>.md naming it (surface: ${surface}, name: ${name})${exceptions.has('revert') ? '; it is on stable, so exception: revert does not cover it' : ''}`);
+ else if (!matured(record)) problems.push(`${surface} \`${name}\` is removed before its record ${DEPRECATION_DIR}/${record.id}.md allows it (remove_after ${record.remove_after}); keep it working with a warning until then`);
+ }
+ } else if (!baseManifest.ok) {
+ log(`check-public-surface: ${ref} has no ${MANIFEST} yet; the removal check starts once it does`);
+ }
+
+ for (const { path, front, problems: invalid } of newNotices) {
+ for (const p of invalid) problems.push(`${path}: ${p}`);
+ if (!front.kind) { problems.push(`${path}: a new behaviour-change row needs front matter with kind: breaking, action, default, fix or add (${FRAGMENT_DIR}/README.md)`); continue; }
+ if (front.kind !== 'breaking' || front.exception) continue;
+ const record = front.deprecation ? records.get(front.deprecation) : undefined;
+ if (!front.deprecation) problems.push(`${path}: kind: breaking needs exception: security or data-loss, or deprecation: <id> naming a ${DEPRECATION_DIR} record whose remove_after has passed`);
+ else if (!record) problems.push(`${path}: deprecation: ${front.deprecation} names no ${DEPRECATION_DIR}/${front.deprecation}.md`);
+ else if (!matured(record)) problems.push(`${path}: deprecation: ${front.deprecation} has not matured (remove_after ${record.remove_after})`);
+ }
+
+ const goldens = git('diff', '--name-only', base, '--', ...GOLDEN_DIRS).out.split('\n').filter(Boolean);
+ if (goldens.length && !newNotices.length) {
+ const waived = listDir(CHANGELOG_FRAGMENT_DIR).some(f => !onBase(`${CHANGELOG_FRAGMENT_DIR}/${f}`) && NO_BEHAVIOR_CHANGE.test(readFileSync(join(root, CHANGELOG_FRAGMENT_DIR, f), 'utf8')));
+ if (!waived) problems.push(`CLI or agent-contract goldens changed (${goldens.slice(0, 3).join(', ')}${goldens.length > 3 ? `, +${goldens.length - 3} more` : ''}) with no new ${FRAGMENT_DIR} row; add one with its kind, or put <!-- public-surface: no-behavior-change: <reason> --> in your ${CHANGELOG_FRAGMENT_DIR} fragment`);
+ }
+
+ if (!problems.length) {
+ log(`check-public-surface: ok against ${ref} (${records.size} deprecation record(s), ${newNotices.length} new behaviour-change row(s))`);
+ return 0;
+ }
+ for (const p of problems) log(`FAIL: ${p}`);
+ log('Why: stable promises that documented commands, flags, tools, config keys and exit codes change only after a 14-day announced deprecation, except for security and data-loss fixes; what never reached stable can go at once.');
+ log(SEE);
+ return 1;
+}
+
+if (import.meta.main) process.exit(main());
diff --git a/scripts/guards-manifest.tsv b/scripts/guards-manifest.tsv
index 6b6cd424c7..103efe0571 100644
--- a/scripts/guards-manifest.tsv
+++ b/scripts/guards-manifest.tsv
@@ -90,6 +90,7 @@ check-shared-tree-git.sh scanner yes #6530: unsafe shared-checkout git (pull --r
check-bash32.sh scanner todo #5810: every tracked *.sh parses under bash 3.2 (real parser: GBRAIN_BASH32, stock macOS /bin/bash, or the digest-pinned bash:3.2 image); not in verify CHECKS or this self-test, which must not need Docker; its bad/good fixtures run in test/scripts/check-bash32.test.ts, mandatory in the test.yml verify-job step (GBRAIN_TEST_BASH32_REQUIRE=1)
check-schema-migration-order.ts repostate exempt EO10: a migration origin/master lacks must be numbered above its latest version; reads the base ref from git (unit: test/scripts/build-schema-migrations.test.ts)
check-behavior-since.ts repostate exempt A since: 'TBD' BEHAVIOR_CHANGES row never ships: refused on a stamped tree, on master and with --stamped (restamp, Release); reads the base ref from git (unit: test/scripts/check-behavior-since.test.ts)
+check-public-surface.ts repostate exempt stable's promise: a documented command, flag, MCP tool, config key or exit code the base manifest has leaves only through a matured deprecations.d record; new behavior-changes.d rows carry kind:; CLI and agent-contract golden changes need a row or a waiver line; reads the base ref from git (unit: test/scripts/check-public-surface.test.ts)
check-changelog-headings.ts repostate exempt CHANGELOG.md keeps every release heading origin/master has; reads the base ref from git (unit: test/scripts/check-changelog-headings.test.ts)
check-structural-manifest.sh buildfresh exempt regenerate+diff of structural-suites.tsv (classify-tests.ts); the diff IS the self-test
check-opencode-pin.sh repostate exempt pin-stamp drift check (OPENCODE-CLI-PIN.md stamps vs heavy-tests opencode-door env); own bun guard tests in test/check-bootstrap-guards.test.ts
diff --git a/scripts/llms-config.ts b/scripts/llms-config.ts
index 985bc1f307..ab27754e17 100644
--- a/scripts/llms-config.ts
+++ b/scripts/llms-config.ts
@@ -98,7 +98,7 @@ export const SECTIONS: DocSection[] = [
},
{
title: "docs/STABILITY.md",
- description: "Which release the default install follows (the stable channel), how a release becomes stable, how often stable moves, staying on stable, pinning a version, going back, where behaviour changes are announced, and what the alpha channel is for.",
+ description: "Which release the default install follows (the stable channel), what stays the same on stable and how much warning a change gets, how a release becomes stable, how often stable moves, staying on stable, pinning a version, going back, where behaviour changes are announced, and what the alpha channel is for.",
path: "docs/STABILITY.md",
},
{
diff --git a/scripts/regen-all.ts b/scripts/regen-all.ts
index 8214adda44..a252132e9c 100644
--- a/scripts/regen-all.ts
+++ b/scripts/regen-all.ts
@@ -45,6 +45,7 @@ export const ARTIFACTS: Artifact[] = [
{ name: 'lookup table copies', regen: ['bun', 'scripts/build-lookup-table.ts'], check: ['bun', 'scripts/build-lookup-table.ts', '--check'] },
{ name: 'harness adapter reference', regen: ['bun', 'run', 'scripts/build-harness-docs.ts'], check: ['bun', '-e', HARNESS_DOCS_CHECK] },
{ name: 'operation manifest', regen: ['bun', 'run', 'scripts/build-operation-manifest.ts'], check: [...BUN_TEST, 'test/operation-manifest.test.ts'] },
+ { name: 'public surface (docs/contracts/public-surface.json)', regen: ['bun', 'scripts/build-public-surface.ts'], check: ['bun', 'scripts/build-public-surface.ts', '--check'] },
{ name: 'MCP tool catalog', regen: ['bun', 'run', 'scripts/generate-tool-catalog.ts'], check: ['bash', 'scripts/check-tool-catalog-fresh.sh'] },
{ name: 'skills manifest', regen: ['bun', 'run', 'scripts/generate-skills-manifest.ts'], check: ['bash', 'scripts/check-skills-manifest-fresh.sh'] },
{ name: 'bundled skills module', regen: ['bun', 'run', 'scripts/generate-bundled-skills.ts'], check: ['bun', 'run', 'scripts/generate-bundled-skills.ts', '--check'] },
diff --git a/scripts/run-verify-parallel.sh b/scripts/run-verify-parallel.sh
index e2c86c926e..90de6cb529 100755
--- a/scripts/run-verify-parallel.sh
+++ b/scripts/run-verify-parallel.sh
@@ -241,6 +241,9 @@ CHECKS=(
# A since: 'TBD' BEHAVIOR_CHANGES row never ships: refused on a stamped tree
# (VERSION has a CHANGELOG header and differs from origin/master's) and on master.
"check:behavior-since"
+ # Stable's promise (docs/STABILITY.md): a documented command, flag, MCP tool, config key or exit code the base has
+ # leaves only through a matured deprecations.d record; new behavior-changes.d rows carry kind:.
+ "check:public-surface"
# CHANGELOG.md keeps every release heading origin/master has (a cut file is refused).
"check:changelog-headings"
"check:structural-manifest"
diff --git a/scripts/structural-suites.tsv b/scripts/structural-suites.tsv
index 1387019f3c..2068a7f261 100644
--- a/scripts/structural-suites.tsv
+++ b/scripts/structural-suites.tsv
@@ -312,6 +312,8 @@ test/scripts/check-core-world-reads.test.ts check-core-world-reads.ts: the ratch
test/scripts/check-dynamic-ci.test.ts check-dynamic-ci.ts 1 exec-scan,readFileSync
test/scripts/check-function-size.test.ts check-function-size.ts rules 11 readFileSync
test/scripts/check-item-allowlist-catches.test.ts CLI 2 readFileSync
+test/scripts/check-public-surface.test.ts dropped manifest entries 5 bun-file
+test/scripts/check-public-surface.test.ts the committed manifest 2 bun-file
test/scripts/chunk-visibility-ratchet.test.ts check-chunk-visibility.ts 6 readFileSync
test/scripts/ci-bounded-run.test.ts (file-level) 7 readFileSync
test/scripts/ci-executed-counts.test.ts CLI 2 readFileSync
@@ -361,7 +363,7 @@ test/scripts/pregate-remote-gate.test.ts pregate-remote-gate.sh --list 4 readFil
test/scripts/pregate-remote-gate.test.ts reuse of GitHub full runs on the identical tree 9 readFileSync
test/scripts/pregate-remote-gate.test.ts ship_lanes_from (/ship lanes carried from CI, docs/ci-event-parity.md#ship-lanes) 3 readFileSync
test/scripts/promote-stable.test.ts promote-stable.yml 2 readFileSync
-test/scripts/regen-all.test.ts regen:all 5 readFileSync
+test/scripts/regen-all.test.ts regen:all 6 readFileSync
test/scripts/release-restamp.test.ts release-restamp --stamp-only 2 readFileSync
test/scripts/release-restamp.test.ts release:restamp end to end 16 readFileSync
test/scripts/release-restamp.test.ts release:unstamp and merge: direct 7 readFileSync
diff --git a/test/scripts/build-behavior-changes.test.ts b/test/scripts/build-behavior-changes.test.ts
index 5aaeae8ab7..b5ad0ddae1 100644
--- a/test/scripts/build-behavior-changes.test.ts
+++ b/test/scripts/build-behavior-changes.test.ts
@@ -61,6 +61,22 @@ describe('build()', () => {
expect(rowsOf(build(tree({ VERSION: '0.1.1.0\n', ...files })).text)).toEqual([{ since: '0.1.1.0', id: 'faster_sync_abc', text: 'Sync is faster now.' }]);
});
+ test('front matter (kind, exception, deprecation) is read and left out of the notice text; bad values are problems', () => {
+ const root = tree({
+ VERSION: '0.1.0.0\n',
+ 'CHANGELOG.md': changelog(section('0.1.0.0', 'First.', marker('kinded_row_abc'), marker('bad_kind_abc'))),
+ 'behavior-changes.d/kinded_row_abc.md': '---\nkind: breaking\nexception: security\n---\nA kinded\nchange.\n',
+ 'behavior-changes.d/bad_kind_abc.md': '---\nkind: sideways\nexception: data-loss\nowner: someone\n---\nText.\n',
+ });
+ const { text, problems } = build(root);
+ expect(rowsOf(text).find((r) => r.id === 'kinded_row_abc')?.text).toBe('A kinded change.');
+ expect(problems).toEqual([
+ 'behavior-changes.d/bad_kind_abc.md: front matter line "owner: someone" is not one of kind, exception, deprecation',
+ 'behavior-changes.d/bad_kind_abc.md: kind: sideways is not one of breaking, action, default, fix, add',
+ 'behavior-changes.d/bad_kind_abc.md: exception: applies only to kind: breaking',
+ ]);
+ });
+
test('a marker under a released CHANGELOG heading dates the row with that version, text joined to one line', () => {
const root = tree({
VERSION: '0.1.1.0\n',
diff --git a/test/scripts/check-public-surface.test.ts b/test/scripts/check-public-surface.test.ts
new file mode 100644
index 0000000000..d800427a64
--- /dev/null
+++ b/test/scripts/check-public-surface.test.ts
@@ -0,0 +1,403 @@
+/**
+ * scripts/check-public-surface.ts against throwaway git repositories: a base branch, then a head commit that drops a
+ * manifest entry, adds deprecation records or behaviour-change rows, or changes a CLI golden. Each case shows the
+ * refusal and the change that clears it.
+ */
+import { afterAll, describe, expect, test } from 'bun:test';
+import { spawnSync } from 'node:child_process';
+import { chmodSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { dirname, join } from 'node:path';
+import { main } from '../../scripts/check-public-surface.ts';
+import { buildSurface, main as buildMain, MANIFEST } from '../../scripts/build-public-surface.ts';
+
+const roots: string[] = [];
+afterAll(() => { for (const r of roots) rmSync(r, { recursive: true, force: true }); });
+
+const TODAY = '2026-11-16';
+const manifest = (over: Record<string, unknown> = {}) => JSON.stringify({
+ version: 1,
+ 'cli-command': ['gbrain search'],
+ 'cli-flag': ['gbrain search --limit', 'gbrain search --match'],
+ 'mcp-tool': ['search'],
+ 'mcp-param': ['search.limit'],
+ 'config-key': ['search.mode'],
+ 'exit-code': { not_found: 4 },
+ ...over,
+}, null, 2) + '\n';
+
+function git(root: string, ...args: string[]) {
+ const r = spawnSync('git', args, { cwd: root, encoding: 'utf8' });
+ if (r.status !== 0) throw new Error(`git ${args.join(' ')}: ${r.stderr}`);
+}
+function write(root: string, files: Record<string, string>) {
+ for (const [path, text] of Object.entries(files)) {
+ mkdirSync(dirname(join(root, path)), { recursive: true });
+ writeFileSync(join(root, path), text);
+ }
+}
+function repo(base: Record<string, string>, head: Record<string, string>): string {
+ const root = mkdtempSync(join(tmpdir(), 'gbrain-public-surface-'));
+ roots.push(root);
+ git(root, 'init', '-q', '-b', 'base');
+ git(root, 'config', 'user.email', '[email protected]');
+ git(root, 'config', 'user.name', 'test');
+ write(root, { [MANIFEST]: manifest(), 'README.md': 'x\n', ...base });
+ git(root, 'add', '-A');
+ git(root, 'commit', '-q', '-m', 'base');
+ git(root, 'checkout', '-q', '-b', 'head');
+ write(root, head);
+ git(root, 'add', '-A');
+ git(root, 'commit', '-q', '--allow-empty', '-m', 'head');
+ return root;
+}
+function run(root: string, env: Record<string, string> = {}): { code: number; out: string } {
+ const lines: string[] = [];
+ const code = main({ cwd: root, env: { GBRAIN_SURFACE_BASE_REF: 'base', GBRAIN_SURFACE_TODAY: TODAY, ...env }, log: (l) => lines.push(l) });
+ return { code, out: lines.join('\n') };
+}
+function tagStable(root: string, stableManifest: string | null) {
+ git(root, 'checkout', '-q', '-b', 'stable-release', 'base');
+ if (stableManifest === null) git(root, 'rm', '-q', MANIFEST);
+ else write(root, { [MANIFEST]: stableManifest });
+ git(root, 'add', '-A');
+ git(root, 'commit', '-q', '--allow-empty', '-m', 'stable');
+ git(root, 'tag', 'stable');
+ git(root, 'checkout', '-q', 'head');
+}
+function shallowClone(origin: string, branch: string): string {
+ const clone = mkdtempSync(join(tmpdir(), 'gbrain-public-surface-clone-'));
+ roots.push(clone);
+ git(clone, 'clone', '-q', '--depth=1', '--no-tags', '--branch', branch, `file://${origin}`, '.');
+ git(clone, 'fetch', '-q', '--no-tags', '--depth=1', 'origin', '+refs/heads/base:refs/remotes/origin/base');
+ return clone;
+}
+function mergeClone(head: Record<string, string>): string {
+ const origin = repo({}, head);
+ tagStable(origin, manifest());
+ git(origin, 'checkout', '-q', 'base');
+ write(origin, { 'README.md': 'base moved\n' });
+ git(origin, 'commit', '-qam', 'base moves on');
+ git(origin, 'checkout', '-q', '-b', 'merge', 'base');
+ git(origin, 'merge', '-q', '--no-ff', '--no-edit', 'head');
+ return shallowClone(origin, 'merge');
+}
+function hangOrigin(clone: string) {
+ const script = join(clone, '..', `${clone.split('/').pop()}-hang.sh`);
+ writeFileSync(script, '#!/bin/sh\nexec sleep 10\n');
+ chmodSync(script, 0o755);
+ roots.push(script);
+ git(clone, 'config', 'remote.origin.uploadpack', script);
+}
+const row = (front: string, text = 'Text.') => `---\n${front}\n---\n${text}\n`;
+const record = (surface: string, name: string, removeAfter: string) => `---\nsurface: ${surface}\nname: ${name}\nowner: alice-example\nremove_after: ${removeAfter}\n---\nUse the new one.\n`;
+
+describe('dropped manifest entries', () => {
+ test('a flag removed with no record is refused', () => {
+ const r = run(repo({}, { [MANIFEST]: manifest({ 'cli-flag': ['gbrain search --match'] }) }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('cli-flag `gbrain search --limit` is removed or changed with no deprecations.d/<id>.md naming it');
+ });
+
+ test('a record whose remove_after has not come refuses the removal; a matured one allows it', () => {
+ const head = { [MANIFEST]: manifest({ 'cli-flag': ['gbrain search --match'] }) };
+ const early = run(repo({ 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-11-20') }, head));
+ expect(early.code).toBe(1);
+ expect(early.out).toContain('is removed before its record deprecations.d/search_limit_flag_1234.md allows it (remove_after 2026-11-20)');
+ const due = run(repo({ 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-11-16') }, head));
+ expect(due.code).toBe(0);
+ });
+
+ test('an exit code whose number changed counts as a removal', () => {
+ const r = run(repo({}, { [MANIFEST]: manifest({ 'exit-code': { not_found: 1 } }) }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('exit-code `not_found` is removed or changed');
+ });
+
+ test('adding entries is allowed, and a base with no manifest skips the removal check', () => {
+ expect(run(repo({}, { [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'] }) })).code).toBe(0);
+ const root = repo({}, {});
+ git(root, 'checkout', '-q', 'base');
+ git(root, 'rm', '-q', MANIFEST);
+ git(root, 'commit', '-q', '-m', 'no manifest');
+ git(root, 'checkout', '-q', '-b', 'head-after', 'base');
+ write(root, { [MANIFEST]: manifest() });
+ git(root, 'add', '-A');
+ git(root, 'commit', '-q', '-m', 'head adds the manifest');
+ const r = run(root);
+ expect(r.code).toBe(0);
+ expect(r.out).toContain('has no docs/contracts/public-surface.json yet');
+ });
+
+ test('a matured cli-command or mcp-tool record also covers the flags or parameters the removal drops', () => {
+ const gone = { [MANIFEST]: manifest({ 'cli-command': [], 'cli-flag': [], 'mcp-tool': [], 'mcp-param': [] }) };
+ const r = run(repo({
+ 'deprecations.d/search_command_1234.md': record('cli-command', 'gbrain search', '2026-11-10'),
+ 'deprecations.d/search_tool_1234.md': record('mcp-tool', 'search', '2026-11-10'),
+ }, gone));
+ expect(r.out).not.toContain('FAIL');
+ expect(r.code).toBe(0);
+ });
+});
+
+describe('removals the promise does not cover', () => {
+ test('a new kind: breaking row with exception: security or data-loss lets a removal through', () => {
+ for (const exception of ['security', 'data-loss']) {
+ const r = run(repo({}, { [MANIFEST]: manifest({ 'mcp-tool': [] }), 'behavior-changes.d/drop_search_1234.md': row(`kind: breaking\nexception: ${exception}`) }));
+ expect(r.out).not.toContain('FAIL');
+ expect(r.code).toBe(0);
+ }
+ });
+
+ test('an entry that never reached stable can go with no record; one on stable cannot', () => {
+ const base = { [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'], 'exit-code': { not_found: 5 } }) };
+ const unreleased = repo(base, { [MANIFEST]: manifest() });
+ tagStable(unreleased, manifest());
+ const ok = run(unreleased);
+ expect(ok.out).not.toContain('FAIL');
+ expect(ok.code).toBe(0);
+ const released = repo(base, { [MANIFEST]: manifest({ 'mcp-tool': [] }) });
+ tagStable(released, manifest());
+ const r = run(released);
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('mcp-tool `search` is removed or changed with no deprecations.d/<id>.md naming it');
+ expect(r.out).not.toContain('mcp-tool `think`');
+ expect(r.out).not.toContain('exit-code');
+ });
+
+ test('exception: revert lets a removal through while no stable manifest can be read, and says why', () => {
+ const head = { [MANIFEST]: manifest({ 'mcp-tool': [] }), 'behavior-changes.d/revert_search_1234.md': row('kind: breaking\nexception: revert', 'Reverts #9999.') };
+ const untagged = run(repo({}, head));
+ expect(untagged.code).toBe(0);
+ expect(untagged.out).toContain('stable ref refs/tags/stable is unavailable (a shallow clone or a missing tag), so every entry counts as on stable');
+ const root = repo({}, head);
+ tagStable(root, null);
+ const noManifest = run(root);
+ expect(noManifest.code).toBe(0);
+ expect(noManifest.out).toContain('stable (refs/tags/stable) has no docs/contracts/public-surface.json yet, so every entry counts as on stable');
+ const plain = run(repo({}, { [MANIFEST]: manifest({ 'mcp-tool': [] }) }));
+ expect(plain.code).toBe(1);
+ });
+
+ test('exception: revert does not cover an entry that is on stable', () => {
+ const root = repo({}, { [MANIFEST]: manifest({ 'mcp-tool': [] }), 'behavior-changes.d/revert_search_1234.md': row('kind: breaking\nexception: revert', 'Reverts #9999.') });
+ tagStable(root, manifest());
+ const r = run(root);
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('it is on stable, so exception: revert does not cover it');
+ });
+
+ test('a revert row names the pull request it reverts', () => {
+ const r = run(repo({}, { 'behavior-changes.d/revert_search_1234.md': row('kind: breaking\nexception: revert', 'Undo the change.') }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('exception: revert needs the notice text to name the pull request it reverts (#<number>)');
+ });
+});
+
+describe('the base it compares with', () => {
+ test('changes the base made after the branch point are not this branch\'s (an added tool, a release that moved a row)', () => {
+ const root = repo({ 'behavior-changes.d/old_row_1234.md': 'Plain text.\n' }, {});
+ git(root, 'checkout', '-q', 'base');
+ write(root, { [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'] }) });
+ git(root, 'rm', '-q', 'behavior-changes.d/old_row_1234.md');
+ git(root, 'commit', '-qam', 'base moves on');
+ git(root, 'checkout', '-q', 'head');
+ const r = run(root);
+ expect(r.out).not.toContain('FAIL');
+ expect(r.code).toBe(0);
+ });
+
+ test('a shallow CI clone is deepened until it has a merge base', () => {
+ const origin = repo({}, {});
+ git(origin, 'checkout', '-q', 'base');
+ write(origin, { [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'] }) });
+ git(origin, 'commit', '-qam', 'base adds think');
+ const clone = mkdtempSync(join(tmpdir(), 'gbrain-public-surface-clone-'));
+ roots.push(clone);
+ git(clone, 'clone', '-q', '--depth=1', '--branch', 'head', `file://${origin}`, '.');
+ git(clone, 'fetch', '-q', '--no-tags', '--depth=1', 'origin', '+refs/heads/base:refs/remotes/origin/base');
+ const r = run(clone, { GBRAIN_SURFACE_BASE_REF: 'origin/base', CI: 'true' });
+ expect(r.out).not.toContain('FAIL');
+ expect(r.code).toBe(0);
+ });
+
+ test('a shallow pull-request merge commit whose parent is the base tip needs no fetch', () => {
+ const origin = repo({}, { [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'] }) });
+ git(origin, 'checkout', '-q', 'base');
+ write(origin, { 'README.md': 'base moved\n' });
+ git(origin, 'commit', '-qam', 'base moves on');
+ git(origin, 'checkout', '-q', '-b', 'merge', 'base');
+ git(origin, 'merge', '-q', '--no-ff', '--no-edit', 'head');
+ const clone = mkdtempSync(join(tmpdir(), 'gbrain-public-surface-clone-'));
+ roots.push(clone);
+ git(clone, 'clone', '-q', '--depth=1', '--branch', 'merge', `file://${origin}`, '.');
+ git(clone, 'fetch', '-q', '--no-tags', '--depth=1', 'origin', '+refs/heads/base:refs/remotes/origin/base');
+ git(clone, 'remote', 'set-url', 'origin', join(clone, 'no-such-remote'));
+ const r = run(clone, { GBRAIN_SURFACE_BASE_REF: 'origin/base', CI: 'true' });
+ expect(r.out).not.toContain('FAIL');
+ expect(r.code).toBe(0);
+ });
+
+ test('a shallow CI clone with no tags fetches the stable tag, so an entry stable never had can go', () => {
+ const origin = repo({ [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'] }) }, { [MANIFEST]: manifest() });
+ tagStable(origin, manifest());
+ const r = run(shallowClone(origin, 'head'), { GBRAIN_SURFACE_BASE_REF: 'origin/base', CI: 'true' });
+ expect(r.out).not.toContain('FAIL');
+ expect(r.code).toBe(0);
+ });
+
+ test('a stable tag that cannot be fetched fails loudly under CI and falls back locally', () => {
+ const clone = mergeClone({ [MANIFEST]: manifest({ 'mcp-tool': [] }) });
+ git(clone, 'remote', 'set-url', 'origin', join(clone, 'no-such-remote'));
+ const ci = run(clone, { GBRAIN_SURFACE_BASE_REF: 'origin/base', CI: 'true' });
+ expect(ci.code).toBe(1);
+ expect(ci.out).toContain('FAIL: check-public-surface: this change drops public entries, and the stable ref refs/tags/stable could not be fetched from origin, so it cannot tell which of them reached stable.');
+ expect(ci.out).not.toContain('mcp-tool `search`');
+ const local = run(clone, { GBRAIN_SURFACE_BASE_REF: 'origin/base' });
+ expect(local.code).toBe(1);
+ expect(local.out).toContain('stable ref refs/tags/stable is unavailable');
+ expect(local.out).toContain('mcp-tool `search` is removed or changed');
+ });
+
+ test('a fetch that hangs is stopped at its timeout and says so', () => {
+ const stable = mergeClone({ [MANIFEST]: manifest({ 'mcp-tool': [] }) });
+ hangOrigin(stable);
+ const env = { GBRAIN_SURFACE_BASE_REF: 'origin/base', CI: 'true', GBRAIN_SURFACE_FETCH_TIMEOUT_S: '1' };
+ const started = Date.now();
+ const s = run(stable, env);
+ expect(s.code).toBe(1);
+ expect(s.out).toContain('could not be fetched from origin (timed out after 1 s)');
+ const origin = repo({}, {});
+ git(origin, 'checkout', '-q', 'base');
+ write(origin, { [MANIFEST]: manifest({ 'mcp-tool': ['search', 'think'] }) });
+ git(origin, 'commit', '-qam', 'base adds think');
+ const deep = shallowClone(origin, 'head');
+ hangOrigin(deep);
+ const d = run(deep, env);
+ expect(d.code).toBe(1);
+ expect(d.out).toContain('no merge base between HEAD and origin/base, because the fetch that deepens the clone timed out after 1 s');
+ expect(Date.now() - started).toBeLessThan(8000);
+ }, 15000);
+
+ test('a missing base ref fails under CI and skips locally', () => {
+ const root = repo({}, {});
+ const ci = run(root, { GBRAIN_SURFACE_BASE_REF: 'nope', CI: 'true' });
+ expect(ci.code).toBe(1);
+ expect(ci.out).toContain('base ref nope is not available');
+ const local = run(root, { GBRAIN_SURFACE_BASE_REF: 'nope' });
+ expect(local.code).toBe(0);
+ expect(local.out).toContain('GBRAIN_CHECK_SKIPPED: base ref nope unavailable');
+ });
+});
+
+describe('deprecation records', () => {
+ test('a new record must give at least 14 days; an old record keeps its date', () => {
+ const short = run(repo({}, { 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-11-29') }));
+ expect(short.code).toBe(1);
+ expect(short.out).toContain('remove_after 2026-11-29 is less than 14 days away');
+ expect(run(repo({}, { 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-11-30') })).code).toBe(0);
+ expect(run(repo({ 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-11-29') }, {})).code).toBe(0);
+ });
+
+ test('an announced date can move later, never earlier', () => {
+ const path = 'deprecations.d/search_limit_flag_1234.md';
+ const early = run(repo({ [path]: record('cli-flag', 'gbrain search --limit', '2026-12-20') },
+ { [path]: record('cli-flag', 'gbrain search --limit', '2026-11-16'), [MANIFEST]: manifest({ 'cli-flag': ['gbrain search --match'] }) }));
+ expect(early.code).toBe(1);
+ expect(early.out).toContain(`${path}: remove_after moves from 2026-12-20 to 2026-11-16`);
+ expect(run(repo({ [path]: record('cli-flag', 'gbrain search --limit', '2026-11-20') }, { [path]: record('cli-flag', 'gbrain search --limit', '2026-12-20') })).code).toBe(0);
+ });
+
+ test('a record on the base keeps the surface and name it was announced with', () => {
+ const path = 'deprecations.d/search_limit_flag_1234.md';
+ const r = run(repo({ [path]: record('cli-flag', 'gbrain search --limit', '2026-11-20') },
+ { [path]: record('cli-flag', 'gbrain search --match', '2026-11-20'), [MANIFEST]: manifest({ 'cli-flag': ['gbrain search --limit'] }) }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain(`${path}: it named cli-flag \`gbrain search --limit\` on base; a record keeps the surface and name it was announced with, so add a new record for cli-flag \`gbrain search --match\``);
+ expect(run(repo({ [path]: record('cli-flag', 'gbrain search --limit', '2026-11-20') }, { [path]: record('cli-flag', 'gbrain search --limit', '2026-11-20').replace('alice-example', 'bob-example') })).code).toBe(0);
+ });
+
+ test('a record with a bad surface, no owner or no date is refused', () => {
+ const r = run(repo({}, { 'deprecations.d/bad_record_1234.md': '---\nsurface: cli-thing\nname: gbrain x\n---\nText.\n' }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('surface: must be one of cli-command, cli-flag, mcp-tool, mcp-param, config-key, exit-code, page-format, json-field');
+ expect(r.out).toContain('owner: is missing');
+ expect(r.out).toContain('remove_after: must be a date (YYYY-MM-DD)');
+ });
+
+ test('a page-format or --json field record is accepted though the list does not hold those surfaces', () => {
+ for (const surface of ['page-format', 'json-field']) {
+ expect(run(repo({}, { 'deprecations.d/old_field_1234.md': record(surface, 'gbrain stats --json .old_field', '2026-11-30') })).code).toBe(0);
+ }
+ });
+});
+
+describe('new behaviour-change rows', () => {
+ test('a new row needs kind:', () => {
+ const r = run(repo({}, { 'behavior-changes.d/new_row_1234.md': 'Plain text.\n' }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('behavior-changes.d/new_row_1234.md: a new behaviour-change row needs front matter with kind:');
+ expect(run(repo({}, { 'behavior-changes.d/new_row_1234.md': '---\nkind: fix\n---\nPlain text.\n' })).code).toBe(0);
+ });
+
+ test('a row already on the base needs nothing', () => {
+ expect(run(repo({ 'behavior-changes.d/old_row_1234.md': 'Plain text.\n' }, {})).code).toBe(0);
+ });
+
+ test('kind: breaking needs an exception or a matured deprecation', () => {
+ const bare = run(repo({}, { 'behavior-changes.d/new_row_1234.md': '---\nkind: breaking\n---\nText.\n' }));
+ expect(bare.code).toBe(1);
+ expect(bare.out).toContain('kind: breaking needs exception: security or data-loss, or deprecation: <id>');
+ expect(run(repo({}, { 'behavior-changes.d/new_row_1234.md': '---\nkind: breaking\nexception: security\n---\nText.\n' })).code).toBe(0);
+ const young = run(repo({ 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-12-01') },
+ { 'behavior-changes.d/new_row_1234.md': '---\nkind: breaking\ndeprecation: search_limit_flag_1234\n---\nText.\n' }));
+ expect(young.code).toBe(1);
+ expect(young.out).toContain('deprecation: search_limit_flag_1234 has not matured (remove_after 2026-12-01)');
+ expect(run(repo({ 'deprecations.d/search_limit_flag_1234.md': record('cli-flag', 'gbrain search --limit', '2026-11-10') },
+ { 'behavior-changes.d/new_row_1234.md': '---\nkind: breaking\ndeprecation: search_limit_flag_1234\n---\nText.\n' })).code).toBe(0);
+ });
+});
+
+describe('golden changes', () => {
+ const golden = 'test/fixtures/goldens/cli/search-help.txt';
+ test('a CLI golden change with no row and no waiver is refused; either clears it', () => {
+ const r = run(repo({ [golden]: 'old\n' }, { [golden]: 'new\n' }));
+ expect(r.code).toBe(1);
+ expect(r.out).toContain('CLI or agent-contract goldens changed (test/fixtures/goldens/cli/search-help.txt)');
+ expect(run(repo({ [golden]: 'old\n' }, { [golden]: 'new\n', 'behavior-changes.d/new_row_1234.md': '---\nkind: add\n---\nText.\n' })).code).toBe(0);
+ expect(run(repo({ [golden]: 'old\n' }, { [golden]: 'new\n', 'changelog.d/x.md': 'Entry.\n\n<!-- public-surface: no-behavior-change: help text reflowed -->\n' })).code).toBe(0);
+ });
+
+ test('other goldens are not covered', () => {
+ expect(run(repo({ 'test/fixtures/goldens/doctor/a.json': '1\n' }, { 'test/fixtures/goldens/doctor/a.json': '2\n' })).code).toBe(0);
+ });
+});
+
+describe('the committed manifest', () => {
+ test('is fresh and lists documented surfaces by the names deprecations.d uses', async () => {
+ expect(await buildMain(['--check'], join(import.meta.dir, '..', '..'))).toBe(0);
+ expect(MANIFEST).toBe('docs/contracts/public-surface.json');
+ const m = JSON.parse(await Bun.file(join(import.meta.dir, '..', '..', 'docs/contracts/public-surface.json')).text());
+ expect(m['cli-command']).toContain('gbrain search');
+ expect(m['cli-flag']).toContain('gbrain search --limit');
+ expect(m['mcp-param']).toContain('search.query');
+ expect(m['config-key']).toContain('engine');
+ expect(typeof m['exit-code'].not_found).toBe('number');
+ });
+
+ test('lists only commands the CLI dispatches, and keeps MCP-only operations as tools', async () => {
+ const { cliOps, OPERATION_MANIFEST } = await import('../../src/cli/op-manifest.ts');
+ const { cliAliases } = await import('../../src/cli/flag-validation.ts');
+ const { CLI_COMMANDS } = await import('../../src/cli/command-table.ts');
+ const dispatched = (name: string) => cliOps.has(name) || cliAliases.has(name) || CLI_COMMANDS.some(r => r.name === name);
+ const m = await buildSurface();
+ expect(m['cli-command'].filter(c => !dispatched(c.slice('gbrain '.length)))).toEqual([]);
+ expect(m['cli-flag'].filter(f => !dispatched(f.slice('gbrain '.length, f.indexOf(' --'))))).toEqual([]);
+ const mcpOnly = OPERATION_MANIFEST.filter(op => !op.cliOnly && !op.cliHints?.name);
+ expect(mcpOnly.length).toBeGreaterThan(0);
+ for (const op of mcpOnly) {
+ expect(m['mcp-tool']).toContain(op.name);
+ for (const p of Object.keys(op.params)) expect(m['mcp-param']).toContain(`${op.name}.${p}`);
+ }
+ });
+});
diff --git a/test/scripts/regen-all.test.ts b/test/scripts/regen-all.test.ts
index 53ade8ec0e..96314fa5dc 100644
--- a/test/scripts/regen-all.test.ts
+++ b/test/scripts/regen-all.test.ts
@@ -27,6 +27,11 @@ describe('regen:all', () => {
expect(readFileSync(join(ROOT, 'docs/RELEASING.md'), 'utf8')).toContain('## Generated artifacts');
});
+ test('the public surface is built after the operation manifest it reads', () => {
+ const names = ARTIFACTS.map(a => a.name);
+ expect(names.indexOf('public surface (docs/contracts/public-surface.json)')).toBeGreaterThan(names.indexOf('operation manifest'));
+ });
+
test('every generator and check names a script or test that exists, and llms is regenerated last', () => {
for (const a of ARTIFACTS) {
for (const argv of [a.regen, a.check]) {