Documentation
¶
Overview ¶
Package toolcatalog describes local CLI launch profiles without coupling them to terminal backends, provider APIs, credentials, or model selection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve(request LaunchRequest) (agent.Spec, error)
Resolve creates an agent.Spec using exact argv supplied by the caller. A known profile may provide only its executable name; it never adds flags. The caller remains responsible for canonical agent.ValidateSpec validation in the context of its configuration directory and default backend.
Types ¶
type Descriptor ¶
type Descriptor struct {
ID ProfileID
Name string
Executables []string
DefaultAdapter string
RequiresExecutable bool
MinimumArguments int
ArgumentPrefix []string
}
Descriptor contains only non-sensitive launch metadata. A descriptor is not a claim that Relayer has a vendor-specific adapter for the named tool.
func Descriptors ¶
func Descriptors() []Descriptor
Descriptors returns the built-in profiles in stable display order. The result and every mutable field are independent from the package catalogue.
func Lookup ¶
func Lookup(id ProfileID) (Descriptor, bool)
Lookup returns an independent copy of the requested descriptor. IDs are matched case-insensitively after trimming surrounding whitespace.
type Detection ¶
type Detection struct {
Status InstallStatus
Executable string
Path string
Version string
VersionKnown bool
}
Detection is local installation metadata. Version is optional and is populated only by an explicitly injected, non-executing metadata source.
func Detect ¶
func Detect( ctx context.Context, id ProfileID, executableOverride string, detector Detector, ) (Detection, error)
Detect resolves installation state for a profile. An explicit executable replaces the descriptor candidates. A profile with no candidate and no override is unknown rather than misleadingly reported as not installed.
type Detector ¶
Detector discovers one of a set of executable candidates without retaining or mutating the caller's slice.
func DefaultDetector ¶
func DefaultDetector() Detector
DefaultDetector returns the passive production detector.
type InstallStatus ¶
type InstallStatus string
InstallStatus describes only local executable discovery. It does not imply that a vendor-specific adapter or authentication is available.
const ( InstallUnknown InstallStatus = "unknown" InstallInstalled InstallStatus = "installed" InstallNotInstalled InstallStatus = "not_installed" )
type LaunchRequest ¶
type LaunchRequest struct {
ProfileID ProfileID
AgentID string
Name string
Executable string
Args []string
Cwd string
Adapter string
Backend string
}
LaunchRequest resolves one profile to Relayer's existing process contract. Args are literal argv entries. No provider, model, shell, environment, or credential fields are accepted or inferred by this package.
type LookPathFunc ¶
LookPathFunc resolves an executable name without executing it.
type PathDetector ¶
type PathDetector struct {
LookPath LookPathFunc
VersionLookup VersionLookupFunc
}
PathDetector performs passive PATH discovery. A nil LookPath uses exec.LookPath. VersionLookup must itself be a trusted, non-executing metadata source; when omitted, version remains unknown.
type ProfileID ¶
type ProfileID string
ProfileID is the stable identifier of a declarative CLI launch profile.
type VersionLookupFunc ¶
VersionLookupFunc reads version metadata for an already resolved path. It is intentionally injected: toolcatalog never invokes an executable with a --version flag or any other command to obtain this value.