Documentation
¶
Overview ¶
Package executeworker implements the bounded framed protocol used to isolate provider-facing MVM execution in a helper process.
Index ¶
Constants ¶
View Source
const ( // MaxFrameSize is the largest encoded protocol message accepted by a worker. MaxFrameSize = executionlimits.MaxFrameSize // MaxResultSize is the largest encoded evaluation value accepted across the protocol. MaxResultSize = executionlimits.MaxResultSize )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
Handler RPCHandler
Executable string
}
Client evaluates source in a separate worker process.
type Message ¶
type Message struct {
Stderr string `json:"stderr,omitempty"`
Source string `json:"source,omitempty"`
Method string `json:"method,omitempty"`
Mode string `json:"mode,omitempty"`
Name string `json:"name,omitempty"`
Query string `json:"query,omitempty"`
Stdout string `json:"stdout,omitempty"`
Type string `json:"type"`
Error string `json:"error,omitempty"`
ErrorKind string `json:"error_kind,omitempty"`
ValueKind string `json:"value_kind,omitempty"`
Input json.RawMessage `json:"input,omitempty"`
Value json.RawMessage `json:"value,omitempty"`
Arguments json.RawMessage `json:"arguments,omitempty"`
ID uint64 `json:"id,omitempty"`
ExitCode int `json:"exit_code,omitempty"`
}
Message is a framed request or response exchanged with an execute worker.
type RPCHandler ¶
RPCHandler handles a callback request received from an execute worker.
type ToolCallResult ¶
type ToolCallResult struct {
Details map[string]any `json:"details"`
Error string `json:"error,omitempty"`
Content []tool.ContentBlock `json:"content"`
IsError bool `json:"is_error"`
}
ToolCallResult is the typed result of a tools.Call callback. Keeping this envelope typed on both sides of the worker boundary preserves content blocks and details instead of decoding them through map[string]any.
Click to show internal directories.
Click to hide internal directories.