fix(#2754): include native PluginInput skills in skill() discovery
The skill tool previously only merged disk-discovered skills and preloaded options.skills, so skills registered natively via ctx.skills (for example from config.skills.paths or other plugins) were prompt-visible but not discoverable by skill(). Fix: - pass ctx.skills from tool-registry into createSkillTool - extend SkillLoadOptions with nativeSkills accessor - merge nativeSkills.all() results into getSkills() - add test covering native PluginInput skill discovery
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { ToolDefinition } from "@opencode-ai/plugin"
|
||||
import type { SkillLoadOptions } from "../tools/skill/types"
|
||||
|
||||
import type {
|
||||
AvailableCategory,
|
||||
@@ -112,6 +113,7 @@ export function createToolRegistry(args: {
|
||||
mcpManager: managers.skillMcpManager,
|
||||
getSessionID: getSessionIDForMcp,
|
||||
gitMasterConfig: pluginConfig.git_master,
|
||||
nativeSkills: "skills" in ctx ? (ctx as { skills: SkillLoadOptions["nativeSkills"] }).skills : undefined,
|
||||
})
|
||||
|
||||
// task_system defaults to true since v3.14 — delegation (oracle, subagents) requires it
|
||||
|
||||
Reference in New Issue
Block a user