Documentation
¶
Index ¶
- func BuildShellCommandString(ide string, modelName string, addDirs []string, reasoningEffort string) string
- func DisplayName(ide string) string
- func EnsureAvailable(cfg *model.RuntimeConfig) error
- func ValidateRuntimeConfig(cfg *model.RuntimeConfig) error
- type AvailabilityError
- type Client
- type ClientConfig
- type DriverCatalogEntry
- type DriverCatalogLauncher
- type Launcher
- type Session
- type SessionError
- type SessionRequest
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildShellCommandString ¶
func BuildShellCommandString(ide string, modelName string, addDirs []string, reasoningEffort string) string
BuildShellCommandString renders a shell preview for the configured ACP agent bootstrap command.
func DisplayName ¶
DisplayName returns the human-readable display name for an agent runtime.
func EnsureAvailable ¶
func EnsureAvailable(cfg *model.RuntimeConfig) error
EnsureAvailable verifies that the configured ACP agent binary is installed and executable.
func ValidateRuntimeConfig ¶
func ValidateRuntimeConfig(cfg *model.RuntimeConfig) error
ValidateRuntimeConfig verifies that the runtime config references a supported agent runtime.
Types ¶
type AvailabilityError ¶ added in v0.1.3
type AvailabilityError struct {
IDE string
DisplayName string
Command []string
DocsURL string
InstallHint string
Output string
Cause error
}
AvailabilityError reports an ACP runtime that is missing or incorrectly installed.
func (*AvailabilityError) Error ¶ added in v0.1.3
func (e *AvailabilityError) Error() string
func (*AvailabilityError) Unwrap ¶ added in v0.1.3
func (e *AvailabilityError) Unwrap() error
type Client ¶ added in v0.1.3
type Client interface {
// CreateSession starts a new ACP session with the given prompt.
CreateSession(ctx context.Context, req SessionRequest) (Session, error)
// Close terminates the agent subprocess.
Close() error
// Kill force-terminates the agent subprocess immediately.
Kill() error
}
Client manages an ACP agent subprocess and creates sessions.
type ClientConfig ¶ added in v0.1.3
type ClientConfig struct {
IDE string
Model string
AddDirs []string
ReasoningEffort string
Logger *slog.Logger
ShutdownTimeout time.Duration
}
ClientConfig describes how to bootstrap an ACP agent process.
type DriverCatalogEntry ¶ added in v0.1.3
type DriverCatalogEntry struct {
IDE string
DisplayName string
CanonicalCommand []string
CanonicalProbe []string
FallbackLaunchers []DriverCatalogLauncher
SupportsAddDirs bool
UsesBootstrapModel bool
DocsURL string
InstallHint string
}
DriverCatalogEntry exposes the stable command catalog for one supported ACP runtime.
func DriverCatalog ¶ added in v0.1.3
func DriverCatalog() []DriverCatalogEntry
DriverCatalog returns the stable ACP driver catalog in the supported IDE order.
func DriverCatalogEntryForIDE ¶ added in v0.1.3
func DriverCatalogEntryForIDE(ide string) (DriverCatalogEntry, error)
DriverCatalogEntryForIDE returns the stable driver catalog entry for one supported IDE.
type DriverCatalogLauncher ¶ added in v0.1.3
DriverCatalogLauncher describes one fallback launcher for a supported ACP runtime.
type Session ¶ added in v0.1.3
type Session interface {
// ID returns the ACP session identifier.
ID() string
// Updates returns the streamed session updates in arrival order.
Updates() <-chan model.SessionUpdate
// Done closes when the session has fully completed.
Done() <-chan struct{}
// Err returns the terminal session error, if any.
Err() error
}
Session represents an active ACP session streaming updates.
type SessionError ¶ added in v0.1.3
type SessionError struct {
Code int
Message string
Data json.RawMessage
}
SessionError wraps JSON-RPC/ACP request errors without leaking SDK types.
func (*SessionError) Error ¶ added in v0.1.3
func (e *SessionError) Error() string
Error implements the error interface.
type SessionRequest ¶ added in v0.1.3
type SessionRequest struct {
Prompt []byte
WorkingDir string
Model string
ExtraEnv map[string]string
}
SessionRequest contains the parameters for creating a new ACP session.
type Spec ¶ added in v0.1.3
type Spec struct {
ID string
DisplayName string
DefaultModel string
Command string
FixedArgs []string
ProbeArgs []string
Fallbacks []Launcher
SupportsAddDirs bool
UsesBootstrapModel bool
EnvVars map[string]string
DocsURL string
InstallHint string
BootstrapArgs func(modelName, reasoningEffort string, addDirs []string) []string
}
Spec defines how to bootstrap an ACP-compatible agent process.