Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitOK = 0 ExitToolErr = 1 ExitUsageErr = 2 ExitInternal = 3 )
Exit codes.
View Source
const (
ErrorCodeUnknownServer = "unknown_server"
)
Variables ¶
This section is empty.
Functions ¶
func SocketPath ¶
func SocketPath() string
SocketPath returns the daemon socket path (convenience re-export).
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client sends requests to the daemon over a Unix socket.
type EphemeralServer ¶ added in v1.0.0
type EphemeralServer struct {
Server config.ServerConfig `json:"server"`
}
EphemeralServer carries a transient server definition to be registered by the daemon for the current runtime lifetime only.
type Request ¶
type Request struct {
Nonce string `json:"nonce"` // daemon nonce for auth
Type string `json:"type"` // "ping", "list_servers", "list_tools", "call_tool", "tool_schema", "shutdown"
CWD string `json:"cwd,omitempty"` // caller working directory
Server string `json:"server,omitempty"` // target server name
Tool string `json:"tool,omitempty"` // target tool name
Args json.RawMessage `json:"args,omitempty"` // tool arguments
Cache *time.Duration `json:"cache,omitempty"` // cache TTL override
Verbose bool `json:"verbose,omitempty"`
// IncludeHidden asks daemon responses (currently list_servers) to include
// otherwise hidden runtime-only servers.
IncludeHidden bool `json:"include_hidden,omitempty"`
Ephemeral *EphemeralServer `json:"ephemeral,omitempty"`
}
Request is sent from the CLI to the daemon over the Unix socket.
type Response ¶
type Response struct {
Content []byte `json:"content"` // raw output for stdout
ExitCode int `json:"exit_code"` // 0=ok, 1=tool error, 2=usage error, 3=internal error
Stderr string `json:"stderr,omitempty"` // error message for stderr
ErrorCode string `json:"error_code,omitempty"` // stable machine-readable error classification
}
Response is sent from the daemon back to the CLI.
Click to show internal directories.
Click to hide internal directories.