Documentation
¶
Overview ¶
Package node exposes a Fort's local runtime over HTTP so another Fort — the control plane — can dispatch runs to this machine (spec 022). It depends only on core/runtime (the interface); cmd/fort injects the concrete native runtime.
The wire protocol is deliberately small:
POST /api/exec body: RunSpec JSON
-> application/x-ndjson: one RunEvent per line,
flushed live, until a terminal exited/error, EOF.
POST /api/exec/{id}/signal body: raw input -> HITL stdin injection
POST /api/exec/{id}/cancel -> cancel a running remote run
Every route requires "Authorization: Bearer <token>" (constant-time compared): the endpoint runs arbitrary agent CLIs, so it is never left unauthenticated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityRegistry ¶ added in v0.13.0
type CapabilityRegistry interface {
Current() corecap.NodeInventory
Refresh(context.Context, corecap.RecheckRequest) (corecap.NodeInventory, error)
}
CapabilityRegistry is the bounded discovery seam mounted only by a capability-aware node. Its absence intentionally leaves the new routes 404, so a coordinator can distinguish an old node from an empty inventory.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the inter-Fort execution endpoint over an injected runtime.
func New ¶
New builds a node server over rt. token is read fresh on every request, so the endpoint accepts requests as soon as a token exists — even if it is minted after the server is already mounted (e.g. a mesh invite writing the token into a running daemon). An empty token disables the endpoint (403).
func (*Server) UseCapabilities ¶ added in v0.13.0
func (s *Server) UseCapabilities(registry CapabilityRegistry)
UseCapabilities enables the versioned mesh capability endpoints. Call it before Register.