Repository navigation
2.22.0 — 2026-11-25
Current main since 2.21.2. Adds the agent-first intent MCP tools, hosted ChatGPT MCP OAuth consent, and Postgres pool hardening, plus spreadsheet experiment fixes. Spreadsheets stay off unless SPREADSHEET_EXPERIMENT_BRAINS is set.
MCP
- Agent-first tools
brainapi_recall/brainapi_check/brainapi_remember/brainapi_correct, listed first withbrain_idoptional. (#121) - Hybrid recall,
as_ofvalid-time ordering, LLM fact parsing with rule fallback, and a retirement lock. (#160) - Hardened BrainPAT consent for hosted ChatGPT MCP OAuth. (#105)
- Removed the obsolete hosted MCP OAuth overlay Dockerfile. (#158)
Retrieve
- spaCy models are baked into the image, so there is no ~20s first call. (#151)
- All spaCy small pipelines are bundled, with blank fallback, TTL retry, and warmup. (#154)
- Vector timeouts degrade, and GET query text is redacted from logs. (#153)
- Keyword retrieve degrades only on real outages. (#156, #159)
Postgres
- Fixes closed and exhausted per-brain pool errors. (#155)
Ingest
- Worker duration and size metrics. (#149)
Spreadsheets
- Schema-once import and a shared experiment-brain gate. (#147, #157)
SPREADSHEET_EXPERIMENT_BRAINSparsing is shared:*, explicit brain ids, and empty (off) mean the same thing on spreadsheet routes andspreadsheet_experiment_owns_upload.- Spreadsheet schema migration (including the
cell_countbackfill) runs once per brain, then a persistent schema-version marker plus an in-process cache skip the fullspreadsheet_rowsscan on later imports. - Date filters compare timestamps, not text. A date-only equals matches the whole day; an inclusive end date includes that day.
- Per-brain Postgres pool waits up to
POSTGRES_POOL_TIMEOUT(default 5s) instead of failing immediately; timeout is 503 withRetry-After. DELETE /retrieve/spreadsheets/{id}removes a workbook. Purge/rollback of the import task deletes workbook rows too. Identical uploads return the existing workbook id (content hash). Caps:SPREADSHEET_MAX_WORKBOOKS_PER_BRAIN(500),SPREADSHEET_MAX_CELLS_PER_BRAIN,SPREADSHEET_MAX_BYTES_PER_BRAIN, checked atomically with the insert.- Imports credit existing ingest-group metering as
source_chars/source_tokens(cell text) pluscounts.cells/counts.sheets. - Gated
.xlsx/.csv/.xlsthat are empty, encrypted, corrupt, or malformed return 4xx instead of 202 queued. - CSV infers dates, currency, and percentages like xlsx. Percentages stay fractions with
display=percent. Merged cells forward-fill. Listedrowsis data rows (header excluded). Range queries skip the header row. Workbook list is paginated.group_byaggregation is supported.
Evals
- Strict accuracy counting treats degraded answers as wrong, plus a degraded count and
--max-degraded-rate(default 5%). (#159)