返回 DeepSeek-Reasonix
meta.go
根目录 / internal / evidence / meta.go
1 package evidence
2
3 import "strings"
4
5 // Non-mutating meta tools spawn or inspect work without themselves changing
6 // workspace state. Real mutations are recorded from child evidence or the
7 // underlying target tool after resolution (use_capability call).
8 var nonMutationMetaTools = map[string]bool{
9 "run_skill": true,
10 "read_skill": true,
11 "read_only_skill": true,
12 "task": true,
13 "read_only_task": true,
14 "parallel_tasks": true,
15 "fleet": true,
16 "explore": true,
17 "research": true,
18 "review": true,
19 "security_review": true,
20 "use_capability": true,
21 "connect_tool_source": true,
22 "review_report": true,
23 }
24
25 // IsNonMutationMetaTool reports whether toolName is a host meta tool that must
26 // not count as a mutation receipt by itself.
27 func IsNonMutationMetaTool(toolName string) bool {
28 return nonMutationMetaTools[strings.TrimSpace(toolName)]
29 }
30
31 // IsReviewSkillTool reports whether toolName is a structured review subagent.
32 func IsReviewSkillTool(toolName string) bool {
33 switch strings.TrimSpace(toolName) {
34 case "review", "security_review":
35 return true
36 default:
37 return false
38 }
39 }
40
40 lines GO