(execCtx coretools.ExecutionContext)
| 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 | |
| 208 | func (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 | } |
no test coverage detected