Documentation
¶
Index ¶
- Constants
- Variables
- func Initialized(ctx context.Context, conn *jsonrpc2.Conn) error
- func IsNotInitializedError(err error) bool
- func IsRateLimitError(err error) bool
- func IsValidationError(err error) bool
- func NewClient(ctx context.Context, opts StartOptions) (*Client, *InitializeResult, error)
- func OnEvent[T NotificationEvent](client *Client, handler func(context.Context, T)) (func(), error)
- func StartStdio(ctx context.Context, opts StartOptions) (*Client, *InitializeResult, error)
- type Account
- type AccountLoginCompletedEvent
- type AccountRateLimitsUpdatedEvent
- type AccountReadParams
- type AccountReadResult
- type AccountUpdatedEvent
- type AgentMessageDeltaEvent
- type AppBranding
- type AppInfo
- type AppMetadata
- type AppReview
- type AppScreenshot
- type AppSummary
- type AppsListParams
- type AppsListResult
- type Capabilities
- type Client
- func (c *Client) ArchiveThread(ctx context.Context, params ThreadArchiveParams) (*ThreadArchiveResult, error)
- func (c *Client) BatchWriteConfig(ctx context.Context, params ConfigBatchWriteParams) (*ConfigWriteResult, error)
- func (c *Client) Call(ctx context.Context, method string, params, result any) error
- func (c *Client) Close() error
- func (c *Client) CompactThread(ctx context.Context, params ThreadCompactStartParams) (*ThreadCompactStartResult, error)
- func (c *Client) CopyPath(ctx context.Context, params FSCopyPathParams) (*FSCopyPathResult, error)
- func (c *Client) CreateDirectory(ctx context.Context, params FSCreateDirectoryParams) (*FSCreateDirectoryResult, error)
- func (c *Client) DetectExternalAgentConfig(ctx context.Context, params ExternalAgentConfigDetectParams) (*ExternalAgentConfigDetectResult, error)
- func (c *Client) ExecCommand(ctx context.Context, params CommandExecParams) (*CommandExecResult, error)
- func (c *Client) ForkThread(ctx context.Context, params ThreadForkParams) (*ThreadForkResult, error)
- func (c *Client) GetMetadata(ctx context.Context, params FSGetMetadataParams) (*FSGetMetadataResult, error)
- func (c *Client) ImportExternalAgentConfig(ctx context.Context, params ExternalAgentConfigImportParams) (*ExternalAgentConfigImportResult, error)
- func (c *Client) InterruptTurn(ctx context.Context, params TurnInterruptParams) (*TurnInterruptResult, error)
- func (c *Client) ListAllModels(ctx context.Context, params ModelListParams, yield func(ModelInfo) bool) error
- func (c *Client) ListAllThreads(ctx context.Context, params ThreadListParams, yield func(Thread) bool) error
- func (c *Client) ListApps(ctx context.Context, params AppsListParams) (*AppsListResult, error)
- func (c *Client) ListCollaborationModes(ctx context.Context) (*CollaborationModeListResult, error)
- func (c *Client) ListExperimentalFeatures(ctx context.Context, params ExperimentalFeatureListParams) (*ExperimentalFeatureListResult, error)
- func (c *Client) ListLoadedThreads(ctx context.Context, params ThreadLoadedListParams) (*ThreadLoadedListResult, error)
- func (c *Client) ListMCPServerStatus(ctx context.Context, params MCPServerStatusListParams) (*MCPServerStatusListResult, error)
- func (c *Client) ListModels(ctx context.Context, params ModelListParams) (*ModelListResult, error)
- func (c *Client) ListPlugins(ctx context.Context, params PluginListParams) (*PluginListResult, error)
- func (c *Client) ListSkills(ctx context.Context, params SkillsListParams) (*SkillsListResult, error)
- func (c *Client) ListThreads(ctx context.Context, params ThreadListParams) (*ThreadListResult, error)
- func (c *Client) Notify(ctx context.Context, method string, params any) error
- func (c *Client) OnItemDelta(handler func(context.Context, ItemDeltaEvent)) (func(), error)
- func (c *Client) OnProcessExit(handler ProcessExitHandler) (func(), error)
- func (c *Client) OnTurnCompleted(handler func(context.Context, *TurnCompletedEvent)) (func(), error)
- func (c *Client) QuickThread(ctx context.Context, threadParams ThreadStartParams, text string) (*ThreadStartResult, *TurnCompletedEvent, error)
- func (c *Client) ReadAccount(ctx context.Context, params AccountReadParams) (*AccountReadResult, error)
- func (c *Client) ReadConfig(ctx context.Context, params ConfigReadParams) (*ConfigReadResult, error)
- func (c *Client) ReadConfigRequirements(ctx context.Context) (*ConfigRequirementsReadResult, error)
- func (c *Client) ReadDirectory(ctx context.Context, params FSReadDirectoryParams) (*FSReadDirectoryResult, error)
- func (c *Client) ReadFile(ctx context.Context, params FSReadFileParams) (*FSReadFileResult, error)
- func (c *Client) ReadPlugin(ctx context.Context, params PluginReadParams) (*PluginReadResult, error)
- func (c *Client) ReadRateLimits(ctx context.Context) (*RateLimitsReadResult, error)
- func (c *Client) ReadThread(ctx context.Context, params ThreadReadParams) (*ThreadReadResult, error)
- func (c *Client) RegisterNotificationHandler(method string, handler NotificationHandler) (func(), error)
- func (c *Client) RegisterToolRequestUserInputHandler(handler ToolRequestUserInputHandler) error
- func (c *Client) ReloadMCPServerConfig(ctx context.Context) (*MCPServerRefreshResult, error)
- func (c *Client) RemovePath(ctx context.Context, params FSRemovePathParams) (*FSRemovePathResult, error)
- func (c *Client) ResizeCommandPTY(ctx context.Context, params CommandExecResizeParams) (*CommandExecResizeResult, error)
- func (c *Client) ResumeThread(ctx context.Context, params ThreadResumeParams) (*ThreadResumeResult, error)
- func (c *Client) RollbackThread(ctx context.Context, params ThreadRollbackParams) (*ThreadRollbackResult, error)
- func (c *Client) SendMessageAndWait(ctx context.Context, threadID string, text string) (*TurnCompletedEvent, error)
- func (c *Client) SetThreadName(ctx context.Context, params ThreadSetNameParams) (*ThreadSetNameResult, error)
- func (c *Client) StartMCPOAuthLogin(ctx context.Context, params MCPOAuthLoginParams) (*MCPOAuthLoginResult, error)
- func (c *Client) StartReview(ctx context.Context, params ReviewStartParams) (*ReviewStartResult, error)
- func (c *Client) StartThread(ctx context.Context, params ThreadStartParams) (*ThreadStartResult, error)
- func (c *Client) StartTurn(ctx context.Context, params TurnStartParams) (*TurnStartResult, error)
- func (c *Client) StartWindowsSandboxSetup(ctx context.Context, params WindowsSandboxSetupStartParams) (*WindowsSandboxSetupStartResult, error)
- func (c *Client) SteerTurn(ctx context.Context, params TurnSteerParams) (*TurnSteerResult, error)
- func (c *Client) StreamTurn(ctx context.Context, params TurnStartParams) (<-chan NotificationEvent, *TurnStartResult, error)
- func (c *Client) TerminateCommand(ctx context.Context, params CommandExecTerminateParams) (*CommandExecTerminateResult, error)
- func (c *Client) UnarchiveThread(ctx context.Context, params ThreadUnarchiveParams) (*ThreadUnarchiveResult, error)
- func (c *Client) UnsubscribeThread(ctx context.Context, params ThreadUnsubscribeParams) (*ThreadUnsubscribeResult, error)
- func (c *Client) UploadFeedback(ctx context.Context, params FeedbackUploadParams) (*FeedbackUploadResult, error)
- func (c *Client) WriteCommandStdin(ctx context.Context, params CommandExecWriteParams) (*CommandExecWriteResult, error)
- func (c *Client) WriteConfigValue(ctx context.Context, params ConfigWriteParams) (*ConfigWriteResult, error)
- func (c *Client) WriteFile(ctx context.Context, params FSWriteFileParams) (*FSWriteFileResult, error)
- func (c *Client) WriteSkillsConfig(ctx context.Context, params SkillsConfigWriteParams) (*SkillsConfigWriteResult, error)
- type ClientInfo
- type CollaborationMode
- type CollaborationModeKind
- type CollaborationModeListResult
- type CommandExecParams
- type CommandExecResizeParams
- type CommandExecResizeResult
- type CommandExecResult
- type CommandExecTerminalSize
- type CommandExecTerminateParams
- type CommandExecTerminateResult
- type CommandExecWriteParams
- type CommandExecWriteResult
- type CommandExecutionOutputDeltaEvent
- type ConfigBatchWriteParams
- type ConfigEdit
- type ConfigLayer
- type ConfigLayerMetadata
- type ConfigMergeStrategy
- type ConfigReadParams
- type ConfigReadResult
- type ConfigRequirements
- type ConfigRequirementsReadResult
- type ConfigRequirementsResidency
- type ConfigValueMap
- type ConfigWriteOverriddenMetadata
- type ConfigWriteParams
- type ConfigWriteResult
- type ConfigWriteStatus
- type CreditsSnapshot
- type ExperimentalFeature
- type ExperimentalFeatureListParams
- type ExperimentalFeatureListResult
- type ExperimentalFeatureStage
- type ExternalAgentConfigDetectParams
- type ExternalAgentConfigDetectResult
- type ExternalAgentConfigImportParams
- type ExternalAgentConfigImportResult
- type ExternalAgentConfigMigrationItem
- type ExternalAgentConfigMigrationItemType
- type FSCopyPathParams
- type FSCopyPathResult
- type FSCreateDirectoryParams
- type FSCreateDirectoryResult
- type FSGetMetadataParams
- type FSGetMetadataResult
- type FSReadDirectoryEntry
- type FSReadDirectoryParams
- type FSReadDirectoryResult
- type FSReadFileParams
- type FSReadFileResult
- type FSRemovePathParams
- type FSRemovePathResult
- type FSWriteFileParams
- type FSWriteFileResult
- type FeedbackUploadParams
- type FeedbackUploadResult
- type FileChangeOutputDeltaEvent
- type FuzzyFileSearchResult
- type FuzzyFileSearchSessionCompletedEvent
- type FuzzyFileSearchSessionUpdatedEvent
- type InitializeParams
- type InitializeResult
- type ItemCompletedEvent
- type ItemDeltaEvent
- type ItemStartedEvent
- type MCPAuthStatus
- type MCPOAuthLoginCompletedEvent
- type MCPOAuthLoginParams
- type MCPOAuthLoginResult
- type MCPResource
- type MCPResourceTemplate
- type MCPServerRefreshResult
- type MCPServerStatus
- type MCPServerStatusListParams
- type MCPServerStatusListResult
- type MCPTool
- type MarketplaceInterface
- type ModelAvailabilityNux
- type ModelInfo
- type ModelListParams
- type ModelListResult
- type ModelUpgradeInfo
- type Notification
- type NotificationEvent
- type NotificationHandler
- type PlanDeltaEvent
- type PluginDetail
- type PluginInterface
- type PluginListParams
- type PluginListResult
- type PluginMarketplaceEntry
- type PluginReadParams
- type PluginReadResult
- type PluginSource
- type PluginSummary
- type ProcessExitError
- type ProcessExitHandler
- type RPCError
- type RateLimitBucket
- type RateLimitWindow
- type RateLimitsReadResult
- type ReasoningEffortOption
- type ReasoningSummaryPartAddedEvent
- type ReasoningSummaryTextDeltaEvent
- type ReasoningTextDeltaEvent
- type RestartPolicy
- type ReviewDelivery
- type ReviewStartParams
- type ReviewStartResult
- type ReviewTarget
- type SkillDependencies
- type SkillErrorInfo
- type SkillInterface
- type SkillMetadata
- type SkillSummary
- type SkillToolDependency
- type SkillsConfigWriteParams
- type SkillsConfigWriteResult
- type SkillsListEntry
- type SkillsListExtraRootsForCwd
- type SkillsListParams
- type SkillsListResult
- type StartOptions
- type Thread
- type ThreadArchiveParams
- type ThreadArchiveResult
- type ThreadArchivedEvent
- type ThreadClosedEvent
- type ThreadCompactStartParams
- type ThreadCompactStartResult
- type ThreadForkParams
- type ThreadForkResult
- type ThreadItem
- type ThreadListParams
- type ThreadListResult
- type ThreadLoadedListParams
- type ThreadLoadedListResult
- type ThreadNameUpdatedEvent
- type ThreadReadParams
- type ThreadReadResult
- type ThreadResumeParams
- type ThreadResumeResult
- type ThreadRollbackParams
- type ThreadRollbackResult
- type ThreadSetNameParams
- type ThreadSetNameResult
- type ThreadSortKey
- type ThreadSourceKind
- type ThreadStartParams
- type ThreadStartResult
- type ThreadStartedEvent
- type ThreadStatus
- type ThreadStatusChangedEvent
- type ThreadTokenUsage
- type ThreadTokenUsageUpdatedEvent
- type ThreadUnarchiveParams
- type ThreadUnarchiveResult
- type ThreadUnarchivedEvent
- type ThreadUnsubscribeParams
- type ThreadUnsubscribeResult
- type ThreadUnsubscribeStatus
- type TokenUsageBreakdown
- type ToolRequestUserInputAnswer
- type ToolRequestUserInputHandler
- type ToolRequestUserInputOption
- type ToolRequestUserInputParams
- type ToolRequestUserInputQuestion
- type ToolRequestUserInputResult
- type Turn
- type TurnCompletedEvent
- type TurnDiffUpdatedEvent
- type TurnError
- type TurnInterruptParams
- type TurnInterruptResult
- type TurnPlanUpdatedEvent
- type TurnStartInputItem
- type TurnStartParams
- type TurnStartResult
- type TurnStartedEvent
- type TurnSteerParams
- type TurnSteerResult
- type WindowsSandboxSetupCompletedEvent
- type WindowsSandboxSetupMode
- type WindowsSandboxSetupStartParams
- type WindowsSandboxSetupStartResult
Constants ¶
View Source
const ( MethodThreadStarted = "thread/started" MethodThreadStatusChanged = "thread/status/changed" MethodThreadArchived = "thread/archived" MethodThreadUnarchived = "thread/unarchived" MethodThreadClosed = "thread/closed" MethodThreadNameUpdated = "thread/name/updated" MethodThreadTokenUsageUpdated = "thread/tokenUsage/updated" MethodTurnStarted = "turn/started" MethodTurnCompleted = "turn/completed" MethodTurnDiffUpdated = "turn/diff/updated" MethodTurnPlanUpdated = "turn/plan/updated" MethodItemStarted = "item/started" MethodItemCompleted = "item/completed" MethodItemAgentMessageDelta = "item/agentMessage/delta" MethodItemPlanDelta = "item/plan/delta" MethodItemReasoningSummaryDelta = "item/reasoning/summaryTextDelta" MethodItemReasoningPartAdded = "item/reasoning/summaryPartAdded" MethodItemReasoningTextDelta = "item/reasoning/textDelta" MethodItemCommandOutputDelta = "item/commandExecution/outputDelta" MethodItemFileChangeOutputDelta = "item/fileChange/outputDelta" MethodAccountLoginCompleted = "account/login/completed" MethodAccountUpdated = "account/updated" MethodAccountRateLimitsUpdated = "account/rateLimits/updated" MethodMCPOAuthLoginCompleted = "mcpServer/oauthLogin/completed" MethodWindowsSandboxCompleted = "windowsSandbox/setupCompleted" MethodFuzzyFileSearchUpdated = "fuzzyFileSearch/sessionUpdated" MethodFuzzyFileSearchCompleted = "fuzzyFileSearch/sessionCompleted" )
View Source
const MethodToolRequestUserInput = "item/tool/requestUserInput"
Variables ¶
View Source
var (
ErrClientClosed = errors.New("appserver: client is closed")
)
Functions ¶
func IsNotInitializedError ¶
func IsRateLimitError ¶
func IsValidationError ¶
func NewClient ¶
func NewClient(ctx context.Context, opts StartOptions) (*Client, *InitializeResult, error)
func OnEvent ¶
func OnEvent[T NotificationEvent](client *Client, handler func(context.Context, T)) (func(), error)
func StartStdio ¶
func StartStdio(ctx context.Context, opts StartOptions) (*Client, *InitializeResult, error)
Types ¶
type AccountLoginCompletedEvent ¶
type AccountLoginCompletedEvent struct {
LoginID *string `json:"loginId"`
Success bool `json:"success"`
Error *string `json:"error"`
}
func (AccountLoginCompletedEvent) NotificationMethod ¶
func (AccountLoginCompletedEvent) NotificationMethod() string
type AccountRateLimitsUpdatedEvent ¶
type AccountRateLimitsUpdatedEvent struct {
RateLimits RateLimitBucket `json:"rateLimits"`
}
func (AccountRateLimitsUpdatedEvent) NotificationMethod ¶
func (AccountRateLimitsUpdatedEvent) NotificationMethod() string
type AccountReadParams ¶
type AccountReadParams struct {
RefreshToken bool `json:"refreshToken"`
}
type AccountReadResult ¶
type AccountUpdatedEvent ¶
type AccountUpdatedEvent struct {
AuthMode *string `json:"authMode"`
PlanType *string `json:"planType"`
}
func (AccountUpdatedEvent) NotificationMethod ¶
func (AccountUpdatedEvent) NotificationMethod() string
type AgentMessageDeltaEvent ¶
type AgentMessageDeltaEvent struct {
ItemID string `json:"itemId"`
Delta string `json:"delta"`
TurnID string `json:"turnId,omitempty"`
ThreadID string `json:"threadId,omitempty"`
}
func (AgentMessageDeltaEvent) NotificationMethod ¶
func (AgentMessageDeltaEvent) NotificationMethod() string
type AppBranding ¶
type AppBranding struct {
Category *string `json:"category,omitempty"`
Developer *string `json:"developer,omitempty"`
IsDiscoverableApp bool `json:"isDiscoverableApp"`
PrivacyPolicy *string `json:"privacyPolicy,omitempty"`
TermsOfService *string `json:"termsOfService,omitempty"`
Website *string `json:"website,omitempty"`
}
type AppInfo ¶
type AppInfo struct {
AppMetadata *AppMetadata `json:"appMetadata,omitempty"`
Branding *AppBranding `json:"branding,omitempty"`
Description *string `json:"description,omitempty"`
DistributionChannel *string `json:"distributionChannel,omitempty"`
ID string `json:"id"`
InstallURL *string `json:"installUrl,omitempty"`
IsAccessible bool `json:"isAccessible"`
IsEnabled bool `json:"isEnabled"`
Labels map[string]string `json:"labels,omitempty"`
LogoURL *string `json:"logoUrl,omitempty"`
LogoURLDark *string `json:"logoUrlDark,omitempty"`
Name string `json:"name"`
PluginDisplayNames []string `json:"pluginDisplayNames,omitempty"`
}
type AppMetadata ¶
type AppMetadata struct {
Categories []string `json:"categories,omitempty"`
Developer *string `json:"developer,omitempty"`
FirstPartyRequiresInstall *bool `json:"firstPartyRequiresInstall,omitempty"`
FirstPartyType *string `json:"firstPartyType,omitempty"`
Review *AppReview `json:"review,omitempty"`
Screenshots []AppScreenshot `json:"screenshots,omitempty"`
SEODescription *string `json:"seoDescription,omitempty"`
ShowInComposerWhenUnlinked *bool `json:"showInComposerWhenUnlinked,omitempty"`
SubCategories []string `json:"subCategories,omitempty"`
Version *string `json:"version,omitempty"`
VersionID *string `json:"versionId,omitempty"`
VersionNotes *string `json:"versionNotes,omitempty"`
}
type AppScreenshot ¶
type AppSummary ¶
type AppsListParams ¶
type AppsListResult ¶
type Capabilities ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ArchiveThread ¶
func (c *Client) ArchiveThread(ctx context.Context, params ThreadArchiveParams) (*ThreadArchiveResult, error)
func (*Client) BatchWriteConfig ¶
func (c *Client) BatchWriteConfig(ctx context.Context, params ConfigBatchWriteParams) (*ConfigWriteResult, error)
func (*Client) CompactThread ¶
func (c *Client) CompactThread(ctx context.Context, params ThreadCompactStartParams) (*ThreadCompactStartResult, error)
func (*Client) CopyPath ¶
func (c *Client) CopyPath(ctx context.Context, params FSCopyPathParams) (*FSCopyPathResult, error)
func (*Client) CreateDirectory ¶
func (c *Client) CreateDirectory(ctx context.Context, params FSCreateDirectoryParams) (*FSCreateDirectoryResult, error)
func (*Client) DetectExternalAgentConfig ¶
func (c *Client) DetectExternalAgentConfig(ctx context.Context, params ExternalAgentConfigDetectParams) (*ExternalAgentConfigDetectResult, error)
func (*Client) ExecCommand ¶
func (c *Client) ExecCommand(ctx context.Context, params CommandExecParams) (*CommandExecResult, error)
func (*Client) ForkThread ¶
func (c *Client) ForkThread(ctx context.Context, params ThreadForkParams) (*ThreadForkResult, error)
func (*Client) GetMetadata ¶
func (c *Client) GetMetadata(ctx context.Context, params FSGetMetadataParams) (*FSGetMetadataResult, error)
func (*Client) ImportExternalAgentConfig ¶
func (c *Client) ImportExternalAgentConfig(ctx context.Context, params ExternalAgentConfigImportParams) (*ExternalAgentConfigImportResult, error)
func (*Client) InterruptTurn ¶
func (c *Client) InterruptTurn(ctx context.Context, params TurnInterruptParams) (*TurnInterruptResult, error)
func (*Client) ListAllModels ¶
func (*Client) ListAllThreads ¶
func (*Client) ListApps ¶
func (c *Client) ListApps(ctx context.Context, params AppsListParams) (*AppsListResult, error)
func (*Client) ListCollaborationModes ¶
func (c *Client) ListCollaborationModes(ctx context.Context) (*CollaborationModeListResult, error)
func (*Client) ListExperimentalFeatures ¶
func (c *Client) ListExperimentalFeatures(ctx context.Context, params ExperimentalFeatureListParams) (*ExperimentalFeatureListResult, error)
func (*Client) ListLoadedThreads ¶
func (c *Client) ListLoadedThreads(ctx context.Context, params ThreadLoadedListParams) (*ThreadLoadedListResult, error)
func (*Client) ListMCPServerStatus ¶
func (c *Client) ListMCPServerStatus(ctx context.Context, params MCPServerStatusListParams) (*MCPServerStatusListResult, error)
func (*Client) ListModels ¶
func (c *Client) ListModels(ctx context.Context, params ModelListParams) (*ModelListResult, error)
func (*Client) ListPlugins ¶
func (c *Client) ListPlugins(ctx context.Context, params PluginListParams) (*PluginListResult, error)
func (*Client) ListSkills ¶
func (c *Client) ListSkills(ctx context.Context, params SkillsListParams) (*SkillsListResult, error)
func (*Client) ListThreads ¶
func (c *Client) ListThreads(ctx context.Context, params ThreadListParams) (*ThreadListResult, error)
func (*Client) OnItemDelta ¶
func (c *Client) OnItemDelta(handler func(context.Context, ItemDeltaEvent)) (func(), error)
func (*Client) OnProcessExit ¶
func (c *Client) OnProcessExit(handler ProcessExitHandler) (func(), error)
func (*Client) OnTurnCompleted ¶
func (c *Client) OnTurnCompleted(handler func(context.Context, *TurnCompletedEvent)) (func(), error)
func (*Client) QuickThread ¶
func (c *Client) QuickThread(ctx context.Context, threadParams ThreadStartParams, text string) (*ThreadStartResult, *TurnCompletedEvent, error)
func (*Client) ReadAccount ¶
func (c *Client) ReadAccount(ctx context.Context, params AccountReadParams) (*AccountReadResult, error)
func (*Client) ReadConfig ¶
func (c *Client) ReadConfig(ctx context.Context, params ConfigReadParams) (*ConfigReadResult, error)
func (*Client) ReadConfigRequirements ¶
func (c *Client) ReadConfigRequirements(ctx context.Context) (*ConfigRequirementsReadResult, error)
func (*Client) ReadDirectory ¶
func (c *Client) ReadDirectory(ctx context.Context, params FSReadDirectoryParams) (*FSReadDirectoryResult, error)
func (*Client) ReadFile ¶
func (c *Client) ReadFile(ctx context.Context, params FSReadFileParams) (*FSReadFileResult, error)
func (*Client) ReadPlugin ¶
func (c *Client) ReadPlugin(ctx context.Context, params PluginReadParams) (*PluginReadResult, error)
func (*Client) ReadRateLimits ¶
func (c *Client) ReadRateLimits(ctx context.Context) (*RateLimitsReadResult, error)
func (*Client) ReadThread ¶
func (c *Client) ReadThread(ctx context.Context, params ThreadReadParams) (*ThreadReadResult, error)
func (*Client) RegisterNotificationHandler ¶
func (c *Client) RegisterNotificationHandler(method string, handler NotificationHandler) (func(), error)
func (*Client) RegisterToolRequestUserInputHandler ¶
func (c *Client) RegisterToolRequestUserInputHandler(handler ToolRequestUserInputHandler) error
func (*Client) ReloadMCPServerConfig ¶
func (c *Client) ReloadMCPServerConfig(ctx context.Context) (*MCPServerRefreshResult, error)
func (*Client) RemovePath ¶
func (c *Client) RemovePath(ctx context.Context, params FSRemovePathParams) (*FSRemovePathResult, error)
func (*Client) ResizeCommandPTY ¶
func (c *Client) ResizeCommandPTY(ctx context.Context, params CommandExecResizeParams) (*CommandExecResizeResult, error)
func (*Client) ResumeThread ¶
func (c *Client) ResumeThread(ctx context.Context, params ThreadResumeParams) (*ThreadResumeResult, error)
func (*Client) RollbackThread ¶
func (c *Client) RollbackThread(ctx context.Context, params ThreadRollbackParams) (*ThreadRollbackResult, error)
func (*Client) SendMessageAndWait ¶
func (*Client) SetThreadName ¶
func (c *Client) SetThreadName(ctx context.Context, params ThreadSetNameParams) (*ThreadSetNameResult, error)
func (*Client) StartMCPOAuthLogin ¶
func (c *Client) StartMCPOAuthLogin(ctx context.Context, params MCPOAuthLoginParams) (*MCPOAuthLoginResult, error)
func (*Client) StartReview ¶
func (c *Client) StartReview(ctx context.Context, params ReviewStartParams) (*ReviewStartResult, error)
func (*Client) StartThread ¶
func (c *Client) StartThread(ctx context.Context, params ThreadStartParams) (*ThreadStartResult, error)
func (*Client) StartTurn ¶
func (c *Client) StartTurn(ctx context.Context, params TurnStartParams) (*TurnStartResult, error)
func (*Client) StartWindowsSandboxSetup ¶
func (c *Client) StartWindowsSandboxSetup(ctx context.Context, params WindowsSandboxSetupStartParams) (*WindowsSandboxSetupStartResult, error)
func (*Client) SteerTurn ¶
func (c *Client) SteerTurn(ctx context.Context, params TurnSteerParams) (*TurnSteerResult, error)
func (*Client) StreamTurn ¶
func (c *Client) StreamTurn(ctx context.Context, params TurnStartParams) (<-chan NotificationEvent, *TurnStartResult, error)
func (*Client) TerminateCommand ¶
func (c *Client) TerminateCommand(ctx context.Context, params CommandExecTerminateParams) (*CommandExecTerminateResult, error)
func (*Client) UnarchiveThread ¶
func (c *Client) UnarchiveThread(ctx context.Context, params ThreadUnarchiveParams) (*ThreadUnarchiveResult, error)
func (*Client) UnsubscribeThread ¶
func (c *Client) UnsubscribeThread(ctx context.Context, params ThreadUnsubscribeParams) (*ThreadUnsubscribeResult, error)
func (*Client) UploadFeedback ¶
func (c *Client) UploadFeedback(ctx context.Context, params FeedbackUploadParams) (*FeedbackUploadResult, error)
func (*Client) WriteCommandStdin ¶
func (c *Client) WriteCommandStdin(ctx context.Context, params CommandExecWriteParams) (*CommandExecWriteResult, error)
func (*Client) WriteConfigValue ¶
func (c *Client) WriteConfigValue(ctx context.Context, params ConfigWriteParams) (*ConfigWriteResult, error)
func (*Client) WriteFile ¶
func (c *Client) WriteFile(ctx context.Context, params FSWriteFileParams) (*FSWriteFileResult, error)
func (*Client) WriteSkillsConfig ¶
func (c *Client) WriteSkillsConfig(ctx context.Context, params SkillsConfigWriteParams) (*SkillsConfigWriteResult, error)
type ClientInfo ¶
type CollaborationMode ¶
type CollaborationMode struct {
Mode *CollaborationModeKind `json:"mode,omitempty"`
Model *string `json:"model,omitempty"`
Name string `json:"name"`
ReasoningEffort *string `json:"reasoning_effort,omitempty"`
}
type CollaborationModeKind ¶
type CollaborationModeKind string
const ( CollaborationModeKindPlan CollaborationModeKind = "plan" CollaborationModeKindDefault CollaborationModeKind = "default" )
type CollaborationModeListResult ¶
type CollaborationModeListResult struct {
Data []CollaborationMode `json:"data"`
}
type CommandExecParams ¶
type CommandExecParams struct {
Command []string `json:"command"`
Cwd *string `json:"cwd,omitempty"`
DisableOutputCap bool `json:"disableOutputCap,omitempty"`
DisableTimeout bool `json:"disableTimeout,omitempty"`
Env map[string]*string `json:"env,omitempty"`
OutputBytesCap *uint64 `json:"outputBytesCap,omitempty"`
ProcessID *string `json:"processId,omitempty"`
SandboxPolicy any `json:"sandboxPolicy,omitempty"`
Size *CommandExecTerminalSize `json:"size,omitempty"`
StreamStdin bool `json:"streamStdin,omitempty"`
StreamStdoutStderr bool `json:"streamStdoutStderr,omitempty"`
TimeoutMs *int64 `json:"timeoutMs,omitempty"`
TTY bool `json:"tty,omitempty"`
}
type CommandExecResizeParams ¶
type CommandExecResizeParams struct {
ProcessID string `json:"processId"`
Size CommandExecTerminalSize `json:"size"`
}
type CommandExecResizeResult ¶
type CommandExecResizeResult struct{}
type CommandExecResult ¶
type CommandExecTerminalSize ¶
type CommandExecTerminateParams ¶
type CommandExecTerminateParams struct {
ProcessID string `json:"processId"`
}
type CommandExecTerminateResult ¶
type CommandExecTerminateResult struct{}
type CommandExecWriteParams ¶
type CommandExecWriteResult ¶
type CommandExecWriteResult struct{}
type CommandExecutionOutputDeltaEvent ¶
type CommandExecutionOutputDeltaEvent struct {
ItemID string `json:"itemId,omitempty"`
Delta string `json:"delta,omitempty"`
Stream string `json:"stream,omitempty"`
ThreadID string `json:"threadId,omitempty"`
TurnID string `json:"turnId,omitempty"`
}
func (CommandExecutionOutputDeltaEvent) NotificationMethod ¶
func (CommandExecutionOutputDeltaEvent) NotificationMethod() string
type ConfigBatchWriteParams ¶
type ConfigBatchWriteParams struct {
Edits []ConfigEdit `json:"edits"`
ExpectedVersion *string `json:"expectedVersion,omitempty"`
FilePath *string `json:"filePath,omitempty"`
ReloadUserConfig bool `json:"reloadUserConfig,omitempty"`
}
type ConfigEdit ¶
type ConfigEdit struct {
KeyPath string `json:"keyPath"`
MergeStrategy ConfigMergeStrategy `json:"mergeStrategy"`
Value any `json:"value"`
}
type ConfigLayer ¶
type ConfigLayerMetadata ¶
type ConfigMergeStrategy ¶
type ConfigMergeStrategy string
const ( ConfigMergeStrategyReplace ConfigMergeStrategy = "replace" ConfigMergeStrategyUpsert ConfigMergeStrategy = "upsert" )
type ConfigReadParams ¶
type ConfigReadResult ¶
type ConfigReadResult struct {
Config ConfigValueMap `json:"config"`
Layers []ConfigLayer `json:"layers,omitempty"`
Origins map[string]ConfigLayerMetadata `json:"origins"`
}
type ConfigRequirements ¶
type ConfigRequirements struct {
AllowedApprovalPolicies []json.RawMessage `json:"allowedApprovalPolicies,omitempty"`
AllowedSandboxModes []string `json:"allowedSandboxModes,omitempty"`
AllowedWebSearchModes []string `json:"allowedWebSearchModes,omitempty"`
EnforceResidency *ConfigRequirementsResidency `json:"enforceResidency,omitempty"`
FeatureRequirements map[string]bool `json:"featureRequirements,omitempty"`
}
type ConfigRequirementsReadResult ¶
type ConfigRequirementsReadResult struct {
Requirements *ConfigRequirements `json:"requirements"`
}
type ConfigRequirementsResidency ¶
type ConfigRequirementsResidency string
const (
ConfigRequirementsResidencyUS ConfigRequirementsResidency = "us"
)
type ConfigValueMap ¶
type ConfigWriteOverriddenMetadata ¶
type ConfigWriteOverriddenMetadata struct {
EffectiveValue any `json:"effectiveValue"`
Message string `json:"message"`
OverridingLayer ConfigLayerMetadata `json:"overridingLayer"`
}
type ConfigWriteParams ¶
type ConfigWriteParams struct {
ExpectedVersion *string `json:"expectedVersion,omitempty"`
FilePath *string `json:"filePath,omitempty"`
KeyPath string `json:"keyPath"`
MergeStrategy ConfigMergeStrategy `json:"mergeStrategy"`
Value any `json:"value"`
}
type ConfigWriteResult ¶
type ConfigWriteResult struct {
FilePath string `json:"filePath"`
OverriddenMetadata *ConfigWriteOverriddenMetadata `json:"overriddenMetadata,omitempty"`
Status ConfigWriteStatus `json:"status"`
Version string `json:"version"`
}
type ConfigWriteStatus ¶
type ConfigWriteStatus string
const ( ConfigWriteStatusOK ConfigWriteStatus = "ok" ConfigWriteStatusOKOverridden ConfigWriteStatus = "okOverridden" )
type CreditsSnapshot ¶
type ExperimentalFeature ¶
type ExperimentalFeature struct {
Announcement *string `json:"announcement,omitempty"`
DefaultEnabled bool `json:"defaultEnabled"`
Description *string `json:"description,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Enabled bool `json:"enabled"`
Name string `json:"name"`
Stage ExperimentalFeatureStage `json:"stage"`
}
type ExperimentalFeatureListResult ¶
type ExperimentalFeatureListResult struct {
Data []ExperimentalFeature `json:"data"`
NextCursor *string `json:"nextCursor,omitempty"`
}
type ExperimentalFeatureStage ¶
type ExperimentalFeatureStage string
const ( ExperimentalFeatureStageBeta ExperimentalFeatureStage = "beta" ExperimentalFeatureStageUnderDevelopment ExperimentalFeatureStage = "underDevelopment" ExperimentalFeatureStageStable ExperimentalFeatureStage = "stable" ExperimentalFeatureStageDeprecated ExperimentalFeatureStage = "deprecated" ExperimentalFeatureStageRemoved ExperimentalFeatureStage = "removed" )
type ExternalAgentConfigDetectResult ¶
type ExternalAgentConfigDetectResult struct {
Items []ExternalAgentConfigMigrationItem `json:"items"`
}
type ExternalAgentConfigImportParams ¶
type ExternalAgentConfigImportParams struct {
MigrationItems []ExternalAgentConfigMigrationItem `json:"migrationItems"`
}
type ExternalAgentConfigImportResult ¶
type ExternalAgentConfigImportResult struct{}
type ExternalAgentConfigMigrationItem ¶
type ExternalAgentConfigMigrationItem struct {
Cwd *string `json:"cwd,omitempty"`
Description string `json:"description"`
ItemType ExternalAgentConfigMigrationItemType `json:"itemType"`
}
type ExternalAgentConfigMigrationItemType ¶
type ExternalAgentConfigMigrationItemType string
const ( ExternalAgentConfigMigrationItemTypeAgentsMD ExternalAgentConfigMigrationItemType = "AGENTS_MD" ExternalAgentConfigMigrationItemTypeConfig ExternalAgentConfigMigrationItemType = "CONFIG" ExternalAgentConfigMigrationItemTypeSkills ExternalAgentConfigMigrationItemType = "SKILLS" ExternalAgentConfigMigrationItemTypeMCPServerConfig ExternalAgentConfigMigrationItemType = "MCP_SERVER_CONFIG" )
type FSCopyPathParams ¶
type FSCopyPathResult ¶
type FSCopyPathResult struct{}
type FSCreateDirectoryParams ¶
type FSCreateDirectoryResult ¶
type FSCreateDirectoryResult struct{}
type FSGetMetadataParams ¶
type FSGetMetadataParams struct {
Path string `json:"path"`
}
type FSGetMetadataResult ¶
type FSReadDirectoryEntry ¶
type FSReadDirectoryParams ¶
type FSReadDirectoryParams struct {
Path string `json:"path"`
}
type FSReadDirectoryResult ¶
type FSReadDirectoryResult struct {
Entries []FSReadDirectoryEntry `json:"entries"`
}
type FSReadFileParams ¶
type FSReadFileParams struct {
Path string `json:"path"`
}
type FSReadFileResult ¶
type FSReadFileResult struct {
DataBase64 string `json:"dataBase64"`
}
type FSRemovePathParams ¶
type FSRemovePathResult ¶
type FSRemovePathResult struct{}
type FSWriteFileParams ¶
type FSWriteFileResult ¶
type FSWriteFileResult struct{}
type FeedbackUploadParams ¶
type FeedbackUploadResult ¶
type FeedbackUploadResult struct {
ThreadID string `json:"threadId"`
}
type FileChangeOutputDeltaEvent ¶
type FileChangeOutputDeltaEvent struct {
ItemID string `json:"itemId"`
Delta string `json:"delta"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
func (FileChangeOutputDeltaEvent) NotificationMethod ¶
func (FileChangeOutputDeltaEvent) NotificationMethod() string
type FuzzyFileSearchResult ¶
type FuzzyFileSearchSessionCompletedEvent ¶
type FuzzyFileSearchSessionCompletedEvent struct {
SessionID string `json:"sessionId"`
}
func (FuzzyFileSearchSessionCompletedEvent) NotificationMethod ¶
func (FuzzyFileSearchSessionCompletedEvent) NotificationMethod() string
type FuzzyFileSearchSessionUpdatedEvent ¶
type FuzzyFileSearchSessionUpdatedEvent struct {
Files []FuzzyFileSearchResult `json:"files"`
Query string `json:"query"`
SessionID string `json:"sessionId"`
}
func (FuzzyFileSearchSessionUpdatedEvent) NotificationMethod ¶
func (FuzzyFileSearchSessionUpdatedEvent) NotificationMethod() string
type InitializeParams ¶
type InitializeParams struct {
ClientInfo ClientInfo `json:"clientInfo"`
Capabilities *Capabilities `json:"capabilities,omitempty"`
}
type InitializeResult ¶
type InitializeResult struct {
UserAgent string `json:"userAgent"`
PlatformFamily string `json:"platformFamily"`
PlatformOS string `json:"platformOs"`
}
func Initialize ¶
func Initialize(ctx context.Context, conn *jsonrpc2.Conn, params InitializeParams) (*InitializeResult, error)
type ItemCompletedEvent ¶
type ItemCompletedEvent struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
Item ThreadItem `json:"item"`
}
func (ItemCompletedEvent) NotificationMethod ¶
func (ItemCompletedEvent) NotificationMethod() string
type ItemDeltaEvent ¶
type ItemDeltaEvent interface {
NotificationEvent
// contains filtered or unexported methods
}
type ItemStartedEvent ¶
type ItemStartedEvent struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
Item ThreadItem `json:"item"`
}
func (ItemStartedEvent) NotificationMethod ¶
func (ItemStartedEvent) NotificationMethod() string
type MCPAuthStatus ¶
type MCPAuthStatus string
const ( MCPAuthStatusUnsupported MCPAuthStatus = "unsupported" MCPAuthStatusNotLoggedIn MCPAuthStatus = "notLoggedIn" MCPAuthStatusBearerToken MCPAuthStatus = "bearerToken" MCPAuthStatusOAuth MCPAuthStatus = "oAuth" )
type MCPOAuthLoginCompletedEvent ¶
type MCPOAuthLoginCompletedEvent struct {
Name string `json:"name"`
Success bool `json:"success"`
Error *string `json:"error"`
}
func (MCPOAuthLoginCompletedEvent) NotificationMethod ¶
func (MCPOAuthLoginCompletedEvent) NotificationMethod() string
type MCPOAuthLoginParams ¶
type MCPOAuthLoginResult ¶
type MCPOAuthLoginResult struct {
AuthorizationURL string `json:"authorizationUrl"`
}
type MCPResource ¶
type MCPResource struct {
Meta json.RawMessage `json:"_meta,omitempty"`
Annotations json.RawMessage `json:"annotations,omitempty"`
Description *string `json:"description,omitempty"`
Icons []json.RawMessage `json:"icons,omitempty"`
MimeType *string `json:"mimeType,omitempty"`
Name string `json:"name"`
Size *int64 `json:"size,omitempty"`
Title *string `json:"title,omitempty"`
URI string `json:"uri"`
}
type MCPResourceTemplate ¶
type MCPServerRefreshResult ¶
type MCPServerRefreshResult struct{}
type MCPServerStatus ¶
type MCPServerStatus struct {
AuthStatus MCPAuthStatus `json:"authStatus"`
Name string `json:"name"`
ResourceTemplates []MCPResourceTemplate `json:"resourceTemplates"`
Resources []MCPResource `json:"resources"`
Tools map[string]MCPTool `json:"tools"`
}
type MCPServerStatusListResult ¶
type MCPServerStatusListResult struct {
Data []MCPServerStatus `json:"data"`
NextCursor *string `json:"nextCursor,omitempty"`
}
type MCPTool ¶
type MCPTool struct {
Meta json.RawMessage `json:"_meta,omitempty"`
Annotations json.RawMessage `json:"annotations,omitempty"`
Description *string `json:"description,omitempty"`
Icons []json.RawMessage `json:"icons,omitempty"`
InputSchema json.RawMessage `json:"inputSchema"`
Name string `json:"name"`
OutputSchema json.RawMessage `json:"outputSchema,omitempty"`
Title *string `json:"title,omitempty"`
}
type MarketplaceInterface ¶
type MarketplaceInterface struct {
DisplayName *string `json:"displayName,omitempty"`
}
type ModelAvailabilityNux ¶
type ModelAvailabilityNux struct {
Message string `json:"message"`
}
type ModelInfo ¶
type ModelInfo struct {
ID string `json:"id"`
Model string `json:"model"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
Hidden bool `json:"hidden"`
IsDefault bool `json:"isDefault"`
DefaultReasoningEffort string `json:"defaultReasoningEffort"`
SupportedReasoningEfforts []ReasoningEffortOption `json:"supportedReasoningEfforts"`
InputModalities []string `json:"inputModalities,omitempty"`
SupportsPersonality bool `json:"supportsPersonality,omitempty"`
Upgrade *string `json:"upgrade,omitempty"`
UpgradeInfo *ModelUpgradeInfo `json:"upgradeInfo,omitempty"`
AvailabilityNux *ModelAvailabilityNux `json:"availabilityNux,omitempty"`
}
type ModelListParams ¶
type ModelListResult ¶
type ModelUpgradeInfo ¶
type Notification ¶
type Notification struct {
Method string
Params json.RawMessage
}
func (Notification) DecodeEvent ¶
func (n Notification) DecodeEvent() (NotificationEvent, error)
func (Notification) DecodeParams ¶
func (n Notification) DecodeParams(v any) error
type NotificationEvent ¶
type NotificationEvent interface {
NotificationMethod() string
}
func DecodeNotificationEvent ¶
func DecodeNotificationEvent(notification Notification) (NotificationEvent, error)
type NotificationHandler ¶
type NotificationHandler func(context.Context, Notification)
type PlanDeltaEvent ¶
type PlanDeltaEvent struct {
ItemID string `json:"itemId"`
Delta string `json:"delta"`
TurnID string `json:"turnId,omitempty"`
}
func (PlanDeltaEvent) NotificationMethod ¶
func (PlanDeltaEvent) NotificationMethod() string
type PluginDetail ¶
type PluginDetail struct {
Apps []AppSummary `json:"apps"`
Description *string `json:"description,omitempty"`
MarketplaceName string `json:"marketplaceName"`
MarketplacePath string `json:"marketplacePath"`
MCPServers []string `json:"mcpServers"`
Skills []SkillSummary `json:"skills"`
Summary PluginSummary `json:"summary"`
}
type PluginInterface ¶
type PluginInterface struct {
BrandColor *string `json:"brandColor,omitempty"`
Capabilities []string `json:"capabilities"`
Category *string `json:"category,omitempty"`
ComposerIcon *string `json:"composerIcon,omitempty"`
DefaultPrompt []string `json:"defaultPrompt,omitempty"`
DeveloperName *string `json:"developerName,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Logo *string `json:"logo,omitempty"`
LongDescription *string `json:"longDescription,omitempty"`
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
Screenshots []string `json:"screenshots"`
ShortDescription *string `json:"shortDescription,omitempty"`
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
WebsiteURL *string `json:"websiteUrl,omitempty"`
}
type PluginListParams ¶
type PluginListResult ¶
type PluginListResult struct {
Marketplaces []PluginMarketplaceEntry `json:"marketplaces"`
RemoteSyncError *string `json:"remoteSyncError,omitempty"`
}
type PluginMarketplaceEntry ¶
type PluginMarketplaceEntry struct {
Interface *MarketplaceInterface `json:"interface,omitempty"`
Name string `json:"name"`
Path string `json:"path"`
Plugins []PluginSummary `json:"plugins"`
}
type PluginReadParams ¶
type PluginReadResult ¶
type PluginReadResult struct {
Plugin PluginDetail `json:"plugin"`
}
type PluginSource ¶
type PluginSummary ¶
type PluginSummary struct {
AuthPolicy string `json:"authPolicy"`
Enabled bool `json:"enabled"`
ID string `json:"id"`
InstallPolicy string `json:"installPolicy"`
Installed bool `json:"installed"`
Interface *PluginInterface `json:"interface,omitempty"`
Name string `json:"name"`
Source PluginSource `json:"source"`
}
type ProcessExitError ¶
type ProcessExitError struct {
Err error
}
func (*ProcessExitError) Error ¶
func (e *ProcessExitError) Error() string
func (*ProcessExitError) Unwrap ¶
func (e *ProcessExitError) Unwrap() error
type ProcessExitHandler ¶
type ProcessExitHandler func(error)
type RateLimitBucket ¶
type RateLimitBucket struct {
Credits *CreditsSnapshot `json:"credits"`
LimitID *string `json:"limitId"`
LimitName *string `json:"limitName"`
PlanType *string `json:"planType"`
Primary *RateLimitWindow `json:"primary"`
Secondary *RateLimitWindow `json:"secondary"`
}
type RateLimitWindow ¶
type RateLimitsReadResult ¶
type RateLimitsReadResult struct {
RateLimits *RateLimitBucket `json:"rateLimits"`
RateLimitsByLimitID map[string]RateLimitBucket `json:"rateLimitsByLimitId,omitempty"`
}
type ReasoningEffortOption ¶
type ReasoningSummaryPartAddedEvent ¶
type ReasoningSummaryPartAddedEvent struct {
ItemID string `json:"itemId"`
SummaryIndex int64 `json:"summaryIndex"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
func (ReasoningSummaryPartAddedEvent) NotificationMethod ¶
func (ReasoningSummaryPartAddedEvent) NotificationMethod() string
type ReasoningSummaryTextDeltaEvent ¶
type ReasoningSummaryTextDeltaEvent struct {
ItemID string `json:"itemId"`
Delta string `json:"delta"`
SummaryIndex int64 `json:"summaryIndex"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
func (ReasoningSummaryTextDeltaEvent) NotificationMethod ¶
func (ReasoningSummaryTextDeltaEvent) NotificationMethod() string
type ReasoningTextDeltaEvent ¶
type ReasoningTextDeltaEvent struct {
ContentIndex int64 `json:"contentIndex"`
ItemID string `json:"itemId"`
Delta string `json:"delta"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
func (ReasoningTextDeltaEvent) NotificationMethod ¶
func (ReasoningTextDeltaEvent) NotificationMethod() string
type RestartPolicy ¶
type RestartPolicy string
const ( RestartPolicyNever RestartPolicy = "never" RestartPolicyAlways RestartPolicy = "always" )
type ReviewDelivery ¶
type ReviewDelivery string
const ( ReviewDeliveryInline ReviewDelivery = "inline" ReviewDeliveryDetached ReviewDelivery = "detached" )
type ReviewStartParams ¶
type ReviewStartParams struct {
ThreadID string `json:"threadId"`
Target ReviewTarget `json:"target"`
Delivery *ReviewDelivery `json:"delivery,omitempty"`
}
type ReviewStartResult ¶
type ReviewTarget ¶
type SkillDependencies ¶
type SkillDependencies struct {
Tools []SkillToolDependency `json:"tools"`
}
type SkillErrorInfo ¶
type SkillInterface ¶
type SkillInterface struct {
BrandColor *string `json:"brandColor,omitempty"`
DefaultPrompt *string `json:"defaultPrompt,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
IconLarge *string `json:"iconLarge,omitempty"`
IconSmall *string `json:"iconSmall,omitempty"`
ShortDescription *string `json:"shortDescription,omitempty"`
}
type SkillMetadata ¶
type SkillMetadata struct {
Dependencies *SkillDependencies `json:"dependencies,omitempty"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Interface *SkillInterface `json:"interface,omitempty"`
Name string `json:"name"`
Path string `json:"path"`
Scope string `json:"scope"`
ShortDescription *string `json:"shortDescription,omitempty"`
}
type SkillSummary ¶
type SkillSummary struct {
Description string `json:"description"`
Interface *SkillInterface `json:"interface,omitempty"`
Name string `json:"name"`
Path string `json:"path"`
ShortDescription *string `json:"shortDescription,omitempty"`
}
type SkillToolDependency ¶
type SkillsConfigWriteParams ¶
type SkillsConfigWriteResult ¶
type SkillsConfigWriteResult struct {
EffectiveEnabled bool `json:"effectiveEnabled"`
}
type SkillsListEntry ¶
type SkillsListEntry struct {
Cwd string `json:"cwd"`
Errors []SkillErrorInfo `json:"errors"`
Skills []SkillMetadata `json:"skills"`
}
type SkillsListParams ¶
type SkillsListParams struct {
Cwds []string `json:"cwds,omitempty"`
ForceReload bool `json:"forceReload,omitempty"`
PerCwdExtraUserRoots []SkillsListExtraRootsForCwd `json:"perCwdExtraUserRoots,omitempty"`
}
type SkillsListResult ¶
type SkillsListResult struct {
Data []SkillsListEntry `json:"data"`
}
type StartOptions ¶
type StartOptions struct {
Command string
Args []string
Dir string
Env []string
Stderr io.Writer
ClientInfo ClientInfo
Capabilities *Capabilities
RestartOnFailure bool
RestartPolicy RestartPolicy
}
func (StartOptions) SetExperimentalAPI ¶
func (o StartOptions) SetExperimentalAPI(enabled bool) StartOptions
func (StartOptions) SetNotificationOptOut ¶
func (o StartOptions) SetNotificationOptOut(methods ...string) StartOptions
type Thread ¶
type Thread struct {
ID string `json:"id"`
Name *string `json:"name,omitempty"`
Status *ThreadStatus `json:"status,omitempty"`
Turns []Turn `json:"turns,omitempty"`
}
type ThreadArchiveParams ¶
type ThreadArchiveParams struct {
ThreadID string `json:"threadId"`
}
type ThreadArchiveResult ¶
type ThreadArchiveResult struct{}
type ThreadArchivedEvent ¶
type ThreadArchivedEvent struct {
ThreadID string `json:"threadId,omitempty"`
Thread *Thread `json:"thread,omitempty"`
}
func (ThreadArchivedEvent) NotificationMethod ¶
func (ThreadArchivedEvent) NotificationMethod() string
type ThreadClosedEvent ¶
type ThreadClosedEvent struct {
ThreadID string `json:"threadId"`
}
func (ThreadClosedEvent) NotificationMethod ¶
func (ThreadClosedEvent) NotificationMethod() string
type ThreadCompactStartParams ¶
type ThreadCompactStartParams struct {
ThreadID string `json:"threadId"`
}
type ThreadCompactStartResult ¶
type ThreadCompactStartResult struct{}
type ThreadForkParams ¶
type ThreadForkParams struct {
ThreadID string `json:"threadId"`
ApprovalPolicy any `json:"approvalPolicy,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd *string `json:"cwd,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
Ephemeral bool `json:"ephemeral"`
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
Sandbox *string `json:"sandbox,omitempty"`
}
type ThreadForkResult ¶
type ThreadForkResult = ThreadStartResult
type ThreadItem ¶
type ThreadItem struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status,omitempty"`
Text string `json:"text,omitempty"`
Content json.RawMessage `json:"content,omitempty"`
Command string `json:"command,omitempty"`
Cwd string `json:"cwd,omitempty"`
AggregatedOutput string `json:"aggregatedOutput,omitempty"`
ExitCode *int `json:"exitCode,omitempty"`
DurationMs *int64 `json:"durationMs,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
Error json.RawMessage `json:"error,omitempty"`
Changes json.RawMessage `json:"changes,omitempty"`
}
type ThreadListParams ¶
type ThreadListParams struct {
Archived *bool `json:"archived,omitempty"`
Cursor *string `json:"cursor,omitempty"`
Cwd *string `json:"cwd,omitempty"`
Limit *uint32 `json:"limit,omitempty"`
ModelProviders []string `json:"modelProviders,omitempty"`
SearchTerm *string `json:"searchTerm,omitempty"`
SortKey *ThreadSortKey `json:"sortKey,omitempty"`
SourceKinds []ThreadSourceKind `json:"sourceKinds,omitempty"`
}
type ThreadListResult ¶
type ThreadLoadedListParams ¶
type ThreadLoadedListResult ¶
type ThreadNameUpdatedEvent ¶
func (ThreadNameUpdatedEvent) NotificationMethod ¶
func (ThreadNameUpdatedEvent) NotificationMethod() string
type ThreadReadParams ¶
type ThreadReadResult ¶
type ThreadReadResult struct {
Thread Thread `json:"thread"`
}
type ThreadResumeParams ¶
type ThreadResumeParams struct {
ThreadID string `json:"threadId"`
ApprovalPolicy any `json:"approvalPolicy,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd *string `json:"cwd,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
Sandbox *string `json:"sandbox,omitempty"`
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
Personality *string `json:"personality,omitempty"`
}
type ThreadResumeResult ¶
type ThreadResumeResult = ThreadStartResult
type ThreadRollbackParams ¶
type ThreadRollbackResult ¶
type ThreadRollbackResult struct {
Thread Thread `json:"thread"`
}
type ThreadSetNameParams ¶
type ThreadSetNameResult ¶
type ThreadSetNameResult struct{}
type ThreadSortKey ¶
type ThreadSortKey string
const ( ThreadSortKeyCreatedAt ThreadSortKey = "created_at" ThreadSortKeyUpdatedAt ThreadSortKey = "updated_at" )
type ThreadSourceKind ¶
type ThreadSourceKind string
const ( ThreadSourceKindCLI ThreadSourceKind = "cli" ThreadSourceKindVSCode ThreadSourceKind = "vscode" ThreadSourceKindExec ThreadSourceKind = "exec" ThreadSourceKindAppServer ThreadSourceKind = "appServer" ThreadSourceKindCustom ThreadSourceKind = "custom" ThreadSourceKindSubAgent ThreadSourceKind = "subAgent" ThreadSourceKindSubAgentReview ThreadSourceKind = "subAgentReview" ThreadSourceKindSubAgentCompact ThreadSourceKind = "subAgentCompact" ThreadSourceKindSubAgentThreadSpawn ThreadSourceKind = "subAgentThreadSpawn" ThreadSourceKindSubAgentOther ThreadSourceKind = "subAgentOther" ThreadSourceKindUnknown ThreadSourceKind = "unknown" )
type ThreadStartParams ¶
type ThreadStartParams struct {
ApprovalPolicy any `json:"approvalPolicy,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
BaseInstructions *string `json:"baseInstructions,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd *string `json:"cwd,omitempty"`
DeveloperInstructions *string `json:"developerInstructions,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
Ephemeral *bool `json:"ephemeral,omitempty"`
ServiceName *string `json:"serviceName,omitempty"`
Personality *string `json:"personality,omitempty"`
Model *string `json:"model,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
Sandbox *string `json:"sandbox,omitempty"`
}
type ThreadStartResult ¶
type ThreadStartResult struct {
ApprovalPolicy json.RawMessage `json:"approvalPolicy"`
ApprovalsReviewer string `json:"approvalsReviewer"`
Cwd string `json:"cwd"`
Model string `json:"model"`
ModelProvider string `json:"modelProvider"`
ReasoningEffort *string `json:"reasoningEffort,omitempty"`
Sandbox json.RawMessage `json:"sandbox"`
ServiceTier *string `json:"serviceTier,omitempty"`
Thread Thread `json:"thread"`
}
type ThreadStartedEvent ¶
type ThreadStartedEvent struct {
Thread Thread `json:"thread"`
}
func (ThreadStartedEvent) NotificationMethod ¶
func (ThreadStartedEvent) NotificationMethod() string
type ThreadStatus ¶
type ThreadStatusChangedEvent ¶
type ThreadStatusChangedEvent struct {
ThreadID string `json:"threadId"`
Status ThreadStatus `json:"status"`
}
func (ThreadStatusChangedEvent) NotificationMethod ¶
func (ThreadStatusChangedEvent) NotificationMethod() string
type ThreadTokenUsage ¶
type ThreadTokenUsage struct {
Last TokenUsageBreakdown `json:"last"`
ModelContextWindow *int64 `json:"modelContextWindow,omitempty"`
Total TokenUsageBreakdown `json:"total"`
}
type ThreadTokenUsageUpdatedEvent ¶
type ThreadTokenUsageUpdatedEvent struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
TokenUsage ThreadTokenUsage `json:"tokenUsage"`
}
func (ThreadTokenUsageUpdatedEvent) NotificationMethod ¶
func (ThreadTokenUsageUpdatedEvent) NotificationMethod() string
type ThreadUnarchiveParams ¶
type ThreadUnarchiveParams struct {
ThreadID string `json:"threadId"`
}
type ThreadUnarchiveResult ¶
type ThreadUnarchiveResult struct {
Thread Thread `json:"thread"`
}
type ThreadUnarchivedEvent ¶
type ThreadUnarchivedEvent struct {
Thread Thread `json:"thread"`
}
func (ThreadUnarchivedEvent) NotificationMethod ¶
func (ThreadUnarchivedEvent) NotificationMethod() string
type ThreadUnsubscribeParams ¶
type ThreadUnsubscribeParams struct {
ThreadID string `json:"threadId"`
}
type ThreadUnsubscribeResult ¶
type ThreadUnsubscribeResult struct {
Status ThreadUnsubscribeStatus `json:"status"`
}
type ThreadUnsubscribeStatus ¶
type ThreadUnsubscribeStatus string
const ( ThreadUnsubscribeStatusNotLoaded ThreadUnsubscribeStatus = "notLoaded" ThreadUnsubscribeStatusNotSubscribed ThreadUnsubscribeStatus = "notSubscribed" ThreadUnsubscribeStatusUnsubscribed ThreadUnsubscribeStatus = "unsubscribed" )
type TokenUsageBreakdown ¶
type ToolRequestUserInputAnswer ¶
type ToolRequestUserInputAnswer struct {
Answers []string `json:"answers"`
}
type ToolRequestUserInputHandler ¶
type ToolRequestUserInputHandler func(context.Context, ToolRequestUserInputParams) (*ToolRequestUserInputResult, error)
type ToolRequestUserInputParams ¶
type ToolRequestUserInputParams struct {
ItemID string `json:"itemId"`
Questions []ToolRequestUserInputQuestion `json:"questions"`
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
}
type ToolRequestUserInputResult ¶
type ToolRequestUserInputResult struct {
Answers map[string]ToolRequestUserInputAnswer `json:"answers"`
}
type Turn ¶
type Turn struct {
ID string `json:"id"`
Status string `json:"status,omitempty"`
Items []ThreadItem `json:"items,omitempty"`
Error *TurnError `json:"error,omitempty"`
}
type TurnCompletedEvent ¶
func (TurnCompletedEvent) NotificationMethod ¶
func (TurnCompletedEvent) NotificationMethod() string
type TurnDiffUpdatedEvent ¶
type TurnDiffUpdatedEvent struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
Diff string `json:"diff"`
}
func (TurnDiffUpdatedEvent) NotificationMethod ¶
func (TurnDiffUpdatedEvent) NotificationMethod() string
type TurnError ¶
type TurnError struct {
Message string `json:"message"`
CodexErrorInfo json.RawMessage `json:"codexErrorInfo,omitempty"`
AdditionalDetails json.RawMessage `json:"additionalDetails,omitempty"`
}
type TurnInterruptParams ¶
type TurnInterruptResult ¶
type TurnInterruptResult struct{}
type TurnPlanUpdatedEvent ¶
type TurnPlanUpdatedEvent struct {
TurnID string `json:"turnId"`
Explanation *string `json:"explanation,omitempty"`
Plan json.RawMessage `json:"plan"`
}
func (TurnPlanUpdatedEvent) NotificationMethod ¶
func (TurnPlanUpdatedEvent) NotificationMethod() string
type TurnStartInputItem ¶
type TurnStartParams ¶
type TurnStartParams struct {
ThreadID string `json:"threadId"`
Input []TurnStartInputItem `json:"input"`
ApprovalPolicy any `json:"approvalPolicy,omitempty"`
ApprovalsReviewer *string `json:"approvalsReviewer,omitempty"`
Cwd *string `json:"cwd,omitempty"`
Effort *string `json:"effort,omitempty"`
Model *string `json:"model,omitempty"`
OutputSchema any `json:"outputSchema,omitempty"`
Personality *string `json:"personality,omitempty"`
SandboxPolicy any `json:"sandboxPolicy,omitempty"`
ServiceTier *string `json:"serviceTier,omitempty"`
Summary *string `json:"summary,omitempty"`
}
type TurnStartResult ¶
type TurnStartResult struct {
Turn Turn `json:"turn"`
}
type TurnStartedEvent ¶
func (TurnStartedEvent) NotificationMethod ¶
func (TurnStartedEvent) NotificationMethod() string
type TurnSteerParams ¶
type TurnSteerParams struct {
ThreadID string `json:"threadId"`
ExpectedTurnID string `json:"expectedTurnId"`
Input []TurnStartInputItem `json:"input"`
}
type TurnSteerResult ¶
type TurnSteerResult struct {
TurnID string `json:"turnId"`
}
type WindowsSandboxSetupCompletedEvent ¶
type WindowsSandboxSetupCompletedEvent struct {
Mode WindowsSandboxSetupMode `json:"mode"`
Success bool `json:"success"`
Error *string `json:"error"`
}
func (WindowsSandboxSetupCompletedEvent) NotificationMethod ¶
func (WindowsSandboxSetupCompletedEvent) NotificationMethod() string
type WindowsSandboxSetupMode ¶
type WindowsSandboxSetupMode string
const ( WindowsSandboxSetupModeElevated WindowsSandboxSetupMode = "elevated" WindowsSandboxSetupModeUnelevated WindowsSandboxSetupMode = "unelevated" )
type WindowsSandboxSetupStartParams ¶
type WindowsSandboxSetupStartParams struct {
Cwd *string `json:"cwd,omitempty"`
Mode WindowsSandboxSetupMode `json:"mode"`
}
type WindowsSandboxSetupStartResult ¶
type WindowsSandboxSetupStartResult struct {
Started bool `json:"started"`
}
Click to show internal directories.
Click to hide internal directories.