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.
This commit is contained in:
2026-03-23 09:43:43 +05:30
parent 42f153a28f
commit 6e2521b70d
9 changed files with 747 additions and 4 deletions
+5 -2
View File
@@ -1,13 +1,15 @@
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 two 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
@@ -22,6 +24,7 @@ const OpenCodeMultiModelPlugin: Plugin = async (_ctx) => {
tool: {
"multi-model-open": openTool,
"multi-model-close": closeTool,
"multi-model-cleanup": cleanupTool,
},
};
};
@@ -29,4 +32,4 @@ const OpenCodeMultiModelPlugin: Plugin = async (_ctx) => {
export default OpenCodeMultiModelPlugin;
export * from "./core/index";
export * from "./types";
export { closeTool, openTool };
export { cleanupTool, closeTool, openTool };