Documentation
¶
Overview ¶
Package tools provides a unified adapter framework for external ecosystem tools. It standardizes tool detection, version checking, capability discovery, and health monitoring across all tools in the NTM ecosystem (bv, bd, am, cm, cass, s2p).
Index ¶
- Constants
- Variables
- func DetectProvider(output string) string
- func GetCredentialEnvVar(provider string) string
- func GetCredentialPath(provider string) string
- func Register(adapter Adapter)
- type ACFSAdapter
- func (a *ACFSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *ACFSAdapter) Detect() (string, bool)
- func (a *ACFSAdapter) Doctor(ctx context.Context) (json.RawMessage, error)
- func (a *ACFSAdapter) GetInfo(ctx context.Context) (json.RawMessage, error)
- func (a *ACFSAdapter) GetStatus(ctx context.Context) (json.RawMessage, error)
- func (a *ACFSAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *ACFSAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *ACFSAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *ACFSAdapter) Version(ctx context.Context) (Version, error)
- type AMAdapter
- func (a *AMAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *AMAdapter) Detect() (string, bool)
- func (a *AMAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *AMAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *AMAdapter) HealthCheck(ctx context.Context) (json.RawMessage, error)
- func (a *AMAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *AMAdapter) ServerURL() string
- func (a *AMAdapter) SetServerURL(url string)
- func (a *AMAdapter) Version(ctx context.Context) (Version, error)
- type Adapter
- type BDAdapter
- func (a *BDAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *BDAdapter) Detect() (string, bool)
- func (a *BDAdapter) GetBlocked(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BDAdapter) GetList(ctx context.Context, dir string, status string) (json.RawMessage, error)
- func (a *BDAdapter) GetReady(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BDAdapter) GetStats(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BDAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *BDAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *BDAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *BDAdapter) Show(ctx context.Context, dir, issueID string) (json.RawMessage, error)
- func (a *BDAdapter) Version(ctx context.Context) (Version, error)
- type BVAdapter
- func (a *BVAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *BVAdapter) Detect() (string, bool)
- func (a *BVAdapter) GetAlerts(ctx context.Context, dir string, opts BVAlertOptions) (json.RawMessage, error)
- func (a *BVAdapter) GetBurndown(ctx context.Context, dir string, sprint string) (json.RawMessage, error)
- func (a *BVAdapter) GetFileBeads(ctx context.Context, dir string, filePath string, limit int) (json.RawMessage, error)
- func (a *BVAdapter) GetFileHotspots(ctx context.Context, dir string, limit int) (json.RawMessage, error)
- func (a *BVAdapter) GetFileRelations(ctx context.Context, dir string, filePath string, limit int, threshold float64) (json.RawMessage, error)
- func (a *BVAdapter) GetForecast(ctx context.Context, dir string, target string) (json.RawMessage, error)
- func (a *BVAdapter) GetGraph(ctx context.Context, dir string, opts BVGraphOptions) (json.RawMessage, error)
- func (a *BVAdapter) GetGroupedTriage(ctx context.Context, dir string, opts BVGroupedTriageOptions) (json.RawMessage, error)
- func (a *BVAdapter) GetHistory(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetImpact(ctx context.Context, dir string, filePath string) (json.RawMessage, error)
- func (a *BVAdapter) GetInsights(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetLabelAttention(ctx context.Context, dir string, limit int) (json.RawMessage, error)
- func (a *BVAdapter) GetLabelFlow(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetLabelHealth(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetNext(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetPlan(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetSearch(ctx context.Context, dir string, query string) (json.RawMessage, error)
- func (a *BVAdapter) GetSearchWithOptions(ctx context.Context, dir string, opts BVSearchOptions) (json.RawMessage, error)
- func (a *BVAdapter) GetSuggestions(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) GetTriage(ctx context.Context, dir string) (json.RawMessage, error)
- func (a *BVAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *BVAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *BVAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *BVAdapter) Version(ctx context.Context) (Version, error)
- type BVAlertOptions
- type BVGraphOptions
- type BVGroupedTriageOptions
- type BVSearchOptions
- type BaseAdapter
- type BlockedCommand
- type CAAMAccount
- type CAAMAdapter
- func (a *CAAMAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *CAAMAdapter) Detect() (string, bool)
- func (a *CAAMAdapter) GetAccounts(ctx context.Context) ([]CAAMAccount, error)
- func (a *CAAMAdapter) GetActiveAccount(ctx context.Context) (*CAAMAccount, error)
- func (a *CAAMAdapter) GetCurrentCredentials(ctx context.Context, provider string) (*CAAMCredentials, error)
- func (a *CAAMAdapter) GetStatus(ctx context.Context) (*CAAMStatus, error)
- func (a *CAAMAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *CAAMAdapter) HasMultipleAccounts(ctx context.Context) bool
- func (a *CAAMAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *CAAMAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *CAAMAdapter) InvalidateCache()
- func (a *CAAMAdapter) IsAvailable(ctx context.Context) bool
- func (a *CAAMAdapter) SwitchAccount(ctx context.Context, accountID string) error
- func (a *CAAMAdapter) SwitchToNextAccount(ctx context.Context, provider string) (*SwitchResult, error)
- func (a *CAAMAdapter) Version(ctx context.Context) (Version, error)
- type CAAMCredentials
- type CAAMStatus
- type CASSAdapter
- func (a *CASSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *CASSAdapter) Detect() (string, bool)
- func (a *CASSAdapter) GetCapabilities(ctx context.Context) (json.RawMessage, error)
- func (a *CASSAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *CASSAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *CASSAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *CASSAdapter) Search(ctx context.Context, query string, limit int) (json.RawMessage, error)
- func (a *CASSAdapter) Version(ctx context.Context) (Version, error)
- type CMAdapter
- func (a *CMAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *CMAdapter) Connect(projectDir, sessionID string) error
- func (a *CMAdapter) Detect() (string, bool)
- func (a *CMAdapter) GetContext(ctx context.Context, taskDescription string) (json.RawMessage, error)
- func (a *CMAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *CMAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *CMAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *CMAdapter) OnboardStatus(ctx context.Context) (json.RawMessage, error)
- func (a *CMAdapter) SetServerPort(port int)
- func (a *CMAdapter) Version(ctx context.Context) (Version, error)
- type Cache
- type Capability
- type CautAdapter
- func (a *CautAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *CautAdapter) Detect() (string, bool)
- func (a *CautAdapter) GetAllUsage(ctx context.Context, period string) ([]CautUsage, error)
- func (a *CautAdapter) GetAvailability(ctx context.Context) (*CautAvailability, error)
- func (a *CautAdapter) GetQuotaStatus(ctx context.Context) ([]CautProvider, error)
- func (a *CautAdapter) GetStatus(ctx context.Context) (*CautStatus, error)
- func (a *CautAdapter) GetUsage(ctx context.Context, provider, period string) (*CautUsage, error)
- func (a *CautAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *CautAdapter) HasUsageData(ctx context.Context) bool
- func (a *CautAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *CautAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *CautAdapter) InvalidateAvailabilityCache()
- func (a *CautAdapter) IsAvailable(ctx context.Context) bool
- func (a *CautAdapter) Version(ctx context.Context) (Version, error)
- type CautAvailability
- type CautProvider
- type CautStatus
- type CautUsage
- type DCGAdapter
- func (a *DCGAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *DCGAdapter) CheckCommand(ctx context.Context, command string) (*BlockedCommand, error)
- func (a *DCGAdapter) Detect() (string, bool)
- func (a *DCGAdapter) GetAvailability(ctx context.Context) (*DCGAvailability, error)
- func (a *DCGAdapter) GetStatus(ctx context.Context) (*DCGStatus, error)
- func (a *DCGAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *DCGAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *DCGAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *DCGAdapter) InvalidateAvailabilityCache()
- func (a *DCGAdapter) IsAvailable(ctx context.Context) bool
- func (a *DCGAdapter) Version(ctx context.Context) (Version, error)
- type DCGAvailability
- type DCGStatus
- type GIILAdapter
- func (a *GIILAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *GIILAdapter) Detect() (string, bool)
- func (a *GIILAdapter) Download(ctx context.Context, shareURL, outputDir string) (*GIILMetadata, error)
- func (a *GIILAdapter) GetDirectURL(ctx context.Context, shareURL string) (*GIILMetadata, error)
- func (a *GIILAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *GIILAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *GIILAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *GIILAdapter) Version(ctx context.Context) (Version, error)
- type GIILMetadata
- type HealthReport
- type HealthStatus
- type JFPAdapter
- func (a *JFPAdapter) Bundle(ctx context.Context, id string) (json.RawMessage, error)
- func (a *JFPAdapter) Bundles(ctx context.Context) (json.RawMessage, error)
- func (a *JFPAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *JFPAdapter) Categories(ctx context.Context) (json.RawMessage, error)
- func (a *JFPAdapter) Detect() (string, bool)
- func (a *JFPAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *JFPAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *JFPAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *JFPAdapter) Installed(ctx context.Context) (json.RawMessage, error)
- func (a *JFPAdapter) List(ctx context.Context) (json.RawMessage, error)
- func (a *JFPAdapter) ListByCategory(ctx context.Context, category string) (json.RawMessage, error)
- func (a *JFPAdapter) ListByTag(ctx context.Context, tag string) (json.RawMessage, error)
- func (a *JFPAdapter) Search(ctx context.Context, query string) (json.RawMessage, error)
- func (a *JFPAdapter) Show(ctx context.Context, id string) (json.RawMessage, error)
- func (a *JFPAdapter) Status(ctx context.Context) (json.RawMessage, error)
- func (a *JFPAdapter) Suggest(ctx context.Context, task string) (json.RawMessage, error)
- func (a *JFPAdapter) Tags(ctx context.Context) (json.RawMessage, error)
- func (a *JFPAdapter) Version(ctx context.Context) (Version, error)
- type LimitedBuffer
- type MSAdapter
- func (a *MSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *MSAdapter) Detect() (string, bool)
- func (a *MSAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *MSAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *MSAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *MSAdapter) List(ctx context.Context) (json.RawMessage, error)
- func (a *MSAdapter) Search(ctx context.Context, query string) (json.RawMessage, error)
- func (a *MSAdapter) Show(ctx context.Context, id string) (json.RawMessage, error)
- func (a *MSAdapter) Suggest(ctx context.Context, task string) (json.RawMessage, error)
- func (a *MSAdapter) Version(ctx context.Context) (Version, error)
- type PTAdapter
- func (a *PTAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *PTAdapter) ClassifyProcess(ctx context.Context, pid int) (*PTProcessResult, error)
- func (a *PTAdapter) ClassifyProcesses(ctx context.Context, pids []int) ([]PTProcessResult, error)
- func (a *PTAdapter) Detect() (string, bool)
- func (a *PTAdapter) GetStatus(ctx context.Context) (*PTStatus, error)
- func (a *PTAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *PTAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *PTAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *PTAdapter) InvalidateStatusCache()
- func (a *PTAdapter) IsAvailable(ctx context.Context) bool
- func (a *PTAdapter) Version(ctx context.Context) (Version, error)
- func (a *PTAdapter) WatchSession(ctx context.Context, sessionName string) ([]PTProcessResult, error)
- type PTClassification
- type PTProcessResult
- type PTStatus
- type RCHAdapter
- func (a *RCHAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *RCHAdapter) Detect() (string, bool)
- func (a *RCHAdapter) GetAvailability(ctx context.Context) (*RCHAvailability, error)
- func (a *RCHAdapter) GetStatus(ctx context.Context) (*RCHStatus, error)
- func (a *RCHAdapter) GetWorkers(ctx context.Context) ([]RCHWorker, error)
- func (a *RCHAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *RCHAdapter) HasHealthyWorkers(ctx context.Context) bool
- func (a *RCHAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *RCHAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *RCHAdapter) InvalidateAvailabilityCache()
- func (a *RCHAdapter) IsAvailable(ctx context.Context) bool
- func (a *RCHAdapter) SelectWorker(ctx context.Context, preferred string) (*RCHWorker, error)
- func (a *RCHAdapter) Version(ctx context.Context) (Version, error)
- type RCHAvailability
- type RCHStatus
- type RCHWorker
- type RUAdapter
- func (a *RUAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *RUAdapter) Detect() (string, bool)
- func (a *RUAdapter) Doctor(ctx context.Context) (string, error)
- func (a *RUAdapter) GetStatus(ctx context.Context) (*RUStatus, error)
- func (a *RUAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *RUAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *RUAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *RUAdapter) Sync(ctx context.Context, dryRun bool) error
- func (a *RUAdapter) Version(ctx context.Context) (Version, error)
- type RURepoStatus
- type RUStatus
- type RanoAdapter
- func (a *RanoAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *RanoAdapter) Detect() (string, bool)
- func (a *RanoAdapter) GetAllProcessStats(ctx context.Context) ([]RanoProcessStats, error)
- func (a *RanoAdapter) GetAllProcessStatsWithWindow(ctx context.Context, window string) ([]RanoProcessStats, error)
- func (a *RanoAdapter) GetAvailability(ctx context.Context) (*RanoAvailability, error)
- func (a *RanoAdapter) GetProcessStats(ctx context.Context, pid int) (*RanoProcessStats, error)
- func (a *RanoAdapter) GetProcessStatsWithWindow(ctx context.Context, pid int, window string) (*RanoProcessStats, error)
- func (a *RanoAdapter) GetStatus(ctx context.Context) (*RanoStatus, error)
- func (a *RanoAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *RanoAdapter) HasRequiredPermissions(ctx context.Context) bool
- func (a *RanoAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *RanoAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *RanoAdapter) InvalidateAvailabilityCache()
- func (a *RanoAdapter) IsAvailable(ctx context.Context) bool
- func (a *RanoAdapter) Version(ctx context.Context) (Version, error)
- type RanoAvailability
- type RanoProcessStats
- type RanoStatus
- type RateLimitCallback
- type RateLimitDetector
- func (d *RateLimitDetector) Check(output string, paneID string) *RateLimitEvent
- func (d *RateLimitDetector) SetCallback(cb RateLimitCallback)
- func (d *RateLimitDetector) SetCooldownPeriod(period time.Duration)
- func (d *RateLimitDetector) TriggerAccountSwitch(ctx context.Context, event *RateLimitEvent) *RateLimitEvent
- type RateLimitEvent
- type Registry
- func (r *Registry) All() []Adapter
- func (r *Registry) Detected() []Adapter
- func (r *Registry) Get(name ToolName) (Adapter, bool)
- func (r *Registry) GetAllInfo(ctx context.Context) []*ToolInfo
- func (r *Registry) GetHealthReport(ctx context.Context) *HealthReport
- func (r *Registry) Names() []ToolName
- func (r *Registry) Register(adapter Adapter)
- type S2PAdapter
- func (a *S2PAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *S2PAdapter) Detect() (string, bool)
- func (a *S2PAdapter) GenerateContext(ctx context.Context, dir string, patterns []string, format string) ([]byte, error)
- func (a *S2PAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *S2PAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *S2PAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *S2PAdapter) Version(ctx context.Context) (Version, error)
- type SLBAdapter
- func (a *SLBAdapter) Approve(ctx context.Context, requestID string) (json.RawMessage, error)
- func (a *SLBAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *SLBAdapter) Deny(ctx context.Context, requestID string, reason string) (json.RawMessage, error)
- func (a *SLBAdapter) Detect() (string, bool)
- func (a *SLBAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *SLBAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *SLBAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *SLBAdapter) Pending(ctx context.Context) (json.RawMessage, error)
- func (a *SLBAdapter) Request(ctx context.Context, command string, reason string) (json.RawMessage, error)
- func (a *SLBAdapter) Status(ctx context.Context) (json.RawMessage, error)
- func (a *SLBAdapter) Version(ctx context.Context) (Version, error)
- type SwitchResult
- type ToolInfo
- type ToolName
- type UBSAdapter
- func (a *UBSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *UBSAdapter) Detect() (string, bool)
- func (a *UBSAdapter) Doctor(ctx context.Context) (string, error)
- func (a *UBSAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *UBSAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *UBSAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *UBSAdapter) Scan(ctx context.Context, path string) (*UBSScanResult, error)
- func (a *UBSAdapter) Version(ctx context.Context) (Version, error)
- type UBSFinding
- type UBSScanResult
- type Version
- type XFAdapter
- func (a *XFAdapter) Capabilities(ctx context.Context) ([]Capability, error)
- func (a *XFAdapter) Detect() (string, bool)
- func (a *XFAdapter) Doctor(ctx context.Context) (string, error)
- func (a *XFAdapter) GetStats(ctx context.Context) (*XFStats, error)
- func (a *XFAdapter) HasCapability(ctx context.Context, cap Capability) bool
- func (a *XFAdapter) Health(ctx context.Context) (*HealthStatus, error)
- func (a *XFAdapter) Info(ctx context.Context) (*ToolInfo, error)
- func (a *XFAdapter) Search(ctx context.Context, query string, limit int) ([]XFSearchResult, error)
- func (a *XFAdapter) Version(ctx context.Context) (Version, error)
- type XFSearchResult
- type XFStats
Constants ¶
const DefaultCacheTTL = 5 * time.Minute
DefaultCacheTTL is the default cache entry time-to-live.
const MinCacheTTL = 2 * time.Millisecond
MinCacheTTL is the minimum allowed TTL to ensure the cleanup ticker is valid. time.NewTicker requires a positive duration, and ttl/2 must be > 0.
Variables ¶
var ( ErrToolNotInstalled = errors.New("tool not installed") ErrToolNotHealthy = errors.New("tool not healthy") ErrTimeout = errors.New("operation timed out") ErrSchemaValidation = errors.New("schema validation failed") ErrCapabilityMissing = errors.New("capability not available") ErrOutputLimitExceeded = errors.New("output limit exceeded") )
Common errors returned by tool adapters
var ProviderEnvVars = map[string]string{
"claude": "ANTHROPIC_API_KEY",
"openai": "OPENAI_API_KEY",
"gemini": "GOOGLE_API_KEY",
}
ProviderEnvVars maps provider names to their API key environment variables
var VersionRegex = regexp.MustCompile(`(\d+)\.(\d+)\.(\d+)`)
VersionRegex matches semantic version strings like "0.31.0"
Functions ¶
func DetectProvider ¶
DetectProvider attempts to determine the AI provider from pane output
func GetCredentialEnvVar ¶
GetCredentialEnvVar returns the environment variable name for a provider's API key
func GetCredentialPath ¶
GetCredentialPath returns the expected path where caam stores credentials for a provider. Returns the path in ~/.config/caam/current/<provider>.json format.
Types ¶
type ACFSAdapter ¶
type ACFSAdapter struct {
*BaseAdapter
}
ACFSAdapter provides integration with the Agentic Coding Flywheel Setup (acfs) tool
func (*ACFSAdapter) Capabilities ¶
func (a *ACFSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of acfs capabilities
func (*ACFSAdapter) Detect ¶
func (a *ACFSAdapter) Detect() (string, bool)
Detect checks if acfs is installed
func (*ACFSAdapter) Doctor ¶
func (a *ACFSAdapter) Doctor(ctx context.Context) (json.RawMessage, error)
Doctor runs system health check
func (*ACFSAdapter) GetInfo ¶
func (a *ACFSAdapter) GetInfo(ctx context.Context) (json.RawMessage, error)
GetInfo returns system overview information
func (*ACFSAdapter) GetStatus ¶
func (a *ACFSAdapter) GetStatus(ctx context.Context) (json.RawMessage, error)
GetStatus returns installation progress status
func (*ACFSAdapter) HasCapability ¶
func (a *ACFSAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if acfs has a specific capability
func (*ACFSAdapter) Health ¶
func (a *ACFSAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if acfs is functioning correctly
type AMAdapter ¶
type AMAdapter struct {
*BaseAdapter
// contains filtered or unexported fields
}
AMAdapter provides integration with Agent Mail MCP server
func (*AMAdapter) Capabilities ¶
func (a *AMAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns Agent Mail capabilities
func (*AMAdapter) HasCapability ¶
func (a *AMAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if Agent Mail has a specific capability
func (*AMAdapter) Health ¶
func (a *AMAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if Agent Mail is functioning
func (*AMAdapter) HealthCheck ¶
HealthCheck calls the server health endpoint
func (*AMAdapter) SetServerURL ¶
SetServerURL updates the Agent Mail server URL
type Adapter ¶
type Adapter interface {
// Name returns the tool identifier
Name() ToolName
// Detect checks if the tool is installed and returns its path
Detect() (path string, installed bool)
// Version returns the installed version
Version(ctx context.Context) (Version, error)
// Capabilities returns the list of supported features
Capabilities(ctx context.Context) ([]Capability, error)
// Health checks if the tool is functioning correctly
Health(ctx context.Context) (*HealthStatus, error)
// HasCapability checks if a specific capability is available
HasCapability(ctx context.Context, cap Capability) bool
// Info returns complete tool information
Info(ctx context.Context) (*ToolInfo, error)
}
Adapter defines the interface that all tool adapters must implement
func GetDetected ¶
func GetDetected() []Adapter
GetDetected returns all detected tools from the global registry
type BDAdapter ¶
type BDAdapter struct {
*BaseAdapter
}
BDAdapter provides integration with the beads (bd) tool
func (*BDAdapter) Capabilities ¶
func (a *BDAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of bd capabilities
func (*BDAdapter) GetBlocked ¶
GetBlocked returns blocked issues
func (*BDAdapter) GetList ¶
func (a *BDAdapter) GetList(ctx context.Context, dir string, status string) (json.RawMessage, error)
GetList returns issues matching filter
func (*BDAdapter) HasCapability ¶
func (a *BDAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if bd has a specific capability
func (*BDAdapter) Health ¶
func (a *BDAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if bd is functioning correctly
type BVAdapter ¶
type BVAdapter struct {
*BaseAdapter
}
BVAdapter provides integration with the beads_viewer (bv) tool
func (*BVAdapter) Capabilities ¶
func (a *BVAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of bv capabilities
func (*BVAdapter) GetAlerts ¶
func (a *BVAdapter) GetAlerts(ctx context.Context, dir string, opts BVAlertOptions) (json.RawMessage, error)
Analysis mode methods for advanced BV analysis
func (*BVAdapter) GetBurndown ¶
func (*BVAdapter) GetFileBeads ¶
func (a *BVAdapter) GetFileBeads(ctx context.Context, dir string, filePath string, limit int) (json.RawMessage, error)
File mode methods for file-based analysis
func (*BVAdapter) GetFileHotspots ¶
func (*BVAdapter) GetFileRelations ¶
func (*BVAdapter) GetForecast ¶
func (*BVAdapter) GetGraph ¶
func (a *BVAdapter) GetGraph(ctx context.Context, dir string, opts BVGraphOptions) (json.RawMessage, error)
func (*BVAdapter) GetGroupedTriage ¶
func (a *BVAdapter) GetGroupedTriage(ctx context.Context, dir string, opts BVGroupedTriageOptions) (json.RawMessage, error)
func (*BVAdapter) GetHistory ¶
func (*BVAdapter) GetInsights ¶
GetInsights returns the robot-insights output
func (*BVAdapter) GetLabelAttention ¶
func (a *BVAdapter) GetLabelAttention(ctx context.Context, dir string, limit int) (json.RawMessage, error)
Label mode methods for label-based analysis
func (*BVAdapter) GetLabelFlow ¶
func (*BVAdapter) GetLabelHealth ¶
func (*BVAdapter) GetSearchWithOptions ¶
func (a *BVAdapter) GetSearchWithOptions(ctx context.Context, dir string, opts BVSearchOptions) (json.RawMessage, error)
func (*BVAdapter) GetSuggestions ¶
func (*BVAdapter) HasCapability ¶
func (a *BVAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if bv has a specific capability
func (*BVAdapter) Health ¶
func (a *BVAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if bv is functioning correctly
type BVAlertOptions ¶
BVAlertOptions configures BV alert filtering.
type BVGraphOptions ¶
type BVGraphOptions struct {
Format string
}
BVGraphOptions configures BV graph output.
type BVGroupedTriageOptions ¶
BVGroupedTriageOptions configures grouped triage output.
type BVSearchOptions ¶
BVSearchOptions configures BV search behavior.
type BaseAdapter ¶
type BaseAdapter struct {
// contains filtered or unexported fields
}
BaseAdapter provides common functionality for adapters
func NewBaseAdapter ¶
func NewBaseAdapter(name ToolName, binaryName string) *BaseAdapter
NewBaseAdapter creates a new base adapter
func (*BaseAdapter) BinaryName ¶
func (a *BaseAdapter) BinaryName() string
BinaryName returns the executable name
func (*BaseAdapter) SetTimeout ¶
func (a *BaseAdapter) SetTimeout(t time.Duration)
SetTimeout sets the default operation timeout
func (*BaseAdapter) Timeout ¶
func (a *BaseAdapter) Timeout() time.Duration
Timeout returns the default operation timeout
type BlockedCommand ¶
type BlockedCommand struct {
Command string `json:"command"`
Reason string `json:"reason"`
Timestamp string `json:"timestamp,omitempty"`
}
BlockedCommand represents a command that was blocked by DCG
type CAAMAccount ¶
type CAAMAccount struct {
ID string `json:"id"`
Provider string `json:"provider"`
Email string `json:"email,omitempty"`
Name string `json:"name,omitempty"`
Active bool `json:"active"`
RateLimited bool `json:"rate_limited,omitempty"`
CooldownUntil time.Time `json:"cooldown_until,omitempty"`
}
CAAMAccount represents an account managed by CAAM
type CAAMAdapter ¶
type CAAMAdapter struct {
*BaseAdapter
}
CAAMAdapter provides integration with the CAAM (Coding Agent Account Manager) tool. CAAM manages multiple accounts for AI coding agents and handles automatic account rotation when rate limits are hit.
func (*CAAMAdapter) Capabilities ¶
func (a *CAAMAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of caam capabilities
func (*CAAMAdapter) Detect ¶
func (a *CAAMAdapter) Detect() (string, bool)
Detect checks if caam is installed
func (*CAAMAdapter) GetAccounts ¶
func (a *CAAMAdapter) GetAccounts(ctx context.Context) ([]CAAMAccount, error)
GetAccounts returns the list of configured accounts
func (*CAAMAdapter) GetActiveAccount ¶
func (a *CAAMAdapter) GetActiveAccount(ctx context.Context) (*CAAMAccount, error)
GetActiveAccount returns the currently active account
func (*CAAMAdapter) GetCurrentCredentials ¶
func (a *CAAMAdapter) GetCurrentCredentials(ctx context.Context, provider string) (*CAAMCredentials, error)
GetCurrentCredentials returns credential information for the active account of a provider. This calls `caam creds <provider> --json` to get the current active credentials. The returned credentials include the environment variable name and optionally the token path.
func (*CAAMAdapter) GetStatus ¶
func (a *CAAMAdapter) GetStatus(ctx context.Context) (*CAAMStatus, error)
GetStatus returns the current CAAM status with caching
func (*CAAMAdapter) HasCapability ¶
func (a *CAAMAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if caam has a specific capability
func (*CAAMAdapter) HasMultipleAccounts ¶
func (a *CAAMAdapter) HasMultipleAccounts(ctx context.Context) bool
HasMultipleAccounts returns true if caam has more than one account configured
func (*CAAMAdapter) Health ¶
func (a *CAAMAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if caam is functioning correctly
func (*CAAMAdapter) Info ¶
func (a *CAAMAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete caam tool information
func (*CAAMAdapter) InvalidateCache ¶
func (a *CAAMAdapter) InvalidateCache()
InvalidateCache forces the next GetStatus call to fetch fresh data
func (*CAAMAdapter) IsAvailable ¶
func (a *CAAMAdapter) IsAvailable(ctx context.Context) bool
IsAvailable is a convenience method that returns true if caam is installed and has at least one account configured
func (*CAAMAdapter) SwitchAccount ¶
func (a *CAAMAdapter) SwitchAccount(ctx context.Context, accountID string) error
SwitchAccount switches to a different account
func (*CAAMAdapter) SwitchToNextAccount ¶
func (a *CAAMAdapter) SwitchToNextAccount(ctx context.Context, provider string) (*SwitchResult, error)
SwitchToNextAccount switches to the next available account for a provider. It calls `caam switch <provider> --next --json` and returns the structured result. This is the preferred method for automatic account switching on rate limit.
type CAAMCredentials ¶
type CAAMCredentials struct {
Provider string `json:"provider"`
AccountID string `json:"account_id"`
APIKey string `json:"api_key,omitempty"`
TokenPath string `json:"token_path,omitempty"`
EnvVarName string `json:"env_var_name"`
ValidUntil string `json:"valid_until,omitempty"`
RateLimited bool `json:"rate_limited"`
}
CAAMCredentials represents credential information for an active account
type CAAMStatus ¶
type CAAMStatus struct {
Available bool `json:"available"`
Version string `json:"version,omitempty"`
AccountsCount int `json:"accounts_count"`
Providers []string `json:"providers,omitempty"`
ActiveAccount *CAAMAccount `json:"active_account,omitempty"`
Accounts []CAAMAccount `json:"accounts,omitempty"`
}
CAAMStatus represents the current CAAM status
type CASSAdapter ¶
type CASSAdapter struct {
*BaseAdapter
}
CASSAdapter provides integration with Cross-Agent Semantic Search
func (*CASSAdapter) Capabilities ¶
func (a *CASSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns cass capabilities
func (*CASSAdapter) Detect ¶
func (a *CASSAdapter) Detect() (string, bool)
Detect checks if cass is installed
func (*CASSAdapter) GetCapabilities ¶
func (a *CASSAdapter) GetCapabilities(ctx context.Context) (json.RawMessage, error)
GetCapabilities returns cass capabilities info
func (*CASSAdapter) HasCapability ¶
func (a *CASSAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if cass has a specific capability
func (*CASSAdapter) Health ¶
func (a *CASSAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if cass is functioning
func (*CASSAdapter) Info ¶
func (a *CASSAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete cass tool information
func (*CASSAdapter) Search ¶
func (a *CASSAdapter) Search(ctx context.Context, query string, limit int) (json.RawMessage, error)
Search performs a semantic search across agent conversations
type CMAdapter ¶
type CMAdapter struct {
*BaseAdapter
// contains filtered or unexported fields
}
CMAdapter provides integration with the CASS Memory (cm) tool
func (*CMAdapter) Capabilities ¶
func (a *CMAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns cm capabilities
func (*CMAdapter) GetContext ¶
func (a *CMAdapter) GetContext(ctx context.Context, taskDescription string) (json.RawMessage, error)
GetContext retrieves contextual information for a task
func (*CMAdapter) HasCapability ¶
func (a *CMAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if cm has a specific capability
func (*CMAdapter) Health ¶
func (a *CMAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if cm is functioning
func (*CMAdapter) OnboardStatus ¶
OnboardStatus returns onboarding status
func (*CMAdapter) SetServerPort ¶
SetServerPort updates the CM server port
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache provides thread-safe caching with TTL
func NewCache ¶
NewCache creates a new cache with the specified TTL. If ttl is 0, DefaultCacheTTL is used. If ttl is less than MinCacheTTL, MinCacheTTL is used to ensure the cleanup goroutine's ticker has a valid positive duration.
func (*Cache) Close ¶
func (c *Cache) Close()
Close stops the cleanup goroutine and releases resources. The cache should not be used after Close is called.
func (*Cache) SetWithTTL ¶
SetWithTTL stores a value with a custom TTL
type Capability ¶
type Capability string
Capability represents a feature provided by a tool
const ( CapRobotMode Capability = "robot_mode" // JSON output for automation CapDaemonMode Capability = "daemon_mode" // Can run as daemon CapMacros Capability = "macros" // Supports macro commands CapSearch Capability = "search" // Can search content CapContextPack Capability = "context_pack" // Context preparation )
Common capabilities across tools
type CautAdapter ¶
type CautAdapter struct {
*BaseAdapter
}
CautAdapter provides integration with the caut (Cloud API Usage Tracker) tool. caut tracks API usage, quotas, and spending across cloud providers like Anthropic, OpenAI, etc.
func (*CautAdapter) Capabilities ¶
func (a *CautAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of caut capabilities
func (*CautAdapter) Detect ¶
func (a *CautAdapter) Detect() (string, bool)
Detect checks if caut is installed
func (*CautAdapter) GetAllUsage ¶
GetAllUsage returns usage data for all configured providers
func (*CautAdapter) GetAvailability ¶
func (a *CautAdapter) GetAvailability(ctx context.Context) (*CautAvailability, error)
GetAvailability returns whether caut is available and compatible, with caching.
func (*CautAdapter) GetQuotaStatus ¶
func (a *CautAdapter) GetQuotaStatus(ctx context.Context) ([]CautProvider, error)
GetQuotaStatus returns the current quota status for all providers
func (*CautAdapter) GetStatus ¶
func (a *CautAdapter) GetStatus(ctx context.Context) (*CautStatus, error)
GetStatus returns the current caut status
func (*CautAdapter) HasCapability ¶
func (a *CautAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if caut has a specific capability
func (*CautAdapter) HasUsageData ¶
func (a *CautAdapter) HasUsageData(ctx context.Context) bool
HasUsageData returns true if caut has been configured with usage data.
func (*CautAdapter) Health ¶
func (a *CautAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if caut is functioning correctly
func (*CautAdapter) Info ¶
func (a *CautAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete caut tool information
func (*CautAdapter) InvalidateAvailabilityCache ¶
func (a *CautAdapter) InvalidateAvailabilityCache()
InvalidateAvailabilityCache forces the next GetAvailability call to re-check.
func (*CautAdapter) IsAvailable ¶
func (a *CautAdapter) IsAvailable(ctx context.Context) bool
IsAvailable returns true if caut is installed and compatible.
type CautAvailability ¶
type CautAvailability struct {
Available bool `json:"available"`
Compatible bool `json:"compatible"`
HasData bool `json:"has_data"` // Has been initialized with usage data
Version Version `json:"version,omitempty"`
Path string `json:"path,omitempty"`
Providers []string `json:"providers,omitempty"` // Configured providers
LastChecked time.Time `json:"last_checked"`
Error string `json:"error,omitempty"`
}
CautAvailability represents the availability and compatibility of caut on PATH.
type CautProvider ¶
type CautProvider struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
HasQuota bool `json:"has_quota"`
QuotaUsed float64 `json:"quota_used,omitempty"` // 0-100 percentage
}
CautProvider represents a cloud API provider configuration
type CautStatus ¶
type CautStatus struct {
Running bool `json:"running"`
Tracking bool `json:"tracking"`
ProviderCount int `json:"provider_count"`
Providers []CautProvider `json:"providers,omitempty"`
TotalSpend float64 `json:"total_spend,omitempty"` // Total spend in USD
QuotaPercent float64 `json:"quota_percent,omitempty"` // Overall quota usage 0-100
LastUpdated string `json:"last_updated,omitempty"` // ISO timestamp
Error string `json:"error,omitempty"`
}
CautStatus represents the current caut status
type CautUsage ¶
type CautUsage struct {
Provider string `json:"provider"`
RequestCount int `json:"request_count"`
TokensIn int64 `json:"tokens_in"`
TokensOut int64 `json:"tokens_out"`
Cost float64 `json:"cost"`
Period string `json:"period"` // "day", "week", "month"
StartDate string `json:"start_date,omitempty"`
EndDate string `json:"end_date,omitempty"`
}
CautUsage represents usage data for a specific time period
type DCGAdapter ¶
type DCGAdapter struct {
*BaseAdapter
}
DCGAdapter provides integration with the Destructive Command Guard (dcg) tool. DCG blocks dangerous commands like rm -rf, git reset --hard, DROP DATABASE, etc. and provides safety guardrails for agent operations.
func (*DCGAdapter) Capabilities ¶
func (a *DCGAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of dcg capabilities
func (*DCGAdapter) CheckCommand ¶
func (a *DCGAdapter) CheckCommand(ctx context.Context, command string) (*BlockedCommand, error)
CheckCommand checks if a command would be blocked by DCG
func (*DCGAdapter) Detect ¶
func (a *DCGAdapter) Detect() (string, bool)
Detect checks if dcg is installed
func (*DCGAdapter) GetAvailability ¶
func (a *DCGAdapter) GetAvailability(ctx context.Context) (*DCGAvailability, error)
GetAvailability returns whether dcg is available and compatible, with caching. It logs a warning if dcg is missing or incompatible, but does not return an error.
func (*DCGAdapter) GetStatus ¶
func (a *DCGAdapter) GetStatus(ctx context.Context) (*DCGStatus, error)
GetStatus returns the current DCG status
func (*DCGAdapter) HasCapability ¶
func (a *DCGAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if dcg has a specific capability
func (*DCGAdapter) Health ¶
func (a *DCGAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if dcg is functioning correctly
func (*DCGAdapter) Info ¶
func (a *DCGAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete dcg tool information
func (*DCGAdapter) InvalidateAvailabilityCache ¶
func (a *DCGAdapter) InvalidateAvailabilityCache()
InvalidateAvailabilityCache forces the next GetAvailability call to re-check.
func (*DCGAdapter) IsAvailable ¶
func (a *DCGAdapter) IsAvailable(ctx context.Context) bool
IsAvailable returns true if dcg is installed and compatible.
type DCGAvailability ¶
type DCGAvailability struct {
Available bool `json:"available"`
Compatible bool `json:"compatible"`
Version Version `json:"version,omitempty"`
Path string `json:"path,omitempty"`
LastChecked time.Time `json:"last_checked"`
Error string `json:"error,omitempty"`
}
DCGAvailability represents the availability and compatibility of dcg on PATH. Available indicates the binary is found; Compatible indicates version meets minimum requirements.
type DCGStatus ¶
type DCGStatus struct {
Enabled bool `json:"enabled"`
BlockedPatterns []string `json:"blocked_patterns,omitempty"`
AllowedOverrides []string `json:"allowed_overrides,omitempty"`
}
DCGStatus represents the current DCG configuration status
type GIILAdapter ¶
type GIILAdapter struct {
*BaseAdapter
}
GIILAdapter provides integration with the GIIL (Get Image from Internet Link) tool. GIIL downloads images from cloud photo sharing services (iCloud, Dropbox, Google Photos, Google Drive) with maximum reliability using Playwright.
func (*GIILAdapter) Capabilities ¶
func (a *GIILAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of giil capabilities
func (*GIILAdapter) Detect ¶
func (a *GIILAdapter) Detect() (string, bool)
Detect checks if giil is installed
func (*GIILAdapter) Download ¶
func (a *GIILAdapter) Download(ctx context.Context, shareURL, outputDir string) (*GIILMetadata, error)
Download downloads an image from a share URL
func (*GIILAdapter) GetDirectURL ¶
func (a *GIILAdapter) GetDirectURL(ctx context.Context, shareURL string) (*GIILMetadata, error)
GetDirectURL extracts the direct download URL without actually downloading
func (*GIILAdapter) HasCapability ¶
func (a *GIILAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if giil has a specific capability
func (*GIILAdapter) Health ¶
func (a *GIILAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if giil is functioning correctly
type GIILMetadata ¶
type GIILMetadata struct {
URL string `json:"url,omitempty"`
DirectURL string `json:"direct_url,omitempty"`
Filename string `json:"filename,omitempty"`
OutputPath string `json:"output_path,omitempty"`
ContentType string `json:"content_type,omitempty"`
Size int64 `json:"size,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Platform string `json:"platform,omitempty"` // icloud, dropbox, google_photos, google_drive
DownloadedAt string `json:"downloaded_at,omitempty"`
}
GIILMetadata represents metadata about a downloaded image
type HealthReport ¶
type HealthReport struct {
Total int `json:"total"`
Healthy int `json:"healthy"`
Unhealthy int `json:"unhealthy"`
Missing int `json:"missing"`
Tools map[ToolName]bool `json:"tools"`
}
HealthReport summarizes tool health across the registry.
func GetHealthReport ¶
func GetHealthReport(ctx context.Context) *HealthReport
GetHealthReport returns health report from the global registry
type HealthStatus ¶
type HealthStatus struct {
Healthy bool `json:"healthy"`
Message string `json:"message,omitempty"`
LastChecked time.Time `json:"last_checked"`
Latency time.Duration `json:"latency_ms,omitempty"`
Error string `json:"error,omitempty"`
}
HealthStatus represents the health state of a tool
type JFPAdapter ¶
type JFPAdapter struct {
*BaseAdapter
}
JFPAdapter provides integration with the JeffreysPrompts CLI (jfp)
func (*JFPAdapter) Bundle ¶
func (a *JFPAdapter) Bundle(ctx context.Context, id string) (json.RawMessage, error)
Bundle returns details for a specific bundle
func (*JFPAdapter) Bundles ¶
func (a *JFPAdapter) Bundles(ctx context.Context) (json.RawMessage, error)
Bundles returns all prompt bundles
func (*JFPAdapter) Capabilities ¶
func (a *JFPAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of jfp capabilities
func (*JFPAdapter) Categories ¶
func (a *JFPAdapter) Categories(ctx context.Context) (json.RawMessage, error)
Categories returns all categories with counts
func (*JFPAdapter) Detect ¶
func (a *JFPAdapter) Detect() (string, bool)
Detect checks if jfp is installed
func (*JFPAdapter) HasCapability ¶
func (a *JFPAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if jfp has a specific capability
func (*JFPAdapter) Health ¶
func (a *JFPAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if jfp is functioning correctly
func (*JFPAdapter) Info ¶
func (a *JFPAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete jfp tool information
func (*JFPAdapter) Installed ¶
func (a *JFPAdapter) Installed(ctx context.Context) (json.RawMessage, error)
Installed returns list of installed Claude Code skills
func (*JFPAdapter) List ¶
func (a *JFPAdapter) List(ctx context.Context) (json.RawMessage, error)
List returns all prompts
func (*JFPAdapter) ListByCategory ¶
func (a *JFPAdapter) ListByCategory(ctx context.Context, category string) (json.RawMessage, error)
ListByCategory returns prompts filtered by category
func (*JFPAdapter) ListByTag ¶
func (a *JFPAdapter) ListByTag(ctx context.Context, tag string) (json.RawMessage, error)
ListByTag returns prompts filtered by tag
func (*JFPAdapter) Search ¶
func (a *JFPAdapter) Search(ctx context.Context, query string) (json.RawMessage, error)
Search performs fuzzy search for prompts
func (*JFPAdapter) Show ¶
func (a *JFPAdapter) Show(ctx context.Context, id string) (json.RawMessage, error)
Show returns details for a specific prompt
func (*JFPAdapter) Status ¶
func (a *JFPAdapter) Status(ctx context.Context) (json.RawMessage, error)
Status returns registry cache status and settings
func (*JFPAdapter) Suggest ¶
func (a *JFPAdapter) Suggest(ctx context.Context, task string) (json.RawMessage, error)
Suggest returns prompt suggestions for a task
func (*JFPAdapter) Tags ¶
func (a *JFPAdapter) Tags(ctx context.Context) (json.RawMessage, error)
Tags returns all tags with counts
type LimitedBuffer ¶
LimitedBuffer is a bytes.Buffer that errors on overflow. It is used to prevent OOM when capturing command output.
func NewLimitedBuffer ¶
func NewLimitedBuffer(limit int) *LimitedBuffer
NewLimitedBuffer creates a new LimitedBuffer with the specified limit.
type MSAdapter ¶
type MSAdapter struct {
*BaseAdapter
}
MSAdapter provides integration with the Meta Skill (ms) tool
func (*MSAdapter) Capabilities ¶
func (a *MSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of ms capabilities
func (*MSAdapter) HasCapability ¶
func (a *MSAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if ms has a specific capability
func (*MSAdapter) Health ¶
func (a *MSAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if ms is functioning correctly
type PTAdapter ¶
type PTAdapter struct {
*BaseAdapter
}
PTAdapter provides integration with the process_triage tool. process_triage uses Bayesian classification to identify useful, abandoned, and zombie processes.
func NewPTAdapter ¶
func NewPTAdapter() *PTAdapter
NewPTAdapter creates a new process_triage adapter
func (*PTAdapter) Capabilities ¶
func (a *PTAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of pt capabilities
func (*PTAdapter) ClassifyProcess ¶
ClassifyProcess classifies a single process by PID
func (*PTAdapter) ClassifyProcesses ¶
ClassifyProcesses classifies multiple processes
func (*PTAdapter) HasCapability ¶
func (a *PTAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if pt has a specific capability
func (*PTAdapter) Health ¶
func (a *PTAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if pt is functioning correctly
func (*PTAdapter) InvalidateStatusCache ¶
func (a *PTAdapter) InvalidateStatusCache()
InvalidateStatusCache forces the next GetStatus call to re-check
func (*PTAdapter) IsAvailable ¶
IsAvailable returns true if pt is installed and compatible
func (*PTAdapter) WatchSession ¶
func (a *PTAdapter) WatchSession(ctx context.Context, sessionName string) ([]PTProcessResult, error)
WatchSession monitors agent processes in a session
type PTClassification ¶
type PTClassification string
PTClassification represents a process classification result
const ( PTClassUseful PTClassification = "useful" PTClassAbandoned PTClassification = "abandoned" PTClassZombie PTClassification = "zombie" PTClassUnknown PTClassification = "unknown" )
type PTProcessResult ¶
type PTProcessResult struct {
PID int `json:"pid"`
Name string `json:"name,omitempty"`
Classification PTClassification `json:"classification"`
Confidence float64 `json:"confidence"` // 0.0 to 1.0
Reason string `json:"reason,omitempty"`
}
PTProcessResult represents classification result for a single process
type PTStatus ¶
type PTStatus struct {
Available bool `json:"available"`
Compatible bool `json:"compatible"`
Version Version `json:"version,omitempty"`
Path string `json:"path,omitempty"`
LastChecked time.Time `json:"last_checked"`
Error string `json:"error,omitempty"`
}
PTStatus represents the availability and compatibility of pt on PATH.
type RCHAdapter ¶
type RCHAdapter struct {
*BaseAdapter
}
RCHAdapter provides integration with the Remote Compilation Helper (rch) tool. RCH offloads build commands to remote workers for faster compilation.
func (*RCHAdapter) Capabilities ¶
func (a *RCHAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of rch capabilities
func (*RCHAdapter) Detect ¶
func (a *RCHAdapter) Detect() (string, bool)
Detect checks if rch is installed
func (*RCHAdapter) GetAvailability ¶
func (a *RCHAdapter) GetAvailability(ctx context.Context) (*RCHAvailability, error)
GetAvailability returns whether rch is available and compatible, with caching. It also checks worker availability since workers may come and go.
func (*RCHAdapter) GetStatus ¶
func (a *RCHAdapter) GetStatus(ctx context.Context) (*RCHStatus, error)
GetStatus returns the current RCH status including worker information
func (*RCHAdapter) GetWorkers ¶
func (a *RCHAdapter) GetWorkers(ctx context.Context) ([]RCHWorker, error)
GetWorkers returns the list of configured workers
func (*RCHAdapter) HasCapability ¶
func (a *RCHAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if rch has a specific capability
func (*RCHAdapter) HasHealthyWorkers ¶
func (a *RCHAdapter) HasHealthyWorkers(ctx context.Context) bool
HasHealthyWorkers returns true if there are any healthy workers available.
func (*RCHAdapter) Health ¶
func (a *RCHAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if rch is functioning correctly
func (*RCHAdapter) Info ¶
func (a *RCHAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete rch tool information
func (*RCHAdapter) InvalidateAvailabilityCache ¶
func (a *RCHAdapter) InvalidateAvailabilityCache()
InvalidateAvailabilityCache forces the next GetAvailability call to re-check.
func (*RCHAdapter) IsAvailable ¶
func (a *RCHAdapter) IsAvailable(ctx context.Context) bool
IsAvailable returns true if rch is installed and compatible.
func (*RCHAdapter) SelectWorker ¶
SelectWorker returns the best available worker for a build
type RCHAvailability ¶
type RCHAvailability struct {
Available bool `json:"available"`
Compatible bool `json:"compatible"`
Version Version `json:"version,omitempty"`
Path string `json:"path,omitempty"`
WorkerCount int `json:"worker_count"`
HealthyCount int `json:"healthy_count"`
LastChecked time.Time `json:"last_checked"`
Error string `json:"error,omitempty"`
}
RCHAvailability represents the availability and compatibility of rch on PATH.
type RCHStatus ¶
type RCHStatus struct {
Enabled bool `json:"enabled"`
WorkerCount int `json:"worker_count"`
HealthyCount int `json:"healthy_count"`
Workers []RCHWorker `json:"workers,omitempty"`
}
RCHStatus represents the current RCH status including workers
type RCHWorker ¶
type RCHWorker struct {
Name string `json:"name"`
Host string `json:"host,omitempty"`
Available bool `json:"available"`
Healthy bool `json:"healthy"`
Load int `json:"load,omitempty"` // 0-100 load percentage
Queue int `json:"queue,omitempty"` // Jobs in queue
LastSeen string `json:"last_seen,omitempty"` // ISO timestamp
CurrentBuild string `json:"current_build,omitempty"` // Current build command (if provided)
BuildsCompleted int `json:"builds_completed,omitempty"` // Total builds completed (if provided)
CPUPercent int `json:"cpu_percent,omitempty"` // Current CPU percent (if provided)
}
RCHWorker represents a remote compilation worker
type RUAdapter ¶
type RUAdapter struct {
*BaseAdapter
}
RUAdapter provides integration with the Repo Updater (ru) tool. RU is a CLI for synchronizing GitHub repositories across multiple projects, supporting smart commits, issue/PR review, and automation workflows.
func (*RUAdapter) Capabilities ¶
func (a *RUAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of ru capabilities
func (*RUAdapter) HasCapability ¶
func (a *RUAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if ru has a specific capability
func (*RUAdapter) Health ¶
func (a *RUAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if ru is functioning correctly
type RURepoStatus ¶
type RURepoStatus struct {
Name string `json:"name"`
Path string `json:"path"`
Status string `json:"status"`
Branch string `json:"branch,omitempty"`
Ahead int `json:"ahead,omitempty"`
Behind int `json:"behind,omitempty"`
HasChanges bool `json:"has_changes,omitempty"`
}
RURepoStatus represents the status of a single repo
type RUStatus ¶
type RUStatus struct {
Repos []RURepoStatus `json:"repos,omitempty"`
TotalRepos int `json:"total_repos"`
NeedsSync int `json:"needs_sync"`
UpToDate int `json:"up_to_date"`
HasChanges int `json:"has_changes"`
}
RUStatus represents the current ru status output
type RanoAdapter ¶
type RanoAdapter struct {
*BaseAdapter
}
RanoAdapter provides integration with the rano network observer tool. rano monitors network traffic per-process, enabling per-agent API tracking.
func (*RanoAdapter) Capabilities ¶
func (a *RanoAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of rano capabilities
func (*RanoAdapter) Detect ¶
func (a *RanoAdapter) Detect() (string, bool)
Detect checks if rano is installed
func (*RanoAdapter) GetAllProcessStats ¶
func (a *RanoAdapter) GetAllProcessStats(ctx context.Context) ([]RanoProcessStats, error)
GetAllProcessStats returns network stats for all tracked processes. Window is optional; empty means default window.
func (*RanoAdapter) GetAllProcessStatsWithWindow ¶
func (a *RanoAdapter) GetAllProcessStatsWithWindow(ctx context.Context, window string) ([]RanoProcessStats, error)
GetAllProcessStatsWithWindow returns network stats for all tracked processes with a time window override. Window should be a string like "5m", "1h". Empty means default window.
func (*RanoAdapter) GetAvailability ¶
func (a *RanoAdapter) GetAvailability(ctx context.Context) (*RanoAvailability, error)
GetAvailability returns whether rano is available and compatible, with caching.
func (*RanoAdapter) GetProcessStats ¶
func (a *RanoAdapter) GetProcessStats(ctx context.Context, pid int) (*RanoProcessStats, error)
GetProcessStats returns network stats for a specific PID. Window is optional; empty means default window.
func (*RanoAdapter) GetProcessStatsWithWindow ¶
func (a *RanoAdapter) GetProcessStatsWithWindow(ctx context.Context, pid int, window string) (*RanoProcessStats, error)
GetProcessStatsWithWindow returns network stats for a specific PID with a time window override. Window should be a string like "5m", "1h". Empty means default window.
func (*RanoAdapter) GetStatus ¶
func (a *RanoAdapter) GetStatus(ctx context.Context) (*RanoStatus, error)
GetStatus returns the current rano status
func (*RanoAdapter) HasCapability ¶
func (a *RanoAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if rano has a specific capability
func (*RanoAdapter) HasRequiredPermissions ¶
func (a *RanoAdapter) HasRequiredPermissions(ctx context.Context) bool
HasRequiredPermissions returns true if rano has the required capabilities.
func (*RanoAdapter) Health ¶
func (a *RanoAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if rano is functioning correctly
func (*RanoAdapter) Info ¶
func (a *RanoAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete rano tool information
func (*RanoAdapter) InvalidateAvailabilityCache ¶
func (a *RanoAdapter) InvalidateAvailabilityCache()
InvalidateAvailabilityCache forces the next GetAvailability call to re-check.
func (*RanoAdapter) IsAvailable ¶
func (a *RanoAdapter) IsAvailable(ctx context.Context) bool
IsAvailable returns true if rano is installed, compatible, and has required permissions.
type RanoAvailability ¶
type RanoAvailability struct {
Available bool `json:"available"`
Compatible bool `json:"compatible"`
HasCapability bool `json:"has_capability"` // Has CAP_NET_ADMIN
CanReadProc bool `json:"can_read_proc"` // Can read /proc for PID mapping
Version Version `json:"version,omitempty"`
Path string `json:"path,omitempty"`
LastChecked time.Time `json:"last_checked"`
Error string `json:"error,omitempty"`
}
RanoAvailability represents the availability and compatibility of rano on PATH.
type RanoProcessStats ¶
type RanoProcessStats struct {
PID int `json:"pid"`
ProcessName string `json:"process_name,omitempty"`
RequestCount int `json:"request_count"`
BytesIn int64 `json:"bytes_in"`
BytesOut int64 `json:"bytes_out"`
LastRequest string `json:"last_request,omitempty"` // ISO timestamp
}
RanoProcessStats represents network stats for a single process/agent
type RanoStatus ¶
type RanoStatus struct {
Running bool `json:"running"`
Monitoring bool `json:"monitoring"`
ProcessCount int `json:"process_count"` // Number of processes being tracked
RequestCount int `json:"request_count"` // Total API requests observed
BytesIn int64 `json:"bytes_in"` // Total bytes received
BytesOut int64 `json:"bytes_out"` // Total bytes sent
Error string `json:"error,omitempty"`
}
RanoStatus represents the current rano status
type RateLimitCallback ¶
RateLimitCallback is called when a rate limit is detected
type RateLimitDetector ¶
type RateLimitDetector struct {
// contains filtered or unexported fields
}
RateLimitDetector monitors agent output for rate limit signals and triggers CAAM account switching. It uses pattern matching to detect rate limit messages from different AI providers.
func NewRateLimitDetector ¶
func NewRateLimitDetector(adapter *CAAMAdapter) *RateLimitDetector
NewRateLimitDetector creates a new rate limit detector with default patterns
func (*RateLimitDetector) Check ¶
func (d *RateLimitDetector) Check(output string, paneID string) *RateLimitEvent
Check analyzes output for rate limit signals and triggers callback if found. It returns the detected event if a rate limit was found, nil otherwise. Providers are checked in order: claude, openai, gemini (deterministic).
func (*RateLimitDetector) SetCallback ¶
func (d *RateLimitDetector) SetCallback(cb RateLimitCallback)
SetCallback sets the callback function for rate limit detection
func (*RateLimitDetector) SetCooldownPeriod ¶
func (d *RateLimitDetector) SetCooldownPeriod(period time.Duration)
SetCooldownPeriod sets the minimum time between detections per provider
func (*RateLimitDetector) TriggerAccountSwitch ¶
func (d *RateLimitDetector) TriggerAccountSwitch(ctx context.Context, event *RateLimitEvent) *RateLimitEvent
TriggerAccountSwitch attempts to switch CAAM accounts when rate limit is detected. Uses the new SwitchToNextAccount method which calls `caam switch <provider> --next --json`. Returns the event with switch results populated.
type RateLimitEvent ¶
type RateLimitEvent struct {
Provider string `json:"provider"` // claude, openai, gemini
PaneID string `json:"pane_id"` // Pane where limit was detected
DetectedAt time.Time `json:"detected_at"` // When limit was detected
Patterns []string `json:"patterns"` // Which patterns matched
WaitSeconds int `json:"wait_seconds"` // Suggested wait time (if detected)
AccountBefore string `json:"account_before"` // Account before switch (if any)
AccountAfter string `json:"account_after"` // Account after switch (if any)
SwitchSuccess bool `json:"switch_success"` // Whether account switch succeeded
}
RateLimitEvent contains information about a detected rate limit
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maintains a collection of tool adapters
func GlobalRegistry ¶
func GlobalRegistry() *Registry
GlobalRegistry returns the global registry instance
func (*Registry) GetAllInfo ¶
GetAllInfo returns ToolInfo for all registered tools
func (*Registry) GetHealthReport ¶
func (r *Registry) GetHealthReport(ctx context.Context) *HealthReport
GetHealthReport returns a health summary for all registered tools
type S2PAdapter ¶
type S2PAdapter struct {
*BaseAdapter
}
S2PAdapter provides integration with Source-to-Prompt tool
func (*S2PAdapter) Capabilities ¶
func (a *S2PAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns s2p capabilities
func (*S2PAdapter) Detect ¶
func (a *S2PAdapter) Detect() (string, bool)
Detect checks if s2p is installed
func (*S2PAdapter) GenerateContext ¶
func (a *S2PAdapter) GenerateContext(ctx context.Context, dir string, patterns []string, format string) ([]byte, error)
GenerateContext generates context for given files/patterns
func (*S2PAdapter) HasCapability ¶
func (a *S2PAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if s2p has a specific capability
func (*S2PAdapter) Health ¶
func (a *S2PAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if s2p is functioning
type SLBAdapter ¶
type SLBAdapter struct {
*BaseAdapter
}
SLBAdapter provides integration with the Simultaneous Launch Button (slb) tool
func (*SLBAdapter) Approve ¶
func (a *SLBAdapter) Approve(ctx context.Context, requestID string) (json.RawMessage, error)
Approve approves a pending request
func (*SLBAdapter) Capabilities ¶
func (a *SLBAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of slb capabilities
func (*SLBAdapter) Deny ¶
func (a *SLBAdapter) Deny(ctx context.Context, requestID string, reason string) (json.RawMessage, error)
Deny denies a pending request
func (*SLBAdapter) Detect ¶
func (a *SLBAdapter) Detect() (string, bool)
Detect checks if slb is installed
func (*SLBAdapter) HasCapability ¶
func (a *SLBAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if slb has a specific capability
func (*SLBAdapter) Health ¶
func (a *SLBAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if slb is functioning correctly
func (*SLBAdapter) Info ¶
func (a *SLBAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete slb tool information
func (*SLBAdapter) Pending ¶
func (a *SLBAdapter) Pending(ctx context.Context) (json.RawMessage, error)
Pending returns list of pending approval requests
func (*SLBAdapter) Request ¶
func (a *SLBAdapter) Request(ctx context.Context, command string, reason string) (json.RawMessage, error)
Request creates a new approval request for a command
func (*SLBAdapter) Status ¶
func (a *SLBAdapter) Status(ctx context.Context) (json.RawMessage, error)
Status returns the current SLB daemon status
type SwitchResult ¶
type SwitchResult struct {
Success bool `json:"success"`
Provider string `json:"provider"`
PreviousAccount string `json:"previous_account"`
NewAccount string `json:"new_account"`
CooldownUntil time.Time `json:"cooldown_until,omitempty"`
AccountsRemaining int `json:"accounts_remaining"`
Error string `json:"error,omitempty"`
}
SwitchResult represents the response from caam switch --next --json
type ToolInfo ¶
type ToolInfo struct {
Name ToolName `json:"name"`
Installed bool `json:"installed"`
Version Version `json:"version,omitempty"`
Capabilities []Capability `json:"capabilities,omitempty"`
Path string `json:"path,omitempty"`
Health HealthStatus `json:"health"`
}
ToolInfo contains metadata about a detected tool
func GetAllInfo ¶
GetAllInfo returns all tool info from the global registry
type ToolName ¶
type ToolName string
ToolName identifies a specific tool in the ecosystem
const ( ToolBV ToolName = "bv" // Beads Viewer - graph-aware triage ToolBD ToolName = "bd" // Beads - issue tracking ToolAM ToolName = "am" // Agent Mail MCP server ToolCM ToolName = "cm" // Cass Memory system ToolCASS ToolName = "cass" // Cross-Agent Semantic Search ToolS2P ToolName = "s2p" // Source to Prompt ToolJFP ToolName = "jfp" // JeffreysPrompts CLI - prompt library ToolDCG ToolName = "dcg" // Destructive Command Guard - blocks dangerous commands ToolSLB ToolName = "slb" // Simultaneous Launch Button - two-person authorization ToolACFS ToolName = "acfs" // Agentic Coding Flywheel Setup - system configuration ToolRU ToolName = "ru" // Repo Updater - multi-repo sync and management ToolMS ToolName = "ms" // Meta Skill - skill search and suggestion ToolXF ToolName = "xf" // X Find - X/Twitter archive search ToolGIIL ToolName = "giil" // Get Image from Internet Link - cloud photo downloader ToolUBS ToolName = "ubs" // Ultimate Bug Scanner - code review and bug detection ToolCAAM ToolName = "caam" // CAAM - Coding Agent Account Manager for rate limit recovery ToolRCH ToolName = "rch" // RCH - Remote Compilation Helper for build offloading ToolRano ToolName = "rano" // rano - Network observer for per-agent API tracking ToolCaut ToolName = "caut" // caut - Cloud API Usage Tracker for quota monitoring ToolPT ToolName = "pt" // pt - process_triage - Bayesian agent health classification )
type UBSAdapter ¶
type UBSAdapter struct {
*BaseAdapter
}
UBSAdapter provides integration with the Ultimate Bug Scanner (ubs) tool. UBS performs code review and bug detection, identifying potential issues before they reach production.
func (*UBSAdapter) Capabilities ¶
func (a *UBSAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of ubs capabilities
func (*UBSAdapter) Detect ¶
func (a *UBSAdapter) Detect() (string, bool)
Detect checks if ubs is installed
func (*UBSAdapter) Doctor ¶
func (a *UBSAdapter) Doctor(ctx context.Context) (string, error)
Doctor runs UBS diagnostics
func (*UBSAdapter) HasCapability ¶
func (a *UBSAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if ubs has a specific capability
func (*UBSAdapter) Health ¶
func (a *UBSAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if ubs is functioning correctly
func (*UBSAdapter) Info ¶
func (a *UBSAdapter) Info(ctx context.Context) (*ToolInfo, error)
Info returns complete ubs tool information
func (*UBSAdapter) Scan ¶
func (a *UBSAdapter) Scan(ctx context.Context, path string) (*UBSScanResult, error)
Scan runs UBS on a path and returns findings
type UBSFinding ¶
type UBSFinding struct {
ID string `json:"id,omitempty"`
Severity string `json:"severity,omitempty"` // critical, high, medium, low, info
Category string `json:"category,omitempty"` // security, performance, maintainability, etc.
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Message string `json:"message,omitempty"`
Suggestion string `json:"suggestion,omitempty"`
RuleID string `json:"rule_id,omitempty"`
}
UBSFinding represents a bug or issue found by UBS
type UBSScanResult ¶
type UBSScanResult struct {
Findings []UBSFinding `json:"findings,omitempty"`
TotalCount int `json:"total_count"`
Critical int `json:"critical"`
High int `json:"high"`
Medium int `json:"medium"`
Low int `json:"low"`
Info int `json:"info"`
ScanTime string `json:"scan_time,omitempty"`
}
UBSScanResult represents the result of a UBS scan
type Version ¶
type Version struct {
Major int `json:"major"`
Minor int `json:"minor"`
Patch int `json:"patch"`
Raw string `json:"raw"`
}
Version represents a parsed semantic version
func ParseStandardVersion ¶
ParseStandardVersion extracts version from command output using VersionRegex. It handles standard semantic version formats (X.Y.Z).
type XFAdapter ¶
type XFAdapter struct {
*BaseAdapter
}
XFAdapter provides integration with the XF (X Find) tool. XF is a CLI for indexing and searching X/Twitter data archives, supporting full-text search with BM25 ranking via Tantivy.
func (*XFAdapter) Capabilities ¶
func (a *XFAdapter) Capabilities(ctx context.Context) ([]Capability, error)
Capabilities returns the list of xf capabilities
func (*XFAdapter) HasCapability ¶
func (a *XFAdapter) HasCapability(ctx context.Context, cap Capability) bool
HasCapability checks if xf has a specific capability
func (*XFAdapter) Health ¶
func (a *XFAdapter) Health(ctx context.Context) (*HealthStatus, error)
Health checks if xf is functioning correctly
type XFSearchResult ¶
type XFSearchResult struct {
ID string `json:"id"`
Content string `json:"content"`
CreatedAt string `json:"created_at,omitempty"`
Type string `json:"type,omitempty"` // tweet, like, dm, grok
Score float64 `json:"score,omitempty"`
}
XFSearchResult represents a search result
type XFStats ¶
type XFStats struct {
TweetCount int `json:"tweet_count,omitempty"`
LikeCount int `json:"like_count,omitempty"`
DMCount int `json:"dm_count,omitempty"`
GrokCount int `json:"grok_count,omitempty"`
IndexStatus string `json:"index_status,omitempty"`
LastIndexed string `json:"last_indexed,omitempty"`
DatabasePath string `json:"database_path,omitempty"`
}
XFStats represents archive statistics