Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaudeArgs ¶
func ClaudeArgs() []string
ClaudeArgs returns the Claude Code flags used for every ACP session.
func DefaultSessionStorePath ¶
DefaultSessionStorePath returns the per-user directory used for ACP session mappings that must survive an agent process restart.
func RunPermissionMCP ¶
RunPermissionMCP speaks MCP stdio for Claude Code's --permission-prompt-tool. It is reached from cmd.Execute before any config load.
Types ¶
type Config ¶
type Config struct {
ClaudePath string
SettingsPath string
Env []string
AgentName string
AgentTitle string
AgentVersion string
Stderr io.Writer
// NewCommand, if set, replaces the default Claude Code exec. Tests use this
// to inject a fake process. extra holds ClaudeArgs plus mcp/permission/resume.
NewCommand func(cwd string, extra []string) *exec.Cmd
// AcquireLaunch enables provider refresh at prompt boundaries. Each returned
// lease is owned by one ACP session until it is replaced or the session closes.
// Static NewCommand behavior is retained when this callback is nil.
AcquireLaunch func(context.Context) (LaunchLease, error)
// SessionStorePath is a directory for ACP-to-Claude session mappings. An
// empty path disables cross-process session/load persistence.
SessionStorePath string
}
Config is the ACP server's Claude Code launch spec.
type LaunchLease ¶
type LaunchLease interface {
Generation() uint64
Command(cwd string, extra []string) *exec.Cmd
Release()
}
LaunchLease owns one reference to a prepared Claude Code launch generation. Generation is stable for equivalent provider configuration. Release must be idempotent because session shutdown and prompt cancellation can overlap.