Documentation
¶
Overview ¶
Package approval obtains human confirmation for write tools, either via MCP elicitation inside the client or via a browser approval page.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestartURL ¶
RestartURL returns the link that requests approval to restart a workload. It holds no secret and changes nothing until a signed-in person approves.
Types ¶
type BrowserAuth ¶
type BrowserAuth interface {
RequireUser(next func(w http.ResponseWriter, r *http.Request, subject string)) http.Handler
}
BrowserAuth signs a person in for the approval page. Implemented by oauth.Server.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements tool.Confirmer.
func New ¶
New returns a Manager. browser may be nil, which disables web approval. publicURL is the origin used to build approval links.
func (*Manager) Confirm ¶
func (m *Manager) Confirm(ctx context.Context, req *mcp.CallToolRequest, r tool.ConfirmRequest) (method string, err error)
Confirm implements tool.Confirmer.