Documentation
¶
Index ¶
- Variables
- func AttachWingIO(ctx context.Context, dir, clientName, session string, input io.Reader, ...) (bool, error)
- func BrowserSessionControl(version string, ctx context.Context, cfg *config.Config, wc *config.WingConfig, ...) (map[string]any, error)
- func CallLocalWingTool(ctx context.Context, dir, clientName, name string, arguments json.RawMessage) (map[string]any, error)
- func ConversationBrokerStatus(cfg *config.Config, session string) (map[string]any, error)
- func GrantSet(grants []string) map[string]bool
- func InheritConversationExecution(cfg *config.Config, source, target string) error
- func LifecycleResult(view egg.SessionView) map[string]any
- func ListenLocalWingControl(ctx context.Context, version string, sessions *wingsession.Service, ...) (*controlsocket.Server, error)
- func LoadLocalMCPClientsConfig(cfg *config.Config) (localMCPClientsConfig, error)
- func PrepareConversationResumeMCP(version string, cfg *config.Config, wc *config.WingConfig, start ws.PTYStart, ...) ([]string, string, error)
- func ResolveWorkingDirectory(cwd string) (string, error)
- func RoostNativeMCPTools(version string, cfg *config.Config, sharedHost bool, ...) []mcppkg.NativeTool
- func RoostNativeMCPToolsWithSessions(version string, cfg *config.Config, sharedHost bool, ...) []mcppkg.NativeTool
- func RunConversationBroker(version string, ctx context.Context, cfg *config.Config, session string, ...) error
- func RunConversationWakeController(version string, ctx context.Context, cfg *config.Config, ...)
- func ServeConversationMailboxClient(ctx context.Context, in io.Reader, out io.Writer, ...) error
- func ServeDirectMCPChannelWithPolicySource(version string, cfg *config.Config, home string, sharedHost bool, ...)
- func ServeLocalWingClient(ctx context.Context, version, dir, clientName, conversation string, ...) error
- func ServeRememberedWingClient(ctx context.Context, version, dir, clientName string, unsandboxed bool, ...) error
- func ValidateBoundConversation(s *Server) error
- func ValidateDirectMCPGrantConfig(wingCfg *config.WingConfig) error
- type AdmissionState
- type BrowserLaunchConfig
- type ConnectMCPServer
- type LocalMCPTool
- type Server
- func (s *Server) AgentWaitAny(ctx context.Context, arguments json.RawMessage) (map[string]any, error)
- func (s *Server) Serve(ctx context.Context) error
- func (s *Server) ToolConversationList(arguments json.RawMessage) (map[string]any, error)
- func (s *Server) ToolConversationRead(ctx context.Context, arguments json.RawMessage) (map[string]any, error)
- func (s *Server) ToolConversationWake(arguments json.RawMessage) (map[string]any, error)
- func (s *Server) ToolSessionFork(ctx context.Context, arguments json.RawMessage) (map[string]any, error)
- func (s *Server) ToolTerminalList(ctx context.Context, arguments json.RawMessage) (map[string]any, error)
- func (s *Server) ToolTerminalRename(ctx context.Context, arguments json.RawMessage) (map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
var ErrConversationBrokerRunning = errors.New("host mailbox broker already running for this execution")
Functions ¶
func AttachWingIO ¶ added in v0.149.0
func AttachWingIO(ctx context.Context, dir, clientName, session string, input io.Reader, output io.Writer, options egg.AttachOptions) (bool, error)
AttachWingIO only presents a stream; the wing resolves identity and sessions.
func BrowserSessionControl ¶
func BrowserSessionControl(version string, ctx context.Context, cfg *config.Config, wc *config.WingConfig, req ws.TunnelRequest, operation string, arguments json.RawMessage, home string, sharedHost bool, launchConfig ...BrowserLaunchConfig) (map[string]any, error)
browserSessionControl is a narrow adapter over the same typed MCP handlers. Authentication/passkey/purpose checks occur before this dispatcher; artifact access is checked independently before selecting a legacy session principal.
func CallLocalWingTool ¶ added in v0.149.0
func CallLocalWingTool(ctx context.Context, dir, clientName, name string, arguments json.RawMessage) (map[string]any, error)
CallLocalWingTool also lets CLI helpers use the wing's authority and runtime.
func LifecycleResult ¶
func LifecycleResult(view egg.SessionView) map[string]any
func ListenLocalWingControl ¶ added in v0.149.0
func ListenLocalWingControl(ctx context.Context, version string, sessions *wingsession.Service, ownerUserID string, admission *AdmissionState) (*controlsocket.Server, error)
ListenLocalWingControl is called only by the personal wing, independently of its relay connection. The owner comes from durable local state, never IPC.
func PrepareConversationResumeMCP ¶
func PrepareConversationResumeMCP(version string, cfg *config.Config, wc *config.WingConfig, start ws.PTYStart, eggCfg *egg.EggConfig, sharedHost bool) ([]string, string, error)
Called only after prepareBrowserResume has verified the source owner, provider identity and current workspace policy.
func ResolveWorkingDirectory ¶
func RoostNativeMCPTools ¶
func RoostNativeMCPTools(version string, cfg *config.Config, sharedHost bool, sources ...func() (*config.WingConfig, *egg.EggConfig)) []mcppkg.NativeTool
roostNativeMCPTools adapts the local typed control surface to authenticated Streamable HTTP MCP. The request principal is supplied by the roost after bearer-token verification and never accepted from tool arguments.
func RoostNativeMCPToolsWithSessions ¶ added in v0.149.0
func RoostNativeMCPToolsWithSessions(version string, cfg *config.Config, sharedHost bool, sessionSource func() *wingsession.Service, sources ...func() (*config.WingConfig, *egg.EggConfig)) []mcppkg.NativeTool
func RunConversationBroker ¶
func RunConversationWakeController ¶
func RunConversationWakeController(version string, ctx context.Context, cfg *config.Config, policy func() (*config.WingConfig, bool), sessions *wingsession.Service, ownerUserID string)
Started by the existing host wing daemon. No provider process, credentials, grants, permission replies, or new transport listeners are created here.
func ServeConversationMailboxClient ¶
func ServeConversationMailboxClient(ctx context.Context, in io.Reader, out io.Writer, dir, conversation, session string) error
serveConversationMailboxClient is `wt mcp stdio --host-mailbox`. It needs no Wingthing state access: it forwards each MCP request to the host broker and writes back the broker's response with the caller's JSON-RPC ID.
func ServeDirectMCPChannelWithPolicySource ¶
func ServeDirectMCPChannelWithPolicySource(version string, cfg *config.Config, home string, sharedHost bool, admission *AdmissionState, identity webrtcpkg.PeerIdentity, dc *pionwebrtc.DataChannel, policySource func() (*config.WingConfig, []config.AllowKey), eggSources ...func() *egg.EggConfig)
func ServeLocalWingClient ¶ added in v0.149.0
func ServeLocalWingClient(ctx context.Context, version, dir, clientName, conversation string, unsandboxed bool, in io.Reader, out io.Writer) error
ServeLocalWingClient owns only the MCP transport. All authority and execution belong to the independently running wing selected by its state directory.
func ServeRememberedWingClient ¶ added in v0.149.0
func ServeRememberedWingClient(ctx context.Context, version, dir, clientName string, unsandboxed bool, timeout time.Duration, in io.Reader, out io.Writer) error
ServeRememberedWingClient is a thin stdio adapter. SSH keys and the connection pool remain in the independently running local wing.
func ValidateDirectMCPGrantConfig ¶
func ValidateDirectMCPGrantConfig(wingCfg *config.WingConfig) error
Types ¶
type AdmissionState ¶
type AdmissionState struct {
Sessions *wingsession.Service
// contains filtered or unexported fields
}
mcpAdmissionState keeps process-local spawn admission shared across reconnecting remote MCP clients. The filesystem-backed max-sessions check is also serialized by this lock, so two data channels cannot race through the final available slot. This remains a guardrail rather than a durable quota across wing restarts.
func NewMCPAdmissionState ¶
func NewMCPAdmissionState() *AdmissionState
type BrowserLaunchConfig ¶
type BrowserLaunchConfig struct {
Sessions *wingsession.Service
PublicKey, AuthToken string
EggConfig *egg.EggConfig
Tools []*config.ToolConfig
}
type ConnectMCPServer ¶
type ConnectMCPServer struct {
Version string
In io.Reader
Out io.Writer
Actor string
Tunnel connectMCPTunnel
Timeout time.Duration
Controls map[string]*webrtcpkg.ControlClient
// contains filtered or unexported fields
}
func (*ConnectMCPServer) Close ¶
func (s *ConnectMCPServer) Close()
type LocalMCPTool ¶
func LocalMCPTools ¶
func LocalMCPTools() []LocalMCPTool
type Server ¶
type Server struct {
Sessions *wingsession.Service
Version string
Cfg *config.Config
In io.Reader
Out io.Writer
Logs io.Writer
Principal string
Unsandboxed bool
Grants map[string]bool
MaxSessions int
MaxSpawnsPerHour int
Actor string
MCPClient string // local clients.yaml identity, independent of the audit actor
BoundConversation string
Surface control.Surface
// contains filtered or unexported fields
}
func (*Server) AgentWaitAny ¶
func (s *Server) AgentWaitAny(ctx context.Context, arguments json.RawMessage) (map[string]any, error)
AgentWaitAny exposes the shared wing operation to authenticated adapters.
func (*Server) ToolConversationList ¶
func (*Server) ToolConversationRead ¶
func (*Server) ToolConversationWake ¶
func (*Server) ToolSessionFork ¶
func (*Server) ToolTerminalList ¶
func (*Server) ToolTerminalRename ¶
Source Files
¶
- agent_runs.go
- conversation_broker.go
- conversation_broker_policy.go
- conversation_browser.go
- conversation_continuation.go
- conversation_mailbox.go
- conversation_wake.go
- conversation_wake_exact.go
- conversations.go
- coordinator_role.go
- mcp_connect.go
- mcp_direct_wing.go
- mcp_local.go
- mcp_principals.go
- mcp_socket_client.go
- mcp_socket_wing.go
- mcp_ssh_wing.go
- mcp_tasks.go
- mcp_tasks_aggregate.go
- session_fork.go
- session_lifecycle.go
- session_prompt.go
- wing_attach.go
- wing_mailboxes.go
- wing_sessions.go