Expand description
OperatorSessionStore — persistence for Operator login-flow sessions.
One row per minted POST /v1/operators session: the sid / bearer token /
capability manifest / mint time / 記名. This is the record that
lets a single-server restart keep every logged-in Operator logged in —
the sibling stores (task / run / replay / trace / …) already persist,
and RunRecord.operator_sid persists a pointer into this session
space, so leaving the sessions themselves process-volatile stranded
every restored run pin on a 404 unknown sid after restart.
Deliberately not persisted: the WS adapter state (tx sender,
pending oneshot map). Both are process-lifetime objects with no
meaningful serialized form — an empty rebuild on the client’s next WS
connect (the existing reconnect path) is the correct restoration.
Current scope:
InMemoryOperatorSessionStore— process-volatile default.SqliteOperatorSessionStore— file-backed persistence viarusqlite-isle(same shape ascrate::store::task::SqliteTaskStore).
Re-exports§
pub use inmemory::InMemoryOperatorSessionStore;pub use sqlite::SqliteOperatorSessionStore;
Modules§
- inmemory
InMemoryOperatorSessionStore— a process-volatileOperatorSessionStoreused as the default when no store path is configured. Byte-for-byte the pre-persistence behaviour: sessions die with the process.- sqlite
SqliteOperatorSessionStore— SQLite-backedOperatorSessionStoreusing [rusqlite-isle].
Structs§
- Observed
Assignment - One
Assignas the assigned Operator session observed it — the per-entry shape of the 記名’s observed part (model §4.2’s second row: 担当した Run と goal /project_root/work_dir/task_metadata/ 最終活動時刻). - Operator
Session Record - One persisted Operator login-flow session.
Enums§
- Operator
Session Store Error - Errors surfaced by an
OperatorSessionStoreimplementation.
Constants§
- OBSERVED_
CAP - How many
ObservedAssignmententries one session retains. - OBSERVED_
TEXT_ MAX_ BYTES - Byte ceiling for each of the three caller-supplied strings on an
ObservedAssignment—goal,project_rootandwork_dir. - OPERATOR_
SESSION_ MAX_ IDLE_ SECS - How long a session may go unaccessed before it expires — the second
exit from
Registeredin model §4.1’s state diagram (Registered ── 最終アクセスから 24h ──▶ ╳ 削除), in seconds. - TASK_
METADATA_ MAX_ BYTES - Serialized-size ceiling for a recorded
ObservedAssignment::task_metadata.
Traits§
- Operator
Session Store - Persistence interface for Operator login-flow sessions.