Repository navigation
v29.0.0
A major release bumping the brain format to version: 14, folding inbound channels: listeners into services: (emit: none | events | messages), standardizing edges on links (bf:// and external URLs, removing relations and stored source:id refs), switching the runtime event log to append-only .bf/events.jsonl with self-healing per-unit cursors, dropping bf mcp --transport http and --port in favor of stdio-only bf mcp, and hardening logs/ (0700 directory, 0600 *.log files) and large-brain performance across bf. Update bf.yaml and evals/*.{yaml,yml,json} to version: 14, fold any channels: listeners into services: (emit: messages, changing channel.message event triggers to service.message and running outbound replies as normal jobs or scripts), refresh schemas/{bf.schema.json,record.json,evals.json} (preserving customizations in schemas/concepts.json and schemas/<source>.json), convert note and record relations and source:id link targets into links (bf:///memories/<source>/<sha256>.json or bf:///concepts/<slug>.md), convert .bf/events.json to .bf/events.jsonl, tighten existing log permissions (chmod 700 logs && chmod 600 logs/*.log), and refresh installed /bf skills (skills/bf/SKILL.md); see the breaking changes below.
Breaking changes
- Brain format bumped to
version: 14: foldedchannels:intoservices:(emit: none | events | messages). Removedchannels:,ChannelSpec,jobs.<name>.channel, andsend_channel_message. Inbound message streams now run asservices.<name>withemit: messages, emitting"service.message"events from JSONL stdout lines; outbound replies and notifications run as normaljobsor scripts. Updatebf.yamlandevals/*.{yaml,yml,json}toversion: 14, movechannels.<name>.listenentries toservices.<name>(emit: messages), updatekind: channel.messagetriggers tokind: service.message, and refreshschemas/bf.schema.jsonandschemas/evals.json. - Standardized graph edges on
links, removingrelationsandreview()projectspecial-casing. Removedrelationsfrom note frontmatter,bf ingest,schemas/record.json, andbf validate, and removed implicitrec["project"]backlink special-casing inbf review. Express typed edges inlinks(bf:///...?rel=...in frontmatter,[label](...){rel=...}in Markdown prose, or{"to": "bf:///...", "meta": {"rel": "..."}}in sensor JSON), convert any storedrelationsin notes andmemories/<source>/*.jsonintolinks, and refreshschemas/record.json. - Required canonical
bf://or external URLs in storedlinks(source:idkept onbf read/bf_readonly). Rawbf ingestlink strings now requirebf://or external URLs, andbf ingest,compile_note(), andbf validaterejectsource:idrecord references across frontmatter, Markdown prose, and storedmemories/<source>/*.json(bf reviewstill matchessource:idvalues innote.entityandnote.aliasesagainst incomingmemories/<source>/<sha256>.jsonlinks). Convert sensor emissions and stored recordlinksfromsource:idtobf:///memories/<source>/<sha256(id)>.json(memories/<source>/<sha256(id)>.jsonwhen stored). - Switched
.bf/events.jsonto append-only.bf/events.jsonlwith self-healing cursors. Runtime events now append atomically viaO_APPEND | O_NOFOLLOW(0600) to.bf/events.jsonlwith amortized bounded compaction (> 8 MiBorseq > 1000every200events), and per-unitevent_seqcursors in.bf/<unit>.jsonreset cleanly if.bf/events.jsonlis recreated or truncated. Convert or remove any existing.bf/events.jsonfile and update custom scripts reading.bf/events.json. - Dropped
bf mcp --transportand--portin favor ofstdio-onlybf mcp.bf mcpnow servesstdioexclusively (--transportand--portfail with exit2), andbf initno longer scaffolds a disabled HTTPservices.mcpentry inbf.yaml. Remove anyservices.mcpHTTP entries frombf.yaml. - Enforced private
0700logs/directory (0600logs/*.log) and droppedlogsfrombf statuscounts.logs/is now confined as a private0700directory owned bygeteuid()(0600*.logfiles), rejected in note links andbf read, and omitted frombf statuscounts. Runchmod 700 logs && chmod 600 logs/*.logwhen upgrading an existing brain.
Security
- Confined
jqsubprocesses acrossbf query --jq,bf_query, and jobevents[].filter. Runsjqfrom/with minimal locale environment (LC_ALL,LANG),-L /dev/null, and a built-in prelude disablingmodulemeta,get_jq_origin,get_prog_origin, andget_search_listsoimport/includedirectives and$ENVcannot read arbitrary files or host variables. - Hardened
bf mcpcross-brain confinement and root redaction. Cross-brainbf://<host>/...resolution inbf_readandbf_validatenow requires<host>to be declared inbf.yamlbrains:(disabling sibling-directory discovery over MCP), eagerly registers resolvedbrains:roots, home paths, and URL-encoded variants for redaction, and redacts multi-slashfile:////...prefixes. - Hardened
.bf/andlogs/ownership checks,O_NOFOLLOWservice/sensor I/O, and secret redaction.storage.private_dir()enforces0700owned byos.geteuid()on both.bf/andlogs/(0600onlogs/*.log),models.redact_secrets()andgithub-issues.pymask Google OAuthya29.tokens,git-history.pyconfines.gitfile andcommondirtargets insideROOT,agent-telemetry.pyredacts multi-line PEM keys and API tokens before newline folding and sanitizesOSError/ValueErrordiagnostics, andexamples/brain/services/local.pyaccesses.bf/local(0700) and JSONL state files (0600) exclusively viaO_NOFOLLOWdescriptors.
Fixed
- Accurate
bf evalexpect_text,bf read #anchorslicing, and loose taskattr_listmetadata.bf evalchecksexpect_textagainst matcheditemsinstead of the outer response envelope;bf read <note>#<anchor>resolves auto-generated, inline-formatted, duplicate (#notes_1), and Setext heading anchors consistently withbf build; andmarkdown.compile_note()preserves{: #id key=val}block attributes on loose task list items. - Strict batch envelope parsing, validation completeness, and sensor path encoding.
records.parse_batch_envelope()accepts multi-line single JSON objects (preserving duplicate-key andNaNrejection) and validates"incomplete"(boolor{"missed": int >= 0});bf initvalidates--namebefore creating directories and rejects dangling symlinks;bf reviewnormalizes fractional/offset timestamps chronologically; andgit-history.py,local-documents.py, andagent-telemetry.pypercent-encode space-containing paths and filter[START, END)windows by event timestamps. - Graceful
bf watchshutdown, livebf.yamldaemon reload, and isolated run handling. Stoppingbf watchterminates in-flight job process groups and records"status": "stopped"without incrementingfailures, reloadsbf.yamlto start/stop/restart changedservicesdaemons live, and isolates brokenrequires:/input:preflight checks per job during--dueticks.
Changed
- Large-brain performance optimizations across
validate,review,query,build,status, andjobs. Cached compiledjsonschemavalidators by schema SHA-256, convertedbf validateto a single-passStore.walk("memories")scan, reused unchanged compiled notes during incrementalbf watch/bf run --dueticks andbf read, streamedmemories/**/*.jsondirectly torg --no-followandjqwithout upfront Python corpus walks or unboundedstderrbuffers, skipped filefsyncs on non-durablelogs/*.logappends and duplicate-key checks on stored memories, countedbf statusfiles viascandirwithout opening blobs, and batchedjobs.pending_eventsjqfilters once per unique rule.
Removed
- Unused internal helpers and dead sensor scaffolding. Removed unused
storage.Store.read_files(replaced byStore.walkandStore.count_files),records.parse_batch,records.load_source, and unused v26aliases/relationsbuilders acrossexamples/sensors/{git-history,github-issues,gmail-headers,local-documents}.py.