소스 검색

fix: use tool object instead of tools array per opencode api

Jesse Vincent 10 달 전
부모
커밋
d749c620b5
1개의 변경된 파일과 4개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 6
      .opencode/plugin/superpowers.js

+ 4 - 6
.opencode/plugin/superpowers.js

@@ -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: [
-      {
-        name: 'use_skill',
+    tool: {
+      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}`;
         }
         }
       },
       },
-      {
-        name: 'find_skills',
+      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;
         }
         }
       }
       }
-    ]
+    }
   };
   };
 };
 };