agentoptions

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfiguredValue

func ConfiguredValue(cfg config.Config, agent string, kind Kind) string

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

func HasModelDiscovery(agent string) bool

HasModelDiscovery reports whether the installed harness can supply a catalog.

func ParseModelCommandOutput added in v0.20.0

func ParseModelCommandOutput(agent string, output []byte) ([]string, error)

ParseModelCommandOutput validates native non-protocol model output. Remote executors can transport the bytes without maintaining a second model parser.

func Supports

func Supports(agent string, kind Kind) bool

Supports reports whether an agent exposes the requested option surface.

func Values

func Values(agent string, kind Kind, req DiscoveryRequest) []string

Values returns suggested values for an agent field.

Types

type DiscoveryRequest

type DiscoveryRequest struct {
	Context  context.Context
	Project  *config.ProjectConfig
	Env      []string
	LookPath func(string) (string, error)
	Live     bool
	// Timeout bounds live discovery commands. 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 Kind

type Kind string

Kind identifies a configurable agent option surface.

const (
	// KindModel selects an agent model field.
	KindModel Kind = "model"
	// KindReasoningEffort selects an agent reasoning-effort field.
	KindReasoningEffort Kind = "reasoning_effort"
)

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.

func Resolve

func Resolve(cfg config.Config, agent string, kind Kind, req DiscoveryRequest) OptionSet

Resolve returns the option metadata for an agent field, including live suggestions only from the harness. Model discovery never uses a fallback.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL