Why: models need a capped way to call several tools from one script, and a slow MCP server must not block the first prompt. Evidence: GOWORK=off go test ./runtime/codeorch/ ./runtime/tools/ ./runtime/mcp/ ./runtime/policy/ ./adapters/native/ Impact: run_tool_script stays unregistered until the caller turns it on. Deferred tools stay out of the model list. An unready MCP server connects in the background. Refs: feature/code-orchestration Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
346 B
Go
13 lines
346 B
Go
package codeorch
|
|
|
|
// Forbidden 是脚本不能再调用的工具:解释器、自身、派发和工作流。
|
|
func Forbidden(name string) bool {
|
|
switch name {
|
|
case "run_python", "run_shell", "run_command", "run_tool_script",
|
|
"delegate_task", "squad_orchestrate", "run_workflow", "review_findings":
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|