Documentation
¶
Overview ¶
Package agentskillpolicy owns the versioned Agent Skill activation setting.
Index ¶
Constants ¶
const Version = 1
Variables ¶
var ErrCommitOutcomeUnknown = errors.New("AgentSkillPolicy commit outcome unknown")
ErrCommitOutcomeUnknown means PostgreSQL returned an error from COMMIT after accepting a policy mutation. The transaction may already be durable; callers must reconcile current policy truth instead of assuming a rollback.
Functions ¶
func ValidateRef ¶
ValidateRef accepts only policy-addressable scopes and the existing Skill name grammar: lowercase alphanumerics separated by single hyphens, max 64.
Types ¶
type Policy ¶
type Policy struct {
Disabled []string
}
Policy is the decoded, immutable value of agent.enabled_builtin_skills. Despite the historical column name it applies to builtin, system, and system_agent Skills.
func Decode ¶
func Decode(raw json.RawMessage) (Policy, error)
Decode reads the strict versioned storage format. The database migration canonicalizes historical arrays before this code runs and a constraint keeps them from returning; accepting any other shape here would fail open by silently changing which instructions the model receives.
func (Policy) CanonicalJSON ¶
func (p Policy) CanonicalJSON() (json.RawMessage, error)
CanonicalJSON returns deterministic bytes for a policy mutation.