Documentation
¶
Overview ¶
Package mcp exposes devbay to coding agents.
This is the primary interface, not a wrapper around the CLI. An agent shelling out and parsing terminal output is lossy in both directions: it has to guess at formatting that changes between versions, and it loses the distinction between "the test failed" and "the command failed". Every tool here returns a typed object.
Written against the 2026-07-28 spec, which changed three things that shape this file:
- The protocol core is stateless. There is no initialize handshake and no session id, so no bay state may be keyed on a connection. Every tool takes an explicit bay name.
- Servers cannot initiate requests. Nothing here calls out to the client; logs are pulled through a tool rather than pushed.
- Custom transports over a reliable byte stream should reuse the stdio framing, which is newline-delimited JSON-RPC. So a unix socket and stdio are the same code path, and the shim binary an agent spawns is a pipe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the devbay tool surface.
func (*Server) ListenUnix ¶
ListenUnix serves on a unix socket until the context is cancelled.
One daemon owns the ports, containers and worktrees for a machine, and many agent sessions connect to it. A socket rather than a per-session process is what makes that possible.