Versions in this module Expand all Collapse all v0 v0.1.0 Mar 30, 2026 Changes in this version + const MethodApproveCommand + const MethodApproveFile + const MethodCancel + const MethodExecute + const MethodGetSessionStatus + const MethodInitialize + const MethodShutdown + const NotifyCommandRequest + const NotifyError + const NotifyFileRequest + const NotifyOutput + const NotifyProgress + type Agent struct + func New(cfg *agent.Config) *Agent + func (a *Agent) Execute(ctx context.Context, msgs []*bridge.Message) (*agent.Result, error) + func (a *Agent) IsRunning() bool + func (a *Agent) Name() string + func (a *Agent) SessionID() string + func (a *Agent) SetMCPServerAddr(addr string) + func (a *Agent) Start(ctx context.Context) error + func (a *Agent) Status() *agent.Status + func (a *Agent) Stop(ctx context.Context) error + type ApproveCommandParams struct + Approved bool + Command string + RequestID string + type ApproveFileParams struct + Approved bool + FilePath string + RequestID string + type CommandRequestParams struct + Command string + Description string + RequestID string + type ErrorParams struct + Code string + Details string + Message string + type ExecuteParams struct + AutoApprove bool + Context map[string]string + MaxTokens int + Prompt string + Timeout int + type ExecuteResult struct + Done bool + Metadata map[string]any + Output string + Statistics *Statistics + ToolCalls []ToolCall + type FileRequestParams struct + Description string + FilePath string + Operation string + RequestID string + type InitializeParams struct + AutoApprove bool + Environment map[string]string + Model string + WorkDir string + type InitializeResult struct + Capabilities []string + SessionID string + type Notification struct + JSONRPC string + Method string + Params any + func NewNotification(method string, params any) *Notification + type OutputParams struct + Stream string + Text string + type ProgressParams struct + Message string + Percentage int + type RPCError struct + Code int + Data any + Message string + func (e *RPCError) Error() string + type Request struct + ID int64 + JSONRPC string + Method string + Params any + func NewRequest(method string, params any) *Request + type Response struct + Error *RPCError + ID int64 + JSONRPC string + Result json.RawMessage + func (r *Response) DecodeResult(v any) error + type SessionStatusResult struct + Running bool + SessionID string + State string + type Statistics struct + DurationMs int + InputTokens int + OutputTokens int + type ToolCall struct + Arguments string + Error string + ID string + Name string + Result string