From 0ce79c6ef40372f75102320ba27c03986f90e109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Tue, 21 Apr 2026 01:26:49 +0800 Subject: [PATCH] Add files via upload --- internal/config/config.go | 9 ++++----- internal/multiagent/eino_single_runner.go | 3 +-- internal/multiagent/runner.go | 13 ------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 96b6816b..056c9920 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -120,7 +120,7 @@ type MultiAgentSubConfig struct { Name string `yaml:"name" json:"name"` Description string `yaml:"description" json:"description"` Instruction string `yaml:"instruction" json:"instruction"` - BindRole string `yaml:"bind_role,omitempty" json:"bind_role,omitempty"` // 可选:关联主配置 roles 中的角色名;未配 role_tools 时沿用该角色的 tools,并把 skills 写入指令提示 + BindRole string `yaml:"bind_role,omitempty" json:"bind_role,omitempty"` // 可选:关联主配置 roles 中的角色名;未配 role_tools 时沿用该角色的 tools RoleTools []string `yaml:"role_tools" json:"role_tools"` // 与单 Agent 角色工具相同 key;空表示全部工具(bind_role 可补全 tools) MaxIterations int `yaml:"max_iterations" json:"max_iterations"` Kind string `yaml:"kind,omitempty" json:"kind,omitempty"` // 仅 Markdown:kind=orchestrator 表示 Deep 主代理(与 orchestrator.md 二选一约定) @@ -933,8 +933,7 @@ type RoleConfig struct { Description string `yaml:"description" json:"description"` // 角色描述 UserPrompt string `yaml:"user_prompt" json:"user_prompt"` // 用户提示词(追加到用户消息前) Icon string `yaml:"icon,omitempty" json:"icon,omitempty"` // 角色图标(可选) - Tools []string `yaml:"tools,omitempty" json:"tools,omitempty"` // 关联的工具列表(toolKey格式,如 "toolName" 或 "mcpName::toolName") - MCPs []string `yaml:"mcps,omitempty" json:"mcps,omitempty"` // 向后兼容:关联的MCP服务器列表(已废弃,使用tools替代) - Skills []string `yaml:"skills,omitempty" json:"skills,omitempty"` // 关联的skills列表(skill名称列表,在执行任务前会读取这些skills的内容) - Enabled bool `yaml:"enabled" json:"enabled"` // 是否启用 + Tools []string `yaml:"tools,omitempty" json:"tools,omitempty"` // 关联的工具列表(toolKey格式,如 "toolName" 或 "mcpName::toolName") + MCPs []string `yaml:"mcps,omitempty" json:"mcps,omitempty"` // 向后兼容:关联的MCP服务器列表(已废弃,使用tools替代) + Enabled bool `yaml:"enabled" json:"enabled"` // 是否启用 } diff --git a/internal/multiagent/eino_single_runner.go b/internal/multiagent/eino_single_runner.go index e708b5db..df7dd4d6 100644 --- a/internal/multiagent/eino_single_runner.go +++ b/internal/multiagent/eino_single_runner.go @@ -36,7 +36,6 @@ func RunEinoSingleChatModelAgent( userMessage string, history []agent.ChatMessage, roleTools []string, - roleSkills []string, progress func(eventType, message string, data interface{}), ) (*RunResult, error) { if appCfg == nil || ag == nil { @@ -169,7 +168,7 @@ func RunEinoSingleChatModelAgent( chatCfg := &adk.ChatModelAgentConfig{ Name: einoSingleAgentName, Description: "Eino ADK ChatModelAgent with MCP tools for authorized security testing.", - Instruction: ag.EinoSingleAgentSystemInstruction(roleSkills), + Instruction: ag.EinoSingleAgentSystemInstruction(), Model: mainModel, ToolsConfig: mainToolsCfg, MaxIterations: maxIter, diff --git a/internal/multiagent/runner.go b/internal/multiagent/runner.go index c6e8e7e4..ddfbce9c 100644 --- a/internal/multiagent/runner.go +++ b/internal/multiagent/runner.go @@ -213,19 +213,6 @@ func RunDeepAgent( if len(roleTools) == 0 && len(r.Tools) > 0 { roleTools = r.Tools } - if len(r.Skills) > 0 { - var b strings.Builder - b.WriteString(instr) - b.WriteString("\n\n本角色推荐优先通过 Eino `skill` 工具(渐进式披露)加载的技能包 name:") - for i, s := range r.Skills { - if i > 0 { - b.WriteString("、") - } - b.WriteString(s) - } - b.WriteString("。") - instr = b.String() - } } }