flue-eve

Events and Journal

Event translation

The mapper (mapFlueToEve()) converts Flue runtime events to Eve events line-by-line:

Flue eventEve event
agent.startagent.start
agent.messageagent.content.deltamessage.appended
agent.tool_callagent.tool_call
agent.tool_resultagent.tool_result
agent.completeagent.complete
result.completedresult.completed

Connection tool naming

MCP tools from Flue connections are renamed to use the connection__ prefix:

Flue tool: mcp__linear_search_issues
Eve event: tool_call { name: "connection__linear_search" }

This mapping is handled by @flue-eve/connections and the mapper automatically.

HITL and auth events

The mapper handles park/resume cycles:

ScenarioEvents
Human-in-the-loopinput.requested → (client sends inputResponses) → resume
OAuth authorizationauthorization.required → (callback completes) → authorization.granted → resume

Journal

The event journal is the sole owner of streamIndex. Every translated event is appended with an incrementing index. This enables:

  • Replay from any startIndex
  • Consistent reconnection after network drops
  • No Flue Durable Streams offset leakage to Eve clients

How replay works

  1. Client reconnects with ?startIndex=N
  2. Compat-server reads journal entries from index N onward
  3. If tail mode (no startIndex or beyond current journal), server waits for new events
  4. Events are streamed via NDJSON, one per line

Persistence adapters

AdapterUse case
In-memory (default)Dev, tests
SQLiteSingle-node production
FileSingle-node, no SQLite
RedisMulti-node Node.js
Cloudflare KV + DOCloudflare Workers

Configure journal persistence per deployment.

Event catalog

EventWhen emitted
session.startedNew session created
agent.startAgent turn begins
agent.content.deltaStreaming text fragment
message.appendedComplete message state update
agent.tool_callTool invocation started
agent.tool_resultTool result returned
agent.completeAgent turn finished
result.completedStructured result (when outputSchema used)
session.waitingSession ready for next turn (unlocks composer)
session.failedTerminal error
input.requestedHITL — waiting for user input
authorization.requiredOAuth — waiting for connection auth

For the authoritative Flue → Eve event mapping, see eve-to-flue mapping.