Documentation
¶
Overview ¶
Package droid is a Go client for the Droid Daemon (`droid daemon`): the JSON-RPC protocol over a WebSocket that Factory's TypeScript SDK (@factory/droid-sdk) speaks. Client is one authenticated connection; the session package builds Sessions, their state and reconnection on top.
Index ¶
- Constants
- Variables
- func RequestIDOf(ctx context.Context) string
- func WithRequestID(ctx context.Context, id string) context.Context
- func WithResponseHook(ctx context.Context, fn func(result json.RawMessage)) context.Context
- type AuthError
- type Client
- func (c *Client) AcknowledgeMissionReadinessWarning(ctx context.Context, params protocol.AcknowledgeMissionReadinessWarningParams) (*protocol.AcknowledgeMissionReadinessWarningResult, error)
- func (c *Client) AddMCPServer(ctx context.Context, params protocol.AddMCPServerParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) AddMarketplace(ctx context.Context, params protocol.AddMarketplaceParams) (*protocol.AddMarketplaceResult, error)
- func (c *Client) AddUserMessage(ctx context.Context, params protocol.AddUserMessageParams) (*protocol.AddUserMessageResult, error)
- func (c *Client) ApplyAutomationConfig(ctx context.Context, params protocol.ApplyAutomationConfigParams) (*protocol.ApplyAutomationConfigResult, error)
- func (c *Client) ApplyUserPreferences(ctx context.Context, params protocol.ApplyUserPreferencesParams) (*protocol.DaemonApplyUserPreferencesResult, error)
- func (c *Client) ArchiveSession(ctx context.Context, params protocol.ArchiveSessionParams) (*protocol.ArchiveSessionResult, error)
- func (c *Client) Authenticate(ctx context.Context, params protocol.AuthenticateParams) (*protocol.AuthenticateResult, error)
- func (c *Client) AuthenticateMCPServer(ctx context.Context, params protocol.AuthenticateMCPServerParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) Call(ctx context.Context, method string, params, result any) error
- func (c *Client) CancelMCPAuth(ctx context.Context, params protocol.CancelMCPAuthParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) CancelSearchSessions(ctx context.Context, params protocol.CancelSearchSessionsParams) (*protocol.CancelSearchSessionsResult, error)
- func (c *Client) ChangeWorkingDirectory(ctx context.Context, params protocol.ChangeWorkingDirectoryParams) (*protocol.ChangeWorkingDirectoryResult, error)
- func (c *Client) CheckFolderTrust(ctx context.Context, params protocol.CheckFolderTrustParams) (*protocol.CheckFolderTrustResult, error)
- func (c *Client) CheckoutGitBranch(ctx context.Context, params protocol.CheckoutGitBranchParams) (*protocol.DaemonCheckoutGitBranchResult, error)
- func (c *Client) CleanupWorktree(ctx context.Context, params protocol.CleanupWorktreeParams) (*protocol.CleanupWorktreeResult, error)
- func (c *Client) ClearMCPAuth(ctx context.Context, params protocol.ClearMCPAuthParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) Close() error
- func (c *Client) CloseSession(ctx context.Context, params protocol.CloseSessionParams) (*protocol.CloseSessionResult, error)
- func (c *Client) CloseTerminal(ctx context.Context, params protocol.CloseTerminalParams) (*protocol.CloseTerminalResult, error)
- func (c *Client) CompactSession(ctx context.Context, params protocol.CompactSessionParams) (*protocol.CompactSessionResult, error)
- func (c *Client) ConfigItems(ctx context.Context, params protocol.ConfigItemsParams) (*protocol.ConfigItemsResult, error)
- func (c *Client) CreateAutomation(ctx context.Context, params protocol.CreateAutomationParams) (*protocol.CreateAutomationResult, error)
- func (c *Client) CreateCron(ctx context.Context, params protocol.DaemonCreateCronRequestParams) (*protocol.CreateCronResult, error)
- func (c *Client) CreatePR(ctx context.Context, params protocol.CreatePRParams) (*protocol.CreatePRResult, error)
- func (c *Client) CreateTerminal(ctx context.Context, params protocol.CreateTerminalParams) (*protocol.CreateTerminalResult, error)
- func (c *Client) DeleteAutomation(ctx context.Context, params protocol.DeleteAutomationParams) (*protocol.DeleteAutomationResult, error)
- func (c *Client) DeleteCron(ctx context.Context, params protocol.DeleteCronParams) (*protocol.DeleteCronResult, error)
- func (c *Client) DeleteCustomModel(ctx context.Context, params protocol.DeleteCustomModelParams) (*protocol.DeleteCustomModelResult, error)
- func (c *Client) DeleteWorktreeSetupProfile(ctx context.Context, params protocol.DeleteWorktreeSetupProfileParams) (*protocol.DeleteWorktreeSetupProfileResult, error)
- func (c *Client) DesktopEnsure(ctx context.Context) (*protocol.DaemonDesktopResult, error)
- func (c *Client) DesktopInput(ctx context.Context) (*protocol.DesktopInputResult, error)
- func (c *Client) DesktopStatus(ctx context.Context) (*protocol.DaemonDesktopResult, error)
- func (c *Client) DispatchAutomationRun(ctx context.Context, params protocol.DispatchAutomationRunParams) (*protocol.DaemonDispatchAutomationRunResult, error)
- func (c *Client) Done() <-chan struct{}
- func (c *Client) Err() error
- func (c *Client) ExecuteRewind(ctx context.Context, params protocol.ExecuteRewindParams) (*protocol.ExecuteRewindResult, error)
- func (c *Client) ForkAutomation(ctx context.Context, params protocol.ForkAutomationParams) (*protocol.ForkAutomationResult, error)
- func (c *Client) ForkSession(ctx context.Context, params protocol.ForkSessionParams) (*protocol.ForkSessionResult, error)
- func (c *Client) GenerateSemanticDiff(ctx context.Context, params protocol.GenerateSemanticDiffParams) (*protocol.GenerateSemanticDiffResult, error)
- func (c *Client) GetAutomationHistory(ctx context.Context, params protocol.GetAutomationHistoryParams) (*protocol.GetAutomationHistoryResult, error)
- func (c *Client) GetAutomationVisual(ctx context.Context, params protocol.GetAutomationVisualParams) (*protocol.GetAutomationVisualResult, error)
- func (c *Client) GetCheckoutMetadata(ctx context.Context, params protocol.GetCheckoutMetadataParams) (*protocol.GetCheckoutMetadataResult, error)
- func (c *Client) GetContextBreakdown(ctx context.Context, params protocol.GetContextBreakdownParams) (*protocol.GetContextBreakdownResult, error)
- func (c *Client) GetDefaultSettings(ctx context.Context, params protocol.GetDefaultSettingsParams) (*protocol.GetDefaultSettingsResult, error)
- func (c *Client) GetGitBranchDivergence(ctx context.Context, params protocol.GetGitBranchDivergenceParams) (*protocol.DaemonGetGitBranchDivergenceResult, error)
- func (c *Client) GetGitDiff(ctx context.Context, params protocol.GetGitDiffParams) (*protocol.GetGitDiffResult, error)
- func (c *Client) GetGitDiffFileContents(ctx context.Context, params protocol.GetGitDiffFileContentsParams) (*protocol.GetGitDiffFileContentsResult, error)
- func (c *Client) GetMCPConfig(ctx context.Context) (*protocol.GetMCPConfigResult, error)
- func (c *Client) GetProxyToken(ctx context.Context, params json.RawMessage) (*protocol.GetProxyTokenResult, error)
- func (c *Client) GetRewindInfo(ctx context.Context, params protocol.GetRewindInfoParams) (*protocol.GetRewindInfoResult, error)
- func (c *Client) GetSemanticDiffCache(ctx context.Context, params protocol.GetSemanticDiffCacheParams) (*protocol.GetSemanticDiffCacheResult, error)
- func (c *Client) GetSessionMessages(ctx context.Context, params protocol.GetSessionMessagesParams) (*protocol.GetSessionMessagesResult, error)
- func (c *Client) GetSessionTurnOutcome(ctx context.Context, params protocol.GetSessionTurnOutcomeParams) (*protocol.DaemonGetSessionTurnOutcomeResult, error)
- func (c *Client) GetUserPreferencesState(ctx context.Context, params protocol.GetUserPreferencesStateParams) (*protocol.DaemonGetUserPreferencesStateResult, error)
- func (c *Client) GetWorkspaceFileContent(ctx context.Context, params protocol.GetWorkspaceFileContentParams) (*protocol.GetWorkspaceFileContentResult, error)
- func (c *Client) GitCommit(ctx context.Context, params protocol.GitCommitParams) (*protocol.GitCommitResult, error)
- func (c *Client) GitPush(ctx context.Context, params protocol.GitPushParams) (*protocol.GitPushResult, error)
- func (c *Client) Handle(method string, h RequestHandler)
- func (c *Client) HandleLater(method string, fn func(Request))
- func (c *Client) HoldSessionCrons(ctx context.Context, params protocol.HoldSessionCronsParams) (*protocol.HoldSessionCronsResult, error)
- func (c *Client) InitializeSession(ctx context.Context, params protocol.InitializeSessionParams) (*protocol.InitializeSessionResult, error)
- func (c *Client) InspectMissionReadiness(ctx context.Context, params protocol.InspectMissionReadinessParams) (*protocol.InspectMissionReadinessResult, error)
- func (c *Client) InspectWorktreeDeletion(ctx context.Context, params protocol.InspectWorktreeDeletionParams) (*protocol.InspectWorktreeDeletionResult, error)
- func (c *Client) InstallPlugin(ctx context.Context, params protocol.InstallPluginParams) (*protocol.InstallPluginResult, error)
- func (c *Client) InstallSSHKey(ctx context.Context, params protocol.InstallSSHKeyParams) (*protocol.InstallSSHKeyResult, error)
- func (c *Client) InterruptSession(ctx context.Context, params protocol.InterruptSessionParams) (*protocol.InterruptSessionResult, error)
- func (c *Client) KillBackgroundProcess(ctx context.Context, params protocol.KillBackgroundProcessParams) (*protocol.KillBackgroundProcessResult, error)
- func (c *Client) KillWorkerSession(ctx context.Context, params protocol.KillWorkerSessionParams) (*protocol.KillWorkerSessionResult, error)
- func (c *Client) ListAutomations(ctx context.Context, params protocol.ListAutomationsParams) (*protocol.ListAutomationsResult, error)
- func (c *Client) ListAvailablePlugins(ctx context.Context, params protocol.ListAvailablePluginsParams) (*protocol.ListAvailablePluginsResult, error)
- func (c *Client) ListAvailableSessions(ctx context.Context, params protocol.ListAvailableSessionsParams) (*protocol.ListAvailableSessionsResult, error)
- func (c *Client) ListCommands(ctx context.Context, params protocol.ListCommandsParams) (*protocol.ListCommandsResult, error)
- func (c *Client) ListCrons(ctx context.Context, params protocol.ListCronsParams) (*protocol.ListCronsResult, error)
- func (c *Client) ListCustomModels(ctx context.Context) (*protocol.ListCustomModelsResult, error)
- func (c *Client) ListFiles(ctx context.Context, params protocol.ListFilesParams) (*protocol.ListFilesResult, error)
- func (c *Client) ListGitBranches(ctx context.Context, params protocol.ListGitBranchesParams) (*protocol.ListGitBranchesResult, error)
- func (c *Client) ListInstalledPlugins(ctx context.Context, params protocol.ListInstalledPluginsParams) (*protocol.ListInstalledPluginsResult, error)
- func (c *Client) ListMCPRegistry(ctx context.Context, params protocol.ListMCPRegistryParams) (*protocol.ListMCPRegistryResult, error)
- func (c *Client) ListMCPServers(ctx context.Context, params protocol.ListMCPServersParams) (*protocol.ListMCPServersResult, error)
- func (c *Client) ListMCPTools(ctx context.Context, params protocol.ListMCPToolsParams) (*protocol.ListMCPToolsResult, error)
- func (c *Client) ListManagedWorktrees(ctx context.Context, params protocol.ListManagedWorktreesParams) (*protocol.ListManagedWorktreesResult, error)
- func (c *Client) ListMarketplaces(ctx context.Context, params protocol.ListMarketplacesParams) (*protocol.ListMarketplacesResult, error)
- func (c *Client) ListModels(ctx context.Context, params protocol.ListModelsParams) (*protocol.ListModelsResult, error)
- func (c *Client) ListOpenedSessions(ctx context.Context, params protocol.ListOpenedSessionsParams) (*protocol.ListOpenedSessionsResult, error)
- func (c *Client) ListSkills(ctx context.Context, params protocol.ListSkillsParams) (*protocol.ListSkillsResult, error)
- func (c *Client) ListTerminals(ctx context.Context, params protocol.ListTerminalsParams) (*protocol.ListTerminalsResult, error)
- func (c *Client) ListWorktreeSetupProfiles(ctx context.Context, params protocol.ListWorktreeSetupProfilesParams) (*protocol.ListWorktreeSetupProfilesResult, error)
- func (c *Client) LoadSession(ctx context.Context, params protocol.LoadSessionParams) (*protocol.LoadSessionResult, error)
- func (c *Client) Logout(ctx context.Context) (*protocol.LogoutResult, error)
- func (c *Client) PauseAutomation(ctx context.Context, params protocol.PauseAutomationParams) (*protocol.PauseAutomationResult, error)
- func (c *Client) PullURLToCwdFile(ctx context.Context, params protocol.PullURLToCwdFileParams) (*protocol.PullURLToCwdFileResult, error)
- func (c *Client) PushCwdFileToURL(ctx context.Context, params protocol.PushCwdFileToURLParams) (*protocol.PushCwdFileToURLResult, error)
- func (c *Client) RefreshConnectorToolCatalog(ctx context.Context) (*protocol.RefreshConnectorToolCatalogResult, error)
- func (c *Client) RelayGetStatus(ctx context.Context) (*protocol.RelayGetStatusResult, error)
- func (c *Client) RelayStart(ctx context.Context, params protocol.RelayStartParams) (*protocol.RelayStartResult, error)
- func (c *Client) RelayStop(ctx context.Context) (*protocol.RelayStopResult, error)
- func (c *Client) RemoveMCPServer(ctx context.Context, params protocol.RemoveMCPServerParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) RemoveMarketplace(ctx context.Context, params protocol.RemoveMarketplaceParams) (*protocol.RemoveMarketplaceResult, error)
- func (c *Client) RenameAutomation(ctx context.Context, params protocol.RenameAutomationParams) (*protocol.RenameAutomationResult, error)
- func (c *Client) RenameSession(ctx context.Context, params protocol.RenameSessionParams) (*protocol.RenameSessionResult, error)
- func (c *Client) ResizeTerminal(ctx context.Context, params protocol.ResizeTerminalParams) (*protocol.ResizeResult, error)
- func (c *Client) ResolvePullRequestStatuses(ctx context.Context, params protocol.ResolvePullRequestStatusesParams) (*protocol.ResolvePullRequestStatusesResult, error)
- func (c *Client) ResolveQueuedUserMessage(ctx context.Context, params json.RawMessage) (*protocol.ResolveQueuedUserMessageResult, error)
- func (c *Client) ResolveUserPreferences(ctx context.Context, params protocol.ResolveUserPreferencesParams) (*protocol.DaemonResolveUserPreferencesResult, error)
- func (c *Client) Respond(ctx context.Context, id string, result any) error
- func (c *Client) ResumeAutomation(ctx context.Context, params protocol.ResumeAutomationParams) (*protocol.ResumeAutomationResult, error)
- func (c *Client) ResumeSessionCrons(ctx context.Context, params protocol.ResumeSessionCronsParams) (*protocol.ResumeSessionCronsResult, error)
- func (c *Client) RunAutomation(ctx context.Context, params protocol.RunAutomationParams) (*protocol.RunAutomationResult, error)
- func (c *Client) SaveSemanticDiffCache(ctx context.Context, params protocol.SaveSemanticDiffCacheParams) (*protocol.SaveSemanticDiffCacheResult, error)
- func (c *Client) SaveWorktreeSetupProfile(ctx context.Context, params protocol.SaveWorktreeSetupProfileParams) (*protocol.SaveWorktreeSetupProfileResult, error)
- func (c *Client) SearchFiles(ctx context.Context, params protocol.SearchFilesParams) (*protocol.SearchFilesResult, error)
- func (c *Client) SearchSessions(ctx context.Context, params protocol.SearchSessionsParams) (*protocol.SearchSessionsResult, error)
- func (c *Client) SetPluginEnabled(ctx context.Context, params protocol.SetPluginEnabledParams) (*protocol.SetPluginEnabledResult, error)
- func (c *Client) SetSkillDisabled(ctx context.Context, params protocol.SetSkillDisabledParams) (*protocol.SetSkillDisabledResult, error)
- func (c *Client) SfCreateWorkstream(ctx context.Context, params protocol.SfCreateWorkstreamParams) (*protocol.SfCreateWorkstreamResult, error)
- func (c *Client) SfDeleteWorkstream(ctx context.Context, params protocol.SfDeleteWorkstreamParams) (*protocol.SfDeleteWorkstreamResult, error)
- func (c *Client) SfGetWorkstream(ctx context.Context, params protocol.SfGetWorkstreamParams) (*protocol.SfGetWorkstreamResult, error)
- func (c *Client) SfHydrateWorkstreamContent(ctx context.Context, params protocol.SfHydrateWorkstreamContentParams) (*protocol.SfHydrateWorkstreamContentResult, error)
- func (c *Client) SfListActivities(ctx context.Context, params protocol.SfListActivitiesParams) (*protocol.SfListActivitiesResult, error)
- func (c *Client) SfListChanges(ctx context.Context, params protocol.SfListChangesParams) (*protocol.SfListChangesResult, error)
- func (c *Client) SfListEvents(ctx context.Context, params protocol.SfListEventsParams) (*protocol.SfListEventsResult, error)
- func (c *Client) SfListSignals(ctx context.Context, params protocol.SfListSignalsParams) (*protocol.SfListSignalsResult, error)
- func (c *Client) SfListWorkstreams(ctx context.Context, params protocol.SfListWorkstreamsParams) (*protocol.SfListWorkstreamsResult, error)
- func (c *Client) SfMarkEventsRead(ctx context.Context, params protocol.SfMarkEventsReadParams) (*protocol.SfMarkEventsReadResult, error)
- func (c *Client) SfMarkEventsUnread(ctx context.Context, params protocol.SfMarkEventsUnreadParams) (*protocol.SfMarkEventsUnreadResult, error)
- func (c *Client) SfPublishWorkstreamContent(ctx context.Context, params protocol.SfPublishWorkstreamContentParams) (*protocol.SfPublishWorkstreamContentResult, error)
- func (c *Client) SfResolveActivityReview(ctx context.Context, params protocol.SfResolveActivityReviewParams) (*protocol.SfResolveActivityReviewResult, error)
- func (c *Client) SfUpdateWorkstream(ctx context.Context, params protocol.SfUpdateWorkstreamParams) (*protocol.SfUpdateWorkstreamResult, error)
- func (c *Client) StartPullRequestLayerManifestGeneration(ctx context.Context, ...) (*protocol.StartPullRequestLayerManifestGenerationResult, error)
- func (c *Client) SubmitBugReport(ctx context.Context, params protocol.SubmitBugReportParams) (*protocol.SubmitBugReportResult, error)
- func (c *Client) SubmitMCPAuthCode(ctx context.Context, params protocol.SubmitMCPAuthCodeParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) SubmitMCPAuthError(ctx context.Context, params protocol.SubmitMCPAuthErrorParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) Subscribe(fn func(Notification)) (unsubscribe func())
- func (c *Client) ToggleMCPServer(ctx context.Context, params protocol.ToggleMCPServerParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) ToggleMCPTool(ctx context.Context, params protocol.ToggleMCPToolParams) (*protocol.MCPSuccessResult, error)
- func (c *Client) TriggerUpdate(ctx context.Context) (*protocol.TriggerUpdateResult, error)
- func (c *Client) TrustFolder(ctx context.Context, params protocol.TrustFolderParams) (*protocol.TrustFolderResult, error)
- func (c *Client) UnarchiveSession(ctx context.Context, params protocol.UnarchiveSessionParams) (*protocol.UnarchiveSessionResult, error)
- func (c *Client) UninstallPlugin(ctx context.Context, params protocol.UninstallPluginParams) (*protocol.UninstallPluginResult, error)
- func (c *Client) UpdateAutomation(ctx context.Context, params protocol.UpdateAutomationParams) (*protocol.UpdateAutomationResult, error)
- func (c *Client) UpdateAutomationModel(ctx context.Context, params protocol.UpdateAutomationModelParams) (*protocol.UpdateAutomationModelResult, error)
- func (c *Client) UpdateAutomationPrivacy(ctx context.Context, params protocol.UpdateAutomationPrivacyParams) (*protocol.UpdateAutomationPrivacyResult, error)
- func (c *Client) UpdateAutomationPrompt(ctx context.Context, params protocol.UpdateAutomationPromptParams) (*protocol.UpdateAutomationPromptResult, error)
- func (c *Client) UpdateAutomationSchedule(ctx context.Context, params protocol.UpdateAutomationScheduleParams) (*protocol.UpdateAutomationScheduleResult, error)
- func (c *Client) UpdateCron(ctx context.Context, params protocol.UpdateCronParams) (*protocol.UpdateCronResult, error)
- func (c *Client) UpdateMCPConfig(ctx context.Context, params protocol.UpdateMCPConfigParams) (*protocol.UpdateMCPConfigResult, error)
- func (c *Client) UpdateMarketplace(ctx context.Context, params protocol.UpdateMarketplaceParams) (*protocol.UpdateMarketplaceResult, error)
- func (c *Client) UpdatePlugin(ctx context.Context, params protocol.UpdatePluginParams) (*protocol.UpdatePluginResult, error)
- func (c *Client) UpdateSessionDefaults(ctx context.Context, params protocol.UpdateSessionDefaultsParams) (*protocol.UpdateSessionDefaultsResult, error)
- func (c *Client) UpdateSessionSettings(ctx context.Context, params protocol.UpdateSessionSettingsParams) (*protocol.UpdateSessionSettingsResult, error)
- func (c *Client) UpsertCustomModel(ctx context.Context, params protocol.UpsertCustomModelParams) (*protocol.UpsertCustomModelResult, error)
- func (c *Client) ValidateWorkingDirectory(ctx context.Context, params protocol.ValidateWorkingDirectoryParams) (*protocol.ValidateWorkingDirectoryResult, error)
- func (c *Client) WarmupCache(ctx context.Context, params protocol.WarmupCacheParams) (*protocol.WarmupCacheResult, error)
- func (c *Client) WriteTerminalData(ctx context.Context, params protocol.WriteTerminalDataParams) (*protocol.WriteDataResult, error)
- func (c *Client) WriteWorkspaceFileContent(ctx context.Context, params protocol.WriteWorkspaceFileContentParams) (*protocol.WriteWorkspaceFileContentResult, error)
- type ClosedError
- type Credential
- type DialError
- type Direction
- type Notification
- type Options
- type RPCError
- type Request
- type RequestHandler
- type TimeoutError
Constants ¶
const (
CodeAuthenticationError = -32001
)
JSON-RPC error codes the Daemon uses.
const Version = "0.1.0"
Version is this package's release, sent to the Daemon as the SDK version.
Variables ¶
var ErrClosed = errors.New("droid: connection closed")
ErrClosed is the error of a connection the Client closed.
Functions ¶
func RequestIDOf ¶
RequestIDOf is the id WithRequestID put on ctx, or "".
func WithRequestID ¶
WithRequestID makes the request Call sends with ctx carry id, which the notifications it causes refer to (as create_message's requestId).
func WithResponseHook ¶
WithResponseHook makes Call run fn with the result of the request it sends with ctx, on the read goroutine, as the response arrives and before any message that follows it is handled. fn must not block.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is one connection to the Daemon. Its methods are safe from any goroutine.
func (*Client) AcknowledgeMissionReadinessWarning ¶
func (c *Client) AcknowledgeMissionReadinessWarning(ctx context.Context, params protocol.AcknowledgeMissionReadinessWarningParams) (*protocol.AcknowledgeMissionReadinessWarningResult, error)
AcknowledgeMissionReadinessWarning calls daemon.acknowledge_mission_readiness_warning.
func (*Client) AddMCPServer ¶
func (c *Client) AddMCPServer(ctx context.Context, params protocol.AddMCPServerParams) (*protocol.MCPSuccessResult, error)
AddMCPServer calls daemon.add_mcp_server.
func (*Client) AddMarketplace ¶
func (c *Client) AddMarketplace(ctx context.Context, params protocol.AddMarketplaceParams) (*protocol.AddMarketplaceResult, error)
AddMarketplace calls daemon.add_marketplace.
func (*Client) AddUserMessage ¶
func (c *Client) AddUserMessage(ctx context.Context, params protocol.AddUserMessageParams) (*protocol.AddUserMessageResult, error)
AddUserMessage calls daemon.add_user_message.
func (*Client) ApplyAutomationConfig ¶
func (c *Client) ApplyAutomationConfig(ctx context.Context, params protocol.ApplyAutomationConfigParams) (*protocol.ApplyAutomationConfigResult, error)
ApplyAutomationConfig calls daemon.apply_automation_config.
func (*Client) ApplyUserPreferences ¶ added in v0.4.0
func (c *Client) ApplyUserPreferences(ctx context.Context, params protocol.ApplyUserPreferencesParams) (*protocol.DaemonApplyUserPreferencesResult, error)
ApplyUserPreferences calls daemon.apply_user_preferences.
func (*Client) ArchiveSession ¶
func (c *Client) ArchiveSession(ctx context.Context, params protocol.ArchiveSessionParams) (*protocol.ArchiveSessionResult, error)
ArchiveSession calls daemon.archive_session.
func (*Client) Authenticate ¶
func (c *Client) Authenticate(ctx context.Context, params protocol.AuthenticateParams) (*protocol.AuthenticateResult, error)
Authenticate calls daemon.authenticate.
func (*Client) AuthenticateMCPServer ¶
func (c *Client) AuthenticateMCPServer(ctx context.Context, params protocol.AuthenticateMCPServerParams) (*protocol.MCPSuccessResult, error)
AuthenticateMCPServer calls daemon.authenticate_mcp_server.
func (*Client) Call ¶
Call sends a request and decodes its result into result (when not nil). For a method the Daemon acknowledges first (protocol.Methods), Call waits for the notification that completes it.
func (*Client) CancelMCPAuth ¶
func (c *Client) CancelMCPAuth(ctx context.Context, params protocol.CancelMCPAuthParams) (*protocol.MCPSuccessResult, error)
CancelMCPAuth calls daemon.cancel_mcp_auth.
func (*Client) CancelSearchSessions ¶ added in v0.4.0
func (c *Client) CancelSearchSessions(ctx context.Context, params protocol.CancelSearchSessionsParams) (*protocol.CancelSearchSessionsResult, error)
CancelSearchSessions calls daemon.cancel_search_sessions.
func (*Client) ChangeWorkingDirectory ¶
func (c *Client) ChangeWorkingDirectory(ctx context.Context, params protocol.ChangeWorkingDirectoryParams) (*protocol.ChangeWorkingDirectoryResult, error)
ChangeWorkingDirectory calls daemon.change_working_directory.
func (*Client) CheckFolderTrust ¶
func (c *Client) CheckFolderTrust(ctx context.Context, params protocol.CheckFolderTrustParams) (*protocol.CheckFolderTrustResult, error)
CheckFolderTrust calls daemon.check_folder_trust.
func (*Client) CheckoutGitBranch ¶
func (c *Client) CheckoutGitBranch(ctx context.Context, params protocol.CheckoutGitBranchParams) (*protocol.DaemonCheckoutGitBranchResult, error)
CheckoutGitBranch calls daemon.checkout_git_branch.
func (*Client) CleanupWorktree ¶
func (c *Client) CleanupWorktree(ctx context.Context, params protocol.CleanupWorktreeParams) (*protocol.CleanupWorktreeResult, error)
CleanupWorktree calls daemon.cleanup_worktree.
func (*Client) ClearMCPAuth ¶
func (c *Client) ClearMCPAuth(ctx context.Context, params protocol.ClearMCPAuthParams) (*protocol.MCPSuccessResult, error)
ClearMCPAuth calls daemon.clear_mcp_auth.
func (*Client) CloseSession ¶
func (c *Client) CloseSession(ctx context.Context, params protocol.CloseSessionParams) (*protocol.CloseSessionResult, error)
CloseSession calls daemon.close_session.
func (*Client) CloseTerminal ¶
func (c *Client) CloseTerminal(ctx context.Context, params protocol.CloseTerminalParams) (*protocol.CloseTerminalResult, error)
CloseTerminal calls daemon.close_terminal.
func (*Client) CompactSession ¶
func (c *Client) CompactSession(ctx context.Context, params protocol.CompactSessionParams) (*protocol.CompactSessionResult, error)
CompactSession calls daemon.compact_session.
func (*Client) ConfigItems ¶ added in v0.4.0
func (c *Client) ConfigItems(ctx context.Context, params protocol.ConfigItemsParams) (*protocol.ConfigItemsResult, error)
ConfigItems calls daemon.config_items.
func (*Client) CreateAutomation ¶
func (c *Client) CreateAutomation(ctx context.Context, params protocol.CreateAutomationParams) (*protocol.CreateAutomationResult, error)
CreateAutomation calls daemon.create_automation.
func (*Client) CreateCron ¶
func (c *Client) CreateCron(ctx context.Context, params protocol.DaemonCreateCronRequestParams) (*protocol.CreateCronResult, error)
CreateCron calls daemon.create_cron.
func (*Client) CreatePR ¶
func (c *Client) CreatePR(ctx context.Context, params protocol.CreatePRParams) (*protocol.CreatePRResult, error)
CreatePR calls daemon.create_pr.
func (*Client) CreateTerminal ¶
func (c *Client) CreateTerminal(ctx context.Context, params protocol.CreateTerminalParams) (*protocol.CreateTerminalResult, error)
CreateTerminal calls daemon.create_terminal.
func (*Client) DeleteAutomation ¶
func (c *Client) DeleteAutomation(ctx context.Context, params protocol.DeleteAutomationParams) (*protocol.DeleteAutomationResult, error)
DeleteAutomation calls daemon.delete_automation.
func (*Client) DeleteCron ¶
func (c *Client) DeleteCron(ctx context.Context, params protocol.DeleteCronParams) (*protocol.DeleteCronResult, error)
DeleteCron calls daemon.delete_cron.
func (*Client) DeleteCustomModel ¶
func (c *Client) DeleteCustomModel(ctx context.Context, params protocol.DeleteCustomModelParams) (*protocol.DeleteCustomModelResult, error)
DeleteCustomModel calls daemon.delete_custom_model.
func (*Client) DeleteWorktreeSetupProfile ¶
func (c *Client) DeleteWorktreeSetupProfile(ctx context.Context, params protocol.DeleteWorktreeSetupProfileParams) (*protocol.DeleteWorktreeSetupProfileResult, error)
DeleteWorktreeSetupProfile calls daemon.delete_worktree_setup_profile.
func (*Client) DesktopEnsure ¶ added in v0.4.0
DesktopEnsure calls daemon.desktop.ensure.
func (*Client) DesktopInput ¶ added in v0.4.0
DesktopInput calls daemon.desktop.input.
func (*Client) DesktopStatus ¶ added in v0.4.0
DesktopStatus calls daemon.desktop.status.
func (*Client) DispatchAutomationRun ¶ added in v0.4.0
func (c *Client) DispatchAutomationRun(ctx context.Context, params protocol.DispatchAutomationRunParams) (*protocol.DaemonDispatchAutomationRunResult, error)
DispatchAutomationRun calls daemon.dispatch_automation_run.
func (*Client) Done ¶
func (c *Client) Done() <-chan struct{}
Done is closed when the connection ends; Err then says why.
func (*Client) ExecuteRewind ¶
func (c *Client) ExecuteRewind(ctx context.Context, params protocol.ExecuteRewindParams) (*protocol.ExecuteRewindResult, error)
ExecuteRewind calls daemon.execute_rewind.
func (*Client) ForkAutomation ¶
func (c *Client) ForkAutomation(ctx context.Context, params protocol.ForkAutomationParams) (*protocol.ForkAutomationResult, error)
ForkAutomation calls daemon.fork_automation.
func (*Client) ForkSession ¶
func (c *Client) ForkSession(ctx context.Context, params protocol.ForkSessionParams) (*protocol.ForkSessionResult, error)
ForkSession calls daemon.fork_session.
func (*Client) GenerateSemanticDiff ¶
func (c *Client) GenerateSemanticDiff(ctx context.Context, params protocol.GenerateSemanticDiffParams) (*protocol.GenerateSemanticDiffResult, error)
GenerateSemanticDiff calls daemon.generate_semantic_diff.
func (*Client) GetAutomationHistory ¶
func (c *Client) GetAutomationHistory(ctx context.Context, params protocol.GetAutomationHistoryParams) (*protocol.GetAutomationHistoryResult, error)
GetAutomationHistory calls daemon.get_automation_history.
func (*Client) GetAutomationVisual ¶
func (c *Client) GetAutomationVisual(ctx context.Context, params protocol.GetAutomationVisualParams) (*protocol.GetAutomationVisualResult, error)
GetAutomationVisual calls daemon.get_automation_visual.
func (*Client) GetCheckoutMetadata ¶ added in v0.4.0
func (c *Client) GetCheckoutMetadata(ctx context.Context, params protocol.GetCheckoutMetadataParams) (*protocol.GetCheckoutMetadataResult, error)
GetCheckoutMetadata calls daemon.get_checkout_metadata.
func (*Client) GetContextBreakdown ¶
func (c *Client) GetContextBreakdown(ctx context.Context, params protocol.GetContextBreakdownParams) (*protocol.GetContextBreakdownResult, error)
GetContextBreakdown calls daemon.get_context_breakdown.
func (*Client) GetDefaultSettings ¶
func (c *Client) GetDefaultSettings(ctx context.Context, params protocol.GetDefaultSettingsParams) (*protocol.GetDefaultSettingsResult, error)
GetDefaultSettings calls daemon.get_default_settings.
func (*Client) GetGitBranchDivergence ¶
func (c *Client) GetGitBranchDivergence(ctx context.Context, params protocol.GetGitBranchDivergenceParams) (*protocol.DaemonGetGitBranchDivergenceResult, error)
GetGitBranchDivergence calls daemon.get_git_branch_divergence.
func (*Client) GetGitDiff ¶
func (c *Client) GetGitDiff(ctx context.Context, params protocol.GetGitDiffParams) (*protocol.GetGitDiffResult, error)
GetGitDiff calls daemon.get_git_diff.
func (*Client) GetGitDiffFileContents ¶ added in v0.4.0
func (c *Client) GetGitDiffFileContents(ctx context.Context, params protocol.GetGitDiffFileContentsParams) (*protocol.GetGitDiffFileContentsResult, error)
GetGitDiffFileContents calls daemon.get_git_diff_file_contents.
func (*Client) GetMCPConfig ¶
GetMCPConfig calls daemon.get_mcp_config.
func (*Client) GetProxyToken ¶
func (c *Client) GetProxyToken(ctx context.Context, params json.RawMessage) (*protocol.GetProxyTokenResult, error)
GetProxyToken calls daemon.get_proxy_token.
func (*Client) GetRewindInfo ¶
func (c *Client) GetRewindInfo(ctx context.Context, params protocol.GetRewindInfoParams) (*protocol.GetRewindInfoResult, error)
GetRewindInfo calls daemon.get_rewind_info.
func (*Client) GetSemanticDiffCache ¶
func (c *Client) GetSemanticDiffCache(ctx context.Context, params protocol.GetSemanticDiffCacheParams) (*protocol.GetSemanticDiffCacheResult, error)
GetSemanticDiffCache calls daemon.get_semantic_diff_cache.
func (*Client) GetSessionMessages ¶
func (c *Client) GetSessionMessages(ctx context.Context, params protocol.GetSessionMessagesParams) (*protocol.GetSessionMessagesResult, error)
GetSessionMessages calls daemon.get_session_messages.
func (*Client) GetSessionTurnOutcome ¶ added in v0.4.0
func (c *Client) GetSessionTurnOutcome(ctx context.Context, params protocol.GetSessionTurnOutcomeParams) (*protocol.DaemonGetSessionTurnOutcomeResult, error)
GetSessionTurnOutcome calls daemon.get_session_turn_outcome.
func (*Client) GetUserPreferencesState ¶ added in v0.4.0
func (c *Client) GetUserPreferencesState(ctx context.Context, params protocol.GetUserPreferencesStateParams) (*protocol.DaemonGetUserPreferencesStateResult, error)
GetUserPreferencesState calls daemon.get_user_preferences_state.
func (*Client) GetWorkspaceFileContent ¶
func (c *Client) GetWorkspaceFileContent(ctx context.Context, params protocol.GetWorkspaceFileContentParams) (*protocol.GetWorkspaceFileContentResult, error)
GetWorkspaceFileContent calls daemon.get_workspace_file_content.
func (*Client) GitCommit ¶
func (c *Client) GitCommit(ctx context.Context, params protocol.GitCommitParams) (*protocol.GitCommitResult, error)
GitCommit calls daemon.git_commit.
func (*Client) GitPush ¶
func (c *Client) GitPush(ctx context.Context, params protocol.GitPushParams) (*protocol.GitPushResult, error)
GitPush calls daemon.git_push.
func (*Client) Handle ¶
func (c *Client) Handle(method string, h RequestHandler)
Handle sets the handler of a request the Daemon sends (see protocol.ServerRequest*). A request without a handler is answered with an error.
func (*Client) HandleLater ¶
HandleLater sets fn to receive the requests of method without answering them: answer each with Respond. fn runs on the read goroutine and must not block.
func (*Client) HoldSessionCrons ¶
func (c *Client) HoldSessionCrons(ctx context.Context, params protocol.HoldSessionCronsParams) (*protocol.HoldSessionCronsResult, error)
HoldSessionCrons calls daemon.hold_session_crons.
func (*Client) InitializeSession ¶
func (c *Client) InitializeSession(ctx context.Context, params protocol.InitializeSessionParams) (*protocol.InitializeSessionResult, error)
InitializeSession calls daemon.initialize_session.
func (*Client) InspectMissionReadiness ¶
func (c *Client) InspectMissionReadiness(ctx context.Context, params protocol.InspectMissionReadinessParams) (*protocol.InspectMissionReadinessResult, error)
InspectMissionReadiness calls daemon.inspect_mission_readiness.
func (*Client) InspectWorktreeDeletion ¶
func (c *Client) InspectWorktreeDeletion(ctx context.Context, params protocol.InspectWorktreeDeletionParams) (*protocol.InspectWorktreeDeletionResult, error)
InspectWorktreeDeletion calls daemon.inspect_worktree_deletion.
func (*Client) InstallPlugin ¶
func (c *Client) InstallPlugin(ctx context.Context, params protocol.InstallPluginParams) (*protocol.InstallPluginResult, error)
InstallPlugin calls daemon.install_plugin.
func (*Client) InstallSSHKey ¶
func (c *Client) InstallSSHKey(ctx context.Context, params protocol.InstallSSHKeyParams) (*protocol.InstallSSHKeyResult, error)
InstallSSHKey calls daemon.install_ssh_key.
func (*Client) InterruptSession ¶
func (c *Client) InterruptSession(ctx context.Context, params protocol.InterruptSessionParams) (*protocol.InterruptSessionResult, error)
InterruptSession calls daemon.interrupt_session.
func (*Client) KillBackgroundProcess ¶ added in v0.4.0
func (c *Client) KillBackgroundProcess(ctx context.Context, params protocol.KillBackgroundProcessParams) (*protocol.KillBackgroundProcessResult, error)
KillBackgroundProcess calls daemon.kill_background_process.
func (*Client) KillWorkerSession ¶
func (c *Client) KillWorkerSession(ctx context.Context, params protocol.KillWorkerSessionParams) (*protocol.KillWorkerSessionResult, error)
KillWorkerSession calls daemon.kill_worker_session.
func (*Client) ListAutomations ¶
func (c *Client) ListAutomations(ctx context.Context, params protocol.ListAutomationsParams) (*protocol.ListAutomationsResult, error)
ListAutomations calls daemon.list_automations.
func (*Client) ListAvailablePlugins ¶
func (c *Client) ListAvailablePlugins(ctx context.Context, params protocol.ListAvailablePluginsParams) (*protocol.ListAvailablePluginsResult, error)
ListAvailablePlugins calls daemon.list_available_plugins.
func (*Client) ListAvailableSessions ¶
func (c *Client) ListAvailableSessions(ctx context.Context, params protocol.ListAvailableSessionsParams) (*protocol.ListAvailableSessionsResult, error)
ListAvailableSessions calls daemon.list_available_sessions.
func (*Client) ListCommands ¶
func (c *Client) ListCommands(ctx context.Context, params protocol.ListCommandsParams) (*protocol.ListCommandsResult, error)
ListCommands calls daemon.list_commands.
func (*Client) ListCrons ¶
func (c *Client) ListCrons(ctx context.Context, params protocol.ListCronsParams) (*protocol.ListCronsResult, error)
ListCrons calls daemon.list_crons.
func (*Client) ListCustomModels ¶
ListCustomModels calls daemon.list_custom_models.
func (*Client) ListFiles ¶
func (c *Client) ListFiles(ctx context.Context, params protocol.ListFilesParams) (*protocol.ListFilesResult, error)
ListFiles calls daemon.list_files.
func (*Client) ListGitBranches ¶
func (c *Client) ListGitBranches(ctx context.Context, params protocol.ListGitBranchesParams) (*protocol.ListGitBranchesResult, error)
ListGitBranches calls daemon.list_git_branches.
func (*Client) ListInstalledPlugins ¶
func (c *Client) ListInstalledPlugins(ctx context.Context, params protocol.ListInstalledPluginsParams) (*protocol.ListInstalledPluginsResult, error)
ListInstalledPlugins calls daemon.list_installed_plugins.
func (*Client) ListMCPRegistry ¶
func (c *Client) ListMCPRegistry(ctx context.Context, params protocol.ListMCPRegistryParams) (*protocol.ListMCPRegistryResult, error)
ListMCPRegistry calls daemon.list_mcp_registry.
func (*Client) ListMCPServers ¶
func (c *Client) ListMCPServers(ctx context.Context, params protocol.ListMCPServersParams) (*protocol.ListMCPServersResult, error)
ListMCPServers calls daemon.list_mcp_servers.
func (*Client) ListMCPTools ¶
func (c *Client) ListMCPTools(ctx context.Context, params protocol.ListMCPToolsParams) (*protocol.ListMCPToolsResult, error)
ListMCPTools calls daemon.list_mcp_tools.
func (*Client) ListManagedWorktrees ¶
func (c *Client) ListManagedWorktrees(ctx context.Context, params protocol.ListManagedWorktreesParams) (*protocol.ListManagedWorktreesResult, error)
ListManagedWorktrees calls daemon.list_managed_worktrees.
func (*Client) ListMarketplaces ¶
func (c *Client) ListMarketplaces(ctx context.Context, params protocol.ListMarketplacesParams) (*protocol.ListMarketplacesResult, error)
ListMarketplaces calls daemon.list_marketplaces.
func (*Client) ListModels ¶
func (c *Client) ListModels(ctx context.Context, params protocol.ListModelsParams) (*protocol.ListModelsResult, error)
ListModels calls daemon.list_models.
func (*Client) ListOpenedSessions ¶
func (c *Client) ListOpenedSessions(ctx context.Context, params protocol.ListOpenedSessionsParams) (*protocol.ListOpenedSessionsResult, error)
ListOpenedSessions calls daemon.list_opened_sessions.
func (*Client) ListSkills ¶
func (c *Client) ListSkills(ctx context.Context, params protocol.ListSkillsParams) (*protocol.ListSkillsResult, error)
ListSkills calls daemon.list_skills.
func (*Client) ListTerminals ¶
func (c *Client) ListTerminals(ctx context.Context, params protocol.ListTerminalsParams) (*protocol.ListTerminalsResult, error)
ListTerminals calls daemon.list_terminals.
func (*Client) ListWorktreeSetupProfiles ¶
func (c *Client) ListWorktreeSetupProfiles(ctx context.Context, params protocol.ListWorktreeSetupProfilesParams) (*protocol.ListWorktreeSetupProfilesResult, error)
ListWorktreeSetupProfiles calls daemon.list_worktree_setup_profiles.
func (*Client) LoadSession ¶
func (c *Client) LoadSession(ctx context.Context, params protocol.LoadSessionParams) (*protocol.LoadSessionResult, error)
LoadSession calls daemon.load_session.
func (*Client) PauseAutomation ¶
func (c *Client) PauseAutomation(ctx context.Context, params protocol.PauseAutomationParams) (*protocol.PauseAutomationResult, error)
PauseAutomation calls daemon.pause_automation.
func (*Client) PullURLToCwdFile ¶
func (c *Client) PullURLToCwdFile(ctx context.Context, params protocol.PullURLToCwdFileParams) (*protocol.PullURLToCwdFileResult, error)
PullURLToCwdFile calls daemon.pull_url_to_cwd_file.
func (*Client) PushCwdFileToURL ¶
func (c *Client) PushCwdFileToURL(ctx context.Context, params protocol.PushCwdFileToURLParams) (*protocol.PushCwdFileToURLResult, error)
PushCwdFileToURL calls daemon.push_cwd_file_to_url.
func (*Client) RefreshConnectorToolCatalog ¶ added in v0.4.0
func (c *Client) RefreshConnectorToolCatalog(ctx context.Context) (*protocol.RefreshConnectorToolCatalogResult, error)
RefreshConnectorToolCatalog calls daemon.refresh_connector_tool_catalog.
func (*Client) RelayGetStatus ¶
RelayGetStatus calls daemon.relay.get_status.
func (*Client) RelayStart ¶
func (c *Client) RelayStart(ctx context.Context, params protocol.RelayStartParams) (*protocol.RelayStartResult, error)
RelayStart calls daemon.relay.start.
func (*Client) RemoveMCPServer ¶
func (c *Client) RemoveMCPServer(ctx context.Context, params protocol.RemoveMCPServerParams) (*protocol.MCPSuccessResult, error)
RemoveMCPServer calls daemon.remove_mcp_server.
func (*Client) RemoveMarketplace ¶
func (c *Client) RemoveMarketplace(ctx context.Context, params protocol.RemoveMarketplaceParams) (*protocol.RemoveMarketplaceResult, error)
RemoveMarketplace calls daemon.remove_marketplace.
func (*Client) RenameAutomation ¶
func (c *Client) RenameAutomation(ctx context.Context, params protocol.RenameAutomationParams) (*protocol.RenameAutomationResult, error)
RenameAutomation calls daemon.rename_automation.
func (*Client) RenameSession ¶
func (c *Client) RenameSession(ctx context.Context, params protocol.RenameSessionParams) (*protocol.RenameSessionResult, error)
RenameSession calls daemon.rename_session.
func (*Client) ResizeTerminal ¶
func (c *Client) ResizeTerminal(ctx context.Context, params protocol.ResizeTerminalParams) (*protocol.ResizeResult, error)
ResizeTerminal calls daemon.resize_terminal.
func (*Client) ResolvePullRequestStatuses ¶
func (c *Client) ResolvePullRequestStatuses(ctx context.Context, params protocol.ResolvePullRequestStatusesParams) (*protocol.ResolvePullRequestStatusesResult, error)
ResolvePullRequestStatuses calls daemon.resolve_pull_request_statuses.
func (*Client) ResolveQueuedUserMessage ¶
func (c *Client) ResolveQueuedUserMessage(ctx context.Context, params json.RawMessage) (*protocol.ResolveQueuedUserMessageResult, error)
ResolveQueuedUserMessage calls daemon.resolve_queued_user_message.
func (*Client) ResolveUserPreferences ¶ added in v0.4.0
func (c *Client) ResolveUserPreferences(ctx context.Context, params protocol.ResolveUserPreferencesParams) (*protocol.DaemonResolveUserPreferencesResult, error)
ResolveUserPreferences calls daemon.resolve_user_preferences.
func (*Client) Respond ¶
Respond sends the result of a request the Daemon sent. The Daemon also takes the answer to a request it sent another connection, as one restored by daemon.load_session.
func (*Client) ResumeAutomation ¶
func (c *Client) ResumeAutomation(ctx context.Context, params protocol.ResumeAutomationParams) (*protocol.ResumeAutomationResult, error)
ResumeAutomation calls daemon.resume_automation.
func (*Client) ResumeSessionCrons ¶
func (c *Client) ResumeSessionCrons(ctx context.Context, params protocol.ResumeSessionCronsParams) (*protocol.ResumeSessionCronsResult, error)
ResumeSessionCrons calls daemon.resume_session_crons.
func (*Client) RunAutomation ¶
func (c *Client) RunAutomation(ctx context.Context, params protocol.RunAutomationParams) (*protocol.RunAutomationResult, error)
RunAutomation calls daemon.run_automation.
func (*Client) SaveSemanticDiffCache ¶
func (c *Client) SaveSemanticDiffCache(ctx context.Context, params protocol.SaveSemanticDiffCacheParams) (*protocol.SaveSemanticDiffCacheResult, error)
SaveSemanticDiffCache calls daemon.save_semantic_diff_cache.
func (*Client) SaveWorktreeSetupProfile ¶
func (c *Client) SaveWorktreeSetupProfile(ctx context.Context, params protocol.SaveWorktreeSetupProfileParams) (*protocol.SaveWorktreeSetupProfileResult, error)
SaveWorktreeSetupProfile calls daemon.save_worktree_setup_profile.
func (*Client) SearchFiles ¶
func (c *Client) SearchFiles(ctx context.Context, params protocol.SearchFilesParams) (*protocol.SearchFilesResult, error)
SearchFiles calls daemon.search_files.
func (*Client) SearchSessions ¶
func (c *Client) SearchSessions(ctx context.Context, params protocol.SearchSessionsParams) (*protocol.SearchSessionsResult, error)
SearchSessions calls daemon.search_sessions.
func (*Client) SetPluginEnabled ¶
func (c *Client) SetPluginEnabled(ctx context.Context, params protocol.SetPluginEnabledParams) (*protocol.SetPluginEnabledResult, error)
SetPluginEnabled calls daemon.set_plugin_enabled.
func (*Client) SetSkillDisabled ¶
func (c *Client) SetSkillDisabled(ctx context.Context, params protocol.SetSkillDisabledParams) (*protocol.SetSkillDisabledResult, error)
SetSkillDisabled calls daemon.set_skill_disabled.
func (*Client) SfCreateWorkstream ¶
func (c *Client) SfCreateWorkstream(ctx context.Context, params protocol.SfCreateWorkstreamParams) (*protocol.SfCreateWorkstreamResult, error)
SfCreateWorkstream calls daemon.sf.create_workstream.
func (*Client) SfDeleteWorkstream ¶
func (c *Client) SfDeleteWorkstream(ctx context.Context, params protocol.SfDeleteWorkstreamParams) (*protocol.SfDeleteWorkstreamResult, error)
SfDeleteWorkstream calls daemon.sf.delete_workstream.
func (*Client) SfGetWorkstream ¶
func (c *Client) SfGetWorkstream(ctx context.Context, params protocol.SfGetWorkstreamParams) (*protocol.SfGetWorkstreamResult, error)
SfGetWorkstream calls daemon.sf.get_workstream.
func (*Client) SfHydrateWorkstreamContent ¶
func (c *Client) SfHydrateWorkstreamContent(ctx context.Context, params protocol.SfHydrateWorkstreamContentParams) (*protocol.SfHydrateWorkstreamContentResult, error)
SfHydrateWorkstreamContent calls daemon.sf.hydrate_workstream_content.
func (*Client) SfListActivities ¶
func (c *Client) SfListActivities(ctx context.Context, params protocol.SfListActivitiesParams) (*protocol.SfListActivitiesResult, error)
SfListActivities calls daemon.sf.list_activities.
func (*Client) SfListChanges ¶
func (c *Client) SfListChanges(ctx context.Context, params protocol.SfListChangesParams) (*protocol.SfListChangesResult, error)
SfListChanges calls daemon.sf.list_changes.
func (*Client) SfListEvents ¶
func (c *Client) SfListEvents(ctx context.Context, params protocol.SfListEventsParams) (*protocol.SfListEventsResult, error)
SfListEvents calls daemon.sf.list_events.
func (*Client) SfListSignals ¶
func (c *Client) SfListSignals(ctx context.Context, params protocol.SfListSignalsParams) (*protocol.SfListSignalsResult, error)
SfListSignals calls daemon.sf.list_signals.
func (*Client) SfListWorkstreams ¶
func (c *Client) SfListWorkstreams(ctx context.Context, params protocol.SfListWorkstreamsParams) (*protocol.SfListWorkstreamsResult, error)
SfListWorkstreams calls daemon.sf.list_workstreams.
func (*Client) SfMarkEventsRead ¶
func (c *Client) SfMarkEventsRead(ctx context.Context, params protocol.SfMarkEventsReadParams) (*protocol.SfMarkEventsReadResult, error)
SfMarkEventsRead calls daemon.sf.mark_events_read.
func (*Client) SfMarkEventsUnread ¶
func (c *Client) SfMarkEventsUnread(ctx context.Context, params protocol.SfMarkEventsUnreadParams) (*protocol.SfMarkEventsUnreadResult, error)
SfMarkEventsUnread calls daemon.sf.mark_events_unread.
func (*Client) SfPublishWorkstreamContent ¶
func (c *Client) SfPublishWorkstreamContent(ctx context.Context, params protocol.SfPublishWorkstreamContentParams) (*protocol.SfPublishWorkstreamContentResult, error)
SfPublishWorkstreamContent calls daemon.sf.publish_workstream_content.
func (*Client) SfResolveActivityReview ¶
func (c *Client) SfResolveActivityReview(ctx context.Context, params protocol.SfResolveActivityReviewParams) (*protocol.SfResolveActivityReviewResult, error)
SfResolveActivityReview calls daemon.sf.resolve_activity_review.
func (*Client) SfUpdateWorkstream ¶
func (c *Client) SfUpdateWorkstream(ctx context.Context, params protocol.SfUpdateWorkstreamParams) (*protocol.SfUpdateWorkstreamResult, error)
SfUpdateWorkstream calls daemon.sf.update_workstream.
func (*Client) StartPullRequestLayerManifestGeneration ¶ added in v0.4.0
func (c *Client) StartPullRequestLayerManifestGeneration(ctx context.Context, params protocol.StartPullRequestLayerManifestGenerationParams) (*protocol.StartPullRequestLayerManifestGenerationResult, error)
StartPullRequestLayerManifestGeneration calls daemon.start_pull_request_layer_manifest_generation.
func (*Client) SubmitBugReport ¶
func (c *Client) SubmitBugReport(ctx context.Context, params protocol.SubmitBugReportParams) (*protocol.SubmitBugReportResult, error)
SubmitBugReport calls daemon.submit_bug_report.
func (*Client) SubmitMCPAuthCode ¶
func (c *Client) SubmitMCPAuthCode(ctx context.Context, params protocol.SubmitMCPAuthCodeParams) (*protocol.MCPSuccessResult, error)
SubmitMCPAuthCode calls daemon.submit_mcp_auth_code.
func (*Client) SubmitMCPAuthError ¶
func (c *Client) SubmitMCPAuthError(ctx context.Context, params protocol.SubmitMCPAuthErrorParams) (*protocol.MCPSuccessResult, error)
SubmitMCPAuthError calls daemon.submit_mcp_auth_error.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(fn func(Notification)) (unsubscribe func())
Subscribe calls fn with every notification, on the connection's read goroutine, in order; fn must not block. The returned function unsubscribes.
func (*Client) ToggleMCPServer ¶
func (c *Client) ToggleMCPServer(ctx context.Context, params protocol.ToggleMCPServerParams) (*protocol.MCPSuccessResult, error)
ToggleMCPServer calls daemon.toggle_mcp_server.
func (*Client) ToggleMCPTool ¶
func (c *Client) ToggleMCPTool(ctx context.Context, params protocol.ToggleMCPToolParams) (*protocol.MCPSuccessResult, error)
ToggleMCPTool calls daemon.toggle_mcp_tool.
func (*Client) TriggerUpdate ¶
TriggerUpdate calls daemon.trigger_update.
func (*Client) TrustFolder ¶
func (c *Client) TrustFolder(ctx context.Context, params protocol.TrustFolderParams) (*protocol.TrustFolderResult, error)
TrustFolder calls daemon.trust_folder.
func (*Client) UnarchiveSession ¶
func (c *Client) UnarchiveSession(ctx context.Context, params protocol.UnarchiveSessionParams) (*protocol.UnarchiveSessionResult, error)
UnarchiveSession calls daemon.unarchive_session.
func (*Client) UninstallPlugin ¶
func (c *Client) UninstallPlugin(ctx context.Context, params protocol.UninstallPluginParams) (*protocol.UninstallPluginResult, error)
UninstallPlugin calls daemon.uninstall_plugin.
func (*Client) UpdateAutomation ¶
func (c *Client) UpdateAutomation(ctx context.Context, params protocol.UpdateAutomationParams) (*protocol.UpdateAutomationResult, error)
UpdateAutomation calls daemon.update_automation.
func (*Client) UpdateAutomationModel ¶
func (c *Client) UpdateAutomationModel(ctx context.Context, params protocol.UpdateAutomationModelParams) (*protocol.UpdateAutomationModelResult, error)
UpdateAutomationModel calls daemon.update_automation_model.
func (*Client) UpdateAutomationPrivacy ¶
func (c *Client) UpdateAutomationPrivacy(ctx context.Context, params protocol.UpdateAutomationPrivacyParams) (*protocol.UpdateAutomationPrivacyResult, error)
UpdateAutomationPrivacy calls daemon.update_automation_privacy.
func (*Client) UpdateAutomationPrompt ¶
func (c *Client) UpdateAutomationPrompt(ctx context.Context, params protocol.UpdateAutomationPromptParams) (*protocol.UpdateAutomationPromptResult, error)
UpdateAutomationPrompt calls daemon.update_automation_prompt.
func (*Client) UpdateAutomationSchedule ¶
func (c *Client) UpdateAutomationSchedule(ctx context.Context, params protocol.UpdateAutomationScheduleParams) (*protocol.UpdateAutomationScheduleResult, error)
UpdateAutomationSchedule calls daemon.update_automation_schedule.
func (*Client) UpdateCron ¶
func (c *Client) UpdateCron(ctx context.Context, params protocol.UpdateCronParams) (*protocol.UpdateCronResult, error)
UpdateCron calls daemon.update_cron.
func (*Client) UpdateMCPConfig ¶
func (c *Client) UpdateMCPConfig(ctx context.Context, params protocol.UpdateMCPConfigParams) (*protocol.UpdateMCPConfigResult, error)
UpdateMCPConfig calls daemon.update_mcp_config.
func (*Client) UpdateMarketplace ¶
func (c *Client) UpdateMarketplace(ctx context.Context, params protocol.UpdateMarketplaceParams) (*protocol.UpdateMarketplaceResult, error)
UpdateMarketplace calls daemon.update_marketplace.
func (*Client) UpdatePlugin ¶
func (c *Client) UpdatePlugin(ctx context.Context, params protocol.UpdatePluginParams) (*protocol.UpdatePluginResult, error)
UpdatePlugin calls daemon.update_plugin.
func (*Client) UpdateSessionDefaults ¶
func (c *Client) UpdateSessionDefaults(ctx context.Context, params protocol.UpdateSessionDefaultsParams) (*protocol.UpdateSessionDefaultsResult, error)
UpdateSessionDefaults calls daemon.update_session_defaults.
func (*Client) UpdateSessionSettings ¶
func (c *Client) UpdateSessionSettings(ctx context.Context, params protocol.UpdateSessionSettingsParams) (*protocol.UpdateSessionSettingsResult, error)
UpdateSessionSettings calls daemon.update_session_settings.
func (*Client) UpsertCustomModel ¶
func (c *Client) UpsertCustomModel(ctx context.Context, params protocol.UpsertCustomModelParams) (*protocol.UpsertCustomModelResult, error)
UpsertCustomModel calls daemon.upsert_custom_model.
func (*Client) ValidateWorkingDirectory ¶
func (c *Client) ValidateWorkingDirectory(ctx context.Context, params protocol.ValidateWorkingDirectoryParams) (*protocol.ValidateWorkingDirectoryResult, error)
ValidateWorkingDirectory calls daemon.validate_working_directory.
func (*Client) WarmupCache ¶ added in v0.4.0
func (c *Client) WarmupCache(ctx context.Context, params protocol.WarmupCacheParams) (*protocol.WarmupCacheResult, error)
WarmupCache calls daemon.warmup_cache.
func (*Client) WriteTerminalData ¶
func (c *Client) WriteTerminalData(ctx context.Context, params protocol.WriteTerminalDataParams) (*protocol.WriteDataResult, error)
WriteTerminalData calls daemon.write_terminal_data.
func (*Client) WriteWorkspaceFileContent ¶
func (c *Client) WriteWorkspaceFileContent(ctx context.Context, params protocol.WriteWorkspaceFileContentParams) (*protocol.WriteWorkspaceFileContentResult, error)
WriteWorkspaceFileContent calls daemon.write_workspace_file_content.
type ClosedError ¶
type ClosedError struct {
Status websocket.StatusCode
Err error
}
ClosedError is a connection the Daemon or the network closed.
func (*ClosedError) Error ¶
func (e *ClosedError) Error() string
func (*ClosedError) Unwrap ¶
func (e *ClosedError) Unwrap() error
type Credential ¶
Credential is what daemon.authenticate accepts: a Factory API key or an access token.
type DialError ¶
DialError is a failure to open the WebSocket; StatusCode is the HTTP status of a refused handshake (401: a Gateway refused the token; 503: the Daemon is not running behind it).
type Notification ¶
type Notification struct {
Method string
Params json.RawMessage
}
Notification is a message the Daemon sends unasked.
type Options ¶
type Options struct {
// URL of the Daemon's WebSocket, as ws://127.0.0.1:<port>, or of a
// Gateway that forwards to it.
URL string
// Credential authenticates the connection (daemon.authenticate). Leave
// it nil to connect without authenticating, as a trusted transport does.
Credential *Credential
// Caller and Surface say which kind of client this is; they default to
// "go-sdk" and "sdk". The Daemon refuses caller "sdk" without SDK
// metadata, whose language can only be typescript or python.
Caller string
Surface string
// RequestTimeout bounds a request that its context does not; 30s by
// default. Some methods take longer (protocol.Methods).
RequestTimeout time.Duration
// ConnectTimeout bounds opening the socket; 5s by default.
ConnectTimeout time.Duration
// Header is sent with the WebSocket handshake.
Header http.Header
// Record, when set, sees every frame as it is sent or received, for
// tests and diagnosis. It must not keep the slice.
Record func(dir Direction, frame []byte)
// BeforeCall, when set, runs before every request with its method and
// the sessionId of its params ("" when it has none); an error fails the
// request. Its ctx has the request's deadline but not its id or
// response hook, which a call it makes must not take.
BeforeCall func(ctx context.Context, method, sessionID string) error
Logger *slog.Logger
}
Options configure a connection.
type RPCError ¶
type RPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data json.RawMessage `json:"data,omitempty"`
}
RPCError is an error the Daemon answered a request with.
type Request ¶
type Request struct {
ID string
Method string
Params json.RawMessage
}
Request is a request the Daemon sent the Client.
type RequestHandler ¶
RequestHandler answers a request the Daemon sends the Client (a permission or AskUser prompt). The result is sent back as the response.
type TimeoutError ¶
TimeoutError is a request that got no answer in time.
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
func (*TimeoutError) Unwrap ¶
func (e *TimeoutError) Unwrap() error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package controller keeps a connection to the Droid Daemon usable and the Sessions loaded over it current: it connects and authenticates, reconnects after the connection drops and loads the Sessions again, tracks pending permission and AskUser prompts (keeping an answer given while a Session's worker is gone until the worker is back), and applies every session notification to a session.Manager.
|
Package controller keeps a connection to the Droid Daemon usable and the Sessions loaded over it current: it connects and authenticates, reconnects after the connection drops and loads the Sessions again, tracks pending permission and AskUser prompts (keeping an answer given while a Session's worker is gone until the worker is back), and applies every session notification to a session.Manager. |
|
Package fakedaemon runs the Fake Daemon (../fake-daemon), the Node stand-in for `droid daemon` and droi's Gateway, for Go tests.
|
Package fakedaemon runs the Fake Daemon (../fake-daemon), the Node stand-in for `droid daemon` and droi's Gateway, for Go tests. |
|
Package protocol holds the Droid Daemon's wire types, generated from the zod schemas of @factory/droid-sdk (see gen/).
|
Package protocol holds the Droid Daemon's wire types, generated from the zod schemas of @factory/droid-sdk (see gen/). |
|
Package session keeps the state of the Daemon's Sessions as one Client sees it: each Session's transcript, working state, settings, token usage, task list, queued and optimistic user messages, and how subagent Sessions hang under their parents.
|
Package session keeps the state of the Daemon's Sessions as one Client sees it: each Session's transcript, working state, settings, token usage, task list, queued and optimistic user messages, and how subagent Sessions hang under their parents. |