40 Commits
Author SHA1 Message Date
David Brailovsky 1081eb2126 fix(agent): require configured lanes for branch forks
Reject data-only source branches, preserve tree-scope support for them, and update fork fixtures to provide complete lane configuration and state.
2026-09-01 15:18:05 +02:00
David Brailovsky f8da63be59 feat(agent): require explicit named branches for session forks
Require fork scope and source branch selection, preserve the branch name in the destination, and cover named-branch behavior across backends.
2026-09-01 12:35:14 +02:00
Mario Zechner ef11444b6e fix(agent): align SQLite ownership with session workers 2026-08-31 04:19:32 +02:00
Mario Zechner 5507d76ee8 feat(agent,ai): add narrow subpath exports so clients skip the barrel
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.
2026-08-26 22:02:31 +02:00
Mario Zechner 423e20cb78 feat(agent): separate sessions, branches, and lanes 2026-08-25 16:52:29 +02:00
Mario Zechner 852142daa0 feat(agent): add explicit session mutations 2026-08-24 23:35:55 +02:00
Cristina Poncela Cubeiro 94108a1ac6 feat(sqlite): databasePath, sessionId for sharding 2026-08-24 15:40:18 +02:00
Mario Zechner 41c9795be7 feat(agent): add durable drive foundations 2026-08-24 12:37:48 +02:00
Cristina Poncela Cubeiro a3fd215615 feat(sqlite): repo close, simplify benchmark 2026-08-18 18:57:43 +02:00
Cristina Poncela Cubeiro bf7acdcc18 test(sqlite): finalize repo and storage conformance 2026-08-18 16:32:25 +02:00
Mario Zechner beac75ecc2 feat(agent): implement atomic acceptance and coherent observation 2026-08-18 14:36:33 +02:00
Armin Ronacher 3fbfcf48ff feat(agent): thread invocation context through harness APIs 2026-08-17 19:56:21 +02:00
Mario Zechner c179395b1e feat(agent): add bound values and lists 2026-08-17 16:47:18 +02:00
Cristina Poncela Cubeiro 9e964db343 feat(sqlite): skip corrupt sessions 2026-08-17 10:51:25 +02:00
Cristina Poncela Cubeiro 8992320444 feat(sqlite): co-ordinate fork with open session 2026-08-17 10:38:59 +02:00
Cristina Poncela Cubeiro fc2a0b243e feat(sqlite): fork 2026-08-17 10:09:16 +02:00
Cristina Poncela Cubeiro db0e240861 feat(sqlite): lease lifecycle and renewal
Checked what is usually done, and seems to be common pattern to use half the max time for interval (e.g. Kubernetes leader election docs).
2026-08-17 09:28:04 +02:00
Cristina Poncela Cubeiro 011c78f710 feat(sqlite): triggers for no duplicate ids across tables 2026-08-16 22:32:07 +02:00
Cristina Poncela Cubeiro 35c1521573 feat(sqlite): wire repo to return real session 2026-08-14 13:58:16 +02:00
Vegard Stikbakke b863f1cff6 fix: revert SQLite conformance CI isolation 2026-08-14 11:16:49 +02:00
Vegard Stikbakke f7a00fe43b fix: isolate incomplete SQLite conformance job 2026-08-14 11:12:20 +02:00
Vegard Stikbakke a2dd8ab2a7 fix: skip incomplete SQLite conformance cases 2026-08-14 11:09:48 +02:00
Vegard Stikbakke 75bb6a0fcd feat(agent): add SQLite storage conformance coverage 2026-08-14 10:50:23 +02:00
Cristina Poncela Cubeiro 4ea01980ff feat(sqlite): append entry to branch index 2026-08-14 09:51:00 +02:00
Cristina Poncela Cubeiro b448269c83 feat(sqlite): session seq helpers 2026-08-13 18:08:37 +02:00
Cristina Poncela Cubeiro 11dd14f6ee fix(sqlite): unicode keys, duplicate create 2026-08-13 14:16:42 +02:00
Cristina Poncela Cubeiro 5b8df56823 feat(sqlite): readonly storage 2026-08-13 13:55:13 +02:00
Cristina Poncela Cubeiro 90b63bf172 feat: initial sqlite repo 2026-08-12 22:45:01 +02:00
Mario Zechner 5aeb06bb11 feat(agent): establish durable harness type contracts 2026-08-11 17:43:26 +02:00
Cristina Poncela Cubeiro b75be04d92 refactor: search (#7797)
* 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?
2026-08-11 13:27:48 +02:00
Cristina Poncela Cubeiro a4453b79bb fix: sqlite time to number 2026-08-11 10:07:53 +02:00
David Brailovsky 7bdb16c28d feat(agent): support clearing session names 2026-08-08 19:19:46 +02:00
Cristina Poncela Cubeiro e7fb8eb2ac fix: no ctes in sqlite, delete indexes 2026-08-07 16:13:16 +02:00
Cristina Poncela Cubeiro ae1e410e37 fix: sqlite queries optimizations (#7727)
* 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
2026-08-07 07:24:00 +02:00
Armin Ronacher 055ecce080 feat(agent): add SQLite SQL template queries 2026-08-06 18:10:42 +02:00
Cristina Poncela Cubeiro 77f4840320 chore: qa2 tests (#7706)
* 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
2026-08-06 11:24:09 +02:00
Cristina Poncela Cubeiro 2f550d827d fix: project open operation id to lanes (#7654)
* fix: project open operation id to lanes

* delete: idx_lanes_session_leaf

* fix: split, over-defensive

* delete: unnecessary assertion
2026-08-05 16:57:41 +02:00
Christian Klotz 1022a9e824 fix(agent): list SQLite sessions without writer claims (#7655)
* fix(agent): list SQLite sessions without writer claims

* fix(agent): reject null SQLite session names
2026-08-05 13:25:37 +03:00
Vegard Stikbakke 591f22a618 feat(agent): add indexed harness recovery queries (#7646)
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.
2026-08-05 10:41:44 +02:00
Cristina Poncela Cubeiro a80008b96c chore: rename storage package to session-backends 2026-08-05 09:28:44 +02:00