Documentation
¶
Index ¶
- Constants
- Variables
- func InitDaemonProfile(path string) error
- func Serve(parent context.Context, opts ServeOptions) error
- type CamberHandler
- func (h *CamberHandler) ACPNavListAgentServers(ctx context.Context, req *methods.ACPNavListAgentServersParams, ...) (methods.ACPNavAgentServersState, error)
- func (h *CamberHandler) ACPNavRemoveWorktree(ctx context.Context, req *methods.ACPNavRemoveWorktreeParams, ...) (methods.ACPNavState, error)
- func (h *CamberHandler) Abort(context.Context, *methods.AbortParams, *glsp.Context) (*methods.AbortOutput, error)
- func (h *CamberHandler) CheckACPNavAgentRuntimes(_ context.Context, _ *methods.ACPNavCheckAgentRuntimesParams, _ *glsp.Context) (methods.ACPNavAgentRuntimesState, error)
- func (h *CamberHandler) DeleteMCPSecrets(ctx context.Context, params *methods.DeleteMCPSecretsParams, _ *glsp.Context) (*methods.DeleteMCPSecretsOutput, error)
- func (h *CamberHandler) GetUserConfig(ctx context.Context, params *methods.GetUserConfigParams, gCtx *glsp.Context) (*methods.GetUserConfigOutput, error)
- func (h *CamberHandler) GetWorkspaceFolders() []protocol.WorkspaceFolder
- func (h *CamberHandler) Handle(req *glsp.Context) (r any, validMethod bool, validParams bool, err error)
- func (h *CamberHandler) HandleRemote(originID string, req *glsp.Context) (any, bool, bool, error)
- func (h *CamberHandler) InitiateMCPOAuth(ctx context.Context, params *methods.InitiateMCPOAuthParams, ...) (*methods.InitiateMCPOAuthOutput, error)
- func (h *CamberHandler) InstallACPNavAgentServer(ctx context.Context, req *methods.ACPNavInstallAgentServerParams, ...) (methods.ACPNavInstallAgentServerOutput, error)
- func (h *CamberHandler) IsConcurrentMethod(method string) bool
- func (h *CamberHandler) MCPOAuthCallback(_ context.Context, params *methods.MCPOAuthCallbackParams, _ *glsp.Context) (*methods.MCPOAuthCallbackOutput, error)
- func (h *CamberHandler) OnTextDocumentDidChange(ctx context.Context, event events.TextDocumentDidChange, call glsp.CallFunc)
- func (h *CamberHandler) OnWorkspaceDidCreateFiles(ctx context.Context, params lsptypes.CreateFilesParams, call glsp.CallFunc)
- func (h *CamberHandler) OnWorkspaceDidRenameFiles(ctx context.Context, params lsptypes.RenameFilesParams, call glsp.CallFunc)
- func (h *CamberHandler) OnWorkspaceWillDeleteFiles(ctx context.Context, params lsptypes.DeleteFilesParams, call glsp.CallFunc)
- func (h *CamberHandler) OpenAPI() huma.API
- func (h *CamberHandler) ReadFile(ctx context.Context, uri protocol.DocumentURI) ([]byte, error)
- func (h *CamberHandler) SetACPNavAgentServers(ctx context.Context, req *methods.ACPNavSetAgentServersParams, ...) (methods.ACPNavAgentServersState, error)
- func (h *CamberHandler) SetTCPTransport()
- func (h *CamberHandler) TextDocumentDidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams, ...) (any, error)
- func (h *CamberHandler) TextDocumentDidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams, ...) (any, error)
- func (h *CamberHandler) TextDocumentDidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams, ...) (any, error)
- func (h *CamberHandler) WorkspaceDidChangeWatchedFiles(ctx context.Context, params *protocol3.DidChangeWatchedFilesParams, ...) (any, error)
- func (h *CamberHandler) WorkspaceDidChangeWorkspaceFolders(ctx context.Context, params *protocol3.DidChangeWorkspaceFoldersParams, ...) (any, error)
- func (h *CamberHandler) WorkspaceDidCreateFiles(ctx context.Context, params *lsptypes.CreateFilesParams, lspCtx *glsp.Context) (any, error)
- func (h *CamberHandler) WorkspaceDidDeleteFiles(ctx context.Context, params *lsptypes.DeleteFilesParams, lspCtx *glsp.Context) (any, error)
- func (h *CamberHandler) WorkspaceDidRenameFiles(ctx context.Context, params *lsptypes.RenameFilesParams, lspCtx *glsp.Context) (any, error)
- func (h *CamberHandler) WorkspaceWillDeleteFiles(ctx context.Context, params *lsptypes.DeleteFilesParams, lspCtx *glsp.Context) (any, error)
- type ClientCapabilitiesConfig
- type Config
- type HelloIn
- type HelloOut
- type JSONRPCOperation
- type ListSkillsOutput
- type ListSkillsParams
- type MethodHandler
- type OwnedStreams
- type PrimaryConversationStreams
- func (r *PrimaryConversationStreams) Activate(origin, subscriptionID string) error
- func (r *PrimaryConversationStreams) EndpointContext(origin string) context.Context
- func (r *PrimaryConversationStreams) Handle(req *glsp.Context, ...) (any, bool, bool, error)
- func (r *PrimaryConversationStreams) StageV2(origin, _, subscriptionID string, ...) error
- func (r *PrimaryConversationStreams) Stop(origin, subscriptionID string)
- func (r *PrimaryConversationStreams) SubscriptionContext(origin, id string) context.Context
- type ServeOptions
- type SkillSummary
Constants ¶
const DefaultServePort = 17874
Variables ¶
var ErrInvalidParams = errors.New("invalid request params")
Functions ¶
func InitDaemonProfile ¶
InitDaemonProfile initializes a profile without replacing an operator's configuration.
Types ¶
type CamberHandler ¶
CamberHandler embeds the regular protocol.Handler but overrides the Handle method to allow us to pass our own custom messages
N.B. please put new sets of handlers in their own packages, e.g. a new handler/$foo package (see git and acpnav for implementation). Via embedding you can avoid needing to write wrapper methods.
func New ¶
func New() *CamberHandler
func NewWithOptions ¶
func NewWithOptions(options *ServeOptions) *CamberHandler
NewWithOptions constructs the handler without starting a standalone listener. Passing nil selects ordinary desktop remote-access setup.
func (*CamberHandler) ACPNavListAgentServers ¶
func (h *CamberHandler) ACPNavListAgentServers(ctx context.Context, req *methods.ACPNavListAgentServersParams, gCtx *glsp.Context) (methods.ACPNavAgentServersState, error)
func (*CamberHandler) ACPNavRemoveWorktree ¶
func (h *CamberHandler) ACPNavRemoveWorktree(ctx context.Context, req *methods.ACPNavRemoveWorktreeParams, gCtx *glsp.Context) (methods.ACPNavState, error)
func (*CamberHandler) Abort ¶
func (h *CamberHandler) Abort(context.Context, *methods.AbortParams, *glsp.Context) (*methods.AbortOutput, error)
Abort acknowledges the compatibility RPC. In-flight RPCs use $/cancelRequest.
func (*CamberHandler) CheckACPNavAgentRuntimes ¶
func (h *CamberHandler) CheckACPNavAgentRuntimes(_ context.Context, _ *methods.ACPNavCheckAgentRuntimesParams, _ *glsp.Context) (methods.ACPNavAgentRuntimesState, error)
CheckACPNavAgentRuntimes reports whether the runtimes registry agent distributions launch through resolve on the environment agent subprocesses spawn with, so the marketplace can warn about a missing runtime before an install instead of failing on first launch.
func (*CamberHandler) DeleteMCPSecrets ¶
func (h *CamberHandler) DeleteMCPSecrets(ctx context.Context, params *methods.DeleteMCPSecretsParams, _ *glsp.Context) (*methods.DeleteMCPSecretsOutput, error)
func (*CamberHandler) GetUserConfig ¶
func (h *CamberHandler) GetUserConfig( ctx context.Context, params *methods.GetUserConfigParams, gCtx *glsp.Context, ) (*methods.GetUserConfigOutput, error)
GetUserConfig retrieves the current user configuration
func (*CamberHandler) GetWorkspaceFolders ¶
func (h *CamberHandler) GetWorkspaceFolders() []protocol.WorkspaceFolder
func (*CamberHandler) Handle ¶
func (h *CamberHandler) Handle(req *glsp.Context) (r any, validMethod bool, validParams bool, err error)
all method calls go via Handle (primary stdio/TCP client) or HandleRemote (authenticated remote access clients).
func (*CamberHandler) HandleRemote ¶
HandleRemote dispatches a request from an authenticated remote client. The remoteaccess server enforces its method allowlist before calling this; originID keeps fan-out from echoing traffic back to the originator.
func (*CamberHandler) InitiateMCPOAuth ¶
func (h *CamberHandler) InitiateMCPOAuth(ctx context.Context, params *methods.InitiateMCPOAuthParams, gCtx *glsp.Context) (*methods.InitiateMCPOAuthOutput, error)
func (*CamberHandler) InstallACPNavAgentServer ¶
func (h *CamberHandler) InstallACPNavAgentServer(ctx context.Context, req *methods.ACPNavInstallAgentServerParams, _ *glsp.Context) (methods.ACPNavInstallAgentServerOutput, error)
func (*CamberHandler) IsConcurrentMethod ¶
func (h *CamberHandler) IsConcurrentMethod(method string) bool
Checks if the method should be run concurrently
func (*CamberHandler) MCPOAuthCallback ¶
func (h *CamberHandler) MCPOAuthCallback(_ context.Context, params *methods.MCPOAuthCallbackParams, _ *glsp.Context) (*methods.MCPOAuthCallbackOutput, error)
MCPOAuthCallback completes a pending deep-link OAuth flow with the redirect URL the client received from the OS (camber://oauth/callback?…). Flows wait on this only when they were started with a deep-link redirect.
func (*CamberHandler) OnTextDocumentDidChange ¶
func (h *CamberHandler) OnTextDocumentDidChange(ctx context.Context, event events.TextDocumentDidChange, call glsp.CallFunc)
func (*CamberHandler) OnWorkspaceDidCreateFiles ¶
func (h *CamberHandler) OnWorkspaceDidCreateFiles(ctx context.Context, params lsptypes.CreateFilesParams, call glsp.CallFunc)
func (*CamberHandler) OnWorkspaceDidRenameFiles ¶
func (h *CamberHandler) OnWorkspaceDidRenameFiles(ctx context.Context, params lsptypes.RenameFilesParams, call glsp.CallFunc)
func (*CamberHandler) OnWorkspaceWillDeleteFiles ¶
func (h *CamberHandler) OnWorkspaceWillDeleteFiles(ctx context.Context, params lsptypes.DeleteFilesParams, call glsp.CallFunc)
func (*CamberHandler) OpenAPI ¶
func (h *CamberHandler) OpenAPI() huma.API
func (*CamberHandler) ReadFile ¶
func (h *CamberHandler) ReadFile(ctx context.Context, uri protocol.DocumentURI) ([]byte, error)
func (*CamberHandler) SetACPNavAgentServers ¶
func (h *CamberHandler) SetACPNavAgentServers(ctx context.Context, req *methods.ACPNavSetAgentServersParams, gCtx *glsp.Context) (methods.ACPNavAgentServersState, error)
func (*CamberHandler) SetTCPTransport ¶
func (h *CamberHandler) SetTCPTransport()
SetTCPTransport is called before listening. The private native window bridge is available only on the desktop's framed stdio connection.
func (*CamberHandler) TextDocumentDidChange ¶
func (h *CamberHandler) TextDocumentDidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams, lspCtx *glsp.Context) (any, error)
func (*CamberHandler) TextDocumentDidClose ¶
func (h *CamberHandler) TextDocumentDidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams, c *glsp.Context) (any, error)
func (*CamberHandler) TextDocumentDidOpen ¶
func (h *CamberHandler) TextDocumentDidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams, c *glsp.Context) (any, error)
func (*CamberHandler) WorkspaceDidChangeWatchedFiles ¶
func (h *CamberHandler) WorkspaceDidChangeWatchedFiles(ctx context.Context, params *protocol3.DidChangeWatchedFilesParams, lspCtx *glsp.Context) (any, error)
func (*CamberHandler) WorkspaceDidChangeWorkspaceFolders ¶
func (h *CamberHandler) WorkspaceDidChangeWorkspaceFolders(ctx context.Context, params *protocol3.DidChangeWorkspaceFoldersParams, lspCtx *glsp.Context) (any, error)
func (*CamberHandler) WorkspaceDidCreateFiles ¶
func (h *CamberHandler) WorkspaceDidCreateFiles(ctx context.Context, params *lsptypes.CreateFilesParams, lspCtx *glsp.Context) (any, error)
func (*CamberHandler) WorkspaceDidDeleteFiles ¶
func (h *CamberHandler) WorkspaceDidDeleteFiles(ctx context.Context, params *lsptypes.DeleteFilesParams, lspCtx *glsp.Context) (any, error)
func (*CamberHandler) WorkspaceDidRenameFiles ¶
func (h *CamberHandler) WorkspaceDidRenameFiles(ctx context.Context, params *lsptypes.RenameFilesParams, lspCtx *glsp.Context) (any, error)
func (*CamberHandler) WorkspaceWillDeleteFiles ¶
func (h *CamberHandler) WorkspaceWillDeleteFiles(ctx context.Context, params *lsptypes.DeleteFilesParams, lspCtx *glsp.Context) (any, error)
type ClientCapabilitiesConfig ¶
type ClientCapabilitiesConfig struct {
// MCPOAuthDeepLink reports that the client registered the camber:// URL
// scheme with the OS and forwards camber://oauth/callback redirects to
// the helper via camber/mcpOAuthCallback (the desktop app).
MCPOAuthDeepLink bool `json:"mcpOAuthDeepLink"`
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
AssistantHost string `json:"assistantHost"`
AssistantEnvironment string `json:"assistantEnvironment"`
ClientCapabilities ClientCapabilitiesConfig `json:"clientCapabilities,omitempty"`
SessionID string `json:"sessionId"`
ACPAgentServers map[string]acpproxy.AgentServerConfig `json:"agentServers,omitempty"`
}
Config is the configuration that can be specified in initialize calls.
type HelloIn ¶
type HelloIn struct {
// will be returned in pong
Ping string `json:"ping" maxLength:"128"`
}
type JSONRPCOperation ¶
type JSONRPCOperation struct {
// Summary is a short summary of what the operation does.
Summary string
// Description is a verbose explanation of the operation behavior. CommonMark
// syntax MAY be used for rich text representation.
Description string
// The JSON-RPC method, e.g. "camber/foo"
Method string
}
JSONRPCOperation captures metadata for a single JSONRPC method.
type ListSkillsOutput ¶
type ListSkillsOutput struct {
Skills []SkillSummary `json:"skills"`
}
type ListSkillsParams ¶
type ListSkillsParams struct{}
type MethodHandler ¶
type OwnedStreams ¶
type OwnedStreams interface {
Stage(origin, requestID, subscriptionID string, worker func(context.Context, func(method string, params any) error) error) error
Stop(origin, subscriptionID string)
}
OwnedStreams tracks subscriptions by connection origin. Stage starts its worker only after the matching subscribe reply has been written. Stop waits for that subscription's last write before returning.
type PrimaryConversationStreams ¶
type PrimaryConversationStreams struct {
// contains filtered or unexported fields
}
PrimaryConversationStreams belongs to one initialized stdio helper. Handle unwraps requests from the primary connection before wrapping Notify.
func NewPrimaryConversationStreams ¶
func NewPrimaryConversationStreams(lifetime context.Context) *PrimaryConversationStreams
func (*PrimaryConversationStreams) Activate ¶
func (r *PrimaryConversationStreams) Activate(origin, subscriptionID string) error
Activate starts at most one stream worker for the current endpoint.
func (*PrimaryConversationStreams) EndpointContext ¶
func (r *PrimaryConversationStreams) EndpointContext(origin string) context.Context
func (*PrimaryConversationStreams) Handle ¶
func (r *PrimaryConversationStreams) Handle(req *glsp.Context, dispatch func(*glsp.Context, string) (any, bool, bool, error)) (any, bool, bool, error)
Handle unwraps the private Rust bridge. The ordinary v2 adapter still validates the inner params and handles both stdio and socket operations.
func (*PrimaryConversationStreams) StageV2 ¶
func (r *PrimaryConversationStreams) StageV2(origin, _, subscriptionID string, worker func(context.Context, func(string, any) error) error, events ...methods.ConversationEventV2) error
StageV2 matches the paired stream registry interface. Stdio uses explicit activation by the window after the first page has been installed.
func (*PrimaryConversationStreams) Stop ¶
func (r *PrimaryConversationStreams) Stop(origin, subscriptionID string)
Stop cancels the current generation and waits for its worker to exit.
func (*PrimaryConversationStreams) SubscriptionContext ¶
func (r *PrimaryConversationStreams) SubscriptionContext(origin, id string) context.Context
SubscriptionContext ends when this subscription generation is removed.
type ServeOptions ¶
type ServeOptions struct {
TerminalShell string
TerminalXDG map[string]string
Daemon bool
Tailscale bool
ListenIP string
AgentConfig string
StateDir string
Port int
WebOrigin string
Token string
SeedID string
Agent string
Workspace string
Streams OwnedStreams
}
ServeOptions selects the standalone listener instead of desktop remote access. Streams belongs to this listener; each socket has a distinct origin.
Source Files
¶
- abort.go
- acp_nav.go
- cancellation.go
- config.go
- control_tools.go
- conversation.go
- conversation_primary.go
- daemon_profile.go
- file_utils.go
- get_user_config.go
- handler.go
- hello.go
- initialize.go
- jsonrpc.go
- legacy_state.go
- lifecycle.go
- list_skills.go
- mcp_oauth.go
- pprof.go
- remote_access.go
- remote_terminal.go
- runtime_files.go
- search_files.go
- serve.go
- session_events.go
- text_document_did_change.go
- text_document_synchronization.go
- voice_input.go
- workspace.go
- workspace_did_create_files.go
- workspace_did_rename_files.go
- workspace_will_delete_files.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package appcontrol holds the desktop's conversation-management operations that do not need UI state, so the desktop UI (through camber/app/* helper methods) and the camber control CLI (through control actions) run the same code.
|
Package appcontrol holds the desktop's conversation-management operations that do not need UI state, so the desktop UI (through camber/app/* helper methods) and the camber control CLI (through control actions) run the same code. |
|
Package approvals owns pending agent approvals (permission prompts and elicitations) as helper-side state.
|
Package approvals owns pending agent approvals (permission prompts and elicitations) as helper-side state. |
|
Package control exposes desktop conversation orchestration to local clients.
|
Package control exposes desktop conversation orchestration to local clients. |
|
Package git exposes camber/git/* JSON-RPC methods backing the desktop changes view: working-tree status, per-file diffs, staging, discarding, and committing.
|
Package git exposes camber/git/* JSON-RPC methods backing the desktop changes view: working-tree status, per-file diffs, staging, discarding, and committing. |
|
Package github exposes camber/github/* JSON-RPC methods that surface pull-request status for worktrees.
|
Package github exposes camber/github/* JSON-RPC methods that surface pull-request status for worktrees. |
|
Package ownedwriter elects the sidecar allowed to dispatch and recover owned commands for a physical navigation database.
|
Package ownedwriter elects the sidecar allowed to dispatch and recover owned commands for a physical navigation database. |
|
Package remoteaccess serves the mobile remote-control surface: an authenticated HTTP + WebSocket endpoint that speaks the same JSON-RPC protocol as the primary stdio client, minus a small method deny list (see denylist.go).
|
Package remoteaccess serves the mobile remote-control surface: an authenticated HTTP + WebSocket endpoint that speaks the same JSON-RPC protocol as the primary stdio client, minus a small method deny list (see denylist.go). |
|
webui
Package webui embeds the built mobile-remote UI bundle so camber-helper can serve it directly (a phone has no dev server to proxy through).
|
Package webui embeds the built mobile-remote UI bundle so camber-helper can serve it directly (a phone has no dev server to proxy through). |
|
Package remoteterminal owns the PTYs the helper spawns on behalf of remote (mobile) clients: a plain shell (or a one-shot setup/teardown command) per worktree, with output retained for reconnect backfill.
|
Package remoteterminal owns the PTYs the helper spawns on behalf of remote (mobile) clients: a plain shell (or a one-shot setup/teardown command) per worktree, with output retained for reconnect backfill. |
|
Package workspacefiles implements the workspace RPCs for one authenticated paired socket.
|
Package workspacefiles implements the workspace RPCs for one authenticated paired socket. |