Documentation
¶
Overview ¶
Package agent joins the tunnel to the tool plane: it accepts channels the SaaS opens and serves the ones it is willing to serve.
This is where the pieces meet, and where the claim they exist to support has to hold — that a compromised or prompt-injected SaaS can at worst read. The protocol makes an address unrepresentable, the sandbox makes a tool call read-only, and this package must not become the place either stops being true.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
Tools *toolplane.Registry
// Console serves the human plane. Nil refuses every console channel,
// which is the right default: an agent with no node identity configured
// must not guess which node it is.
Console *console.Handler
// Web serves web channels. Nil refuses them, which is the default: a node
// exposes no web target until one is configured.
Web *console.WebHandler
// CallTimeout bounds one tool call end to end. Zero uses the default.
CallTimeout time.Duration
}
Server serves channels for one session.
func (*Server) Serve ¶
Serve accepts channels until the session ends or ctx is cancelled.
Each channel is handled in its own goroutine: a tool that hangs must not stall the accept loop, or one slow call would block every other channel on the connection — including the console channels a human is waiting on.