fix(daemon): bound a package workflow's tools by its accepted authority
This commit is contained in:
1 parent
f4b111bc3f
commit
fc0e156649
6 files changed
+108
-6
No files matched your search
@@ -31,7 +31,7 @@ type LoopRunner struct {
|
||||
// Limits bounds the size of tool results fed back into the stage. The
|
||||
// zero value applies no limits.
|
||||
Limits ToolLimits
|
||||
// AllowTools is the profile's allowlist over archie-added tools. Empty allows
|
||||
// AllowTools is the allowlist over archie-added tools. Nil allows
|
||||
// all. Capture tools and agentloop's built-in file tools are never
|
||||
// filtered.
|
||||
AllowTools []string
|
||||
@@ -187,9 +187,9 @@ func makeCaptureHandler(spec agentrun.CaptureTool, captures map[string][]json.Ra
|
||||
}
|
||||
}
|
||||
|
||||
// allowedTools keeps the tools allow names; an empty allow keeps them all.
|
||||
// allowedTools keeps the tools allow names; a nil allow keeps them all.
|
||||
func allowedTools(set core.ToolSet, allow []string) core.ToolSet {
|
||||
if len(allow) == 0 {
|
||||
if allow == nil {
|
||||
return set
|
||||
}
|
||||
kept := core.ToolSet{}
|
||||
|
||||
Reference in new issue
Block a user