feat: add Claude Code plugin support (#240)

This commit is contained in:
Lukin
2025-12-27 17:56:40 +08:00
committed by GitHub
parent 1fc7fe7122
commit 2246d1c5ef
18 changed files with 748 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
import { tool } from "@opencode-ai/plugin/tool"
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool"
import { BLOCKED_TMUX_SUBCOMMANDS, DEFAULT_TIMEOUT_MS, INTERACTIVE_BASH_DESCRIPTION } from "./constants"
import { getCachedTmuxPath } from "./utils"
@@ -47,7 +47,7 @@ export function tokenizeCommand(cmd: string): string[] {
return tokens
}
export const interactive_bash = tool({
export const interactive_bash: ToolDefinition = tool({
description: INTERACTIVE_BASH_DESCRIPTION,
args: {
tmux_command: tool.schema.string().describe("The tmux command to execute (without 'tmux' prefix)"),