sources

package
v1.133.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package sources resolves agent references — local files and directories, built-in agents, user-config aliases, URLs and OCI references — to config.Source values. It links every source type, so embedders that only need one should construct it directly (config.NewFileSource, ocisource.New, ...) instead of importing this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiltinAgentNames

func BuiltinAgentNames() []string

BuiltinAgentNames returns the names of all built-in agents.

func Resolve

func Resolve(agentFilename string, envProvider environment.Provider, ociOpts ...ocisource.Option) (config.Source, error)

Resolve resolves an agent file reference (local file, URL, or OCI image) to a source. If envProvider is non-nil, it will be used to look up GITHUB_TOKEN for authentication when fetching from GitHub URLs. For OCI references, always checks remote for updates but falls back to local cache if offline; ociOpts (e.g. ocisource.WithVerificationKey) apply to them and are ignored for other kinds.

func ResolveAlias

func ResolveAlias(agentFilename string) *userconfig.Alias

ResolveAlias resolves an agent reference and returns the alias if it exists and has options. Returns nil if the reference is not an alias or doesn't have options.

func ResolveSources

func ResolveSources(agentsPath string, envProvider environment.Provider, ociOpts ...ocisource.Option) (config.Sources, error)

ResolveSources resolves an agent file reference (local file or directory, URL, or OCI image) to sources. If envProvider is non-nil, it will be used to look up GITHUB_TOKEN for authentication when fetching from GitHub URLs. For OCI references, always checks remote for updates but falls back to local cache if offline; ociOpts (e.g. ocisource.WithVerificationKey) apply to them and are ignored for other kinds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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