INNER CODE UNIT · Go
func
k1LoW/runn · agent.go:86
func (p *agentParsedPermissions) decide(toolName string) agentPermissionDecision {
result := agentPermissionUndecided
for _, rule := range p.rules {
if rule.toolName == "*" || rule.toolName == toolName {
switch rule.prefix {
case "allow":
result = agentPermissionAllow
case "deny":
result = agentPermissionDeny
}
}
}
return result
}
// collectAllowed returns tools explicitly allowed (for SDK AllowedTools).
func (p *agentParsedPermissions) collectAllowed() []string {
var tools []string