mirror of
https://github.com/obra/superpowers.git
synced 2026-04-24 10:29:03 +08:00
fix: use tool object instead of tools array per opencode api
This commit is contained in:
@@ -23,9 +23,8 @@ export const SuperpowersPlugin = async ({ project, client, $, directory, worktre
|
|||||||
const promptFile = path.join(promptsDir, 'superpowers.txt');
|
const promptFile = path.join(promptsDir, 'superpowers.txt');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tools: [
|
tool: {
|
||||||
{
|
use_skill: {
|
||||||
name: 'use_skill',
|
|
||||||
description: 'Load and read a specific skill to guide your work. Skills contain proven workflows, mandatory processes, and expert techniques.',
|
description: 'Load and read a specific skill to guide your work. Skills contain proven workflows, mandatory processes, and expert techniques.',
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
skill_name: z.string().describe('Name of the skill to load (e.g., "superpowers:brainstorming" or "my-custom-skill")')
|
skill_name: z.string().describe('Name of the skill to load (e.g., "superpowers:brainstorming" or "my-custom-skill")')
|
||||||
@@ -50,8 +49,7 @@ export const SuperpowersPlugin = async ({ project, client, $, directory, worktre
|
|||||||
${content}`;
|
${content}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
find_skills: {
|
||||||
name: 'find_skills',
|
|
||||||
description: 'List all available skills in the superpowers and personal skill libraries.',
|
description: 'List all available skills in the superpowers and personal skill libraries.',
|
||||||
schema: z.object({}),
|
schema: z.object({}),
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
@@ -79,6 +77,6 @@ ${content}`;
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user