<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pantograph.git/libpanto/src/turn_persist.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>libpanto fixes</title>
<updated>2026-06-19T20:55:35Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-06-19T20:53:03Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/commit/?id=81ddb61dcfcc9bc85585f262bf303e1a9da507b0'/>
<id>urn:sha1:81ddb61dcfcc9bc85585f262bf303e1a9da507b0</id>
<content type='text'>
- ensuring stream.next() sequences are interruptible
- Agent.run() takes any user message, not just chat text
</content>
</entry>
<entry>
<title>preserve signature origins across compactions</title>
<updated>2026-06-18T20:16:24Z</updated>
<author>
<name>t</name>
<email>t@tjp.lol</email>
</author>
<published>2026-06-18T20:15:55Z</published>
<link rel='alternate' type='text/html' href='https://code.tjp.lol/pantograph.git/commit/?id=270cd00129551647e7c764a13836e03e0b2dc4e2'/>
<id>urn:sha1:270cd00129551647e7c764a13836e03e0b2dc4e2</id>
<content type='text'>
</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>
</feed>
