pi-mono/packages
Julien Barbay 2b768ba42c
feat(coding-agent): ingest external entries in in-memory sessions (#8980)
* feat(coding-agent): ingest external entries in in-memory sessions

SessionManager.inMemory() takes the entries to start from, so a session
held outside the filesystem can be resumed as it was stored.

Replaying through appendMessage/appendCompaction cannot do this: ids are
minted fresh, so every stored firstKeptEntryId, targetId and fromId has to
be remapped, timestamps are rewritten, and parentId always comes from the
current leaf, so a branched tree needs the original branch() choreography
reproduced call by call.

The entry-adoption half of _setSessionFile becomes _loadEntries, which the
constructor also uses when there are entries but no file. Entries carrying
a session header keep it; without one, the header comes from the options
and the entries become its body.

* fix(coding-agent): carry the stored version through restored entries

inMemory() took SessionEntry[], which excludes SessionHeader, so an
external store could not pass the header it saved and the header branch of
_loadEntries was unreachable through the public API. A restore therefore
always synthesised a current-version header, and the migration that ran
next read that header and skipped: a v2 session kept its hookMessage roles
forever.

Widening to FileEntry[] lets the stored header through, version included.
Migration moves inside the header branch, where a version exists to compare
against; without a header the entries are adopted as current-version, which
is the only thing they can mean.
2026-09-03 10:49:41 +02:00
..
agent Merge remote-tracking branch 'origin/main' into dev 2026-09-03 07:58:51 +00:00
ai fix(ai): remove unnecessary Chord dependency 2026-09-03 10:21:43 +02:00
chord fix(chord): make post-cutover reload failures terminal 2026-09-01 16:16:12 +02:00
client feat: consolidate remote service adapters 2026-09-01 10:09:01 +02:00
coding-agent feat(coding-agent): ingest external entries in in-memory sessions (#8980) 2026-09-03 10:49:41 +02:00
evals Release v0.84.4 2026-08-28 23:56:03 +02:00
protocol feat: move service wire semantics into Chord 2026-09-01 00:53:40 +02:00
server feat(ai): preserve Anthropic per-turn thinking effort 2026-09-02 21:39:29 +02:00
session-backends/sqlite-node fix: resolve plugin and conformance tests from source 2026-09-02 20:40:35 +02:00
telemetry Add [Unreleased] section for next cycle 2026-08-28 23:56:06 +02:00
tui feat(tui): render relational algebra join symbols & fix(coding-agent): type error in test (#9050) 2026-09-03 10:45:02 +02:00