okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
1a349dd
main
1package config 2 3// CapabilityPrefs holds per-item defaults and per-session overrides. An absent 4// value is enabled. Keys are skill names, instruction IDs, or MCP server names. 5type CapabilityPrefs struct { 6Global map [string ]map [string ]bool `json:"global,omitempty"` 7Sessions map [string ]map [string ]map [string ]bool `json:"sessions,omitempty"` 8} 9 10func (p CapabilityPrefs )Enabled (session ,kind ,name string )bool { 11if groups := p .Sessions [session ];groups != nil { 12if state ,ok := groups [kind ][name ];ok { 13return state 14 } 15 } 16if state ,ok := p .Global [kind ][name ];ok { 17return state 18 } 19return true 20}