fix(hooks,tools): replace /plan example with prometheus delegation and rename code-review example to review-work (#2633, #3285, #2873)
- context-info-builder referenced a non-existent /plan command; now directs users to the Prometheus agent for planning - skill tool description example referenced 'code-review' which does not exist; changed to 'review-work' (actual built-in skill) - skill tool execute path now surfaces the missing host permission gap so callers understand OpenCode plugin context limits 🤖 Generated with OhMyOpenCode assistance https://github.com/code-yeongyu/oh-my-opencode
This commit is contained in:
@@ -104,7 +104,7 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
|
||||
return cachedDescription ?? TOOL_DESCRIPTION_PREFIX
|
||||
},
|
||||
args: {
|
||||
name: tool.schema.string().describe("The skill or command name (e.g., 'code-review' or 'publish'). Use without leading slash for commands."),
|
||||
name: tool.schema.string().describe("The skill or command name (e.g., 'review-work' or 'publish'). Use without leading slash for commands."),
|
||||
user_message: tool.schema
|
||||
.string()
|
||||
.optional()
|
||||
@@ -119,6 +119,15 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
|
||||
const matchedSkill = matchSkillByName(skills, requestedName)
|
||||
|
||||
if (matchedSkill) {
|
||||
await ctx?.ask({
|
||||
permission: "skill",
|
||||
patterns: [matchedSkill.name],
|
||||
always: [matchedSkill.name],
|
||||
metadata: {
|
||||
skill: matchedSkill.name,
|
||||
},
|
||||
})
|
||||
|
||||
if (matchedSkill.definition.agent && (!ctx?.agent || matchedSkill.definition.agent !== ctx.agent)) {
|
||||
throw new Error(`Skill "${matchedSkill.name}" is restricted to agent "${matchedSkill.definition.agent}"`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user