Files
opencode-multi-model/src/index.ts
T
bendtherules 6e2521b70d feat: add multi-model cleanup tool and CLI command
- Bump `@opencode-ai/plugin` dependency from 1.2.27 to 1.3.0.
- Introduce `cleanup` command in CLI with force and remote options.
- Export `cleanupMultiModel` from core index.
- Register `multi-model-cleanup` tool in plugin and update exports.
- Add `CleanupOptions` and `CleanupResult` types to define cleanup behavior and results.
2026-03-23 09:43:43 +05:30

36 lines
996 B
TypeScript

import type { Plugin } from "@opencode-ai/plugin";
import { cleanupTool } from "./tools/cleanup";
import { closeTool } from "./tools/close";
import { openTool } from "./tools/open";
/**
* OpenCode plugin that provides multi-model tmux session management tools.
*
* Registers three tools:
* - `multi-model-open`: Launch multiple AI models in a tmux session
* - `multi-model-close`: Close a multi-model session and cleanup resources
* - `multi-model-cleanup`: Delete all archive tags from local and remote repositories
*
* @example
* ```json
* // opencode.json
* {
* "plugin": ["@username/opencode-multi-model"]
* }
* ```
*/
const OpenCodeMultiModelPlugin: Plugin = async (_ctx) => {
return {
tool: {
"multi-model-open": openTool,
"multi-model-close": closeTool,
"multi-model-cleanup": cleanupTool,
},
};
};
export default OpenCodeMultiModelPlugin;
export * from "./core/index";
export * from "./types";
export { cleanupTool, closeTool, openTool };