Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// ID is the agent id referenced by loop.defaultAgent.
ID agentkit.AgentID `json:"id"`
// Command is the subprocess to spawn, e.g. ["agent", "acp"] (Cursor CLI) or
// ["npx", "-y", "@zed-industries/claude-code-acp@latest"].
Command []string `json:"command"`
// Env adds environment variables for the subprocess.
Env map[string]string `json:"env,omitempty"`
// Cwd is the working directory for the ACP subprocess (cmd.Dir) and session/new.
// Empty uses workspace work/ (same default as tool/shell-bash). Any value the
// workspace resolves is accepted — absolute paths and ~/ pass through
// unchecked — and a missing directory is created (like tool/shell-bash).
Cwd string `json:"cwd,omitempty"`
// ReleaseSubprocessAfterTurn kills the ACP process group after each RunTurn so
// Cursor child processes (language servers, worker-server) do not accumulate.
ReleaseSubprocessAfterTurn bool `json:"releaseSubprocessAfterTurn,omitempty"`
// AutoApprove automatically grants tool permission requests without prompting.
AutoApprove bool `json:"autoApprove"`
// AuthMethod is passed to authenticate when non-empty (e.g. "cursor_login").
AuthMethod string `json:"authMethod,omitempty"`
// ClientName is sent in initialize; defaults to "agentkit".
ClientName string `json:"clientName,omitempty"`
// ClientVersion is sent in initialize; defaults to "0.1.0".
ClientVersion string `json:"clientVersion,omitempty"`
// AuthHint overrides the user-facing guidance when ACP requires authentication,
// during connection, session creation, or a prompt. Secret values are never included.
AuthHint string `json:"authHint,omitempty"`
}
Config configures a remote ACP agent subprocess (Claude Code, Cursor CLI, etc.).
func (*Config) SetDefaults ¶ added in v0.3.48
func (c *Config) SetDefaults()
New registers agent/acp-remote: run turns via an external ACP agent subprocess. SetDefaults implements pluginkit.Defaulter.
type Deps ¶
type Deps struct {
Workspace workspace.Service `json:"workspace"`
// FS stores session resume binds (tenant-relative acp/) and global ACP defaults.
FS filesystem.Service `json:"fs"`
SessionStore agentkit.SessionStore `json:"sessionStore,omitempty"`
SessionEvents capsession.Conversation `json:"sessionEvents,omitempty"`
// SessionMCP supplies harness MCP servers for session/new (not project mcp.json).
SessionMCP capacp.SessionMCPProvider `json:"sessionMcp,omitempty"`
// SessionRestore customizes session/resume vs session/load before session/new fallback.
SessionRestore capacp.SessionRestorer `json:"sessionRestore,omitempty"`
Telemetry captelemetry.Toolkit `json:"telemetry"`
// Sandbox wraps the ACP subprocess command with the tenant sandbox view
// (e.g. sandbox/bwrap) at spawn time. Nil defaults to
// capsandbox.Disabled() (passthrough).
Sandbox capsandbox.Service `json:"sandbox,omitempty"`
}
Deps holds injected capabilities for the ACP client side.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime proxies turns to an external ACP agent over stdio.
func (*Runtime) AgentCatalogEntry ¶
func (*Runtime) ShutdownHooks ¶ added in v0.4.31
func (a *Runtime) ShutdownHooks() []func()
Slash-owned subprocesses outlive HTTP requests and are cancelled on shutdown. Cleanup waits in separate goroutines because shutdown contributions must not block.
Click to show internal directories.
Click to hide internal directories.