Documentation
¶
Index ¶
- func EffectiveLimit(flag, def int) int
- func ExtractField(token, field string) string
- func FilterCanaryTokens(content []byte) []byte
- func GetAvailablePrompts() ([]string, error)
- func LoadProjectConfig() (*config.ProjectConfig, error)
- func LoadPrompt(promptArg string) (string, error)
- func ReadEmbeddedFile(path string) ([]byte, error)
- func ValidatePromptArg(promptArg string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EffectiveLimit ¶
CANARY: REQ=ENG-4323; FEATURE="ContextCaps"; ASPECT=CLI; STATUS=TESTED; TEST=TestCANARY_CBIN_205_EffectiveLimit; UPDATED=2026-08-28 EffectiveLimit maps CLI --limit semantics (0/unset => def, -1 => unlimited) to the storage layer's convention (0 => unlimited). Defaults are deliberately small to protect agent context; callers pass -1 to explicitly request everything.
func ExtractField ¶
ExtractField extracts a field value from a CANARY token string
func FilterCanaryTokens ¶
FilterCanaryTokens removes CANARY tokens with OWNER=canary from file content This strips out CANARY CLI internal tracking tokens when copying templates to user projects
func GetAvailablePrompts ¶
GetAvailablePrompts returns the list of available embedded prompt names (command prompts from prompts/commands/* and system prompts from prompts/sys/*).
func LoadProjectConfig ¶
func LoadProjectConfig() (*config.ProjectConfig, error)
LoadProjectConfig loads the .canary/project.yaml configuration
func LoadPrompt ¶
LoadPrompt loads a custom prompt from file or embedded prompt name. This is a stub implementation that will be expanded in the future to support: - Loading prompts from embedded FS - Loading prompts from filesystem - Template variable substitution - Prompt validation and caching
func ReadEmbeddedFile ¶
ReadEmbeddedFile safely reads a file from the embedded filesystem It tries with and without the "base/" prefix to handle different embed scenarios
func ValidatePromptArg ¶
ValidatePromptArg validates a prompt argument format
Types ¶
This section is empty.