End-to-end orchestrator demo
Runs every orchestrator surface against in-memory stores and the MockLlmProvider so the full v0 flow is visible top to bottom. The DB-backed equivalent will share these interfaces and exit points.
1. Launch
oklaunchInvestigation passes the refusal classifier, transitions draft → active, dispatches the opening message.
{ "investigationId": "inv-1", "status": "active", "dispatched": 1 }2. Inbound participant message
okhandleInboundMessage appends the turn, primes the debounce machine, audits interview.turn.inbound.
{ "turnId": "turn-cited" }3. Process debounced batch
okprocessDebouncedBatch waits for the 60s window, gates working hours + attention budget, calls the LLM, dispatches on Teams, persists the outbound turn.
{ "outboundActivityId": "mock-activity-2", "promptTokens": 76, "completionTokens": 32 }4. Run synthesis
okrunSynthesis transitions active → synthesis, calls LlmProvider.synthesizeFindings, persists FindingRow entries with citations.
{ "findingCount": 1, "tokens": 530 }5. Produce report draft
okproduceReportDraft transitions synthesis → report_draft.
{ "investigationId": "inv-1" }6. Finalize report
okfinalizeReport runs the anonymity scan and citation scan; both must pass to transition report_draft → closed.
{ "publishedAt": "2026-05-11T16:06:10.000Z" }