mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
1.9 KiB
1.9 KiB
05.3 — DomainEvent & AgentProgress as projections
DomainEvent (core event bus) and AgentProgress (UI vocabulary) stay —
as compatibility projections fed from crate events, never as primary state.
Steps
- Catalog current agent-domain
DomainEventpublishers/subscribers (agent/bus.rs, triage, task_dispatcher, orchestration background_delivery/run_ledger_finalize). Current high-volume lifecycle publishers still includeAgent::run_single,SpawnSubagentTool::execute,ContinueSubagentTool::execute,dispatch_subagent,project_spawn_parallel_spawned, andproject_spawn_parallel_result.RunLedgerFinalizeSubscriber::handleremains a real global-bus subscriber: it consumesSubagentCompleted/SubagentFailedas authoritative detached-run terminal signals until journal/status-store replay covers those paths. For each event that mirrors a crateAgentEvent/GraphEvent, source it from the journal/bridge. Events with no crate analogue (triage decisions, channel routing) stay native DomainEvents — they are product semantics. agent/bus.rsnative handleragent.run_turnstays (transport into the turn), but its progress mirroring moves to the bridge. Current live bridge symbols areOpenhumanEventBridge::on_eventplusThinkingForwarderfor the non-streaming/tool-argument gaps that do not yet have crate event parity.- Document the rule in
core/event_busREADME: new agent-run telemetry reads crate events/status first; DomainEvent is for cross-domain product signals. - Do NOT remove
DomainEventvariants until every subscriber is re-pointed (spec non-goal) — track per-variant status in this file as work lands.
Deletions
- Duplicate mirroring blocks identified in step 1 (list them here when cataloged).
Acceptance
- Existing subscribers receive identical DomainEvents (bus tests).
- New run-inspection RPCs read journals/status, not the bus.