Skip to main content

Module bridge

Module bridge 

Source
Expand description

IDE bridge protocol.

HTTP server that allows IDE extensions (VS Code, JetBrains, etc.) to communicate with the running agent. The bridge exposes endpoints for sending messages, reading conversation state, and streaming events.

§Protocol

  • POST /message — send a user message to the agent
  • GET /messages — retrieve conversation history
  • GET /status — agent status (idle/active, model, session)
  • GET /events — SSE stream of real-time events

The bridge runs on localhost with a random high port. The port is written to a lock file so IDE extensions can discover it.

Structs§

BridgeInstance
A discovered running bridge instance.
BridgeMessageRequest
Message request body for POST /message.
BridgeState
Bridge server state shared across request handlers.
BridgeStatus
Status response returned by GET /status.

Functions§

discover_bridges
Discover running bridge instances by scanning lock files.
remove_lock_file
Remove the bridge lock file on shutdown.
write_lock_file
Write the bridge lock file so IDE extensions can find us.