Documentation
¶
Overview ¶
Package httpapi is deploy's operator-facing HTTP transport.
The package owns the action, event-stream, and health endpoints: request decoding and validation, same-origin enforcement on every mutation, the response shapes, and the server-sent-event channel the browser client subscribes to. All behavior behind those endpoints is supplied by IBackend, which the embedding core implements.
Callers may rely on Register mounting onto a caller-owned gin.IRouter and on the package serving no path that browserroutes does not name: it never creates an engine, never proxies, and never reaches past IBackend for state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNilBackend = errors.New("httpapi: nil backend")
ErrNilBackend reports an API assembled without its behavior owner.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is Core's action, event, and health transport. It registers onto a caller-owned Gin router and never creates or proxies another router.
type IBackend ¶
type IBackend interface {
webui.ISnapshotProvider
Send(ctx context.Context, prompt string) (string, error)
SendToClaw(ctx context.Context, sessionID, expectedRunID, prompt string, delivery deployv1.HarnessDelivery) (string, error)
Abort(ctx context.Context) error
AbortRun(ctx context.Context, sessionID, runID string) error
ResolveApproval(id, decision string) error
Subscribe() (<-chan struct{}, func())
Health(ctx context.Context) error
}
IBackend is the complete behavior required by the local operator transport.