Overview of the `bd serve` v0 HTTP surface
mainThe bd serve command provides an HTTP interface for the Beads issue tracker, designed for automation clients and orchestrators. It avoids the overhead of spawning a new bd subprocess for every call and provides a structured wire contract instead of parsing stdout text.
Key Characteristics
- Base Path: All operations reside under
/v0(except liveness checks). - Liveness:
GET /healthzandGET /v0/beads/contextare available for health checks and identity. These do not touch the database and carrybypassSemaphore. - Capabilities: Clients should probe
GET /v0/beads/contextto discover supported operations via thecapabilitiesfield. This list is derived directly from registered handlers to ensure accuracy. - Data Consistency: Response bodies marshal
internal/typesvalues directly. This means the HTTP contract is strictly tied to the internal types; renaming or removing fields in the core types will break the API. - Write Posture: Writes use either custom methods (e.g.,
:claim,:close,:add) or standard CRUD methods (PATCH,POST,DELETE). All writes follow a specific posture: theactoris caller-asserted provenance (not authenticated identity), hooks do not fire, and auto-commit machinery does not run. Durability is guaranteed by a single storage commit per request within the role's transaction.