Expand description
oino-session: session format v3 for Oino.
Session files are JSONL: a "type":"session" header followed by tree entries linked by
id/parentId. This crate owns the line types, LLM conversion of coding-agent messages,
the pure context-building rules, migration (v1/v2 and pre-v1 Oino files) and — behind
the default manager feature — the synchronous SessionManager (D20). Without
manager the crate is pure and builds for wasm32-wasip2.
§API map
| Module | Contents |
|---|---|
entry | SessionHeader, SessionEntry, EntryKind, EntryId, IsoTimestamp, FileLine |
messages | convert_to_llm, summary prefixes, bashExecutionToText |
context | EntryIndex, SessionProjection, SessionContext |
migrate | migrate::detect, migrate::parse_session_text, legacy Oino mapping |
manager (feature) | SessionManager, listing, ReadonlySession |
time | ISO formatting/parsing |
Files live at <sessions root>/--<cwd>--/<ts>_<sessionId>.jsonl and are append-only; a
file is created only once the first user or assistant message exists.
Re-exports§
pub use context::BranchSelection;pub use context::EntryIndex;pub use context::ModelRef;pub use context::ProjectedEntry;pub use context::SessionContext;pub use context::SessionProjection;pub use context::branch_selection;pub use context::build_context_entries;pub use context::build_session_context;pub use context::build_session_projection;pub use context::entry_to_context_messages;pub use context::latest_compaction;pub use context::path_to;pub use entry::BranchSummaryEntry;pub use entry::CURRENT_SESSION_VERSION;pub use entry::CompactionEntry;pub use entry::ContextReplacement;pub use entry::EditableContent;pub use entry::EntryId;pub use entry::EntryKind;pub use entry::FileLine;pub use entry::IsoTimestamp;pub use entry::SessionEntry;pub use entry::SessionHeader;pub use manager::BranchSummaryDraft;pub use manager::CompactionDraft;pub use manager::CreateOptions;pub use manager::INTERRUPTED_TOOL_TEXT;pub use manager::LeaseInfo;pub use manager::MigratedSession;pub use manager::ProgressSink;pub use manager::RESUME_REPAIR_TYPE;pub use manager::ReadonlySession;pub use manager::RepairReport;pub use manager::SessionInfo;pub use manager::SessionLease;pub use manager::SessionManager;pub use manager::SessionTreeNode;pub use manager::TOOL_DISPATCH_TYPE;pub use manager::TakeoverRequest;pub use manager::clear_takeover_request;pub use manager::lock_file_path;pub use manager::lock_metadata_path;pub use manager::read_takeover_request;pub use manager::takeover_path;pub use manager::write_takeover_request;pub use messages::BRANCH_SUMMARY_PREFIX;pub use messages::BRANCH_SUMMARY_SUFFIX;pub use messages::COMPACTION_SUMMARY_PREFIX;pub use messages::COMPACTION_SUMMARY_SUFFIX;pub use messages::convert_to_llm;pub use migrate::FileFormat;pub use migrate::MigrationWarning;
Modules§
- context
- Context building and projection (
buildContextEntries,buildSessionProjection,buildSessionContext). Pure functions over anEntryIndex. - entry
- Session v3 line types:
SessionHeader,SessionEntryandEntryKind. - manager
SessionManager: append-only session tree persistence (session format v3, D20).- messages
- Coding-agent message helpers: LLM conversion and summary wrappers.
- migrate
- Format detection, parsing and migration to v3.
- time
- ISO-8601 timestamps exactly like JavaScript
Date#toISOString(UTC, milliseconds,Z).
Enums§
- Session
Error - Errors raised by parsing, migration and
crate::SessionManageroperations. - Session
Lock Error - Failure of acquiring the single-writer session lease (D-LOCK, spec core.md §2.1).