Expand description
Local sessions across every harness.
The seven operations, in terms of this module:
| op | call |
|---|---|
| list | discover |
| read | Session::read |
| write | write() |
| open | resume_command (caller execs it) |
| translate | Session::read + write() |
| continue | Session::read + write() + resume_command |
| delete | Session::delete |
Everything here uses each harness’s default on-disk location. For custom
roots, use the per-harness Stores directly.
Structs§
- Session
- One session found on this machine.
- Write
Opts - Optional knobs for
write_with. - Written
- The outcome of
write(): the id the target harness resumes by, and a human-readable location.
Functions§
- discover
- Every local session, newest first. Unreadable stores and sessions are skipped.
- discover_
harness - Discover one harness, surfacing remote errors when a live source is explicitly requested. Other harnesses retain the tolerant aggregate scan.
- discover_
scoped - The sessions a
--fromselection names: every local harness whenfromisNone, else that one harness. This is the only path that reaches a live web source, and only when it is named explicitly — an omittedfromnever contacts either one. - discover_
with discover, reporting progress:on_store(harness, sessions_so_far)is called before each store is scanned.- fingerprints
- Per-session change cursors, positionally aligned with
sessions— the batched form ofStore::fingerprintsacross every harness, for callers that cache parsed transcripts and want to know which ones to re-read. A cursor is an opaque string that changes whenever the session’s backing data does; an empty string means the backend could not establish one, and a cache should treat the session as changed. - resume_
command - The command that resumes session
idinharness—(binary, args), for the caller to exec or spawn. Overridable per harness withTRANSCRIPT_<HARNESS>_RESUME_CMD, a template where{id}is substituted (e.g.TRANSCRIPT_CODEX_RESUME_CMD="codex resume {id}"). - write
- Persist a canonical transcript in
target’s native, resumable format.rootoverrides the harness’s default on-disk root (file-backed stores only;OpenCodealways goes throughopencode importinto the live database, so a root override for it is refused rather than silently redirected). - write_
with - [
write] with optional harness-specificWriteOpts::metadata.