Documentation
¶
Index ¶
- func ConfiguredValue(cfg config.Config, agent string, kind Kind) string
- func DiscoverModels(agent string, req DiscoveryRequest) ([]string, error)
- func HasModelDiscovery(agent string) bool
- func ParseModelCommandOutput(agent string, output []byte) ([]string, error)
- func Supports(agent string, kind Kind) bool
- func Values(agent string, kind Kind, req DiscoveryRequest) []string
- type DiscoveryCleanup
- type DiscoveryRequest
- type Kind
- type OptionSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfiguredValue ¶
ConfiguredValue returns the configured value for an agent field.
func DiscoverModels ¶ added in v0.20.0
func DiscoverModels(agent string, req DiscoveryRequest) ([]string, error)
DiscoverModels queries the harness without sync or inference. It uses the same project environment and provider configuration helpers as launch and dispatch. A returned catalog describes selectable models, not guaranteed account access.
func HasModelDiscovery ¶ added in v0.20.0
HasModelDiscovery reports whether the installed harness can supply a catalog.
func ParseModelCommandOutput ¶ added in v0.20.0
ParseModelCommandOutput validates native non-protocol model output. Remote executors can transport the bytes without maintaining a second model parser.
Types ¶
type DiscoveryCleanup ¶ added in v1.0.0
type DiscoveryCleanup struct {
// contains filtered or unexported fields
}
DiscoveryCleanup owns authenticated probes after their catalogs are returned. Its zero value is ready to use. Owners must call Close before process exit.
func (*DiscoveryCleanup) Close ¶ added in v1.0.0
func (c *DiscoveryCleanup) Close() error
Close prevents further probes and joins all pending cleanup without a kill deadline. It is safe to call concurrently with discovery registration.
func (*DiscoveryCleanup) Wait ¶ added in v1.0.0
func (c *DiscoveryCleanup) Wait(ctx context.Context) error
Wait waits for registered probes to exit before another credential consumer starts. Callers must serialize discovery and launch around this barrier. Shutdown errors are reported once, after every pending probe has finished.
type DiscoveryRequest ¶
type DiscoveryRequest struct {
Context context.Context
Project *config.ProjectConfig
Env []string
LookPath func(string) (string, error)
Live bool
// ConfigValues selects names accepted by project configuration instead of
// native CLI override IDs when a provider exposes different namespaces.
ConfigValues bool
// Cleanup allows Claude's catalog to return before native shutdown. The
// owner must join cleanup before exit or another authenticated launch.
// Nil keeps discovery synchronous, including native shutdown errors.
Cleanup *DiscoveryCleanup
// Timeout bounds live discovery. Claude's graceful shutdown may exceed it
// so an in-flight credential refresh can finish. Zero uses the client default.
Timeout time.Duration
}
DiscoveryRequest controls live option discovery.
func DefaultDiscoveryRequest ¶
func DefaultDiscoveryRequest() DiscoveryRequest
DefaultDiscoveryRequest enables live option discovery with the current process environment and PATH lookup.
type OptionSet ¶
type OptionSet struct {
OverrideSupported bool
Configured string
Suggestions []string
AllowCustom bool
// Source is harness for discovered models, not_requested when skipped,
// unavailable on discovery failure, and catalog for non-model options only.
Source string
DiscoveryError string
}
OptionSet is the shared option metadata used by wizard and dispatch.