<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pantograph.git/libpanto/src/session_store.zig, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://code.tjp.lol/pantograph.git/atom?h=main</id>
<link rel='self' href='https://code.tjp.lol/pantograph.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/'/>
<updated>2026-07-07T18:15:28Z</updated>
<entry>
<title>Move libpanto projects to libpantograph dependency</title>
<updated>2026-07-07T18:15:28Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-07-07T17:29:23Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/commit/?id=621d7fee0ace729f8d44126032d2c6e13f72ee7f'/>
<id>urn:sha1:621d7fee0ace729f8d44126032d2c6e13f72ee7f</id>
<content type='text'>
Remove the in-repo libpanto sources and binding projects from pantograph.
Consume libpantograph through the Zig package URL at
code.tjp.lol/libpantograph.git, including the Lua module artifact used by
CLI extensions.
</content>
</entry>
<entry>
<title>R2: redesign session store with wire-format identity</title>
<updated>2026-06-07T17:35:49Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-06-07T17:35:49Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/commit/?id=b14859b9726185ab873356390068e887b7f486d3'/>
<id>urn:sha1:b14859b9726185ab873356390068e887b7f486d3</id>
<content type='text'>
Replace the single-session SessionManager seam with a directory-backed
catalog. session_manager.zig -&gt; file_system_jsonl_store.zig; the old
machinery becomes internal SessionFile, and a new FileSystemJSONLStore
implements the redesigned SessionStore vtable (create/list/resolve/latest/
load/appendMessages) minting Session/SessionInfo handles.

Session logs now record wire-format provider identity
({api_style, base_url, model, reasoning}) instead of a single provider
string or CLI aliases; no api_key material is ever stored. Disk* content
types renamed Stored*; the rich audit-oriented write record is
PersistentMessage (in-memory Message + WireIdentity + provenance).

Agent.init now takes a Session; persist_provider/persist_model display
strings deleted (banner stays alias-based, resume picks default model).
Message.metadata round-trips. Dangling-prompt recovery dropped. CLI
migrated to the catalog store for run/resume/list. Clean break, no version
bump (old logs wiped).
</content>
</entry>
<entry>
<title>Move session persistence into the Agent; collapse CLI plumbing</title>
<updated>2026-06-05T17:43:43Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-06-05T17:43:29Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/commit/?id=ccdaef8e682960ecadf73d3b2df70559a0baaf56'/>
<id>urn:sha1:ccdaef8e682960ecadf73d3b2df70559a0baaf56</id>
<content type='text'>
The Agent now owns its Conversation and a SessionStore, and persists
everything it generates as turns progress. Embedders get persistence for
free; the CLI no longer drives the session log.

libpanto:
- Agent.init takes a SessionStore + optional Conversation to adopt (resume
  path). Agent owns/tears down the conversation; turn-driving methods drop
  the *Conversation param and operate on self.conversation.
- New Agent methods: submitUserMessage (adds+persists the user prompt
  immediately), addSystemMessage(text, mode), runStep persists the turn on
  every exit path (incl. partial turns on error), compactAndPersist for the
  explicit /compact path. Auto-compaction persists its window via runStep's
  tail.
- turn_persist.zig: DiskMessage mapping moved out of the CLI; reads usage
  off Message.usage (no per-message-usage list). System mode rides on
  DiskMessage.mode, derived from the System block.
- NullStore is now an allocator-bearing struct (frees consumed messages per
  the store-consumes-messages contract).
- Tests: in-memory CapturingStore round-trip + NullStore turn test.

panto CLI:
- Delete src/session_persist.zig. REPL is submitUserMessage + runStep.
- Reorder construction: store -&gt; registry -&gt; agent -&gt; bootstrap -&gt; seed/
  reconcile system prompt through the agent -&gt; load extensions.
- command.Context drops conv/session_mgr; commands reach ctx.agent.
- system_prompt seed/reconcile call agent.addSystemMessage.
- CLIReceiver is display-only (per_message_usage removed).

Phases 3-5 of docs/pluggable-session-store.md. Behavior preserved; full
build + test suite green.
</content>
</entry>
<entry>
<title>Add pluggable SessionStore interface with FSJSONL + Null backends</title>
<updated>2026-06-05T17:27:43Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-06-05T17:27:33Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/commit/?id=03ac69658517a0054d2a573d1e1b60c1bfaaf977'/>
<id>urn:sha1:03ac69658517a0054d2a573d1e1b60c1bfaaf977</id>
<content type='text'>
Introduce a neutral persistence seam (session_store.zig) following the
{ptr, vtable} shape of the other libpanto seams. The interface traffics in
DiskMessage so non-JSONL backends (e.g. Postgres) can implement it.

- session_store.zig: SessionStore vtable (appendMessages, loadConversation,
  sessionId, activeModel), LoadedSession{conversation, dangling_user},
  re-exported disk types, and an FSJSONLStore alias.
- session_manager.zig: add store() wrapper + loadConversation() with
  dangling trailing-user detection (excluded from the rebuilt conversation,
  returned as dangling_user).
- null_store.zig: no-op backend, stateless singleton.
- root.zig: export session_store + null_store.

Phase 1+2 of docs/pluggable-session-store.md. Behavior-preserving; CLI not
yet rewired.
</content>
</entry>
</feed>
