Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
4.9 KB
Raw Blame

Upgrade to v0.60.31.0: stored credentials stay out of retrieval, and Google files are private

This release changes what the brain hands back, not what it stores:

  • Search, query, evidence and the memory verbs (recall, context_pack, delta, entity) replace credential-shaped values with <REDACTED:pattern>. Remembered facts are redacted for every MCP caller (stdio included) and thin clients, and returned as stored by gbrain recall on the brain host.
  • Search chunks and delivered evidence never hold private-key material. Pages indexed earlier that contain a private key are withheld from search until this upgrade re-chunks them, with no provider calls.
  • gbrain sources push and bootstrap catch more shapes (http(s) URLs with a password, Authorization: Basic, DigitalOcean tokens, cut-off private keys) and print the fix for each finding.
  • Google sync state and pages are written 0600, directories 0700. Files written earlier in a Google folder outside ~/.gbrain keep their old permissions until the user agrees to a repair.

Paid work and permission changes need the user's agreement. Never answer the re-embed prompt, run gbrain embed --stale, run a repair with --apply or add an allowlist entry on the user's behalf without asking.

  1. Finish the migration. gbrain upgrade runs it. If gbrain doctor reports a partial migration, or to be sure, run on the brain host:

    gbrain apply-migrations --yes --no-autopilot-install
    

    It re-chunks the withheld pages without provider calls and prints a one-time [google] Google source <id> keeps its files in <dir>, outside ~/.gbrain line per Google folder outside ~/.gbrain. It is idempotent: a rerun picks up only pages still pending.

  2. Check the re-chunk. Run gbrain doctor and read credential_projection_pending. When it is ok, every page is searchable again. If it names code pages without a recorded source path, they stay withheld until their source is synced again: gbrain sync --source <id>. If it says some pages failed their re-chunk and are held, the migration completed without them and they stay withheld. gbrain doctor --only text_projection_readiness lists each with its error code; preview the retry with gbrain repair safe-chunks --source <id> and apply the command it prints (no provider calls).

  3. Ask before embedding the new chunks. Re-chunked pages have no vectors until they are embedded, so keyword search finds them and vector search does not. Embedding calls the configured provider and can cost money. Tell the user, and only after they agree:

    gbrain embed --stale
    

    If the upgrade printed [chunker-bump] Not re-embedding without your consent, that is expected for a non-interactive upgrade; relay the commands it printed and let the user choose.

  4. Google folders outside ~/.gbrain. If step 1 printed a [google] line or gbrain doctor warns google_file_modes, show the user the preview, explain that it clears group and other permission bits on gbrain's own files only, and apply after they agree:

    gbrain repair google-file-modes --source <id>          # preview
    gbrain repair google-file-modes --source <id> --apply
    

    gbrain now reasserts 0600 every time it rewrites one of these files, so a looser mode set by hand is reverted on the next rewrite.

  5. If a brain push is refused. gbrain sources push may now stop with PUSH BLOCKED. Show the user each finding (file, line, pattern, fingerprint). A real credential must be removed from the file and rotated with its provider before pushing again. Only a value the user confirms is not a credential may be allowlisted, with the "allow this finding" command the refusal prints, followed by the printed retry command. A stale allowlist entry line means an old entry for a cut-off private key no longer matches; replace it with the printed line only if the user confirms the key is a false positive.

  6. Explain <REDACTED:pattern>. When a result carries this token, tell the user the brain holds a value of that kind and withheld it; do not try other operations to recover it. A credential the user asked the brain to remember is readable with gbrain recall on the brain host only. Full page reads (get_page) are not redacted.

  7. Restart long-running processes so the new code serves every caller: gbrain serve (stdio MCP: restart the agent harness; HTTP: restart the service), gbrain jobs supervisor and autopilot.

  8. Verify.

    gbrain doctor
    

    credential_projection_pending and google_file_modes report ok (or only the warnings the user chose to leave). If a step failed, run gbrain apply-migrations --yes --no-autopilot-install once more and re-run gbrain doctor.

Details: docs/guides/write-refusals.md#secret-scan-refusals-and-redaction and docs/guides/google-connect.md#file-permissions.