Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(ctx context.Context, channel Channel, version string, stdin io.Reader, stdout io.Writer, budgetDir string, maxInputBytes, maxConcurrent, maxRequestsPerMinute int) error
Run serves Turnwire over the provided stdin/stdout streams until the client disconnects or ctx is canceled. Incoming JSON frames are bounded and validated before the MCP SDK decodes them. If t also implements Shutdown, Run starts that shutdown as soon as transport teardown is observed and waits for both the MCP session and relay workers before returning.
Types ¶
type Channel ¶
type Channel interface {
Send(context.Context, mailbox.SendInput) (mailbox.SendOutput, error)
Receive(context.Context, mailbox.ReceiveInput) (mailbox.ReceiveOutput, error)
Confirm(context.Context, mailbox.ConfirmInput) (mailbox.ConfirmOutput, error)
Inbox(context.Context, mailbox.InboxInput) (mailbox.InboxOutput, error)
Checkpoint() (identity.Checkpoint, error)
}
Channel exposes the complete signed mailbox protocol.
Click to show internal directories.
Click to hide internal directories.