fix(agent): validate AGENT tool declarations from registry
This commit is contained in:
1 parent
f1f6e1131b
commit
27bd816b1c
4 files changed
+92
-71
No files matched your search
@@ -38,6 +38,7 @@ type AgentInstance struct {
|
||||
Sessions session.SessionStore
|
||||
ContextBuilder *ContextBuilder
|
||||
Tools *tools.ToolRegistry
|
||||
Definition AgentContextDefinition
|
||||
Subagents *config.SubagentsConfig
|
||||
SkillsFilter []string
|
||||
MCPServerAllowlist map[string]struct{}
|
||||
@@ -149,7 +150,7 @@ func NewAgentInstance(
|
||||
subagents = agentCfg.Subagents
|
||||
skillsFilter = resolveAgentSkillsFilter(agentCfg, definition)
|
||||
}
|
||||
warnOnUnknownAgentDeclarations(agentID, workspace, cfg, definition)
|
||||
warnOnUnknownAgentMCPServerDeclarations(agentID, workspace, cfg, definition)
|
||||
|
||||
maxIter := defaults.MaxToolIterations
|
||||
if maxIter == 0 {
|
||||
@@ -256,6 +257,7 @@ func NewAgentInstance(
|
||||
Sessions: sessions,
|
||||
ContextBuilder: contextBuilder,
|
||||
Tools: toolsRegistry,
|
||||
Definition: definition,
|
||||
Subagents: subagents,
|
||||
SkillsFilter: skillsFilter,
|
||||
MCPServerAllowlist: agentMCPServerAllowlist,
|
||||
|
||||
Reference in new issue
Block a user