import { tool } from "@opencode-ai/plugin/tool"; import type { Plugin, PluginInput } from "@opencode-ai/plugin"; export const MyPlugin: Plugin = async (ctx: PluginInput) => { console.log("Plugin loaded!", ctx.project.worktree); return { tool: { greet: tool({ description: "Greet someone", args: { name: tool.schema.string().describe("The name to greet"), }, async execute(args) { return `Hello, ${args.name}!`; }, }), }, }; };