Impl: tool-npm-package

This commit is contained in:
2026-03-19 19:12:50 +05:30
parent f1b09bf7de
commit ca753cd1ca
17 changed files with 1914 additions and 499 deletions
+32
View File
@@ -0,0 +1,32 @@
import type { Plugin } from "@opencode-ai/plugin";
import { openTool } from "./tools/open";
import { closeTool } from "./tools/close";
/**
* OpenCode plugin that provides multi-model tmux session management tools.
*
* Registers two tools:
* - `multi-model-open`: Launch multiple AI models in a tmux session
* - `multi-model-close`: Close a multi-model session and cleanup resources
*
* @example
* ```json
* // opencode.json
* {
* "plugin": ["@username/opencode-multi-model"]
* }
* ```
*/
const OpenCodeMultiModelPlugin: Plugin = async (_ctx) => {
return {
tool: {
"multi-model-open": openTool,
"multi-model-close": closeTool,
},
};
};
export default OpenCodeMultiModelPlugin;
export { openTool, closeTool };
export * from "./core/index";
export * from "./types";