Documentation
¶
Overview ¶
Package httpapi exposes the gateway over HTTP.
Operations are registered with Huma (net/http ServeMux underneath); the OpenAPI 3.1 document is generated from their Go types, served at /openapi.yaml and rendered at /docs. Routes are versioned under /v1. Every route except probes and the docs requires the bearer token when one is configured. Errors are RFC 9457 problem details with a stable code and the request ID (X-Request-ID, accepted from the client or created). Successful responses carry the resource itself; lists are {items, next_cursor}.
Streaming: a run's event log can be read as Server-Sent Events (GET /v1/runs/{id}/events, resumable with Last-Event-ID) or over a WebSocket (GET /v1/runs/{id}/ws) that also accepts control messages. Both are readers of the same log (see package run).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControlPath ¶
type FilePath ¶
type FilePath struct {
WorkspacePath
Path string `path:"path" doc:"Slash-separated path inside the workspace." example:"src/main.go"`
}
type PageInput ¶
type PageInput struct {
Cursor string `query:"cursor" doc:"next_cursor of the previous page, with the same filters. Omit for the first page."`
}
PageInput selects a page of a list.
type PermissionPath ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the dependencies shared by all handlers.
func New ¶
func New(base context.Context, cfg config.Config, a agent.Agent, logger *slog.Logger) (*Server, error)
New returns a Server for one agent. Cancelling base cancels every running run (used on shutdown).
type SessionPath ¶
type SessionPath struct {
SessionID string `path:"session_id" format:"uuid"`
}
type WorkspacePath ¶
type WorkspacePath struct {
WorkspaceID string `path:"workspace_id" doc:"32 lowercase hex characters." example:"0123456789abcdef0123456789abcdef"`
}