Documentation
¶
Index ¶
- Constants
- Variables
- func AbortSetup(input json.RawMessage) (string, error)
- func FetchManifestFromURL(url string) (string, error)
- type AbortError
- type FilesystemTools
- func (ft *FilesystemTools) Grep(input json.RawMessage) (string, error)
- func (ft *FilesystemTools) ListDirectory(input json.RawMessage) (string, error)
- func (ft *FilesystemTools) PatchFile(input json.RawMessage) (string, error)
- func (ft *FilesystemTools) ReadFile(input json.RawMessage) (string, error)
- func (ft *FilesystemTools) WriteFile(input json.RawMessage) (string, error)
- type HTTPTools
- type ManagedProcess
- type ProcessManager
- type ProcessTools
- func (pt *ProcessTools) GetLogs(input json.RawMessage) (string, error)
- func (pt *ProcessTools) RunCommand(input json.RawMessage) (string, error)
- func (pt *ProcessTools) StartBackground(input json.RawMessage) (string, error)
- func (pt *ProcessTools) StopBackground(input json.RawMessage) (string, error)
- func (pt *ProcessTools) WaitForReady(input json.RawMessage) (string, error)
- type RingBuffer
- type TuskTools
- type UserTools
Constants ¶
const (
NodeSDKManifestURL = "https://unpkg.com/@use-tusk/drift-node-sdk@latest/dist/instrumentation-manifest.json"
)
SDK manifest URLs
Variables ¶
var ErrSetupAborted = errors.New("setup aborted")
ErrSetupAborted is a sentinel error for checking abort status
Functions ¶
func AbortSetup ¶
func AbortSetup(input json.RawMessage) (string, error)
AbortSetup handles graceful exit when setup cannot proceed This is used when the agent detects an unsupported project type
func FetchManifestFromURL ¶
FetchManifestFromURL fetches an SDK manifest from a URL Returns the raw JSON string
Types ¶
type AbortError ¶
AbortError wraps ErrSetupAborted with the reason and detected project type
func (*AbortError) Error ¶
func (e *AbortError) Error() string
func (*AbortError) Is ¶
func (e *AbortError) Is(target error) bool
type FilesystemTools ¶
type FilesystemTools struct {
// contains filtered or unexported fields
}
FilesystemTools provides file system operations
func NewFilesystemTools ¶
func NewFilesystemTools(workDir string) *FilesystemTools
NewFilesystemTools creates a new FilesystemTools instance
func (*FilesystemTools) Grep ¶
func (ft *FilesystemTools) Grep(input json.RawMessage) (string, error)
Grep searches for a pattern in files
func (*FilesystemTools) ListDirectory ¶
func (ft *FilesystemTools) ListDirectory(input json.RawMessage) (string, error)
ListDirectory lists files and directories in a path
func (*FilesystemTools) PatchFile ¶
func (ft *FilesystemTools) PatchFile(input json.RawMessage) (string, error)
PatchFile applies a targeted edit to a file
func (*FilesystemTools) ReadFile ¶
func (ft *FilesystemTools) ReadFile(input json.RawMessage) (string, error)
ReadFile reads the contents of a file
func (*FilesystemTools) WriteFile ¶
func (ft *FilesystemTools) WriteFile(input json.RawMessage) (string, error)
WriteFile writes content to a file
type HTTPTools ¶
type HTTPTools struct {
// contains filtered or unexported fields
}
HTTPTools provides HTTP request operations
type ManagedProcess ¶
type ManagedProcess struct {
// contains filtered or unexported fields
}
ManagedProcess represents a background process
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
ProcessManager manages background processes
func NewProcessManager ¶
func NewProcessManager(workDir string) *ProcessManager
NewProcessManager creates a new ProcessManager
func NewProcessManagerWithOptions ¶
func NewProcessManagerWithOptions(workDir string, disableSandbox bool) *ProcessManager
NewProcessManagerWithOptions creates a new ProcessManager with options
func (*ProcessManager) IsSandboxEnabled ¶
func (pm *ProcessManager) IsSandboxEnabled() bool
IsSandboxEnabled returns whether sandboxing is enabled
func (*ProcessManager) StopAll ¶
func (pm *ProcessManager) StopAll()
StopAll stops all managed processes and cleans up resources
type ProcessTools ¶
type ProcessTools struct {
// contains filtered or unexported fields
}
ProcessTools provides process management operations
func NewProcessTools ¶
func NewProcessTools(pm *ProcessManager, workDir string) *ProcessTools
NewProcessTools creates a new ProcessTools instance
func (*ProcessTools) GetLogs ¶
func (pt *ProcessTools) GetLogs(input json.RawMessage) (string, error)
GetLogs returns recent logs from a background process
func (*ProcessTools) RunCommand ¶
func (pt *ProcessTools) RunCommand(input json.RawMessage) (string, error)
RunCommand executes a command and waits for completion
func (*ProcessTools) StartBackground ¶
func (pt *ProcessTools) StartBackground(input json.RawMessage) (string, error)
StartBackground starts a process in the background
func (*ProcessTools) StopBackground ¶
func (pt *ProcessTools) StopBackground(input json.RawMessage) (string, error)
StopBackground stops a background process
func (*ProcessTools) WaitForReady ¶
func (pt *ProcessTools) WaitForReady(input json.RawMessage) (string, error)
WaitForReady polls a URL until it responds successfully
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer keeps the last N lines
func NewRingBuffer ¶
func NewRingBuffer(size int) *RingBuffer
NewRingBuffer creates a new ring buffer
func (*RingBuffer) Lines ¶
func (rb *RingBuffer) Lines(n int) []string
Lines returns the last n lines
type TuskTools ¶
type TuskTools struct {
// contains filtered or unexported fields
}
TuskTools provides Tusk CLI operations using internal runner package
func NewTuskTools ¶
NewTuskTools creates a new TuskTools instance