Jobs and broadcasts
InMemoryJobRegistry
Minimal demo registry:
| Method | Behavior |
|---|---|
createJob() | Allocates jobId, stores queued, emits JobProgressWireEvent. |
setRunning(jobId, percent?) | Marks running, optional percent. |
complete(jobId, result?) | Marks done at 100%. |
fail(jobId, detail?) | Marks failed with optional detail. |
get(jobId) | Read current row. |
Session store
| Function | Description |
|---|---|
sessionCreate(sessionKey?) | Creates UUID session row. |
sessionStep(sessionId, step, payload) | Merges payload into session data. |
resetSessionStore() | Clears all sessions (tests). |
Inspector broadcasts (selected exports)
| Export | When emitted |
|---|---|
broadcast | Generic envelope for custom tooling. |
broadcastJobProgress | Called by InMemoryJobRegistry. |
broadcastReturnResolved | Successful Return path. |
broadcastErrorThrown | Throw or unexpected errors. |
broadcastApiResponse | ApiReturn on HTTP handlers. |
setBroadcastSink / clearBroadcastSink | Redirect inspector traffic to a custom consumer. |
runWithInspectorBroadcastTarget | Run a block with a specific socket/correlation target. |
readInspectorSocketIdFromHeaders | Parse x-socket-id from header maps. |
Prefer transports (startInspectorWebSocket, attachCatRPC) for normal QA wiring — use sinks only for tests or side channels.