Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge remote-tracking branch 'origin/master' into capy/doctor-alert-page-only
garrytan9d457229c5b5
diff --cc CHANGELOG.mdindex b6a984c124,9bdfa4a6c8..36d657e4ac--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -10,16 -10,28 +10,38 @@@ credits are retained; no result has beeidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).+## [Unreleased]++**Health alerts page only on what needs someone (GBRA-224 W4).**++A self-hoster running gbrain inside an agent harness got a weekly "score 30, 1 failing check, resolver_health: 60 issues" alert. The score counted the agent's own skills folder, graded against gbrain's conventions, the same as an outage, while the brain itself was healthy.++- `gbrain doctor --alert` runs only the page-class checks (database, writes, migrations, builds, sync and maintenance stalls, corrupt rows, schema exposure, the paid-loop breaker), fresh, under a 30 s budget, and exits 0 (`none`), 17 (`act`: `alert.items` carry each check's own fix) or 18 (`unknown`: a page-class check did not run fresh; `alert.consecutive_unknown` counts the runs in a row). Every doctor report carries `alert`; MCP `run_doctor` with `only` naming page-class checks runs them on the serve, redacted.+- A skills folder found by walking up from the current directory that gbrain did not install no longer lowers the score: resolver_health and skill_currency report "not a gbrain skills folder (<path>)". `--skills-dir`, `GBRAIN_SKILLS_DIR` and `OPENCLAW_WORKSPACE` still grade it.+- `health_score`, `brain_checks_score`, `category_scores` and `status` are unchanged for every existing check set.++ ## [0.60.476.0] - 2026-10-27++ **Text someone else wrote can no longer add facts to your brain.**++ Gmail threads, calendar events, GitHub issues and chat transcripts are imported as pages, and their text came from other people. Until now that text went into the page as written. If an email held gbrain's facts-table markers and a table, the page treated the table as its own: `extract_facts` saved the sender's rows as facts, with the visibility and confidence the sender chose. The same trick could add takes and links, forge timeline entries, or replace facts gbrain had already saved on that page.++ Imports now make that text inert before it reaches the page. Every `gbrain:` marker gets a backslash (`gbrain\:facts:begin`). So do timeline sentinels and headings, dated timeline lines, `[Source: …]` citations and transcript speaker lines. The text still reads the same in the rendered page, but nothing parses it. Before that pass, CR, CRLF, U+2028 and U+2029 line breaks become plain newlines, so an unusual line break can't hide a marker or a timeline line.++ ### What changed++ | Situation | Before | Now |+ |---|---|---|+ | An email, calendar description, GitHub comment or chat message contains a facts, takes or links table between gbrain's markers | the rows became the page's facts, takes or links | the text is kept and the markers are escaped, so nothing is indexed |+ | That text contains `<!-- timeline -->`, a `## Timeline` heading or dated timeline lines | the page split there and the lines became timeline entries | kept as plain text |+ | Facts gbrain already saved on a thread page, then a reply carries a facts table | the reply's table replaced them | the saved facts stay |++ ### For operators++ - New doctor check `outside_content_fences` (read-only). It lists imported email, calendar, GitHub and transcript pages that have facts, takes or links indexed from a fence on them, with counts and never a cell value. Rows planted before this release stay until someone removes them. gbrain's own writers also add rows to some of these pages, so the check removes nothing. Review each listed page with the user, and withdraw a fact they say a sender planted with `gbrain forget <fact-id>`.+ - `POST /ingest` is unchanged: its caller is an authenticated writer with the same rights as `put_page`. Files the ingestion daemon picks up are unchanged too, because they're the owner's own.+ - New connectors should pass every outside field through `neutralizeOutsideText` in `src/core/outside-content.ts`.+## [0.60.475.0] - 2026-10-27**A repository's own commit checks now apply to commits gbrain makes.**