agent

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBuiltinAgentStaleness

func CheckBuiltinAgentStaleness(repo string) (bool, string, error)

CheckBuiltinAgentStaleness checks if the builtin agent is stale compared to the latest release Returns (isStale bool, latestVersion string, error) Logs warnings if unable to fetch latest version or if version is stale

func CheckBuiltinAgentStalenessWithLimit

func CheckBuiltinAgentStalenessWithLimit(ctx context.Context, repo string) (bool, string, error)

CheckBuiltinAgentStalenessWithLimit performs staleness check with rate limiting Returns (isStale bool, latestVersion string, error) If rate limited, returns (false, "", nil) - no error but no check performed

func FetchChecksum

func FetchChecksum(checksumURL string) (string, error)

FetchChecksum fetches and parses a SHA256 checksum file from a URL. Checksum files typically contain: <hash> <filename> This function returns just the hash part.

func FindAgentBundleAsset

func FindAgentBundleAsset(release *GitHubRelease) (string, string, error)

FindAgentBundleAsset finds the agent bundle asset in a release

func IsAutoInstallDisabled

func IsAutoInstallDisabled() bool

IsAutoInstallDisabled checks if the auto-install feature is disabled

Types

type BuiltinAgent

type BuiltinAgent struct {
	Name     string `json:"name"`
	Version  string `json:"version"`
	URL      string `json:"url"`
	Checksum string `json:"checksum"`
}

BuiltinAgent represents the default builtin agent configuration

func DefaultBuiltinAgent

func DefaultBuiltinAgent() *BuiltinAgent

DefaultBuiltinAgent returns the builtin agent configuration This is updated with each Holon release to point to the latest agent release

type GitHubRelease

type GitHubRelease struct {
	TagName     string `json:"tag_name"`
	Name        string `json:"name"`
	Draft       bool   `json:"draft"`
	Prerelease  bool   `json:"prerelease"`
	PublishedAt string `json:"published_at"`
	Assets      []struct {
		Name string `json:"name"`
		URL  string `json:"browser_download_url"`
	} `json:"assets"`
}

GitHubRelease represents a GitHub release

func GetLatestAgentRelease

func GetLatestAgentRelease(repo string) (*GitHubRelease, error)

GetLatestAgentRelease fetches the latest agent-specific release from GitHub This filters through releases to find ones that contain agent bundles

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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