A barrel forces Node to evaluate its whole graph: importing reduceLaneSnapshot
(1 file, 6 KB) through pi-agent-core's index evaluated 106 files, and mini's
server loaded 112 files to enumerate JSONL headers. Types are free, so this only
ever affected value imports.
pi-ai gains ./utils/* alongside the existing ./providers/* and ./api/*
wildcards. pi-agent-core gains ./harness/context, ./harness/env/nodejs,
./harness/runtime/reducer and ./harness/session, and ./session/testing becomes
./harness/session/testing so every export mirrors its source path. The barrel
and ./node keep their batteries-included semantics.
The session layer takes uuidv7 from @earendil-works/pi-ai/utils/uuid rather than
the pi-ai barrel, which is what let ./harness/session drop from 42 files to 19.
Two imports there were written `import { type Usage } from` - not a type-only
statement, so it emitted a runtime import of the barrel.
scripts/check-entry-graphs.mjs walks each declared entry's value-import graph and
enforces per-entry budgets and forbidden paths, so a stray `export *` cannot
silently undo this. It caught the two `import { type ... }` regressions above.
Measured with mini: server 112 files and 98 MB to 28 files and 69 MB, presentation
204 files and 125 MB to 99 files and 110 MB. The worker still loads the provider
graph, correctly.
* refactor: search out of repo
* fix: apply cases, no resolve for index on every hit
* chore: tests
* fix: use iterator and no open
* refactor: public dir stuff in jsonl, source
* cleanup and sqlite time number
* fix: use storage for label search too, delete types
* refactor: abstract some more
* docs: example jsonl with elastic search
* docs: Christian's md
* refactor: simpler api surface
* feat: rebuild
* docs: consolidate
* fix: use trigger for sqlite, cleanup indexable, add example in doc
* chore: restore upstream responses shared
* fix: delete metadata from jsonl search hit
* fix: AsynIterable
* refactor: scanning for memory, reuse
* fix: dont export jsonlSessionDirectoryName
* cleanup: more shared stuff
* cleanup: why, jsonl?
* fix: findEntriesOnBranch filters
* fix: branch entry membership index
* fix: get log limit, add test
* fix: record indexes
* fix: use facts index
* fix: composite desc index for cwd, created at
* 1. rejects corrupt parent chains in array-backed readers
* 2. does not decode SQLite branch entries outside query bounds
* 3. validates SQLite entries before filtering and limiting branch results
* 4. does not validate SQLite ancestors beyond newest-first stop bounds
* 5. rejects repository operations and session writes after disposal
* 6. supports lexical ownership with await using
* 7. uses listing as a barrier between accepted session operations
* 8. waits for every accepted session operation during disposal
* 9. waits for accepted appends before disposal and rejects later writes
* 10. repository disposal closes its owned storage
* 11. stops branch traversal at retained-tail compaction
* docs: mark QA2 done
Implements R0 of the harness v2 plan, which adds RecordQuery.operationKind filtering and adds Session.findOpenOperations() for recovery purposes. The in-memory implementation keeps the open-operation projections in memory. SQLite implementation adds an index idx_records_session_lane_run_id_type.