MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / ensureMCPTools

Method ensureMCPTools

agent/loop.go:198–215  ·  view source on GitHub ↗
(execCtx coretools.ExecutionContext)

Source from the content-addressed store, hash-verified

196 }
197 processor := skills.NewPromptProcessor(e.Config)
198 executor := skills.NewSkillExecutor(loader, processor)
199 executor.ForkRunner = e.runForkSkill
200 e.Registry.Register(skills.NewSkillTool(skillRegistry, executor))
201 e.skillRegistry = skillRegistry
202 e.skillDiscovery = skills.NewSkillDiscovery(skillRegistry)
203 e.skillPersistence = skills.NewSkillPersistence()
204 e.skillRecoveryReady = map[string]bool{}
205 }
206}
207
208func (e *CoreExecutionEngine) runForkSkill(ctx context.Context, skill skills.SkillSpec, prompt, subagentScope string, thinkingBudgetTokens *int, baseRegistry *coretools.ToolRegistry, parentState any, extraContext coretools.ExecutionContext) (string, int, int, error) {
209 agentName := "skill-fork"
210 if skill.Frontmatter.Agent != nil && *skill.Frontmatter.Agent != "" {
211 agentName = *skill.Frontmatter.Agent
212 }
213 definition := AgentDef{
214 Name: agentName,
215 Description: "Forked skill runner for '" + skill.CanonicalName + "'.",
216 MaxTurns: 50,
217 PermissionMode: "inherit",
218 }

Callers 1

queryLoopMethod · 0.95

Calls 1

mergeExecutionContextFunction · 0.85

Tested by

no test coverage detected