Skip to main content

ADR 0003: Local Typed Event Bus


Context​

Agent, Queue, Send, Follow-ups, Timeline, Scheduler, and UI need loose coupling while preserving inspectability and egress audit. Remote event streaming of career data would violate privacy-as-architecture. Polling everything from the UI would create a cockpit, not a calm OS.

Alternatives considered:

OptionProsCons
In-process typed bus + durable subsetLocal, testable, audit-friendlyNeed discipline on payload PII
Redux-only UI stateFamiliar for UIDoesn’t span host domain well
Cloud event pipelineScale multi-deviceNon-goal; privacy defect
Ad-hoc callbacksFast earlyTangled boundaries; agent→send risk

Decision​

Adopt a local, typed domain event bus owned by packages/events, running in the host.

  • Event names follow Domain.Action (see event catalog).
  • High-volume payloads carry IDs/counts — not résumé bodies.
  • Durable subset (egress, approvals, pause, preference changes) lands in Timeline storage.
  • UI subscribes via IPC and batches progress for calm toasts/status.
  • Events never stream career payloads to a JobJitsu cloud by default.

Consequences​

Positive​

  • Enforces package decoupling; Agent can progress without calling Send.
  • Natural feed for Timeline “what left / what stayed.”
  • Matches notification batching and calm UX.

Negative / tradeoffs​

  • Schema evolution requires versioned event contracts.
  • Over-publishing progress events can still spam UI if batching is skipped.

Follow-ups​

  • Contract tests for egress events and PII minimization (ADR 0007).
  • Document plugin event subscription capabilities in plugin ADR.