Skip to main content

Crate stoa_capture

Crate stoa_capture 

Source
Expand description

Stoa capture worker (transcript drain + PII redaction).

See [ARCHITECTURE.md §7 “Capture pipeline (the hot path)”] for the worker semantics and [ARCHITECTURE.md §10 “Redaction filter”] for the pattern catalogue.

The capture worker:

  1. Claims one row from .stoa/queue.db with a lease.
  2. Reads the source session JSONL referenced by the payload.
  3. Runs the Redactor line-by-line.
  4. Writes the redacted output to sessions/<session_id>.jsonl.
  5. Appends an entry to .stoa/audit.log.
  6. Marks the queue row done.

Structs§

DrainResult
Side-effect record returned by drain_once on success.
Redactor
Compiled redactor with a fixed pattern set.
WorkerConfig
Paths the worker needs to do its job.

Enums§

Error
Errors emitted by the capture worker.

Functions§

drain_once
Drain one queue row from a freshly opened queue. Returns None on an empty queue.
drain_once_with
Drain one queue row using a caller-provided Queue. Returns None on an empty queue.

Type Aliases§

Result
Convenience Result alias.