Documentation
¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type Agent
- type AgentListParams
- type AgentMode
- type AgentModel
- type AgentPart
- type AgentPartInputParam
- type AgentPartInputSourceParam
- type AgentPartInputType
- type AgentPartSource
- type AgentPartType
- type AgentService
- type AppLogParams
- type AppLogParamsLevel
- type AppProvidersParams
- type AppProvidersResponsedeprecated
- type AppService
- type AssistantMessage
- type AssistantMessageError
- type AssistantMessageErrorAPIError
- type AssistantMessageErrorAPIErrorData
- type AssistantMessageErrorAPIErrorName
- type AssistantMessageErrorContextOverflowError
- type AssistantMessageErrorContextOverflowErrorData
- type AssistantMessageErrorContextOverflowErrorName
- type AssistantMessageErrorMessageOutputLengthError
- type AssistantMessageErrorMessageOutputLengthErrorData
- type AssistantMessageErrorMessageOutputLengthErrorName
- type AssistantMessageErrorName
- type AssistantMessageErrorStructuredOutputError
- type AssistantMessageErrorStructuredOutputErrorData
- type AssistantMessageErrorStructuredOutputErrorName
- type AssistantMessageErrorUnion
- type AssistantMessagePath
- type AssistantMessageRole
- type AssistantMessageTime
- type AssistantMessageTokens
- type AssistantMessageTokensCache
- type Auth
- type AuthAPI
- type AuthOAuth
- type AuthRemoveParamsdeprecated
- type AuthService
- type AuthSetParamsdeprecated
- type AuthSetParamsAPI
- type AuthSetParamsOAuth
- type AuthSetParamsUnion
- type AuthSetParamsWellKnown
- type AuthUnion
- type AuthWellKnown
- type BadRequestError
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Command
- type CommandListParams
- type CommandService
- type CommandSource
- type CompactionPart
- type CompactionPartInputParam
- type CompactionPartInputType
- type CompactionPartType
- type Config
- type ConfigAgent
- type ConfigAgentEntry
- type ConfigAgentEntryMode
- type ConfigAutoupdateString
- type ConfigAutoupdateUnion
- type ConfigCommand
- type ConfigCompaction
- type ConfigEnterprise
- type ConfigExperimental
- type ConfigFormatter
- type ConfigFormatterBool
- type ConfigFormatterObject
- type ConfigFormatterUnion
- type ConfigGetParams
- type ConfigLogLevel
- type ConfigLsp
- type ConfigLspConfigBool
- type ConfigLspConfigObject
- type ConfigLspConfigUnion
- type ConfigLspDisabled
- type ConfigLspDisabledDisabled
- type ConfigLspObject
- type ConfigLspUnion
- type ConfigMcp
- type ConfigMcpDisabled
- type ConfigMcpType
- type ConfigMcpUnion
- type ConfigMode
- type ConfigPluginItem
- type ConfigPluginItemString
- type ConfigPluginItemTuple
- type ConfigPluginItemUnion
- type ConfigProvider
- type ConfigProviderModel
- type ConfigProviderModelInterleaved
- type ConfigProviderModelInterleavedBool
- type ConfigProviderModelInterleavedObject
- type ConfigProviderModelInterleavedUnion
- type ConfigProviderModelVariant
- type ConfigProviderModelsCost
- type ConfigProviderModelsCostContextOver200K
- type ConfigProviderModelsLimit
- type ConfigProviderModelsModalities
- type ConfigProviderModelsModalitiesInput
- type ConfigProviderModelsModalitiesOutput
- type ConfigProviderModelsProvider
- type ConfigProviderModelsStatus
- type ConfigProviderOptions
- type ConfigProviderOptionsTimeoutFalse
- type ConfigProviderOptionsTimeoutUnion
- type ConfigProvidersParams
- type ConfigProvidersResponse
- type ConfigService
- func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Config, err error)
- func (r *ConfigService) Providers(ctx context.Context, query ConfigProvidersParams, opts ...option.RequestOption) (res *ConfigProvidersResponse, err error)
- func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, opts ...option.RequestOption) (res *Config, err error)
- type ConfigShare
- type ConfigSkills
- type ConfigUpdateParams
- type ConfigUpdateParamsCompaction
- type ConfigUpdateParamsEnterprise
- type ConfigUpdateParamsServer
- type ConfigUpdateParamsSkills
- type ConfigUpdateParamsWatcher
- type ConfigWatcher
- type ConsoleGetParams
- type ConsoleListOrgsParams
- type ConsoleListOrgsResponse
- type ConsoleOrg
- type ConsoleService
- func (r *ConsoleService) Get(ctx context.Context, query ConsoleGetParams, opts ...option.RequestOption) (res *ConsoleState, err error)
- func (r *ConsoleService) ListOrgs(ctx context.Context, query ConsoleListOrgsParams, opts ...option.RequestOption) (res *ConsoleListOrgsResponse, err error)
- func (r *ConsoleService) SwitchOrg(ctx context.Context, params ConsoleSwitchOrgParams, ...) (res *bool, err error)
- type ConsoleState
- type ConsoleSwitchOrgParams
- type Error
- type EventListParams
- type EventListResponse
- type EventListResponseEventCommandExecuted
- type EventListResponseEventCommandExecutedProperties
- type EventListResponseEventCommandExecutedType
- type EventListResponseEventFileEdited
- type EventListResponseEventFileEditedProperties
- type EventListResponseEventFileEditedType
- type EventListResponseEventFileWatcherUpdated
- type EventListResponseEventFileWatcherUpdatedProperties
- type EventListResponseEventFileWatcherUpdatedPropertiesEvent
- type EventListResponseEventFileWatcherUpdatedType
- type EventListResponseEventGlobalDisposed
- type EventListResponseEventGlobalDisposedType
- type EventListResponseEventInstallationUpdateAvailable
- type EventListResponseEventInstallationUpdateAvailableProperties
- type EventListResponseEventInstallationUpdateAvailableType
- type EventListResponseEventInstallationUpdated
- type EventListResponseEventInstallationUpdatedProperties
- type EventListResponseEventInstallationUpdatedType
- type EventListResponseEventLspClientDiagnostics
- type EventListResponseEventLspClientDiagnosticsProperties
- type EventListResponseEventLspClientDiagnosticsType
- type EventListResponseEventLspUpdated
- type EventListResponseEventLspUpdatedType
- type EventListResponseEventMcpBrowserOpenFailed
- type EventListResponseEventMcpBrowserOpenFailedProperties
- type EventListResponseEventMcpBrowserOpenFailedType
- type EventListResponseEventMcpToolsChanged
- type EventListResponseEventMcpToolsChangedProperties
- type EventListResponseEventMcpToolsChangedType
- type EventListResponseEventMessagePartDelta
- type EventListResponseEventMessagePartDeltaProperties
- type EventListResponseEventMessagePartDeltaType
- type EventListResponseEventMessagePartRemoved
- type EventListResponseEventMessagePartRemovedProperties
- type EventListResponseEventMessagePartRemovedType
- type EventListResponseEventMessagePartUpdated
- type EventListResponseEventMessagePartUpdatedProperties
- type EventListResponseEventMessagePartUpdatedType
- type EventListResponseEventMessageRemoved
- type EventListResponseEventMessageRemovedProperties
- type EventListResponseEventMessageRemovedType
- type EventListResponseEventMessageUpdated
- type EventListResponseEventMessageUpdatedProperties
- type EventListResponseEventMessageUpdatedType
- type EventListResponseEventPermissionAsked
- type EventListResponseEventPermissionAskedType
- type EventListResponseEventPermissionReplied
- type EventListResponseEventPermissionRepliedProperties
- type EventListResponseEventPermissionRepliedType
- type EventListResponseEventProjectUpdated
- type EventListResponseEventProjectUpdatedType
- type EventListResponseEventPtyCreated
- type EventListResponseEventPtyCreatedProperties
- type EventListResponseEventPtyCreatedType
- type EventListResponseEventPtyDeleted
- type EventListResponseEventPtyDeletedProperties
- type EventListResponseEventPtyDeletedType
- type EventListResponseEventPtyExited
- type EventListResponseEventPtyExitedProperties
- type EventListResponseEventPtyExitedType
- type EventListResponseEventPtyUpdated
- type EventListResponseEventPtyUpdatedProperties
- type EventListResponseEventPtyUpdatedType
- type EventListResponseEventQuestionAsked
- type EventListResponseEventQuestionAskedType
- type EventListResponseEventQuestionRejected
- type EventListResponseEventQuestionRejectedType
- type EventListResponseEventQuestionReplied
- type EventListResponseEventQuestionRepliedType
- type EventListResponseEventServerConnected
- type EventListResponseEventServerConnectedType
- type EventListResponseEventServerInstanceDisposed
- type EventListResponseEventServerInstanceDisposedProperties
- type EventListResponseEventServerInstanceDisposedType
- type EventListResponseEventSessionCompacted
- type EventListResponseEventSessionCompactedProperties
- type EventListResponseEventSessionCompactedType
- type EventListResponseEventSessionCreated
- type EventListResponseEventSessionCreatedProperties
- type EventListResponseEventSessionCreatedType
- type EventListResponseEventSessionDeleted
- type EventListResponseEventSessionDeletedProperties
- type EventListResponseEventSessionDeletedType
- type EventListResponseEventSessionDiff
- type EventListResponseEventSessionDiffProperties
- type EventListResponseEventSessionDiffType
- type EventListResponseEventSessionError
- type EventListResponseEventSessionErrorProperties
- type EventListResponseEventSessionErrorPropertiesError
- type EventListResponseEventSessionErrorPropertiesErrorAPIError
- type EventListResponseEventSessionErrorPropertiesErrorAPIErrorData
- type EventListResponseEventSessionErrorPropertiesErrorAPIErrorName
- type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError
- type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorData
- type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName
- type EventListResponseEventSessionErrorPropertiesErrorName
- type EventListResponseEventSessionErrorPropertiesErrorUnion
- type EventListResponseEventSessionErrorType
- type EventListResponseEventSessionIdle
- type EventListResponseEventSessionIdleProperties
- type EventListResponseEventSessionIdleType
- type EventListResponseEventSessionStatus
- type EventListResponseEventSessionStatusProperties
- type EventListResponseEventSessionStatusType
- type EventListResponseEventSessionUpdated
- type EventListResponseEventSessionUpdatedProperties
- type EventListResponseEventSessionUpdatedType
- type EventListResponseEventTodoUpdated
- type EventListResponseEventTodoUpdatedProperties
- type EventListResponseEventTodoUpdatedPropertiesTodo
- type EventListResponseEventTodoUpdatedType
- type EventListResponseEventTuiCommandExecute
- type EventListResponseEventTuiCommandExecuteProperties
- type EventListResponseEventTuiCommandExecuteType
- type EventListResponseEventTuiPromptAppend
- type EventListResponseEventTuiPromptAppendProperties
- type EventListResponseEventTuiPromptAppendType
- type EventListResponseEventTuiSessionSelect
- type EventListResponseEventTuiSessionSelectProperties
- type EventListResponseEventTuiSessionSelectType
- type EventListResponseEventTuiToastShow
- type EventListResponseEventTuiToastShowProperties
- type EventListResponseEventTuiToastShowPropertiesVariant
- type EventListResponseEventTuiToastShowType
- type EventListResponseEventVcsBranchUpdated
- type EventListResponseEventVcsBranchUpdatedProperties
- type EventListResponseEventVcsBranchUpdatedType
- type EventListResponseEventWorkspaceFailed
- type EventListResponseEventWorkspaceFailedProperties
- type EventListResponseEventWorkspaceFailedType
- type EventListResponseEventWorkspaceReady
- type EventListResponseEventWorkspaceReadyProperties
- type EventListResponseEventWorkspaceReadyType
- type EventListResponseEventWorkspaceRestore
- type EventListResponseEventWorkspaceRestoreProperties
- type EventListResponseEventWorkspaceRestoreType
- type EventListResponseEventWorkspaceStatus
- type EventListResponseEventWorkspaceStatusProperties
- type EventListResponseEventWorkspaceStatusPropertiesStatus
- type EventListResponseEventWorkspaceStatusType
- type EventListResponseEventWorktreeFailed
- type EventListResponseEventWorktreeFailedProperties
- type EventListResponseEventWorktreeFailedType
- type EventListResponseEventWorktreeReady
- type EventListResponseEventWorktreeReadyProperties
- type EventListResponseEventWorktreeReadyType
- type EventListResponseType
- type EventListResponseUnion
- type EventService
- type ExperimentalService
- type ExperimentalSessionListParams
- type ExperimentalSessionService
- type File
- type FileListParams
- type FileNode
- type FileNodeType
- type FilePart
- type FilePartInputParam
- type FilePartInputType
- type FilePartSource
- type FilePartSourceParam
- type FilePartSourceText
- type FilePartSourceTextParam
- type FilePartSourceType
- type FilePartSourceUnion
- type FilePartSourceUnionParam
- type FilePartType
- type FileReadParams
- type FileReadResponse
- type FileReadResponseEncoding
- type FileReadResponsePatch
- type FileReadResponsePatchHunk
- type FileReadResponseType
- type FileService
- func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *[]FileNode, err error)
- func (r *FileService) Read(ctx context.Context, query FileReadParams, opts ...option.RequestOption) (res *FileReadResponse, err error)
- func (r *FileService) Status(ctx context.Context, query FileStatusParams, opts ...option.RequestOption) (res *[]File, err error)
- type FileSource
- type FileSourceParam
- type FileSourceType
- type FileStatus
- type FileStatusParams
- type FindFilesParams
- type FindFilesParamsDirs
- type FindFilesParamsType
- type FindService
- func (r *FindService) Files(ctx context.Context, query FindFilesParams, opts ...option.RequestOption) (res *[]string, err error)
- func (r *FindService) Symbols(ctx context.Context, query FindSymbolsParams, opts ...option.RequestOption) (res *[]Symbol, err error)
- func (r *FindService) Text(ctx context.Context, query FindTextParams, opts ...option.RequestOption) (res *[]FindTextResponse, err error)
- type FindSymbolsParams
- type FindTextParams
- type FindTextResponse
- type FindTextResponseLines
- type FindTextResponsePath
- type FindTextResponseSubmatch
- type FindTextResponseSubmatchesMatch
- type FormatterService
- type FormatterStatus
- type FormatterStatusParams
- type GlobalConfigService
- type GlobalConfigUpdateParams
- type GlobalEvent
- type GlobalHealthResponse
- type GlobalService
- func (r *GlobalService) Dispose(ctx context.Context, opts ...option.RequestOption) (res *bool, err error)
- func (r *GlobalService) Event(ctx context.Context, opts ...option.RequestOption) (stream *ssestream.Stream[GlobalEvent])
- func (r *GlobalService) Health(ctx context.Context, opts ...option.RequestOption) (res *GlobalHealthResponse, err error)
- func (r *GlobalService) Upgrade(ctx context.Context, params GlobalUpgradeParams, opts ...option.RequestOption) (res *GlobalUpgradeResponse, err error)
- type GlobalSession
- type GlobalUpgradeParams
- type GlobalUpgradeResponse
- type GlobalUpgradeResponseFailure
- type GlobalUpgradeResponseSuccess
- type GlobalUpgradeResponseUnion
- type InstanceDisposeParams
- type InstanceService
- type LayoutConfig
- type LspService
- type LspStatus
- type LspStatusParams
- type LspStatusStatus
- type McpAddConfigOAuthDisabledParam
- type McpAddConfigOAuthParam
- type McpAddConfigOAuthUnionParam
- type McpAddConfigParam
- type McpAddParams
- type McpAuthAuthenticateParams
- type McpAuthCallbackParams
- type McpAuthRemoveParams
- type McpAuthRemoveResponse
- type McpAuthStartParams
- type McpAuthStartResponse
- type McpConnectParams
- type McpDisconnectParams
- type McpLocalConfig
- type McpLocalConfigType
- type McpOAuthConfig
- type McpRemoteConfig
- type McpRemoteConfigOAuth
- type McpRemoteConfigOAuthFalse
- type McpRemoteConfigType
- type McpResource
- type McpService
- func (r *McpService) Add(ctx context.Context, params McpAddParams, opts ...option.RequestOption) (res *map[string]McpStatus, err error)
- func (r *McpService) AuthAuthenticate(ctx context.Context, name string, params McpAuthAuthenticateParams, ...) (res *McpStatus, err error)
- func (r *McpService) AuthCallback(ctx context.Context, name string, params McpAuthCallbackParams, ...) (res *McpStatus, err error)
- func (r *McpService) AuthRemove(ctx context.Context, name string, params McpAuthRemoveParams, ...) (res *McpAuthRemoveResponse, err error)
- func (r *McpService) AuthStart(ctx context.Context, name string, params McpAuthStartParams, ...) (res *McpAuthStartResponse, err error)
- func (r *McpService) Connect(ctx context.Context, name string, params McpConnectParams, ...) (res *bool, err error)
- func (r *McpService) Disconnect(ctx context.Context, name string, params McpDisconnectParams, ...) (res *bool, err error)
- func (r *McpService) Status(ctx context.Context, query McpStatusParams, opts ...option.RequestOption) (res *map[string]McpStatus, err error)
- type McpStatus
- type McpStatusConnected
- type McpStatusDisabled
- type McpStatusFailed
- type McpStatusNeedsAuth
- type McpStatusNeedsClientRegistration
- type McpStatusParams
- type McpStatusUnion
- type Message
- type MessageAbortedError
- type MessageAbortedErrorData
- type MessageAbortedErrorName
- type MessageRole
- type MessageUnion
- type Model
- type ModelAPI
- type ModelCapabilities
- type ModelCapabilitiesInterleaved
- type ModelCapabilitiesInterleavedBool
- type ModelCapabilitiesInterleavedField
- type ModelCapabilitiesInterleavedObject
- type ModelCapabilitiesInterleavedUnion
- type ModelCapabilitiesModality
- type ModelCost
- type ModelCostCache
- type ModelCostExperimentalOver200K
- type ModelLimit
- type ModelStatus
- type NotFoundError
- type NotFoundErrorData
- type NotFoundErrorName
- type OutputFormat
- type OutputFormatJsonSchema
- type OutputFormatJsonSchemaParam
- type OutputFormatJsonSchemaType
- type OutputFormatParam
- type OutputFormatText
- type OutputFormatTextParam
- type OutputFormatTextType
- type OutputFormatUnion
- type Part
- type PartType
- type PartUnion
- type PatchPart
- type PatchPartInputParam
- type PatchPartInputType
- type PatchPartType
- type Path
- type PathGetParams
- type PathService
- type PermissionAction
- type PermissionActionConfig
- type PermissionConfig
- type PermissionConfigObject
- type PermissionListParams
- type PermissionObjectConfig
- type PermissionReplyParams
- type PermissionReplyParamsReply
- type PermissionRequest
- type PermissionRequestTool
- type PermissionRule
- type PermissionRuleConfig
- type PermissionRuleParam
- type PermissionService
- type Project
- type ProjectCommands
- type ProjectCurrentParams
- type ProjectIcon
- type ProjectInitGitParams
- type ProjectListParams
- type ProjectService
- func (r *ProjectService) Current(ctx context.Context, query ProjectCurrentParams, opts ...option.RequestOption) (res *Project, err error)
- func (r *ProjectService) InitGit(ctx context.Context, params ProjectInitGitParams, opts ...option.RequestOption) (res *Project, err error)
- func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *[]Project, err error)
- func (r *ProjectService) Update(ctx context.Context, projectID string, params ProjectUpdateParams, ...) (res *Project, err error)
- type ProjectSummary
- type ProjectTime
- type ProjectUpdateParams
- type ProjectUpdateParamsCommands
- type ProjectUpdateParamsIcon
- type ProjectVcs
- type Provider
- type ProviderAuthAuthorization
- type ProviderAuthAuthorizationMethod
- type ProviderAuthError
- type ProviderAuthErrorData
- type ProviderAuthErrorName
- type ProviderAuthMethod
- type ProviderAuthMethodPrompt
- type ProviderAuthMethodPromptSelect
- type ProviderAuthMethodPromptSelectOption
- type ProviderAuthMethodPromptSelectType
- type ProviderAuthMethodPromptText
- type ProviderAuthMethodPromptTextType
- type ProviderAuthMethodPromptUnion
- type ProviderAuthMethodPromptWhen
- type ProviderAuthMethodPromptWhenOp
- type ProviderAuthMethodType
- type ProviderAuthParams
- type ProviderListParams
- type ProviderListResponse
- type ProviderOAuthAuthorizeParams
- type ProviderOAuthCallbackParams
- type ProviderService
- func (r *ProviderService) Auth(ctx context.Context, query ProviderAuthParams, opts ...option.RequestOption) (res *map[string][]ProviderAuthMethod, err error)
- func (r *ProviderService) List(ctx context.Context, query ProviderListParams, opts ...option.RequestOption) (res *ProviderListResponse, err error)
- func (r *ProviderService) OAuthAuthorize(ctx context.Context, providerID string, params ProviderOAuthAuthorizeParams, ...) (res *ProviderAuthAuthorization, err error)
- func (r *ProviderService) OAuthCallback(ctx context.Context, providerID string, params ProviderOAuthCallbackParams, ...) (res *bool, err error)
- type ProviderSource
- type Pty
- type PtyCreateParams
- type PtyGetParams
- type PtyListParams
- type PtyRemoveParams
- type PtyService
- func (r *PtyService) Create(ctx context.Context, params PtyCreateParams, opts ...option.RequestOption) (res *Pty, err error)
- func (r *PtyService) Get(ctx context.Context, ptyID string, query PtyGetParams, ...) (res *Pty, err error)
- func (r *PtyService) List(ctx context.Context, query PtyListParams, opts ...option.RequestOption) (res *[]Pty, err error)
- func (r *PtyService) Remove(ctx context.Context, ptyID string, params PtyRemoveParams, ...) (res *bool, err error)
- func (r *PtyService) Update(ctx context.Context, ptyID string, params PtyUpdateParams, ...) (res *Pty, err error)
- type PtyStatus
- type PtyUpdateParams
- type PtyUpdateSize
- type QuestionAnswer
- type QuestionInfo
- type QuestionListParams
- type QuestionOption
- type QuestionRejectParams
- type QuestionRejected
- type QuestionReplied
- type QuestionReplyParams
- type QuestionRequest
- type QuestionService
- func (r *QuestionService) List(ctx context.Context, query QuestionListParams, opts ...option.RequestOption) (res *[]QuestionRequest, err error)
- func (r *QuestionService) Reject(ctx context.Context, requestID string, params QuestionRejectParams, ...) (res *bool, err error)
- func (r *QuestionService) Reply(ctx context.Context, requestID string, params QuestionReplyParams, ...) (res *bool, err error)
- type QuestionTool
- type ReasoningPart
- type ReasoningPartInputParam
- type ReasoningPartInputTimeParam
- type ReasoningPartInputType
- type ReasoningPartTime
- type ReasoningPartType
- type ResourceListParams
- type ResourceService
- type ResourceSource
- type ResourceSourceParam
- type ResourceSourceType
- type RetryPart
- type RetryPartError
- type RetryPartErrorData
- type RetryPartErrorName
- type RetryPartInputErrorDataParam
- type RetryPartInputErrorParam
- type RetryPartInputParam
- type RetryPartInputTimeParam
- type RetryPartInputType
- type RetryPartTime
- type RetryPartType
- type ServerConfig
- type Session
- type SessionAbortParams
- type SessionChildrenParams
- type SessionCommandParams
- type SessionCommandParamsPart
- type SessionCommandResponse
- type SessionDeleteMessageParams
- type SessionDeleteParams
- type SessionDeletePartParams
- type SessionDiffParams
- type SessionForkParams
- type SessionGetParams
- type SessionInitParams
- type SessionListParams
- type SessionMessageParams
- type SessionMessageResponse
- type SessionMessagesParams
- type SessionMessagesResponse
- type SessionNewParams
- type SessionPermissionRespondParams
- type SessionPermissionRespondParamsResponse
- type SessionPermissionService
- type SessionPromptAsyncParams
- type SessionPromptParams
- type SessionPromptParamsModel
- type SessionPromptParamsPart
- type SessionPromptParamsPartUnion
- type SessionPromptParamsPartsType
- type SessionPromptResponse
- type SessionRevert
- type SessionRevertParams
- type SessionService
- func (r *SessionService) Abort(ctx context.Context, id string, query SessionAbortParams, ...) (res *bool, err error)
- func (r *SessionService) Children(ctx context.Context, id string, query SessionChildrenParams, ...) (res *[]Session, err error)
- func (r *SessionService) Command(ctx context.Context, id string, params SessionCommandParams, ...) (res *SessionCommandResponse, err error)
- func (r *SessionService) Delete(ctx context.Context, id string, query SessionDeleteParams, ...) (res *bool, err error)
- func (r *SessionService) DeleteMessage(ctx context.Context, id string, messageID string, ...) (res *bool, err error)
- func (r *SessionService) DeletePart(ctx context.Context, id string, messageID string, partID string, ...) (res *bool, err error)
- func (r *SessionService) Diff(ctx context.Context, id string, query SessionDiffParams, ...) (res *[]SnapshotFileDiff, err error)
- func (r *SessionService) Fork(ctx context.Context, id string, body SessionForkParams, ...) (res *Session, err error)
- func (r *SessionService) Get(ctx context.Context, id string, query SessionGetParams, ...) (res *Session, err error)
- func (r *SessionService) Init(ctx context.Context, id string, params SessionInitParams, ...) (res *bool, err error)
- func (r *SessionService) List(ctx context.Context, query SessionListParams, opts ...option.RequestOption) (res *[]Session, err error)
- func (r *SessionService) Message(ctx context.Context, id string, messageID string, query SessionMessageParams, ...) (res *SessionMessageResponse, err error)
- func (r *SessionService) Messages(ctx context.Context, id string, query SessionMessagesParams, ...) (res *[]SessionMessagesResponse, err error)
- func (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *Session, err error)
- func (r *SessionService) Prompt(ctx context.Context, id string, params SessionPromptParams, ...) (res *SessionPromptResponse, err error)
- func (r *SessionService) PromptAsync(ctx context.Context, id string, params SessionPromptAsyncParams, ...) (err error)
- func (r *SessionService) Revert(ctx context.Context, id string, params SessionRevertParams, ...) (res *Session, err error)
- func (r *SessionService) Share(ctx context.Context, id string, query SessionShareParams, ...) (res *Session, err error)
- func (r *SessionService) Shell(ctx context.Context, id string, params SessionShellParams, ...) (res *SessionShellResponse, err error)
- func (r *SessionService) Status(ctx context.Context, query SessionStatusParams, opts ...option.RequestOption) (res *map[string]SessionStatus, err error)
- func (r *SessionService) Summarize(ctx context.Context, id string, params SessionSummarizeParams, ...) (res *bool, err error)
- func (r *SessionService) Todo(ctx context.Context, id string, query SessionTodoParams, ...) (res *[]Todo, err error)
- func (r *SessionService) Unrevert(ctx context.Context, id string, query SessionUnrevertParams, ...) (res *Session, err error)
- func (r *SessionService) Unshare(ctx context.Context, id string, query SessionUnshareParams, ...) (res *Session, err error)
- func (r *SessionService) Update(ctx context.Context, id string, params SessionUpdateParams, ...) (res *Session, err error)
- func (r *SessionService) UpdatePart(ctx context.Context, id string, messageID string, partID string, ...) (res *Part, err error)
- type SessionShare
- type SessionShareParams
- type SessionShellParams
- type SessionShellParamsModel
- type SessionShellResponse
- type SessionStatus
- type SessionStatusParams
- type SessionStatusType
- type SessionSummarizeParams
- type SessionSummary
- type SessionSummaryDiff
- type SessionTime
- type SessionTodoParams
- type SessionUnrevertParams
- type SessionUnshareParams
- type SessionUpdateParams
- type SessionUpdateParamsTime
- type SessionUpdatePartBody
- type SessionUpdatePartParams
- type SkillItem
- type SkillListParams
- type SkillService
- type SnapshotFileDiff
- type SnapshotFileDiffStatus
- type SnapshotPart
- type SnapshotPartInputParam
- type SnapshotPartInputType
- type SnapshotPartType
- type StepFinishPart
- type StepFinishPartInputParam
- type StepFinishPartInputTokensCacheParam
- type StepFinishPartInputTokensParam
- type StepFinishPartInputType
- type StepFinishPartTokens
- type StepFinishPartTokensCache
- type StepFinishPartType
- type StepStartPart
- type StepStartPartInputParam
- type StepStartPartInputType
- type StepStartPartType
- type SubtaskPart
- type SubtaskPartInputModelParam
- type SubtaskPartInputParam
- type SubtaskPartInputType
- type SubtaskPartModel
- type SubtaskPartType
- type Symbol
- type SymbolLocation
- type SymbolLocationRange
- type SymbolLocationRangeEnd
- type SymbolLocationRangeStart
- type SymbolSource
- type SymbolSourceParam
- type SymbolSourceRange
- type SymbolSourceRangeEnd
- type SymbolSourceRangeEndParam
- type SymbolSourceRangeParam
- type SymbolSourceRangeStart
- type SymbolSourceRangeStartParam
- type SymbolSourceType
- type SyncEvent
- type SyncEventMessagePartRemoved
- type SyncEventMessagePartUpdated
- type SyncEventMessageRemoved
- type SyncEventMessageUpdated
- type SyncEventSessionCreated
- type SyncEventSessionDeleted
- type SyncEventSessionUpdated
- type SyncEventSessionUpdatedData
- type SyncEventSessionUpdatedDataInfo
- type SyncEventSessionUpdatedDataInfoRevert
- type SyncEventSessionUpdatedDataInfoShare
- type SyncEventSessionUpdatedDataInfoSummary
- type SyncEventSessionUpdatedDataInfoTime
- type SyncEventType
- type SyncEventUnion
- type SyncHistoryEvent
- type SyncHistoryParams
- type SyncReplayEvent
- type SyncReplayParams
- type SyncReplayResponse
- type SyncService
- func (r *SyncService) History(ctx context.Context, params SyncHistoryParams, opts ...option.RequestOption) (res *[]SyncHistoryEvent, err error)
- func (r *SyncService) Replay(ctx context.Context, params SyncReplayParams, opts ...option.RequestOption) (res *SyncReplayResponse, err error)
- func (r *SyncService) Start(ctx context.Context, params SyncStartParams, opts ...option.RequestOption) (res *bool, err error)
- type SyncStartParams
- type TextPart
- type TextPartInputParam
- type TextPartInputTimeParam
- type TextPartInputType
- type TextPartTime
- type TextPartType
- type Todo
- type ToolIDsParams
- type ToolListItem
- type ToolListParams
- type ToolPart
- type ToolPartInputParam
- type ToolPartInputStateUnionParam
- type ToolPartInputType
- type ToolPartState
- type ToolPartStateStatus
- type ToolPartStateUnion
- type ToolPartType
- type ToolService
- type ToolStateCompleted
- type ToolStateCompletedParam
- type ToolStateCompletedParamStatus
- type ToolStateCompletedStatus
- type ToolStateCompletedTime
- type ToolStateCompletedTimeParam
- type ToolStateError
- type ToolStateErrorParam
- type ToolStateErrorParamStatus
- type ToolStateErrorStatus
- type ToolStateErrorTime
- type ToolStateErrorTimeParam
- type ToolStatePending
- type ToolStatePendingParam
- type ToolStatePendingParamStatus
- type ToolStatePendingStatus
- type ToolStateRunning
- type ToolStateRunningParam
- type ToolStateRunningParamStatus
- type ToolStateRunningStatus
- type ToolStateRunningTime
- type ToolStateRunningTimeParam
- type TuiAppendPromptParams
- type TuiClearPromptParams
- type TuiCommand
- type TuiControlNextParams
- type TuiControlNextResponse
- type TuiControlResponseParams
- type TuiControlService
- type TuiExecuteCommandParams
- type TuiOpenHelpParams
- type TuiOpenModelsParams
- type TuiOpenSessionsParams
- type TuiOpenThemesParams
- type TuiPublishBody
- type TuiPublishBodyCommandExecute
- type TuiPublishBodyCommandExecuteProperties
- type TuiPublishBodyPromptAppend
- type TuiPublishBodyPromptAppendProperties
- type TuiPublishBodySessionSelect
- type TuiPublishBodySessionSelectProperties
- type TuiPublishBodyToastShow
- type TuiPublishBodyToastShowProperties
- type TuiPublishParams
- type TuiSelectSessionParams
- type TuiService
- func (r *TuiService) AppendPrompt(ctx context.Context, params TuiAppendPromptParams, ...) (res *bool, err error)
- func (r *TuiService) ClearPrompt(ctx context.Context, body TuiClearPromptParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) ExecuteCommand(ctx context.Context, params TuiExecuteCommandParams, ...) (res *bool, err error)
- func (r *TuiService) OpenHelp(ctx context.Context, body TuiOpenHelpParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) OpenModels(ctx context.Context, body TuiOpenModelsParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) OpenSessions(ctx context.Context, body TuiOpenSessionsParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) OpenThemes(ctx context.Context, body TuiOpenThemesParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) Publish(ctx context.Context, params TuiPublishParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) SelectSession(ctx context.Context, params TuiSelectSessionParams, ...) (res *bool, err error)
- func (r *TuiService) ShowToast(ctx context.Context, params TuiShowToastParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *TuiService) SubmitPrompt(ctx context.Context, body TuiSubmitPromptParams, opts ...option.RequestOption) (res *bool, err error)
- type TuiShowToastParams
- type TuiShowToastParamsVariant
- type TuiSubmitPromptParams
- type UnknownError
- type UnknownErrorData
- type UnknownErrorName
- type UserMessage
- type UserMessageModel
- type UserMessageRole
- type UserMessageSummary
- type UserMessageSummaryDiff
- type UserMessageTime
- type VcsDiffParams
- type VcsDiffParamsMode
- type VcsFileDiff
- type VcsFileDiffStatus
- type VcsGetParams
- type VcsInfo
- type VcsService
- type Workspace
- type WorkspaceAdaptor
- type WorkspaceAdaptorsParams
- type WorkspaceCreateParams
- type WorkspaceListParams
- type WorkspaceRemoveParams
- type WorkspaceService
- func (r *WorkspaceService) Adaptors(ctx context.Context, query WorkspaceAdaptorsParams, ...) (res *[]WorkspaceAdaptor, err error)
- func (r *WorkspaceService) Create(ctx context.Context, params WorkspaceCreateParams, ...) (res *Workspace, err error)
- func (r *WorkspaceService) List(ctx context.Context, query WorkspaceListParams, opts ...option.RequestOption) (res *[]Workspace, err error)
- func (r *WorkspaceService) Remove(ctx context.Context, id string, params WorkspaceRemoveParams, ...) (res *Workspace, err error)
- func (r *WorkspaceService) SessionRestore(ctx context.Context, id string, params WorkspaceSessionRestoreParams, ...) (res *WorkspaceSessionRestoreResponse, err error)
- func (r *WorkspaceService) Status(ctx context.Context, query WorkspaceStatusParams, opts ...option.RequestOption) (res *[]WorkspaceStatusResponse, err error)
- type WorkspaceSessionRestoreParams
- type WorkspaceSessionRestoreResponse
- type WorkspaceStatusParams
- type WorkspaceStatusResponse
- type WorkspaceStatusResponseStatus
- type Worktree
- type WorktreeCreateParams
- type WorktreeListParams
- type WorktreeRemoveParams
- type WorktreeResetParams
- type WorktreeService
- func (r *WorktreeService) Create(ctx context.Context, params WorktreeCreateParams, opts ...option.RequestOption) (res *Worktree, err error)
- func (r *WorktreeService) List(ctx context.Context, query WorktreeListParams, opts ...option.RequestOption) (res *[]string, err error)
- func (r *WorktreeService) Remove(ctx context.Context, params WorktreeRemoveParams, opts ...option.RequestOption) (res *bool, err error)
- func (r *WorktreeService) Reset(ctx context.Context, params WorktreeResetParams, opts ...option.RequestOption) (res *bool, err error)
Constants ¶
const MessageAbortedErrorNameMessageAbortedError = shared.MessageAbortedErrorNameMessageAbortedError
This is an alias to an internal value.
const NotFoundErrorNameNotFoundError = shared.NotFoundErrorNameNotFoundError
This is an alias to an internal value.
const ProviderAuthErrorNameProviderAuthError = shared.ProviderAuthErrorNameProviderAuthError
This is an alias to an internal value.
const UnknownErrorNameUnknownError = shared.UnknownErrorNameUnknownError
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (OPENCODE_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type Agent ¶
type Agent struct {
Name string `json:"name,required"`
Mode AgentMode `json:"mode,required"`
Permission []PermissionRule `json:"permission,required"`
Options map[string]interface{} `json:"options,required"`
Native bool `json:"native"`
Hidden bool `json:"hidden"`
Color string `json:"color"`
Variant string `json:"variant"`
Steps int64 `json:"steps"`
Description string `json:"description"`
Model AgentModel `json:"model"`
Prompt string `json:"prompt"`
Temperature float64 `json:"temperature"`
TopP float64 `json:"topP"`
JSON agentJSON `json:"-"`
}
func (*Agent) UnmarshalJSON ¶
type AgentListParams ¶
type AgentListParams struct {
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (AgentListParams) URLQuery ¶
func (r AgentListParams) URLQuery() (v url.Values)
URLQuery serializes AgentListParams's query parameters as `url.Values`.
type AgentModel ¶
type AgentModel struct {
ModelID string `json:"modelID,required"`
ProviderID string `json:"providerID,required"`
JSON agentModelJSON `json:"-"`
}
func (*AgentModel) UnmarshalJSON ¶
func (r *AgentModel) UnmarshalJSON(data []byte) (err error)
type AgentPart ¶
type AgentPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
Name string `json:"name,required"`
SessionID string `json:"sessionID,required"`
Type AgentPartType `json:"type,required"`
Source AgentPartSource `json:"source"`
JSON agentPartJSON `json:"-"`
}
func (*AgentPart) UnmarshalJSON ¶
type AgentPartInputParam ¶
type AgentPartInputParam struct {
Name param.Field[string] `json:"name,required"`
Type param.Field[AgentPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Source param.Field[AgentPartInputSourceParam] `json:"source"`
}
func (AgentPartInputParam) MarshalJSON ¶
func (r AgentPartInputParam) MarshalJSON() (data []byte, err error)
type AgentPartInputSourceParam ¶
type AgentPartInputSourceParam struct {
End param.Field[int64] `json:"end,required"`
Start param.Field[int64] `json:"start,required"`
Value param.Field[string] `json:"value,required"`
}
func (AgentPartInputSourceParam) MarshalJSON ¶
func (r AgentPartInputSourceParam) MarshalJSON() (data []byte, err error)
type AgentPartInputType ¶
type AgentPartInputType string
const (
AgentPartInputTypeAgent AgentPartInputType = "agent"
)
func (AgentPartInputType) IsKnown ¶
func (r AgentPartInputType) IsKnown() bool
type AgentPartSource ¶
type AgentPartSource struct {
End int64 `json:"end,required"`
Start int64 `json:"start,required"`
Value string `json:"value,required"`
JSON agentPartSourceJSON `json:"-"`
}
func (*AgentPartSource) UnmarshalJSON ¶
func (r *AgentPartSource) UnmarshalJSON(data []byte) (err error)
type AgentPartType ¶
type AgentPartType string
const (
AgentPartTypeAgent AgentPartType = "agent"
)
func (AgentPartType) IsKnown ¶
func (r AgentPartType) IsKnown() bool
type AgentService ¶
type AgentService struct {
Options []option.RequestOption
}
AgentService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentService method instead.
func NewAgentService ¶
func NewAgentService(opts ...option.RequestOption) (r *AgentService)
NewAgentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AgentService) List ¶
func (r *AgentService) List(ctx context.Context, query AgentListParams, opts ...option.RequestOption) (res *[]Agent, err error)
List all agents
type AppLogParams ¶
type AppLogParams struct {
// Log level
Level param.Field[AppLogParamsLevel] `json:"level,required"`
// Log message
Message param.Field[string] `json:"message,required"`
// Service name for the log entry
Service param.Field[string] `json:"service,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
// Additional metadata for the log entry
Extra param.Field[map[string]interface{}] `json:"extra"`
}
func (AppLogParams) MarshalJSON ¶
func (r AppLogParams) MarshalJSON() (data []byte, err error)
func (AppLogParams) URLQuery ¶
func (r AppLogParams) URLQuery() (v url.Values)
URLQuery serializes AppLogParams's query parameters as `url.Values`.
type AppLogParamsLevel ¶
type AppLogParamsLevel string
Log level
const ( AppLogParamsLevelDebug AppLogParamsLevel = "debug" AppLogParamsLevelInfo AppLogParamsLevel = "info" AppLogParamsLevelError AppLogParamsLevel = "error" AppLogParamsLevelWarn AppLogParamsLevel = "warn" )
func (AppLogParamsLevel) IsKnown ¶
func (r AppLogParamsLevel) IsKnown() bool
type AppProvidersParams ¶
type AppProvidersParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (AppProvidersParams) URLQuery ¶
func (r AppProvidersParams) URLQuery() (v url.Values)
URLQuery serializes AppProvidersParams's query parameters as `url.Values`.
type AppProvidersResponse
deprecated
type AppProvidersResponse = ConfigProvidersResponse
Deprecated: use ConfigProvidersResponse.
type AppService ¶
type AppService struct {
Options []option.RequestOption
Agents *AgentService
Skills *SkillService
}
AppService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppService method instead.
func NewAppService ¶
func NewAppService(opts ...option.RequestOption) (r *AppService)
NewAppService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppService) Log ¶
func (r *AppService) Log(ctx context.Context, params AppLogParams, opts ...option.RequestOption) (res *bool, err error)
Write a log entry to the server logs
func (*AppService) Providers
deprecated
func (r *AppService) Providers(ctx context.Context, query AppProvidersParams, opts ...option.RequestOption) (res *AppProvidersResponse, err error)
Providers lists all providers.
Deprecated: Use ConfigService.Providers instead.
type AssistantMessage ¶
type AssistantMessage struct {
ID string `json:"id,required"`
Agent string `json:"agent,required"`
Cost float64 `json:"cost,required"`
Mode string `json:"mode,required"`
ModelID string `json:"modelID,required"`
ParentID string `json:"parentID,required"`
Path AssistantMessagePath `json:"path,required"`
ProviderID string `json:"providerID,required"`
Role AssistantMessageRole `json:"role,required"`
SessionID string `json:"sessionID,required"`
Time AssistantMessageTime `json:"time,required"`
Tokens AssistantMessageTokens `json:"tokens,required"`
Error AssistantMessageError `json:"error"`
Finish string `json:"finish"`
Structured interface{} `json:"structured"`
Summary bool `json:"summary"`
Variant string `json:"variant"`
JSON assistantMessageJSON `json:"-"`
}
func (*AssistantMessage) UnmarshalJSON ¶
func (r *AssistantMessage) UnmarshalJSON(data []byte) (err error)
type AssistantMessageError ¶
type AssistantMessageError struct {
// This field can have the runtime type of [shared.ProviderAuthErrorData],
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData],
// [AssistantMessageErrorAPIErrorData].
Data interface{} `json:"data,required"`
Name AssistantMessageErrorName `json:"name,required"`
JSON assistantMessageErrorJSON `json:"-"`
// contains filtered or unexported fields
}
func (AssistantMessageError) AsUnion ¶
func (r AssistantMessageError) AsUnion() AssistantMessageErrorUnion
AsUnion returns a AssistantMessageErrorUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are shared.ProviderAuthError, shared.UnknownError, AssistantMessageErrorMessageOutputLengthError, shared.MessageAbortedError, AssistantMessageErrorAPIError, AssistantMessageErrorStructuredOutputError, AssistantMessageErrorContextOverflowError.
func (*AssistantMessageError) UnmarshalJSON ¶
func (r *AssistantMessageError) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorAPIError ¶
type AssistantMessageErrorAPIError struct {
Data AssistantMessageErrorAPIErrorData `json:"data,required"`
Name AssistantMessageErrorAPIErrorName `json:"name,required"`
JSON assistantMessageErrorAPIErrorJSON `json:"-"`
}
func (AssistantMessageErrorAPIError) ImplementsAssistantMessageError ¶
func (r AssistantMessageErrorAPIError) ImplementsAssistantMessageError()
func (*AssistantMessageErrorAPIError) UnmarshalJSON ¶
func (r *AssistantMessageErrorAPIError) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorAPIErrorData ¶
type AssistantMessageErrorAPIErrorData struct {
IsRetryable bool `json:"isRetryable,required"`
Message string `json:"message,required"`
Metadata map[string]string `json:"metadata"`
ResponseBody string `json:"responseBody"`
ResponseHeaders map[string]string `json:"responseHeaders"`
StatusCode float64 `json:"statusCode"`
JSON assistantMessageErrorAPIErrorDataJSON `json:"-"`
}
func (*AssistantMessageErrorAPIErrorData) UnmarshalJSON ¶
func (r *AssistantMessageErrorAPIErrorData) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorAPIErrorName ¶
type AssistantMessageErrorAPIErrorName string
const (
AssistantMessageErrorAPIErrorNameAPIError AssistantMessageErrorAPIErrorName = "APIError"
)
func (AssistantMessageErrorAPIErrorName) IsKnown ¶
func (r AssistantMessageErrorAPIErrorName) IsKnown() bool
type AssistantMessageErrorContextOverflowError ¶
type AssistantMessageErrorContextOverflowError struct {
Data AssistantMessageErrorContextOverflowErrorData `json:"data,required"`
Name AssistantMessageErrorContextOverflowErrorName `json:"name,required"`
JSON assistantMessageErrorContextOverflowErrorJSON `json:"-"`
}
func (AssistantMessageErrorContextOverflowError) ImplementsAssistantMessageError ¶
func (r AssistantMessageErrorContextOverflowError) ImplementsAssistantMessageError()
func (AssistantMessageErrorContextOverflowError) ImplementsEventListResponseEventSessionErrorPropertiesError ¶
func (r AssistantMessageErrorContextOverflowError) ImplementsEventListResponseEventSessionErrorPropertiesError()
func (*AssistantMessageErrorContextOverflowError) UnmarshalJSON ¶
func (r *AssistantMessageErrorContextOverflowError) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorContextOverflowErrorData ¶
type AssistantMessageErrorContextOverflowErrorData struct {
Message string `json:"message,required"`
ResponseBody string `json:"responseBody"`
JSON assistantMessageErrorContextOverflowErrorDataJSON `json:"-"`
}
func (*AssistantMessageErrorContextOverflowErrorData) UnmarshalJSON ¶
func (r *AssistantMessageErrorContextOverflowErrorData) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorContextOverflowErrorName ¶
type AssistantMessageErrorContextOverflowErrorName string
const (
AssistantMessageErrorContextOverflowErrorNameContextOverflowError AssistantMessageErrorContextOverflowErrorName = "ContextOverflowError"
)
func (AssistantMessageErrorContextOverflowErrorName) IsKnown ¶
func (r AssistantMessageErrorContextOverflowErrorName) IsKnown() bool
type AssistantMessageErrorMessageOutputLengthError ¶
type AssistantMessageErrorMessageOutputLengthError struct {
Data AssistantMessageErrorMessageOutputLengthErrorData `json:"data,required"`
Name AssistantMessageErrorMessageOutputLengthErrorName `json:"name,required"`
JSON assistantMessageErrorMessageOutputLengthErrorJSON `json:"-"`
}
func (AssistantMessageErrorMessageOutputLengthError) ImplementsAssistantMessageError ¶
func (r AssistantMessageErrorMessageOutputLengthError) ImplementsAssistantMessageError()
func (*AssistantMessageErrorMessageOutputLengthError) UnmarshalJSON ¶
func (r *AssistantMessageErrorMessageOutputLengthError) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorMessageOutputLengthErrorData ¶
type AssistantMessageErrorMessageOutputLengthErrorData struct {
Message string `json:"message,required"`
JSON assistantMessageErrorMessageOutputLengthErrorDataJSON `json:"-"`
}
func (*AssistantMessageErrorMessageOutputLengthErrorData) UnmarshalJSON ¶
func (r *AssistantMessageErrorMessageOutputLengthErrorData) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorMessageOutputLengthErrorName ¶
type AssistantMessageErrorMessageOutputLengthErrorName string
const (
AssistantMessageErrorMessageOutputLengthErrorNameMessageOutputLengthError AssistantMessageErrorMessageOutputLengthErrorName = "MessageOutputLengthError"
)
func (AssistantMessageErrorMessageOutputLengthErrorName) IsKnown ¶
func (r AssistantMessageErrorMessageOutputLengthErrorName) IsKnown() bool
type AssistantMessageErrorName ¶
type AssistantMessageErrorName string
const ( AssistantMessageErrorNameProviderAuthError AssistantMessageErrorName = "ProviderAuthError" AssistantMessageErrorNameUnknownError AssistantMessageErrorName = "UnknownError" AssistantMessageErrorNameMessageOutputLengthError AssistantMessageErrorName = "MessageOutputLengthError" AssistantMessageErrorNameMessageAbortedError AssistantMessageErrorName = "MessageAbortedError" AssistantMessageErrorNameAPIError AssistantMessageErrorName = "APIError" AssistantMessageErrorNameStructuredOutputError AssistantMessageErrorName = "StructuredOutputError" AssistantMessageErrorNameContextOverflowError AssistantMessageErrorName = "ContextOverflowError" )
func (AssistantMessageErrorName) IsKnown ¶
func (r AssistantMessageErrorName) IsKnown() bool
type AssistantMessageErrorStructuredOutputError ¶
type AssistantMessageErrorStructuredOutputError struct {
Data AssistantMessageErrorStructuredOutputErrorData `json:"data,required"`
Name AssistantMessageErrorStructuredOutputErrorName `json:"name,required"`
JSON assistantMessageErrorStructuredOutputErrorJSON `json:"-"`
}
func (AssistantMessageErrorStructuredOutputError) ImplementsAssistantMessageError ¶
func (r AssistantMessageErrorStructuredOutputError) ImplementsAssistantMessageError()
func (AssistantMessageErrorStructuredOutputError) ImplementsEventListResponseEventSessionErrorPropertiesError ¶
func (r AssistantMessageErrorStructuredOutputError) ImplementsEventListResponseEventSessionErrorPropertiesError()
func (*AssistantMessageErrorStructuredOutputError) UnmarshalJSON ¶
func (r *AssistantMessageErrorStructuredOutputError) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorStructuredOutputErrorData ¶
type AssistantMessageErrorStructuredOutputErrorData struct {
Message string `json:"message,required"`
Retries float64 `json:"retries,required"`
JSON assistantMessageErrorStructuredOutputErrorDataJSON `json:"-"`
}
func (*AssistantMessageErrorStructuredOutputErrorData) UnmarshalJSON ¶
func (r *AssistantMessageErrorStructuredOutputErrorData) UnmarshalJSON(data []byte) (err error)
type AssistantMessageErrorStructuredOutputErrorName ¶
type AssistantMessageErrorStructuredOutputErrorName string
const (
AssistantMessageErrorStructuredOutputErrorNameStructuredOutputError AssistantMessageErrorStructuredOutputErrorName = "StructuredOutputError"
)
func (AssistantMessageErrorStructuredOutputErrorName) IsKnown ¶
func (r AssistantMessageErrorStructuredOutputErrorName) IsKnown() bool
type AssistantMessageErrorUnion ¶
type AssistantMessageErrorUnion interface {
ImplementsAssistantMessageError()
}
Union satisfied by shared.ProviderAuthError, shared.UnknownError, AssistantMessageErrorMessageOutputLengthError, shared.MessageAbortedError, AssistantMessageErrorAPIError, AssistantMessageErrorStructuredOutputError or AssistantMessageErrorContextOverflowError.
type AssistantMessagePath ¶
type AssistantMessagePath struct {
Cwd string `json:"cwd,required"`
Root string `json:"root,required"`
JSON assistantMessagePathJSON `json:"-"`
}
func (*AssistantMessagePath) UnmarshalJSON ¶
func (r *AssistantMessagePath) UnmarshalJSON(data []byte) (err error)
type AssistantMessageRole ¶
type AssistantMessageRole string
const (
AssistantMessageRoleAssistant AssistantMessageRole = "assistant"
)
func (AssistantMessageRole) IsKnown ¶
func (r AssistantMessageRole) IsKnown() bool
type AssistantMessageTime ¶
type AssistantMessageTime struct {
Created float64 `json:"created,required"`
Completed float64 `json:"completed"`
JSON assistantMessageTimeJSON `json:"-"`
}
func (*AssistantMessageTime) UnmarshalJSON ¶
func (r *AssistantMessageTime) UnmarshalJSON(data []byte) (err error)
type AssistantMessageTokens ¶
type AssistantMessageTokens struct {
Cache AssistantMessageTokensCache `json:"cache,required"`
Input float64 `json:"input,required"`
Output float64 `json:"output,required"`
Reasoning float64 `json:"reasoning,required"`
Total float64 `json:"total"`
JSON assistantMessageTokensJSON `json:"-"`
}
func (*AssistantMessageTokens) UnmarshalJSON ¶
func (r *AssistantMessageTokens) UnmarshalJSON(data []byte) (err error)
type AssistantMessageTokensCache ¶
type AssistantMessageTokensCache struct {
Read float64 `json:"read,required"`
Write float64 `json:"write,required"`
JSON assistantMessageTokensCacheJSON `json:"-"`
}
func (*AssistantMessageTokensCache) UnmarshalJSON ¶
func (r *AssistantMessageTokensCache) UnmarshalJSON(data []byte) (err error)
type Auth ¶
type Auth struct {
Type string `json:"type,required"`
// OAuth fields
Refresh string `json:"refresh"`
Access string `json:"access"`
Expires float64 `json:"expires"`
AccountID string `json:"accountId"`
EnterpriseURL string `json:"enterpriseUrl"`
// API fields
Key string `json:"key"`
Metadata map[string]string `json:"metadata"`
// WellKnown fields
Token string `json:"token"`
JSON authJSON `json:"-"`
// contains filtered or unexported fields
}
Auth is the credential union stored for a provider.
Union satisfied by AuthOAuth, AuthAPI, or AuthWellKnown.
func (*Auth) UnmarshalJSON ¶
type AuthAPI ¶
type AuthAPI struct {
Type string `json:"type,required"`
Key string `json:"key,required"`
Metadata map[string]string `json:"metadata"`
JSON authAPIJSON `json:"-"`
}
func (*AuthAPI) UnmarshalJSON ¶
type AuthOAuth ¶
type AuthOAuth struct {
Type string `json:"type,required"`
Refresh string `json:"refresh,required"`
Access string `json:"access,required"`
Expires float64 `json:"expires,required"`
AccountID string `json:"accountId"`
EnterpriseURL string `json:"enterpriseUrl"`
JSON authOAuthJSON `json:"-"`
}
func (*AuthOAuth) UnmarshalJSON ¶
type AuthRemoveParams
deprecated
type AuthRemoveParams struct{}
Deprecated: this type no longer affects the wire request. It is accepted only as a no-op compatibility option for AuthService.Remove.
func (AuthRemoveParams) Apply ¶
func (r AuthRemoveParams) Apply(*requestconfig.RequestConfig) error
type AuthService ¶
type AuthService struct {
Options []option.RequestOption
}
AuthService contains methods for interacting with the auth resource.
func NewAuthService ¶
func NewAuthService(opts ...option.RequestOption) (r *AuthService)
NewAuthService generates a new service that applies the given options to each request.
func (*AuthService) Remove ¶
func (r *AuthService) Remove(ctx context.Context, providerID string, opts ...option.RequestOption) (res *bool, err error)
Remove credentials for a provider.
func (*AuthService) Set ¶
func (r *AuthService) Set(ctx context.Context, providerID string, params AuthSetParamsUnion, opts ...option.RequestOption) (res *bool, err error)
Set credentials for a provider.
type AuthSetParams
deprecated
type AuthSetParams struct {
Type param.Field[string] `json:"type,required"`
// OAuth fields
Refresh param.Field[string] `json:"refresh"`
Access param.Field[string] `json:"access"`
Expires param.Field[float64] `json:"expires"`
AccountID param.Field[string] `json:"accountId"`
EnterpriseURL param.Field[string] `json:"enterpriseUrl"`
// API fields
Key param.Field[string] `json:"key"`
Metadata param.Field[map[string]string] `json:"metadata"`
// WellKnown fields
Token param.Field[string] `json:"token"`
}
Deprecated: use AuthSetParamsOAuth, AuthSetParamsAPI, or AuthSetParamsWellKnown to avoid mixing fields across credential variants.
func (AuthSetParams) MarshalJSON ¶
func (r AuthSetParams) MarshalJSON() (data []byte, err error)
type AuthSetParamsAPI ¶
type AuthSetParamsAPI struct {
Type param.Field[string] `json:"type,required"`
Key param.Field[string] `json:"key,required"`
Metadata param.Field[map[string]string] `json:"metadata"`
}
func (AuthSetParamsAPI) MarshalJSON ¶
func (r AuthSetParamsAPI) MarshalJSON() (data []byte, err error)
type AuthSetParamsOAuth ¶
type AuthSetParamsOAuth struct {
Type param.Field[string] `json:"type,required"`
Refresh param.Field[string] `json:"refresh,required"`
Access param.Field[string] `json:"access,required"`
Expires param.Field[float64] `json:"expires,required"`
AccountID param.Field[string] `json:"accountId"`
EnterpriseURL param.Field[string] `json:"enterpriseUrl"`
}
func (AuthSetParamsOAuth) MarshalJSON ¶
func (r AuthSetParamsOAuth) MarshalJSON() (data []byte, err error)
type AuthSetParamsUnion ¶
type AuthSetParamsUnion interface {
MarshalJSON() (data []byte, err error)
// contains filtered or unexported methods
}
AuthSetParamsUnion is the credential union request body for PUT /auth/{providerID}.
Satisfied by AuthSetParamsOAuth, AuthSetParamsAPI, AuthSetParamsWellKnown, or the deprecated flattened AuthSetParams compatibility wrapper.
type AuthSetParamsWellKnown ¶
type AuthSetParamsWellKnown struct {
Type param.Field[string] `json:"type,required"`
Key param.Field[string] `json:"key,required"`
Token param.Field[string] `json:"token,required"`
}
func (AuthSetParamsWellKnown) MarshalJSON ¶
func (r AuthSetParamsWellKnown) MarshalJSON() (data []byte, err error)
type AuthUnion ¶
type AuthUnion interface {
// contains filtered or unexported methods
}
AuthUnion is the interface satisfied by AuthOAuth, AuthAPI, and AuthWellKnown.
type AuthWellKnown ¶
type AuthWellKnown struct {
Type string `json:"type,required"`
Key string `json:"key,required"`
Token string `json:"token,required"`
JSON authWellKnownJSON `json:"-"`
}
func (*AuthWellKnown) UnmarshalJSON ¶
func (r *AuthWellKnown) UnmarshalJSON(data []byte) (err error)
type BadRequestError ¶
type BadRequestError = shared.BadRequestError
This is an alias to an internal type.
type Client ¶
type Client struct {
Options []option.RequestOption
Event *EventService
Path *PathService
App *AppService
Find *FindService
File *FileService
Config *ConfigService
Command *CommandService
Project *ProjectService
Session *SessionService
Tui *TuiService
Permission *PermissionService
Question *QuestionService
Provider *ProviderService
Auth *AuthService
Lsp *LspService
Formatter *FormatterService
Global *GlobalService
Instance *InstanceService
Mcp *McpService
Pty *PtyService
Vcs *VcsService
Experimental *ExperimentalService
Sync *SyncService
}
Client creates a struct with services and top level methods that help with interacting with the opencode API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (OPENCODE_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type Command ¶
type Command struct {
Name string `json:"name,required"`
Template string `json:"template,required"`
Agent string `json:"agent"`
Description string `json:"description"`
Hints []string `json:"hints,required"`
Model string `json:"model"`
Source CommandSource `json:"source"`
Subtask bool `json:"subtask"`
JSON commandJSON `json:"-"`
}
func (*Command) UnmarshalJSON ¶
type CommandListParams ¶
type CommandListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (CommandListParams) URLQuery ¶
func (r CommandListParams) URLQuery() (v url.Values)
URLQuery serializes CommandListParams's query parameters as `url.Values`.
type CommandService ¶
type CommandService struct {
Options []option.RequestOption
}
CommandService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCommandService method instead.
func NewCommandService ¶
func NewCommandService(opts ...option.RequestOption) (r *CommandService)
NewCommandService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CommandService) List ¶
func (r *CommandService) List(ctx context.Context, query CommandListParams, opts ...option.RequestOption) (res *[]Command, err error)
List all commands
type CommandSource ¶
type CommandSource string
const ( CommandSourceCommand CommandSource = "command" CommandSourceMcp CommandSource = "mcp" CommandSourceSkill CommandSource = "skill" )
func (CommandSource) IsKnown ¶
func (r CommandSource) IsKnown() bool
type CompactionPart ¶
type CompactionPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Type CompactionPartType `json:"type,required"`
Auto bool `json:"auto,required"`
Overflow bool `json:"overflow"`
TailStartID string `json:"tail_start_id"`
JSON compactionPartJSON `json:"-"`
}
func (*CompactionPart) UnmarshalJSON ¶
func (r *CompactionPart) UnmarshalJSON(data []byte) (err error)
type CompactionPartInputParam ¶
type CompactionPartInputParam struct {
Type param.Field[CompactionPartInputType] `json:"type,required"`
Auto param.Field[bool] `json:"auto,required"`
ID param.Field[string] `json:"id"`
Overflow param.Field[bool] `json:"overflow"`
TailStartID param.Field[string] `json:"tail_start_id"`
}
func (CompactionPartInputParam) MarshalJSON ¶
func (r CompactionPartInputParam) MarshalJSON() (data []byte, err error)
type CompactionPartInputType ¶
type CompactionPartInputType string
const (
CompactionPartInputTypeCompaction CompactionPartInputType = "compaction"
)
func (CompactionPartInputType) IsKnown ¶
func (r CompactionPartInputType) IsKnown() bool
type CompactionPartType ¶
type CompactionPartType string
const (
CompactionPartTypeCompaction CompactionPartType = "compaction"
)
func (CompactionPartType) IsKnown ¶
func (r CompactionPartType) IsKnown() bool
type Config ¶
type Config struct {
// JSON schema reference for configuration validation
Schema string `json:"$schema"`
// Agent configuration, see https://opencode.ai/docs/agents
Agent ConfigAgent `json:"agent"`
// automatically
Autoshare bool `json:"autoshare"`
// Automatically update to the latest version
Autoupdate ConfigAutoupdateUnion `json:"autoupdate"`
// Command configuration, see https://opencode.ai/docs/commands
Command map[string]ConfigCommand `json:"command"`
Compaction ConfigCompaction `json:"compaction"`
// Default agent to use
DefaultAgent string `json:"default_agent"`
// Disable providers that are loaded automatically
DisabledProviders []string `json:"disabled_providers"`
// Enable specific providers
EnabledProviders []string `json:"enabled_providers"`
Enterprise ConfigEnterprise `json:"enterprise"`
Experimental ConfigExperimental `json:"experimental"`
Formatter ConfigFormatterUnion `json:"formatter"`
// Additional instruction files or patterns to include
Instructions []string `json:"instructions"`
// @deprecated Use automatic layout behavior instead.
Layout LayoutConfig `json:"layout"`
LogLevel ConfigLogLevel `json:"logLevel"`
Lsp ConfigLspConfigUnion `json:"lsp"`
// MCP (Model Context Protocol) server configurations
Mcp map[string]ConfigMcp `json:"mcp"`
// Model to use in the format of provider/model, eg anthropic/claude-2
Model string `json:"model"`
// @deprecated Use 'agent' field instead.
Mode ConfigMode `json:"mode"`
Permission PermissionConfig `json:"permission"`
Plugin []ConfigPluginItem `json:"plugin"`
// Custom provider configurations and model overrides
Provider map[string]ConfigProvider `json:"provider"`
Server ServerConfig `json:"server"`
// Control sharing behavior:'manual' allows manual sharing via commands, 'auto'
// enables automatic sharing, 'disabled' disables all sharing
Skills ConfigSkills `json:"skills"`
// Small model to use for tasks like title generation in the format of
// provider/model
SmallModel string `json:"small_model"`
Snapshot bool `json:"snapshot"`
Tools map[string]bool `json:"tools"`
// Custom username to display in conversations instead of system username
Username string `json:"username"`
Watcher ConfigWatcher `json:"watcher"`
JSON configJSON `json:"-"`
}
func (*Config) UnmarshalJSON ¶
type ConfigAgent ¶
type ConfigAgent struct {
Build ConfigAgentEntry `json:"build"`
General ConfigAgentEntry `json:"general"`
Plan ConfigAgentEntry `json:"plan"`
Explore ConfigAgentEntry `json:"explore"`
Title ConfigAgentEntry `json:"title"`
Summary ConfigAgentEntry `json:"summary"`
Compaction ConfigAgentEntry `json:"compaction"`
ExtraFields map[string]ConfigAgentEntry `json:"-,extras"`
JSON configAgentJSON `json:"-"`
}
Agent configuration, see https://opencode.ai/docs/agent
func (*ConfigAgent) UnmarshalJSON ¶
func (r *ConfigAgent) UnmarshalJSON(data []byte) (err error)
type ConfigAgentEntry ¶
type ConfigAgentEntry struct {
Description string `json:"description"`
Disable bool `json:"disable"`
Mode ConfigAgentEntryMode `json:"mode"`
Model string `json:"model"`
Permission PermissionConfig `json:"permission"`
Prompt string `json:"prompt"`
Temperature float64 `json:"temperature"`
Tools map[string]bool `json:"tools"`
TopP float64 `json:"top_p"`
Hidden bool `json:"hidden"`
Color string `json:"color"`
Variant string `json:"variant"`
Steps int64 `json:"steps"`
MaxSteps int64 `json:"maxSteps"`
Options map[string]interface{} `json:"options"`
ExtraFields map[string]interface{} `json:"-,extras"`
JSON configAgentEntryJSON `json:"-"`
}
func (*ConfigAgentEntry) UnmarshalJSON ¶
func (r *ConfigAgentEntry) UnmarshalJSON(data []byte) (err error)
type ConfigAgentEntryMode ¶
type ConfigAgentEntryMode string
const ( ConfigAgentEntryModeSubagent ConfigAgentEntryMode = "subagent" ConfigAgentEntryModePrimary ConfigAgentEntryMode = "primary" ConfigAgentEntryModeAll ConfigAgentEntryMode = "all" )
func (ConfigAgentEntryMode) IsKnown ¶
func (r ConfigAgentEntryMode) IsKnown() bool
type ConfigAutoupdateString ¶
type ConfigAutoupdateString string
const (
ConfigAutoupdateStringNotify ConfigAutoupdateString = "notify"
)
func (ConfigAutoupdateString) ImplementsConfigAutoupdateUnion ¶
func (r ConfigAutoupdateString) ImplementsConfigAutoupdateUnion()
func (ConfigAutoupdateString) IsKnown ¶
func (r ConfigAutoupdateString) IsKnown() bool
type ConfigAutoupdateUnion ¶
type ConfigAutoupdateUnion interface {
ImplementsConfigAutoupdateUnion()
}
ConfigAutoupdateUnion represents the autoupdate configuration which can be a bool or a string.
type ConfigCommand ¶
type ConfigCommand struct {
Template string `json:"template,required"`
Agent string `json:"agent"`
Description string `json:"description"`
Model string `json:"model"`
Subtask bool `json:"subtask"`
JSON configCommandJSON `json:"-"`
}
func (*ConfigCommand) UnmarshalJSON ¶
func (r *ConfigCommand) UnmarshalJSON(data []byte) (err error)
type ConfigCompaction ¶
type ConfigCompaction struct {
Auto bool `json:"auto"`
Prune bool `json:"prune"`
TailTurns int64 `json:"tail_turns"`
PreserveRecentTokens int64 `json:"preserve_recent_tokens"`
Reserved int64 `json:"reserved"`
JSON configCompactionJSON `json:"-"`
}
ConfigCompaction represents compaction configuration.
func (*ConfigCompaction) UnmarshalJSON ¶
func (r *ConfigCompaction) UnmarshalJSON(data []byte) (err error)
type ConfigEnterprise ¶
type ConfigEnterprise struct {
URL string `json:"url"`
JSON configEnterpriseJSON `json:"-"`
}
ConfigEnterprise represents enterprise configuration.
func (*ConfigEnterprise) UnmarshalJSON ¶
func (r *ConfigEnterprise) UnmarshalJSON(data []byte) (err error)
type ConfigExperimental ¶
type ConfigExperimental struct {
DisablePasteSummary bool `json:"disable_paste_summary"`
BatchTool bool `json:"batch_tool"`
OpenTelemetry bool `json:"openTelemetry"`
PrimaryTools []string `json:"primary_tools"`
ContinueLoopOnDeny bool `json:"continue_loop_on_deny"`
McpTimeout int64 `json:"mcp_timeout"`
JSON configExperimentalJSON `json:"-"`
}
func (*ConfigExperimental) UnmarshalJSON ¶
func (r *ConfigExperimental) UnmarshalJSON(data []byte) (err error)
type ConfigFormatter ¶
type ConfigFormatter struct {
Command []string `json:"command"`
Disabled bool `json:"disabled"`
Environment map[string]string `json:"environment"`
Extensions []string `json:"extensions"`
JSON configFormatterJSON `json:"-"`
}
func (*ConfigFormatter) UnmarshalJSON ¶
func (r *ConfigFormatter) UnmarshalJSON(data []byte) (err error)
type ConfigFormatterBool ¶
type ConfigFormatterBool bool
type ConfigFormatterObject ¶
type ConfigFormatterObject map[string]ConfigFormatter
type ConfigFormatterUnion ¶
type ConfigFormatterUnion interface {
// contains filtered or unexported methods
}
type ConfigGetParams ¶
type ConfigGetParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ConfigGetParams) URLQuery ¶
func (r ConfigGetParams) URLQuery() (v url.Values)
URLQuery serializes ConfigGetParams's query parameters as `url.Values`.
type ConfigLogLevel ¶
type ConfigLogLevel string
ConfigLogLevel represents the log level.
const ( ConfigLogLevelDebug ConfigLogLevel = "DEBUG" ConfigLogLevelInfo ConfigLogLevel = "INFO" ConfigLogLevelWarn ConfigLogLevel = "WARN" ConfigLogLevelError ConfigLogLevel = "ERROR" )
func (ConfigLogLevel) IsKnown ¶
func (r ConfigLogLevel) IsKnown() bool
type ConfigLsp ¶
type ConfigLsp struct {
// This field can have the runtime type of [[]string].
Command interface{} `json:"command"`
Disabled bool `json:"disabled"`
// This field can have the runtime type of [map[string]string].
Env interface{} `json:"env"`
// This field can have the runtime type of [[]string].
Extensions interface{} `json:"extensions"`
// This field can have the runtime type of [map[string]interface{}].
Initialization interface{} `json:"initialization"`
JSON configLspJSON `json:"-"`
// contains filtered or unexported fields
}
func (ConfigLsp) AsUnion ¶
func (r ConfigLsp) AsUnion() ConfigLspUnion
AsUnion returns a ConfigLspUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigLspDisabled, ConfigLspObject.
func (*ConfigLsp) UnmarshalJSON ¶
type ConfigLspConfigBool ¶
type ConfigLspConfigBool bool
type ConfigLspConfigObject ¶
type ConfigLspConfigUnion ¶
type ConfigLspConfigUnion interface {
// contains filtered or unexported methods
}
type ConfigLspDisabled ¶
type ConfigLspDisabled struct {
Disabled ConfigLspDisabledDisabled `json:"disabled,required"`
JSON configLspDisabledJSON `json:"-"`
}
func (*ConfigLspDisabled) UnmarshalJSON ¶
func (r *ConfigLspDisabled) UnmarshalJSON(data []byte) (err error)
type ConfigLspDisabledDisabled ¶
type ConfigLspDisabledDisabled bool
const (
ConfigLspDisabledDisabledTrue ConfigLspDisabledDisabled = true
)
func (ConfigLspDisabledDisabled) IsKnown ¶
func (r ConfigLspDisabledDisabled) IsKnown() bool
type ConfigLspObject ¶
type ConfigLspObject struct {
Command []string `json:"command,required"`
Disabled bool `json:"disabled"`
Env map[string]string `json:"env"`
Extensions []string `json:"extensions"`
Initialization map[string]interface{} `json:"initialization"`
JSON configLspObjectJSON `json:"-"`
}
func (*ConfigLspObject) UnmarshalJSON ¶
func (r *ConfigLspObject) UnmarshalJSON(data []byte) (err error)
type ConfigLspUnion ¶
type ConfigLspUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ConfigLspDisabled or ConfigLspObject.
type ConfigMcp ¶
type ConfigMcp struct {
// Type of MCP server connection
Type ConfigMcpType `json:"type,required"`
// This field can have the runtime type of [[]string].
Command interface{} `json:"command"`
// Enable or disable the MCP server on startup
Enabled bool `json:"enabled"`
// This field can have the runtime type of [map[string]string].
Environment interface{} `json:"environment"`
// This field can have the runtime type of [map[string]string].
Headers interface{} `json:"headers"`
// URL of the remote MCP server
URL string `json:"url"`
OAuth McpRemoteConfigOAuth `json:"oauth"`
Timeout float64 `json:"timeout"`
JSON configMcpJSON `json:"-"`
// contains filtered or unexported fields
}
func (ConfigMcp) AsUnion ¶
func (r ConfigMcp) AsUnion() ConfigMcpUnion
AsUnion returns a ConfigMcpUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are McpLocalConfig, McpRemoteConfig, ConfigMcpDisabled.
func (*ConfigMcp) UnmarshalJSON ¶
type ConfigMcpDisabled ¶
type ConfigMcpDisabled struct {
Enabled bool `json:"enabled,required"`
JSON configMcpDisabledJSON `json:"-"`
}
func (*ConfigMcpDisabled) UnmarshalJSON ¶
func (r *ConfigMcpDisabled) UnmarshalJSON(data []byte) (err error)
type ConfigMcpType ¶
type ConfigMcpType string
Type of MCP server connection
const ( ConfigMcpTypeLocal ConfigMcpType = "local" ConfigMcpTypeRemote ConfigMcpType = "remote" )
func (ConfigMcpType) IsKnown ¶
func (r ConfigMcpType) IsKnown() bool
type ConfigMcpUnion ¶
type ConfigMcpUnion interface {
// contains filtered or unexported methods
}
Union satisfied by McpLocalConfig, McpRemoteConfig, or ConfigMcpDisabled.
type ConfigMode ¶
type ConfigMode struct {
Build ConfigAgentEntry `json:"build"`
Plan ConfigAgentEntry `json:"plan"`
ExtraFields map[string]ConfigAgentEntry `json:"-,extras"`
JSON configModeJSON `json:"-"`
}
func (*ConfigMode) UnmarshalJSON ¶
func (r *ConfigMode) UnmarshalJSON(data []byte) (err error)
type ConfigPluginItem ¶
type ConfigPluginItem struct {
JSON configPluginItemJSON `json:"-"`
// contains filtered or unexported fields
}
ConfigPluginItem represents a plugin configuration item which can be a string or a tuple.
func (ConfigPluginItem) AsUnion ¶
func (r ConfigPluginItem) AsUnion() ConfigPluginItemUnion
func (*ConfigPluginItem) UnmarshalJSON ¶
func (r *ConfigPluginItem) UnmarshalJSON(data []byte) (err error)
type ConfigPluginItemString ¶
type ConfigPluginItemString string
type ConfigPluginItemTuple ¶
type ConfigPluginItemTuple []interface{}
type ConfigPluginItemUnion ¶
type ConfigPluginItemUnion interface {
// contains filtered or unexported methods
}
type ConfigProvider ¶
type ConfigProvider struct {
ID string `json:"id"`
API string `json:"api"`
Blacklist []string `json:"blacklist"`
Env []string `json:"env"`
Models map[string]ConfigProviderModel `json:"models"`
Name string `json:"name"`
Npm string `json:"npm"`
Options ConfigProviderOptions `json:"options"`
Whitelist []string `json:"whitelist"`
JSON configProviderJSON `json:"-"`
}
func (*ConfigProvider) UnmarshalJSON ¶
func (r *ConfigProvider) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModel ¶
type ConfigProviderModel struct {
ID string `json:"id"`
Attachment bool `json:"attachment"`
Cost ConfigProviderModelsCost `json:"cost"`
Experimental bool `json:"experimental"`
Family string `json:"family"`
Headers map[string]string `json:"headers"`
Interleaved ConfigProviderModelInterleaved `json:"interleaved"`
Limit ConfigProviderModelsLimit `json:"limit"`
Modalities ConfigProviderModelsModalities `json:"modalities"`
Name string `json:"name"`
Options map[string]interface{} `json:"options"`
Provider ConfigProviderModelsProvider `json:"provider"`
Reasoning bool `json:"reasoning"`
ReleaseDate string `json:"release_date"`
Status ConfigProviderModelsStatus `json:"status"`
Temperature bool `json:"temperature"`
ToolCall bool `json:"tool_call"`
Variants map[string]ConfigProviderModelVariant `json:"variants"`
JSON configProviderModelJSON `json:"-"`
}
func (*ConfigProviderModel) UnmarshalJSON ¶
func (r *ConfigProviderModel) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelInterleaved ¶
type ConfigProviderModelInterleaved struct {
Field string `json:"field"`
JSON configProviderModelInterleavedJSON `json:"-"`
// contains filtered or unexported fields
}
func (ConfigProviderModelInterleaved) AsUnion ¶
func (r ConfigProviderModelInterleaved) AsUnion() ConfigProviderModelInterleavedUnion
func (*ConfigProviderModelInterleaved) UnmarshalJSON ¶
func (r *ConfigProviderModelInterleaved) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelInterleavedBool ¶
type ConfigProviderModelInterleavedBool bool
type ConfigProviderModelInterleavedObject ¶
type ConfigProviderModelInterleavedObject struct {
Field string `json:"field,required"`
JSON configProviderModelInterleavedObjectJSON `json:"-"`
}
func (*ConfigProviderModelInterleavedObject) UnmarshalJSON ¶
func (r *ConfigProviderModelInterleavedObject) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelInterleavedUnion ¶
type ConfigProviderModelInterleavedUnion interface {
// contains filtered or unexported methods
}
type ConfigProviderModelVariant ¶
type ConfigProviderModelVariant struct {
// Disable this variant for the model.
Disabled bool `json:"disabled"`
JSON configProviderModelVariantJSON `json:"-"`
}
ConfigProviderModelVariant represents variant-specific configuration for a model.
func (*ConfigProviderModelVariant) UnmarshalJSON ¶
func (r *ConfigProviderModelVariant) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelsCost ¶
type ConfigProviderModelsCost struct {
Input float64 `json:"input,required"`
Output float64 `json:"output,required"`
CacheRead float64 `json:"cache_read"`
CacheWrite float64 `json:"cache_write"`
ContextOver200K ConfigProviderModelsCostContextOver200K `json:"context_over_200k"`
JSON configProviderModelsCostJSON `json:"-"`
}
func (*ConfigProviderModelsCost) UnmarshalJSON ¶
func (r *ConfigProviderModelsCost) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelsCostContextOver200K ¶
type ConfigProviderModelsCostContextOver200K struct {
Input float64 `json:"input,required"`
Output float64 `json:"output,required"`
CacheRead float64 `json:"cache_read"`
CacheWrite float64 `json:"cache_write"`
JSON configProviderModelsCostContextOver200KJSON `json:"-"`
}
func (*ConfigProviderModelsCostContextOver200K) UnmarshalJSON ¶
func (r *ConfigProviderModelsCostContextOver200K) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelsLimit ¶
type ConfigProviderModelsLimit struct {
Context float64 `json:"context,required"`
Input float64 `json:"input"`
Output float64 `json:"output,required"`
JSON configProviderModelsLimitJSON `json:"-"`
}
func (*ConfigProviderModelsLimit) UnmarshalJSON ¶
func (r *ConfigProviderModelsLimit) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelsModalities ¶
type ConfigProviderModelsModalities struct {
Input []ConfigProviderModelsModalitiesInput `json:"input,required"`
Output []ConfigProviderModelsModalitiesOutput `json:"output,required"`
JSON configProviderModelsModalitiesJSON `json:"-"`
}
func (*ConfigProviderModelsModalities) UnmarshalJSON ¶
func (r *ConfigProviderModelsModalities) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelsModalitiesInput ¶
type ConfigProviderModelsModalitiesInput string
const ( ConfigProviderModelsModalitiesInputText ConfigProviderModelsModalitiesInput = "text" ConfigProviderModelsModalitiesInputAudio ConfigProviderModelsModalitiesInput = "audio" ConfigProviderModelsModalitiesInputImage ConfigProviderModelsModalitiesInput = "image" ConfigProviderModelsModalitiesInputVideo ConfigProviderModelsModalitiesInput = "video" ConfigProviderModelsModalitiesInputPdf ConfigProviderModelsModalitiesInput = "pdf" )
func (ConfigProviderModelsModalitiesInput) IsKnown ¶
func (r ConfigProviderModelsModalitiesInput) IsKnown() bool
type ConfigProviderModelsModalitiesOutput ¶
type ConfigProviderModelsModalitiesOutput string
const ( ConfigProviderModelsModalitiesOutputText ConfigProviderModelsModalitiesOutput = "text" ConfigProviderModelsModalitiesOutputAudio ConfigProviderModelsModalitiesOutput = "audio" ConfigProviderModelsModalitiesOutputImage ConfigProviderModelsModalitiesOutput = "image" ConfigProviderModelsModalitiesOutputVideo ConfigProviderModelsModalitiesOutput = "video" ConfigProviderModelsModalitiesOutputPdf ConfigProviderModelsModalitiesOutput = "pdf" )
func (ConfigProviderModelsModalitiesOutput) IsKnown ¶
func (r ConfigProviderModelsModalitiesOutput) IsKnown() bool
type ConfigProviderModelsProvider ¶
type ConfigProviderModelsProvider struct {
Npm string `json:"npm"`
API string `json:"api"`
JSON configProviderModelsProviderJSON `json:"-"`
}
func (*ConfigProviderModelsProvider) UnmarshalJSON ¶
func (r *ConfigProviderModelsProvider) UnmarshalJSON(data []byte) (err error)
type ConfigProviderModelsStatus ¶
type ConfigProviderModelsStatus string
const ( ConfigProviderModelsStatusAlpha ConfigProviderModelsStatus = "alpha" ConfigProviderModelsStatusBeta ConfigProviderModelsStatus = "beta" ConfigProviderModelsStatusDeprecated ConfigProviderModelsStatus = "deprecated" )
func (ConfigProviderModelsStatus) IsKnown ¶
func (r ConfigProviderModelsStatus) IsKnown() bool
type ConfigProviderOptions ¶
type ConfigProviderOptions struct {
APIKey string `json:"apiKey"`
BaseURL string `json:"baseURL"`
// Timeout in milliseconds for requests to this provider. Default is 300000 (5
// minutes). Set to false to disable timeout.
Timeout ConfigProviderOptionsTimeoutUnion `json:"timeout"`
EnterpriseURL string `json:"enterpriseUrl"`
SetCacheKey bool `json:"setCacheKey"`
ChunkTimeout int64 `json:"chunkTimeout"`
ExtraFields map[string]interface{} `json:"-,extras"`
JSON configProviderOptionsJSON `json:"-"`
}
func (*ConfigProviderOptions) UnmarshalJSON ¶
func (r *ConfigProviderOptions) UnmarshalJSON(data []byte) (err error)
type ConfigProviderOptionsTimeoutFalse ¶
type ConfigProviderOptionsTimeoutFalse bool
func (ConfigProviderOptionsTimeoutFalse) ImplementsConfigProviderOptionsTimeoutUnion ¶
func (ConfigProviderOptionsTimeoutFalse) ImplementsConfigProviderOptionsTimeoutUnion()
func (*ConfigProviderOptionsTimeoutFalse) UnmarshalJSON ¶
func (r *ConfigProviderOptionsTimeoutFalse) UnmarshalJSON(data []byte) error
type ConfigProviderOptionsTimeoutUnion ¶
type ConfigProviderOptionsTimeoutUnion interface {
ImplementsConfigProviderOptionsTimeoutUnion()
}
Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
Union satisfied by shared.UnionInt or ConfigProviderOptionsTimeoutFalse.
type ConfigProvidersParams ¶
type ConfigProvidersParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ConfigProvidersParams) URLQuery ¶
func (r ConfigProvidersParams) URLQuery() (v url.Values)
URLQuery serializes ConfigProvidersParams's query parameters as `url.Values`.
type ConfigProvidersResponse ¶
type ConfigProvidersResponse struct {
Providers []Provider `json:"providers,required"`
Default map[string]string `json:"default,required"`
JSON configProvidersResponseJSON `json:"-"`
}
func (*ConfigProvidersResponse) UnmarshalJSON ¶
func (r *ConfigProvidersResponse) UnmarshalJSON(data []byte) (err error)
type ConfigService ¶
type ConfigService struct {
Options []option.RequestOption
}
ConfigService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConfigService method instead.
func NewConfigService ¶
func NewConfigService(opts ...option.RequestOption) (r *ConfigService)
NewConfigService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConfigService) Get ¶
func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Config, err error)
Get config info
func (*ConfigService) Providers ¶
func (r *ConfigService) Providers(ctx context.Context, query ConfigProvidersParams, opts ...option.RequestOption) (res *ConfigProvidersResponse, err error)
List all providers
func (*ConfigService) Update ¶
func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, opts ...option.RequestOption) (res *Config, err error)
Update config
type ConfigShare ¶
type ConfigShare string
Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
const ( )
func (ConfigShare) IsKnown ¶
func (r ConfigShare) IsKnown() bool
type ConfigSkills ¶
type ConfigSkills struct {
Paths []string `json:"paths"`
URLs []string `json:"urls"`
JSON configSkillsJSON `json:"-"`
}
ConfigSkills represents skills configuration.
func (*ConfigSkills) UnmarshalJSON ¶
func (r *ConfigSkills) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateParams ¶
type ConfigUpdateParams struct {
Schema param.Field[string] `json:"$schema"`
Agent param.Field[map[string]interface{}] `json:"agent"`
Autoupdate param.Field[interface{}] `json:"autoupdate"`
Command param.Field[map[string]interface{}] `json:"command"`
Compaction param.Field[ConfigUpdateParamsCompaction] `json:"compaction"`
DefaultAgent param.Field[string] `json:"default_agent"`
DisabledProviders param.Field[[]string] `json:"disabled_providers"`
EnabledProviders param.Field[[]string] `json:"enabled_providers"`
Enterprise param.Field[ConfigUpdateParamsEnterprise] `json:"enterprise"`
Experimental param.Field[interface{}] `json:"experimental"`
Formatter param.Field[interface{}] `json:"formatter"`
Instructions param.Field[[]string] `json:"instructions"`
Layout param.Field[LayoutConfig] `json:"layout"`
LogLevel param.Field[ConfigLogLevel] `json:"logLevel"`
Lsp param.Field[interface{}] `json:"lsp"`
Mcp param.Field[interface{}] `json:"mcp"`
Model param.Field[string] `json:"model"`
Mode param.Field[map[string]interface{}] `json:"mode"`
Permission param.Field[interface{}] `json:"permission"`
Plugin param.Field[[]interface{}] `json:"plugin"`
Provider param.Field[map[string]interface{}] `json:"provider"`
Server param.Field[ConfigUpdateParamsServer] `json:"server"`
Skills param.Field[ConfigUpdateParamsSkills] `json:"skills"`
SmallModel param.Field[string] `json:"small_model"`
Snapshot param.Field[bool] `json:"snapshot"`
Tools param.Field[map[string]bool] `json:"tools"`
Username param.Field[string] `json:"username"`
Watcher param.Field[ConfigUpdateParamsWatcher] `json:"watcher"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ConfigUpdateParams) MarshalJSON ¶
func (r ConfigUpdateParams) MarshalJSON() (data []byte, err error)
func (ConfigUpdateParams) URLQuery ¶
func (r ConfigUpdateParams) URLQuery() (v url.Values)
URLQuery serializes ConfigUpdateParams's query parameters as `url.Values`.
type ConfigUpdateParamsCompaction ¶
type ConfigUpdateParamsCompaction struct {
Auto param.Field[bool] `json:"auto"`
Prune param.Field[bool] `json:"prune"`
TailTurns param.Field[int64] `json:"tail_turns"`
PreserveRecentTokens param.Field[int64] `json:"preserve_recent_tokens"`
Reserved param.Field[int64] `json:"reserved"`
}
func (ConfigUpdateParamsCompaction) MarshalJSON ¶
func (r ConfigUpdateParamsCompaction) MarshalJSON() (data []byte, err error)
type ConfigUpdateParamsEnterprise ¶
func (ConfigUpdateParamsEnterprise) MarshalJSON ¶
func (r ConfigUpdateParamsEnterprise) MarshalJSON() (data []byte, err error)
type ConfigUpdateParamsServer ¶
type ConfigUpdateParamsServer struct {
Port param.Field[int64] `json:"port"`
Hostname param.Field[string] `json:"hostname"`
Mdns param.Field[bool] `json:"mdns"`
MdnsDomain param.Field[string] `json:"mdnsDomain"`
Cors param.Field[[]string] `json:"cors"`
}
func (ConfigUpdateParamsServer) MarshalJSON ¶
func (r ConfigUpdateParamsServer) MarshalJSON() (data []byte, err error)
type ConfigUpdateParamsSkills ¶
type ConfigUpdateParamsSkills struct {
Paths param.Field[[]string] `json:"paths"`
URLs param.Field[[]string] `json:"urls"`
}
func (ConfigUpdateParamsSkills) MarshalJSON ¶
func (r ConfigUpdateParamsSkills) MarshalJSON() (data []byte, err error)
type ConfigUpdateParamsWatcher ¶
func (ConfigUpdateParamsWatcher) MarshalJSON ¶
func (r ConfigUpdateParamsWatcher) MarshalJSON() (data []byte, err error)
type ConfigWatcher ¶
type ConfigWatcher struct {
Ignore []string `json:"ignore"`
JSON configWatcherJSON `json:"-"`
}
TUI specific settings
func (*ConfigWatcher) UnmarshalJSON ¶
func (r *ConfigWatcher) UnmarshalJSON(data []byte) (err error)
type ConsoleGetParams ¶
type ConsoleGetParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ConsoleGetParams) URLQuery ¶
func (r ConsoleGetParams) URLQuery() (v url.Values)
type ConsoleListOrgsParams ¶
type ConsoleListOrgsParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ConsoleListOrgsParams) URLQuery ¶
func (r ConsoleListOrgsParams) URLQuery() (v url.Values)
type ConsoleListOrgsResponse ¶
type ConsoleListOrgsResponse struct {
Orgs []ConsoleOrg `json:"orgs,required"`
JSON consoleListOrgsResponseJSON `json:"-"`
}
func (*ConsoleListOrgsResponse) UnmarshalJSON ¶
func (r *ConsoleListOrgsResponse) UnmarshalJSON(data []byte) (err error)
type ConsoleOrg ¶
type ConsoleOrg struct {
AccountID string `json:"accountID,required"`
AccountEmail string `json:"accountEmail,required"`
AccountURL string `json:"accountUrl,required"`
OrgID string `json:"orgID,required"`
OrgName string `json:"orgName,required"`
Active bool `json:"active,required"`
JSON consoleOrgJSON `json:"-"`
}
func (*ConsoleOrg) UnmarshalJSON ¶
func (r *ConsoleOrg) UnmarshalJSON(data []byte) (err error)
type ConsoleService ¶
type ConsoleService struct {
Options []option.RequestOption
}
func NewConsoleService ¶
func NewConsoleService(opts ...option.RequestOption) (r *ConsoleService)
func (*ConsoleService) Get ¶
func (r *ConsoleService) Get(ctx context.Context, query ConsoleGetParams, opts ...option.RequestOption) (res *ConsoleState, err error)
func (*ConsoleService) ListOrgs ¶
func (r *ConsoleService) ListOrgs(ctx context.Context, query ConsoleListOrgsParams, opts ...option.RequestOption) (res *ConsoleListOrgsResponse, err error)
func (*ConsoleService) SwitchOrg ¶
func (r *ConsoleService) SwitchOrg(ctx context.Context, params ConsoleSwitchOrgParams, opts ...option.RequestOption) (res *bool, err error)
type ConsoleState ¶
type ConsoleState struct {
ConsoleManagedProviders []string `json:"consoleManagedProviders,required"`
SwitchableOrgCount float64 `json:"switchableOrgCount,required"`
ActiveOrgName string `json:"activeOrgName"`
JSON consoleStateJSON `json:"-"`
}
func (*ConsoleState) UnmarshalJSON ¶
func (r *ConsoleState) UnmarshalJSON(data []byte) (err error)
type ConsoleSwitchOrgParams ¶
type ConsoleSwitchOrgParams struct {
AccountID param.Field[string] `json:"accountID,required"`
OrgID param.Field[string] `json:"orgID,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ConsoleSwitchOrgParams) MarshalJSON ¶
func (r ConsoleSwitchOrgParams) MarshalJSON() (data []byte, err error)
func (ConsoleSwitchOrgParams) URLQuery ¶
func (r ConsoleSwitchOrgParams) URLQuery() (v url.Values)
type EventListParams ¶
type EventListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (EventListParams) URLQuery ¶
func (r EventListParams) URLQuery() (v url.Values)
URLQuery serializes EventListParams's query parameters as `url.Values`.
type EventListResponse ¶
type EventListResponse struct {
// This field can have the runtime type of
// [EventListResponseEventInstallationUpdatedProperties],
// [EventListResponseEventLspClientDiagnosticsProperties],
// [EventListResponseEventMessageUpdatedProperties],
// [EventListResponseEventMessageRemovedProperties],
// [EventListResponseEventMessagePartUpdatedProperties],
// [EventListResponseEventMessagePartRemovedProperties],
// [EventListResponseEventSessionCompactedProperties],
// [EventListResponseEventPermissionRepliedProperties],
// [EventListResponseEventFileEditedProperties],
// [EventListResponseEventFileWatcherUpdatedProperties],
// [EventListResponseEventTodoUpdatedProperties],
// [EventListResponseEventSessionIdleProperties],
// [EventListResponseEventSessionCreatedProperties],
// [EventListResponseEventSessionUpdatedProperties],
// [EventListResponseEventSessionDeletedProperties],
// [EventListResponseEventSessionErrorProperties], [interface{}].
Properties interface{} `json:"properties,required"`
Type EventListResponseType `json:"type,required"`
JSON eventListResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (EventListResponse) AsUnion ¶
func (r EventListResponse) AsUnion() EventListResponseUnion
AsUnion returns a EventListResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are EventListResponseEventInstallationUpdated, EventListResponseEventLspClientDiagnostics, EventListResponseEventMessageUpdated, EventListResponseEventMessageRemoved, EventListResponseEventMessagePartUpdated, EventListResponseEventMessagePartRemoved, EventListResponseEventSessionCompacted, EventListResponseEventPermissionReplied, EventListResponseEventFileEdited, EventListResponseEventFileWatcherUpdated, EventListResponseEventTodoUpdated, EventListResponseEventSessionIdle, EventListResponseEventSessionCreated, EventListResponseEventSessionUpdated, EventListResponseEventSessionDeleted, EventListResponseEventSessionError, EventListResponseEventServerConnected.
func (*EventListResponse) UnmarshalJSON ¶
func (r *EventListResponse) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventCommandExecuted ¶
type EventListResponseEventCommandExecuted struct {
Properties EventListResponseEventCommandExecutedProperties `json:"properties,required"`
Type EventListResponseEventCommandExecutedType `json:"type,required"`
JSON eventListResponseEventCommandExecutedJSON `json:"-"`
}
func (*EventListResponseEventCommandExecuted) UnmarshalJSON ¶
func (r *EventListResponseEventCommandExecuted) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventCommandExecutedProperties ¶
type EventListResponseEventCommandExecutedProperties struct {
Name string `json:"name,required"`
SessionID string `json:"sessionID,required"`
Arguments string `json:"arguments,required"`
MessageID string `json:"messageID,required"`
JSON eventListResponseEventCommandExecutedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventCommandExecutedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventCommandExecutedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventCommandExecutedType ¶
type EventListResponseEventCommandExecutedType string
const (
EventListResponseEventCommandExecutedTypeCommandExecuted EventListResponseEventCommandExecutedType = "command.executed"
)
func (EventListResponseEventCommandExecutedType) IsKnown ¶
func (r EventListResponseEventCommandExecutedType) IsKnown() bool
type EventListResponseEventFileEdited ¶
type EventListResponseEventFileEdited struct {
Properties EventListResponseEventFileEditedProperties `json:"properties,required"`
Type EventListResponseEventFileEditedType `json:"type,required"`
JSON eventListResponseEventFileEditedJSON `json:"-"`
}
func (*EventListResponseEventFileEdited) UnmarshalJSON ¶
func (r *EventListResponseEventFileEdited) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventFileEditedProperties ¶
type EventListResponseEventFileEditedProperties struct {
File string `json:"file,required"`
JSON eventListResponseEventFileEditedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventFileEditedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventFileEditedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventFileEditedType ¶
type EventListResponseEventFileEditedType string
const (
EventListResponseEventFileEditedTypeFileEdited EventListResponseEventFileEditedType = "file.edited"
)
func (EventListResponseEventFileEditedType) IsKnown ¶
func (r EventListResponseEventFileEditedType) IsKnown() bool
type EventListResponseEventFileWatcherUpdated ¶
type EventListResponseEventFileWatcherUpdated struct {
Properties EventListResponseEventFileWatcherUpdatedProperties `json:"properties,required"`
Type EventListResponseEventFileWatcherUpdatedType `json:"type,required"`
JSON eventListResponseEventFileWatcherUpdatedJSON `json:"-"`
}
func (*EventListResponseEventFileWatcherUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventFileWatcherUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventFileWatcherUpdatedProperties ¶
type EventListResponseEventFileWatcherUpdatedProperties struct {
Event EventListResponseEventFileWatcherUpdatedPropertiesEvent `json:"event,required"`
File string `json:"file,required"`
JSON eventListResponseEventFileWatcherUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventFileWatcherUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventFileWatcherUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventFileWatcherUpdatedPropertiesEvent ¶
type EventListResponseEventFileWatcherUpdatedPropertiesEvent string
const ( EventListResponseEventFileWatcherUpdatedPropertiesEventAdd EventListResponseEventFileWatcherUpdatedPropertiesEvent = "add" EventListResponseEventFileWatcherUpdatedPropertiesEventChange EventListResponseEventFileWatcherUpdatedPropertiesEvent = "change" EventListResponseEventFileWatcherUpdatedPropertiesEventUnlink EventListResponseEventFileWatcherUpdatedPropertiesEvent = "unlink" )
func (EventListResponseEventFileWatcherUpdatedPropertiesEvent) IsKnown ¶
func (r EventListResponseEventFileWatcherUpdatedPropertiesEvent) IsKnown() bool
type EventListResponseEventFileWatcherUpdatedType ¶
type EventListResponseEventFileWatcherUpdatedType string
const (
EventListResponseEventFileWatcherUpdatedTypeFileWatcherUpdated EventListResponseEventFileWatcherUpdatedType = "file.watcher.updated"
)
func (EventListResponseEventFileWatcherUpdatedType) IsKnown ¶
func (r EventListResponseEventFileWatcherUpdatedType) IsKnown() bool
type EventListResponseEventGlobalDisposed ¶
type EventListResponseEventGlobalDisposed struct {
Properties interface{} `json:"properties,required"`
Type EventListResponseEventGlobalDisposedType `json:"type,required"`
JSON eventListResponseEventGlobalDisposedJSON `json:"-"`
}
func (*EventListResponseEventGlobalDisposed) UnmarshalJSON ¶
func (r *EventListResponseEventGlobalDisposed) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventGlobalDisposedType ¶
type EventListResponseEventGlobalDisposedType string
const (
EventListResponseEventGlobalDisposedTypeGlobalDisposed EventListResponseEventGlobalDisposedType = "global.disposed"
)
func (EventListResponseEventGlobalDisposedType) IsKnown ¶
func (r EventListResponseEventGlobalDisposedType) IsKnown() bool
type EventListResponseEventInstallationUpdateAvailable ¶
type EventListResponseEventInstallationUpdateAvailable struct {
Properties EventListResponseEventInstallationUpdateAvailableProperties `json:"properties,required"`
Type EventListResponseEventInstallationUpdateAvailableType `json:"type,required"`
JSON eventListResponseEventInstallationUpdateAvailableJSON `json:"-"`
}
func (*EventListResponseEventInstallationUpdateAvailable) UnmarshalJSON ¶
func (r *EventListResponseEventInstallationUpdateAvailable) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventInstallationUpdateAvailableProperties ¶
type EventListResponseEventInstallationUpdateAvailableProperties struct {
Version string `json:"version,required"`
JSON eventListResponseEventInstallationUpdateAvailablePropertiesJSON `json:"-"`
}
func (*EventListResponseEventInstallationUpdateAvailableProperties) UnmarshalJSON ¶
func (r *EventListResponseEventInstallationUpdateAvailableProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventInstallationUpdateAvailableType ¶
type EventListResponseEventInstallationUpdateAvailableType string
const (
EventListResponseEventInstallationUpdateAvailableTypeInstallationUpdateAvailable EventListResponseEventInstallationUpdateAvailableType = "installation.update-available"
)
func (EventListResponseEventInstallationUpdateAvailableType) IsKnown ¶
func (r EventListResponseEventInstallationUpdateAvailableType) IsKnown() bool
type EventListResponseEventInstallationUpdated ¶
type EventListResponseEventInstallationUpdated struct {
Properties EventListResponseEventInstallationUpdatedProperties `json:"properties,required"`
Type EventListResponseEventInstallationUpdatedType `json:"type,required"`
JSON eventListResponseEventInstallationUpdatedJSON `json:"-"`
}
func (*EventListResponseEventInstallationUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventInstallationUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventInstallationUpdatedProperties ¶
type EventListResponseEventInstallationUpdatedProperties struct {
Version string `json:"version,required"`
JSON eventListResponseEventInstallationUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventInstallationUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventInstallationUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventInstallationUpdatedType ¶
type EventListResponseEventInstallationUpdatedType string
const (
EventListResponseEventInstallationUpdatedTypeInstallationUpdated EventListResponseEventInstallationUpdatedType = "installation.updated"
)
func (EventListResponseEventInstallationUpdatedType) IsKnown ¶
func (r EventListResponseEventInstallationUpdatedType) IsKnown() bool
type EventListResponseEventLspClientDiagnostics ¶
type EventListResponseEventLspClientDiagnostics struct {
Properties EventListResponseEventLspClientDiagnosticsProperties `json:"properties,required"`
Type EventListResponseEventLspClientDiagnosticsType `json:"type,required"`
JSON eventListResponseEventLspClientDiagnosticsJSON `json:"-"`
}
func (*EventListResponseEventLspClientDiagnostics) UnmarshalJSON ¶
func (r *EventListResponseEventLspClientDiagnostics) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventLspClientDiagnosticsProperties ¶
type EventListResponseEventLspClientDiagnosticsProperties struct {
Path string `json:"path,required"`
ServerID string `json:"serverID,required"`
JSON eventListResponseEventLspClientDiagnosticsPropertiesJSON `json:"-"`
}
func (*EventListResponseEventLspClientDiagnosticsProperties) UnmarshalJSON ¶
func (r *EventListResponseEventLspClientDiagnosticsProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventLspClientDiagnosticsType ¶
type EventListResponseEventLspClientDiagnosticsType string
const (
EventListResponseEventLspClientDiagnosticsTypeLspClientDiagnostics EventListResponseEventLspClientDiagnosticsType = "lsp.client.diagnostics"
)
func (EventListResponseEventLspClientDiagnosticsType) IsKnown ¶
func (r EventListResponseEventLspClientDiagnosticsType) IsKnown() bool
type EventListResponseEventLspUpdated ¶
type EventListResponseEventLspUpdated struct {
Properties interface{} `json:"properties,required"`
Type EventListResponseEventLspUpdatedType `json:"type,required"`
JSON eventListResponseEventLspUpdatedJSON `json:"-"`
}
func (*EventListResponseEventLspUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventLspUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventLspUpdatedType ¶
type EventListResponseEventLspUpdatedType string
const (
EventListResponseEventLspUpdatedTypeLspUpdated EventListResponseEventLspUpdatedType = "lsp.updated"
)
func (EventListResponseEventLspUpdatedType) IsKnown ¶
func (r EventListResponseEventLspUpdatedType) IsKnown() bool
type EventListResponseEventMcpBrowserOpenFailed ¶
type EventListResponseEventMcpBrowserOpenFailed struct {
Properties EventListResponseEventMcpBrowserOpenFailedProperties `json:"properties,required"`
Type EventListResponseEventMcpBrowserOpenFailedType `json:"type,required"`
JSON eventListResponseEventMcpBrowserOpenFailedJSON `json:"-"`
}
func (*EventListResponseEventMcpBrowserOpenFailed) UnmarshalJSON ¶
func (r *EventListResponseEventMcpBrowserOpenFailed) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMcpBrowserOpenFailedProperties ¶
type EventListResponseEventMcpBrowserOpenFailedProperties struct {
McpName string `json:"mcpName,required"`
URL string `json:"url,required"`
JSON eventListResponseEventMcpBrowserOpenFailedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMcpBrowserOpenFailedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMcpBrowserOpenFailedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMcpBrowserOpenFailedType ¶
type EventListResponseEventMcpBrowserOpenFailedType string
const (
EventListResponseEventMcpBrowserOpenFailedTypeMcpBrowserOpenFailed EventListResponseEventMcpBrowserOpenFailedType = "mcp.browser.open.failed"
)
func (EventListResponseEventMcpBrowserOpenFailedType) IsKnown ¶
func (r EventListResponseEventMcpBrowserOpenFailedType) IsKnown() bool
type EventListResponseEventMcpToolsChanged ¶
type EventListResponseEventMcpToolsChanged struct {
Properties EventListResponseEventMcpToolsChangedProperties `json:"properties,required"`
Type EventListResponseEventMcpToolsChangedType `json:"type,required"`
JSON eventListResponseEventMcpToolsChangedJSON `json:"-"`
}
func (*EventListResponseEventMcpToolsChanged) UnmarshalJSON ¶
func (r *EventListResponseEventMcpToolsChanged) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMcpToolsChangedProperties ¶
type EventListResponseEventMcpToolsChangedProperties struct {
Server string `json:"server,required"`
JSON eventListResponseEventMcpToolsChangedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMcpToolsChangedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMcpToolsChangedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMcpToolsChangedType ¶
type EventListResponseEventMcpToolsChangedType string
const (
EventListResponseEventMcpToolsChangedTypeMcpToolsChanged EventListResponseEventMcpToolsChangedType = "mcp.tools.changed"
)
func (EventListResponseEventMcpToolsChangedType) IsKnown ¶
func (r EventListResponseEventMcpToolsChangedType) IsKnown() bool
type EventListResponseEventMessagePartDelta ¶
type EventListResponseEventMessagePartDelta struct {
Properties EventListResponseEventMessagePartDeltaProperties `json:"properties,required"`
Type EventListResponseEventMessagePartDeltaType `json:"type,required"`
JSON eventListResponseEventMessagePartDeltaJSON `json:"-"`
}
func (*EventListResponseEventMessagePartDelta) UnmarshalJSON ¶
func (r *EventListResponseEventMessagePartDelta) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessagePartDeltaProperties ¶
type EventListResponseEventMessagePartDeltaProperties struct {
SessionID string `json:"sessionID,required"`
MessageID string `json:"messageID,required"`
PartID string `json:"partID,required"`
Field string `json:"field,required"`
Delta string `json:"delta,required"`
JSON eventListResponseEventMessagePartDeltaPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMessagePartDeltaProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMessagePartDeltaProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessagePartDeltaType ¶
type EventListResponseEventMessagePartDeltaType string
const (
EventListResponseEventMessagePartDeltaTypeMessagePartDelta EventListResponseEventMessagePartDeltaType = "message.part.delta"
)
func (EventListResponseEventMessagePartDeltaType) IsKnown ¶
func (r EventListResponseEventMessagePartDeltaType) IsKnown() bool
type EventListResponseEventMessagePartRemoved ¶
type EventListResponseEventMessagePartRemoved struct {
Properties EventListResponseEventMessagePartRemovedProperties `json:"properties,required"`
Type EventListResponseEventMessagePartRemovedType `json:"type,required"`
JSON eventListResponseEventMessagePartRemovedJSON `json:"-"`
}
func (*EventListResponseEventMessagePartRemoved) UnmarshalJSON ¶
func (r *EventListResponseEventMessagePartRemoved) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessagePartRemovedProperties ¶
type EventListResponseEventMessagePartRemovedProperties struct {
MessageID string `json:"messageID,required"`
PartID string `json:"partID,required"`
SessionID string `json:"sessionID,required"`
JSON eventListResponseEventMessagePartRemovedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMessagePartRemovedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMessagePartRemovedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessagePartRemovedType ¶
type EventListResponseEventMessagePartRemovedType string
const (
EventListResponseEventMessagePartRemovedTypeMessagePartRemoved EventListResponseEventMessagePartRemovedType = "message.part.removed"
)
func (EventListResponseEventMessagePartRemovedType) IsKnown ¶
func (r EventListResponseEventMessagePartRemovedType) IsKnown() bool
type EventListResponseEventMessagePartUpdated ¶
type EventListResponseEventMessagePartUpdated struct {
Properties EventListResponseEventMessagePartUpdatedProperties `json:"properties,required"`
Type EventListResponseEventMessagePartUpdatedType `json:"type,required"`
JSON eventListResponseEventMessagePartUpdatedJSON `json:"-"`
}
func (*EventListResponseEventMessagePartUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventMessagePartUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessagePartUpdatedProperties ¶
type EventListResponseEventMessagePartUpdatedProperties struct {
SessionID string `json:"sessionID,required"`
Part Part `json:"part,required"`
Time float64 `json:"time,required"`
JSON eventListResponseEventMessagePartUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMessagePartUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMessagePartUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessagePartUpdatedType ¶
type EventListResponseEventMessagePartUpdatedType string
const (
EventListResponseEventMessagePartUpdatedTypeMessagePartUpdated EventListResponseEventMessagePartUpdatedType = "message.part.updated"
)
func (EventListResponseEventMessagePartUpdatedType) IsKnown ¶
func (r EventListResponseEventMessagePartUpdatedType) IsKnown() bool
type EventListResponseEventMessageRemoved ¶
type EventListResponseEventMessageRemoved struct {
Properties EventListResponseEventMessageRemovedProperties `json:"properties,required"`
Type EventListResponseEventMessageRemovedType `json:"type,required"`
JSON eventListResponseEventMessageRemovedJSON `json:"-"`
}
func (*EventListResponseEventMessageRemoved) UnmarshalJSON ¶
func (r *EventListResponseEventMessageRemoved) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessageRemovedProperties ¶
type EventListResponseEventMessageRemovedProperties struct {
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
JSON eventListResponseEventMessageRemovedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMessageRemovedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMessageRemovedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessageRemovedType ¶
type EventListResponseEventMessageRemovedType string
const (
EventListResponseEventMessageRemovedTypeMessageRemoved EventListResponseEventMessageRemovedType = "message.removed"
)
func (EventListResponseEventMessageRemovedType) IsKnown ¶
func (r EventListResponseEventMessageRemovedType) IsKnown() bool
type EventListResponseEventMessageUpdated ¶
type EventListResponseEventMessageUpdated struct {
Properties EventListResponseEventMessageUpdatedProperties `json:"properties,required"`
Type EventListResponseEventMessageUpdatedType `json:"type,required"`
JSON eventListResponseEventMessageUpdatedJSON `json:"-"`
}
func (*EventListResponseEventMessageUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventMessageUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessageUpdatedProperties ¶
type EventListResponseEventMessageUpdatedProperties struct {
SessionID string `json:"sessionID,required"`
Info Message `json:"info,required"`
JSON eventListResponseEventMessageUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventMessageUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventMessageUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventMessageUpdatedType ¶
type EventListResponseEventMessageUpdatedType string
const (
EventListResponseEventMessageUpdatedTypeMessageUpdated EventListResponseEventMessageUpdatedType = "message.updated"
)
func (EventListResponseEventMessageUpdatedType) IsKnown ¶
func (r EventListResponseEventMessageUpdatedType) IsKnown() bool
type EventListResponseEventPermissionAsked ¶
type EventListResponseEventPermissionAsked struct {
Properties PermissionRequest `json:"properties,required"`
Type EventListResponseEventPermissionAskedType `json:"type,required"`
JSON eventListResponseEventPermissionAskedJSON `json:"-"`
}
func (*EventListResponseEventPermissionAsked) UnmarshalJSON ¶
func (r *EventListResponseEventPermissionAsked) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPermissionAskedType ¶
type EventListResponseEventPermissionAskedType string
const (
EventListResponseEventPermissionAskedTypePermissionAsked EventListResponseEventPermissionAskedType = "permission.asked"
)
func (EventListResponseEventPermissionAskedType) IsKnown ¶
func (r EventListResponseEventPermissionAskedType) IsKnown() bool
type EventListResponseEventPermissionReplied ¶
type EventListResponseEventPermissionReplied struct {
Properties EventListResponseEventPermissionRepliedProperties `json:"properties,required"`
Type EventListResponseEventPermissionRepliedType `json:"type,required"`
JSON eventListResponseEventPermissionRepliedJSON `json:"-"`
}
func (*EventListResponseEventPermissionReplied) UnmarshalJSON ¶
func (r *EventListResponseEventPermissionReplied) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPermissionRepliedProperties ¶
type EventListResponseEventPermissionRepliedProperties struct {
RequestID string `json:"requestID,required"`
Reply PermissionReplyParamsReply `json:"reply,required"`
SessionID string `json:"sessionID,required"`
JSON eventListResponseEventPermissionRepliedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventPermissionRepliedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventPermissionRepliedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPermissionRepliedType ¶
type EventListResponseEventPermissionRepliedType string
const (
EventListResponseEventPermissionRepliedTypePermissionReplied EventListResponseEventPermissionRepliedType = "permission.replied"
)
func (EventListResponseEventPermissionRepliedType) IsKnown ¶
func (r EventListResponseEventPermissionRepliedType) IsKnown() bool
type EventListResponseEventProjectUpdated ¶
type EventListResponseEventProjectUpdated struct {
Properties Project `json:"properties,required"`
Type EventListResponseEventProjectUpdatedType `json:"type,required"`
JSON eventListResponseEventProjectUpdatedJSON `json:"-"`
}
func (*EventListResponseEventProjectUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventProjectUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventProjectUpdatedType ¶
type EventListResponseEventProjectUpdatedType string
const (
EventListResponseEventProjectUpdatedTypeProjectUpdated EventListResponseEventProjectUpdatedType = "project.updated"
)
func (EventListResponseEventProjectUpdatedType) IsKnown ¶
func (r EventListResponseEventProjectUpdatedType) IsKnown() bool
type EventListResponseEventPtyCreated ¶
type EventListResponseEventPtyCreated struct {
Properties EventListResponseEventPtyCreatedProperties `json:"properties,required"`
Type EventListResponseEventPtyCreatedType `json:"type,required"`
JSON eventListResponseEventPtyCreatedJSON `json:"-"`
}
func (*EventListResponseEventPtyCreated) UnmarshalJSON ¶
func (r *EventListResponseEventPtyCreated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyCreatedProperties ¶
type EventListResponseEventPtyCreatedProperties struct {
Info Pty `json:"info,required"`
JSON eventListResponseEventPtyCreatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventPtyCreatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventPtyCreatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyCreatedType ¶
type EventListResponseEventPtyCreatedType string
const (
EventListResponseEventPtyCreatedTypePtyCreated EventListResponseEventPtyCreatedType = "pty.created"
)
func (EventListResponseEventPtyCreatedType) IsKnown ¶
func (r EventListResponseEventPtyCreatedType) IsKnown() bool
type EventListResponseEventPtyDeleted ¶
type EventListResponseEventPtyDeleted struct {
Properties EventListResponseEventPtyDeletedProperties `json:"properties,required"`
Type EventListResponseEventPtyDeletedType `json:"type,required"`
JSON eventListResponseEventPtyDeletedJSON `json:"-"`
}
func (*EventListResponseEventPtyDeleted) UnmarshalJSON ¶
func (r *EventListResponseEventPtyDeleted) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyDeletedProperties ¶
type EventListResponseEventPtyDeletedProperties struct {
ID string `json:"id,required"`
JSON eventListResponseEventPtyDeletedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventPtyDeletedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventPtyDeletedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyDeletedType ¶
type EventListResponseEventPtyDeletedType string
const (
EventListResponseEventPtyDeletedTypePtyDeleted EventListResponseEventPtyDeletedType = "pty.deleted"
)
func (EventListResponseEventPtyDeletedType) IsKnown ¶
func (r EventListResponseEventPtyDeletedType) IsKnown() bool
type EventListResponseEventPtyExited ¶
type EventListResponseEventPtyExited struct {
Properties EventListResponseEventPtyExitedProperties `json:"properties,required"`
Type EventListResponseEventPtyExitedType `json:"type,required"`
JSON eventListResponseEventPtyExitedJSON `json:"-"`
}
func (*EventListResponseEventPtyExited) UnmarshalJSON ¶
func (r *EventListResponseEventPtyExited) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyExitedProperties ¶
type EventListResponseEventPtyExitedProperties struct {
ID string `json:"id,required"`
ExitCode float64 `json:"exitCode,required"`
JSON eventListResponseEventPtyExitedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventPtyExitedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventPtyExitedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyExitedType ¶
type EventListResponseEventPtyExitedType string
const (
EventListResponseEventPtyExitedTypePtyExited EventListResponseEventPtyExitedType = "pty.exited"
)
func (EventListResponseEventPtyExitedType) IsKnown ¶
func (r EventListResponseEventPtyExitedType) IsKnown() bool
type EventListResponseEventPtyUpdated ¶
type EventListResponseEventPtyUpdated struct {
Properties EventListResponseEventPtyUpdatedProperties `json:"properties,required"`
Type EventListResponseEventPtyUpdatedType `json:"type,required"`
JSON eventListResponseEventPtyUpdatedJSON `json:"-"`
}
func (*EventListResponseEventPtyUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventPtyUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyUpdatedProperties ¶
type EventListResponseEventPtyUpdatedProperties struct {
Info Pty `json:"info,required"`
JSON eventListResponseEventPtyUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventPtyUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventPtyUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventPtyUpdatedType ¶
type EventListResponseEventPtyUpdatedType string
const (
EventListResponseEventPtyUpdatedTypePtyUpdated EventListResponseEventPtyUpdatedType = "pty.updated"
)
func (EventListResponseEventPtyUpdatedType) IsKnown ¶
func (r EventListResponseEventPtyUpdatedType) IsKnown() bool
type EventListResponseEventQuestionAsked ¶
type EventListResponseEventQuestionAsked struct {
Properties QuestionRequest `json:"properties,required"`
Type EventListResponseEventQuestionAskedType `json:"type,required"`
JSON eventListResponseEventQuestionAskedJSON `json:"-"`
}
func (*EventListResponseEventQuestionAsked) UnmarshalJSON ¶
func (r *EventListResponseEventQuestionAsked) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventQuestionAskedType ¶
type EventListResponseEventQuestionAskedType string
const (
EventListResponseEventQuestionAskedTypeQuestionAsked EventListResponseEventQuestionAskedType = "question.asked"
)
func (EventListResponseEventQuestionAskedType) IsKnown ¶
func (r EventListResponseEventQuestionAskedType) IsKnown() bool
type EventListResponseEventQuestionRejected ¶
type EventListResponseEventQuestionRejected struct {
Properties QuestionRejected `json:"properties,required"`
Type EventListResponseEventQuestionRejectedType `json:"type,required"`
JSON eventListResponseEventQuestionRejectedJSON `json:"-"`
}
func (*EventListResponseEventQuestionRejected) UnmarshalJSON ¶
func (r *EventListResponseEventQuestionRejected) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventQuestionRejectedType ¶
type EventListResponseEventQuestionRejectedType string
const (
EventListResponseEventQuestionRejectedTypeQuestionRejected EventListResponseEventQuestionRejectedType = "question.rejected"
)
func (EventListResponseEventQuestionRejectedType) IsKnown ¶
func (r EventListResponseEventQuestionRejectedType) IsKnown() bool
type EventListResponseEventQuestionReplied ¶
type EventListResponseEventQuestionReplied struct {
Properties QuestionReplied `json:"properties,required"`
Type EventListResponseEventQuestionRepliedType `json:"type,required"`
JSON eventListResponseEventQuestionRepliedJSON `json:"-"`
}
func (*EventListResponseEventQuestionReplied) UnmarshalJSON ¶
func (r *EventListResponseEventQuestionReplied) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventQuestionRepliedType ¶
type EventListResponseEventQuestionRepliedType string
const (
EventListResponseEventQuestionRepliedTypeQuestionReplied EventListResponseEventQuestionRepliedType = "question.replied"
)
func (EventListResponseEventQuestionRepliedType) IsKnown ¶
func (r EventListResponseEventQuestionRepliedType) IsKnown() bool
type EventListResponseEventServerConnected ¶
type EventListResponseEventServerConnected struct {
Properties interface{} `json:"properties,required"`
Type EventListResponseEventServerConnectedType `json:"type,required"`
JSON eventListResponseEventServerConnectedJSON `json:"-"`
}
func (*EventListResponseEventServerConnected) UnmarshalJSON ¶
func (r *EventListResponseEventServerConnected) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventServerConnectedType ¶
type EventListResponseEventServerConnectedType string
const (
EventListResponseEventServerConnectedTypeServerConnected EventListResponseEventServerConnectedType = "server.connected"
)
func (EventListResponseEventServerConnectedType) IsKnown ¶
func (r EventListResponseEventServerConnectedType) IsKnown() bool
type EventListResponseEventServerInstanceDisposed ¶
type EventListResponseEventServerInstanceDisposed struct {
Properties EventListResponseEventServerInstanceDisposedProperties `json:"properties,required"`
Type EventListResponseEventServerInstanceDisposedType `json:"type,required"`
JSON eventListResponseEventServerInstanceDisposedJSON `json:"-"`
}
func (*EventListResponseEventServerInstanceDisposed) UnmarshalJSON ¶
func (r *EventListResponseEventServerInstanceDisposed) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventServerInstanceDisposedProperties ¶
type EventListResponseEventServerInstanceDisposedProperties struct {
Directory string `json:"directory,required"`
JSON eventListResponseEventServerInstanceDisposedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventServerInstanceDisposedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventServerInstanceDisposedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventServerInstanceDisposedType ¶
type EventListResponseEventServerInstanceDisposedType string
const (
EventListResponseEventServerInstanceDisposedTypeServerInstanceDisposed EventListResponseEventServerInstanceDisposedType = "server.instance.disposed"
)
func (EventListResponseEventServerInstanceDisposedType) IsKnown ¶
func (r EventListResponseEventServerInstanceDisposedType) IsKnown() bool
type EventListResponseEventSessionCompacted ¶
type EventListResponseEventSessionCompacted struct {
Properties EventListResponseEventSessionCompactedProperties `json:"properties,required"`
Type EventListResponseEventSessionCompactedType `json:"type,required"`
JSON eventListResponseEventSessionCompactedJSON `json:"-"`
}
func (*EventListResponseEventSessionCompacted) UnmarshalJSON ¶
func (r *EventListResponseEventSessionCompacted) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionCompactedProperties ¶
type EventListResponseEventSessionCompactedProperties struct {
SessionID string `json:"sessionID,required"`
JSON eventListResponseEventSessionCompactedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionCompactedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionCompactedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionCompactedType ¶
type EventListResponseEventSessionCompactedType string
const (
EventListResponseEventSessionCompactedTypeSessionCompacted EventListResponseEventSessionCompactedType = "session.compacted"
)
func (EventListResponseEventSessionCompactedType) IsKnown ¶
func (r EventListResponseEventSessionCompactedType) IsKnown() bool
type EventListResponseEventSessionCreated ¶
type EventListResponseEventSessionCreated struct {
Properties EventListResponseEventSessionCreatedProperties `json:"properties,required"`
Type EventListResponseEventSessionCreatedType `json:"type,required"`
JSON eventListResponseEventSessionCreatedJSON `json:"-"`
}
func (*EventListResponseEventSessionCreated) UnmarshalJSON ¶
func (r *EventListResponseEventSessionCreated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionCreatedProperties ¶
type EventListResponseEventSessionCreatedProperties struct {
SessionID string `json:"sessionID,required"`
Info Session `json:"info,required"`
JSON eventListResponseEventSessionCreatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionCreatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionCreatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionCreatedType ¶
type EventListResponseEventSessionCreatedType string
const (
EventListResponseEventSessionCreatedTypeSessionCreated EventListResponseEventSessionCreatedType = "session.created"
)
func (EventListResponseEventSessionCreatedType) IsKnown ¶
func (r EventListResponseEventSessionCreatedType) IsKnown() bool
type EventListResponseEventSessionDeleted ¶
type EventListResponseEventSessionDeleted struct {
Properties EventListResponseEventSessionDeletedProperties `json:"properties,required"`
Type EventListResponseEventSessionDeletedType `json:"type,required"`
JSON eventListResponseEventSessionDeletedJSON `json:"-"`
}
func (*EventListResponseEventSessionDeleted) UnmarshalJSON ¶
func (r *EventListResponseEventSessionDeleted) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionDeletedProperties ¶
type EventListResponseEventSessionDeletedProperties struct {
SessionID string `json:"sessionID,required"`
Info Session `json:"info,required"`
JSON eventListResponseEventSessionDeletedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionDeletedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionDeletedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionDeletedType ¶
type EventListResponseEventSessionDeletedType string
const (
EventListResponseEventSessionDeletedTypeSessionDeleted EventListResponseEventSessionDeletedType = "session.deleted"
)
func (EventListResponseEventSessionDeletedType) IsKnown ¶
func (r EventListResponseEventSessionDeletedType) IsKnown() bool
type EventListResponseEventSessionDiff ¶
type EventListResponseEventSessionDiff struct {
Properties EventListResponseEventSessionDiffProperties `json:"properties,required"`
Type EventListResponseEventSessionDiffType `json:"type,required"`
JSON eventListResponseEventSessionDiffJSON `json:"-"`
}
func (*EventListResponseEventSessionDiff) UnmarshalJSON ¶
func (r *EventListResponseEventSessionDiff) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionDiffProperties ¶
type EventListResponseEventSessionDiffProperties struct {
SessionID string `json:"sessionID,required"`
Diff []SnapshotFileDiff `json:"diff,required"`
JSON eventListResponseEventSessionDiffPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionDiffProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionDiffProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionDiffType ¶
type EventListResponseEventSessionDiffType string
const (
EventListResponseEventSessionDiffTypeSessionDiff EventListResponseEventSessionDiffType = "session.diff"
)
func (EventListResponseEventSessionDiffType) IsKnown ¶
func (r EventListResponseEventSessionDiffType) IsKnown() bool
type EventListResponseEventSessionError ¶
type EventListResponseEventSessionError struct {
Properties EventListResponseEventSessionErrorProperties `json:"properties,required"`
Type EventListResponseEventSessionErrorType `json:"type,required"`
JSON eventListResponseEventSessionErrorJSON `json:"-"`
}
func (*EventListResponseEventSessionError) UnmarshalJSON ¶
func (r *EventListResponseEventSessionError) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorProperties ¶
type EventListResponseEventSessionErrorProperties struct {
Error EventListResponseEventSessionErrorPropertiesError `json:"error"`
SessionID string `json:"sessionID"`
JSON eventListResponseEventSessionErrorPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionErrorProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionErrorProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorPropertiesError ¶
type EventListResponseEventSessionErrorPropertiesError struct {
// This field can have the runtime type of [shared.ProviderAuthErrorData],
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData],
// [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData].
Data interface{} `json:"data,required"`
Name EventListResponseEventSessionErrorPropertiesErrorName `json:"name,required"`
JSON eventListResponseEventSessionErrorPropertiesErrorJSON `json:"-"`
// contains filtered or unexported fields
}
func (EventListResponseEventSessionErrorPropertiesError) AsUnion ¶
func (r EventListResponseEventSessionErrorPropertiesError) AsUnion() EventListResponseEventSessionErrorPropertiesErrorUnion
AsUnion returns a EventListResponseEventSessionErrorPropertiesErrorUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are shared.ProviderAuthError, shared.UnknownError, EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError, shared.MessageAbortedError, EventListResponseEventSessionErrorPropertiesErrorAPIError, AssistantMessageErrorStructuredOutputError, AssistantMessageErrorContextOverflowError.
func (*EventListResponseEventSessionErrorPropertiesError) UnmarshalJSON ¶
func (r *EventListResponseEventSessionErrorPropertiesError) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorPropertiesErrorAPIError ¶
type EventListResponseEventSessionErrorPropertiesErrorAPIError struct {
Data EventListResponseEventSessionErrorPropertiesErrorAPIErrorData `json:"data,required"`
Name EventListResponseEventSessionErrorPropertiesErrorAPIErrorName `json:"name,required"`
JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON `json:"-"`
}
func (EventListResponseEventSessionErrorPropertiesErrorAPIError) ImplementsEventListResponseEventSessionErrorPropertiesError ¶
func (r EventListResponseEventSessionErrorPropertiesErrorAPIError) ImplementsEventListResponseEventSessionErrorPropertiesError()
func (*EventListResponseEventSessionErrorPropertiesErrorAPIError) UnmarshalJSON ¶
func (r *EventListResponseEventSessionErrorPropertiesErrorAPIError) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorData ¶
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorData struct {
IsRetryable bool `json:"isRetryable,required"`
Message string `json:"message,required"`
Metadata map[string]string `json:"metadata"`
ResponseBody string `json:"responseBody"`
ResponseHeaders map[string]string `json:"responseHeaders"`
StatusCode float64 `json:"statusCode"`
JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON `json:"-"`
}
func (*EventListResponseEventSessionErrorPropertiesErrorAPIErrorData) UnmarshalJSON ¶
func (r *EventListResponseEventSessionErrorPropertiesErrorAPIErrorData) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorName ¶
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorName string
const (
EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorAPIErrorName = "APIError"
)
func (EventListResponseEventSessionErrorPropertiesErrorAPIErrorName) IsKnown ¶
func (r EventListResponseEventSessionErrorPropertiesErrorAPIErrorName) IsKnown() bool
type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError ¶
type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError struct {
Data EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorData `json:"data,required"`
Name EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName `json:"name,required"`
JSON eventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorJSON `json:"-"`
}
func (EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError) ImplementsEventListResponseEventSessionErrorPropertiesError ¶
func (r EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError) ImplementsEventListResponseEventSessionErrorPropertiesError()
func (*EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError) UnmarshalJSON ¶
func (r *EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorData ¶
type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorData struct {
Message string `json:"message,required"`
JSON eventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorDataJSON `json:"-"`
}
func (*EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorData) UnmarshalJSON ¶
func (r *EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorData) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName ¶
type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName string
const (
EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName = "MessageOutputLengthError"
)
type EventListResponseEventSessionErrorPropertiesErrorName ¶
type EventListResponseEventSessionErrorPropertiesErrorName string
const ( EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError EventListResponseEventSessionErrorPropertiesErrorName = "ProviderAuthError" EventListResponseEventSessionErrorPropertiesErrorNameUnknownError EventListResponseEventSessionErrorPropertiesErrorName = "UnknownError" EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorName = "MessageOutputLengthError" EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError EventListResponseEventSessionErrorPropertiesErrorName = "MessageAbortedError" EventListResponseEventSessionErrorPropertiesErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorName = "APIError" EventListResponseEventSessionErrorPropertiesErrorNameStructuredOutputError EventListResponseEventSessionErrorPropertiesErrorName = "StructuredOutputError" EventListResponseEventSessionErrorPropertiesErrorNameContextOverflowError EventListResponseEventSessionErrorPropertiesErrorName = "ContextOverflowError" )
func (EventListResponseEventSessionErrorPropertiesErrorName) IsKnown ¶
func (r EventListResponseEventSessionErrorPropertiesErrorName) IsKnown() bool
type EventListResponseEventSessionErrorPropertiesErrorUnion ¶
type EventListResponseEventSessionErrorPropertiesErrorUnion interface {
ImplementsEventListResponseEventSessionErrorPropertiesError()
}
Union satisfied by shared.ProviderAuthError, shared.UnknownError, EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError, shared.MessageAbortedError, EventListResponseEventSessionErrorPropertiesErrorAPIError, AssistantMessageErrorStructuredOutputError or AssistantMessageErrorContextOverflowError.
type EventListResponseEventSessionErrorType ¶
type EventListResponseEventSessionErrorType string
const (
EventListResponseEventSessionErrorTypeSessionError EventListResponseEventSessionErrorType = "session.error"
)
func (EventListResponseEventSessionErrorType) IsKnown ¶
func (r EventListResponseEventSessionErrorType) IsKnown() bool
type EventListResponseEventSessionIdle ¶
type EventListResponseEventSessionIdle struct {
Properties EventListResponseEventSessionIdleProperties `json:"properties,required"`
Type EventListResponseEventSessionIdleType `json:"type,required"`
JSON eventListResponseEventSessionIdleJSON `json:"-"`
}
func (*EventListResponseEventSessionIdle) UnmarshalJSON ¶
func (r *EventListResponseEventSessionIdle) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionIdleProperties ¶
type EventListResponseEventSessionIdleProperties struct {
SessionID string `json:"sessionID,required"`
JSON eventListResponseEventSessionIdlePropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionIdleProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionIdleProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionIdleType ¶
type EventListResponseEventSessionIdleType string
const (
EventListResponseEventSessionIdleTypeSessionIdle EventListResponseEventSessionIdleType = "session.idle"
)
func (EventListResponseEventSessionIdleType) IsKnown ¶
func (r EventListResponseEventSessionIdleType) IsKnown() bool
type EventListResponseEventSessionStatus ¶
type EventListResponseEventSessionStatus struct {
Properties EventListResponseEventSessionStatusProperties `json:"properties,required"`
Type EventListResponseEventSessionStatusType `json:"type,required"`
JSON eventListResponseEventSessionStatusJSON `json:"-"`
}
func (*EventListResponseEventSessionStatus) UnmarshalJSON ¶
func (r *EventListResponseEventSessionStatus) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionStatusProperties ¶
type EventListResponseEventSessionStatusProperties struct {
SessionID string `json:"sessionID,required"`
Status SessionStatus `json:"status,required"`
JSON eventListResponseEventSessionStatusPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionStatusProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionStatusProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionStatusType ¶
type EventListResponseEventSessionStatusType string
const (
EventListResponseEventSessionStatusTypeSessionStatus EventListResponseEventSessionStatusType = "session.status"
)
func (EventListResponseEventSessionStatusType) IsKnown ¶
func (r EventListResponseEventSessionStatusType) IsKnown() bool
type EventListResponseEventSessionUpdated ¶
type EventListResponseEventSessionUpdated struct {
Properties EventListResponseEventSessionUpdatedProperties `json:"properties,required"`
Type EventListResponseEventSessionUpdatedType `json:"type,required"`
JSON eventListResponseEventSessionUpdatedJSON `json:"-"`
}
func (*EventListResponseEventSessionUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventSessionUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionUpdatedProperties ¶
type EventListResponseEventSessionUpdatedProperties struct {
SessionID string `json:"sessionID,required"`
Info Session `json:"info,required"`
JSON eventListResponseEventSessionUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventSessionUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventSessionUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventSessionUpdatedType ¶
type EventListResponseEventSessionUpdatedType string
const (
EventListResponseEventSessionUpdatedTypeSessionUpdated EventListResponseEventSessionUpdatedType = "session.updated"
)
func (EventListResponseEventSessionUpdatedType) IsKnown ¶
func (r EventListResponseEventSessionUpdatedType) IsKnown() bool
type EventListResponseEventTodoUpdated ¶
type EventListResponseEventTodoUpdated struct {
Properties EventListResponseEventTodoUpdatedProperties `json:"properties,required"`
Type EventListResponseEventTodoUpdatedType `json:"type,required"`
JSON eventListResponseEventTodoUpdatedJSON `json:"-"`
}
func (*EventListResponseEventTodoUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventTodoUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTodoUpdatedProperties ¶
type EventListResponseEventTodoUpdatedProperties struct {
SessionID string `json:"sessionID,required"`
Todos []EventListResponseEventTodoUpdatedPropertiesTodo `json:"todos,required"`
JSON eventListResponseEventTodoUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventTodoUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventTodoUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTodoUpdatedPropertiesTodo ¶
type EventListResponseEventTodoUpdatedPropertiesTodo struct {
// Brief description of the task
Content string `json:"content,required"`
// Priority level of the task: high, medium, low
Priority string `json:"priority,required"`
// Current status of the task: pending, in_progress, completed, cancelled
Status string `json:"status,required"`
JSON eventListResponseEventTodoUpdatedPropertiesTodoJSON `json:"-"`
}
func (*EventListResponseEventTodoUpdatedPropertiesTodo) UnmarshalJSON ¶
func (r *EventListResponseEventTodoUpdatedPropertiesTodo) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTodoUpdatedType ¶
type EventListResponseEventTodoUpdatedType string
const (
EventListResponseEventTodoUpdatedTypeTodoUpdated EventListResponseEventTodoUpdatedType = "todo.updated"
)
func (EventListResponseEventTodoUpdatedType) IsKnown ¶
func (r EventListResponseEventTodoUpdatedType) IsKnown() bool
type EventListResponseEventTuiCommandExecute ¶
type EventListResponseEventTuiCommandExecute struct {
Properties EventListResponseEventTuiCommandExecuteProperties `json:"properties,required"`
Type EventListResponseEventTuiCommandExecuteType `json:"type,required"`
JSON eventListResponseEventTuiCommandExecuteJSON `json:"-"`
}
func (*EventListResponseEventTuiCommandExecute) UnmarshalJSON ¶
func (r *EventListResponseEventTuiCommandExecute) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiCommandExecuteProperties ¶
type EventListResponseEventTuiCommandExecuteProperties struct {
Command string `json:"command,required"`
JSON eventListResponseEventTuiCommandExecutePropertiesJSON `json:"-"`
}
func (*EventListResponseEventTuiCommandExecuteProperties) UnmarshalJSON ¶
func (r *EventListResponseEventTuiCommandExecuteProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiCommandExecuteType ¶
type EventListResponseEventTuiCommandExecuteType string
const (
EventListResponseEventTuiCommandExecuteTypeTuiCommandExecute EventListResponseEventTuiCommandExecuteType = "tui.command.execute"
)
func (EventListResponseEventTuiCommandExecuteType) IsKnown ¶
func (r EventListResponseEventTuiCommandExecuteType) IsKnown() bool
type EventListResponseEventTuiPromptAppend ¶
type EventListResponseEventTuiPromptAppend struct {
Properties EventListResponseEventTuiPromptAppendProperties `json:"properties,required"`
Type EventListResponseEventTuiPromptAppendType `json:"type,required"`
JSON eventListResponseEventTuiPromptAppendJSON `json:"-"`
}
func (*EventListResponseEventTuiPromptAppend) UnmarshalJSON ¶
func (r *EventListResponseEventTuiPromptAppend) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiPromptAppendProperties ¶
type EventListResponseEventTuiPromptAppendProperties struct {
Text string `json:"text,required"`
JSON eventListResponseEventTuiPromptAppendPropertiesJSON `json:"-"`
}
func (*EventListResponseEventTuiPromptAppendProperties) UnmarshalJSON ¶
func (r *EventListResponseEventTuiPromptAppendProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiPromptAppendType ¶
type EventListResponseEventTuiPromptAppendType string
const (
EventListResponseEventTuiPromptAppendTypeTuiPromptAppend EventListResponseEventTuiPromptAppendType = "tui.prompt.append"
)
func (EventListResponseEventTuiPromptAppendType) IsKnown ¶
func (r EventListResponseEventTuiPromptAppendType) IsKnown() bool
type EventListResponseEventTuiSessionSelect ¶
type EventListResponseEventTuiSessionSelect struct {
Properties EventListResponseEventTuiSessionSelectProperties `json:"properties,required"`
Type EventListResponseEventTuiSessionSelectType `json:"type,required"`
JSON eventListResponseEventTuiSessionSelectJSON `json:"-"`
}
func (*EventListResponseEventTuiSessionSelect) UnmarshalJSON ¶
func (r *EventListResponseEventTuiSessionSelect) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiSessionSelectProperties ¶
type EventListResponseEventTuiSessionSelectProperties struct {
SessionID string `json:"sessionID,required"`
JSON eventListResponseEventTuiSessionSelectPropertiesJSON `json:"-"`
}
func (*EventListResponseEventTuiSessionSelectProperties) UnmarshalJSON ¶
func (r *EventListResponseEventTuiSessionSelectProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiSessionSelectType ¶
type EventListResponseEventTuiSessionSelectType string
const (
EventListResponseEventTuiSessionSelectTypeTuiSessionSelect EventListResponseEventTuiSessionSelectType = "tui.session.select"
)
func (EventListResponseEventTuiSessionSelectType) IsKnown ¶
func (r EventListResponseEventTuiSessionSelectType) IsKnown() bool
type EventListResponseEventTuiToastShow ¶
type EventListResponseEventTuiToastShow struct {
Properties EventListResponseEventTuiToastShowProperties `json:"properties,required"`
Type EventListResponseEventTuiToastShowType `json:"type,required"`
JSON eventListResponseEventTuiToastShowJSON `json:"-"`
}
func (*EventListResponseEventTuiToastShow) UnmarshalJSON ¶
func (r *EventListResponseEventTuiToastShow) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiToastShowProperties ¶
type EventListResponseEventTuiToastShowProperties struct {
Message string `json:"message,required"`
Variant EventListResponseEventTuiToastShowPropertiesVariant `json:"variant,required"`
Title string `json:"title"`
Duration float64 `json:"duration"`
JSON eventListResponseEventTuiToastShowPropertiesJSON `json:"-"`
}
func (*EventListResponseEventTuiToastShowProperties) UnmarshalJSON ¶
func (r *EventListResponseEventTuiToastShowProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventTuiToastShowPropertiesVariant ¶
type EventListResponseEventTuiToastShowPropertiesVariant string
const ( EventListResponseEventTuiToastShowPropertiesVariantInfo EventListResponseEventTuiToastShowPropertiesVariant = "info" EventListResponseEventTuiToastShowPropertiesVariantSuccess EventListResponseEventTuiToastShowPropertiesVariant = "success" EventListResponseEventTuiToastShowPropertiesVariantWarning EventListResponseEventTuiToastShowPropertiesVariant = "warning" EventListResponseEventTuiToastShowPropertiesVariantError EventListResponseEventTuiToastShowPropertiesVariant = "error" )
func (EventListResponseEventTuiToastShowPropertiesVariant) IsKnown ¶
func (r EventListResponseEventTuiToastShowPropertiesVariant) IsKnown() bool
type EventListResponseEventTuiToastShowType ¶
type EventListResponseEventTuiToastShowType string
const (
EventListResponseEventTuiToastShowTypeTuiToastShow EventListResponseEventTuiToastShowType = "tui.toast.show"
)
func (EventListResponseEventTuiToastShowType) IsKnown ¶
func (r EventListResponseEventTuiToastShowType) IsKnown() bool
type EventListResponseEventVcsBranchUpdated ¶
type EventListResponseEventVcsBranchUpdated struct {
Properties EventListResponseEventVcsBranchUpdatedProperties `json:"properties,required"`
Type EventListResponseEventVcsBranchUpdatedType `json:"type,required"`
JSON eventListResponseEventVcsBranchUpdatedJSON `json:"-"`
}
func (*EventListResponseEventVcsBranchUpdated) UnmarshalJSON ¶
func (r *EventListResponseEventVcsBranchUpdated) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventVcsBranchUpdatedProperties ¶
type EventListResponseEventVcsBranchUpdatedProperties struct {
Branch string `json:"branch"`
JSON eventListResponseEventVcsBranchUpdatedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventVcsBranchUpdatedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventVcsBranchUpdatedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventVcsBranchUpdatedType ¶
type EventListResponseEventVcsBranchUpdatedType string
const (
EventListResponseEventVcsBranchUpdatedTypeVcsBranchUpdated EventListResponseEventVcsBranchUpdatedType = "vcs.branch.updated"
)
func (EventListResponseEventVcsBranchUpdatedType) IsKnown ¶
func (r EventListResponseEventVcsBranchUpdatedType) IsKnown() bool
type EventListResponseEventWorkspaceFailed ¶
type EventListResponseEventWorkspaceFailed struct {
Properties EventListResponseEventWorkspaceFailedProperties `json:"properties,required"`
Type EventListResponseEventWorkspaceFailedType `json:"type,required"`
JSON eventListResponseEventWorkspaceFailedJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceFailed) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceFailed) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceFailedProperties ¶
type EventListResponseEventWorkspaceFailedProperties struct {
Message string `json:"message,required"`
JSON eventListResponseEventWorkspaceFailedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceFailedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceFailedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceFailedType ¶
type EventListResponseEventWorkspaceFailedType string
const (
EventListResponseEventWorkspaceFailedTypeWorkspaceFailed EventListResponseEventWorkspaceFailedType = "workspace.failed"
)
func (EventListResponseEventWorkspaceFailedType) IsKnown ¶
func (r EventListResponseEventWorkspaceFailedType) IsKnown() bool
type EventListResponseEventWorkspaceReady ¶
type EventListResponseEventWorkspaceReady struct {
Properties EventListResponseEventWorkspaceReadyProperties `json:"properties,required"`
Type EventListResponseEventWorkspaceReadyType `json:"type,required"`
JSON eventListResponseEventWorkspaceReadyJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceReady) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceReady) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceReadyProperties ¶
type EventListResponseEventWorkspaceReadyProperties struct {
Name string `json:"name,required"`
JSON eventListResponseEventWorkspaceReadyPropertiesJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceReadyProperties) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceReadyProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceReadyType ¶
type EventListResponseEventWorkspaceReadyType string
const (
EventListResponseEventWorkspaceReadyTypeWorkspaceReady EventListResponseEventWorkspaceReadyType = "workspace.ready"
)
func (EventListResponseEventWorkspaceReadyType) IsKnown ¶
func (r EventListResponseEventWorkspaceReadyType) IsKnown() bool
type EventListResponseEventWorkspaceRestore ¶
type EventListResponseEventWorkspaceRestore struct {
Properties EventListResponseEventWorkspaceRestoreProperties `json:"properties,required"`
Type EventListResponseEventWorkspaceRestoreType `json:"type,required"`
JSON eventListResponseEventWorkspaceRestoreJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceRestore) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceRestore) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceRestoreProperties ¶
type EventListResponseEventWorkspaceRestoreProperties struct {
WorkspaceID string `json:"workspaceID,required"`
SessionID string `json:"sessionID,required"`
Total int64 `json:"total,required"`
Step int64 `json:"step,required"`
JSON eventListResponseEventWorkspaceRestorePropertiesJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceRestoreProperties) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceRestoreProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceRestoreType ¶
type EventListResponseEventWorkspaceRestoreType string
const (
EventListResponseEventWorkspaceRestoreTypeWorkspaceRestore EventListResponseEventWorkspaceRestoreType = "workspace.restore"
)
func (EventListResponseEventWorkspaceRestoreType) IsKnown ¶
func (r EventListResponseEventWorkspaceRestoreType) IsKnown() bool
type EventListResponseEventWorkspaceStatus ¶
type EventListResponseEventWorkspaceStatus struct {
Properties EventListResponseEventWorkspaceStatusProperties `json:"properties,required"`
Type EventListResponseEventWorkspaceStatusType `json:"type,required"`
JSON eventListResponseEventWorkspaceStatusJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceStatus) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceStatus) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceStatusProperties ¶
type EventListResponseEventWorkspaceStatusProperties struct {
WorkspaceID string `json:"workspaceID,required"`
Status EventListResponseEventWorkspaceStatusPropertiesStatus `json:"status,required"`
JSON eventListResponseEventWorkspaceStatusPropertiesJSON `json:"-"`
}
func (*EventListResponseEventWorkspaceStatusProperties) UnmarshalJSON ¶
func (r *EventListResponseEventWorkspaceStatusProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorkspaceStatusPropertiesStatus ¶
type EventListResponseEventWorkspaceStatusPropertiesStatus string
const ( EventListResponseEventWorkspaceStatusPropertiesStatusConnected EventListResponseEventWorkspaceStatusPropertiesStatus = "connected" EventListResponseEventWorkspaceStatusPropertiesStatusConnecting EventListResponseEventWorkspaceStatusPropertiesStatus = "connecting" EventListResponseEventWorkspaceStatusPropertiesStatusDisconnected EventListResponseEventWorkspaceStatusPropertiesStatus = "disconnected" EventListResponseEventWorkspaceStatusPropertiesStatusError EventListResponseEventWorkspaceStatusPropertiesStatus = "error" )
func (EventListResponseEventWorkspaceStatusPropertiesStatus) IsKnown ¶
func (r EventListResponseEventWorkspaceStatusPropertiesStatus) IsKnown() bool
type EventListResponseEventWorkspaceStatusType ¶
type EventListResponseEventWorkspaceStatusType string
const (
EventListResponseEventWorkspaceStatusTypeWorkspaceStatus EventListResponseEventWorkspaceStatusType = "workspace.status"
)
func (EventListResponseEventWorkspaceStatusType) IsKnown ¶
func (r EventListResponseEventWorkspaceStatusType) IsKnown() bool
type EventListResponseEventWorktreeFailed ¶
type EventListResponseEventWorktreeFailed struct {
Properties EventListResponseEventWorktreeFailedProperties `json:"properties,required"`
Type EventListResponseEventWorktreeFailedType `json:"type,required"`
JSON eventListResponseEventWorktreeFailedJSON `json:"-"`
}
func (*EventListResponseEventWorktreeFailed) UnmarshalJSON ¶
func (r *EventListResponseEventWorktreeFailed) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorktreeFailedProperties ¶
type EventListResponseEventWorktreeFailedProperties struct {
Message string `json:"message,required"`
JSON eventListResponseEventWorktreeFailedPropertiesJSON `json:"-"`
}
func (*EventListResponseEventWorktreeFailedProperties) UnmarshalJSON ¶
func (r *EventListResponseEventWorktreeFailedProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorktreeFailedType ¶
type EventListResponseEventWorktreeFailedType string
const (
EventListResponseEventWorktreeFailedTypeWorktreeFailed EventListResponseEventWorktreeFailedType = "worktree.failed"
)
func (EventListResponseEventWorktreeFailedType) IsKnown ¶
func (r EventListResponseEventWorktreeFailedType) IsKnown() bool
type EventListResponseEventWorktreeReady ¶
type EventListResponseEventWorktreeReady struct {
Properties EventListResponseEventWorktreeReadyProperties `json:"properties,required"`
Type EventListResponseEventWorktreeReadyType `json:"type,required"`
JSON eventListResponseEventWorktreeReadyJSON `json:"-"`
}
func (*EventListResponseEventWorktreeReady) UnmarshalJSON ¶
func (r *EventListResponseEventWorktreeReady) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorktreeReadyProperties ¶
type EventListResponseEventWorktreeReadyProperties struct {
Name string `json:"name,required"`
Branch string `json:"branch,required"`
JSON eventListResponseEventWorktreeReadyPropertiesJSON `json:"-"`
}
func (*EventListResponseEventWorktreeReadyProperties) UnmarshalJSON ¶
func (r *EventListResponseEventWorktreeReadyProperties) UnmarshalJSON(data []byte) (err error)
type EventListResponseEventWorktreeReadyType ¶
type EventListResponseEventWorktreeReadyType string
const (
EventListResponseEventWorktreeReadyTypeWorktreeReady EventListResponseEventWorktreeReadyType = "worktree.ready"
)
func (EventListResponseEventWorktreeReadyType) IsKnown ¶
func (r EventListResponseEventWorktreeReadyType) IsKnown() bool
type EventListResponseType ¶
type EventListResponseType string
const ( EventListResponseTypeInstallationUpdated EventListResponseType = "installation.updated" EventListResponseTypeLspClientDiagnostics EventListResponseType = "lsp.client.diagnostics" EventListResponseTypeMessageUpdated EventListResponseType = "message.updated" EventListResponseTypeMessageRemoved EventListResponseType = "message.removed" EventListResponseTypeMessagePartUpdated EventListResponseType = "message.part.updated" EventListResponseTypeMessagePartRemoved EventListResponseType = "message.part.removed" EventListResponseTypeSessionCompacted EventListResponseType = "session.compacted" EventListResponseTypePermissionReplied EventListResponseType = "permission.replied" EventListResponseTypeFileEdited EventListResponseType = "file.edited" EventListResponseTypeFileWatcherUpdated EventListResponseType = "file.watcher.updated" EventListResponseTypeTodoUpdated EventListResponseType = "todo.updated" EventListResponseTypeSessionIdle EventListResponseType = "session.idle" EventListResponseTypeSessionCreated EventListResponseType = "session.created" EventListResponseTypeSessionUpdated EventListResponseType = "session.updated" EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted" EventListResponseTypeSessionError EventListResponseType = "session.error" EventListResponseTypeServerConnected EventListResponseType = "server.connected" EventListResponseTypeProjectUpdated EventListResponseType = "project.updated" EventListResponseTypeServerInstanceDisposed EventListResponseType = "server.instance.disposed" EventListResponseTypeGlobalDisposed EventListResponseType = "global.disposed" EventListResponseTypeLspUpdated EventListResponseType = "lsp.updated" EventListResponseTypeInstallationUpdateAvailable EventListResponseType = "installation.update-available" EventListResponseTypeMessagePartDelta EventListResponseType = "message.part.delta" EventListResponseTypePermissionAsked EventListResponseType = "permission.asked" EventListResponseTypeSessionDiff EventListResponseType = "session.diff" EventListResponseTypeSessionStatus EventListResponseType = "session.status" EventListResponseTypeQuestionAsked EventListResponseType = "question.asked" EventListResponseTypeQuestionReplied EventListResponseType = "question.replied" EventListResponseTypeQuestionRejected EventListResponseType = "question.rejected" EventListResponseTypeTuiPromptAppend EventListResponseType = "tui.prompt.append" EventListResponseTypeTuiCommandExecute EventListResponseType = "tui.command.execute" EventListResponseTypeTuiToastShow EventListResponseType = "tui.toast.show" EventListResponseTypeTuiSessionSelect EventListResponseType = "tui.session.select" EventListResponseTypeMcpToolsChanged EventListResponseType = "mcp.tools.changed" EventListResponseTypeMcpBrowserOpenFailed EventListResponseType = "mcp.browser.open.failed" EventListResponseTypeCommandExecuted EventListResponseType = "command.executed" EventListResponseTypeVcsBranchUpdated EventListResponseType = "vcs.branch.updated" EventListResponseTypeWorktreeReady EventListResponseType = "worktree.ready" EventListResponseTypeWorktreeFailed EventListResponseType = "worktree.failed" EventListResponseTypePtyCreated EventListResponseType = "pty.created" EventListResponseTypePtyUpdated EventListResponseType = "pty.updated" EventListResponseTypePtyExited EventListResponseType = "pty.exited" EventListResponseTypePtyDeleted EventListResponseType = "pty.deleted" EventListResponseTypeWorkspaceReady EventListResponseType = "workspace.ready" EventListResponseTypeWorkspaceFailed EventListResponseType = "workspace.failed" EventListResponseTypeWorkspaceRestore EventListResponseType = "workspace.restore" EventListResponseTypeWorkspaceStatus EventListResponseType = "workspace.status" )
func (EventListResponseType) IsKnown ¶
func (r EventListResponseType) IsKnown() bool
type EventListResponseUnion ¶
type EventListResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by EventListResponseEventInstallationUpdated, EventListResponseEventLspClientDiagnostics, EventListResponseEventMessageUpdated, EventListResponseEventMessageRemoved, EventListResponseEventMessagePartUpdated, EventListResponseEventMessagePartRemoved, EventListResponseEventSessionCompacted, EventListResponseEventPermissionReplied, EventListResponseEventFileEdited, EventListResponseEventFileWatcherUpdated, EventListResponseEventTodoUpdated, EventListResponseEventSessionIdle, EventListResponseEventSessionCreated, EventListResponseEventSessionUpdated, EventListResponseEventSessionDeleted, EventListResponseEventSessionError, EventListResponseEventServerConnected, EventListResponseEventProjectUpdated, EventListResponseEventServerInstanceDisposed, EventListResponseEventGlobalDisposed, EventListResponseEventLspUpdated, EventListResponseEventInstallationUpdateAvailable, EventListResponseEventMessagePartDelta, EventListResponseEventPermissionAsked, EventListResponseEventSessionDiff, EventListResponseEventSessionStatus, EventListResponseEventQuestionAsked, EventListResponseEventQuestionReplied, EventListResponseEventQuestionRejected, EventListResponseEventTuiPromptAppend, EventListResponseEventTuiCommandExecute, EventListResponseEventTuiToastShow, EventListResponseEventTuiSessionSelect, EventListResponseEventMcpToolsChanged, EventListResponseEventMcpBrowserOpenFailed, EventListResponseEventCommandExecuted, EventListResponseEventVcsBranchUpdated, EventListResponseEventWorktreeReady, EventListResponseEventWorktreeFailed, EventListResponseEventPtyCreated, EventListResponseEventPtyUpdated, EventListResponseEventPtyExited, EventListResponseEventPtyDeleted, EventListResponseEventWorkspaceReady, EventListResponseEventWorkspaceFailed, EventListResponseEventWorkspaceRestore or EventListResponseEventWorkspaceStatus.
type EventService ¶
type EventService struct {
Options []option.RequestOption
}
EventService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.
func NewEventService ¶
func NewEventService(opts ...option.RequestOption) (r *EventService)
NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EventService) ListStreaming ¶
func (r *EventService) ListStreaming(ctx context.Context, query EventListParams, opts ...option.RequestOption) (stream *ssestream.Stream[EventListResponse])
Get events
type ExperimentalService ¶
type ExperimentalService struct {
Options []option.RequestOption
Resource *ResourceService
Session *ExperimentalSessionService
Console *ConsoleService
Workspace *WorkspaceService
Worktree *WorktreeService
Tool *ToolService
}
ExperimentalService groups experimental API namespaces.
func NewExperimentalService ¶
func NewExperimentalService(opts ...option.RequestOption) (r *ExperimentalService)
NewExperimentalService generates a new service that applies the given options to each request.
type ExperimentalSessionListParams ¶
type ExperimentalSessionListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Roots param.Field[bool] `query:"roots"`
Start param.Field[float64] `query:"start"`
Cursor param.Field[float64] `query:"cursor"`
Search param.Field[string] `query:"search"`
Limit param.Field[float64] `query:"limit"`
Archived param.Field[bool] `query:"archived"`
}
func (ExperimentalSessionListParams) URLQuery ¶
func (r ExperimentalSessionListParams) URLQuery() (v url.Values)
type ExperimentalSessionService ¶
type ExperimentalSessionService struct {
Options []option.RequestOption
}
ExperimentalSessionService contains methods for interacting with the experimental session resource.
func NewExperimentalSessionService ¶
func NewExperimentalSessionService(opts ...option.RequestOption) (r *ExperimentalSessionService)
NewExperimentalSessionService generates a new service that applies the given options to each request.
func (*ExperimentalSessionService) List ¶
func (r *ExperimentalSessionService) List(ctx context.Context, query ExperimentalSessionListParams, opts ...option.RequestOption) (res *[]GlobalSession, err error)
List all sessions across projects.
type File ¶
type File struct {
Added int64 `json:"added,required"`
Path string `json:"path,required"`
Removed int64 `json:"removed,required"`
Status FileStatus `json:"status,required"`
JSON fileJSON `json:"-"`
}
func (*File) UnmarshalJSON ¶
type FileListParams ¶
type FileListParams struct {
Path param.Field[string] `query:"path,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (FileListParams) URLQuery ¶
func (r FileListParams) URLQuery() (v url.Values)
URLQuery serializes FileListParams's query parameters as `url.Values`.
type FileNode ¶
type FileNode struct {
Absolute string `json:"absolute,required"`
Ignored bool `json:"ignored,required"`
Name string `json:"name,required"`
Path string `json:"path,required"`
Type FileNodeType `json:"type,required"`
JSON fileNodeJSON `json:"-"`
}
func (*FileNode) UnmarshalJSON ¶
type FileNodeType ¶
type FileNodeType string
const ( FileNodeTypeFile FileNodeType = "file" FileNodeTypeDirectory FileNodeType = "directory" )
func (FileNodeType) IsKnown ¶
func (r FileNodeType) IsKnown() bool
type FilePart ¶
type FilePart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
Mime string `json:"mime,required"`
SessionID string `json:"sessionID,required"`
Type FilePartType `json:"type,required"`
URL string `json:"url,required"`
Filename string `json:"filename"`
Source FilePartSource `json:"source"`
JSON filePartJSON `json:"-"`
}
func (*FilePart) UnmarshalJSON ¶
type FilePartInputParam ¶
type FilePartInputParam struct {
Mime param.Field[string] `json:"mime,required"`
Type param.Field[FilePartInputType] `json:"type,required"`
URL param.Field[string] `json:"url,required"`
ID param.Field[string] `json:"id"`
Filename param.Field[string] `json:"filename"`
Source param.Field[FilePartSourceUnionParam] `json:"source"`
}
func (FilePartInputParam) MarshalJSON ¶
func (r FilePartInputParam) MarshalJSON() (data []byte, err error)
type FilePartInputType ¶
type FilePartInputType string
const (
FilePartInputTypeFile FilePartInputType = "file"
)
func (FilePartInputType) IsKnown ¶
func (r FilePartInputType) IsKnown() bool
type FilePartSource ¶
type FilePartSource struct {
Path string `json:"path,required"`
Text FilePartSourceText `json:"text,required"`
Type FilePartSourceType `json:"type,required"`
ClientName string `json:"clientName"`
URI string `json:"uri"`
Kind int64 `json:"kind"`
Name string `json:"name"`
// This field can have the runtime type of [SymbolSourceRange].
Range interface{} `json:"range"`
JSON filePartSourceJSON `json:"-"`
// contains filtered or unexported fields
}
func (FilePartSource) AsUnion ¶
func (r FilePartSource) AsUnion() FilePartSourceUnion
AsUnion returns a FilePartSourceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are FileSource, SymbolSource, ResourceSource.
func (*FilePartSource) UnmarshalJSON ¶
func (r *FilePartSource) UnmarshalJSON(data []byte) (err error)
type FilePartSourceParam ¶
type FilePartSourceParam struct {
Path param.Field[string] `json:"path,required"`
Text param.Field[FilePartSourceTextParam] `json:"text,required"`
Type param.Field[FilePartSourceType] `json:"type,required"`
ClientName param.Field[string] `json:"clientName"`
URI param.Field[string] `json:"uri"`
Kind param.Field[int64] `json:"kind"`
Name param.Field[string] `json:"name"`
Range param.Field[SymbolSourceRangeParam] `json:"range"`
}
func (FilePartSourceParam) MarshalJSON ¶
func (r FilePartSourceParam) MarshalJSON() (data []byte, err error)
type FilePartSourceText ¶
type FilePartSourceText struct {
End int64 `json:"end,required"`
Start int64 `json:"start,required"`
Value string `json:"value,required"`
JSON filePartSourceTextJSON `json:"-"`
}
func (*FilePartSourceText) UnmarshalJSON ¶
func (r *FilePartSourceText) UnmarshalJSON(data []byte) (err error)
type FilePartSourceTextParam ¶
type FilePartSourceTextParam struct {
End param.Field[int64] `json:"end,required"`
Start param.Field[int64] `json:"start,required"`
Value param.Field[string] `json:"value,required"`
}
func (FilePartSourceTextParam) MarshalJSON ¶
func (r FilePartSourceTextParam) MarshalJSON() (data []byte, err error)
type FilePartSourceType ¶
type FilePartSourceType string
const ( FilePartSourceTypeFile FilePartSourceType = "file" FilePartSourceTypeSymbol FilePartSourceType = "symbol" FilePartSourceTypeResource FilePartSourceType = "resource" )
func (FilePartSourceType) IsKnown ¶
func (r FilePartSourceType) IsKnown() bool
type FilePartSourceUnion ¶
type FilePartSourceUnion interface {
// contains filtered or unexported methods
}
Union satisfied by FileSource, SymbolSource or ResourceSource.
type FilePartSourceUnionParam ¶
type FilePartSourceUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by FileSourceParam, SymbolSourceParam, ResourceSourceParam, FilePartSourceParam.
type FilePartType ¶
type FilePartType string
const (
FilePartTypeFile FilePartType = "file"
)
func (FilePartType) IsKnown ¶
func (r FilePartType) IsKnown() bool
type FileReadParams ¶
type FileReadParams struct {
Path param.Field[string] `query:"path,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (FileReadParams) URLQuery ¶
func (r FileReadParams) URLQuery() (v url.Values)
URLQuery serializes FileReadParams's query parameters as `url.Values`.
type FileReadResponse ¶
type FileReadResponse struct {
Content string `json:"content,required"`
Type FileReadResponseType `json:"type,required"`
Diff string `json:"diff"`
Encoding FileReadResponseEncoding `json:"encoding"`
MimeType string `json:"mimeType"`
Patch FileReadResponsePatch `json:"patch"`
JSON fileReadResponseJSON `json:"-"`
}
func (*FileReadResponse) UnmarshalJSON ¶
func (r *FileReadResponse) UnmarshalJSON(data []byte) (err error)
type FileReadResponseEncoding ¶
type FileReadResponseEncoding string
const (
FileReadResponseEncodingBase64 FileReadResponseEncoding = "base64"
)
func (FileReadResponseEncoding) IsKnown ¶
func (r FileReadResponseEncoding) IsKnown() bool
type FileReadResponsePatch ¶
type FileReadResponsePatch struct {
Hunks []FileReadResponsePatchHunk `json:"hunks,required"`
NewFileName string `json:"newFileName,required"`
OldFileName string `json:"oldFileName,required"`
Index string `json:"index"`
NewHeader string `json:"newHeader"`
OldHeader string `json:"oldHeader"`
JSON fileReadResponsePatchJSON `json:"-"`
}
func (*FileReadResponsePatch) UnmarshalJSON ¶
func (r *FileReadResponsePatch) UnmarshalJSON(data []byte) (err error)
type FileReadResponsePatchHunk ¶
type FileReadResponsePatchHunk struct {
Lines []string `json:"lines,required"`
NewLines float64 `json:"newLines,required"`
NewStart float64 `json:"newStart,required"`
OldLines float64 `json:"oldLines,required"`
OldStart float64 `json:"oldStart,required"`
JSON fileReadResponsePatchHunkJSON `json:"-"`
}
func (*FileReadResponsePatchHunk) UnmarshalJSON ¶
func (r *FileReadResponsePatchHunk) UnmarshalJSON(data []byte) (err error)
type FileReadResponseType ¶
type FileReadResponseType string
const ( FileReadResponseTypeText FileReadResponseType = "text" FileReadResponseTypeBinary FileReadResponseType = "binary" )
func (FileReadResponseType) IsKnown ¶
func (r FileReadResponseType) IsKnown() bool
type FileService ¶
type FileService struct {
Options []option.RequestOption
}
FileService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileService method instead.
func NewFileService ¶
func NewFileService(opts ...option.RequestOption) (r *FileService)
NewFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileService) List ¶
func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *[]FileNode, err error)
List files and directories
func (*FileService) Read ¶
func (r *FileService) Read(ctx context.Context, query FileReadParams, opts ...option.RequestOption) (res *FileReadResponse, err error)
Read a file
func (*FileService) Status ¶
func (r *FileService) Status(ctx context.Context, query FileStatusParams, opts ...option.RequestOption) (res *[]File, err error)
Get file status
type FileSource ¶
type FileSource struct {
Path string `json:"path,required"`
Text FilePartSourceText `json:"text,required"`
Type FileSourceType `json:"type,required"`
JSON fileSourceJSON `json:"-"`
}
func (*FileSource) UnmarshalJSON ¶
func (r *FileSource) UnmarshalJSON(data []byte) (err error)
type FileSourceParam ¶
type FileSourceParam struct {
Path param.Field[string] `json:"path,required"`
Text param.Field[FilePartSourceTextParam] `json:"text,required"`
Type param.Field[FileSourceType] `json:"type,required"`
}
func (FileSourceParam) MarshalJSON ¶
func (r FileSourceParam) MarshalJSON() (data []byte, err error)
type FileSourceType ¶
type FileSourceType string
const (
FileSourceTypeFile FileSourceType = "file"
)
func (FileSourceType) IsKnown ¶
func (r FileSourceType) IsKnown() bool
type FileStatus ¶
type FileStatus string
const ( FileStatusAdded FileStatus = "added" FileStatusDeleted FileStatus = "deleted" FileStatusModified FileStatus = "modified" )
func (FileStatus) IsKnown ¶
func (r FileStatus) IsKnown() bool
type FileStatusParams ¶
type FileStatusParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (FileStatusParams) URLQuery ¶
func (r FileStatusParams) URLQuery() (v url.Values)
URLQuery serializes FileStatusParams's query parameters as `url.Values`.
type FindFilesParams ¶
type FindFilesParams struct {
Query param.Field[string] `query:"query,required"`
Dirs param.Field[FindFilesParamsDirs] `query:"dirs"`
Directory param.Field[string] `query:"directory"`
Limit param.Field[int64] `query:"limit"`
Type param.Field[FindFilesParamsType] `query:"type"`
Workspace param.Field[string] `query:"workspace"`
}
func (FindFilesParams) URLQuery ¶
func (r FindFilesParams) URLQuery() (v url.Values)
URLQuery serializes FindFilesParams's query parameters as `url.Values`.
type FindFilesParamsDirs ¶
type FindFilesParamsDirs string
const ( FindFilesParamsDirsTrue FindFilesParamsDirs = "true" FindFilesParamsDirsFalse FindFilesParamsDirs = "false" )
func (FindFilesParamsDirs) IsKnown ¶
func (r FindFilesParamsDirs) IsKnown() bool
type FindFilesParamsType ¶
type FindFilesParamsType string
const ( FindFilesParamsTypeFile FindFilesParamsType = "file" FindFilesParamsTypeDirectory FindFilesParamsType = "directory" )
func (FindFilesParamsType) IsKnown ¶
func (r FindFilesParamsType) IsKnown() bool
type FindService ¶
type FindService struct {
Options []option.RequestOption
}
FindService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFindService method instead.
func NewFindService ¶
func NewFindService(opts ...option.RequestOption) (r *FindService)
NewFindService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FindService) Files ¶
func (r *FindService) Files(ctx context.Context, query FindFilesParams, opts ...option.RequestOption) (res *[]string, err error)
Find files
func (*FindService) Symbols ¶
func (r *FindService) Symbols(ctx context.Context, query FindSymbolsParams, opts ...option.RequestOption) (res *[]Symbol, err error)
Find workspace symbols
func (*FindService) Text ¶
func (r *FindService) Text(ctx context.Context, query FindTextParams, opts ...option.RequestOption) (res *[]FindTextResponse, err error)
Find text in files
type FindSymbolsParams ¶
type FindSymbolsParams struct {
Query param.Field[string] `query:"query,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (FindSymbolsParams) URLQuery ¶
func (r FindSymbolsParams) URLQuery() (v url.Values)
URLQuery serializes FindSymbolsParams's query parameters as `url.Values`.
type FindTextParams ¶
type FindTextParams struct {
Pattern param.Field[string] `query:"pattern,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (FindTextParams) URLQuery ¶
func (r FindTextParams) URLQuery() (v url.Values)
URLQuery serializes FindTextParams's query parameters as `url.Values`.
type FindTextResponse ¶
type FindTextResponse struct {
AbsoluteOffset float64 `json:"absolute_offset,required"`
LineNumber float64 `json:"line_number,required"`
Lines FindTextResponseLines `json:"lines,required"`
Path FindTextResponsePath `json:"path,required"`
Submatches []FindTextResponseSubmatch `json:"submatches,required"`
JSON findTextResponseJSON `json:"-"`
}
func (*FindTextResponse) UnmarshalJSON ¶
func (r *FindTextResponse) UnmarshalJSON(data []byte) (err error)
type FindTextResponseLines ¶
type FindTextResponseLines struct {
Text string `json:"text,required"`
JSON findTextResponseLinesJSON `json:"-"`
}
func (*FindTextResponseLines) UnmarshalJSON ¶
func (r *FindTextResponseLines) UnmarshalJSON(data []byte) (err error)
type FindTextResponsePath ¶
type FindTextResponsePath struct {
Text string `json:"text,required"`
JSON findTextResponsePathJSON `json:"-"`
}
func (*FindTextResponsePath) UnmarshalJSON ¶
func (r *FindTextResponsePath) UnmarshalJSON(data []byte) (err error)
type FindTextResponseSubmatch ¶
type FindTextResponseSubmatch struct {
End float64 `json:"end,required"`
Match FindTextResponseSubmatchesMatch `json:"match,required"`
Start float64 `json:"start,required"`
JSON findTextResponseSubmatchJSON `json:"-"`
}
func (*FindTextResponseSubmatch) UnmarshalJSON ¶
func (r *FindTextResponseSubmatch) UnmarshalJSON(data []byte) (err error)
type FindTextResponseSubmatchesMatch ¶
type FindTextResponseSubmatchesMatch struct {
Text string `json:"text,required"`
JSON findTextResponseSubmatchesMatchJSON `json:"-"`
}
func (*FindTextResponseSubmatchesMatch) UnmarshalJSON ¶
func (r *FindTextResponseSubmatchesMatch) UnmarshalJSON(data []byte) (err error)
type FormatterService ¶
type FormatterService struct {
Options []option.RequestOption
}
FormatterService contains methods for interacting with the formatter resource.
func NewFormatterService ¶
func NewFormatterService(opts ...option.RequestOption) (r *FormatterService)
NewFormatterService generates a new service that applies the given options to each request.
func (*FormatterService) Status ¶
func (r *FormatterService) Status(ctx context.Context, query FormatterStatusParams, opts ...option.RequestOption) (res *[]FormatterStatus, err error)
Status returns the status of all formatters.
type FormatterStatus ¶
type FormatterStatus struct {
Name string `json:"name,required"`
Extensions []string `json:"extensions,required"`
Enabled bool `json:"enabled,required"`
JSON formatterStatusJSON `json:"-"`
}
FormatterStatus describes the status of a single formatter.
func (*FormatterStatus) UnmarshalJSON ¶
func (r *FormatterStatus) UnmarshalJSON(data []byte) (err error)
type FormatterStatusParams ¶
type FormatterStatusParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (FormatterStatusParams) URLQuery ¶
func (r FormatterStatusParams) URLQuery() (v url.Values)
URLQuery serializes FormatterStatusParams's query parameters as `url.Values`.
type GlobalConfigService ¶
type GlobalConfigService struct {
Options []option.RequestOption
}
GlobalConfigService contains methods for interacting with the global config resource.
func NewGlobalConfigService ¶
func NewGlobalConfigService(opts ...option.RequestOption) (r *GlobalConfigService)
NewGlobalConfigService generates a new service.
func (*GlobalConfigService) Get ¶
func (r *GlobalConfigService) Get(ctx context.Context, opts ...option.RequestOption) (res *Config, err error)
Get retrieves the global configuration.
func (*GlobalConfigService) Update ¶
func (r *GlobalConfigService) Update(ctx context.Context, params GlobalConfigUpdateParams, opts ...option.RequestOption) (res *Config, err error)
Update updates the global configuration.
type GlobalConfigUpdateParams ¶
type GlobalConfigUpdateParams struct {
// Accepts the same shape as ConfigUpdateParams body.
Schema param.Field[string] `json:"$schema"`
Agent param.Field[map[string]interface{}] `json:"agent"`
Autoupdate param.Field[interface{}] `json:"autoupdate"`
Command param.Field[map[string]interface{}] `json:"command"`
Compaction param.Field[ConfigUpdateParamsCompaction] `json:"compaction"`
DefaultAgent param.Field[string] `json:"default_agent"`
DisabledProviders param.Field[[]string] `json:"disabled_providers"`
EnabledProviders param.Field[[]string] `json:"enabled_providers"`
Enterprise param.Field[ConfigUpdateParamsEnterprise] `json:"enterprise"`
Experimental param.Field[interface{}] `json:"experimental"`
Formatter param.Field[interface{}] `json:"formatter"`
Instructions param.Field[[]string] `json:"instructions"`
Layout param.Field[LayoutConfig] `json:"layout"`
LogLevel param.Field[ConfigLogLevel] `json:"logLevel"`
Lsp param.Field[interface{}] `json:"lsp"`
Mcp param.Field[interface{}] `json:"mcp"`
Mode param.Field[map[string]interface{}] `json:"mode"`
Model param.Field[string] `json:"model"`
Permission param.Field[interface{}] `json:"permission"`
Plugin param.Field[[]interface{}] `json:"plugin"`
Provider param.Field[map[string]interface{}] `json:"provider"`
Server param.Field[ConfigUpdateParamsServer] `json:"server"`
Skills param.Field[ConfigUpdateParamsSkills] `json:"skills"`
SmallModel param.Field[string] `json:"small_model"`
Snapshot param.Field[bool] `json:"snapshot"`
Tools param.Field[map[string]bool] `json:"tools"`
Username param.Field[string] `json:"username"`
Watcher param.Field[ConfigUpdateParamsWatcher] `json:"watcher"`
}
func (GlobalConfigUpdateParams) MarshalJSON ¶
func (r GlobalConfigUpdateParams) MarshalJSON() (data []byte, err error)
type GlobalEvent ¶
type GlobalEvent struct {
Directory string `json:"directory,required"`
Project string `json:"project"`
Workspace string `json:"workspace"`
Payload interface{} `json:"payload,required"`
JSON globalEventJSON `json:"-"`
}
GlobalEvent is the response envelope from GET /global/event.
func (*GlobalEvent) UnmarshalJSON ¶
func (r *GlobalEvent) UnmarshalJSON(data []byte) (err error)
type GlobalHealthResponse ¶
type GlobalHealthResponse struct {
Healthy bool `json:"healthy,required"`
Version string `json:"version,required"`
JSON globalHealthResponseJSON `json:"-"`
}
GlobalHealthResponse is the response from GET /global/health.
func (*GlobalHealthResponse) UnmarshalJSON ¶
func (r *GlobalHealthResponse) UnmarshalJSON(data []byte) (err error)
type GlobalService ¶
type GlobalService struct {
Options []option.RequestOption
Config *GlobalConfigService
}
GlobalService contains methods for interacting with the global resource.
func NewGlobalService ¶
func NewGlobalService(opts ...option.RequestOption) (r *GlobalService)
NewGlobalService generates a new service that applies the given options to each request.
func (*GlobalService) Dispose ¶
func (r *GlobalService) Dispose(ctx context.Context, opts ...option.RequestOption) (res *bool, err error)
Dispose shuts down the server.
func (*GlobalService) Event ¶
func (r *GlobalService) Event(ctx context.Context, opts ...option.RequestOption) (stream *ssestream.Stream[GlobalEvent])
Get global events.
func (*GlobalService) Health ¶
func (r *GlobalService) Health(ctx context.Context, opts ...option.RequestOption) (res *GlobalHealthResponse, err error)
Health checks the health of the server.
func (*GlobalService) Upgrade ¶
func (r *GlobalService) Upgrade(ctx context.Context, params GlobalUpgradeParams, opts ...option.RequestOption) (res *GlobalUpgradeResponse, err error)
Upgrade upgrades the server to a target version.
type GlobalSession ¶
type GlobalSession struct {
ID string `json:"id,required"`
Slug string `json:"slug,required"`
ProjectID string `json:"projectID,required"`
Directory string `json:"directory,required"`
Title string `json:"title,required"`
Version string `json:"version,required"`
Time SessionTime `json:"time,required"`
Project *ProjectSummary `json:"project,required"`
WorkspaceID string `json:"workspaceID"`
ParentID string `json:"parentID"`
Summary *SessionSummary `json:"summary"`
Permission []PermissionRule `json:"permission"`
Revert *SessionRevert `json:"revert"`
JSON globalSessionJSON `json:"-"`
}
GlobalSession extends Session with project info for cross-workspace listing.
func (*GlobalSession) UnmarshalJSON ¶
func (r *GlobalSession) UnmarshalJSON(data []byte) (err error)
type GlobalUpgradeParams ¶
func (GlobalUpgradeParams) MarshalJSON ¶
func (r GlobalUpgradeParams) MarshalJSON() (data []byte, err error)
type GlobalUpgradeResponse ¶
type GlobalUpgradeResponse struct {
Success bool `json:"success,required"`
Version string `json:"version"`
Error string `json:"error"`
JSON globalUpgradeResponseJSON `json:"-"`
// contains filtered or unexported fields
}
GlobalUpgradeResponse is the response from POST /global/upgrade.
Union satisfied by GlobalUpgradeResponseSuccess or GlobalUpgradeResponseFailure.
func (GlobalUpgradeResponse) AsUnion ¶
func (r GlobalUpgradeResponse) AsUnion() GlobalUpgradeResponseUnion
func (*GlobalUpgradeResponse) UnmarshalJSON ¶
func (r *GlobalUpgradeResponse) UnmarshalJSON(data []byte) (err error)
type GlobalUpgradeResponseFailure ¶
type GlobalUpgradeResponseFailure struct {
Success bool `json:"success,required"`
Error string `json:"error,required"`
JSON globalUpgradeResponseFailureJSON `json:"-"`
}
func (*GlobalUpgradeResponseFailure) UnmarshalJSON ¶
func (r *GlobalUpgradeResponseFailure) UnmarshalJSON(data []byte) (err error)
type GlobalUpgradeResponseSuccess ¶
type GlobalUpgradeResponseSuccess struct {
Success bool `json:"success,required"`
Version string `json:"version,required"`
JSON globalUpgradeResponseSuccessJSON `json:"-"`
}
func (*GlobalUpgradeResponseSuccess) UnmarshalJSON ¶
func (r *GlobalUpgradeResponseSuccess) UnmarshalJSON(data []byte) (err error)
type GlobalUpgradeResponseUnion ¶
type GlobalUpgradeResponseUnion interface {
// contains filtered or unexported methods
}
type InstanceDisposeParams ¶
type InstanceDisposeParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (InstanceDisposeParams) URLQuery ¶
func (r InstanceDisposeParams) URLQuery() (v url.Values)
URLQuery serializes InstanceDisposeParams's query parameters as `url.Values`.
type InstanceService ¶
type InstanceService struct {
Options []option.RequestOption
}
InstanceService contains methods for interacting with the instance resource.
func NewInstanceService ¶
func NewInstanceService(opts ...option.RequestOption) (r *InstanceService)
NewInstanceService generates a new service that applies the given options to each request.
func (*InstanceService) Dispose ¶
func (r *InstanceService) Dispose(ctx context.Context, params InstanceDisposeParams, opts ...option.RequestOption) (res *bool, err error)
Dispose shuts down the current instance.
type LayoutConfig ¶
type LayoutConfig string
LayoutConfig represents the layout mode.
const ( LayoutConfigAuto LayoutConfig = "auto" LayoutConfigStretch LayoutConfig = "stretch" )
func (LayoutConfig) IsKnown ¶
func (r LayoutConfig) IsKnown() bool
type LspService ¶
type LspService struct {
Options []option.RequestOption
}
LspService contains methods for interacting with the LSP resource.
func NewLspService ¶
func NewLspService(opts ...option.RequestOption) (r *LspService)
NewLspService generates a new service that applies the given options to each request.
func (*LspService) Status ¶
func (r *LspService) Status(ctx context.Context, query LspStatusParams, opts ...option.RequestOption) (res *[]LspStatus, err error)
Status returns the status of all LSP servers.
type LspStatus ¶
type LspStatus struct {
ID string `json:"id,required"`
Name string `json:"name,required"`
Root string `json:"root,required"`
Status LspStatusStatus `json:"status,required"`
JSON lspStatusJSON `json:"-"`
}
LspStatus describes the status of a single LSP server.
func (*LspStatus) UnmarshalJSON ¶
type LspStatusParams ¶
type LspStatusParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (LspStatusParams) URLQuery ¶
func (r LspStatusParams) URLQuery() (v url.Values)
URLQuery serializes LspStatusParams's query parameters as `url.Values`.
type LspStatusStatus ¶
type LspStatusStatus string
const ( LspStatusStatusConnected LspStatusStatus = "connected" LspStatusStatusError LspStatusStatus = "error" )
func (LspStatusStatus) IsKnown ¶
func (r LspStatusStatus) IsKnown() bool
type McpAddConfigOAuthDisabledParam ¶
type McpAddConfigOAuthDisabledParam struct{}
McpAddConfigOAuthDisabledParam represents oauth: false to disable OAuth auto-detection.
func (McpAddConfigOAuthDisabledParam) MarshalJSON ¶
func (r McpAddConfigOAuthDisabledParam) MarshalJSON() (data []byte, err error)
type McpAddConfigOAuthParam ¶
type McpAddConfigOAuthParam struct {
ClientID param.Field[string] `json:"clientId"`
ClientSecret param.Field[string] `json:"clientSecret"`
Scope param.Field[string] `json:"scope"`
RedirectURI param.Field[string] `json:"redirectUri"`
}
McpAddConfigOAuthParam represents OAuth configuration for a remote MCP server.
func (McpAddConfigOAuthParam) MarshalJSON ¶
func (r McpAddConfigOAuthParam) MarshalJSON() (data []byte, err error)
type McpAddConfigOAuthUnionParam ¶
type McpAddConfigOAuthUnionParam interface {
// contains filtered or unexported methods
}
McpAddConfigOAuthUnionParam is a param union for the MCP OAuth config. Satisfied by McpAddConfigOAuthParam (object config) or McpAddConfigOAuthDisabledParam (false).
type McpAddConfigParam ¶
type McpAddConfigParam struct {
// The config type: "local" or "remote". (required)
Type param.Field[string] `json:"type,required"`
// Command to run (array of strings). Required when Type is "local".
// Ignored for remote configs unless explicitly set.
Command param.Field[[]string] `json:"command"`
Environment param.Field[map[string]string] `json:"environment"`
// URL of the remote server. Required when Type is "remote".
// Ignored for local configs unless explicitly set.
URL param.Field[string] `json:"url"`
Headers param.Field[map[string]string] `json:"headers"`
OAuth param.Field[McpAddConfigOAuthUnionParam] `json:"oauth"`
// Shared fields (apply to both local and remote configs).
Enabled param.Field[bool] `json:"enabled"`
Timeout param.Field[float64] `json:"timeout"`
}
McpAddConfigParam is the config body for POST /mcp.
This is a flattened union of McpLocalConfig and McpRemoteConfig (anyOf discriminated by Type).
For local servers, set Type to "local" and provide Command (required for local):
opencode.McpAddConfigParam{
Type: opencode.F("local"),
Command: opencode.F([]string{"npx", "my-mcp-server"}),
}
For remote servers, set Type to "remote" and provide URL (required for remote):
opencode.McpAddConfigParam{
Type: opencode.F("remote"),
URL: opencode.F("https://mcp.example.com"),
}
Fields from the non-matching variant are ignored during serialization when not set (i.e., URL is not serialized for local configs unless explicitly provided).
func (McpAddConfigParam) MarshalJSON ¶
func (r McpAddConfigParam) MarshalJSON() (data []byte, err error)
type McpAddParams ¶
type McpAddParams struct {
Name param.Field[string] `json:"name,required"`
Config param.Field[McpAddConfigParam] `json:"config,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpAddParams) MarshalJSON ¶
func (r McpAddParams) MarshalJSON() (data []byte, err error)
func (McpAddParams) URLQuery ¶
func (r McpAddParams) URLQuery() (v url.Values)
type McpAuthAuthenticateParams ¶
type McpAuthAuthenticateParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpAuthAuthenticateParams) URLQuery ¶
func (r McpAuthAuthenticateParams) URLQuery() (v url.Values)
type McpAuthCallbackParams ¶
type McpAuthCallbackParams struct {
Code param.Field[string] `json:"code,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpAuthCallbackParams) MarshalJSON ¶
func (r McpAuthCallbackParams) MarshalJSON() (data []byte, err error)
func (McpAuthCallbackParams) URLQuery ¶
func (r McpAuthCallbackParams) URLQuery() (v url.Values)
type McpAuthRemoveParams ¶
type McpAuthRemoveParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpAuthRemoveParams) URLQuery ¶
func (r McpAuthRemoveParams) URLQuery() (v url.Values)
type McpAuthRemoveResponse ¶
type McpAuthRemoveResponse struct {
Success bool `json:"success,required"`
JSON mcpAuthRemoveResponseJSON `json:"-"`
}
McpAuthRemoveResponse is the response from DELETE /mcp/{name}/auth.
func (*McpAuthRemoveResponse) UnmarshalJSON ¶
func (r *McpAuthRemoveResponse) UnmarshalJSON(data []byte) (err error)
type McpAuthStartParams ¶
type McpAuthStartParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpAuthStartParams) URLQuery ¶
func (r McpAuthStartParams) URLQuery() (v url.Values)
type McpAuthStartResponse ¶
type McpAuthStartResponse struct {
AuthorizationURL string `json:"authorizationUrl,required"`
JSON mcpAuthStartResponseJSON `json:"-"`
}
McpAuthStartResponse is the response from POST /mcp/{name}/auth.
func (*McpAuthStartResponse) UnmarshalJSON ¶
func (r *McpAuthStartResponse) UnmarshalJSON(data []byte) (err error)
type McpConnectParams ¶
type McpConnectParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpConnectParams) URLQuery ¶
func (r McpConnectParams) URLQuery() (v url.Values)
type McpDisconnectParams ¶
type McpDisconnectParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpDisconnectParams) URLQuery ¶
func (r McpDisconnectParams) URLQuery() (v url.Values)
type McpLocalConfig ¶
type McpLocalConfig struct {
// Command and arguments to run the MCP server
Command []string `json:"command,required"`
// Type of MCP server connection
Type McpLocalConfigType `json:"type,required"`
// Enable or disable the MCP server on startup
Enabled bool `json:"enabled"`
// Environment variables to set when running the MCP server
Environment map[string]string `json:"environment"`
Timeout float64 `json:"timeout"`
JSON mcpLocalConfigJSON `json:"-"`
}
func (*McpLocalConfig) UnmarshalJSON ¶
func (r *McpLocalConfig) UnmarshalJSON(data []byte) (err error)
type McpLocalConfigType ¶
type McpLocalConfigType string
Type of MCP server connection
const (
McpLocalConfigTypeLocal McpLocalConfigType = "local"
)
func (McpLocalConfigType) IsKnown ¶
func (r McpLocalConfigType) IsKnown() bool
type McpOAuthConfig ¶
type McpOAuthConfig struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
Scope string `json:"scope"`
RedirectURI string `json:"redirectUri"`
JSON mcpOAuthConfigJSON `json:"-"`
}
func (*McpOAuthConfig) UnmarshalJSON ¶
func (r *McpOAuthConfig) UnmarshalJSON(data []byte) (err error)
type McpRemoteConfig ¶
type McpRemoteConfig struct {
// Type of MCP server connection
Type McpRemoteConfigType `json:"type,required"`
// URL of the remote MCP server
URL string `json:"url,required"`
// Enable or disable the MCP server on startup
Enabled bool `json:"enabled"`
// Headers to send with the request
Headers map[string]string `json:"headers"`
OAuth McpRemoteConfigOAuth `json:"oauth"`
Timeout float64 `json:"timeout"`
JSON mcpRemoteConfigJSON `json:"-"`
}
func (*McpRemoteConfig) UnmarshalJSON ¶
func (r *McpRemoteConfig) UnmarshalJSON(data []byte) (err error)
type McpRemoteConfigOAuth ¶
type McpRemoteConfigOAuth interface {
// contains filtered or unexported methods
}
type McpRemoteConfigOAuthFalse ¶
type McpRemoteConfigOAuthFalse bool
func (*McpRemoteConfigOAuthFalse) UnmarshalJSON ¶
func (r *McpRemoteConfigOAuthFalse) UnmarshalJSON(data []byte) error
type McpRemoteConfigType ¶
type McpRemoteConfigType string
Type of MCP server connection
const (
McpRemoteConfigTypeRemote McpRemoteConfigType = "remote"
)
func (McpRemoteConfigType) IsKnown ¶
func (r McpRemoteConfigType) IsKnown() bool
type McpResource ¶
type McpResource struct {
Name string `json:"name,required"`
URI string `json:"uri,required"`
Client string `json:"client,required"`
Description string `json:"description"`
MimeType string `json:"mimeType"`
JSON mcpResourceJSON `json:"-"`
}
McpResource describes an MCP-provided resource.
func (*McpResource) UnmarshalJSON ¶
func (r *McpResource) UnmarshalJSON(data []byte) (err error)
type McpService ¶
type McpService struct {
Options []option.RequestOption
}
McpService contains methods for interacting with the MCP resource.
func NewMcpService ¶
func NewMcpService(opts ...option.RequestOption) (r *McpService)
NewMcpService generates a new service that applies the given options to each request.
func (*McpService) Add ¶
func (r *McpService) Add(ctx context.Context, params McpAddParams, opts ...option.RequestOption) (res *map[string]McpStatus, err error)
Add registers a new MCP server.
func (*McpService) AuthAuthenticate ¶
func (r *McpService) AuthAuthenticate(ctx context.Context, name string, params McpAuthAuthenticateParams, opts ...option.RequestOption) (res *McpStatus, err error)
AuthAuthenticate authenticates with an MCP server.
func (*McpService) AuthCallback ¶
func (r *McpService) AuthCallback(ctx context.Context, name string, params McpAuthCallbackParams, opts ...option.RequestOption) (res *McpStatus, err error)
AuthCallback completes the OAuth callback for an MCP server.
func (*McpService) AuthRemove ¶
func (r *McpService) AuthRemove(ctx context.Context, name string, params McpAuthRemoveParams, opts ...option.RequestOption) (res *McpAuthRemoveResponse, err error)
AuthRemove removes authentication for an MCP server.
func (*McpService) AuthStart ¶
func (r *McpService) AuthStart(ctx context.Context, name string, params McpAuthStartParams, opts ...option.RequestOption) (res *McpAuthStartResponse, err error)
AuthStart initiates authentication for an MCP server.
func (*McpService) Connect ¶
func (r *McpService) Connect(ctx context.Context, name string, params McpConnectParams, opts ...option.RequestOption) (res *bool, err error)
Connect connects to an MCP server.
func (*McpService) Disconnect ¶
func (r *McpService) Disconnect(ctx context.Context, name string, params McpDisconnectParams, opts ...option.RequestOption) (res *bool, err error)
Disconnect disconnects from an MCP server.
func (*McpService) Status ¶
func (r *McpService) Status(ctx context.Context, query McpStatusParams, opts ...option.RequestOption) (res *map[string]McpStatus, err error)
Status returns the status of all MCP servers.
type McpStatus ¶
type McpStatus struct {
Status string `json:"status,required"`
Error string `json:"error"`
JSON mcpStatusJSON `json:"-"`
// contains filtered or unexported fields
}
McpStatus is the status of an MCP server.
Union satisfied by McpStatusConnected, McpStatusDisabled, McpStatusFailed, McpStatusNeedsAuth, or McpStatusNeedsClientRegistration.
func (McpStatus) AsUnion ¶
func (r McpStatus) AsUnion() McpStatusUnion
func (*McpStatus) UnmarshalJSON ¶
type McpStatusConnected ¶
type McpStatusConnected struct {
Status string `json:"status,required"`
JSON mcpStatusConnectedJSON `json:"-"`
}
func (*McpStatusConnected) UnmarshalJSON ¶
func (r *McpStatusConnected) UnmarshalJSON(data []byte) (err error)
type McpStatusDisabled ¶
type McpStatusDisabled struct {
Status string `json:"status,required"`
JSON mcpStatusDisabledJSON `json:"-"`
}
func (*McpStatusDisabled) UnmarshalJSON ¶
func (r *McpStatusDisabled) UnmarshalJSON(data []byte) (err error)
type McpStatusFailed ¶
type McpStatusFailed struct {
Status string `json:"status,required"`
Error string `json:"error,required"`
JSON mcpStatusFailedJSON `json:"-"`
}
func (*McpStatusFailed) UnmarshalJSON ¶
func (r *McpStatusFailed) UnmarshalJSON(data []byte) (err error)
type McpStatusNeedsAuth ¶
type McpStatusNeedsAuth struct {
Status string `json:"status,required"`
JSON mcpStatusNeedsAuthJSON `json:"-"`
}
func (*McpStatusNeedsAuth) UnmarshalJSON ¶
func (r *McpStatusNeedsAuth) UnmarshalJSON(data []byte) (err error)
type McpStatusNeedsClientRegistration ¶
type McpStatusNeedsClientRegistration struct {
Status string `json:"status,required"`
Error string `json:"error,required"`
JSON mcpStatusNeedsClientRegistrationJSON `json:"-"`
}
func (*McpStatusNeedsClientRegistration) UnmarshalJSON ¶
func (r *McpStatusNeedsClientRegistration) UnmarshalJSON(data []byte) (err error)
type McpStatusParams ¶
type McpStatusParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (McpStatusParams) URLQuery ¶
func (r McpStatusParams) URLQuery() (v url.Values)
type McpStatusUnion ¶
type McpStatusUnion interface {
// contains filtered or unexported methods
}
type Message ¶
type Message struct {
ID string `json:"id,required"`
Role MessageRole `json:"role,required"`
SessionID string `json:"sessionID,required"`
// This field can have the runtime type of [UserMessageTime],
// [AssistantMessageTime].
Time interface{} `json:"time,required"`
Agent string `json:"agent"`
Cost float64 `json:"cost"`
// This field can have the runtime type of [AssistantMessageError].
Error interface{} `json:"error"`
Finish string `json:"finish"`
// This field can have the runtime type of [OutputFormatText],
// [OutputFormatJsonSchema].
Format OutputFormat `json:"format"`
Mode string `json:"mode"`
// This field can have the runtime type of [UserMessageModel].
Model interface{} `json:"model"`
ModelID string `json:"modelID"`
ParentID string `json:"parentID"`
// This field can have the runtime type of [AssistantMessagePath].
Path interface{} `json:"path"`
ProviderID string `json:"providerID"`
// This field can have the runtime type of [interface{}].
Structured interface{} `json:"structured"`
// This field can have the runtime type of [UserMessageSummary], [bool].
Summary interface{} `json:"summary"`
System string `json:"system"`
// This field can have the runtime type of [AssistantMessageTokens].
Tokens interface{} `json:"tokens"`
// This field can have the runtime type of [map[string]bool].
Tools interface{} `json:"tools"`
Variant string `json:"variant"`
JSON messageJSON `json:"-"`
// contains filtered or unexported fields
}
func (Message) AsUnion ¶
func (r Message) AsUnion() MessageUnion
AsUnion returns a MessageUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are UserMessage, AssistantMessage.
func (*Message) UnmarshalJSON ¶
type MessageAbortedError ¶
type MessageAbortedError = shared.MessageAbortedError
This is an alias to an internal type.
type MessageAbortedErrorData ¶
type MessageAbortedErrorData = shared.MessageAbortedErrorData
This is an alias to an internal type.
type MessageAbortedErrorName ¶
type MessageAbortedErrorName = shared.MessageAbortedErrorName
This is an alias to an internal type.
type MessageRole ¶
type MessageRole string
const ( MessageRoleUser MessageRole = "user" MessageRoleAssistant MessageRole = "assistant" )
func (MessageRole) IsKnown ¶
func (r MessageRole) IsKnown() bool
type MessageUnion ¶
type MessageUnion interface {
// contains filtered or unexported methods
}
Union satisfied by UserMessage or AssistantMessage.
type Model ¶
type Model struct {
ID string `json:"id,required"`
ProviderID string `json:"providerID,required"`
API ModelAPI `json:"api,required"`
Name string `json:"name,required"`
Capabilities ModelCapabilities `json:"capabilities,required"`
Cost ModelCost `json:"cost,required"`
Limit ModelLimit `json:"limit,required"`
Status ModelStatus `json:"status,required"`
Options map[string]interface{} `json:"options,required"`
Headers map[string]string `json:"headers,required"`
ReleaseDate string `json:"release_date,required"`
Family string `json:"family"`
Variants map[string]map[string]interface{} `json:"variants"`
JSON modelJSON `json:"-"`
}
func (*Model) UnmarshalJSON ¶
type ModelAPI ¶
type ModelAPI struct {
ID string `json:"id,required"`
URL string `json:"url,required"`
Npm string `json:"npm,required"`
JSON modelAPIJSON `json:"-"`
}
func (*ModelAPI) UnmarshalJSON ¶
type ModelCapabilities ¶
type ModelCapabilities struct {
Temperature bool `json:"temperature,required"`
Reasoning bool `json:"reasoning,required"`
Attachment bool `json:"attachment,required"`
Toolcall bool `json:"toolcall,required"`
Input ModelCapabilitiesModality `json:"input,required"`
Output ModelCapabilitiesModality `json:"output,required"`
Interleaved ModelCapabilitiesInterleaved `json:"interleaved,required"`
JSON modelCapabilitiesJSON `json:"-"`
}
func (*ModelCapabilities) UnmarshalJSON ¶
func (r *ModelCapabilities) UnmarshalJSON(data []byte) (err error)
type ModelCapabilitiesInterleaved ¶
type ModelCapabilitiesInterleaved struct {
Field ModelCapabilitiesInterleavedField `json:"field"`
JSON modelCapabilitiesInterleavedJSON `json:"-"`
// contains filtered or unexported fields
}
func (ModelCapabilitiesInterleaved) AsUnion ¶
func (r ModelCapabilitiesInterleaved) AsUnion() ModelCapabilitiesInterleavedUnion
func (*ModelCapabilitiesInterleaved) UnmarshalJSON ¶
func (r *ModelCapabilitiesInterleaved) UnmarshalJSON(data []byte) (err error)
type ModelCapabilitiesInterleavedBool ¶
type ModelCapabilitiesInterleavedBool bool
type ModelCapabilitiesInterleavedField ¶
type ModelCapabilitiesInterleavedField string
const ( ModelCapabilitiesInterleavedFieldReasoningContent ModelCapabilitiesInterleavedField = "reasoning_content" ModelCapabilitiesInterleavedFieldReasoningDetails ModelCapabilitiesInterleavedField = "reasoning_details" )
func (ModelCapabilitiesInterleavedField) IsKnown ¶
func (r ModelCapabilitiesInterleavedField) IsKnown() bool
type ModelCapabilitiesInterleavedObject ¶
type ModelCapabilitiesInterleavedObject struct {
Field ModelCapabilitiesInterleavedField `json:"field,required"`
JSON modelCapabilitiesInterleavedObjectJSON `json:"-"`
}
func (*ModelCapabilitiesInterleavedObject) UnmarshalJSON ¶
func (r *ModelCapabilitiesInterleavedObject) UnmarshalJSON(data []byte) (err error)
type ModelCapabilitiesInterleavedUnion ¶
type ModelCapabilitiesInterleavedUnion interface {
// contains filtered or unexported methods
}
type ModelCapabilitiesModality ¶
type ModelCapabilitiesModality struct {
Text bool `json:"text,required"`
Audio bool `json:"audio,required"`
Image bool `json:"image,required"`
Video bool `json:"video,required"`
Pdf bool `json:"pdf,required"`
JSON modelCapabilitiesModalityJSON `json:"-"`
}
func (*ModelCapabilitiesModality) UnmarshalJSON ¶
func (r *ModelCapabilitiesModality) UnmarshalJSON(data []byte) (err error)
type ModelCost ¶
type ModelCost struct {
Input float64 `json:"input,required"`
Output float64 `json:"output,required"`
Cache ModelCostCache `json:"cache,required"`
ExperimentalOver200K ModelCostExperimentalOver200K `json:"experimentalOver200K"`
JSON modelCostJSON `json:"-"`
}
func (*ModelCost) UnmarshalJSON ¶
type ModelCostCache ¶
type ModelCostCache struct {
Read float64 `json:"read,required"`
Write float64 `json:"write,required"`
JSON modelCostCacheJSON `json:"-"`
}
func (*ModelCostCache) UnmarshalJSON ¶
func (r *ModelCostCache) UnmarshalJSON(data []byte) (err error)
type ModelCostExperimentalOver200K ¶
type ModelCostExperimentalOver200K struct {
Input float64 `json:"input,required"`
Output float64 `json:"output,required"`
Cache ModelCostCache `json:"cache,required"`
JSON modelCostExperimentalOver200KJSON `json:"-"`
}
func (*ModelCostExperimentalOver200K) UnmarshalJSON ¶
func (r *ModelCostExperimentalOver200K) UnmarshalJSON(data []byte) (err error)
type ModelLimit ¶
type ModelLimit struct {
Context float64 `json:"context,required"`
Output float64 `json:"output,required"`
Input float64 `json:"input"`
JSON modelLimitJSON `json:"-"`
}
func (*ModelLimit) UnmarshalJSON ¶
func (r *ModelLimit) UnmarshalJSON(data []byte) (err error)
type ModelStatus ¶
type ModelStatus string
const ( ModelStatusAlpha ModelStatus = "alpha" ModelStatusBeta ModelStatus = "beta" ModelStatusDeprecated ModelStatus = "deprecated" ModelStatusActive ModelStatus = "active" )
func (ModelStatus) IsKnown ¶
func (r ModelStatus) IsKnown() bool
type NotFoundError ¶
type NotFoundError = shared.NotFoundError
This is an alias to an internal type.
type NotFoundErrorData ¶
type NotFoundErrorData = shared.NotFoundErrorData
This is an alias to an internal type.
type NotFoundErrorName ¶
type NotFoundErrorName = shared.NotFoundErrorName
This is an alias to an internal type.
type OutputFormat ¶
type OutputFormat struct {
// The format type: "text" or "json_schema".
Type string `json:"type,required"`
// This field can have the runtime type of [map[string]interface{}].
Schema interface{} `json:"schema"`
RetryCount int64 `json:"retryCount"`
JSON outputFormatJSON `json:"-"`
// contains filtered or unexported fields
}
OutputFormat represents the output format configuration. Use OutputFormat.AsUnion to access the underlying variant.
Union satisfied by OutputFormatText or OutputFormatJsonSchema.
func (OutputFormat) AsUnion ¶
func (r OutputFormat) AsUnion() OutputFormatUnion
AsUnion returns the underlying union variant of this OutputFormat.
func (*OutputFormat) UnmarshalJSON ¶
func (r *OutputFormat) UnmarshalJSON(data []byte) (err error)
type OutputFormatJsonSchema ¶
type OutputFormatJsonSchema struct {
Type OutputFormatJsonSchemaType `json:"type,required"`
Schema map[string]interface{} `json:"schema,required"`
RetryCount int64 `json:"retryCount"`
JSON outputFormatJsonSchemaJSON `json:"-"`
}
func (*OutputFormatJsonSchema) UnmarshalJSON ¶
func (r *OutputFormatJsonSchema) UnmarshalJSON(data []byte) (err error)
type OutputFormatJsonSchemaParam ¶
type OutputFormatJsonSchemaParam struct {
Type param.Field[OutputFormatJsonSchemaType] `json:"type,required"`
Schema param.Field[map[string]interface{}] `json:"schema,required"`
RetryCount param.Field[int64] `json:"retryCount"`
}
func (OutputFormatJsonSchemaParam) MarshalJSON ¶
func (r OutputFormatJsonSchemaParam) MarshalJSON() (data []byte, err error)
type OutputFormatJsonSchemaType ¶
type OutputFormatJsonSchemaType string
const (
OutputFormatJsonSchemaTypeJsonSchema OutputFormatJsonSchemaType = "json_schema"
)
func (OutputFormatJsonSchemaType) IsKnown ¶
func (r OutputFormatJsonSchemaType) IsKnown() bool
type OutputFormatParam ¶
type OutputFormatParam interface {
// contains filtered or unexported methods
}
OutputFormatParam is a param union for OutputFormat. Satisfied by OutputFormatTextParam or OutputFormatJsonSchemaParam.
type OutputFormatText ¶
type OutputFormatText struct {
Type OutputFormatTextType `json:"type,required"`
JSON outputFormatTextJSON `json:"-"`
}
func (*OutputFormatText) UnmarshalJSON ¶
func (r *OutputFormatText) UnmarshalJSON(data []byte) (err error)
type OutputFormatTextParam ¶
type OutputFormatTextParam struct {
Type param.Field[OutputFormatTextType] `json:"type,required"`
}
func (OutputFormatTextParam) MarshalJSON ¶
func (r OutputFormatTextParam) MarshalJSON() (data []byte, err error)
type OutputFormatTextType ¶
type OutputFormatTextType string
const (
OutputFormatTextTypeText OutputFormatTextType = "text"
)
func (OutputFormatTextType) IsKnown ¶
func (r OutputFormatTextType) IsKnown() bool
type OutputFormatUnion ¶
type OutputFormatUnion interface {
// contains filtered or unexported methods
}
Union satisfied by OutputFormatText or OutputFormatJsonSchema.
type Part ¶
type Part struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Type PartType `json:"type,required"`
Agent string `json:"agent"`
Attempt float64 `json:"attempt"`
Auto bool `json:"auto"`
CallID string `json:"callID"`
Command string `json:"command"`
Cost float64 `json:"cost"`
Description string `json:"description"`
// This field can have the runtime type of [RetryPartError].
Error interface{} `json:"error"`
Filename string `json:"filename"`
// This field can have the runtime type of [[]string].
Files interface{} `json:"files"`
Hash string `json:"hash"`
Ignored bool `json:"ignored"`
// This field can have the runtime type of [map[string]interface{}].
Metadata interface{} `json:"metadata"`
Mime string `json:"mime"`
Model SubtaskPartModel `json:"model"`
Name string `json:"name"`
Overflow bool `json:"overflow"`
Prompt string `json:"prompt"`
Reason string `json:"reason"`
Snapshot string `json:"snapshot"`
// This field can have the runtime type of [FilePartSource], [AgentPartSource].
Source interface{} `json:"source"`
// This field can have the runtime type of [ToolPartState].
State interface{} `json:"state"`
Synthetic bool `json:"synthetic"`
TailStartID string `json:"tail_start_id"`
Text string `json:"text"`
// This field can have the runtime type of [TextPartTime], [ReasoningPartTime],
// [RetryPartTime].
Time interface{} `json:"time"`
// This field can have the runtime type of [StepFinishPartTokens].
Tokens interface{} `json:"tokens"`
Tool string `json:"tool"`
URL string `json:"url"`
JSON partJSON `json:"-"`
// contains filtered or unexported fields
}
func (Part) AsUnion ¶
AsUnion returns a PartUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are TextPart, ReasoningPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart, AgentPart, RetryPart, SubtaskPart, CompactionPart.
func (*Part) UnmarshalJSON ¶
type PartType ¶
type PartType string
const ( PartTypeText PartType = "text" PartTypeReasoning PartType = "reasoning" PartTypeFile PartType = "file" PartTypeTool PartType = "tool" PartTypeStepStart PartType = "step-start" PartTypeStepFinish PartType = "step-finish" PartTypeSnapshot PartType = "snapshot" PartTypePatch PartType = "patch" PartTypeAgent PartType = "agent" PartTypeRetry PartType = "retry" PartTypeSubtask PartType = "subtask" PartTypeCompaction PartType = "compaction" )
type PartUnion ¶
type PartUnion interface {
// contains filtered or unexported methods
}
Union satisfied by TextPart, ReasoningPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart, AgentPart, RetryPart, SubtaskPart or CompactionPart.
type PatchPart ¶
type PatchPart struct {
ID string `json:"id,required"`
Files []string `json:"files,required"`
Hash string `json:"hash,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Type PatchPartType `json:"type,required"`
JSON patchPartJSON `json:"-"`
}
func (*PatchPart) UnmarshalJSON ¶
type PatchPartInputParam ¶
type PatchPartInputParam struct {
Files param.Field[[]string] `json:"files,required"`
Hash param.Field[string] `json:"hash,required"`
Type param.Field[PatchPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
}
func (PatchPartInputParam) MarshalJSON ¶
func (r PatchPartInputParam) MarshalJSON() (data []byte, err error)
type PatchPartInputType ¶
type PatchPartInputType string
const (
PatchPartInputTypePatch PatchPartInputType = "patch"
)
func (PatchPartInputType) IsKnown ¶
func (r PatchPartInputType) IsKnown() bool
type PatchPartType ¶
type PatchPartType string
const (
PatchPartTypePatch PatchPartType = "patch"
)
func (PatchPartType) IsKnown ¶
func (r PatchPartType) IsKnown() bool
type Path ¶
type Path struct {
Config string `json:"config,required"`
Directory string `json:"directory,required"`
Home string `json:"home,required"`
State string `json:"state,required"`
Worktree string `json:"worktree,required"`
JSON pathJSON `json:"-"`
}
func (*Path) UnmarshalJSON ¶
type PathGetParams ¶
type PathGetParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (PathGetParams) URLQuery ¶
func (r PathGetParams) URLQuery() (v url.Values)
URLQuery serializes PathGetParams's query parameters as `url.Values`.
type PathService ¶
type PathService struct {
Options []option.RequestOption
}
PathService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPathService method instead.
func NewPathService ¶
func NewPathService(opts ...option.RequestOption) (r *PathService)
NewPathService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PathService) Get ¶
func (r *PathService) Get(ctx context.Context, query PathGetParams, opts ...option.RequestOption) (res *Path, err error)
Get the current path
type PermissionAction ¶
type PermissionAction string
const ( PermissionActionAllow PermissionAction = "allow" PermissionActionDeny PermissionAction = "deny" PermissionActionAsk PermissionAction = "ask" )
func (PermissionAction) IsKnown ¶
func (r PermissionAction) IsKnown() bool
type PermissionActionConfig ¶
type PermissionActionConfig string
PermissionActionConfig is the simple action enum for config permissions. Spec: PermissionActionConfig (anyOf variant 1 of PermissionConfig)
const ( PermissionActionConfigAsk PermissionActionConfig = "ask" PermissionActionConfigAllow PermissionActionConfig = "allow" PermissionActionConfigDeny PermissionActionConfig = "deny" )
func (PermissionActionConfig) IsKnown ¶
func (r PermissionActionConfig) IsKnown() bool
type PermissionConfig ¶
type PermissionConfig interface {
// contains filtered or unexported methods
}
PermissionConfig is a union: PermissionActionConfig | PermissionConfigObject. Spec: openapi.json:10981
type PermissionConfigObject ¶
type PermissionConfigObject struct {
Read PermissionRuleConfig `json:"read"`
Edit PermissionRuleConfig `json:"edit"`
Glob PermissionRuleConfig `json:"glob"`
Grep PermissionRuleConfig `json:"grep"`
List PermissionRuleConfig `json:"list"`
Bash PermissionRuleConfig `json:"bash"`
Task PermissionRuleConfig `json:"task"`
ExternalDirectory PermissionRuleConfig `json:"external_directory"`
Lsp PermissionRuleConfig `json:"lsp"`
Skill PermissionRuleConfig `json:"skill"`
Todowrite PermissionActionConfig `json:"todowrite"`
Question PermissionActionConfig `json:"question"`
Webfetch PermissionActionConfig `json:"webfetch"`
Websearch PermissionActionConfig `json:"websearch"`
Codesearch PermissionActionConfig `json:"codesearch"`
DoomLoop PermissionActionConfig `json:"doom_loop"`
ExtraFields map[string]PermissionRuleConfig `json:"-,extras"`
JSON permissionConfigObjectJSON `json:"-"`
}
PermissionConfigObject is the per-tool permission configuration. Spec: PermissionConfig anyOf variant 2 (openapi.json:10981)
func (*PermissionConfigObject) UnmarshalJSON ¶
func (r *PermissionConfigObject) UnmarshalJSON(data []byte) (err error)
type PermissionListParams ¶
type PermissionListParams struct {
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (PermissionListParams) URLQuery ¶
func (r PermissionListParams) URLQuery() (v url.Values)
URLQuery serializes PermissionListParams's query parameters as `url.Values`.
type PermissionObjectConfig ¶
type PermissionObjectConfig map[string]PermissionActionConfig
PermissionObjectConfig is a map of tool names to permission actions. Spec: openapi.json:10962
type PermissionReplyParams ¶
type PermissionReplyParams struct {
Reply param.Field[PermissionReplyParamsReply] `json:"reply,required"`
Message param.Field[string] `json:"message"`
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (PermissionReplyParams) MarshalJSON ¶
func (r PermissionReplyParams) MarshalJSON() (data []byte, err error)
func (PermissionReplyParams) URLQuery ¶
func (r PermissionReplyParams) URLQuery() (v url.Values)
URLQuery serializes PermissionReplyParams's query parameters as `url.Values`.
type PermissionReplyParamsReply ¶
type PermissionReplyParamsReply string
PermissionReplyParamsReply is the enum type for the reply field.
const ( PermissionReplyParamsReplyOnce PermissionReplyParamsReply = "once" PermissionReplyParamsReplyAlways PermissionReplyParamsReply = "always" PermissionReplyParamsReplyReject PermissionReplyParamsReply = "reject" )
type PermissionRequest ¶
type PermissionRequest struct {
ID string `json:"id,required"`
SessionID string `json:"sessionID,required"`
Permission string `json:"permission,required"`
Patterns []string `json:"patterns,required"`
Metadata map[string]interface{} `json:"metadata,required"`
Always []string `json:"always,required"`
Tool PermissionRequestTool `json:"tool"`
JSON permissionRequestJSON `json:"-"`
}
func (*PermissionRequest) UnmarshalJSON ¶
func (r *PermissionRequest) UnmarshalJSON(data []byte) (err error)
type PermissionRequestTool ¶
type PermissionRequestTool struct {
MessageID string `json:"messageID,required"`
CallID string `json:"callID,required"`
JSON permissionRequestToolJSON `json:"-"`
}
PermissionRequestTool represents the optional tool reference on a permission request.
func (*PermissionRequestTool) UnmarshalJSON ¶
func (r *PermissionRequestTool) UnmarshalJSON(data []byte) (err error)
type PermissionRule ¶
type PermissionRule struct {
Permission string `json:"permission,required"`
Pattern string `json:"pattern,required"`
Action PermissionAction `json:"action,required"`
JSON permissionRuleJSON `json:"-"`
}
func (*PermissionRule) UnmarshalJSON ¶
func (r *PermissionRule) UnmarshalJSON(data []byte) (err error)
type PermissionRuleConfig ¶
type PermissionRuleConfig interface {
// contains filtered or unexported methods
}
PermissionRuleConfig is a union: PermissionActionConfig | PermissionObjectConfig. Spec: openapi.json:10971
type PermissionRuleParam ¶
type PermissionRuleParam struct {
Permission param.Field[string] `json:"permission,required"`
Pattern param.Field[string] `json:"pattern,required"`
Action param.Field[PermissionAction] `json:"action,required"`
}
func (PermissionRuleParam) MarshalJSON ¶
func (r PermissionRuleParam) MarshalJSON() (data []byte, err error)
type PermissionService ¶
type PermissionService struct {
Options []option.RequestOption
}
PermissionService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPermissionService method instead.
func NewPermissionService ¶
func NewPermissionService(opts ...option.RequestOption) (r *PermissionService)
NewPermissionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PermissionService) List ¶
func (r *PermissionService) List(ctx context.Context, query PermissionListParams, opts ...option.RequestOption) (res *[]PermissionRequest, err error)
List pending permission requests
func (*PermissionService) Reply ¶
func (r *PermissionService) Reply(ctx context.Context, requestID string, params PermissionReplyParams, opts ...option.RequestOption) (res *bool, err error)
Reply to a permission request
type Project ¶
type Project struct {
ID string `json:"id,required"`
Time ProjectTime `json:"time,required"`
Worktree string `json:"worktree,required"`
Sandboxes []string `json:"sandboxes,required"`
Name string `json:"name"`
Icon ProjectIcon `json:"icon"`
Commands ProjectCommands `json:"commands"`
Vcs ProjectVcs `json:"vcs"`
JSON projectJSON `json:"-"`
}
func (*Project) UnmarshalJSON ¶
type ProjectCommands ¶
type ProjectCommands struct {
Start string `json:"start"`
JSON projectCommandsJSON `json:"-"`
}
ProjectCommands holds the project's command configuration.
func (*ProjectCommands) UnmarshalJSON ¶
func (r *ProjectCommands) UnmarshalJSON(data []byte) (err error)
type ProjectCurrentParams ¶
type ProjectCurrentParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ProjectCurrentParams) URLQuery ¶
func (r ProjectCurrentParams) URLQuery() (v url.Values)
URLQuery serializes ProjectCurrentParams's query parameters as `url.Values`.
type ProjectIcon ¶
type ProjectIcon struct {
URL string `json:"url"`
Override string `json:"override"`
Color string `json:"color"`
JSON projectIconJSON `json:"-"`
}
ProjectIcon represents a project's icon configuration.
func (*ProjectIcon) UnmarshalJSON ¶
func (r *ProjectIcon) UnmarshalJSON(data []byte) (err error)
type ProjectInitGitParams ¶
type ProjectInitGitParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ProjectInitGitParams) URLQuery ¶
func (r ProjectInitGitParams) URLQuery() (v url.Values)
type ProjectListParams ¶
type ProjectListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ProjectListParams) URLQuery ¶
func (r ProjectListParams) URLQuery() (v url.Values)
URLQuery serializes ProjectListParams's query parameters as `url.Values`.
type ProjectService ¶
type ProjectService struct {
Options []option.RequestOption
}
ProjectService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectService method instead.
func NewProjectService ¶
func NewProjectService(opts ...option.RequestOption) (r *ProjectService)
NewProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProjectService) Current ¶
func (r *ProjectService) Current(ctx context.Context, query ProjectCurrentParams, opts ...option.RequestOption) (res *Project, err error)
Get the current project
func (*ProjectService) InitGit ¶
func (r *ProjectService) InitGit(ctx context.Context, params ProjectInitGitParams, opts ...option.RequestOption) (res *Project, err error)
Initialize git for a project
func (*ProjectService) List ¶
func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *[]Project, err error)
List all projects
func (*ProjectService) Update ¶
func (r *ProjectService) Update(ctx context.Context, projectID string, params ProjectUpdateParams, opts ...option.RequestOption) (res *Project, err error)
Update a project
type ProjectSummary ¶
type ProjectSummary struct {
ID string `json:"id,required"`
Worktree string `json:"worktree,required"`
Name string `json:"name"`
JSON projectSummaryJSON `json:"-"`
}
ProjectSummary is a lightweight project reference.
func (*ProjectSummary) UnmarshalJSON ¶
func (r *ProjectSummary) UnmarshalJSON(data []byte) (err error)
type ProjectTime ¶
type ProjectTime struct {
Created float64 `json:"created,required"`
Updated float64 `json:"updated,required"`
Initialized float64 `json:"initialized"`
JSON projectTimeJSON `json:"-"`
}
func (*ProjectTime) UnmarshalJSON ¶
func (r *ProjectTime) UnmarshalJSON(data []byte) (err error)
type ProjectUpdateParams ¶
type ProjectUpdateParams struct {
Name param.Field[string] `json:"name"`
Icon param.Field[ProjectUpdateParamsIcon] `json:"icon"`
Commands param.Field[ProjectUpdateParamsCommands] `json:"commands"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ProjectUpdateParams) MarshalJSON ¶
func (r ProjectUpdateParams) MarshalJSON() (data []byte, err error)
func (ProjectUpdateParams) URLQuery ¶
func (r ProjectUpdateParams) URLQuery() (v url.Values)
type ProjectUpdateParamsIcon ¶
type ProjectVcs ¶
type ProjectVcs string
const (
ProjectVcsGit ProjectVcs = "git"
)
func (ProjectVcs) IsKnown ¶
func (r ProjectVcs) IsKnown() bool
type Provider ¶
type Provider struct {
ID string `json:"id,required"`
Name string `json:"name,required"`
Source ProviderSource `json:"source,required"`
Env []string `json:"env,required"`
Options map[string]interface{} `json:"options,required"`
Models map[string]Model `json:"models,required"`
Key string `json:"key"`
JSON providerJSON `json:"-"`
}
func (*Provider) UnmarshalJSON ¶
type ProviderAuthAuthorization ¶
type ProviderAuthAuthorization struct {
URL string `json:"url,required"`
Method ProviderAuthAuthorizationMethod `json:"method,required"`
Instructions string `json:"instructions,required"`
JSON providerAuthAuthorizationJSON `json:"-"`
}
ProviderAuthAuthorization is the response from OAuth authorize.
func (*ProviderAuthAuthorization) UnmarshalJSON ¶
func (r *ProviderAuthAuthorization) UnmarshalJSON(data []byte) (err error)
type ProviderAuthAuthorizationMethod ¶
type ProviderAuthAuthorizationMethod string
const ( ProviderAuthAuthorizationMethodAuto ProviderAuthAuthorizationMethod = "auto" ProviderAuthAuthorizationMethodCode ProviderAuthAuthorizationMethod = "code" )
func (ProviderAuthAuthorizationMethod) IsKnown ¶
func (r ProviderAuthAuthorizationMethod) IsKnown() bool
type ProviderAuthError ¶
type ProviderAuthError = shared.ProviderAuthError
This is an alias to an internal type.
type ProviderAuthErrorData ¶
type ProviderAuthErrorData = shared.ProviderAuthErrorData
This is an alias to an internal type.
type ProviderAuthErrorName ¶
type ProviderAuthErrorName = shared.ProviderAuthErrorName
This is an alias to an internal type.
type ProviderAuthMethod ¶
type ProviderAuthMethod struct {
Type ProviderAuthMethodType `json:"type,required"`
Label string `json:"label,required"`
Prompts []ProviderAuthMethodPrompt `json:"prompts"`
JSON providerAuthMethodJSON `json:"-"`
}
ProviderAuthMethod describes an authentication method for a provider.
func (*ProviderAuthMethod) UnmarshalJSON ¶
func (r *ProviderAuthMethod) UnmarshalJSON(data []byte) (err error)
type ProviderAuthMethodPrompt ¶
type ProviderAuthMethodPrompt struct {
Type string `json:"type,required"`
Key string `json:"key,required"`
Message string `json:"message,required"`
// This field can have the runtime type of [[]ProviderAuthMethodPromptSelectOption].
Options interface{} `json:"options"`
Placeholder string `json:"placeholder"`
When *ProviderAuthMethodPromptWhen `json:"when"`
JSON providerAuthMethodPromptJSON `json:"-"`
// contains filtered or unexported fields
}
ProviderAuthMethodPrompt is a union type for auth prompts. Use ProviderAuthMethodPrompt.AsUnion to access the underlying variant.
Union satisfied by ProviderAuthMethodPromptText or ProviderAuthMethodPromptSelect.
func (ProviderAuthMethodPrompt) AsUnion ¶
func (r ProviderAuthMethodPrompt) AsUnion() ProviderAuthMethodPromptUnion
AsUnion returns the underlying union variant.
func (*ProviderAuthMethodPrompt) UnmarshalJSON ¶
func (r *ProviderAuthMethodPrompt) UnmarshalJSON(data []byte) (err error)
type ProviderAuthMethodPromptSelect ¶
type ProviderAuthMethodPromptSelect struct {
Type ProviderAuthMethodPromptSelectType `json:"type,required"`
Key string `json:"key,required"`
Message string `json:"message,required"`
Options []ProviderAuthMethodPromptSelectOption `json:"options,required"`
When *ProviderAuthMethodPromptWhen `json:"when"`
JSON providerAuthMethodPromptSelectJSON `json:"-"`
}
func (*ProviderAuthMethodPromptSelect) UnmarshalJSON ¶
func (r *ProviderAuthMethodPromptSelect) UnmarshalJSON(data []byte) (err error)
type ProviderAuthMethodPromptSelectOption ¶
type ProviderAuthMethodPromptSelectOption struct {
Label string `json:"label,required"`
Value string `json:"value,required"`
Hint string `json:"hint"`
JSON providerAuthMethodPromptSelectOptionJSON `json:"-"`
}
func (*ProviderAuthMethodPromptSelectOption) UnmarshalJSON ¶
func (r *ProviderAuthMethodPromptSelectOption) UnmarshalJSON(data []byte) (err error)
type ProviderAuthMethodPromptSelectType ¶
type ProviderAuthMethodPromptSelectType string
const (
ProviderAuthMethodPromptSelectTypeSelect ProviderAuthMethodPromptSelectType = "select"
)
func (ProviderAuthMethodPromptSelectType) IsKnown ¶
func (r ProviderAuthMethodPromptSelectType) IsKnown() bool
type ProviderAuthMethodPromptText ¶
type ProviderAuthMethodPromptText struct {
Type ProviderAuthMethodPromptTextType `json:"type,required"`
Key string `json:"key,required"`
Message string `json:"message,required"`
Placeholder string `json:"placeholder"`
When *ProviderAuthMethodPromptWhen `json:"when"`
JSON providerAuthMethodPromptTextJSON `json:"-"`
}
func (*ProviderAuthMethodPromptText) UnmarshalJSON ¶
func (r *ProviderAuthMethodPromptText) UnmarshalJSON(data []byte) (err error)
type ProviderAuthMethodPromptTextType ¶
type ProviderAuthMethodPromptTextType string
const (
ProviderAuthMethodPromptTextTypeText ProviderAuthMethodPromptTextType = "text"
)
func (ProviderAuthMethodPromptTextType) IsKnown ¶
func (r ProviderAuthMethodPromptTextType) IsKnown() bool
type ProviderAuthMethodPromptUnion ¶
type ProviderAuthMethodPromptUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ProviderAuthMethodPromptText or ProviderAuthMethodPromptSelect.
type ProviderAuthMethodPromptWhen ¶
type ProviderAuthMethodPromptWhen struct {
Key string `json:"key,required"`
Op ProviderAuthMethodPromptWhenOp `json:"op,required"`
Value string `json:"value,required"`
JSON providerAuthMethodPromptWhenJSON `json:"-"`
}
func (*ProviderAuthMethodPromptWhen) UnmarshalJSON ¶
func (r *ProviderAuthMethodPromptWhen) UnmarshalJSON(data []byte) (err error)
type ProviderAuthMethodPromptWhenOp ¶
type ProviderAuthMethodPromptWhenOp string
const ( ProviderAuthMethodPromptWhenOpEq ProviderAuthMethodPromptWhenOp = "eq" ProviderAuthMethodPromptWhenOpNeq ProviderAuthMethodPromptWhenOp = "neq" )
func (ProviderAuthMethodPromptWhenOp) IsKnown ¶
func (r ProviderAuthMethodPromptWhenOp) IsKnown() bool
type ProviderAuthMethodType ¶
type ProviderAuthMethodType string
const ( ProviderAuthMethodTypeOAuth ProviderAuthMethodType = "oauth" ProviderAuthMethodTypeAPI ProviderAuthMethodType = "api" )
func (ProviderAuthMethodType) IsKnown ¶
func (r ProviderAuthMethodType) IsKnown() bool
type ProviderAuthParams ¶
type ProviderAuthParams struct {
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (ProviderAuthParams) URLQuery ¶
func (r ProviderAuthParams) URLQuery() (v url.Values)
URLQuery serializes ProviderAuthParams's query parameters as `url.Values`.
type ProviderListParams ¶
type ProviderListParams struct {
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (ProviderListParams) URLQuery ¶
func (r ProviderListParams) URLQuery() (v url.Values)
URLQuery serializes ProviderListParams's query parameters as `url.Values`.
type ProviderListResponse ¶
type ProviderListResponse struct {
All []Provider `json:"all,required"`
Default map[string]string `json:"default,required"`
Connected []string `json:"connected,required"`
JSON providerListResponseJSON `json:"-"`
}
ProviderListResponse is the response from GET /provider.
func (*ProviderListResponse) UnmarshalJSON ¶
func (r *ProviderListResponse) UnmarshalJSON(data []byte) (err error)
type ProviderOAuthAuthorizeParams ¶
type ProviderOAuthAuthorizeParams struct {
// Index of the chosen auth method from the ProviderService.Auth response.
Method param.Field[float64] `json:"method,required"`
Inputs param.Field[map[string]string] `json:"inputs"`
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (ProviderOAuthAuthorizeParams) MarshalJSON ¶
func (r ProviderOAuthAuthorizeParams) MarshalJSON() (data []byte, err error)
func (ProviderOAuthAuthorizeParams) URLQuery ¶
func (r ProviderOAuthAuthorizeParams) URLQuery() (v url.Values)
URLQuery serializes ProviderOAuthAuthorizeParams's query parameters as `url.Values`.
type ProviderOAuthCallbackParams ¶
type ProviderOAuthCallbackParams struct {
// Index of the chosen auth method from the ProviderService.Auth response.
Method param.Field[float64] `json:"method,required"`
Code param.Field[string] `json:"code"`
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (ProviderOAuthCallbackParams) MarshalJSON ¶
func (r ProviderOAuthCallbackParams) MarshalJSON() (data []byte, err error)
func (ProviderOAuthCallbackParams) URLQuery ¶
func (r ProviderOAuthCallbackParams) URLQuery() (v url.Values)
URLQuery serializes ProviderOAuthCallbackParams's query parameters as `url.Values`.
type ProviderService ¶
type ProviderService struct {
Options []option.RequestOption
}
ProviderService contains methods for interacting with the provider resource.
func NewProviderService ¶
func NewProviderService(opts ...option.RequestOption) (r *ProviderService)
NewProviderService generates a new service that applies the given options to each request.
func (*ProviderService) Auth ¶
func (r *ProviderService) Auth(ctx context.Context, query ProviderAuthParams, opts ...option.RequestOption) (res *map[string][]ProviderAuthMethod, err error)
Get available auth methods for all providers.
func (*ProviderService) List ¶
func (r *ProviderService) List(ctx context.Context, query ProviderListParams, opts ...option.RequestOption) (res *ProviderListResponse, err error)
List all providers with their models.
func (*ProviderService) OAuthAuthorize ¶
func (r *ProviderService) OAuthAuthorize(ctx context.Context, providerID string, params ProviderOAuthAuthorizeParams, opts ...option.RequestOption) (res *ProviderAuthAuthorization, err error)
Initiate OAuth authorization for a provider.
func (*ProviderService) OAuthCallback ¶
func (r *ProviderService) OAuthCallback(ctx context.Context, providerID string, params ProviderOAuthCallbackParams, opts ...option.RequestOption) (res *bool, err error)
Complete OAuth callback for a provider.
type ProviderSource ¶
type ProviderSource string
const ( ProviderSourceEnv ProviderSource = "env" ProviderSourceConfig ProviderSource = "config" ProviderSourceCustom ProviderSource = "custom" ProviderSourceAPI ProviderSource = "api" )
func (ProviderSource) IsKnown ¶
func (r ProviderSource) IsKnown() bool
type Pty ¶
type Pty struct {
ID string `json:"id,required"`
Title string `json:"title,required"`
Command string `json:"command,required"`
Args []string `json:"args,required"`
Cwd string `json:"cwd,required"`
Status PtyStatus `json:"status,required"`
Pid float64 `json:"pid,required"`
JSON ptyJSON `json:"-"`
}
Pty represents a pseudo-terminal session.
func (*Pty) UnmarshalJSON ¶
type PtyCreateParams ¶
type PtyCreateParams struct {
Command param.Field[string] `json:"command"`
Args param.Field[[]string] `json:"args"`
Cwd param.Field[string] `json:"cwd"`
Title param.Field[string] `json:"title"`
Env param.Field[map[string]string] `json:"env"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (PtyCreateParams) MarshalJSON ¶
func (r PtyCreateParams) MarshalJSON() (data []byte, err error)
func (PtyCreateParams) URLQuery ¶
func (r PtyCreateParams) URLQuery() (v url.Values)
type PtyGetParams ¶
type PtyGetParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (PtyGetParams) URLQuery ¶
func (r PtyGetParams) URLQuery() (v url.Values)
type PtyListParams ¶
type PtyListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (PtyListParams) URLQuery ¶
func (r PtyListParams) URLQuery() (v url.Values)
type PtyRemoveParams ¶
type PtyRemoveParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (PtyRemoveParams) URLQuery ¶
func (r PtyRemoveParams) URLQuery() (v url.Values)
type PtyService ¶
type PtyService struct {
Options []option.RequestOption
}
PtyService contains methods for interacting with the PTY resource.
Note: The OpenAPI spec defines GET /pty/{ptyID}/connect (pty.connect) for establishing a WebSocket connection to a PTY session. This endpoint is not yet implemented in the SDK because it requires WebSocket upgrade handling that falls outside the standard HTTP request/response pattern.
func NewPtyService ¶
func NewPtyService(opts ...option.RequestOption) (r *PtyService)
NewPtyService generates a new service that applies the given options to each request.
func (*PtyService) Create ¶
func (r *PtyService) Create(ctx context.Context, params PtyCreateParams, opts ...option.RequestOption) (res *Pty, err error)
Create creates a new PTY session.
func (*PtyService) Get ¶
func (r *PtyService) Get(ctx context.Context, ptyID string, query PtyGetParams, opts ...option.RequestOption) (res *Pty, err error)
Get retrieves a PTY session by ID.
func (*PtyService) List ¶
func (r *PtyService) List(ctx context.Context, query PtyListParams, opts ...option.RequestOption) (res *[]Pty, err error)
List returns all PTY sessions.
func (*PtyService) Remove ¶
func (r *PtyService) Remove(ctx context.Context, ptyID string, params PtyRemoveParams, opts ...option.RequestOption) (res *bool, err error)
Remove deletes a PTY session.
func (*PtyService) Update ¶
func (r *PtyService) Update(ctx context.Context, ptyID string, params PtyUpdateParams, opts ...option.RequestOption) (res *Pty, err error)
Update updates a PTY session.
type PtyUpdateParams ¶
type PtyUpdateParams struct {
Title param.Field[string] `json:"title"`
Size param.Field[PtyUpdateSize] `json:"size"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (PtyUpdateParams) MarshalJSON ¶
func (r PtyUpdateParams) MarshalJSON() (data []byte, err error)
func (PtyUpdateParams) URLQuery ¶
func (r PtyUpdateParams) URLQuery() (v url.Values)
type PtyUpdateSize ¶
type QuestionAnswer ¶
type QuestionAnswer = []string
type QuestionInfo ¶
type QuestionInfo struct {
Question string `json:"question,required"`
Header string `json:"header,required"`
Options []QuestionOption `json:"options,required"`
Multiple bool `json:"multiple"`
Custom bool `json:"custom"`
JSON questionInfoJSON `json:"-"`
}
func (*QuestionInfo) UnmarshalJSON ¶
func (r *QuestionInfo) UnmarshalJSON(data []byte) (err error)
type QuestionListParams ¶
type QuestionListParams struct {
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (QuestionListParams) URLQuery ¶
func (r QuestionListParams) URLQuery() (v url.Values)
URLQuery serializes QuestionListParams's query parameters as `url.Values`.
type QuestionOption ¶
type QuestionOption struct {
Label string `json:"label,required"`
Description string `json:"description,required"`
JSON questionOptionJSON `json:"-"`
}
func (*QuestionOption) UnmarshalJSON ¶
func (r *QuestionOption) UnmarshalJSON(data []byte) (err error)
type QuestionRejectParams ¶
type QuestionRejectParams struct {
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (QuestionRejectParams) URLQuery ¶
func (r QuestionRejectParams) URLQuery() (v url.Values)
URLQuery serializes QuestionRejectParams's query parameters as `url.Values`.
type QuestionRejected ¶
type QuestionRejected struct {
SessionID string `json:"sessionID,required"`
RequestID string `json:"requestID,required"`
JSON questionRejectedJSON `json:"-"`
}
func (*QuestionRejected) UnmarshalJSON ¶
func (r *QuestionRejected) UnmarshalJSON(data []byte) (err error)
type QuestionReplied ¶
type QuestionReplied struct {
SessionID string `json:"sessionID,required"`
RequestID string `json:"requestID,required"`
Answers []QuestionAnswer `json:"answers,required"`
JSON questionRepliedJSON `json:"-"`
}
func (*QuestionReplied) UnmarshalJSON ¶
func (r *QuestionReplied) UnmarshalJSON(data []byte) (err error)
type QuestionReplyParams ¶
type QuestionReplyParams struct {
Answers param.Field[[]QuestionAnswer] `json:"answers,required"`
Workspace param.Field[string] `query:"workspace"`
Directory param.Field[string] `query:"directory"`
}
func (QuestionReplyParams) MarshalJSON ¶
func (r QuestionReplyParams) MarshalJSON() (data []byte, err error)
func (QuestionReplyParams) URLQuery ¶
func (r QuestionReplyParams) URLQuery() (v url.Values)
URLQuery serializes QuestionReplyParams's query parameters as `url.Values`.
type QuestionRequest ¶
type QuestionRequest struct {
ID string `json:"id,required"`
SessionID string `json:"sessionID,required"`
Questions []QuestionInfo `json:"questions,required"`
Tool QuestionTool `json:"tool"`
JSON questionRequestJSON `json:"-"`
}
func (*QuestionRequest) UnmarshalJSON ¶
func (r *QuestionRequest) UnmarshalJSON(data []byte) (err error)
type QuestionService ¶
type QuestionService struct {
Options []option.RequestOption
}
QuestionService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQuestionService method instead.
func NewQuestionService ¶
func NewQuestionService(opts ...option.RequestOption) (r *QuestionService)
NewQuestionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*QuestionService) List ¶
func (r *QuestionService) List(ctx context.Context, query QuestionListParams, opts ...option.RequestOption) (res *[]QuestionRequest, err error)
List pending questions
func (*QuestionService) Reject ¶
func (r *QuestionService) Reject(ctx context.Context, requestID string, params QuestionRejectParams, opts ...option.RequestOption) (res *bool, err error)
Reject a question
func (*QuestionService) Reply ¶
func (r *QuestionService) Reply(ctx context.Context, requestID string, params QuestionReplyParams, opts ...option.RequestOption) (res *bool, err error)
Reply to a question
type QuestionTool ¶
type QuestionTool struct {
MessageID string `json:"messageID,required"`
CallID string `json:"callID,required"`
JSON questionToolJSON `json:"-"`
}
func (*QuestionTool) UnmarshalJSON ¶
func (r *QuestionTool) UnmarshalJSON(data []byte) (err error)
type ReasoningPart ¶
type ReasoningPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Text string `json:"text,required"`
Time ReasoningPartTime `json:"time,required"`
Type ReasoningPartType `json:"type,required"`
Metadata map[string]interface{} `json:"metadata"`
JSON reasoningPartJSON `json:"-"`
}
func (*ReasoningPart) UnmarshalJSON ¶
func (r *ReasoningPart) UnmarshalJSON(data []byte) (err error)
type ReasoningPartInputParam ¶
type ReasoningPartInputParam struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[ReasoningPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Time param.Field[ReasoningPartInputTimeParam] `json:"time"`
}
func (ReasoningPartInputParam) MarshalJSON ¶
func (r ReasoningPartInputParam) MarshalJSON() (data []byte, err error)
type ReasoningPartInputTimeParam ¶
type ReasoningPartInputTimeParam struct {
Start param.Field[float64] `json:"start,required"`
End param.Field[float64] `json:"end"`
}
func (ReasoningPartInputTimeParam) MarshalJSON ¶
func (r ReasoningPartInputTimeParam) MarshalJSON() (data []byte, err error)
type ReasoningPartInputType ¶
type ReasoningPartInputType string
const (
ReasoningPartInputTypeReasoning ReasoningPartInputType = "reasoning"
)
func (ReasoningPartInputType) IsKnown ¶
func (r ReasoningPartInputType) IsKnown() bool
type ReasoningPartTime ¶
type ReasoningPartTime struct {
Start float64 `json:"start,required"`
End float64 `json:"end"`
JSON reasoningPartTimeJSON `json:"-"`
}
func (*ReasoningPartTime) UnmarshalJSON ¶
func (r *ReasoningPartTime) UnmarshalJSON(data []byte) (err error)
type ReasoningPartType ¶
type ReasoningPartType string
const (
ReasoningPartTypeReasoning ReasoningPartType = "reasoning"
)
func (ReasoningPartType) IsKnown ¶
func (r ReasoningPartType) IsKnown() bool
type ResourceListParams ¶
type ResourceListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ResourceListParams) URLQuery ¶
func (r ResourceListParams) URLQuery() (v url.Values)
type ResourceService ¶
type ResourceService struct {
Options []option.RequestOption
}
func NewResourceService ¶
func NewResourceService(opts ...option.RequestOption) (r *ResourceService)
func (*ResourceService) List ¶
func (r *ResourceService) List(ctx context.Context, query ResourceListParams, opts ...option.RequestOption) (res *map[string]McpResource, err error)
List returns all MCP resources. Note: McpResource type is defined in mcp.go.
type ResourceSource ¶
type ResourceSource struct {
ClientName string `json:"clientName,required"`
Text FilePartSourceText `json:"text,required"`
Type ResourceSourceType `json:"type,required"`
URI string `json:"uri,required"`
JSON resourceSourceJSON `json:"-"`
}
func (*ResourceSource) UnmarshalJSON ¶
func (r *ResourceSource) UnmarshalJSON(data []byte) (err error)
type ResourceSourceParam ¶
type ResourceSourceParam struct {
ClientName param.Field[string] `json:"clientName,required"`
Text param.Field[FilePartSourceTextParam] `json:"text,required"`
Type param.Field[ResourceSourceType] `json:"type,required"`
URI param.Field[string] `json:"uri,required"`
}
func (ResourceSourceParam) MarshalJSON ¶
func (r ResourceSourceParam) MarshalJSON() (data []byte, err error)
type ResourceSourceType ¶
type ResourceSourceType string
const (
ResourceSourceTypeResource ResourceSourceType = "resource"
)
func (ResourceSourceType) IsKnown ¶
func (r ResourceSourceType) IsKnown() bool
type RetryPart ¶
type RetryPart struct {
ID string `json:"id,required"`
Attempt float64 `json:"attempt,required"`
Error RetryPartError `json:"error,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Time RetryPartTime `json:"time,required"`
Type RetryPartType `json:"type,required"`
JSON retryPartJSON `json:"-"`
}
func (*RetryPart) UnmarshalJSON ¶
type RetryPartError ¶
type RetryPartError struct {
Data RetryPartErrorData `json:"data,required"`
Name RetryPartErrorName `json:"name,required"`
JSON retryPartErrorJSON `json:"-"`
}
func (*RetryPartError) UnmarshalJSON ¶
func (r *RetryPartError) UnmarshalJSON(data []byte) (err error)
type RetryPartErrorData ¶
type RetryPartErrorData struct {
IsRetryable bool `json:"isRetryable,required"`
Message string `json:"message,required"`
Metadata map[string]string `json:"metadata"`
ResponseBody string `json:"responseBody"`
ResponseHeaders map[string]string `json:"responseHeaders"`
StatusCode float64 `json:"statusCode"`
JSON retryPartErrorDataJSON `json:"-"`
}
func (*RetryPartErrorData) UnmarshalJSON ¶
func (r *RetryPartErrorData) UnmarshalJSON(data []byte) (err error)
type RetryPartErrorName ¶
type RetryPartErrorName string
const (
RetryPartErrorNameAPIError RetryPartErrorName = "APIError"
)
func (RetryPartErrorName) IsKnown ¶
func (r RetryPartErrorName) IsKnown() bool
type RetryPartInputErrorDataParam ¶
type RetryPartInputErrorDataParam struct {
Message param.Field[string] `json:"message"`
IsRetryable param.Field[bool] `json:"isRetryable"`
Metadata param.Field[map[string]string] `json:"metadata"`
ResponseBody param.Field[string] `json:"responseBody"`
ResponseHeaders param.Field[map[string]string] `json:"responseHeaders"`
StatusCode param.Field[float64] `json:"statusCode"`
}
func (RetryPartInputErrorDataParam) MarshalJSON ¶
func (r RetryPartInputErrorDataParam) MarshalJSON() (data []byte, err error)
type RetryPartInputErrorParam ¶
type RetryPartInputErrorParam struct {
Data param.Field[RetryPartInputErrorDataParam] `json:"data"`
Name param.Field[string] `json:"name"`
}
func (RetryPartInputErrorParam) MarshalJSON ¶
func (r RetryPartInputErrorParam) MarshalJSON() (data []byte, err error)
type RetryPartInputParam ¶
type RetryPartInputParam struct {
Attempt param.Field[float64] `json:"attempt,required"`
Error param.Field[RetryPartInputErrorParam] `json:"error,required"`
Type param.Field[RetryPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Time param.Field[RetryPartInputTimeParam] `json:"time"`
}
func (RetryPartInputParam) MarshalJSON ¶
func (r RetryPartInputParam) MarshalJSON() (data []byte, err error)
type RetryPartInputTimeParam ¶
func (RetryPartInputTimeParam) MarshalJSON ¶
func (r RetryPartInputTimeParam) MarshalJSON() (data []byte, err error)
type RetryPartInputType ¶
type RetryPartInputType string
const (
RetryPartInputTypeRetry RetryPartInputType = "retry"
)
func (RetryPartInputType) IsKnown ¶
func (r RetryPartInputType) IsKnown() bool
type RetryPartTime ¶
type RetryPartTime struct {
Created float64 `json:"created,required"`
JSON retryPartTimeJSON `json:"-"`
}
func (*RetryPartTime) UnmarshalJSON ¶
func (r *RetryPartTime) UnmarshalJSON(data []byte) (err error)
type RetryPartType ¶
type RetryPartType string
const (
RetryPartTypeRetry RetryPartType = "retry"
)
func (RetryPartType) IsKnown ¶
func (r RetryPartType) IsKnown() bool
type ServerConfig ¶
type ServerConfig struct {
Port int64 `json:"port"`
Hostname string `json:"hostname"`
Mdns bool `json:"mdns"`
MdnsDomain string `json:"mdnsDomain"`
Cors []string `json:"cors"`
JSON serverConfigJSON `json:"-"`
}
ServerConfig represents the server configuration.
func (*ServerConfig) UnmarshalJSON ¶
func (r *ServerConfig) UnmarshalJSON(data []byte) (err error)
type Session ¶
type Session struct {
ID string `json:"id,required"`
Directory string `json:"directory,required"`
ProjectID string `json:"projectID,required"`
Slug string `json:"slug,required"`
Time SessionTime `json:"time,required"`
Title string `json:"title,required"`
Version string `json:"version,required"`
ParentID string `json:"parentID"`
Permission []PermissionRule `json:"permission"`
Revert *SessionRevert `json:"revert"`
Summary *SessionSummary `json:"summary"`
WorkspaceID string `json:"workspaceID"`
JSON sessionJSON `json:"-"`
}
func (*Session) UnmarshalJSON ¶
type SessionAbortParams ¶
type SessionAbortParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionAbortParams) URLQuery ¶
func (r SessionAbortParams) URLQuery() (v url.Values)
URLQuery serializes SessionAbortParams's query parameters as `url.Values`.
type SessionChildrenParams ¶
type SessionChildrenParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionChildrenParams) URLQuery ¶
func (r SessionChildrenParams) URLQuery() (v url.Values)
URLQuery serializes SessionChildrenParams's query parameters as `url.Values`.
type SessionCommandParams ¶
type SessionCommandParams struct {
Arguments param.Field[string] `json:"arguments,required"`
Command param.Field[string] `json:"command,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Agent param.Field[string] `json:"agent"`
MessageID param.Field[string] `json:"messageID"`
Model param.Field[string] `json:"model"`
Parts param.Field[[]SessionCommandParamsPart] `json:"parts"`
Variant param.Field[string] `json:"variant"`
}
func (SessionCommandParams) MarshalJSON ¶
func (r SessionCommandParams) MarshalJSON() (data []byte, err error)
func (SessionCommandParams) URLQuery ¶
func (r SessionCommandParams) URLQuery() (v url.Values)
URLQuery serializes SessionCommandParams's query parameters as `url.Values`.
type SessionCommandParamsPart ¶
type SessionCommandParamsPart = FilePartInputParam
SessionCommandParamsPart is the only part shape accepted by the command endpoint.
type SessionCommandResponse ¶
type SessionCommandResponse struct {
Info AssistantMessage `json:"info,required"`
Parts []Part `json:"parts,required"`
JSON sessionCommandResponseJSON `json:"-"`
}
func (*SessionCommandResponse) UnmarshalJSON ¶
func (r *SessionCommandResponse) UnmarshalJSON(data []byte) (err error)
type SessionDeleteMessageParams ¶
type SessionDeleteMessageParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionDeleteMessageParams) URLQuery ¶
func (r SessionDeleteMessageParams) URLQuery() (v url.Values)
URLQuery serializes SessionDeleteMessageParams's query parameters as `url.Values`.
type SessionDeleteParams ¶
type SessionDeleteParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionDeleteParams) URLQuery ¶
func (r SessionDeleteParams) URLQuery() (v url.Values)
URLQuery serializes SessionDeleteParams's query parameters as `url.Values`.
type SessionDeletePartParams ¶
type SessionDeletePartParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionDeletePartParams) URLQuery ¶
func (r SessionDeletePartParams) URLQuery() (v url.Values)
URLQuery serializes SessionDeletePartParams's query parameters as `url.Values`.
type SessionDiffParams ¶
type SessionDiffParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
MessageID param.Field[string] `query:"messageID"`
}
func (SessionDiffParams) URLQuery ¶
func (r SessionDiffParams) URLQuery() (v url.Values)
URLQuery serializes SessionDiffParams's query parameters as `url.Values`.
type SessionForkParams ¶
type SessionForkParams struct {
MessageID param.Field[string] `json:"messageID"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionForkParams) MarshalJSON ¶
func (r SessionForkParams) MarshalJSON() (data []byte, err error)
func (SessionForkParams) URLQuery ¶
func (r SessionForkParams) URLQuery() (v url.Values)
URLQuery serializes SessionForkParams's query parameters as `url.Values`.
type SessionGetParams ¶
type SessionGetParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionGetParams) URLQuery ¶
func (r SessionGetParams) URLQuery() (v url.Values)
URLQuery serializes SessionGetParams's query parameters as `url.Values`.
type SessionInitParams ¶
type SessionInitParams struct {
MessageID param.Field[string] `json:"messageID,required"`
ModelID param.Field[string] `json:"modelID,required"`
ProviderID param.Field[string] `json:"providerID,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionInitParams) MarshalJSON ¶
func (r SessionInitParams) MarshalJSON() (data []byte, err error)
func (SessionInitParams) URLQuery ¶
func (r SessionInitParams) URLQuery() (v url.Values)
URLQuery serializes SessionInitParams's query parameters as `url.Values`.
type SessionListParams ¶
type SessionListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Roots param.Field[bool] `query:"roots"`
Start param.Field[float64] `query:"start"`
Search param.Field[string] `query:"search"`
Limit param.Field[float64] `query:"limit"`
}
func (SessionListParams) URLQuery ¶
func (r SessionListParams) URLQuery() (v url.Values)
URLQuery serializes SessionListParams's query parameters as `url.Values`.
type SessionMessageParams ¶
type SessionMessageParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionMessageParams) URLQuery ¶
func (r SessionMessageParams) URLQuery() (v url.Values)
URLQuery serializes SessionMessageParams's query parameters as `url.Values`.
type SessionMessageResponse ¶
type SessionMessageResponse struct {
Info Message `json:"info,required"`
Parts []Part `json:"parts,required"`
JSON sessionMessageResponseJSON `json:"-"`
}
func (*SessionMessageResponse) UnmarshalJSON ¶
func (r *SessionMessageResponse) UnmarshalJSON(data []byte) (err error)
type SessionMessagesParams ¶
type SessionMessagesParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Limit param.Field[int64] `query:"limit"`
Before param.Field[string] `query:"before"`
}
func (SessionMessagesParams) URLQuery ¶
func (r SessionMessagesParams) URLQuery() (v url.Values)
URLQuery serializes SessionMessagesParams's query parameters as `url.Values`.
type SessionMessagesResponse ¶
type SessionMessagesResponse struct {
Info Message `json:"info,required"`
Parts []Part `json:"parts,required"`
JSON sessionMessagesResponseJSON `json:"-"`
}
func (*SessionMessagesResponse) UnmarshalJSON ¶
func (r *SessionMessagesResponse) UnmarshalJSON(data []byte) (err error)
type SessionNewParams ¶
type SessionNewParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
ParentID param.Field[string] `json:"parentID"`
Permission param.Field[[]PermissionRuleParam] `json:"permission"`
Title param.Field[string] `json:"title"`
WorkspaceID param.Field[string] `json:"workspaceID"`
}
func (SessionNewParams) MarshalJSON ¶
func (r SessionNewParams) MarshalJSON() (data []byte, err error)
func (SessionNewParams) URLQuery ¶
func (r SessionNewParams) URLQuery() (v url.Values)
URLQuery serializes SessionNewParams's query parameters as `url.Values`.
type SessionPermissionRespondParams ¶
type SessionPermissionRespondParams struct {
Response param.Field[SessionPermissionRespondParamsResponse] `json:"response,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionPermissionRespondParams) MarshalJSON ¶
func (r SessionPermissionRespondParams) MarshalJSON() (data []byte, err error)
func (SessionPermissionRespondParams) URLQuery ¶
func (r SessionPermissionRespondParams) URLQuery() (v url.Values)
URLQuery serializes SessionPermissionRespondParams's query parameters as `url.Values`.
type SessionPermissionRespondParamsResponse ¶
type SessionPermissionRespondParamsResponse string
const ( SessionPermissionRespondParamsResponseOnce SessionPermissionRespondParamsResponse = "once" SessionPermissionRespondParamsResponseAlways SessionPermissionRespondParamsResponse = "always" SessionPermissionRespondParamsResponseReject SessionPermissionRespondParamsResponse = "reject" )
func (SessionPermissionRespondParamsResponse) IsKnown ¶
func (r SessionPermissionRespondParamsResponse) IsKnown() bool
type SessionPermissionService ¶
type SessionPermissionService struct {
Options []option.RequestOption
}
SessionPermissionService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionPermissionService method instead.
func NewSessionPermissionService ¶
func NewSessionPermissionService(opts ...option.RequestOption) (r *SessionPermissionService)
NewSessionPermissionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SessionPermissionService) Respond
deprecated
func (r *SessionPermissionService) Respond(ctx context.Context, id string, permissionID string, params SessionPermissionRespondParams, opts ...option.RequestOption) (res *bool, err error)
Deprecated: Respond is a legacy compatibility route. Use PermissionService.Reply instead.
Respond to a permission request
type SessionPromptAsyncParams ¶
type SessionPromptAsyncParams struct {
Parts param.Field[[]SessionPromptParamsPartUnion] `json:"parts,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Agent param.Field[string] `json:"agent"`
Format param.Field[OutputFormatParam] `json:"format"`
MessageID param.Field[string] `json:"messageID"`
Model param.Field[SessionPromptParamsModel] `json:"model"`
NoReply param.Field[bool] `json:"noReply"`
System param.Field[string] `json:"system"`
Tools param.Field[map[string]bool] `json:"tools"`
Variant param.Field[string] `json:"variant"`
}
func (SessionPromptAsyncParams) MarshalJSON ¶
func (r SessionPromptAsyncParams) MarshalJSON() (data []byte, err error)
func (SessionPromptAsyncParams) URLQuery ¶
func (r SessionPromptAsyncParams) URLQuery() (v url.Values)
URLQuery serializes SessionPromptAsyncParams's query parameters as `url.Values`.
type SessionPromptParams ¶
type SessionPromptParams struct {
Parts param.Field[[]SessionPromptParamsPartUnion] `json:"parts,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Agent param.Field[string] `json:"agent"`
Format param.Field[OutputFormatParam] `json:"format"`
MessageID param.Field[string] `json:"messageID"`
Model param.Field[SessionPromptParamsModel] `json:"model"`
NoReply param.Field[bool] `json:"noReply"`
System param.Field[string] `json:"system"`
Tools param.Field[map[string]bool] `json:"tools"`
Variant param.Field[string] `json:"variant"`
}
func (SessionPromptParams) MarshalJSON ¶
func (r SessionPromptParams) MarshalJSON() (data []byte, err error)
func (SessionPromptParams) URLQuery ¶
func (r SessionPromptParams) URLQuery() (v url.Values)
URLQuery serializes SessionPromptParams's query parameters as `url.Values`.
type SessionPromptParamsModel ¶
type SessionPromptParamsModel struct {
ModelID param.Field[string] `json:"modelID,required"`
ProviderID param.Field[string] `json:"providerID,required"`
}
func (SessionPromptParamsModel) MarshalJSON ¶
func (r SessionPromptParamsModel) MarshalJSON() (data []byte, err error)
type SessionPromptParamsPart ¶
type SessionPromptParamsPart struct {
Type param.Field[SessionPromptParamsPartsType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Filename param.Field[string] `json:"filename"`
Metadata param.Field[interface{}] `json:"metadata"`
Mime param.Field[string] `json:"mime"`
Name param.Field[string] `json:"name"`
Source param.Field[interface{}] `json:"source"`
Synthetic param.Field[bool] `json:"synthetic"`
Text param.Field[string] `json:"text"`
Time param.Field[interface{}] `json:"time"`
URL param.Field[string] `json:"url"`
}
func (SessionPromptParamsPart) MarshalJSON ¶
func (r SessionPromptParamsPart) MarshalJSON() (data []byte, err error)
type SessionPromptParamsPartUnion ¶
type SessionPromptParamsPartUnion interface {
// contains filtered or unexported methods
}
Satisfied by TextPartInputParam, FilePartInputParam, AgentPartInputParam, SubtaskPartInputParam, SessionPromptParamsPart.
type SessionPromptParamsPartsType ¶
type SessionPromptParamsPartsType string
const ( SessionPromptParamsPartsTypeText SessionPromptParamsPartsType = "text" SessionPromptParamsPartsTypeFile SessionPromptParamsPartsType = "file" SessionPromptParamsPartsTypeAgent SessionPromptParamsPartsType = "agent" SessionPromptParamsPartsTypeSubtask SessionPromptParamsPartsType = "subtask" )
func (SessionPromptParamsPartsType) IsKnown ¶
func (r SessionPromptParamsPartsType) IsKnown() bool
type SessionPromptResponse ¶
type SessionPromptResponse struct {
Info AssistantMessage `json:"info,required"`
Parts []Part `json:"parts,required"`
JSON sessionPromptResponseJSON `json:"-"`
}
func (*SessionPromptResponse) UnmarshalJSON ¶
func (r *SessionPromptResponse) UnmarshalJSON(data []byte) (err error)
type SessionRevert ¶
type SessionRevert struct {
MessageID string `json:"messageID,required"`
Diff string `json:"diff"`
PartID string `json:"partID"`
Snapshot string `json:"snapshot"`
JSON sessionRevertJSON `json:"-"`
}
func (*SessionRevert) UnmarshalJSON ¶
func (r *SessionRevert) UnmarshalJSON(data []byte) (err error)
type SessionRevertParams ¶
type SessionRevertParams struct {
MessageID param.Field[string] `json:"messageID,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
PartID param.Field[string] `json:"partID"`
}
func (SessionRevertParams) MarshalJSON ¶
func (r SessionRevertParams) MarshalJSON() (data []byte, err error)
func (SessionRevertParams) URLQuery ¶
func (r SessionRevertParams) URLQuery() (v url.Values)
URLQuery serializes SessionRevertParams's query parameters as `url.Values`.
type SessionService ¶
type SessionService struct {
Options []option.RequestOption
Permissions *SessionPermissionService
}
SessionService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionService method instead.
func NewSessionService ¶
func NewSessionService(opts ...option.RequestOption) (r *SessionService)
NewSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SessionService) Abort ¶
func (r *SessionService) Abort(ctx context.Context, id string, query SessionAbortParams, opts ...option.RequestOption) (res *bool, err error)
Abort a session
func (*SessionService) Children ¶
func (r *SessionService) Children(ctx context.Context, id string, query SessionChildrenParams, opts ...option.RequestOption) (res *[]Session, err error)
Get a session's children
func (*SessionService) Command ¶
func (r *SessionService) Command(ctx context.Context, id string, params SessionCommandParams, opts ...option.RequestOption) (res *SessionCommandResponse, err error)
Send a new command to a session
func (*SessionService) Delete ¶
func (r *SessionService) Delete(ctx context.Context, id string, query SessionDeleteParams, opts ...option.RequestOption) (res *bool, err error)
Delete a session and all its data
func (*SessionService) DeleteMessage ¶
func (r *SessionService) DeleteMessage(ctx context.Context, id string, messageID string, query SessionDeleteMessageParams, opts ...option.RequestOption) (res *bool, err error)
Delete a message from a session
func (*SessionService) DeletePart ¶
func (r *SessionService) DeletePart(ctx context.Context, id string, messageID string, partID string, query SessionDeletePartParams, opts ...option.RequestOption) (res *bool, err error)
Delete a part
func (*SessionService) Diff ¶
func (r *SessionService) Diff(ctx context.Context, id string, query SessionDiffParams, opts ...option.RequestOption) (res *[]SnapshotFileDiff, err error)
Get a session's diff
func (*SessionService) Fork ¶
func (r *SessionService) Fork(ctx context.Context, id string, body SessionForkParams, opts ...option.RequestOption) (res *Session, err error)
Fork a session
func (*SessionService) Get ¶
func (r *SessionService) Get(ctx context.Context, id string, query SessionGetParams, opts ...option.RequestOption) (res *Session, err error)
Get session
func (*SessionService) Init ¶
func (r *SessionService) Init(ctx context.Context, id string, params SessionInitParams, opts ...option.RequestOption) (res *bool, err error)
Analyze the app and create an AGENTS.md file
func (*SessionService) List ¶
func (r *SessionService) List(ctx context.Context, query SessionListParams, opts ...option.RequestOption) (res *[]Session, err error)
List all sessions
func (*SessionService) Message ¶
func (r *SessionService) Message(ctx context.Context, id string, messageID string, query SessionMessageParams, opts ...option.RequestOption) (res *SessionMessageResponse, err error)
Get a message from a session
func (*SessionService) Messages ¶
func (r *SessionService) Messages(ctx context.Context, id string, query SessionMessagesParams, opts ...option.RequestOption) (res *[]SessionMessagesResponse, err error)
List messages for a session
func (*SessionService) New ¶
func (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *Session, err error)
Create a new session
func (*SessionService) Prompt ¶
func (r *SessionService) Prompt(ctx context.Context, id string, params SessionPromptParams, opts ...option.RequestOption) (res *SessionPromptResponse, err error)
Create and send a new message to a session
func (*SessionService) PromptAsync ¶
func (r *SessionService) PromptAsync(ctx context.Context, id string, params SessionPromptAsyncParams, opts ...option.RequestOption) (err error)
Send a new prompt to a session asynchronously.
func (*SessionService) Revert ¶
func (r *SessionService) Revert(ctx context.Context, id string, params SessionRevertParams, opts ...option.RequestOption) (res *Session, err error)
Revert a message
func (*SessionService) Share ¶
func (r *SessionService) Share(ctx context.Context, id string, query SessionShareParams, opts ...option.RequestOption) (res *Session, err error)
Share a session
func (*SessionService) Shell ¶
func (r *SessionService) Shell(ctx context.Context, id string, params SessionShellParams, opts ...option.RequestOption) (res *SessionShellResponse, err error)
Run a shell command
func (*SessionService) Status ¶
func (r *SessionService) Status(ctx context.Context, query SessionStatusParams, opts ...option.RequestOption) (res *map[string]SessionStatus, err error)
Get session status
func (*SessionService) Summarize ¶
func (r *SessionService) Summarize(ctx context.Context, id string, params SessionSummarizeParams, opts ...option.RequestOption) (res *bool, err error)
Summarize the session
func (*SessionService) Todo ¶
func (r *SessionService) Todo(ctx context.Context, id string, query SessionTodoParams, opts ...option.RequestOption) (res *[]Todo, err error)
Get a session's todos
func (*SessionService) Unrevert ¶
func (r *SessionService) Unrevert(ctx context.Context, id string, query SessionUnrevertParams, opts ...option.RequestOption) (res *Session, err error)
Restore all reverted messages
func (*SessionService) Unshare ¶
func (r *SessionService) Unshare(ctx context.Context, id string, query SessionUnshareParams, opts ...option.RequestOption) (res *Session, err error)
Unshare the session
func (*SessionService) Update ¶
func (r *SessionService) Update(ctx context.Context, id string, params SessionUpdateParams, opts ...option.RequestOption) (res *Session, err error)
Update session properties
func (*SessionService) UpdatePart ¶
func (r *SessionService) UpdatePart(ctx context.Context, id string, messageID string, partID string, params SessionUpdatePartParams, opts ...option.RequestOption) (res *Part, err error)
Update a part
type SessionShare ¶
type SessionShare struct {
}
func (*SessionShare) UnmarshalJSON ¶
func (r *SessionShare) UnmarshalJSON(data []byte) (err error)
type SessionShareParams ¶
type SessionShareParams struct {
}
func (SessionShareParams) URLQuery ¶
func (r SessionShareParams) URLQuery() (v url.Values)
URLQuery serializes SessionShareParams's query parameters as `url.Values`.
type SessionShellParams ¶
type SessionShellParams struct {
Agent param.Field[string] `json:"agent,required"`
Command param.Field[string] `json:"command,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
MessageID param.Field[string] `json:"messageID"`
Model param.Field[SessionShellParamsModel] `json:"model"`
}
func (SessionShellParams) MarshalJSON ¶
func (r SessionShellParams) MarshalJSON() (data []byte, err error)
func (SessionShellParams) URLQuery ¶
func (r SessionShellParams) URLQuery() (v url.Values)
URLQuery serializes SessionShellParams's query parameters as `url.Values`.
type SessionShellParamsModel ¶
type SessionShellParamsModel struct {
ProviderID param.Field[string] `json:"providerID,required"`
ModelID param.Field[string] `json:"modelID,required"`
}
func (SessionShellParamsModel) MarshalJSON ¶
func (r SessionShellParamsModel) MarshalJSON() (data []byte, err error)
type SessionShellResponse ¶
type SessionShellResponse struct {
Info Message `json:"info,required"`
Parts []Part `json:"parts,required"`
JSON sessionShellResponseJSON `json:"-"`
}
func (*SessionShellResponse) UnmarshalJSON ¶
func (r *SessionShellResponse) UnmarshalJSON(data []byte) (err error)
type SessionStatus ¶
type SessionStatus struct {
Type SessionStatusType `json:"type,required"`
// Attempt is the retry attempt number. Only present when Type is "retry".
Attempt float64 `json:"attempt"`
// Message is the retry reason. Only present when Type is "retry".
Message string `json:"message"`
// Next is the timestamp of the next retry. Only present when Type is "retry".
Next float64 `json:"next"`
JSON sessionStatusJSON `json:"-"`
}
SessionStatus represents the status of a session. This is a flattened union of three variants discriminated by Type:
- "idle": no additional fields
- "retry": Attempt, Message, and Next are populated (required per spec)
- "busy": no additional fields
func (*SessionStatus) UnmarshalJSON ¶
func (r *SessionStatus) UnmarshalJSON(data []byte) (err error)
type SessionStatusParams ¶
type SessionStatusParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionStatusParams) URLQuery ¶
func (r SessionStatusParams) URLQuery() (v url.Values)
URLQuery serializes SessionStatusParams's query parameters as `url.Values`.
type SessionStatusType ¶
type SessionStatusType string
const ( SessionStatusTypeIdle SessionStatusType = "idle" SessionStatusTypeRetry SessionStatusType = "retry" SessionStatusTypeBusy SessionStatusType = "busy" )
func (SessionStatusType) IsKnown ¶
func (r SessionStatusType) IsKnown() bool
type SessionSummarizeParams ¶
type SessionSummarizeParams struct {
ModelID param.Field[string] `json:"modelID,required"`
ProviderID param.Field[string] `json:"providerID,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Auto param.Field[bool] `json:"auto"`
}
func (SessionSummarizeParams) MarshalJSON ¶
func (r SessionSummarizeParams) MarshalJSON() (data []byte, err error)
func (SessionSummarizeParams) URLQuery ¶
func (r SessionSummarizeParams) URLQuery() (v url.Values)
URLQuery serializes SessionSummarizeParams's query parameters as `url.Values`.
type SessionSummary ¶
type SessionSummary struct {
Additions float64 `json:"additions,required"`
Deletions float64 `json:"deletions,required"`
Files float64 `json:"files,required"`
Diffs []SessionSummaryDiff `json:"diffs"`
JSON sessionSummaryJSON `json:"-"`
}
func (*SessionSummary) UnmarshalJSON ¶
func (r *SessionSummary) UnmarshalJSON(data []byte) (err error)
type SessionSummaryDiff ¶
type SessionSummaryDiff struct {
Additions float64 `json:"additions,required"`
Deletions float64 `json:"deletions,required"`
File string `json:"file,required"`
Patch string `json:"patch,required"`
Status SnapshotFileDiffStatus `json:"status"`
JSON sessionSummaryDiffJSON `json:"-"`
}
func (*SessionSummaryDiff) UnmarshalJSON ¶
func (r *SessionSummaryDiff) UnmarshalJSON(data []byte) (err error)
type SessionTime ¶
type SessionTime struct {
Created float64 `json:"created,required"`
Updated float64 `json:"updated,required"`
Archived float64 `json:"archived"`
Compacting float64 `json:"compacting"`
JSON sessionTimeJSON `json:"-"`
}
func (*SessionTime) UnmarshalJSON ¶
func (r *SessionTime) UnmarshalJSON(data []byte) (err error)
type SessionTodoParams ¶
type SessionTodoParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionTodoParams) URLQuery ¶
func (r SessionTodoParams) URLQuery() (v url.Values)
URLQuery serializes SessionTodoParams's query parameters as `url.Values`.
type SessionUnrevertParams ¶
type SessionUnrevertParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SessionUnrevertParams) URLQuery ¶
func (r SessionUnrevertParams) URLQuery() (v url.Values)
URLQuery serializes SessionUnrevertParams's query parameters as `url.Values`.
type SessionUnshareParams ¶
type SessionUnshareParams struct {
}
func (SessionUnshareParams) URLQuery ¶
func (r SessionUnshareParams) URLQuery() (v url.Values)
URLQuery serializes SessionUnshareParams's query parameters as `url.Values`.
type SessionUpdateParams ¶
type SessionUpdateParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Permission param.Field[[]PermissionRuleParam] `json:"permission"`
Time param.Field[SessionUpdateParamsTime] `json:"time"`
Title param.Field[string] `json:"title"`
}
func (SessionUpdateParams) MarshalJSON ¶
func (r SessionUpdateParams) MarshalJSON() (data []byte, err error)
func (SessionUpdateParams) URLQuery ¶
func (r SessionUpdateParams) URLQuery() (v url.Values)
URLQuery serializes SessionUpdateParams's query parameters as `url.Values`.
type SessionUpdateParamsTime ¶
func (SessionUpdateParamsTime) MarshalJSON ¶
func (r SessionUpdateParamsTime) MarshalJSON() (data []byte, err error)
type SessionUpdatePartBody ¶
type SessionUpdatePartBody interface {
// contains filtered or unexported methods
}
SessionUpdatePartBody is a param union for Part payloads sent to PATCH /session/{sessionID}/message/{messageID}/part/{partID}.
Satisfied by TextPartInputParam, FilePartInputParam, AgentPartInputParam, SubtaskPartInputParam, StepStartPartInputParam, StepFinishPartInputParam, SnapshotPartInputParam, PatchPartInputParam, ReasoningPartInputParam, CompactionPartInputParam, RetryPartInputParam, ToolPartInputParam.
type SessionUpdatePartParams ¶
type SessionUpdatePartParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
// Part is a typed union for the PATCH body. Use one of [TextPartInputParam],
// [FilePartInputParam], [AgentPartInputParam], or [SubtaskPartInputParam].
// For other Part types, use [opencode.Raw] with a JSON payload.
Part param.Field[SessionUpdatePartBody] `json:"-"`
}
func (SessionUpdatePartParams) MarshalJSON ¶
func (r SessionUpdatePartParams) MarshalJSON() (data []byte, err error)
func (SessionUpdatePartParams) URLQuery ¶
func (r SessionUpdatePartParams) URLQuery() (v url.Values)
URLQuery serializes SessionUpdatePartParams's query parameters as `url.Values`.
type SkillItem ¶
type SkillItem struct {
Name string `json:"name,required"`
Description string `json:"description,required"`
Location string `json:"location,required"`
Content string `json:"content,required"`
JSON skillItemJSON `json:"-"`
}
func (*SkillItem) UnmarshalJSON ¶
type SkillListParams ¶
type SkillListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SkillListParams) URLQuery ¶
func (r SkillListParams) URLQuery() (v url.Values)
type SkillService ¶
type SkillService struct {
Options []option.RequestOption
}
func NewSkillService ¶
func NewSkillService(opts ...option.RequestOption) (r *SkillService)
func (*SkillService) List ¶
func (r *SkillService) List(ctx context.Context, query SkillListParams, opts ...option.RequestOption) (res *[]SkillItem, err error)
type SnapshotFileDiff ¶
type SnapshotFileDiff struct {
Additions float64 `json:"additions,required"`
Deletions float64 `json:"deletions,required"`
File string `json:"file,required"`
Patch string `json:"patch,required"`
Status SnapshotFileDiffStatus `json:"status"`
JSON snapshotFileDiffJSON `json:"-"`
}
func (*SnapshotFileDiff) UnmarshalJSON ¶
func (r *SnapshotFileDiff) UnmarshalJSON(data []byte) (err error)
type SnapshotFileDiffStatus ¶
type SnapshotFileDiffStatus string
const ( SnapshotFileDiffStatusAdded SnapshotFileDiffStatus = "added" SnapshotFileDiffStatusDeleted SnapshotFileDiffStatus = "deleted" SnapshotFileDiffStatusModified SnapshotFileDiffStatus = "modified" )
func (SnapshotFileDiffStatus) IsKnown ¶
func (r SnapshotFileDiffStatus) IsKnown() bool
type SnapshotPart ¶
type SnapshotPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Snapshot string `json:"snapshot,required"`
Type SnapshotPartType `json:"type,required"`
JSON snapshotPartJSON `json:"-"`
}
func (*SnapshotPart) UnmarshalJSON ¶
func (r *SnapshotPart) UnmarshalJSON(data []byte) (err error)
type SnapshotPartInputParam ¶
type SnapshotPartInputParam struct {
Snapshot param.Field[string] `json:"snapshot,required"`
Type param.Field[SnapshotPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
}
func (SnapshotPartInputParam) MarshalJSON ¶
func (r SnapshotPartInputParam) MarshalJSON() (data []byte, err error)
type SnapshotPartInputType ¶
type SnapshotPartInputType string
const (
SnapshotPartInputTypeSnapshot SnapshotPartInputType = "snapshot"
)
func (SnapshotPartInputType) IsKnown ¶
func (r SnapshotPartInputType) IsKnown() bool
type SnapshotPartType ¶
type SnapshotPartType string
const (
SnapshotPartTypeSnapshot SnapshotPartType = "snapshot"
)
func (SnapshotPartType) IsKnown ¶
func (r SnapshotPartType) IsKnown() bool
type StepFinishPart ¶
type StepFinishPart struct {
ID string `json:"id,required"`
Cost float64 `json:"cost,required"`
MessageID string `json:"messageID,required"`
Reason string `json:"reason,required"`
SessionID string `json:"sessionID,required"`
Tokens StepFinishPartTokens `json:"tokens,required"`
Type StepFinishPartType `json:"type,required"`
Snapshot string `json:"snapshot"`
JSON stepFinishPartJSON `json:"-"`
}
func (*StepFinishPart) UnmarshalJSON ¶
func (r *StepFinishPart) UnmarshalJSON(data []byte) (err error)
type StepFinishPartInputParam ¶
type StepFinishPartInputParam struct {
Cost param.Field[float64] `json:"cost,required"`
Reason param.Field[string] `json:"reason,required"`
Tokens param.Field[StepFinishPartInputTokensParam] `json:"tokens,required"`
Type param.Field[StepFinishPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Snapshot param.Field[string] `json:"snapshot"`
}
func (StepFinishPartInputParam) MarshalJSON ¶
func (r StepFinishPartInputParam) MarshalJSON() (data []byte, err error)
type StepFinishPartInputTokensCacheParam ¶
type StepFinishPartInputTokensCacheParam struct {
Read param.Field[float64] `json:"read"`
Write param.Field[float64] `json:"write"`
}
func (StepFinishPartInputTokensCacheParam) MarshalJSON ¶
func (r StepFinishPartInputTokensCacheParam) MarshalJSON() (data []byte, err error)
type StepFinishPartInputTokensParam ¶
type StepFinishPartInputTokensParam struct {
Input param.Field[float64] `json:"input,required"`
Output param.Field[float64] `json:"output,required"`
Reasoning param.Field[float64] `json:"reasoning,required"`
Total param.Field[float64] `json:"total,required"`
Cache param.Field[StepFinishPartInputTokensCacheParam] `json:"cache"`
}
func (StepFinishPartInputTokensParam) MarshalJSON ¶
func (r StepFinishPartInputTokensParam) MarshalJSON() (data []byte, err error)
type StepFinishPartInputType ¶
type StepFinishPartInputType string
const (
StepFinishPartInputTypeStepFinish StepFinishPartInputType = "step-finish"
)
func (StepFinishPartInputType) IsKnown ¶
func (r StepFinishPartInputType) IsKnown() bool
type StepFinishPartTokens ¶
type StepFinishPartTokens struct {
Cache StepFinishPartTokensCache `json:"cache,required"`
Input float64 `json:"input,required"`
Output float64 `json:"output,required"`
Reasoning float64 `json:"reasoning,required"`
Total float64 `json:"total"`
JSON stepFinishPartTokensJSON `json:"-"`
}
func (*StepFinishPartTokens) UnmarshalJSON ¶
func (r *StepFinishPartTokens) UnmarshalJSON(data []byte) (err error)
type StepFinishPartTokensCache ¶
type StepFinishPartTokensCache struct {
Read float64 `json:"read,required"`
Write float64 `json:"write,required"`
JSON stepFinishPartTokensCacheJSON `json:"-"`
}
func (*StepFinishPartTokensCache) UnmarshalJSON ¶
func (r *StepFinishPartTokensCache) UnmarshalJSON(data []byte) (err error)
type StepFinishPartType ¶
type StepFinishPartType string
const (
StepFinishPartTypeStepFinish StepFinishPartType = "step-finish"
)
func (StepFinishPartType) IsKnown ¶
func (r StepFinishPartType) IsKnown() bool
type StepStartPart ¶
type StepStartPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Type StepStartPartType `json:"type,required"`
Snapshot string `json:"snapshot"`
JSON stepStartPartJSON `json:"-"`
}
func (*StepStartPart) UnmarshalJSON ¶
func (r *StepStartPart) UnmarshalJSON(data []byte) (err error)
type StepStartPartInputParam ¶
type StepStartPartInputParam struct {
Type param.Field[StepStartPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Snapshot param.Field[string] `json:"snapshot"`
}
func (StepStartPartInputParam) MarshalJSON ¶
func (r StepStartPartInputParam) MarshalJSON() (data []byte, err error)
type StepStartPartInputType ¶
type StepStartPartInputType string
const (
StepStartPartInputTypeStepStart StepStartPartInputType = "step-start"
)
func (StepStartPartInputType) IsKnown ¶
func (r StepStartPartInputType) IsKnown() bool
type StepStartPartType ¶
type StepStartPartType string
const (
StepStartPartTypeStepStart StepStartPartType = "step-start"
)
func (StepStartPartType) IsKnown ¶
func (r StepStartPartType) IsKnown() bool
type SubtaskPart ¶
type SubtaskPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
Prompt string `json:"prompt,required"`
SessionID string `json:"sessionID,required"`
Type SubtaskPartType `json:"type,required"`
Description string `json:"description,required"`
Agent string `json:"agent,required"`
Command string `json:"command"`
Model SubtaskPartModel `json:"model"`
JSON subtaskPartJSON `json:"-"`
}
func (*SubtaskPart) UnmarshalJSON ¶
func (r *SubtaskPart) UnmarshalJSON(data []byte) (err error)
type SubtaskPartInputModelParam ¶
type SubtaskPartInputModelParam struct {
ProviderID param.Field[string] `json:"providerID,required"`
ModelID param.Field[string] `json:"modelID,required"`
}
func (SubtaskPartInputModelParam) MarshalJSON ¶
func (r SubtaskPartInputModelParam) MarshalJSON() (data []byte, err error)
type SubtaskPartInputParam ¶
type SubtaskPartInputParam struct {
Prompt param.Field[string] `json:"prompt,required"`
Description param.Field[string] `json:"description,required"`
Agent param.Field[string] `json:"agent,required"`
Type param.Field[SubtaskPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Model param.Field[SubtaskPartInputModelParam] `json:"model"`
Command param.Field[string] `json:"command"`
}
func (SubtaskPartInputParam) MarshalJSON ¶
func (r SubtaskPartInputParam) MarshalJSON() (data []byte, err error)
type SubtaskPartInputType ¶
type SubtaskPartInputType string
const (
SubtaskPartInputTypeSubtask SubtaskPartInputType = "subtask"
)
func (SubtaskPartInputType) IsKnown ¶
func (r SubtaskPartInputType) IsKnown() bool
type SubtaskPartModel ¶
type SubtaskPartModel struct {
ProviderID string `json:"providerID,required"`
ModelID string `json:"modelID,required"`
JSON subtaskPartModelJSON `json:"-"`
}
func (*SubtaskPartModel) UnmarshalJSON ¶
func (r *SubtaskPartModel) UnmarshalJSON(data []byte) (err error)
type SubtaskPartType ¶
type SubtaskPartType string
const (
SubtaskPartTypeSubtask SubtaskPartType = "subtask"
)
func (SubtaskPartType) IsKnown ¶
func (r SubtaskPartType) IsKnown() bool
type Symbol ¶
type Symbol struct {
Kind float64 `json:"kind,required"`
Location SymbolLocation `json:"location,required"`
Name string `json:"name,required"`
JSON symbolJSON `json:"-"`
}
func (*Symbol) UnmarshalJSON ¶
type SymbolLocation ¶
type SymbolLocation struct {
Range SymbolLocationRange `json:"range,required"`
Uri string `json:"uri,required"`
JSON symbolLocationJSON `json:"-"`
}
func (*SymbolLocation) UnmarshalJSON ¶
func (r *SymbolLocation) UnmarshalJSON(data []byte) (err error)
type SymbolLocationRange ¶
type SymbolLocationRange struct {
End SymbolLocationRangeEnd `json:"end,required"`
Start SymbolLocationRangeStart `json:"start,required"`
JSON symbolLocationRangeJSON `json:"-"`
}
func (*SymbolLocationRange) UnmarshalJSON ¶
func (r *SymbolLocationRange) UnmarshalJSON(data []byte) (err error)
type SymbolLocationRangeEnd ¶
type SymbolLocationRangeEnd struct {
Character float64 `json:"character,required"`
Line float64 `json:"line,required"`
JSON symbolLocationRangeEndJSON `json:"-"`
}
func (*SymbolLocationRangeEnd) UnmarshalJSON ¶
func (r *SymbolLocationRangeEnd) UnmarshalJSON(data []byte) (err error)
type SymbolLocationRangeStart ¶
type SymbolLocationRangeStart struct {
Character float64 `json:"character,required"`
Line float64 `json:"line,required"`
JSON symbolLocationRangeStartJSON `json:"-"`
}
func (*SymbolLocationRangeStart) UnmarshalJSON ¶
func (r *SymbolLocationRangeStart) UnmarshalJSON(data []byte) (err error)
type SymbolSource ¶
type SymbolSource struct {
Kind int64 `json:"kind,required"`
Name string `json:"name,required"`
Path string `json:"path,required"`
Range SymbolSourceRange `json:"range,required"`
Text FilePartSourceText `json:"text,required"`
Type SymbolSourceType `json:"type,required"`
JSON symbolSourceJSON `json:"-"`
}
func (*SymbolSource) UnmarshalJSON ¶
func (r *SymbolSource) UnmarshalJSON(data []byte) (err error)
type SymbolSourceParam ¶
type SymbolSourceParam struct {
Kind param.Field[int64] `json:"kind,required"`
Name param.Field[string] `json:"name,required"`
Path param.Field[string] `json:"path,required"`
Range param.Field[SymbolSourceRangeParam] `json:"range,required"`
Text param.Field[FilePartSourceTextParam] `json:"text,required"`
Type param.Field[SymbolSourceType] `json:"type,required"`
}
func (SymbolSourceParam) MarshalJSON ¶
func (r SymbolSourceParam) MarshalJSON() (data []byte, err error)
type SymbolSourceRange ¶
type SymbolSourceRange struct {
End SymbolSourceRangeEnd `json:"end,required"`
Start SymbolSourceRangeStart `json:"start,required"`
JSON symbolSourceRangeJSON `json:"-"`
}
func (*SymbolSourceRange) UnmarshalJSON ¶
func (r *SymbolSourceRange) UnmarshalJSON(data []byte) (err error)
type SymbolSourceRangeEnd ¶
type SymbolSourceRangeEnd struct {
Character float64 `json:"character,required"`
Line float64 `json:"line,required"`
JSON symbolSourceRangeEndJSON `json:"-"`
}
func (*SymbolSourceRangeEnd) UnmarshalJSON ¶
func (r *SymbolSourceRangeEnd) UnmarshalJSON(data []byte) (err error)
type SymbolSourceRangeEndParam ¶
type SymbolSourceRangeEndParam struct {
Character param.Field[float64] `json:"character,required"`
Line param.Field[float64] `json:"line,required"`
}
func (SymbolSourceRangeEndParam) MarshalJSON ¶
func (r SymbolSourceRangeEndParam) MarshalJSON() (data []byte, err error)
type SymbolSourceRangeParam ¶
type SymbolSourceRangeParam struct {
End param.Field[SymbolSourceRangeEndParam] `json:"end,required"`
Start param.Field[SymbolSourceRangeStartParam] `json:"start,required"`
}
func (SymbolSourceRangeParam) MarshalJSON ¶
func (r SymbolSourceRangeParam) MarshalJSON() (data []byte, err error)
type SymbolSourceRangeStart ¶
type SymbolSourceRangeStart struct {
Character float64 `json:"character,required"`
Line float64 `json:"line,required"`
JSON symbolSourceRangeStartJSON `json:"-"`
}
func (*SymbolSourceRangeStart) UnmarshalJSON ¶
func (r *SymbolSourceRangeStart) UnmarshalJSON(data []byte) (err error)
type SymbolSourceRangeStartParam ¶
type SymbolSourceRangeStartParam struct {
Character param.Field[float64] `json:"character,required"`
Line param.Field[float64] `json:"line,required"`
}
func (SymbolSourceRangeStartParam) MarshalJSON ¶
func (r SymbolSourceRangeStartParam) MarshalJSON() (data []byte, err error)
type SymbolSourceType ¶
type SymbolSourceType string
const (
SymbolSourceTypeSymbol SymbolSourceType = "symbol"
)
func (SymbolSourceType) IsKnown ¶
func (r SymbolSourceType) IsKnown() bool
type SyncEvent ¶
type SyncEvent struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data interface{} `json:"data,required"`
JSON syncEventJSON `json:"-"`
// contains filtered or unexported fields
}
func (SyncEvent) AsUnion ¶
func (r SyncEvent) AsUnion() SyncEventUnion
func (*SyncEvent) UnmarshalJSON ¶
type SyncEventMessagePartRemoved ¶
type SyncEventMessagePartRemoved struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data EventListResponseEventMessagePartRemovedProperties `json:"data,required"`
JSON syncEventMessagePartRemovedJSON `json:"-"`
}
func (*SyncEventMessagePartRemoved) UnmarshalJSON ¶
func (r *SyncEventMessagePartRemoved) UnmarshalJSON(data []byte) (err error)
type SyncEventMessagePartUpdated ¶
type SyncEventMessagePartUpdated struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data EventListResponseEventMessagePartUpdatedProperties `json:"data,required"`
JSON syncEventMessagePartUpdatedJSON `json:"-"`
}
func (*SyncEventMessagePartUpdated) UnmarshalJSON ¶
func (r *SyncEventMessagePartUpdated) UnmarshalJSON(data []byte) (err error)
type SyncEventMessageRemoved ¶
type SyncEventMessageRemoved struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data EventListResponseEventMessageRemovedProperties `json:"data,required"`
JSON syncEventMessageRemovedJSON `json:"-"`
}
func (*SyncEventMessageRemoved) UnmarshalJSON ¶
func (r *SyncEventMessageRemoved) UnmarshalJSON(data []byte) (err error)
type SyncEventMessageUpdated ¶
type SyncEventMessageUpdated struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data EventListResponseEventMessageUpdatedProperties `json:"data,required"`
JSON syncEventMessageUpdatedJSON `json:"-"`
}
func (*SyncEventMessageUpdated) UnmarshalJSON ¶
func (r *SyncEventMessageUpdated) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionCreated ¶
type SyncEventSessionCreated struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data EventListResponseEventSessionCreatedProperties `json:"data,required"`
JSON syncEventSessionCreatedJSON `json:"-"`
}
func (*SyncEventSessionCreated) UnmarshalJSON ¶
func (r *SyncEventSessionCreated) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionDeleted ¶
type SyncEventSessionDeleted struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data EventListResponseEventSessionDeletedProperties `json:"data,required"`
JSON syncEventSessionDeletedJSON `json:"-"`
}
func (*SyncEventSessionDeleted) UnmarshalJSON ¶
func (r *SyncEventSessionDeleted) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdated ¶
type SyncEventSessionUpdated struct {
Type SyncEventType `json:"type,required"`
Name string `json:"name,required"`
ID string `json:"id,required"`
Seq float64 `json:"seq,required"`
AggregateID string `json:"aggregateID,required"`
Data SyncEventSessionUpdatedData `json:"data,required"`
JSON syncEventSessionUpdatedJSON `json:"-"`
}
func (*SyncEventSessionUpdated) UnmarshalJSON ¶
func (r *SyncEventSessionUpdated) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdatedData ¶
type SyncEventSessionUpdatedData struct {
SessionID string `json:"sessionID,required"`
Info SyncEventSessionUpdatedDataInfo `json:"info,required"`
JSON syncEventSessionUpdatedDataJSON `json:"-"`
}
func (*SyncEventSessionUpdatedData) UnmarshalJSON ¶
func (r *SyncEventSessionUpdatedData) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdatedDataInfo ¶
type SyncEventSessionUpdatedDataInfo struct {
ID *string `json:"id,required"`
Slug *string `json:"slug,required"`
ProjectID *string `json:"projectID,required"`
WorkspaceID *string `json:"workspaceID,required"`
Directory *string `json:"directory,required"`
ParentID *string `json:"parentID,required"`
Summary *SyncEventSessionUpdatedDataInfoSummary `json:"summary,required"`
Title *string `json:"title,required"`
Version *string `json:"version,required"`
Time SyncEventSessionUpdatedDataInfoTime `json:"time"`
Permission *[]PermissionRule `json:"permission,required"`
Revert *SyncEventSessionUpdatedDataInfoRevert `json:"revert,required"`
JSON syncEventSessionUpdatedDataInfoJSON `json:"-"`
}
func (*SyncEventSessionUpdatedDataInfo) UnmarshalJSON ¶
func (r *SyncEventSessionUpdatedDataInfo) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdatedDataInfoRevert ¶
type SyncEventSessionUpdatedDataInfoRevert struct {
MessageID *string `json:"messageID,required"`
PartID *string `json:"partID"`
Snapshot *string `json:"snapshot"`
Diff *string `json:"diff"`
JSON syncEventSessionUpdatedDataInfoRevertJSON `json:"-"`
}
func (*SyncEventSessionUpdatedDataInfoRevert) UnmarshalJSON ¶
func (r *SyncEventSessionUpdatedDataInfoRevert) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdatedDataInfoShare ¶
type SyncEventSessionUpdatedDataInfoShare struct {
}
func (*SyncEventSessionUpdatedDataInfoShare) UnmarshalJSON ¶
func (r *SyncEventSessionUpdatedDataInfoShare) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdatedDataInfoSummary ¶
type SyncEventSessionUpdatedDataInfoSummary struct {
Additions *float64 `json:"additions,required"`
Deletions *float64 `json:"deletions,required"`
Files *float64 `json:"files,required"`
Diffs []SnapshotFileDiff `json:"diffs"`
JSON syncEventSessionUpdatedDataInfoSummaryJSON `json:"-"`
}
func (*SyncEventSessionUpdatedDataInfoSummary) UnmarshalJSON ¶
func (r *SyncEventSessionUpdatedDataInfoSummary) UnmarshalJSON(data []byte) (err error)
type SyncEventSessionUpdatedDataInfoTime ¶
type SyncEventSessionUpdatedDataInfoTime struct {
Created *float64 `json:"created,required"`
Updated *float64 `json:"updated,required"`
Compacting *float64 `json:"compacting,required"`
Archived *float64 `json:"archived,required"`
JSON syncEventSessionUpdatedDataInfoTimeJSON `json:"-"`
}
func (*SyncEventSessionUpdatedDataInfoTime) UnmarshalJSON ¶
func (r *SyncEventSessionUpdatedDataInfoTime) UnmarshalJSON(data []byte) (err error)
type SyncEventType ¶
type SyncEventType string
const (
SyncEventTypeSync SyncEventType = "sync"
)
func (SyncEventType) IsKnown ¶
func (r SyncEventType) IsKnown() bool
type SyncEventUnion ¶
type SyncEventUnion interface {
// contains filtered or unexported methods
}
type SyncHistoryEvent ¶
type SyncHistoryEvent struct {
ID string `json:"id,required"`
AggregateID string `json:"aggregate_id,required"`
Seq float64 `json:"seq,required"`
Type string `json:"type,required"`
Data map[string]interface{} `json:"data,required"`
JSON syncHistoryEventJSON `json:"-"`
}
func (*SyncHistoryEvent) UnmarshalJSON ¶
func (r *SyncHistoryEvent) UnmarshalJSON(data []byte) (err error)
type SyncHistoryParams ¶
type SyncHistoryParams struct {
Body param.Field[map[string]int64] `json:"-"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SyncHistoryParams) MarshalJSON ¶
func (r SyncHistoryParams) MarshalJSON() (data []byte, err error)
func (SyncHistoryParams) URLQuery ¶
func (r SyncHistoryParams) URLQuery() (v url.Values)
type SyncReplayEvent ¶
type SyncReplayParams ¶
type SyncReplayParams struct {
// Directory is the target directory for the replay (body field).
Directory param.Field[string] `json:"directory,required"`
Events param.Field[[]SyncReplayEvent] `json:"events,required"`
// QueryDirectory is the optional project directory context (query parameter).
QueryDirectory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SyncReplayParams) MarshalJSON ¶
func (r SyncReplayParams) MarshalJSON() (data []byte, err error)
func (SyncReplayParams) URLQuery ¶
func (r SyncReplayParams) URLQuery() (v url.Values)
type SyncReplayResponse ¶
type SyncReplayResponse struct {
SessionID string `json:"sessionID,required"`
JSON syncReplayResponseJSON `json:"-"`
}
func (*SyncReplayResponse) UnmarshalJSON ¶
func (r *SyncReplayResponse) UnmarshalJSON(data []byte) (err error)
type SyncService ¶
type SyncService struct {
Options []option.RequestOption
}
func NewSyncService ¶
func NewSyncService(opts ...option.RequestOption) (r *SyncService)
func (*SyncService) History ¶
func (r *SyncService) History(ctx context.Context, params SyncHistoryParams, opts ...option.RequestOption) (res *[]SyncHistoryEvent, err error)
func (*SyncService) Replay ¶
func (r *SyncService) Replay(ctx context.Context, params SyncReplayParams, opts ...option.RequestOption) (res *SyncReplayResponse, err error)
func (*SyncService) Start ¶
func (r *SyncService) Start(ctx context.Context, params SyncStartParams, opts ...option.RequestOption) (res *bool, err error)
type SyncStartParams ¶
type SyncStartParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (SyncStartParams) URLQuery ¶
func (r SyncStartParams) URLQuery() (v url.Values)
type TextPart ¶
type TextPart struct {
ID string `json:"id,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
Text string `json:"text,required"`
Type TextPartType `json:"type,required"`
Ignored bool `json:"ignored"`
Metadata map[string]interface{} `json:"metadata"`
Synthetic bool `json:"synthetic"`
Time TextPartTime `json:"time"`
JSON textPartJSON `json:"-"`
}
func (*TextPart) UnmarshalJSON ¶
type TextPartInputParam ¶
type TextPartInputParam struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[TextPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Ignored param.Field[bool] `json:"ignored"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Synthetic param.Field[bool] `json:"synthetic"`
Time param.Field[TextPartInputTimeParam] `json:"time"`
}
func (TextPartInputParam) MarshalJSON ¶
func (r TextPartInputParam) MarshalJSON() (data []byte, err error)
type TextPartInputTimeParam ¶
type TextPartInputTimeParam struct {
Start param.Field[float64] `json:"start,required"`
End param.Field[float64] `json:"end"`
}
func (TextPartInputTimeParam) MarshalJSON ¶
func (r TextPartInputTimeParam) MarshalJSON() (data []byte, err error)
type TextPartInputType ¶
type TextPartInputType string
const (
TextPartInputTypeText TextPartInputType = "text"
)
func (TextPartInputType) IsKnown ¶
func (r TextPartInputType) IsKnown() bool
type TextPartTime ¶
type TextPartTime struct {
Start float64 `json:"start,required"`
End float64 `json:"end"`
JSON textPartTimeJSON `json:"-"`
}
func (*TextPartTime) UnmarshalJSON ¶
func (r *TextPartTime) UnmarshalJSON(data []byte) (err error)
type TextPartType ¶
type TextPartType string
const (
TextPartTypeText TextPartType = "text"
)
func (TextPartType) IsKnown ¶
func (r TextPartType) IsKnown() bool
type Todo ¶
type Todo struct {
Content string `json:"content,required"`
Priority string `json:"priority,required"`
Status string `json:"status,required"`
JSON todoJSON `json:"-"`
}
func (*Todo) UnmarshalJSON ¶
type ToolIDsParams ¶
type ToolIDsParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ToolIDsParams) URLQuery ¶
func (r ToolIDsParams) URLQuery() (v url.Values)
type ToolListItem ¶
type ToolListItem struct {
ID string `json:"id,required"`
Description string `json:"description,required"`
Parameters interface{} `json:"parameters,required"`
JSON toolListItemJSON `json:"-"`
}
func (*ToolListItem) UnmarshalJSON ¶
func (r *ToolListItem) UnmarshalJSON(data []byte) (err error)
type ToolListParams ¶
type ToolListParams struct {
Provider param.Field[string] `query:"provider,required"`
Model param.Field[string] `query:"model,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (ToolListParams) URLQuery ¶
func (r ToolListParams) URLQuery() (v url.Values)
type ToolPart ¶
type ToolPart struct {
ID string `json:"id,required"`
CallID string `json:"callID,required"`
MessageID string `json:"messageID,required"`
SessionID string `json:"sessionID,required"`
State ToolPartState `json:"state,required"`
Tool string `json:"tool,required"`
Type ToolPartType `json:"type,required"`
Metadata map[string]interface{} `json:"metadata"`
JSON toolPartJSON `json:"-"`
}
func (*ToolPart) UnmarshalJSON ¶
type ToolPartInputParam ¶
type ToolPartInputParam struct {
CallID param.Field[string] `json:"callID,required"`
State param.Field[ToolPartInputStateUnionParam] `json:"state,required"`
Tool param.Field[string] `json:"tool,required"`
Type param.Field[ToolPartInputType] `json:"type,required"`
ID param.Field[string] `json:"id"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
}
func (ToolPartInputParam) MarshalJSON ¶
func (r ToolPartInputParam) MarshalJSON() (data []byte, err error)
type ToolPartInputStateUnionParam ¶
type ToolPartInputStateUnionParam interface {
// contains filtered or unexported methods
}
Union interface for tool state input
type ToolPartInputType ¶
type ToolPartInputType string
const (
ToolPartInputTypeTool ToolPartInputType = "tool"
)
func (ToolPartInputType) IsKnown ¶
func (r ToolPartInputType) IsKnown() bool
type ToolPartState ¶
type ToolPartState struct {
Status ToolPartStateStatus `json:"status,required"`
// This field can have the runtime type of [[]FilePart].
Attachments interface{} `json:"attachments"`
Error string `json:"error"`
// This field can have the runtime type of [map[string]interface{}].
Input interface{} `json:"input"`
// This field can have the runtime type of [map[string]interface{}].
Metadata interface{} `json:"metadata"`
Output string `json:"output"`
// This field can have the runtime type of [ToolStateRunningTime],
// [ToolStateCompletedTime], [ToolStateErrorTime].
Time interface{} `json:"time"`
Title string `json:"title"`
JSON toolPartStateJSON `json:"-"`
// contains filtered or unexported fields
}
func (ToolPartState) AsUnion ¶
func (r ToolPartState) AsUnion() ToolPartStateUnion
AsUnion returns a ToolPartStateUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ToolStatePending, ToolStateRunning, ToolStateCompleted, ToolStateError.
func (*ToolPartState) UnmarshalJSON ¶
func (r *ToolPartState) UnmarshalJSON(data []byte) (err error)
type ToolPartStateStatus ¶
type ToolPartStateStatus string
const ( ToolPartStateStatusPending ToolPartStateStatus = "pending" ToolPartStateStatusRunning ToolPartStateStatus = "running" ToolPartStateStatusCompleted ToolPartStateStatus = "completed" ToolPartStateStatusError ToolPartStateStatus = "error" )
func (ToolPartStateStatus) IsKnown ¶
func (r ToolPartStateStatus) IsKnown() bool
type ToolPartStateUnion ¶
type ToolPartStateUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ToolStatePending, ToolStateRunning, ToolStateCompleted or ToolStateError.
type ToolPartType ¶
type ToolPartType string
const (
ToolPartTypeTool ToolPartType = "tool"
)
func (ToolPartType) IsKnown ¶
func (r ToolPartType) IsKnown() bool
type ToolService ¶
type ToolService struct {
Options []option.RequestOption
}
func NewToolService ¶
func NewToolService(opts ...option.RequestOption) (r *ToolService)
func (*ToolService) IDs ¶
func (r *ToolService) IDs(ctx context.Context, query ToolIDsParams, opts ...option.RequestOption) (res *[]string, err error)
func (*ToolService) List ¶
func (r *ToolService) List(ctx context.Context, query ToolListParams, opts ...option.RequestOption) (res *[]ToolListItem, err error)
type ToolStateCompleted ¶
type ToolStateCompleted struct {
Input map[string]interface{} `json:"input,required"`
Metadata map[string]interface{} `json:"metadata,required"`
Output string `json:"output,required"`
Status ToolStateCompletedStatus `json:"status,required"`
Time ToolStateCompletedTime `json:"time,required"`
Title string `json:"title,required"`
Attachments []FilePart `json:"attachments"`
JSON toolStateCompletedJSON `json:"-"`
}
func (*ToolStateCompleted) UnmarshalJSON ¶
func (r *ToolStateCompleted) UnmarshalJSON(data []byte) (err error)
type ToolStateCompletedParam ¶
type ToolStateCompletedParam struct {
Input param.Field[map[string]interface{}] `json:"input,required"`
Metadata param.Field[map[string]interface{}] `json:"metadata,required"`
Output param.Field[string] `json:"output,required"`
Status param.Field[ToolStateCompletedParamStatus] `json:"status,required"`
Time param.Field[ToolStateCompletedTimeParam] `json:"time,required"`
Title param.Field[string] `json:"title,required"`
Attachments param.Field[[]FilePartInputParam] `json:"attachments"`
}
func (ToolStateCompletedParam) MarshalJSON ¶
func (r ToolStateCompletedParam) MarshalJSON() (data []byte, err error)
type ToolStateCompletedParamStatus ¶
type ToolStateCompletedParamStatus string
const (
ToolStateCompletedParamStatusCompleted ToolStateCompletedParamStatus = "completed"
)
func (ToolStateCompletedParamStatus) IsKnown ¶
func (r ToolStateCompletedParamStatus) IsKnown() bool
type ToolStateCompletedStatus ¶
type ToolStateCompletedStatus string
const (
ToolStateCompletedStatusCompleted ToolStateCompletedStatus = "completed"
)
func (ToolStateCompletedStatus) IsKnown ¶
func (r ToolStateCompletedStatus) IsKnown() bool
type ToolStateCompletedTime ¶
type ToolStateCompletedTime struct {
End float64 `json:"end,required"`
Start float64 `json:"start,required"`
Compacted float64 `json:"compacted"`
JSON toolStateCompletedTimeJSON `json:"-"`
}
func (*ToolStateCompletedTime) UnmarshalJSON ¶
func (r *ToolStateCompletedTime) UnmarshalJSON(data []byte) (err error)
type ToolStateCompletedTimeParam ¶
type ToolStateCompletedTimeParam struct {
End param.Field[float64] `json:"end,required"`
Start param.Field[float64] `json:"start,required"`
Compacted param.Field[float64] `json:"compacted"`
}
func (ToolStateCompletedTimeParam) MarshalJSON ¶
func (r ToolStateCompletedTimeParam) MarshalJSON() (data []byte, err error)
type ToolStateError ¶
type ToolStateError struct {
Error string `json:"error,required"`
Input map[string]interface{} `json:"input,required"`
Status ToolStateErrorStatus `json:"status,required"`
Time ToolStateErrorTime `json:"time,required"`
Metadata map[string]interface{} `json:"metadata"`
JSON toolStateErrorJSON `json:"-"`
}
func (*ToolStateError) UnmarshalJSON ¶
func (r *ToolStateError) UnmarshalJSON(data []byte) (err error)
type ToolStateErrorParam ¶
type ToolStateErrorParam struct {
Error param.Field[string] `json:"error,required"`
Input param.Field[map[string]interface{}] `json:"input,required"`
Status param.Field[ToolStateErrorParamStatus] `json:"status,required"`
Time param.Field[ToolStateErrorTimeParam] `json:"time,required"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
}
func (ToolStateErrorParam) MarshalJSON ¶
func (r ToolStateErrorParam) MarshalJSON() (data []byte, err error)
type ToolStateErrorParamStatus ¶
type ToolStateErrorParamStatus string
const (
ToolStateErrorParamStatusError ToolStateErrorParamStatus = "error"
)
func (ToolStateErrorParamStatus) IsKnown ¶
func (r ToolStateErrorParamStatus) IsKnown() bool
type ToolStateErrorStatus ¶
type ToolStateErrorStatus string
const (
ToolStateErrorStatusError ToolStateErrorStatus = "error"
)
func (ToolStateErrorStatus) IsKnown ¶
func (r ToolStateErrorStatus) IsKnown() bool
type ToolStateErrorTime ¶
type ToolStateErrorTime struct {
End float64 `json:"end,required"`
Start float64 `json:"start,required"`
JSON toolStateErrorTimeJSON `json:"-"`
}
func (*ToolStateErrorTime) UnmarshalJSON ¶
func (r *ToolStateErrorTime) UnmarshalJSON(data []byte) (err error)
type ToolStateErrorTimeParam ¶
type ToolStateErrorTimeParam struct {
End param.Field[float64] `json:"end,required"`
Start param.Field[float64] `json:"start,required"`
}
func (ToolStateErrorTimeParam) MarshalJSON ¶
func (r ToolStateErrorTimeParam) MarshalJSON() (data []byte, err error)
type ToolStatePending ¶
type ToolStatePending struct {
Input map[string]interface{} `json:"input,required"`
Raw string `json:"raw,required"`
Status ToolStatePendingStatus `json:"status,required"`
JSON toolStatePendingJSON `json:"-"`
}
func (*ToolStatePending) UnmarshalJSON ¶
func (r *ToolStatePending) UnmarshalJSON(data []byte) (err error)
type ToolStatePendingParam ¶
type ToolStatePendingParam struct {
Input param.Field[map[string]interface{}] `json:"input,required"`
Raw param.Field[string] `json:"raw,required"`
Status param.Field[ToolStatePendingParamStatus] `json:"status,required"`
}
func (ToolStatePendingParam) MarshalJSON ¶
func (r ToolStatePendingParam) MarshalJSON() (data []byte, err error)
type ToolStatePendingParamStatus ¶
type ToolStatePendingParamStatus string
const (
ToolStatePendingParamStatusPending ToolStatePendingParamStatus = "pending"
)
func (ToolStatePendingParamStatus) IsKnown ¶
func (r ToolStatePendingParamStatus) IsKnown() bool
type ToolStatePendingStatus ¶
type ToolStatePendingStatus string
const (
ToolStatePendingStatusPending ToolStatePendingStatus = "pending"
)
func (ToolStatePendingStatus) IsKnown ¶
func (r ToolStatePendingStatus) IsKnown() bool
type ToolStateRunning ¶
type ToolStateRunning struct {
Input map[string]interface{} `json:"input,required"`
Status ToolStateRunningStatus `json:"status,required"`
Time ToolStateRunningTime `json:"time,required"`
Metadata map[string]interface{} `json:"metadata"`
Title string `json:"title"`
JSON toolStateRunningJSON `json:"-"`
}
func (*ToolStateRunning) UnmarshalJSON ¶
func (r *ToolStateRunning) UnmarshalJSON(data []byte) (err error)
type ToolStateRunningParam ¶
type ToolStateRunningParam struct {
Input param.Field[map[string]interface{}] `json:"input,required"`
Status param.Field[ToolStateRunningParamStatus] `json:"status,required"`
Time param.Field[ToolStateRunningTimeParam] `json:"time,required"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Title param.Field[string] `json:"title"`
}
func (ToolStateRunningParam) MarshalJSON ¶
func (r ToolStateRunningParam) MarshalJSON() (data []byte, err error)
type ToolStateRunningParamStatus ¶
type ToolStateRunningParamStatus string
const (
ToolStateRunningParamStatusRunning ToolStateRunningParamStatus = "running"
)
func (ToolStateRunningParamStatus) IsKnown ¶
func (r ToolStateRunningParamStatus) IsKnown() bool
type ToolStateRunningStatus ¶
type ToolStateRunningStatus string
const (
ToolStateRunningStatusRunning ToolStateRunningStatus = "running"
)
func (ToolStateRunningStatus) IsKnown ¶
func (r ToolStateRunningStatus) IsKnown() bool
type ToolStateRunningTime ¶
type ToolStateRunningTime struct {
Start float64 `json:"start,required"`
JSON toolStateRunningTimeJSON `json:"-"`
}
func (*ToolStateRunningTime) UnmarshalJSON ¶
func (r *ToolStateRunningTime) UnmarshalJSON(data []byte) (err error)
type ToolStateRunningTimeParam ¶
func (ToolStateRunningTimeParam) MarshalJSON ¶
func (r ToolStateRunningTimeParam) MarshalJSON() (data []byte, err error)
type TuiAppendPromptParams ¶
type TuiAppendPromptParams struct {
Text param.Field[string] `json:"text,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiAppendPromptParams) MarshalJSON ¶
func (r TuiAppendPromptParams) MarshalJSON() (data []byte, err error)
func (TuiAppendPromptParams) URLQuery ¶
func (r TuiAppendPromptParams) URLQuery() (v url.Values)
URLQuery serializes TuiAppendPromptParams's query parameters as `url.Values`.
type TuiClearPromptParams ¶
type TuiClearPromptParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiClearPromptParams) URLQuery ¶
func (r TuiClearPromptParams) URLQuery() (v url.Values)
URLQuery serializes TuiClearPromptParams's query parameters as `url.Values`.
type TuiCommand ¶
type TuiCommand string
TuiCommand represents one of the 16 known TUI commands.
const ( TuiCommandSessionList TuiCommand = "session.list" TuiCommandSessionNew TuiCommand = "session.new" TuiCommandSessionInterrupt TuiCommand = "session.interrupt" TuiCommandSessionCompact TuiCommand = "session.compact" TuiCommandSessionPageUp TuiCommand = "session.page.up" TuiCommandSessionPageDown TuiCommand = "session.page.down" TuiCommandSessionLineUp TuiCommand = "session.line.up" TuiCommandSessionLineDown TuiCommand = "session.line.down" TuiCommandSessionHalfPageUp TuiCommand = "session.half.page.up" TuiCommandSessionHalfPageDown TuiCommand = "session.half.page.down" TuiCommandSessionFirst TuiCommand = "session.first" TuiCommandSessionLast TuiCommand = "session.last" TuiCommandPromptClear TuiCommand = "prompt.clear" TuiCommandPromptSubmit TuiCommand = "prompt.submit" TuiCommandAgentCycle TuiCommand = "agent.cycle" )
func (TuiCommand) IsKnown ¶
func (r TuiCommand) IsKnown() bool
type TuiControlNextParams ¶
type TuiControlNextParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiControlNextParams) URLQuery ¶
func (r TuiControlNextParams) URLQuery() (v url.Values)
type TuiControlNextResponse ¶
type TuiControlNextResponse struct {
Path string `json:"path,required"`
Body interface{} `json:"body,required"`
JSON tuiControlNextResponseJSON `json:"-"`
}
TuiControlNextResponse is the response from GET /tui/control/next.
func (*TuiControlNextResponse) UnmarshalJSON ¶
func (r *TuiControlNextResponse) UnmarshalJSON(data []byte) (err error)
type TuiControlResponseParams ¶
type TuiControlResponseParams struct {
Body param.Field[interface{}] `json:"body"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiControlResponseParams) MarshalJSON ¶
func (r TuiControlResponseParams) MarshalJSON() (data []byte, err error)
func (TuiControlResponseParams) URLQuery ¶
func (r TuiControlResponseParams) URLQuery() (v url.Values)
type TuiControlService ¶
type TuiControlService struct {
Options []option.RequestOption
}
TuiControlService contains methods for interacting with the TUI control resource.
func NewTuiControlService ¶
func NewTuiControlService(opts ...option.RequestOption) (r *TuiControlService)
NewTuiControlService generates a new service.
func (*TuiControlService) Next ¶
func (r *TuiControlService) Next(ctx context.Context, query TuiControlNextParams, opts ...option.RequestOption) (res *TuiControlNextResponse, err error)
Next gets the next pending control request from the TUI.
func (*TuiControlService) Response ¶
func (r *TuiControlService) Response(ctx context.Context, params TuiControlResponseParams, opts ...option.RequestOption) (res *bool, err error)
Response sends a response to a TUI control request.
type TuiExecuteCommandParams ¶
type TuiExecuteCommandParams struct {
// The command to execute. This is a free-form string, not restricted to the
// TuiCommand enum (which only applies to TUI publish events).
Command param.Field[string] `json:"command,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiExecuteCommandParams) MarshalJSON ¶
func (r TuiExecuteCommandParams) MarshalJSON() (data []byte, err error)
func (TuiExecuteCommandParams) URLQuery ¶
func (r TuiExecuteCommandParams) URLQuery() (v url.Values)
URLQuery serializes TuiExecuteCommandParams's query parameters as `url.Values`.
type TuiOpenHelpParams ¶
type TuiOpenHelpParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiOpenHelpParams) URLQuery ¶
func (r TuiOpenHelpParams) URLQuery() (v url.Values)
URLQuery serializes TuiOpenHelpParams's query parameters as `url.Values`.
type TuiOpenModelsParams ¶
type TuiOpenModelsParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiOpenModelsParams) URLQuery ¶
func (r TuiOpenModelsParams) URLQuery() (v url.Values)
URLQuery serializes TuiOpenModelsParams's query parameters as `url.Values`.
type TuiOpenSessionsParams ¶
type TuiOpenSessionsParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiOpenSessionsParams) URLQuery ¶
func (r TuiOpenSessionsParams) URLQuery() (v url.Values)
URLQuery serializes TuiOpenSessionsParams's query parameters as `url.Values`.
type TuiOpenThemesParams ¶
type TuiOpenThemesParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiOpenThemesParams) URLQuery ¶
func (r TuiOpenThemesParams) URLQuery() (v url.Values)
URLQuery serializes TuiOpenThemesParams's query parameters as `url.Values`.
type TuiPublishBody ¶
type TuiPublishBody interface {
// contains filtered or unexported methods
}
TuiPublishBody is the union type for TUI publish event bodies. Satisfied by TuiPublishBodyPromptAppend, TuiPublishBodyCommandExecute, TuiPublishBodyToastShow, or TuiPublishBodySessionSelect.
type TuiPublishBodyCommandExecute ¶
type TuiPublishBodyCommandExecute struct {
Properties param.Field[TuiPublishBodyCommandExecuteProperties] `json:"properties,required"`
}
func (TuiPublishBodyCommandExecute) MarshalJSON ¶
func (r TuiPublishBodyCommandExecute) MarshalJSON() (data []byte, err error)
type TuiPublishBodyCommandExecuteProperties ¶
type TuiPublishBodyCommandExecuteProperties struct {
Command param.Field[TuiCommand] `json:"command,required"`
}
func (TuiPublishBodyCommandExecuteProperties) MarshalJSON ¶
func (r TuiPublishBodyCommandExecuteProperties) MarshalJSON() (data []byte, err error)
type TuiPublishBodyPromptAppend ¶
type TuiPublishBodyPromptAppend struct {
Properties param.Field[TuiPublishBodyPromptAppendProperties] `json:"properties,required"`
}
func (TuiPublishBodyPromptAppend) MarshalJSON ¶
func (r TuiPublishBodyPromptAppend) MarshalJSON() (data []byte, err error)
type TuiPublishBodyPromptAppendProperties ¶
type TuiPublishBodyPromptAppendProperties struct {
Text param.Field[string] `json:"text,required"`
}
func (TuiPublishBodyPromptAppendProperties) MarshalJSON ¶
func (r TuiPublishBodyPromptAppendProperties) MarshalJSON() (data []byte, err error)
type TuiPublishBodySessionSelect ¶
type TuiPublishBodySessionSelect struct {
Properties param.Field[TuiPublishBodySessionSelectProperties] `json:"properties,required"`
}
func (TuiPublishBodySessionSelect) MarshalJSON ¶
func (r TuiPublishBodySessionSelect) MarshalJSON() (data []byte, err error)
type TuiPublishBodySessionSelectProperties ¶
type TuiPublishBodySessionSelectProperties struct {
SessionID param.Field[string] `json:"sessionID,required"`
}
func (TuiPublishBodySessionSelectProperties) MarshalJSON ¶
func (r TuiPublishBodySessionSelectProperties) MarshalJSON() (data []byte, err error)
type TuiPublishBodyToastShow ¶
type TuiPublishBodyToastShow struct {
Properties param.Field[TuiPublishBodyToastShowProperties] `json:"properties,required"`
}
func (TuiPublishBodyToastShow) MarshalJSON ¶
func (r TuiPublishBodyToastShow) MarshalJSON() (data []byte, err error)
type TuiPublishBodyToastShowProperties ¶
type TuiPublishBodyToastShowProperties struct {
Message param.Field[string] `json:"message,required"`
Variant param.Field[TuiShowToastParamsVariant] `json:"variant,required"`
Title param.Field[string] `json:"title"`
Duration param.Field[float64] `json:"duration"`
}
func (TuiPublishBodyToastShowProperties) MarshalJSON ¶
func (r TuiPublishBodyToastShowProperties) MarshalJSON() (data []byte, err error)
type TuiPublishParams ¶
type TuiPublishParams struct {
Body param.Field[TuiPublishBody] `json:"body"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiPublishParams) MarshalJSON ¶
func (r TuiPublishParams) MarshalJSON() (data []byte, err error)
func (TuiPublishParams) URLQuery ¶
func (r TuiPublishParams) URLQuery() (v url.Values)
type TuiSelectSessionParams ¶
type TuiSelectSessionParams struct {
SessionID param.Field[string] `json:"sessionID,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiSelectSessionParams) MarshalJSON ¶
func (r TuiSelectSessionParams) MarshalJSON() (data []byte, err error)
func (TuiSelectSessionParams) URLQuery ¶
func (r TuiSelectSessionParams) URLQuery() (v url.Values)
type TuiService ¶
type TuiService struct {
Options []option.RequestOption
Control *TuiControlService
}
TuiService contains methods and other services that help with interacting with the opencode API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTuiService method instead.
func NewTuiService ¶
func NewTuiService(opts ...option.RequestOption) (r *TuiService)
NewTuiService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TuiService) AppendPrompt ¶
func (r *TuiService) AppendPrompt(ctx context.Context, params TuiAppendPromptParams, opts ...option.RequestOption) (res *bool, err error)
Append prompt to the TUI
func (*TuiService) ClearPrompt ¶
func (r *TuiService) ClearPrompt(ctx context.Context, body TuiClearPromptParams, opts ...option.RequestOption) (res *bool, err error)
Clear the prompt
func (*TuiService) ExecuteCommand ¶
func (r *TuiService) ExecuteCommand(ctx context.Context, params TuiExecuteCommandParams, opts ...option.RequestOption) (res *bool, err error)
Execute a TUI command (e.g. agent_cycle)
func (*TuiService) OpenHelp ¶
func (r *TuiService) OpenHelp(ctx context.Context, body TuiOpenHelpParams, opts ...option.RequestOption) (res *bool, err error)
OpenHelp opens the help dialog
func (*TuiService) OpenModels ¶
func (r *TuiService) OpenModels(ctx context.Context, body TuiOpenModelsParams, opts ...option.RequestOption) (res *bool, err error)
OpenModels opens the model dialog
func (*TuiService) OpenSessions ¶
func (r *TuiService) OpenSessions(ctx context.Context, body TuiOpenSessionsParams, opts ...option.RequestOption) (res *bool, err error)
OpenSessions opens the session dialog
func (*TuiService) OpenThemes ¶
func (r *TuiService) OpenThemes(ctx context.Context, body TuiOpenThemesParams, opts ...option.RequestOption) (res *bool, err error)
OpenThemes opens the theme dialog
func (*TuiService) Publish ¶
func (r *TuiService) Publish(ctx context.Context, params TuiPublishParams, opts ...option.RequestOption) (res *bool, err error)
Publish publishes an event to the TUI.
func (*TuiService) SelectSession ¶
func (r *TuiService) SelectSession(ctx context.Context, params TuiSelectSessionParams, opts ...option.RequestOption) (res *bool, err error)
SelectSession selects a session in the TUI.
func (*TuiService) ShowToast ¶
func (r *TuiService) ShowToast(ctx context.Context, params TuiShowToastParams, opts ...option.RequestOption) (res *bool, err error)
Show a toast notification in the TUI
func (*TuiService) SubmitPrompt ¶
func (r *TuiService) SubmitPrompt(ctx context.Context, body TuiSubmitPromptParams, opts ...option.RequestOption) (res *bool, err error)
Submit the prompt
type TuiShowToastParams ¶
type TuiShowToastParams struct {
Message param.Field[string] `json:"message,required"`
Variant param.Field[TuiShowToastParamsVariant] `json:"variant,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
Duration param.Field[float64] `json:"duration"`
Title param.Field[string] `json:"title"`
}
func (TuiShowToastParams) MarshalJSON ¶
func (r TuiShowToastParams) MarshalJSON() (data []byte, err error)
func (TuiShowToastParams) URLQuery ¶
func (r TuiShowToastParams) URLQuery() (v url.Values)
URLQuery serializes TuiShowToastParams's query parameters as `url.Values`.
type TuiShowToastParamsVariant ¶
type TuiShowToastParamsVariant string
const ( TuiShowToastParamsVariantInfo TuiShowToastParamsVariant = "info" TuiShowToastParamsVariantSuccess TuiShowToastParamsVariant = "success" TuiShowToastParamsVariantWarning TuiShowToastParamsVariant = "warning" TuiShowToastParamsVariantError TuiShowToastParamsVariant = "error" )
func (TuiShowToastParamsVariant) IsKnown ¶
func (r TuiShowToastParamsVariant) IsKnown() bool
type TuiSubmitPromptParams ¶
type TuiSubmitPromptParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (TuiSubmitPromptParams) URLQuery ¶
func (r TuiSubmitPromptParams) URLQuery() (v url.Values)
URLQuery serializes TuiSubmitPromptParams's query parameters as `url.Values`.
type UnknownErrorData ¶
type UnknownErrorData = shared.UnknownErrorData
This is an alias to an internal type.
type UnknownErrorName ¶
type UnknownErrorName = shared.UnknownErrorName
This is an alias to an internal type.
type UserMessage ¶
type UserMessage struct {
ID string `json:"id,required"`
Agent string `json:"agent,required"`
Model UserMessageModel `json:"model,required"`
Role UserMessageRole `json:"role,required"`
SessionID string `json:"sessionID,required"`
Time UserMessageTime `json:"time,required"`
Format OutputFormat `json:"format"`
Summary UserMessageSummary `json:"summary"`
System string `json:"system"`
Tools map[string]bool `json:"tools"`
JSON userMessageJSON `json:"-"`
}
func (*UserMessage) UnmarshalJSON ¶
func (r *UserMessage) UnmarshalJSON(data []byte) (err error)
type UserMessageModel ¶
type UserMessageModel struct {
ModelID string `json:"modelID,required"`
ProviderID string `json:"providerID,required"`
Variant string `json:"variant"`
JSON userMessageModelJSON `json:"-"`
}
func (*UserMessageModel) UnmarshalJSON ¶
func (r *UserMessageModel) UnmarshalJSON(data []byte) (err error)
type UserMessageRole ¶
type UserMessageRole string
const (
UserMessageRoleUser UserMessageRole = "user"
)
func (UserMessageRole) IsKnown ¶
func (r UserMessageRole) IsKnown() bool
type UserMessageSummary ¶
type UserMessageSummary struct {
Diffs []UserMessageSummaryDiff `json:"diffs,required"`
Body string `json:"body"`
Title string `json:"title"`
JSON userMessageSummaryJSON `json:"-"`
}
func (*UserMessageSummary) UnmarshalJSON ¶
func (r *UserMessageSummary) UnmarshalJSON(data []byte) (err error)
type UserMessageSummaryDiff ¶
type UserMessageSummaryDiff struct {
Additions float64 `json:"additions,required"`
Deletions float64 `json:"deletions,required"`
File string `json:"file,required"`
Patch string `json:"patch,required"`
Status SnapshotFileDiffStatus `json:"status"`
JSON userMessageSummaryDiffJSON `json:"-"`
}
func (*UserMessageSummaryDiff) UnmarshalJSON ¶
func (r *UserMessageSummaryDiff) UnmarshalJSON(data []byte) (err error)
type UserMessageTime ¶
type UserMessageTime struct {
Created float64 `json:"created,required"`
JSON userMessageTimeJSON `json:"-"`
}
func (*UserMessageTime) UnmarshalJSON ¶
func (r *UserMessageTime) UnmarshalJSON(data []byte) (err error)
type VcsDiffParams ¶
type VcsDiffParams struct {
Mode param.Field[VcsDiffParamsMode] `query:"mode,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (VcsDiffParams) URLQuery ¶
func (r VcsDiffParams) URLQuery() (v url.Values)
type VcsDiffParamsMode ¶
type VcsDiffParamsMode string
const ( VcsDiffParamsModeGit VcsDiffParamsMode = "git" VcsDiffParamsModeBranch VcsDiffParamsMode = "branch" )
func (VcsDiffParamsMode) IsKnown ¶
func (r VcsDiffParamsMode) IsKnown() bool
type VcsFileDiff ¶
type VcsFileDiff struct {
File string `json:"file,required"`
Patch string `json:"patch,required"`
Additions float64 `json:"additions,required"`
Deletions float64 `json:"deletions,required"`
Status VcsFileDiffStatus `json:"status"`
JSON vcsFileDiffJSON `json:"-"`
}
func (*VcsFileDiff) UnmarshalJSON ¶
func (r *VcsFileDiff) UnmarshalJSON(data []byte) (err error)
type VcsFileDiffStatus ¶
type VcsFileDiffStatus string
const ( VcsFileDiffStatusAdded VcsFileDiffStatus = "added" VcsFileDiffStatusDeleted VcsFileDiffStatus = "deleted" VcsFileDiffStatusModified VcsFileDiffStatus = "modified" )
func (VcsFileDiffStatus) IsKnown ¶
func (r VcsFileDiffStatus) IsKnown() bool
type VcsGetParams ¶
type VcsGetParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (VcsGetParams) URLQuery ¶
func (r VcsGetParams) URLQuery() (v url.Values)
type VcsInfo ¶
type VcsInfo struct {
Branch string `json:"branch"`
DefaultBranch string `json:"default_branch"`
JSON vcsInfoJSON `json:"-"`
}
func (*VcsInfo) UnmarshalJSON ¶
type VcsService ¶
type VcsService struct {
Options []option.RequestOption
}
func NewVcsService ¶
func NewVcsService(opts ...option.RequestOption) (r *VcsService)
func (*VcsService) Diff ¶
func (r *VcsService) Diff(ctx context.Context, query VcsDiffParams, opts ...option.RequestOption) (res *[]VcsFileDiff, err error)
func (*VcsService) Get ¶
func (r *VcsService) Get(ctx context.Context, query VcsGetParams, opts ...option.RequestOption) (res *VcsInfo, err error)
type Workspace ¶
type Workspace struct {
ID string `json:"id,required"`
Type string `json:"type,required"`
Name string `json:"name,required"`
Branch *string `json:"branch,required"`
Directory *string `json:"directory,required"`
Extra interface{} `json:"extra,required"`
ProjectID string `json:"projectID,required"`
JSON workspaceJSON `json:"-"`
}
func (*Workspace) UnmarshalJSON ¶
type WorkspaceAdaptor ¶
type WorkspaceAdaptor struct {
Type string `json:"type,required"`
Name string `json:"name,required"`
Description string `json:"description,required"`
JSON workspaceAdaptorJSON `json:"-"`
}
func (*WorkspaceAdaptor) UnmarshalJSON ¶
func (r *WorkspaceAdaptor) UnmarshalJSON(data []byte) (err error)
type WorkspaceAdaptorsParams ¶
type WorkspaceAdaptorsParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorkspaceAdaptorsParams) URLQuery ¶
func (r WorkspaceAdaptorsParams) URLQuery() (v url.Values)
type WorkspaceCreateParams ¶
type WorkspaceCreateParams struct {
Type param.Field[string] `json:"type,required"`
Branch param.Field[string] `json:"branch,required"`
Extra param.Field[interface{}] `json:"extra,required"`
ID param.Field[string] `json:"id"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorkspaceCreateParams) MarshalJSON ¶
func (r WorkspaceCreateParams) MarshalJSON() (data []byte, err error)
func (WorkspaceCreateParams) URLQuery ¶
func (r WorkspaceCreateParams) URLQuery() (v url.Values)
type WorkspaceListParams ¶
type WorkspaceListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorkspaceListParams) URLQuery ¶
func (r WorkspaceListParams) URLQuery() (v url.Values)
type WorkspaceRemoveParams ¶
type WorkspaceRemoveParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorkspaceRemoveParams) URLQuery ¶
func (r WorkspaceRemoveParams) URLQuery() (v url.Values)
type WorkspaceService ¶
type WorkspaceService struct {
Options []option.RequestOption
}
func NewWorkspaceService ¶
func NewWorkspaceService(opts ...option.RequestOption) (r *WorkspaceService)
func (*WorkspaceService) Adaptors ¶
func (r *WorkspaceService) Adaptors(ctx context.Context, query WorkspaceAdaptorsParams, opts ...option.RequestOption) (res *[]WorkspaceAdaptor, err error)
func (*WorkspaceService) Create ¶
func (r *WorkspaceService) Create(ctx context.Context, params WorkspaceCreateParams, opts ...option.RequestOption) (res *Workspace, err error)
func (*WorkspaceService) List ¶
func (r *WorkspaceService) List(ctx context.Context, query WorkspaceListParams, opts ...option.RequestOption) (res *[]Workspace, err error)
func (*WorkspaceService) Remove ¶
func (r *WorkspaceService) Remove(ctx context.Context, id string, params WorkspaceRemoveParams, opts ...option.RequestOption) (res *Workspace, err error)
func (*WorkspaceService) SessionRestore ¶
func (r *WorkspaceService) SessionRestore(ctx context.Context, id string, params WorkspaceSessionRestoreParams, opts ...option.RequestOption) (res *WorkspaceSessionRestoreResponse, err error)
func (*WorkspaceService) Status ¶
func (r *WorkspaceService) Status(ctx context.Context, query WorkspaceStatusParams, opts ...option.RequestOption) (res *[]WorkspaceStatusResponse, err error)
type WorkspaceSessionRestoreParams ¶
type WorkspaceSessionRestoreParams struct {
SessionID param.Field[string] `json:"sessionID,required"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorkspaceSessionRestoreParams) MarshalJSON ¶
func (r WorkspaceSessionRestoreParams) MarshalJSON() (data []byte, err error)
func (WorkspaceSessionRestoreParams) URLQuery ¶
func (r WorkspaceSessionRestoreParams) URLQuery() (v url.Values)
type WorkspaceSessionRestoreResponse ¶
type WorkspaceSessionRestoreResponse struct {
Total int64 `json:"total,required"`
JSON workspaceSessionRestoreResponseJSON `json:"-"`
}
func (*WorkspaceSessionRestoreResponse) UnmarshalJSON ¶
func (r *WorkspaceSessionRestoreResponse) UnmarshalJSON(data []byte) (err error)
type WorkspaceStatusParams ¶
type WorkspaceStatusParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorkspaceStatusParams) URLQuery ¶
func (r WorkspaceStatusParams) URLQuery() (v url.Values)
type WorkspaceStatusResponse ¶
type WorkspaceStatusResponse struct {
WorkspaceID string `json:"workspaceID,required"`
Status WorkspaceStatusResponseStatus `json:"status,required"`
JSON workspaceStatusResponseJSON `json:"-"`
}
func (*WorkspaceStatusResponse) UnmarshalJSON ¶
func (r *WorkspaceStatusResponse) UnmarshalJSON(data []byte) (err error)
type WorkspaceStatusResponseStatus ¶
type WorkspaceStatusResponseStatus string
const ( WorkspaceStatusResponseStatusConnected WorkspaceStatusResponseStatus = "connected" WorkspaceStatusResponseStatusConnecting WorkspaceStatusResponseStatus = "connecting" WorkspaceStatusResponseStatusDisconnected WorkspaceStatusResponseStatus = "disconnected" WorkspaceStatusResponseStatusError WorkspaceStatusResponseStatus = "error" )
func (WorkspaceStatusResponseStatus) IsKnown ¶
func (r WorkspaceStatusResponseStatus) IsKnown() bool
type Worktree ¶
type Worktree struct {
Name string `json:"name,required"`
Branch string `json:"branch,required"`
Directory string `json:"directory,required"`
JSON worktreeJSON `json:"-"`
}
func (*Worktree) UnmarshalJSON ¶
type WorktreeCreateParams ¶
type WorktreeCreateParams struct {
Name param.Field[string] `json:"name"`
StartCommand param.Field[string] `json:"startCommand"`
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorktreeCreateParams) MarshalJSON ¶
func (r WorktreeCreateParams) MarshalJSON() (data []byte, err error)
func (WorktreeCreateParams) URLQuery ¶
func (r WorktreeCreateParams) URLQuery() (v url.Values)
type WorktreeListParams ¶
type WorktreeListParams struct {
Directory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorktreeListParams) URLQuery ¶
func (r WorktreeListParams) URLQuery() (v url.Values)
type WorktreeRemoveParams ¶
type WorktreeRemoveParams struct {
// Directory is the worktree directory to remove (body field).
Directory param.Field[string] `json:"directory,required"`
// QueryDirectory is the optional project directory context (query parameter).
QueryDirectory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorktreeRemoveParams) MarshalJSON ¶
func (r WorktreeRemoveParams) MarshalJSON() (data []byte, err error)
func (WorktreeRemoveParams) URLQuery ¶
func (r WorktreeRemoveParams) URLQuery() (v url.Values)
type WorktreeResetParams ¶
type WorktreeResetParams struct {
// Directory is the worktree directory to reset (body field).
Directory param.Field[string] `json:"directory,required"`
// QueryDirectory is the optional project directory context (query parameter).
QueryDirectory param.Field[string] `query:"directory"`
Workspace param.Field[string] `query:"workspace"`
}
func (WorktreeResetParams) MarshalJSON ¶
func (r WorktreeResetParams) MarshalJSON() (data []byte, err error)
func (WorktreeResetParams) URLQuery ¶
func (r WorktreeResetParams) URLQuery() (v url.Values)
type WorktreeService ¶
type WorktreeService struct {
Options []option.RequestOption
}
func NewWorktreeService ¶
func NewWorktreeService(opts ...option.RequestOption) (r *WorktreeService)
func (*WorktreeService) Create ¶
func (r *WorktreeService) Create(ctx context.Context, params WorktreeCreateParams, opts ...option.RequestOption) (res *Worktree, err error)
func (*WorktreeService) List ¶
func (r *WorktreeService) List(ctx context.Context, query WorktreeListParams, opts ...option.RequestOption) (res *[]string, err error)
func (*WorktreeService) Remove ¶
func (r *WorktreeService) Remove(ctx context.Context, params WorktreeRemoveParams, opts ...option.RequestOption) (res *bool, err error)
func (*WorktreeService) Reset ¶
func (r *WorktreeService) Reset(ctx context.Context, params WorktreeResetParams, opts ...option.RequestOption) (res *bool, err error)
Source Files
¶
- agent.go
- aliases.go
- app.go
- auth.go
- client.go
- command.go
- config.go
- console.go
- event.go
- event_expanded_a.go
- event_expanded_b.go
- event_expanded_c.go
- experimental.go
- experimentalsession.go
- field.go
- file.go
- find.go
- formatter.go
- global.go
- instance.go
- lsp.go
- mcp.go
- path.go
- permission.go
- project.go
- provider.go
- pty.go
- question.go
- resource.go
- session.go
- sessionpermission.go
- skill.go
- sync.go
- tool.go
- tui.go
- vcs.go
- workspace.go
- worktree.go