Documentation
¶
Index ¶
- func RunACPAgent(ctx context.Context, cfg *config.Config, providerMgr *provider.Manager) error
- type ACPFileSystem
- func (afs *ACPFileSystem) Close() error
- func (afs *ACPFileSystem) Delete(ctx context.Context, path string) error
- func (afs *ACPFileSystem) DeleteAll(ctx context.Context, path string) error
- func (afs *ACPFileSystem) Exists(ctx context.Context, path string) (bool, error)
- func (afs *ACPFileSystem) ListDir(ctx context.Context, path string) ([]*fs.FileInfo, error)
- func (afs *ACPFileSystem) MkdirAll(ctx context.Context, path string, perm os.FileMode) error
- func (afs *ACPFileSystem) Move(ctx context.Context, src, dst string) error
- func (afs *ACPFileSystem) ReadFile(ctx context.Context, path string) ([]byte, error)
- func (afs *ACPFileSystem) ReadFileLines(ctx context.Context, path string, from, to int) ([]string, error)
- func (afs *ACPFileSystem) Stat(ctx context.Context, path string) (*fs.FileInfo, error)
- func (afs *ACPFileSystem) WriteFile(ctx context.Context, path string, data []byte) error
- type ACPInteractionHandler
- type ScriptschnellAIAgent
- func (a *ScriptschnellAIAgent) Authenticate(ctx context.Context, params acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
- func (a *ScriptschnellAIAgent) Cancel(ctx context.Context, params acp.CancelNotification) error
- func (a *ScriptschnellAIAgent) Close() error
- func (a *ScriptschnellAIAgent) GetAvailableCommands() []acp.AvailableCommand
- func (a *ScriptschnellAIAgent) Initialize(ctx context.Context, params acp.InitializeRequest) (acp.InitializeResponse, error)
- func (a *ScriptschnellAIAgent) LoadSession(ctx context.Context, params acp.LoadSessionRequest) (acp.LoadSessionResponse, error)
- func (a *ScriptschnellAIAgent) NewSession(ctx context.Context, params acp.NewSessionRequest) (acp.NewSessionResponse, error)
- func (a *ScriptschnellAIAgent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
- func (a *ScriptschnellAIAgent) SetAgentConnection(conn *acp.AgentSideConnection)
- func (a *ScriptschnellAIAgent) SetSessionMode(ctx context.Context, params acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
- func (a *ScriptschnellAIAgent) SetSessionModel(ctx context.Context, params acp.SetSessionModelRequest) (acp.SetSessionModelResponse, error)
- type SlashCommand
- type Terminal
- type TerminalManager
- func (tm *TerminalManager) Create(ctx context.Context, req acp.CreateTerminalRequest) (*acp.CreateTerminalResponse, error)
- func (tm *TerminalManager) Kill(ctx context.Context, req acp.KillTerminalCommandRequest) (*acp.KillTerminalCommandResponse, error)
- func (tm *TerminalManager) Output(ctx context.Context, req acp.TerminalOutputRequest) (*acp.TerminalOutputResponse, error)
- func (tm *TerminalManager) Release(ctx context.Context, req acp.ReleaseTerminalRequest) (*acp.ReleaseTerminalResponse, error)
- func (tm *TerminalManager) WaitForExit(ctx context.Context, req acp.WaitForTerminalExitRequest) (*acp.WaitForTerminalExitResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ACPFileSystem ¶
type ACPFileSystem struct {
// contains filtered or unexported fields
}
ACPFileSystem implements the fs.FileSystem interface using the ACP client's filesystem protocol
func NewACPFileSystem ¶
func NewACPFileSystem(conn *acp.AgentSideConnection, sessionID string, workingDir string) *ACPFileSystem
NewACPFileSystem creates a new ACP filesystem wrapper
func (*ACPFileSystem) Close ¶
func (afs *ACPFileSystem) Close() error
Close implements fs.FileSystem - no-op for ACP
func (*ACPFileSystem) Delete ¶
func (afs *ACPFileSystem) Delete(ctx context.Context, path string) error
Delete implements fs.FileSystem - not supported via ACP
func (*ACPFileSystem) DeleteAll ¶
func (afs *ACPFileSystem) DeleteAll(ctx context.Context, path string) error
DeleteAll implements fs.FileSystem - not supported via ACP
func (*ACPFileSystem) Move ¶
func (afs *ACPFileSystem) Move(ctx context.Context, src, dst string) error
Move implements fs.FileSystem - uses fallback filesystem behavior
func (*ACPFileSystem) ReadFileLines ¶
func (afs *ACPFileSystem) ReadFileLines(ctx context.Context, path string, from, to int) ([]string, error)
ReadFileLines implements fs.FileSystem by reading the full file and splitting into lines
type ACPInteractionHandler ¶
type ACPInteractionHandler struct {
// contains filtered or unexported fields
}
ACPInteractionHandler implements UserInteractionHandler for ACP mode
func NewACPInteractionHandler ¶
func NewACPInteractionHandler(conn *acp.AgentSideConnection, sessionID string) *ACPInteractionHandler
NewACPInteractionHandler creates a new ACP interaction handler
func (*ACPInteractionHandler) HandleInteraction ¶
func (h *ACPInteractionHandler) HandleInteraction(ctx context.Context, req *actor.UserInteractionRequest) (*actor.UserInteractionResponse, error)
HandleInteraction processes a user interaction request
func (*ACPInteractionHandler) Mode ¶
func (h *ACPInteractionHandler) Mode() string
Mode returns the handler mode name
func (*ACPInteractionHandler) SupportsInteraction ¶
func (h *ACPInteractionHandler) SupportsInteraction(interactionType actor.InteractionType) bool
SupportsInteraction indicates whether this handler can handle the given type. ACP mode currently supports authorization requests.
type ScriptschnellAIAgent ¶
type ScriptschnellAIAgent struct {
// contains filtered or unexported fields
}
ScriptschnellAIAgent implements the acp.Agent interface to expose statcode-ai functionality via ACP
func NewScriptschnellAIAgent ¶
func NewScriptschnellAIAgent(ctx context.Context, cfg *config.Config, providerMgr *provider.Manager) (*ScriptschnellAIAgent, error)
NewScriptschnellAIAgent creates a new ACP agent that wraps statcode-ai functionality
func (*ScriptschnellAIAgent) Authenticate ¶
func (a *ScriptschnellAIAgent) Authenticate(ctx context.Context, params acp.AuthenticateRequest) (acp.AuthenticateResponse, error)
Authenticate implements acp.Agent
func (*ScriptschnellAIAgent) Cancel ¶
func (a *ScriptschnellAIAgent) Cancel(ctx context.Context, params acp.CancelNotification) error
Cancel implements acp.Agent
func (*ScriptschnellAIAgent) Close ¶
func (a *ScriptschnellAIAgent) Close() error
Close cleans up the agent and all its sessions
func (*ScriptschnellAIAgent) GetAvailableCommands ¶
func (a *ScriptschnellAIAgent) GetAvailableCommands() []acp.AvailableCommand
GetAvailableCommands returns the list of available slash commands
func (*ScriptschnellAIAgent) Initialize ¶
func (a *ScriptschnellAIAgent) Initialize(ctx context.Context, params acp.InitializeRequest) (acp.InitializeResponse, error)
Initialize implements acp.Agent
func (*ScriptschnellAIAgent) LoadSession ¶
func (a *ScriptschnellAIAgent) LoadSession(ctx context.Context, params acp.LoadSessionRequest) (acp.LoadSessionResponse, error)
LoadSession implements acp.Agent
func (*ScriptschnellAIAgent) NewSession ¶
func (a *ScriptschnellAIAgent) NewSession(ctx context.Context, params acp.NewSessionRequest) (acp.NewSessionResponse, error)
NewSession implements acp.Agent
func (*ScriptschnellAIAgent) Prompt ¶
func (a *ScriptschnellAIAgent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error)
Prompt implements acp.Agent - this is the main method where we process user prompts
func (*ScriptschnellAIAgent) SetAgentConnection ¶
func (a *ScriptschnellAIAgent) SetAgentConnection(conn *acp.AgentSideConnection)
SetAgentConnection implements acp.AgentConnAware to receive the connection after construction
func (*ScriptschnellAIAgent) SetSessionMode ¶
func (a *ScriptschnellAIAgent) SetSessionMode(ctx context.Context, params acp.SetSessionModeRequest) (acp.SetSessionModeResponse, error)
SetSessionMode implements acp.Agent
func (*ScriptschnellAIAgent) SetSessionModel ¶
func (a *ScriptschnellAIAgent) SetSessionModel(ctx context.Context, params acp.SetSessionModelRequest) (acp.SetSessionModelResponse, error)
SetSessionModel implements acp.AgentExperimental
type SlashCommand ¶
type SlashCommand struct {
Name string `json:"name"`
Description string `json:"description"`
Input *acp.AvailableCommandInput `json:"input,omitempty"`
Handler func(sessionID, args string) (string, error)
}
SlashCommand represents a slash command that can be executed by the agent
type Terminal ¶
type Terminal struct {
ID string
SessionID acp.SessionId
JobID string // Background job ID from shell actor
Command string
Args []string
Cwd string
OutputByteLimit int
CreatedAt time.Time
// contains filtered or unexported fields
}
Terminal represents a running terminal session
type TerminalManager ¶
type TerminalManager struct {
// contains filtered or unexported fields
}
TerminalManager manages terminal sessions using the shell actor
func NewTerminalManager ¶
func NewTerminalManager(shellActor actor.ShellActor) *TerminalManager
NewTerminalManager creates a new terminal manager
func (*TerminalManager) Create ¶
func (tm *TerminalManager) Create(ctx context.Context, req acp.CreateTerminalRequest) (*acp.CreateTerminalResponse, error)
Create creates a new terminal and starts the command
func (*TerminalManager) Kill ¶
func (tm *TerminalManager) Kill(ctx context.Context, req acp.KillTerminalCommandRequest) (*acp.KillTerminalCommandResponse, error)
Kill terminates a terminal command
func (*TerminalManager) Output ¶
func (tm *TerminalManager) Output(ctx context.Context, req acp.TerminalOutputRequest) (*acp.TerminalOutputResponse, error)
Output retrieves the current output of a terminal
func (*TerminalManager) Release ¶
func (tm *TerminalManager) Release(ctx context.Context, req acp.ReleaseTerminalRequest) (*acp.ReleaseTerminalResponse, error)
Release kills the command if still running and releases terminal resources
func (*TerminalManager) WaitForExit ¶
func (tm *TerminalManager) WaitForExit(ctx context.Context, req acp.WaitForTerminalExitRequest) (*acp.WaitForTerminalExitResponse, error)
WaitForExit waits for a terminal command to complete