Versions in this module Expand all Collapse all v0 v0.1.3 Aug 30, 2026 v0.1.2 Aug 30, 2026 v0.1.1 Aug 30, 2026 v0.1.0 Aug 29, 2026 Changes in this version + var ErrSubstitutionLimit = errors.New("substitution output exceeds byte limit") + var ErrToolDenied = errors.New("tool denied by active instruction policy") + func IsCodeOffset(regions []CodeRegion, offset int) bool + func NativeToolInvocation(name string, args map[string]any) (string, string) + func Substitute(source, path string, values Substitutions) (string, []warning.Warning) + func SubstituteBounded(source, path string, values Substitutions, maximum int) (string, []warning.Warning, error) + type Arguments struct + Declared []string + Named []NamedArgument + Positionals []string + Raw string + func ParseArguments(source string, declared []string) (Arguments, error) + type CodeRegion struct + ContentEnd int + ContentStart int + End int + Kind CodeRegionKind + Start int + func ScanCodeRegions(source string) []CodeRegion + type CodeRegionKind string + const CodeRegionFence + const CodeRegionInline + type CommandDirective struct + Command string + ContentEnd int + ContentStart int + End int + Line int + Start int + func ScanCommandDirectives(source string) []CommandDirective + type Document struct + AllowedTools []ToolPattern + ArgumentHint string + Arguments []string + Body string + Compatibility string + DeniedTools []ToolPattern + Description string + Exposure Exposure + Globs []string + Host Host + License string + Metadata []MetadataEntry + Name string + func ParseDocument(source, path string, host Host) (Document, []warning.Warning) + func ParseTemplate(source, path string, host Host, identity string) (Document, []warning.Warning) + func (d Document) RestrictsTools() bool + func (d Document) ToolPolicy() ToolPolicy + type Exposure struct + ModelInvocable bool + UserInvocable bool + func DefaultExposure() Exposure + func (e Exposure) Allows(kind InvocationKind, repositoryScoped, trusted bool) bool + type FieldRule struct + Name string + Required bool + Status FieldStatus + func SupportMatrix(host Host) []FieldRule + type FieldStatus string + const FieldCore + const FieldSupported + const FieldUnsupported + type Host string + const HostClaude + const HostCodex + const HostCopilot + const HostPlasmid + const HostPortable + type Instruction struct + Body string + Globs []string + PathScopeDeclared bool + Policy ToolPolicy + func ParseInstruction(source, path string, host Host) (Instruction, []warning.Warning) + type InvocationKind uint8 + const InvocationModel + const InvocationUser + type MetadataEntry struct + Name string + Value string + type NamedArgument struct + Name string + Value string + type ScopeKey struct + InvocationID string + SessionID string + type ScopeStore struct + func (s *ScopeStore) Begin(key ScopeKey, scope TurnScope) error + func (s *ScopeStore) Get(key ScopeKey) (TurnScope, bool) + func (s *ScopeStore) IntersectPolicy(key ScopeKey, policy ToolPolicy) error + func (s *ScopeStore) Len() int + func (s *ScopeStore) Release(key ScopeKey) bool + func (s *ScopeStore) ReleaseSession(sessionID string) int + func (s *ScopeStore) Set(key ScopeKey, scope TurnScope) error + func (s *ScopeStore) SetOrIntersectPolicy(key ScopeKey, policy ToolPolicy) error + type Substitutions struct + Arguments Arguments + Variables Variables + type ToolPattern struct + Argument string + Tool string + func ParseToolPattern(source string) (ToolPattern, error) + func ParseToolPatterns(source string) ([]ToolPattern, []error) + type ToolPolicy struct + func NewRestrictedToolPolicy(allowed, denied []ToolPattern) ToolPolicy + func NewToolPolicy(allowed, denied []ToolPattern) ToolPolicy + func (p ToolPolicy) Allowed() []ToolPattern + func (p ToolPolicy) Allows(tool, argument string) bool + func (p ToolPolicy) Denied() []ToolPattern + func (p ToolPolicy) Intersect(other ToolPolicy) ToolPolicy + func (p ToolPolicy) Visible(tool string) bool + type TurnScope struct + Arguments Arguments + DocumentPath string + DocumentTrust bool + Policy ToolPolicy + Variables Variables + type Variables struct + Effort string + PluginData string + PluginRoot string + ProjectDir string + SessionID string + SkillDir string + type YAMLError struct + Line int + Message string + func (e *YAMLError) Error() string + type YAMLField struct + Line int + Name string + Value YAMLValue + type YAMLKind uint8 + const YAMLMapping + const YAMLScalar + const YAMLSequence + type YAMLValue struct + Kind YAMLKind + Line int + Mapping []YAMLField + Scalar string + Sequence []YAMLValue + func ParseYAML(source string) (YAMLValue, error)