Architecture
The boundary between the host application, Convex chat projection, and Eve runtime.
Application clients
│
▼
Host Convex functions ─ authentication, authorization, product policy
│
▼
convex-eve component ─ threads, pending messages, EveMessage projections
│
▼
Eve session API ─ fixed session ID and ordered event stream
│
▼
Eve harness ─ model loop, skills, tools, subagents, sandbox, workflowSources of truth
Eve is authoritative for agent execution, model history, authored state, and its ordered session event stream. Convex is authoritative for application scope, its thread catalogue, pending delivery state, and the application-facing materialized view. The host remains authoritative for users, permissions, product data, and business policy.
The bridge never turns the Convex mirror into an alternate Eve workflow journal.
Delivery model
- The host saves the application thread and pending user message before calling Eve.
- A host action creates or attaches to one fixed Eve session.
- Eve create-once operation IDs make new-session retries idempotent.
- One delivery can dispatch per session generation at a time.
- Eve's
conversationOfsupplies canonical message and part semantics in the host. - The host replays from line zero and emits cumulative snapshots at complete v27 lines.
- Projection writes and cursor advancement commit together.
- Only sanitized message projections, receipt IDs, and checkpoint coordinates are persisted. Raw events and opaque session views stay in host memory.
The component keys checkpoints by (eveSessionId, line, index). The saved
nextStreamIndex counts source lines. A stale checkpoint cannot overwrite a
newer projection. Each snapshot covers the whole conversation, so it can also
advance over source lines that contain no recognized events.
A native delivery ID binds the pending message to its Eve receipt. An unrelated
control receipt cannot accept that message. The matching delivery.settled
outcome accepts or fails the pending send, including an awaiting-input pause.
An ambiguous follow-up send enters the unknown state and blocks later sends.
The example performs bounded catch-up reads with backoff. Durable worker leases,
retry limits, answer recovery, and long-session retention remain future work.