Documentation
¶
Overview ¶
Package tap provides the minimal JSON-line broker client for compiled Go primitives running as WASI Preview1 guests.
It deliberately exposes only the declared file-read operation and the runner's final return frame. It performs no filesystem or environment access itself beyond the supplied protocol streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client sends one request at a time and matches each answer by request ID.
func New ¶
func New() *Client
New creates a client using the WASI program's standard input and output.
func NewWithIO ¶
NewWithIO creates a client over protocol streams. It is useful for tests and does not open files or inspect the process environment.
type ErrorCode ¶
type ErrorCode string
ErrorCode identifies a broker failure without parsing its text.
type Reply ¶
type Reply struct {
ID string `json:"id,omitempty"`
Result string `json:"result,omitempty"`
Tools []string `json:"tools,omitempty"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
Exit int `json:"exit"`
Stdin string `json:"stdin"`
Status int `json:"status,omitempty"`
Refused string `json:"refused,omitempty"`
Violation bool `json:"violation,omitempty"`
Landed bool `json:"landed,omitempty"`
Unknown bool `json:"unknown,omitempty"`
Gated bool `json:"gated,omitempty"`
}
Reply preserves the runner fields callers may need to interpret. Exit is the native command status; Status is the HTTP status from fetch.