agenthelp

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAntiPatterns

func GetAntiPatterns() []string

GetAntiPatterns returns common mistakes agents should avoid.

func GetBestPractices

func GetBestPractices() []string

GetBestPractices returns agent-specific best practices.

func GetGuide

func GetGuide() string

GetGuide returns the full steering guide.

func GetGuideSection

func GetGuideSection(domain string) string

GetGuideSection returns a specific domain section from the guide. Returns the full guide if the domain is not found.

func GetQuerySyntax

func GetQuerySyntax() map[string]string

GetQuerySyntax returns query syntax documentation for each domain.

Types

type AuthInfo

type AuthInfo struct {
	OAuth   string `json:"oauth"`
	APIKeys string `json:"api_keys"`
}

AuthInfo describes authentication options.

type CommandInfo

type CommandInfo struct {
	Name        string        `json:"name"`
	FullPath    string        `json:"full_path"`
	Description string        `json:"description"`
	Flags       []FlagInfo    `json:"flags,omitempty"`
	Examples    []string      `json:"examples,omitempty"`
	ReadOnly    bool          `json:"read_only"`
	Subcommands []CommandInfo `json:"subcommands,omitempty"`
}

CommandInfo describes a command or subcommand.

type CompactCommand

type CompactCommand struct {
	Name        string           `json:"name"`
	Flags       []string         `json:"flags,omitempty"`
	Subcommands []CompactCommand `json:"subcommands,omitempty"`
}

CompactCommand is a minimal command representation.

type CompactSchema

type CompactSchema struct {
	Version  string           `json:"version"`
	Commands []CompactCommand `json:"commands"`
}

CompactSchema is a minimal schema with just command names and flags.

func GenerateCompactSchema

func GenerateCompactSchema(root *cobra.Command) CompactSchema

GenerateCompactSchema builds a token-efficient schema.

type FlagInfo

type FlagInfo struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Default     string `json:"default,omitempty"`
	Description string `json:"description"`
}

FlagInfo describes a command flag.

type Schema

type Schema struct {
	Version       string            `json:"version"`
	Description   string            `json:"description"`
	Auth          AuthInfo          `json:"auth"`
	GlobalFlags   []FlagInfo        `json:"global_flags"`
	Commands      []CommandInfo     `json:"commands"`
	QuerySyntax   map[string]string `json:"query_syntax"`
	TimeFormats   TimeFormats       `json:"time_formats"`
	Workflows     []Workflow        `json:"workflows"`
	BestPractices []string          `json:"best_practices"`
	AntiPatterns  []string          `json:"anti_patterns"`
}

Schema is the top-level structure returned by --help in agent mode or 'pup agent schema'.

func GenerateSchema

func GenerateSchema(root *cobra.Command) Schema

GenerateSchema builds the complete schema from a cobra command tree.

func GenerateSubtreeSchema

func GenerateSubtreeSchema(root *cobra.Command, subtreeName string) *Schema

GenerateSubtreeSchema builds a schema for a specific subtree of commands.

type TimeFormats

type TimeFormats struct {
	Relative []string `json:"relative"`
	Absolute []string `json:"absolute"`
	Examples []string `json:"examples"`
}

TimeFormats describes supported time format options.

func GetTimeFormats

func GetTimeFormats() TimeFormats

GetTimeFormats returns documentation for supported time formats.

type Workflow

type Workflow struct {
	Name  string   `json:"name"`
	Steps []string `json:"steps"`
}

Workflow describes a multi-step agent workflow.

func GetWorkflows

func GetWorkflows() []Workflow

GetWorkflows returns common multi-step workflows for agents.

Jump to

Keyboard shortcuts

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