agentprompt

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActiveVersion

func GetActiveVersion() (string, error)

GetActiveVersion returns the active version from agent versions.json

func ListVersions

func ListVersions() ([]string, error)

ListVersions returns all available agent prompt versions

func LoadPrompt

func LoadPrompt(version string) (string, error)

LoadPrompt loads an agent prompt by version string. If version is empty or "latest", uses the active version from versions.json.

func SetEmbeddedFS

func SetEmbeddedFS(efs fs.FS)

SetEmbeddedFS sets the embedded filesystem for agent prompts. This should be called from main() with the same embedded FS used for syntax prompts.

Types

type VersionMetadata

type VersionMetadata struct {
	File        string   `json:"file"`
	Hash        string   `json:"hash"`
	Description string   `json:"description"`
	Created     string   `json:"created"`
	Tags        []string `json:"tags"`
	Notes       string   `json:"notes"`
}

VersionMetadata represents metadata for an agent prompt version

func GetVersionMetadata

func GetVersionMetadata(version string) (*VersionMetadata, error)

GetVersionMetadata returns metadata for a specific agent prompt version

type VersionsManifest

type VersionsManifest struct {
	SchemaVersion string                     `json:"schema_version"`
	Versions      map[string]VersionMetadata `json:"versions"`
	Active        string                     `json:"active"`
	Notes         []string                   `json:"notes"`
}

VersionsManifest represents the agent versions.json file structure

Jump to

Keyboard shortcuts

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