Skip to content

v29.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 16:32
· 12 commits to main since this release
Immutable release. Only release title and notes can be modified.
52967a3

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: folded channels: into services: (emit: none | events | messages). Removed channels:, ChannelSpec, jobs.<name>.channel, and send_channel_message. Inbound message streams now run as services.<name> with emit: messages, emitting "service.message" events from JSONL stdout lines; outbound replies and notifications run as normal jobs or scripts. Update bf.yaml and evals/*.{yaml,yml,json} to version: 14, move channels.<name>.listen entries to services.<name> (emit: messages), update kind: channel.message triggers to kind: service.message, and refresh schemas/bf.schema.json and schemas/evals.json.
  • Standardized graph edges on links, removing relations and review() project special-casing. Removed relations from note frontmatter, bf ingest, schemas/record.json, and bf validate, and removed implicit rec["project"] backlink special-casing in bf review. Express typed edges in links (bf:///...?rel=... in frontmatter, [label](...){rel=...} in Markdown prose, or {"to": "bf:///...", "meta": {"rel": "..."}} in sensor JSON), convert any stored relations in notes and memories/<source>/*.json into links, and refresh schemas/record.json.
  • Required canonical bf:// or external URLs in stored links (source:id kept on bf read / bf_read only). Raw bf ingest link strings now require bf:// or external URLs, and bf ingest, compile_note(), and bf validate reject source:id record references across frontmatter, Markdown prose, and stored memories/<source>/*.json (bf review still matches source:id values in note.entity and note.aliases against incoming memories/<source>/<sha256>.json links). Convert sensor emissions and stored record links from source:id to bf:///memories/<source>/<sha256(id)>.json (memories/<source>/<sha256(id)>.json when stored).
  • Switched .bf/events.json to append-only .bf/events.jsonl with self-healing cursors. Runtime events now append atomically via O_APPEND | O_NOFOLLOW (0600) to .bf/events.jsonl with amortized bounded compaction (> 8 MiB or seq > 1000 every 200 events), and per-unit event_seq cursors in .bf/<unit>.json reset cleanly if .bf/events.jsonl is recreated or truncated. Convert or remove any existing .bf/events.json file and update custom scripts reading .bf/events.json.
  • Dropped bf mcp --transport and --port in favor of stdio-only bf mcp. bf mcp now serves stdio exclusively (--transport and --port fail with exit 2), and bf init no longer scaffolds a disabled HTTP services.mcp entry in bf.yaml. Remove any services.mcp HTTP entries from bf.yaml.
  • Enforced private 0700 logs/ directory (0600 logs/*.log) and dropped logs from bf status counts. logs/ is now confined as a private 0700 directory owned by geteuid() (0600 *.log files), rejected in note links and bf read, and omitted from bf status counts. Run chmod 700 logs && chmod 600 logs/*.log when upgrading an existing brain.

Security

  • Confined jq subprocesses across bf query --jq, bf_query, and job events[].filter. Runs jq from / with minimal locale environment (LC_ALL, LANG), -L /dev/null, and a built-in prelude disabling modulemeta, get_jq_origin, get_prog_origin, and get_search_list so import/include directives and $ENV cannot read arbitrary files or host variables.
  • Hardened bf mcp cross-brain confinement and root redaction. Cross-brain bf://<host>/... resolution in bf_read and bf_validate now requires <host> to be declared in bf.yaml brains: (disabling sibling-directory discovery over MCP), eagerly registers resolved brains: roots, home paths, and URL-encoded variants for redaction, and redacts multi-slash file:////... prefixes.
  • Hardened .bf/ and logs/ ownership checks, O_NOFOLLOW service/sensor I/O, and secret redaction. storage.private_dir() enforces 0700 owned by os.geteuid() on both .bf/ and logs/ (0600 on logs/*.log), models.redact_secrets() and github-issues.py mask Google OAuth ya29. tokens, git-history.py confines .git file and commondir targets inside ROOT, agent-telemetry.py redacts multi-line PEM keys and API tokens before newline folding and sanitizes OSError/ValueError diagnostics, and examples/brain/services/local.py accesses .bf/local (0700) and JSONL state files (0600) exclusively via O_NOFOLLOW descriptors.

Fixed

  • Accurate bf eval expect_text, bf read #anchor slicing, and loose task attr_list metadata. bf eval checks expect_text against matched items instead of the outer response envelope; bf read <note>#<anchor> resolves auto-generated, inline-formatted, duplicate (#notes_1), and Setext heading anchors consistently with bf build; and markdown.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 and NaN rejection) and validates "incomplete" (bool or {"missed": int >= 0}); bf init validates --name before creating directories and rejects dangling symlinks; bf review normalizes fractional/offset timestamps chronologically; and git-history.py, local-documents.py, and agent-telemetry.py percent-encode space-containing paths and filter [START, END) windows by event timestamps.
  • Graceful bf watch shutdown, live bf.yaml daemon reload, and isolated run handling. Stopping bf watch terminates in-flight job process groups and records "status": "stopped" without incrementing failures, reloads bf.yaml to start/stop/restart changed services daemons live, and isolates broken requires:/input: preflight checks per job during --due ticks.

Changed

  • Large-brain performance optimizations across validate, review, query, build, status, and jobs. Cached compiled jsonschema validators by schema SHA-256, converted bf validate to a single-pass Store.walk("memories") scan, reused unchanged compiled notes during incremental bf watch / bf run --due ticks and bf read, streamed memories/**/*.json directly to rg --no-follow and jq without upfront Python corpus walks or unbounded stderr buffers, skipped file fsyncs on non-durable logs/*.log appends and duplicate-key checks on stored memories, counted bf status files via scandir without opening blobs, and batched jobs.pending_events jq filters once per unique rule.

Removed

  • Unused internal helpers and dead sensor scaffolding. Removed unused storage.Store.read_files (replaced by Store.walk and Store.count_files), records.parse_batch, records.load_source, and unused v26 aliases/relations builders across examples/sensors/{git-history,github-issues,gmail-headers,local-documents}.py.