import { tool } from "@opencode-ai/plugin" import { $ } from "bun" export default tool({ description: "List pull requests in the repository using tea CLI", args: { state: tool.schema.string().optional().describe("Filter by state (all|open|closed)"), }, async execute(args) { const state = args.state || "open" const result = await $`tea pulls --state ${state} --output json`.text() return result.trim() }, })