|
oc_chat
|
Functions | |
| list[QueueEvent] | queue_history (Registry registry, str plan_id) |
| PlanTimeline | plan_lifecycle (Registry registry, str plan_id) |
| PlanView|None | show_plan (Registry registry, str plan_id) |
| CurrentStatus | current_status (Registry registry) |
| ActorView | whoami (Registry registry, str actor_slot) |
| object | _connect (Registry registry) |
| Mapping[str, object] | _payload (object value) |
| dict[str, object] | _row_dict (object row) |
| str|None | _optional_str (object value) |
| int|None | _optional_int (object value) |
Variables | |
| dict | QUEUE_HISTORY_TYPES |
Read-only registry projection helpers.
Purpose
-------
Expose typed reader libraries for queue history, plan lifecycle, plan
inspection, registry status, and actor identity.
Responsibilities
----------------
- Read current-state and operation-log projections without mutating state.
- Decode canonical JSON payloads into typed dataclass records.
- Keep SQL limited to SELECT statements.
Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
L2 - lifecycle events
L3 - semantic details
L4 - deep tracing
Contracts
---------
- Reader functions never call ``execute_domain_command``.
- Missing plan rows return ``None`` for explicit plan views.
- Unknown actor lookups raise ``UnknownActorError``.
Dependencies
------------
- json (payload decoding)
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.dataclasses (typed read models)
- oc_chat.registry.errors (typed unknown-actor error)
- oc_chat.registry.api (Registry facade whose backend connection the readers query)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| CurrentStatus oc_chat.registry.readers.current_status | ( | Registry | registry | ) |
Return compact registry status counters and active runtime rows.
Definition at line 183 of file readers.py.
| PlanTimeline oc_chat.registry.readers.plan_lifecycle | ( | Registry | registry, |
| str | plan_id ) |
Return typed status and assignment events for ``plan_id``.
Definition at line 104 of file readers.py.
| list[QueueEvent] oc_chat.registry.readers.queue_history | ( | Registry | registry, |
| str | plan_id ) |
Return typed queue history events for ``plan_id``.
Definition at line 75 of file readers.py.
Return the current projected plan row, or ``None`` if absent.
Definition at line 156 of file readers.py.
Return current actor metadata for ``actor_slot``.
Definition at line 224 of file readers.py.
| dict oc_chat.registry.readers.QUEUE_HISTORY_TYPES |
Definition at line 64 of file readers.py.