@teambrain/core
v0.3.0
Published
TeamBrain brain format: memory/event schemas, byte-exact parsing, lint, ULIDs, logging
Downloads
764
Maintainers
Readme
@teambrain/core
The TeamBrain brain format: schemas, parsing, lint, IDs, logging.
Everything durable in TeamBrain is a file in a git repo; this package defines and validates those files.
- Memory files — zod schema for the YAML front-matter (
id,class,scope,status,priority,evidence,supersedes,ttl_days, …) and a canonical parse/serialize pair with a byte-exact round-trip guarantee. - Session events — the versioned JSONL envelope every capture event uses
(
sid/repo/branch/tool/modeljoin keys on every event). brain.yamlconfig, ULID generation, slug utilities.- Lint — schema, body-size limits, evidence checks, and injection heuristics (a table of instruction-like patterns memory bodies must not contain).
- Structured logger with 7-day rotation;
body/content/promptfields are redacted at info level and above by design.
npm install @teambrain/coreMost users want the CLI instead:
@teambrain/cli (npm i -g,
then tb init).
Apache-2.0
