Versions in this module Expand all Collapse all v2 v2.3.0 Jun 30, 2026 v2.2.0 Jun 6, 2026 v2.1.2 Jun 3, 2026 v2.1.1 May 29, 2026 v2.1.0 May 29, 2026 Changes in this version type APIOperation + RequestSchema map[string]any + RequestSchemaDialect string type APIParam + SchemaDialect string v2.0.0 May 27, 2026 Changes in this version + const CommandPluginProtocolVersion + const FeatureLoaderSourceMetadata + const FeatureManifestRequiredFeatures + const FeatureRequestFinalBody + const MsgTypeAPISpec + const MsgTypeAPISpecResponse + const MsgTypeConfigRead + const MsgTypeConfigReadResponse + const MsgTypeConfirm + const MsgTypeConfirmResponse + const MsgTypeDone + const MsgTypeHTTPRequest + const MsgTypeHTTPResponse + const MsgTypeInit + const MsgTypeListAPIs + const MsgTypeListAPIsResponse + const MsgTypeListProfiles + const MsgTypeListProfilesResponse + const MsgTypeLog + const MsgTypeProgress + const MsgTypePrompt + const MsgTypePromptResponse + const MsgTypeResponse + const MsgTypeSpinner + const MsgTypeStderrData + const MsgTypeStdinClose + const MsgTypeStdinData + const MsgTypeStdoutData + const MsgTypeTLSSignerReady + const MsgTypeTLSSignerShutdown + const MsgTypeTLSSignerSign + const MsgTypeWarn + const StartupFlagColor + const StartupFlagCommands + const StartupFlagManifest + const StartupFlagStderrTTY + const StartupFlagStdoutTTY + const StartupFlagTheme + var DecMode = func() cbor.DecMode { ... }() + func ArgsWithoutStartupFlags(args []string) []string + func HandleStartupFlags(w io.Writer, m Manifest, cmds []CommandDecl) bool + func MessageType(raw []byte) string + func MsgBytes(v any) []byte + func MsgInt(v any) int + func MsgStrings(v any) []string + func ReadMessage(r io.Reader, v any) error + func Run(m Manifest, cmds []CommandDecl, ...) + func WriteCommands(w io.Writer, cmds []CommandDecl) error + func WriteManifest(w io.Writer, m Manifest) error + func WriteMessage(w io.Writer, v any) error + type APIOperation struct + BodyRequired bool + Deprecated bool + Description string + HasBody bool + ID string + MCPIgnore bool + Method string + Parameters []APIParam + Path string + RequestMediaType string + Summary string + type APIParam struct + AllowReserved bool + ContentMediaType string + Description string + Enum []string + Explode *bool + In string + ItemType string + Name string + Required bool + Schema map[string]any + Style string + Type string + type APISpecMsg struct + Name string + Profile string + RequestID string + Type string + type APISpecResponseMsg struct + ContentType string + Error string + Name string + Operations []APIOperation + Profile string + Raw []byte + RequestID string + Type string + type AuthHookInput struct + API string + Params map[string]string + Profile string + Request HookRequest + Type string + type AuthHookOutput struct + Request *HookRequestHeaderUpdate + type CommandClient struct + StdinCloseHandler func() + StdinDataHandler func(data []byte) + func NewCommandClient(in io.Reader, out io.Writer) *CommandClient + func NewCommandClientFromDecoder(dec *Decoder, out io.Writer) *CommandClient + func (c *CommandClient) ConfigRead(api, profile, pluginName string) (*ConfigReadResponseMsg, error) + func (c *CommandClient) ConfigReadContext(ctx context.Context, api, profile, pluginName string) (*ConfigReadResponseMsg, error) + func (c *CommandClient) Confirm(message string) (*ConfirmResponseMsg, error) + func (c *CommandClient) ConfirmContext(ctx context.Context, message string) (*ConfirmResponseMsg, error) + func (c *CommandClient) Do(req *HTTPRequestMsg) (*HTTPResponseMsg, error) + func (c *CommandClient) Done(exitCode int) error + func (c *CommandClient) FetchAPISpec(name string) (*APISpecResponseMsg, error) + func (c *CommandClient) FetchAPISpecContext(ctx context.Context, name, profile string) (*APISpecResponseMsg, error) + func (c *CommandClient) ListAPIs() (*ListAPIsResponseMsg, error) + func (c *CommandClient) ListAPIsContext(ctx context.Context) (*ListAPIsResponseMsg, error) + func (c *CommandClient) ListProfiles(api string) (*ListProfilesResponseMsg, error) + func (c *CommandClient) ListProfilesContext(ctx context.Context, api string) (*ListProfilesResponseMsg, error) + func (c *CommandClient) Progress(text string) error + func (c *CommandClient) Prompt(message string, hidden bool) (*PromptResponseMsg, error) + func (c *CommandClient) PromptContext(ctx context.Context, message string, hidden bool) (*PromptResponseMsg, error) + func (c *CommandClient) ReadMessage(v any) error + func (c *CommandClient) Response(status int, headers map[string][]string, body any) error + func (c *CommandClient) StderrWriter() io.Writer + func (c *CommandClient) StdoutWriter() io.Writer + func (c *CommandClient) Warn(text string) error + func (c *CommandClient) WriteMessage(v any) error + func (c *CommandClient) WriteStderr(data []byte) error + func (c *CommandClient) WriteStdout(data []byte) error + type CommandDecl struct + Long string + Name string + PassthroughStdio bool + Short string + type CommandDiscoveryResponse struct + Commands []CommandDecl + ProtocolVersion int + type ConfigReadMsg struct + API string + Plugin string + Profile string + RequestID string + Type string + type ConfigReadResponseMsg struct + BaseURL string + Error string + Headers []string + PluginConfig any + Query []string + RequestID string + Type string + type ConfirmMsg struct + Message string + RequestID string + Type string + type ConfirmResponseMsg struct + Error string + RequestID string + Type string + Value bool + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) ReadMessage(v any) error + func (d *Decoder) ReadRaw() ([]byte, error) + type DoneMsg struct + ExitCode int + Type string + type FollowRequest struct + Body any + ContentType string + Headers map[string]string + Method string + URI string + type FormatterRequest struct + Color bool + Event string + Format string + Response FormatterResponse + Type string + type FormatterResponse struct + Body any + Headers map[string][]string + Links map[string]any + Proto string + Status int + type HTTPRequestMsg struct + Body any + CacheTTL int + ContentType string + Filter string + Headers map[string]string + Method string + NoCache bool + RequestID string + Timeout int + Type string + URI string + type HTTPResponseMsg struct + Body any + Error string + Headers map[string][]string + Links map[string]any + RequestID string + Status int + Type string + URL string + type HookRequest struct + Body []byte + BodySHA256 string + Headers map[string][]string + Method string + URI string + type HookRequestHeaderUpdate struct + Headers map[string]any + type HookResponse struct + Body any + Headers map[string][]string + Status int + type HookResponseUpdate struct + Body any + Headers map[string]any + type InitMsg struct + Args []string + Command string + Type string + type ListAPIsMsg struct + RequestID string + Type string + type ListAPIsResponseMsg struct + APIs []string + Error string + RequestID string + Type string + type ListProfilesMsg struct + API string + RequestID string + Type string + type ListProfilesResponseMsg struct + API string + Error string + Profiles []string + RequestID string + Type string + type LoaderRequest struct + Body []byte + ContentType string + LocalPath string + SourceURL string + Type string + type LoaderResponse struct + Body any + ContentType string + type LogMsg struct + Text string + Type string + type Manifest struct + AuthAPINames []string + Description string + FormatterNames []string + HookTimeouts map[string]time.Duration + Hooks []string + LoaderContentTypes []string + Name string + NeedsAuthSecrets bool + RequiredFeatures []string + RestishAPIVersion int + Version string + type ProgressMsg struct + Text string + Type string + type PromptMsg struct + Hidden bool + Message string + RequestID string + Type string + type PromptResponseMsg struct + Error string + RequestID string + Type string + Value string + type RequestMiddlewareInput struct + Request HookRequest + Type string + type RequestMiddlewareOutput struct + Request *HookRequestHeaderUpdate + type ResponseMiddlewareInput struct + Request HookRequest + Response HookResponse + Type string + type ResponseMiddlewareOutput struct + Drop bool + Follow *FollowRequest + Response *HookResponseUpdate + type ResponseMsg struct + Body any + Headers map[string][]string + Status int + Type string + type SpinnerMsg struct + Text string + Type string + type StderrDataMsg struct + Data []byte + Type string + type StdinCloseMsg struct + Type string + type StdinDataMsg struct + Data []byte + Type string + type StdoutDataMsg struct + Data []byte + Type string + type TLSSignerInitMsg struct + Params map[string]string + Type string + type TLSSignerReadyMsg struct + Certificate []byte + Type string + type TLSSignerShutdownMsg struct + Type string + type TLSSignerSignMsg struct + Digest []byte + Hash uint64 + Padding string + SaltLength int + Type string + type TLSSignerSignedMsg struct + Error string + Signature []byte + type TerminalContext struct + Color bool + StderrTTY bool + StdoutTTY bool + Theme map[string]string + func TerminalContextFromArgs(args []string) TerminalContext + type WarnMsg struct + Text string + Type string