Skip to main content

Module storage

Module storage 

Source

Structs§

ApprovalRecord
ApprovalsRepo
CheckpointRecord
CheckpointsRepo
CompactionRecord
CompactionsRepo
MessageRecord
MessagesRepo
NewApproval
NewCheckpoint
NewCompaction
NewMessage
NewOutcome
NewPluginInstall
NewProcess
NewProviderProbe
NewSession
NewTask
NewToolRun
OutcomeRecord
A verifiable outcome / reward signal attached to a trajectory (a task, and optionally a specific tool run). The other durable tables record what happened (messages, tool_runs, checkpoints=diffs); outcomes records how good it was and who says so (source) — the enrichment that turns logs into a training set for the self-improving loop.
OutcomesRepo
PairingTokenRecord
PairingTokensRepo
PluginInstallRecord
PluginsRepo
ProcessRecord
ProcessesRepo
ProviderProbeRecord
ProviderProbesRepo
RuntimeStore
SQLite-backed durable runtime state.
SessionRecord
SessionsRepo
TaskRecord
TaskTimelineEvent
TasksRepo
ToolRunRecord
ToolRunsRepo

Enums§

ProcessStatus
TaskPriority
TaskStatus
Durable task state. A task is the daemon-level work unit; a chat transcript is just one artifact linked to it.

Constants§

OUTCOME_LABEL_ACCEPTED
OUTCOME_LABEL_FAILURE
OUTCOME_LABEL_PARTIAL
OUTCOME_LABEL_REJECTED
OUTCOME_LABEL_SUCCESS
Graded result of an outcome. Stored as free-form TEXT (like tool_runs.status) so the taxonomy can grow without a migration; these constants are the canonical spellings so callers don’t drift.
OUTCOME_LABEL_UNKNOWN
OUTCOME_SOURCE_MODEL
OUTCOME_SOURCE_SYSTEM
OUTCOME_SOURCE_USER
OUTCOME_SOURCE_VERIFIER
Provenance of an OutcomeRecord — the axis that separates a genuine external training signal from model self-judgement. verifier (compiler, tests, runtime) and user (human edit/accept/reject) are the signals that can actually improve a model; model is self-judged and must never be trained on unfiltered; system is bookkeeping (e.g. a task’s terminal status).

Functions§

data_dir
try_exclusive_lock
Acquire an exclusive, auto-released advisory lock on path — a process singleton guard for the daemon (#131). Returns the held File on success (keep it alive to hold the lock), or None if another process already holds it. flock releases automatically when the file is dropped OR the process exits/crashes, so a dead holder never wedges the lock the way an O_EXCL pidfile would. Holding it across the socket probe → unlink → bind closes that TOCTOU: two daemons can’t both decide a stale socket is theirs to rebind.