Versions in this module Expand all Collapse all v0 v0.0.4 Nov 26, 2026 Changes in this version + const ErrCodeMCPUnavailable + var ErrAlreadyRunning = errors.New("daemon: server is already running") + var ErrEmptyMessage = session.ErrEmptyMessage + var ErrEmptyWorkspace = errors.New("daemon: workspace parameter is required") + var ErrInvalidConfig = errors.New("daemon: invalid configuration") + var ErrSessionRunning = session.ErrSessionRunning + func DefaultLockPath() (string, error) + func DefaultSocketPath() (string, error) + func LockPathForSocket(socketPath string) string + type Config struct + DisableMCPAutoConnect bool + GatewayPool gateway.Pool + LockPath string + Logger log.Interface + SocketPath string + func (c Config) Validate() error + type Daemon struct + func New(cfg Config) (*Daemon, error) + func (d *Daemon) AddPermissionRule(ctx context.Context, rawWS string, req api.PermissionRuleRequest) (*api.PermissionsResponse, error) + func (d *Daemon) AddSubscriber(_ context.Context, subscriberID, since string, topics ...string) (*broker.Subscriber, []string, error) + func (d *Daemon) AllowMCPPolicy(ctx context.Context, rawWS, name string, req api.MCPAllowPolicyRequest) (api.MCPServer, error) + func (d *Daemon) AssignModelAliases(ctx context.Context, rawWS string, req api.AssignModelAliasesRequest) (*api.AssignModelAliasesResponse, error) + func (d *Daemon) AuthenticateMCP(ctx context.Context, rawWS, name string) (api.MCPAuthResponse, error) + func (d *Daemon) Cancel(ctx context.Context, rawWS, id string) error + func (d *Daemon) Changes(ctx context.Context, rawWS, id string) ([]api.FileChange, error) + func (d *Daemon) Close(ctx context.Context) error + func (d *Daemon) CompleteMCPAuth(ctx context.Context, rawWS, name string, req api.MCPAuthCallbackRequest) error + func (d *Daemon) CompleteProviderAuth(ctx context.Context, provider string, req api.ProviderAuthCallbackRequest) (*api.ProviderAuthResponse, error) + func (d *Daemon) CreateProvider(ctx context.Context, rawWS string, req api.CreateProviderRequest) (*api.WorkspaceProvider, error) + func (d *Daemon) CreateSession(ctx context.Context, rawWS string, req api.CreateSessionRequest) (*api.Session, bool, error) + func (d *Daemon) DeleteSession(ctx context.Context, rawWS, id string) error + func (d *Daemon) Diff(ctx context.Context, rawWS, id, path, entryID string) (*api.DiffResponse, error) + func (d *Daemon) Done() <-chan struct{} + func (d *Daemon) ForkSession(ctx context.Context, rawWS, id string, req api.ForkSessionRequest) (*api.Session, error) + func (d *Daemon) FormatEvent(msg broker.Message) (api.Event, error) + func (d *Daemon) GetAgent(ctx context.Context, rawWS, name string) (*api.Agent, error) + func (d *Daemon) GetCommand(ctx context.Context, rawWS, name string) (*api.Command, error) + func (d *Daemon) GetMCPPrompt(ctx context.Context, rawWS, name, prompt string, req api.MCPPromptRequest) (api.MCPPromptResponse, error) + func (d *Daemon) GetModel(ctx context.Context, rawWS, id string) (*api.Model, error) + func (d *Daemon) GetModelQuota(ctx context.Context, rawWS, id string) (*api.ModelQuota, error) + func (d *Daemon) GetPermissions(ctx context.Context, rawWS string) (*api.PermissionsResponse, error) + func (d *Daemon) GetProviderAuthStatus(_ context.Context, provider string) (*api.ProviderAuthResponse, error) + func (d *Daemon) GetQuotaSnapshots(ctx context.Context, rawWS string) (*api.QuotaSnapshotResponse, error) + func (d *Daemon) GetSandbox(ctx context.Context, rawWS string) (*api.SandboxResponse, error) + func (d *Daemon) GetSession(ctx context.Context, rawWS, id string) (*api.Session, error) + func (d *Daemon) GetSkill(ctx context.Context, rawWS, name string) (*api.Skill, error) + func (d *Daemon) GetTrustStatus(ctx context.Context, rawWS string) (*api.TrustStatus, error) + func (d *Daemon) GetWorkspace(ctx context.Context, rawWS string) (*api.Workspace, error) + func (d *Daemon) GetWorkspaceStatus(ctx context.Context, rawWS string) (*api.WorkspaceStatus, error) + func (d *Daemon) Health(_ context.Context) (*api.HealthResponse, error) + func (d *Daemon) InitWorkspace(ctx context.Context, req api.InitWorkspaceRequest) (*api.InitWorkspaceResponse, error) + func (d *Daemon) KillTask(ctx context.Context, rawWS, id, taskID string) error + func (d *Daemon) LatestSession(ctx context.Context, rawWS string) (*api.Session, error) + func (d *Daemon) ListAgents(ctx context.Context, rawWS string) ([]api.Agent, error) + func (d *Daemon) ListAliasAssignments(ctx context.Context, rawWS string) ([]api.AliasAssignment, error) + func (d *Daemon) ListCommands(ctx context.Context, rawWS string) ([]api.Command, error) + func (d *Daemon) ListMCPs(ctx context.Context, rawWS string) ([]api.MCPServer, error) + func (d *Daemon) ListModels(ctx context.Context, rawWS string) ([]api.Model, error) + func (d *Daemon) ListProviderCatalog(ctx context.Context, rawWS, name string) ([]api.ProviderCatalogEntry, error) + func (d *Daemon) ListProviders(_ context.Context) ([]api.ProviderSummary, error) + func (d *Daemon) ListRules(ctx context.Context, rawWS string) ([]api.Rule, error) + func (d *Daemon) ListSessions(ctx context.Context, rawWS string) ([]api.Session, error) + func (d *Daemon) ListSkills(ctx context.Context, rawWS string) ([]api.Skill, error) + func (d *Daemon) ListTools(ctx context.Context, rawWS, agent string) ([]api.Tool, error) + func (d *Daemon) ListWorkspaceFiles(ctx context.Context, rawWS string, req api.ListFilesRequest) ([]api.WorkspaceFile, error) + func (d *Daemon) ListWorkspaceProviders(ctx context.Context, rawWS string) ([]api.WorkspaceProvider, error) + func (d *Daemon) LogoutProviderAuth(ctx context.Context, provider string) (*api.ProviderAuthResponse, error) + func (d *Daemon) MetricsQuery(ctx context.Context, req api.MetricsQuery) (*api.MetricsResult, error) + func (d *Daemon) PreviewSession(ctx context.Context, rawWS string, req api.PreviewSessionRequest) (*api.SessionPreview, error) + func (d *Daemon) ReadMCPResource(ctx context.Context, rawWS, name string, req api.MCPResourceRequest) (api.MCPResourceResponse, error) + func (d *Daemon) ReloadWorkspace(ctx context.Context, rawWS string) error + func (d *Daemon) RemovePermissionRule(ctx context.Context, rawWS string, req api.PermissionRuleRequest) (*api.PermissionsResponse, error) + func (d *Daemon) RemoveSubscriber(sub *broker.Subscriber) + func (d *Daemon) RestartMCP(ctx context.Context, rawWS, name string) (api.MCPServer, error) + func (d *Daemon) Revert(ctx context.Context, rawWS, id string, req api.RevertRequest) error + func (d *Daemon) RevokeTrust(ctx context.Context, rawWS string) error + func (d *Daemon) Send(ctx context.Context, rawWS, id string, req api.SendRequest) error + func (d *Daemon) Serve(ctx context.Context) error + func (d *Daemon) SessionUsage(ctx context.Context, rawWS, id string) (*api.SessionUsage, error) + func (d *Daemon) SetMCPEnabled(ctx context.Context, rawWS, name string, enabled bool) ([]api.MCPServer, error) + func (d *Daemon) SetProviderEnabled(ctx context.Context, rawWS, name string, enabled bool) ([]api.WorkspaceProvider, error) + func (d *Daemon) SetToolEnabled(ctx context.Context, rawWS, name string, enabled bool) ([]api.Tool, error) + func (d *Daemon) Shutdown(_ context.Context) error + func (d *Daemon) SocketPath() string + func (d *Daemon) Start(ctx context.Context) error + func (d *Daemon) StartProviderAuth(ctx context.Context, provider string) (*api.ProviderAuthResponse, error) + func (d *Daemon) StreamTaskOutput(ctx context.Context, rawWS, id, taskID string) (<-chan string, string, func(), error) + func (d *Daemon) Subscribe(_ context.Context, subscriberID, since string, topics ...string) ([]string, error) + func (d *Daemon) Tasks(ctx context.Context, rawWS, id string) ([]api.Task, error) + func (d *Daemon) Timeline(ctx context.Context, rawWS, id string) ([]api.TimelineEntry, error) + func (d *Daemon) TrustWorkspace(ctx context.Context, req api.TrustFolderRequest) error + func (d *Daemon) Unsubscribe(_ context.Context, subscriberID string, topics ...string) ([]string, error) + func (d *Daemon) UpdateProviderModels(ctx context.Context, rawWS, name string, req api.UpdateProviderModelsRequest) ([]api.WorkspaceProvider, error) + func (d *Daemon) UpdateSandbox(ctx context.Context, rawWS string, req api.UpdateSandboxRequest) (*api.SandboxResponse, error) + func (d *Daemon) UpdateSession(ctx context.Context, rawWS, id string, req api.UpdateSessionRequest) (*api.Session, error) + func (d *Daemon) UploadMedia(ctx context.Context, rawWS, id, mimeType, filename string, data []byte) (*api.Media, error) + func (d *Daemon) Usage(ctx context.Context, rawWS string, req api.UsageRequest) (*api.UsageSummary, error) + func (d *Daemon) VerifyProvider(ctx context.Context, req api.VerifyProviderRequest) (*api.VerifyProviderResponse, error) + func (d *Daemon) Workspaces() []string