Versions in this module Expand all Collapse all v0 v0.2.0 Jun 24, 2026 v0.1.2 Jun 30, 2026 Changes in this version type TurnOption + func WithOutputSchema(schema any) TurnOption v0.1.1 Jun 26, 2026 Changes in this version + const ApprovalDecisionAccept + const ApprovalDecisionAcceptForSession + const ApprovalDecisionAcceptWithExecPolicyAmendment + const ApprovalDecisionApplyNetworkPolicyAmendment + const ApprovalDecisionCancel + const ApprovalDecisionDecline + const FileChangeApprovalDecisionAccept + const FileChangeApprovalDecisionAcceptForSession + const FileChangeApprovalDecisionCancel + const FileChangeApprovalDecisionDecline + const ItemKindAgentMessage + const ItemKindCollabAgentToolCall + const ItemKindCommandExecution + const ItemKindContextCompaction + const ItemKindDynamicToolCall + const ItemKindEnteredReviewMode + const ItemKindExitedReviewMode + const ItemKindFileChange + const ItemKindHookPrompt + const ItemKindImageGeneration + const ItemKindImageView + const ItemKindMCPToolCall + const ItemKindPlan + const ItemKindReasoning + const ItemKindSleep + const ItemKindSubAgentActivity + const ItemKindUserMessage + const ItemKindWebSearch + const ThreadActiveFlagWaitingOnApproval + const ThreadActiveFlagWaitingOnUserInput + const ThreadGoalStatusActive + const ThreadGoalStatusBlocked + const ThreadGoalStatusBudgetLimited + const ThreadGoalStatusComplete + const ThreadGoalStatusPaused + const ThreadGoalStatusUsageLimited + const ThreadStatusActive + const ThreadStatusIdle + const ThreadStatusNotLoaded + const ThreadStatusSystemError + const TurnItemsViewFull + const TurnItemsViewNotLoaded + const TurnItemsViewSummary + const TurnStatusCompleted + const TurnStatusFailed + const TurnStatusInProgress + const TurnStatusInterrupted + func FindBinary() (string, error) + func IsHttpConnectionFailed(err error) bool + func IsInternalServerError(err error) bool + func IsRateLimited(err error) bool + func IsUnauthorized(err error) bool + func StreamText(ctx context.Context, ch <-chan ThreadEvent, w io.Writer) error + type AccountInfo struct + Email string + PlanType PlanType + Type string + type AccountRateLimitsUpdatedEvent struct + RateLimits json.RawMessage + type AccountReadResult struct + Account *AccountInfo + RequiresOpenAIAuth bool + type AccountUpdatedEvent struct + AuthMode string + PlanType string + type AppListUpdatedEvent struct + Data json.RawMessage + type ApprovalDecision = protocol.ApprovalDecision + type ApprovalHandler interface + HandleCommandExecutionApproval func(context.Context, CommandExecutionApprovalRequest) (CommandExecutionApprovalResult, error) + HandleFileChangeApproval func(context.Context, FileChangeApprovalRequest) (FileChangeApprovalResult, error) + HandlePermissionsApproval func(context.Context, PermissionsApprovalRequest) (PermissionsApprovalResult, error) + HandleUserInputRequest func(context.Context, UserInputRequest) (UserInputResult, error) + type ApprovalMode string + const ApprovalModeAutoReview + const ApprovalModeDenyAll + const ApprovalModeNever + const ApprovalModeOnRequest + type AuthMode string + const AuthModeAPIKey + const AuthModeChatGPT + type CancelLoginStatus string + const CancelLoginStatusCanceled + const CancelLoginStatusNotFound + type Capabilities = schematypes.Capabilities + type Client struct + func New(opts ...Option) (*Client, error) + func (c *Client) AccountRead(ctx context.Context) (AccountReadResult, error) + func (c *Client) Call(ctx context.Context, method string, params, result any) error + func (c *Client) Close() error + func (c *Client) CommandExec(ctx context.Context, req CommandExecRequest) (CommandExecResult, error) + func (c *Client) CommandExecHandle(processID string) *CommandExecHandle + func (c *Client) CommandExecResize(ctx context.Context, req CommandExecResizeRequest) error + func (c *Client) CommandExecTerminate(ctx context.Context, req CommandExecTerminateRequest) error + func (c *Client) CommandExecWrite(ctx context.Context, req CommandExecWriteRequest) error + func (c *Client) ConfigBatchWrite(ctx context.Context, req ConfigBatchWriteRequest) error + func (c *Client) ConfigRead(ctx context.Context, req ConfigReadRequest) (ConfigReadResult, error) + func (c *Client) ConfigValueWrite(ctx context.Context, req ConfigValueWriteRequest) error + func (c *Client) Events() *EventSubscription + func (c *Client) ExperimentalFeatureEnablementSet(ctx context.Context, req ExperimentalFeatureEnablementSetRequest) (ExperimentalFeatureEnablementSetResult, error) + func (c *Client) ExperimentalFeatureList(ctx context.Context, req ExperimentalFeatureListRequest) (ExperimentalFeatureListResult, error) + func (c *Client) HooksList(ctx context.Context, req HooksListRequest) (HooksListResult, error) + func (c *Client) Initialize(ctx context.Context, req InitializeRequest) (InitializeResult, error) + func (c *Client) LoginAPIKey(ctx context.Context, apiKey string) error + func (c *Client) LoginChatGPT(ctx context.Context) (*LoginHandle, error) + func (c *Client) LoginDeviceCode(ctx context.Context) (*LoginHandle, error) + func (c *Client) Logout(ctx context.Context) error + func (c *Client) ModelList(ctx context.Context, includeHidden bool) ([]ModelInfo, error) + func (c *Client) ModelProviderCapabilitiesRead(ctx context.Context) (ModelProviderCapabilities, error) + func (c *Client) Models(ctx context.Context) ([]string, error) + func (c *Client) Ping(ctx context.Context) error + func (c *Client) ResumeThread(ctx context.Context, threadID string, opts ...ThreadOption) (*SessionThread, error) + func (c *Client) ReviewStart(ctx context.Context, req ReviewStartRequest) error + func (c *Client) SetApprovalPolicy(ctx context.Context, policy string) error + func (c *Client) SetModel(ctx context.Context, model string) error + func (c *Client) SetSandbox(ctx context.Context, sandbox string) error + func (c *Client) SkillsConfigWrite(ctx context.Context, req SkillsConfigWriteRequest) (SkillsConfigWriteResult, error) + func (c *Client) SkillsExtraRootsSet(ctx context.Context, req SkillsExtraRootsSetRequest) error + func (c *Client) SkillsList(ctx context.Context, req SkillsListRequest) (SkillsListResult, error) + func (c *Client) StartThread(ctx context.Context, opts ...ThreadOption) (*SessionThread, error) + func (c *Client) ThreadApproveGuardianDeniedAction(ctx context.Context, req ThreadApproveGuardianDeniedActionRequest) error + func (c *Client) ThreadArchive(ctx context.Context, req ThreadArchiveRequest) error + func (c *Client) ThreadDelete(ctx context.Context, req ThreadDeleteRequest) error + func (c *Client) ThreadFork(ctx context.Context, req ThreadForkRequest) (Thread, error) + func (c *Client) ThreadGoalClear(ctx context.Context, req ThreadGoalClearRequest) error + func (c *Client) ThreadGoalGet(ctx context.Context, req ThreadGoalGetRequest) (ThreadGoal, error) + func (c *Client) ThreadGoalSet(ctx context.Context, req ThreadGoalSetRequest) (ThreadGoal, error) + func (c *Client) ThreadInjectItems(ctx context.Context, req ThreadInjectItemsRequest) error + func (c *Client) ThreadList(ctx context.Context, req ThreadListRequest) ([]Thread, error) + func (c *Client) ThreadLoadedList(ctx context.Context) ([]string, error) + func (c *Client) ThreadMetadataUpdate(ctx context.Context, req ThreadMetadataUpdateRequest) (ThreadMetadataUpdateResult, error) + func (c *Client) ThreadRead(ctx context.Context, req ThreadReadRequest) (Thread, error) + func (c *Client) ThreadResume(ctx context.Context, req ThreadResumeRequest) (Thread, error) + func (c *Client) ThreadRollback(ctx context.Context, req ThreadRollbackRequest) error + func (c *Client) ThreadSetName(ctx context.Context, req ThreadSetNameRequest) error + func (c *Client) ThreadShellCommand(ctx context.Context, req ThreadShellCommandRequest) error + func (c *Client) ThreadStart(ctx context.Context, req ThreadStartRequest) (Thread, error) + func (c *Client) ThreadUnarchive(ctx context.Context, req ThreadUnarchiveRequest) error + func (c *Client) ThreadUnsubscribe(ctx context.Context, req ThreadUnsubscribeRequest) (ThreadUnsubscribeResult, error) + func (c *Client) TurnDiff(ctx context.Context, req TurnDiffRequest) (TurnDiffResult, error) + func (c *Client) TurnInterrupt(ctx context.Context, req TurnInterruptRequest) error + func (c *Client) TurnRead(ctx context.Context, threadID, turnID string) (Turn, error) + func (c *Client) TurnStart(ctx context.Context, req TurnStartRequest) (Turn, error) + func (c *Client) TurnSteer(ctx context.Context, req TurnSteerRequest) error + func (c *Client) WaitForFinalAgentMessage(ctx context.Context, threadID, turnID string) (string, error) + func (c *Client) WaitForStructuredOutput(ctx context.Context, threadID, turnID string, out any) (Turn, error) + func (c *Client) WaitForTurn(ctx context.Context, threadID, turnID string) (Turn, error) + type ClientInfo = schematypes.ClientInfo + type CodexError struct + AdditionalInfo string + ErrorType string + HTTPStatusCode int + RPCCode int + RPCMessage string + func AsCodexError(err error) (*CodexError, bool) + func (e *CodexError) Error() string + type CommandExecHandle struct + func (h *CommandExecHandle) CloseStdin(ctx context.Context) error + func (h *CommandExecHandle) ProcessID() string + func (h *CommandExecHandle) Resize(ctx context.Context, cols, rows int) error + func (h *CommandExecHandle) Terminate(ctx context.Context) error + func (h *CommandExecHandle) Write(ctx context.Context, deltaBase64 string) error + type CommandExecOutputDeltaEvent struct + CapReached bool + DeltaBase64 string + ProcessID string + Stream string + type CommandExecRequest struct + CWD string + Command []string + DisableOutputCap bool + DisableTimeout bool + Env map[string]string + OutputBytesCap int + ProcessID string + SandboxPolicy json.RawMessage + Size *CommandExecTerminalSize + StreamStdin bool + StreamStdoutStderr bool + TTY bool + TimeoutMs int + type CommandExecResizeRequest struct + ProcessID string + Size CommandExecTerminalSize + type CommandExecResult struct + ExitCode int + Stderr string + Stdout string + type CommandExecTerminalSize struct + Cols int + Rows int + type CommandExecTerminateRequest struct + ProcessID string + type CommandExecWriteRequest struct + CloseStdin bool + DeltaBase64 string + ProcessID string + type CommandExecutionApprovalRequest = protocol.CommandExecutionApprovalRequest + type CommandExecutionApprovalResult = protocol.CommandExecutionApprovalResponse + type CommandExecutionPayload struct + Command string + ExitCode *int + Stderr string + Stdout string + func ItemAsCommandExecution(item Item) *CommandExecutionPayload + type ConfigBatchWriteRequest struct + Edits json.RawMessage + ExpectedVersion string + FilePath string + ReloadUserConfig bool + type ConfigReadRequest struct + CWD string + IncludeLayers bool + type ConfigReadResult struct + Config json.RawMessage + Layers json.RawMessage + Origins json.RawMessage + type ConfigValueWriteRequest struct + ExpectedVersion string + FilePath string + KeyPath string + MergeStrategy MergeStrategy + Value json.RawMessage + type ConfigWarningEvent struct + Details string + Path string + Range json.RawMessage + Summary string + type DeprecationNoticeEvent struct + Details string + Summary string + type Dispatcher struct + DynamicTool DynamicToolHandler + Exec ExecApprovalHandler + Fallback RequestHandler + File FileApprovalHandler + MCP MCPApprovalHandler + func (d *Dispatcher) HandleServerRequest(ctx context.Context, req ServerRequest) (ServerResponse, error) + type DynamicToolCallRequest struct + ItemID string + ThreadID string + ToolInput json.RawMessage + ToolName string + TurnID string + type DynamicToolCallResult struct + Content []json.RawMessage + type DynamicToolHandler interface + HandleDynamicToolCall func(ctx context.Context, req DynamicToolCallRequest) (DynamicToolCallResult, error) + type ErrorEvent = protocol.ErrorEvent + type Event struct + Method string + Raw json.RawMessage + Value any + func (e Event) Decode(v any) error + type EventSubscription struct + func (s *EventSubscription) C() <-chan Event + func (s *EventSubscription) Close() + type ExecApprovalHandler interface + HandleCommandExecutionApproval func(context.Context, CommandExecutionApprovalRequest) (CommandExecutionApprovalResult, error) + type ExperimentalFeature struct + Announcement string + DefaultEnabled bool + Description string + DisplayName string + Enabled bool + Name string + Stage json.RawMessage + type ExperimentalFeatureEnablementSetRequest struct + Enablement map[string]bool + type ExperimentalFeatureEnablementSetResult struct + Enablement map[string]bool + type ExperimentalFeatureListRequest struct + Cursor string + Limit int + ThreadID string + type ExperimentalFeatureListResult struct + Data []ExperimentalFeature + NextCursor string + type ExternalAgentConfigImportCompletedEvent struct + ImportID string + ItemTypeResults json.RawMessage + type ExternalAgentConfigImportProgressEvent struct + ImportID string + ItemTypeResults json.RawMessage + type FileApprovalHandler interface + HandleFileChangeApproval func(context.Context, FileChangeApprovalRequest) (FileChangeApprovalResult, error) + type FileChangeApprovalRequest = protocol.FileChangeApprovalRequest + type FileChangeApprovalResult = protocol.FileChangeApprovalResponse + type FileChangePayload struct + ChangeType string + Diff string + FilePath string + NewContent string + OldContent string + func ItemAsFileChange(item Item) *FileChangePayload + type FsChangedEvent struct + ChangedPaths []string + WatchID string + type GuardianWarningEvent struct + Message string + ThreadID string + type HookCompletedEvent struct + Run json.RawMessage + ThreadID string + TurnID string + type HookStartedEvent struct + Run json.RawMessage + ThreadID string + TurnID string + type HooksListRequest struct + CWDs []string + type HooksListResult struct + Data json.RawMessage + type InitializeRequest = schematypes.InitializeRequest + type InitializeResult = schematypes.InitializeResult + type Item = protocol.Item + type ItemAgentMessageDeltaEvent struct + Delta json.RawMessage + ItemID string + Text string + ThreadID string + TurnID string + type ItemAutoApprovalReviewCompletedEvent struct + ItemID string + ThreadID string + TurnID string + type ItemAutoApprovalReviewStartedEvent struct + ItemID string + ThreadID string + TurnID string + type ItemCommandExecutionOutputDeltaEvent struct + Delta string + ItemID string + Output string + Stream string + ThreadID string + TurnID string + type ItemCompletedEvent = protocol.ItemCompletedEvent + type ItemFileChangeOutputDeltaEvent struct + Delta string + ItemID string + Output string + ThreadID string + TurnID string + type ItemFileChangePatchUpdatedEvent struct + ItemID string + Patch json.RawMessage + ThreadID string + TurnID string + type ItemKind = protocol.ItemKind + type ItemPlanDeltaEvent struct + Delta json.RawMessage + ItemID string + Text string + ThreadID string + TurnID string + type ItemReasoningSummaryPartAddedEvent struct + ItemID string + Part json.RawMessage + ThreadID string + TurnID string + type ItemReasoningSummaryTextDeltaEvent struct + ItemID string + Text string + ThreadID string + TurnID string + type ItemReasoningTextDeltaEvent struct + ItemID string + Text string + ThreadID string + TurnID string + type ItemStartedEvent = protocol.ItemStartedEvent + type ItemUpdatedEvent = protocol.ItemUpdatedEvent + type LoginCompleted struct + Error string + LoginID string + Success bool + type LoginHandle struct + AuthURL string + LoginID string + Type string + UserCode string + VerificationURL string + func (h *LoginHandle) Cancel(ctx context.Context) (CancelLoginStatus, error) + func (h *LoginHandle) Wait(ctx context.Context) (LoginCompleted, error) + type MCPApprovalHandler interface + HandleMCPToolCallApproval func(ctx context.Context, req MCPToolCallApprovalRequest) (MCPToolCallApprovalResponse, error) + type MCPToolCallApprovalRequest = protocol.MCPToolCallApprovalRequest + type MCPToolCallApprovalResponse = protocol.MCPToolCallApprovalResponse + type McpServerOauthLoginCompletedEvent struct + Error string + Name string + Success bool + type McpServerStatusUpdatedEvent struct + Error string + Name string + Status string + ThreadID string + type McpToolCallProgressEvent struct + ItemID string + Message string + ThreadID string + TurnID string + type MergeStrategy string + const MergeStrategyReplace + const MergeStrategyUpsert + type ModelInfo struct + Description string + DisplayName string + Hidden bool + ID string + IsDefault bool + Model string + type ModelProviderCapabilities struct + ImageGeneration bool + NamespaceTools bool + WebSearch bool + type ModelReroutedEvent struct + FromModel string + Reason json.RawMessage + ThreadID string + ToModel string + TurnID string + type ModelVerificationEvent struct + ThreadID string + TurnID string + Verifications json.RawMessage + type Option func(*clientConfig) error + func WithApprovalHandler(handler ApprovalHandler) Option + func WithAutoLogin(apiKey string) Option + func WithHTTPAPIKey(key string) Option + func WithHTTPBearerToken(token string) Option + func WithHTTPTransport(baseURL string) Option + func WithMaxThreads(n int) Option + func WithProcessDir(dir string) Option + func WithProcessEnv(key, value string) Option + func WithReconnectingHTTPTransport(baseURL string) Option + func WithReconnectingWSTransport(ctx context.Context, url string) Option + func WithRequestHandler(handler RequestHandler) Option + func WithRetry(cfg transport.RetryConfig) Option + func WithStdioProcess(binaryPath string, args ...string) Option + func WithStdioTransport(stdin io.ReadCloser, stdout io.WriteCloser) Option + func WithTransport(t Transport) Option + func WithUnixSocketWSTransport(ctx context.Context, socketPath string) Option + func WithWSAPIKey(key string) Option + func WithWSBearerToken(token string) Option + func WithWSTransport(ctx context.Context, url string) Option + type PermissionsApprovalRequest = protocol.PermissionsApprovalRequest + type PermissionsApprovalResult = protocol.PermissionsApprovalResponse + type PlanType string + const PlanTypeBusiness + const PlanTypeEdu + const PlanTypeEnterprise + const PlanTypeEnterpriseCBPUsageBased + const PlanTypeFree + const PlanTypeGo + const PlanTypePlus + const PlanTypePro + const PlanTypeProLite + const PlanTypeSelfServeBusinessUsageBased + const PlanTypeTeam + const PlanTypeUnknown + type ProcessExitedEvent struct + ExitCode int + ProcessHandle string + Stderr string + StderrCapReached bool + Stdout string + StdoutCapReached bool + type ProcessOutputDeltaEvent struct + CapReached bool + DeltaBase64 string + ProcessHandle string + Stream string + type RawNotificationEvent struct + ItemID string + ThreadID string + TurnID string + type RawResponseItemCompletedEvent struct + Item json.RawMessage + ThreadID string + TurnID string + type RemoteControlStatusChangedEvent struct + EnvironmentID string + InstallationID string + ServerName string + Status string + type RequestHandler interface + HandleServerRequest func(context.Context, ServerRequest) (ServerResponse, error) + type RequestHandlerFunc func(context.Context, ServerRequest) (ServerResponse, error) + func (f RequestHandlerFunc) HandleServerRequest(ctx context.Context, req ServerRequest) (ServerResponse, error) + type ReviewStartRequest = schematypes.ReviewStartRequest + type SandboxMode string + const SandboxFullAccess + const SandboxReadOnly + const SandboxWorkspaceWrite + type ServerRequest = protocol.ServerRequest + type ServerRequestResolvedEvent = protocol.ServerRequestResolvedEvent + type ServerResponse = protocol.ServerResponse + type SessionThread struct + func (t *SessionThread) Archive(ctx context.Context) error + func (t *SessionThread) ClearGoal(ctx context.Context) error + func (t *SessionThread) Close() + func (t *SessionThread) Compact(ctx context.Context) error + func (t *SessionThread) Fork(ctx context.Context, turnID string, opts ...ThreadOption) (*SessionThread, error) + func (t *SessionThread) GetGoal(ctx context.Context) (ThreadGoal, error) + func (t *SessionThread) GitDiff(ctx context.Context, turnID string) (string, error) + func (t *SessionThread) ID() string + func (t *SessionThread) Interrupt(ctx context.Context, turnID string) error + func (t *SessionThread) Rollback(ctx context.Context, turnIDs []string) error + func (t *SessionThread) Run(ctx context.Context, input string, opts ...TurnOption) (*TurnResult, error) + func (t *SessionThread) RunStreamed(ctx context.Context, input string, opts ...TurnOption) (<-chan ThreadEvent, error) + func (t *SessionThread) SetGoal(ctx context.Context, goal string) error + func (t *SessionThread) SetName(ctx context.Context, name string) error + func (t *SessionThread) Steer(ctx context.Context, turnID, input string) error + func (t *SessionThread) SteerInputs(ctx context.Context, turnID string, inputs ...TurnInput) error + func (t *SessionThread) Unarchive(ctx context.Context) error + type SkillErrorInfo = schematypes.SkillErrorInfo + type SkillMetadata = schematypes.SkillMetadata + type SkillsChangedEvent struct + Cursor string + ForceRefetch bool + Limit int + ThreadID string + type SkillsConfigWriteRequest = schematypes.SkillsConfigWriteParams + type SkillsConfigWriteResult = schematypes.SkillsConfigWriteResponse + type SkillsExtraRootsSetRequest = schematypes.SkillsExtraRootsSetParams + type SkillsListEntry = schematypes.SkillsListEntry + type SkillsListRequest = schematypes.SkillsListParams + type SkillsListResult = schematypes.SkillsListResponse + type TerminalInteractionEvent struct + ItemID string + ProcessID string + Stdin string + ThreadID string + TurnID string + type Thread = protocol.Thread + type ThreadActiveFlag = protocol.ThreadActiveFlag + type ThreadApproveGuardianDeniedActionRequest struct + Event json.RawMessage + ThreadID string + type ThreadArchiveRequest = schematypes.ThreadArchiveRequest + type ThreadArchivedEvent = protocol.ThreadArchivedEvent + type ThreadClosedEvent = protocol.ThreadClosedEvent + type ThreadCompactedEvent struct + ThreadID string + TurnID string + type ThreadDeleteRequest struct + ThreadID string + type ThreadDeletedEvent struct + ThreadID string + type ThreadEvent struct + Kind string + Raw any + type ThreadForkRequest = schematypes.ThreadForkRequest + type ThreadGoal = schematypes.ThreadGoal + type ThreadGoalClearRequest = schematypes.ThreadGoalClearParams + type ThreadGoalClearedEvent = protocol.ThreadGoalClearedEvent + type ThreadGoalGetRequest = schematypes.ThreadGoalGetParams + type ThreadGoalSetRequest = schematypes.ThreadGoalSetParams + type ThreadGoalSetResult = schematypes.ThreadGoalSetResponse + type ThreadGoalStatus = schematypes.ThreadGoalStatus + type ThreadGoalUpdatedEvent = protocol.ThreadGoalUpdatedEvent + type ThreadInjectItemsRequest struct + Items []json.RawMessage + ThreadID string + type ThreadListRequest = schematypes.ThreadListRequest + type ThreadMetadataGitInfo struct + Branch *string + OriginURL *string + Sha *string + type ThreadMetadataUpdateRequest struct + GitInfo *ThreadMetadataGitInfo + ThreadID string + type ThreadMetadataUpdateResult struct + Thread Thread + type ThreadNameUpdatedEvent struct + ThreadID string + ThreadName string + type ThreadOption func(*threadConfig) + func WithInitialInput(input string) ThreadOption + func WithThreadApprovalMode(mode ApprovalMode) ThreadOption + func WithThreadApprovalPolicy(policy string) ThreadOption + func WithThreadCWD(cwd string) ThreadOption + func WithThreadEphemeral(ephemeral bool) ThreadOption + func WithThreadModel(model string) ThreadOption + func WithThreadPersonality(p string) ThreadOption + type ThreadReadRequest = schematypes.ThreadReadRequest + type ThreadRealtimeClosedEvent struct + Reason string + ThreadID string + type ThreadRealtimeErrorEvent struct + Message string + ThreadID string + type ThreadRealtimeItemAddedEvent struct + Item json.RawMessage + ThreadID string + type ThreadRealtimeOutputAudioDeltaEvent struct + Audio json.RawMessage + ThreadID string + type ThreadRealtimeSdpEvent struct + SDP string + ThreadID string + type ThreadRealtimeStartedEvent struct + RealtimeSessionID string + ThreadID string + Version string + type ThreadRealtimeTranscriptDeltaEvent struct + Delta string + Role string + ThreadID string + type ThreadRealtimeTranscriptDoneEvent struct + Role string + Text string + ThreadID string + type ThreadResumeRequest = schematypes.ThreadResumeRequest + type ThreadRollbackRequest = schematypes.ThreadRollbackRequest + type ThreadSetNameRequest = schematypes.ThreadSetNameRequest + type ThreadSettingsUpdatedEvent struct + ThreadID string + ThreadSettings json.RawMessage + type ThreadShellCommandRequest struct + Command string + ThreadID string + type ThreadStartRequest = schematypes.ThreadStartRequest + type ThreadStartedEvent = protocol.ThreadStartedEvent + type ThreadStatus = protocol.ThreadStatus + type ThreadStatusChangedEvent = protocol.ThreadStatusChangedEvent + type ThreadTokenUsageUpdatedEvent = protocol.ThreadTokenUsageUpdatedEvent + type ThreadUnarchiveRequest = schematypes.ThreadUnarchiveRequest + type ThreadUnarchivedEvent = protocol.ThreadUnarchivedEvent + type ThreadUnsubscribeRequest struct + ThreadID string + type ThreadUnsubscribeResult struct + Status ThreadUnsubscribeStatus + type ThreadUnsubscribeStatus string + const ThreadUnsubscribeStatusNotLoaded + const ThreadUnsubscribeStatusNotSubscribed + const ThreadUnsubscribeStatusUnsubscribed + type TokenUsage = protocol.TokenUsage + type Transport interface + Call func(context.Context, string, any, any) error + Close func() error + Notify func(context.Context, string, any) error + SetRequestHandler func(RequestHandler) + func NewStdioTransport(stdin io.ReadCloser, stdout io.WriteCloser) Transport + type Turn = protocol.Turn + type TurnCompletedEvent = protocol.TurnCompletedEvent + type TurnDiffRequest = schematypes.TurnDiffRequest + type TurnDiffResult = schematypes.TurnDiffResult + type TurnDiffUpdatedEvent = protocol.TurnDiffUpdatedEvent + type TurnError = protocol.TurnError + type TurnInput map[string]any + func ImageInput(url, mediaType string) TurnInput + func LocalImageInput(path string) (TurnInput, error) + func MentionInput(mentionID, text string) TurnInput + func SkillInput(skillName string) TurnInput + func TextInput(text string) TurnInput + type TurnInterruptRequest = schematypes.TurnInterruptRequest + type TurnItemsView = protocol.TurnItemsView + type TurnModerationMetadataEvent struct + Metadata json.RawMessage + ThreadID string + TurnID string + type TurnOption func(*TurnStartRequest) + func WithApprovalMode(mode ApprovalMode) TurnOption + func WithApprovalPolicy(policy string) TurnOption + func WithCWD(cwd string) TurnOption + func WithEffort(effort string) TurnOption + func WithInputs(inputs ...TurnInput) TurnOption + func WithModel(model string) TurnOption + func WithSandbox(sandbox string) TurnOption + func WithSandboxMode(mode SandboxMode) TurnOption + func WithSkill(skill string) TurnOption + type TurnPlanUpdatedEvent = protocol.TurnPlanUpdatedEvent + type TurnResult struct + DeltaText string + Error *TurnError + Items []Item + Turn Turn + Usage *TokenUsage + func (r *TurnResult) FinalAgentText() string + type TurnStartRequest = schematypes.TurnStartRequest + type TurnStartedEvent = protocol.TurnStartedEvent + type TurnStatus = protocol.TurnStatus + type TurnSteerRequest = schematypes.TurnSteerRequest + type UserInputOption = protocol.UserInputOption + type UserInputQuestion = protocol.UserInputQuestion + type UserInputRequest = protocol.UserInputRequest + type UserInputResult = protocol.UserInputResult + type WarningEvent struct + Message string + ThreadID string + type WindowsSandboxSetupCompletedEvent struct + Error string + Mode string + Success bool + type WindowsWorldWritableWarningEvent struct + ExtraCount int + FailedScan bool + SamplePaths []string