Skip to main content

Crate chio_http_session

Crate chio_http_session 

Source
Expand description

Per-session journal for the Chio runtime.

This crate provides an append-only, hash-chained journal that tracks request history, cumulative data flow (bytes read/written), delegation depth, and tool invocation sequence within a single session.

The journal persists across requests within a session and is available to all guards. Entries are tamper-evident: each entry includes a SHA-256 hash of the previous entry, forming a hash chain.

§Design

  • Append-only: entries can only be added, never modified or removed.
  • Hash-chained: each entry hashes the previous entry’s hash for tamper detection.
  • Thread-safe: the journal is wrapped in a Mutex for safe concurrent access from multiple guards.

Structs§

CumulativeDataFlow
Cumulative data flow statistics for a session.
JournalEntry
A single entry in the session journal.
RecordParams
Parameters for recording a journal entry.
SessionJournal
Thread-safe, append-only, hash-chained session journal.

Enums§

SessionJournalError
Errors produced by the session journal.