Documentation
¶
Index ¶
- Constants
- func Available(path string) bool
- type Agent
- type AgentMessageDelta
- type Client
- func (c *Client) Call(ctx context.Context, method string, params any, out any) error
- func (c *Client) Close() error
- func (c *Client) Err() error
- func (c *Client) Events() <-chan Notification
- func (c *Client) Initialize(ctx context.Context, params InitializeParams) (InitializeResponse, error)
- func (c *Client) Notify(ctx context.Context, method string, params any) error
- func (c *Client) ResumeThread(ctx context.Context, params ThreadResumeParams) (ThreadResumeResponse, error)
- func (c *Client) StartThread(ctx context.Context, params ThreadStartParams) (ThreadStartResponse, error)
- func (c *Client) StartTurn(ctx context.Context, params TurnStartParams) (TurnStartResponse, error)
- func (c *Client) SteerTurn(ctx context.Context, params TurnSteerParams) (TurnSteerResponse, error)
- type ClientInfo
- type Conn
- type FileChangePatchUpdated
- type FileUpdateChange
- type InitializeCapabilities
- type InitializeParams
- type InitializeResponse
- type ItemNotification
- type Notification
- type ProcessOptions
- type ReasoningTextDelta
- type Runtime
- func (r *Runtime) Close() error
- func (r *Runtime) Interrupt(context.Context, externalagents.ExternalSession) error
- func (r *Runtime) ResumeSession(ctx context.Context, session externalagents.ExternalSession) (externalagents.ExternalSession, error)
- func (r *Runtime) Send(ctx context.Context, session externalagents.ExternalSession, ...) (<-chan externalagents.Event, error)
- func (r *Runtime) StartSession(ctx context.Context, req externalagents.StartSessionRequest) (externalagents.ExternalSession, error)
- type RuntimeOptions
- type TextElement
- type Thread
- type ThreadResumeParams
- type ThreadResumeResponse
- type ThreadStartParams
- type ThreadStartResponse
- type ToolOutputDelta
- type Turn
- type TurnCompleted
- type TurnStartParams
- type TurnStartResponse
- type TurnSteerParams
- type TurnSteerResponse
- type UserInput
Constants ¶
View Source
const AgentID = "codex-app"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
func (Agent) Available ¶
func (a Agent) Available(context.Context) externalagents.Availability
func (Agent) DisplayName ¶
type AgentMessageDelta ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Events ¶
func (c *Client) Events() <-chan Notification
func (*Client) Initialize ¶
func (c *Client) Initialize(ctx context.Context, params InitializeParams) (InitializeResponse, error)
func (*Client) ResumeThread ¶
func (c *Client) ResumeThread(ctx context.Context, params ThreadResumeParams) (ThreadResumeResponse, error)
func (*Client) StartThread ¶
func (c *Client) StartThread(ctx context.Context, params ThreadStartParams) (ThreadStartResponse, error)
func (*Client) StartTurn ¶
func (c *Client) StartTurn(ctx context.Context, params TurnStartParams) (TurnStartResponse, error)
func (*Client) SteerTurn ¶
func (c *Client) SteerTurn(ctx context.Context, params TurnSteerParams) (TurnSteerResponse, error)
type ClientInfo ¶
type FileChangePatchUpdated ¶ added in v0.1.5
type FileChangePatchUpdated struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
ItemID string `json:"itemId"`
Changes []FileUpdateChange `json:"changes"`
}
type FileUpdateChange ¶ added in v0.1.5
type FileUpdateChange struct {
Path string `json:"path"`
Diff string `json:"diff"`
Kind json.RawMessage `json:"kind"`
}
type InitializeCapabilities ¶
type InitializeParams ¶
type InitializeParams struct {
ClientInfo ClientInfo `json:"clientInfo"`
Capabilities *InitializeCapabilities `json:"capabilities"`
}
type InitializeResponse ¶
type ItemNotification ¶ added in v0.1.5
type ItemNotification struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
Item json.RawMessage `json:"item"`
}
type Notification ¶
type ReasoningTextDelta ¶ added in v0.1.5
type Runtime ¶
type Runtime struct {
Agent
// contains filtered or unexported fields
}
func NewRuntime ¶
func NewRuntime(opts RuntimeOptions) *Runtime
func (*Runtime) Interrupt ¶
func (r *Runtime) Interrupt(context.Context, externalagents.ExternalSession) error
func (*Runtime) ResumeSession ¶
func (r *Runtime) ResumeSession(ctx context.Context, session externalagents.ExternalSession) (externalagents.ExternalSession, error)
func (*Runtime) Send ¶
func (r *Runtime) Send(ctx context.Context, session externalagents.ExternalSession, input externalagents.Input) (<-chan externalagents.Event, error)
func (*Runtime) StartSession ¶
func (r *Runtime) StartSession(ctx context.Context, req externalagents.StartSessionRequest) (externalagents.ExternalSession, error)
type RuntimeOptions ¶
type TextElement ¶
type TextElement struct{}
type Thread ¶
type Thread struct {
ID string `json:"id"`
SessionID string `json:"sessionId"`
ForkedFromID *string `json:"forkedFromId"`
Preview string `json:"preview"`
Ephemeral bool `json:"ephemeral"`
ModelProvider string `json:"modelProvider"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
Status any `json:"status"`
Path *string `json:"path"`
CWD string `json:"cwd"`
CLIVersion string `json:"cliVersion"`
Name *string `json:"name"`
}
type ThreadResumeParams ¶
type ThreadResumeParams struct {
ThreadID string `json:"threadId"`
Model string `json:"model,omitempty"`
ModelProvider string `json:"modelProvider,omitempty"`
CWD string `json:"cwd,omitempty"`
ApprovalPolicy string `json:"approvalPolicy,omitempty"`
ApprovalsReviewer string `json:"approvalsReviewer,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
BaseInstructions string `json:"baseInstructions,omitempty"`
DeveloperInstructions string `json:"developerInstructions,omitempty"`
Config map[string]any `json:"config,omitempty"`
}
type ThreadResumeResponse ¶
type ThreadResumeResponse = ThreadStartResponse
type ThreadStartParams ¶
type ThreadStartParams struct {
Model string `json:"model,omitempty"`
ModelProvider string `json:"modelProvider,omitempty"`
CWD string `json:"cwd,omitempty"`
ApprovalPolicy string `json:"approvalPolicy,omitempty"`
ApprovalsReviewer string `json:"approvalsReviewer,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
BaseInstructions string `json:"baseInstructions,omitempty"`
DeveloperInstructions string `json:"developerInstructions,omitempty"`
Ephemeral *bool `json:"ephemeral,omitempty"`
Config map[string]any `json:"config,omitempty"`
}
type ThreadStartResponse ¶
type ThreadStartResponse struct {
Thread Thread `json:"thread"`
Model string `json:"model"`
ModelProvider string `json:"modelProvider"`
ServiceTier *string `json:"serviceTier"`
CWD string `json:"cwd"`
ApprovalPolicy string `json:"approvalPolicy"`
Sandbox any `json:"sandbox"`
ReasoningEffort *string `json:"reasoningEffort"`
}
type ToolOutputDelta ¶ added in v0.1.5
type TurnCompleted ¶
type TurnStartParams ¶
type TurnStartParams struct {
ThreadID string `json:"threadId"`
Input []UserInput `json:"input"`
CWD string `json:"cwd,omitempty"`
ApprovalPolicy string `json:"approvalPolicy,omitempty"`
ApprovalsReviewer string `json:"approvalsReviewer,omitempty"`
Model string `json:"model,omitempty"`
Effort string `json:"effort,omitempty"`
Summary string `json:"summary,omitempty"`
OutputSchema any `json:"outputSchema,omitempty"`
}
type TurnStartResponse ¶
type TurnStartResponse struct {
Turn Turn `json:"turn"`
}
type TurnSteerParams ¶
type TurnSteerResponse ¶
type TurnSteerResponse struct{}
Click to show internal directories.
Click to hide internal directories.