opencode-orchestrator 1.2.6 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/core/agents/index.d.ts +1 -0
  2. package/dist/core/agents/manager/task-poller.d.ts +1 -0
  3. package/dist/core/cleanup/cleanup-scheduler.d.ts +11 -0
  4. package/dist/core/loop/mission-loop.d.ts +1 -30
  5. package/dist/core/notification/task-toast-manager.d.ts +6 -0
  6. package/dist/core/sync/todo-parser.d.ts +5 -0
  7. package/dist/core/sync/todo-sync-service.d.ts +35 -0
  8. package/dist/hooks/registry.d.ts +4 -4
  9. package/dist/hooks/types.d.ts +5 -5
  10. package/dist/index.js +15921 -1806
  11. package/dist/plugin-handlers/chat-message-handler.d.ts +17 -1
  12. package/dist/plugin-handlers/interfaces/index.d.ts +1 -0
  13. package/dist/plugin-handlers/interfaces/tool-hook.d.ts +14 -0
  14. package/dist/plugin-handlers/tool-execute-handler.d.ts +2 -11
  15. package/dist/plugin-handlers/tool-execute-pre-handler.d.ts +2 -7
  16. package/dist/shared/constants/system-messages.d.ts +2 -0
  17. package/dist/shared/loop/interfaces/index.d.ts +3 -2
  18. package/dist/shared/loop/interfaces/mission-loop.d.ts +29 -0
  19. package/dist/tools/ast/index.d.ts +3 -28
  20. package/dist/tools/background-cmd/check.d.ts +2 -11
  21. package/dist/tools/background-cmd/kill.d.ts +2 -9
  22. package/dist/tools/background-cmd/list.d.ts +2 -14
  23. package/dist/tools/background-cmd/run.d.ts +2 -15
  24. package/dist/tools/callAgent.d.ts +2 -17
  25. package/dist/tools/lsp/index.d.ts +2 -11
  26. package/dist/tools/parallel/cancel-task.d.ts +2 -9
  27. package/dist/tools/parallel/delegate-task.d.ts +2 -25
  28. package/dist/tools/parallel/get-task-result.d.ts +2 -9
  29. package/dist/tools/parallel/list-tasks.d.ts +2 -9
  30. package/dist/tools/parallel/update-todo.d.ts +2 -23
  31. package/dist/tools/search.d.ts +11 -142
  32. package/dist/tools/slashCommand.d.ts +2 -9
  33. package/dist/tools/web/cache-docs.d.ts +2 -16
  34. package/dist/tools/web/codesearch.d.ts +2 -13
  35. package/dist/tools/web/webfetch.d.ts +2 -13
  36. package/dist/tools/web/websearch.d.ts +2 -11
  37. package/package.json +4 -4
@@ -8,7 +8,23 @@
8
8
  */
9
9
  import type { ChatMessageHandlerContext } from "./interfaces/index.js";
10
10
  export type { ChatMessageHandlerContext } from "./interfaces/index.js";
11
+ type ChatHookInput = {
12
+ sessionID: string;
13
+ agent?: string;
14
+ model?: {
15
+ providerID: string;
16
+ modelID: string;
17
+ };
18
+ messageID?: string;
19
+ variant?: string;
20
+ };
21
+ type ChatHookOutput = {
22
+ parts: Array<{
23
+ type: string;
24
+ text?: string;
25
+ }>;
26
+ };
11
27
  /**
12
28
  * Create chat.message handler
13
29
  */
14
- export declare function createChatMessageHandler(ctx: ChatMessageHandlerContext): (msgInput: any, msgOutput: any) => Promise<void>;
30
+ export declare function createChatMessageHandler(ctx: ChatMessageHandlerContext): (msgInput: ChatHookInput, msgOutput: ChatHookOutput) => Promise<void>;
@@ -6,6 +6,7 @@ export type { OrchestratorState } from "./orchestrator-state.js";
6
6
  export type { EventHandlerContext } from "./event-handler-context.js";
7
7
  export type { ChatMessageHandlerContext } from "./chat-message-context.js";
8
8
  export type { ToolExecuteHandlerContext } from "./tool-execute-context.js";
9
+ export type { ToolHookInput, ToolHookOutput } from "./tool-hook";
9
10
  export type { AssistantDoneHandlerContext } from "./assistant-done-context.js";
10
11
  export type { SessionCompactingInput, SessionCompactingOutput } from "./session-compacting.js";
11
12
  export type { SystemTransformInput, SystemTransformOutput } from "./system-transform.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Tool Hook Interfaces
3
+ */
4
+ export interface ToolHookInput {
5
+ tool: string;
6
+ sessionID: string;
7
+ callID: string;
8
+ arguments?: Record<string, unknown>;
9
+ }
10
+ export interface ToolHookOutput {
11
+ title: string;
12
+ output: string;
13
+ metadata: Record<string, unknown>;
14
+ }
@@ -6,18 +6,9 @@
6
6
  * - Task status tracking
7
7
  * - Progress display
8
8
  */
9
- import type { ToolExecuteHandlerContext } from "./interfaces/index.js";
9
+ import type { ToolExecuteHandlerContext, ToolHookInput, ToolHookOutput } from "./interfaces/index.js";
10
10
  export type { ToolExecuteHandlerContext } from "./interfaces/index.js";
11
11
  /**
12
12
  * Create tool.execute.after handler
13
13
  */
14
- export declare function createToolExecuteAfterHandler(ctx: ToolExecuteHandlerContext): (toolInput: {
15
- tool: string;
16
- sessionID: string;
17
- callID: string;
18
- arguments?: any;
19
- }, toolOutput: {
20
- title: string;
21
- output: string;
22
- metadata: any;
23
- }) => Promise<void>;
14
+ export declare function createToolExecuteAfterHandler(ctx: ToolExecuteHandlerContext): (toolInput: ToolHookInput, toolOutput: ToolHookOutput) => Promise<void>;
@@ -4,10 +4,5 @@
4
4
  * Handles tool.execute.before hook.
5
5
  * Used for blocking prohibited actions based on agent roles via Hooks.
6
6
  */
7
- import type { ToolExecuteHandlerContext } from "./interfaces/index.js";
8
- export declare function createToolExecuteBeforeHandler(ctx: ToolExecuteHandlerContext): (toolInput: {
9
- tool: string;
10
- sessionID: string;
11
- callID: string;
12
- arguments?: any;
13
- }) => Promise<void>;
7
+ import type { ToolExecuteHandlerContext, ToolHookInput } from "./interfaces/index.js";
8
+ export declare function createToolExecuteBeforeHandler(ctx: ToolExecuteHandlerContext): (toolInput: ToolHookInput) => Promise<void>;
@@ -21,3 +21,5 @@ export declare const MISSION_MESSAGES: {
21
21
  };
22
22
  export declare const COMPACTION_PROMPT: string;
23
23
  export declare const CONTINUE_INSTRUCTION: string;
24
+ export declare const STAGNATION_INTERVENTION = "\n<system_intervention type=\"stagnation_detected\">\n\u26A0\uFE0F **\uACBD\uACE0: \uC9C4\uD589 \uC815\uCCB4 \uAC10\uC9C0 (STAGNATION DETECTED)**\n\uCD5C\uADFC \uC5EC\uB7EC \uD134 \uB3D9\uC548 \uC2E4\uC9C8\uC801\uC778 \uC9C4\uC804\uC774 \uAC10\uC9C0\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB2E8\uC21C \"\uBAA8\uB2C8\uD130\uB9C1\"\uC774\uB098 \uAC19\uC740 \uD589\uB3D9\uC744 \uBC18\uBCF5\uD558\uB294 \uAC83\uC740 \uAE08\uC9C0\uB429\uB2C8\uB2E4.\n\n**\uC790\uC728\uC801 \uC9C4\uB2E8 \uBC0F \uD574\uACB0 \uC9C0\uCE68:**\n1. **\uC2E4\uC2DC\uAC04 \uB85C\uADF8 \uD655\uC778**: `check_background_task` \uB610\uB294 `read_file`\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC9C4\uD589 \uC911\uC778 \uC791\uC5C5\uC758 \uCD9C\uB825 \uB85C\uADF8\uB97C \uC9C1\uC811 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.\n2. **\uD504\uB85C\uC138\uC2A4 \uC0DD\uC874 \uC9C4\uB2E8**: \uC791\uC5C5\uC774 \uC880\uBE44 \uC0C1\uD0DC\uC774\uAC70\uB098 \uBA48\uCD98 \uAC83 \uAC19\uB2E4\uBA74 \uACFC\uAC10\uD558\uAC8C `kill`\uD558\uACE0 \uB2E8\uACC4\uB97C \uC138\uBD84\uD654\uD558\uC5EC \uB2E4\uC2DC \uC2E4\uD589\uD558\uC2ED\uC2DC\uC624.\n3. **\uC804\uB7B5 \uC804\uD658**: \uB3D9\uC77C\uD55C \uC811\uADFC \uBC29\uC2DD\uC774 \uC2E4\uD328\uD558\uACE0 \uC788\uB2E4\uBA74, \uB2E4\uB978 \uB3C4\uAD6C\uB098 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA9\uD45C\uC5D0 \uB3C4\uB2EC\uD558\uC2ED\uC2DC\uC624.\n\n**\uC9C0\uAE08 \uBC14\uB85C \uB2A5\uB3D9\uC801\uC73C\uB85C \uAC1C\uC785\uD558\uC2ED\uC2DC\uC624. \uB300\uAE30\uD558\uC9C0 \uB9C8\uC2ED\uC2DC\uC624.**\n</system_intervention>";
25
+ export declare const CLEANUP_INSTRUCTION = "\n<system_maintenance type=\"continuous_hygiene\">\n\uD83E\uDDF9 **DOCUMENTATION & STATE HYGIENE (Iteration %ITER%)**\nYou must maintain a pristine workspace. **As part of your move**, perform these checks:\n\n1. **Relevance Assessment**:\n - Review active documents (`.opencode/*.md`). Are they needed for the *current* objective?\n - If a file represents a solved problem or obsolete context, **Archive it** to `.opencode/archive/` or delete it.\n\n2. **Synchronization**:\n - Verify `TODO.md` matches the actual code state. Mark completed items immediately.\n - Check `sync-issues.md`. If issues are resolved, remove them.\n\n3. **Context Optimization**:\n - If `work-log.md` is getting noisy, summarize key decisions into `summary.md` and truncate the log.\n - Keep context lightweight.\n\n**Rule**: A cluttered workspace leads to hallucinations. Clean as you go.\n</system_maintenance>\n";
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Loop interfaces
3
3
  */
4
- export type { Todo } from "./todo.js";
5
- export type { TodoStats } from "./todo-stats.js";
4
+ export * from "./todo.js";
5
+ export * from "./todo-stats.js";
6
+ export * from "./mission-loop.js";
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Mission Loop Interfaces
3
+ */
4
+ export interface MissionLoopState {
5
+ /** Whether loop is active */
6
+ active: boolean;
7
+ /** Current iteration number */
8
+ iteration: number;
9
+ /** Maximum allowed iterations */
10
+ maxIterations: number;
11
+ /** Original task prompt */
12
+ prompt: string;
13
+ /** Session ID */
14
+ sessionID: string;
15
+ /** When loop started */
16
+ startedAt: string;
17
+ /** Last activity timestamp */
18
+ lastActivity?: string;
19
+ /** Last known progress string (e.g., "3/10") */
20
+ lastProgress?: string;
21
+ /** Number of iterations without progress */
22
+ stagnationCount?: number;
23
+ }
24
+ export interface MissionLoopOptions {
25
+ /** Maximum iterations before stopping (default: 1000) */
26
+ maxIterations?: number;
27
+ /** Countdown seconds before auto-continue (default: 3) */
28
+ countdownSeconds?: number;
29
+ }
@@ -3,39 +3,14 @@
3
3
  *
4
4
  * Re-exports AST search/replace tools using Rust backend.
5
5
  */
6
+ import { type ToolDefinition } from "@opencode-ai/plugin";
6
7
  /**
7
8
  * AST Search Tool
8
9
  * Uses Rust backend to run ast-grep for structural code search.
9
10
  */
10
- export declare const astSearchTool: (directory: string) => {
11
- description: string;
12
- args: {
13
- pattern: import("zod").ZodString;
14
- lang: import("zod").ZodOptional<import("zod").ZodString>;
15
- include: import("zod").ZodOptional<import("zod").ZodString>;
16
- };
17
- execute(args: {
18
- pattern: string;
19
- lang?: string | undefined;
20
- include?: string | undefined;
21
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
22
- };
11
+ export declare const astSearchTool: (directory: string) => ToolDefinition;
23
12
  /**
24
13
  * AST Replace Tool
25
14
  * Uses Rust backend to run ast-grep for structural code replacement.
26
15
  */
27
- export declare const astReplaceTool: (directory: string) => {
28
- description: string;
29
- args: {
30
- pattern: import("zod").ZodString;
31
- rewrite: import("zod").ZodString;
32
- lang: import("zod").ZodOptional<import("zod").ZodString>;
33
- include: import("zod").ZodOptional<import("zod").ZodString>;
34
- };
35
- execute(args: {
36
- pattern: string;
37
- rewrite: string;
38
- lang?: string | undefined;
39
- include?: string | undefined;
40
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
41
- };
16
+ export declare const astReplaceTool: (directory: string) => ToolDefinition;
@@ -1,14 +1,5 @@
1
1
  /**
2
2
  * check_background Tool - Check background task status
3
3
  */
4
- export declare const checkBackgroundTool: {
5
- description: string;
6
- args: {
7
- taskId: import("zod").ZodString;
8
- tailLines: import("zod").ZodOptional<import("zod").ZodNumber>;
9
- };
10
- execute(args: {
11
- taskId: string;
12
- tailLines?: number | undefined;
13
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
14
- };
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
5
+ export declare const checkBackgroundTool: ToolDefinition;
@@ -1,12 +1,5 @@
1
1
  /**
2
2
  * kill_background Tool - Kill a running background task
3
3
  */
4
- export declare const killBackgroundTool: {
5
- description: string;
6
- args: {
7
- taskId: import("zod").ZodString;
8
- };
9
- execute(args: {
10
- taskId: string;
11
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
12
- };
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
5
+ export declare const killBackgroundTool: ToolDefinition;
@@ -1,17 +1,5 @@
1
1
  /**
2
2
  * list_background Tool - List all background tasks
3
3
  */
4
- export declare const listBackgroundTool: {
5
- description: string;
6
- args: {
7
- status: import("zod").ZodOptional<import("zod").ZodEnum<{
8
- running: "running";
9
- done: "done";
10
- error: "error";
11
- all: "all";
12
- }>>;
13
- };
14
- execute(args: {
15
- status?: "running" | "done" | "error" | "all" | undefined;
16
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
17
- };
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
5
+ export declare const listBackgroundTool: ToolDefinition;
@@ -1,18 +1,5 @@
1
1
  /**
2
2
  * run_background Tool - Start a background command
3
3
  */
4
- export declare const runBackgroundTool: {
5
- description: string;
6
- args: {
7
- command: import("zod").ZodString;
8
- cwd: import("zod").ZodOptional<import("zod").ZodString>;
9
- timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
10
- label: import("zod").ZodOptional<import("zod").ZodString>;
11
- };
12
- execute(args: {
13
- command: string;
14
- cwd?: string | undefined;
15
- timeout?: number | undefined;
16
- label?: string | undefined;
17
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
18
- };
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
5
+ export declare const runBackgroundTool: ToolDefinition;
@@ -1,17 +1,2 @@
1
- export declare const callAgentTool: {
2
- description: string;
3
- args: {
4
- agent: import("zod").ZodEnum<{
5
- Planner: "Planner";
6
- Worker: "Worker";
7
- Reviewer: "Reviewer";
8
- }>;
9
- task: import("zod").ZodString;
10
- context: import("zod").ZodOptional<import("zod").ZodString>;
11
- };
12
- execute(args: {
13
- agent: "Planner" | "Worker" | "Reviewer";
14
- task: string;
15
- context?: string | undefined;
16
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
17
- };
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ export declare const callAgentTool: ToolDefinition;
@@ -3,18 +3,9 @@
3
3
  *
4
4
  * Re-exports LSP diagnostics tool using Rust backend.
5
5
  */
6
+ import { type ToolDefinition } from "@opencode-ai/plugin";
6
7
  /**
7
8
  * LSP Diagnostics Tool
8
9
  * Uses Rust backend to run tsc and eslint.
9
10
  */
10
- export declare const lspDiagnosticsTool: (directory: string) => {
11
- description: string;
12
- args: {
13
- file: import("zod").ZodOptional<import("zod").ZodString>;
14
- include_warnings: import("zod").ZodOptional<import("zod").ZodBoolean>;
15
- };
16
- execute(args: {
17
- file?: string | undefined;
18
- include_warnings?: boolean | undefined;
19
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
20
- };
11
+ export declare const lspDiagnosticsTool: (directory: string) => ToolDefinition;
@@ -1,13 +1,6 @@
1
1
  /**
2
2
  * cancel_task Tool
3
3
  */
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
4
5
  import { ParallelAgentManager } from "../../core/agents/index.js";
5
- export declare const createCancelTaskTool: (manager: ParallelAgentManager) => {
6
- description: string;
7
- args: {
8
- taskId: import("zod").ZodString;
9
- };
10
- execute(args: {
11
- taskId: string;
12
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
13
- };
6
+ export declare const createCancelTaskTool: (manager: ParallelAgentManager) => ToolDefinition;
@@ -9,29 +9,6 @@
9
9
  * - Timeout guarantee with graceful degradation
10
10
  * - Resource cleanup on all exit paths
11
11
  */
12
+ import { type ToolDefinition } from "@opencode-ai/plugin";
12
13
  import { ParallelAgentManager } from "../../core/agents/index.js";
13
- export declare const createDelegateTaskTool: (manager: ParallelAgentManager, client: unknown) => {
14
- description: string;
15
- args: {
16
- agent: import("zod").ZodString;
17
- description: import("zod").ZodString;
18
- prompt: import("zod").ZodString;
19
- background: import("zod").ZodBoolean;
20
- resume: import("zod").ZodOptional<import("zod").ZodString>;
21
- mode: import("zod").ZodOptional<import("zod").ZodEnum<{
22
- normal: "normal";
23
- race: "race";
24
- fractal: "fractal";
25
- }>>;
26
- groupID: import("zod").ZodOptional<import("zod").ZodString>;
27
- };
28
- execute(args: {
29
- agent: string;
30
- description: string;
31
- prompt: string;
32
- background: boolean;
33
- resume?: string | undefined;
34
- mode?: "normal" | "race" | "fractal" | undefined;
35
- groupID?: string | undefined;
36
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
37
- };
14
+ export declare const createDelegateTaskTool: (manager: ParallelAgentManager, client: unknown) => ToolDefinition;
@@ -1,13 +1,6 @@
1
1
  /**
2
2
  * get_task_result Tool
3
3
  */
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
4
5
  import { ParallelAgentManager } from "../../core/agents/index.js";
5
- export declare const createGetTaskResultTool: (manager: ParallelAgentManager) => {
6
- description: string;
7
- args: {
8
- taskId: import("zod").ZodString;
9
- };
10
- execute(args: {
11
- taskId: string;
12
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
13
- };
6
+ export declare const createGetTaskResultTool: (manager: ParallelAgentManager) => ToolDefinition;
@@ -1,13 +1,6 @@
1
1
  /**
2
2
  * list_tasks Tool
3
3
  */
4
+ import { type ToolDefinition } from "@opencode-ai/plugin";
4
5
  import { ParallelAgentManager } from "../../core/agents/index.js";
5
- export declare const createListTasksTool: (manager: ParallelAgentManager) => {
6
- description: string;
7
- args: {
8
- status: import("zod").ZodOptional<import("zod").ZodString>;
9
- };
10
- execute(args: {
11
- status?: string | undefined;
12
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
13
- };
6
+ export declare const createListTasksTool: (manager: ParallelAgentManager) => ToolDefinition;
@@ -3,26 +3,5 @@
3
3
  *
4
4
  * Performs incremental updates to .opencode/todo.md
5
5
  */
6
- export declare const createUpdateTodoTool: () => {
7
- description: string;
8
- args: {
9
- action: import("zod").ZodEnum<{
10
- update: "update";
11
- add: "add";
12
- }>;
13
- task: import("zod").ZodString;
14
- status: import("zod").ZodOptional<import("zod").ZodEnum<{
15
- pending: "pending";
16
- completed: "completed";
17
- failed: "failed";
18
- progress: "progress";
19
- }>>;
20
- subtask: import("zod").ZodOptional<import("zod").ZodString>;
21
- };
22
- execute(args: {
23
- action: "update" | "add";
24
- task: string;
25
- status?: "pending" | "completed" | "failed" | "progress" | undefined;
26
- subtask?: string | undefined;
27
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
28
- };
6
+ import { type ToolDefinition } from "@opencode-ai/plugin";
7
+ export declare const createUpdateTodoTool: () => ToolDefinition;
@@ -1,176 +1,45 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
1
2
  /**
2
3
  * Grep search tool - finds patterns in code
3
4
  * Used by Worker and Reviewer for codebase analysis
4
5
  */
5
- export declare const grepSearchTool: (directory: string) => {
6
- description: string;
7
- args: {
8
- pattern: import("zod").ZodString;
9
- dir: import("zod").ZodOptional<import("zod").ZodString>;
10
- max_results: import("zod").ZodOptional<import("zod").ZodNumber>;
11
- timeout_ms: import("zod").ZodOptional<import("zod").ZodNumber>;
12
- };
13
- execute(args: {
14
- pattern: string;
15
- dir?: string | undefined;
16
- max_results?: number | undefined;
17
- timeout_ms?: number | undefined;
18
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
19
- };
6
+ export declare const grepSearchTool: (directory: string) => ToolDefinition;
20
7
  /**
21
8
  * Glob search tool - finds files by pattern
22
9
  * Used by Worker and Reviewer for file discovery
23
10
  */
24
- export declare const globSearchTool: (directory: string) => {
25
- description: string;
26
- args: {
27
- pattern: import("zod").ZodString;
28
- dir: import("zod").ZodOptional<import("zod").ZodString>;
29
- };
30
- execute(args: {
31
- pattern: string;
32
- dir?: string | undefined;
33
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
34
- };
11
+ export declare const globSearchTool: (directory: string) => ToolDefinition;
35
12
  /**
36
13
  * Multi-grep (mgrep) tool - search multiple patterns
37
14
  * Runs grep for each pattern and combines results
38
15
  */
39
- export declare const mgrepTool: (directory: string) => {
40
- description: string;
41
- args: {
42
- patterns: import("zod").ZodArray<import("zod").ZodString>;
43
- dir: import("zod").ZodOptional<import("zod").ZodString>;
44
- max_results_per_pattern: import("zod").ZodOptional<import("zod").ZodNumber>;
45
- timeout_ms: import("zod").ZodOptional<import("zod").ZodNumber>;
46
- };
47
- execute(args: {
48
- patterns: string[];
49
- dir?: string | undefined;
50
- max_results_per_pattern?: number | undefined;
51
- timeout_ms?: number | undefined;
52
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
53
- };
16
+ export declare const mgrepTool: (directory: string) => ToolDefinition;
54
17
  /**
55
18
  * Sed replace tool - find and replace patterns in files
56
19
  * Used for bulk code migrations and refactoring
57
20
  */
58
- export declare const sedReplaceTool: (directory: string) => {
59
- description: string;
60
- args: {
61
- pattern: import("zod").ZodString;
62
- replacement: import("zod").ZodString;
63
- file: import("zod").ZodOptional<import("zod").ZodString>;
64
- dir: import("zod").ZodOptional<import("zod").ZodString>;
65
- dry_run: import("zod").ZodOptional<import("zod").ZodBoolean>;
66
- backup: import("zod").ZodOptional<import("zod").ZodBoolean>;
67
- timeout_ms: import("zod").ZodOptional<import("zod").ZodNumber>;
68
- };
69
- execute(args: {
70
- pattern: string;
71
- replacement: string;
72
- file?: string | undefined;
73
- dir?: string | undefined;
74
- dry_run?: boolean | undefined;
75
- backup?: boolean | undefined;
76
- timeout_ms?: number | undefined;
77
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
78
- };
21
+ export declare const sedReplaceTool: (directory: string) => ToolDefinition;
79
22
  /**
80
23
  * Diff tool - compare files or strings
81
24
  */
82
- export declare const diffTool: () => {
83
- description: string;
84
- args: {
85
- file1: import("zod").ZodOptional<import("zod").ZodString>;
86
- file2: import("zod").ZodOptional<import("zod").ZodString>;
87
- content1: import("zod").ZodOptional<import("zod").ZodString>;
88
- content2: import("zod").ZodOptional<import("zod").ZodString>;
89
- ignore_whitespace: import("zod").ZodOptional<import("zod").ZodBoolean>;
90
- };
91
- execute(args: {
92
- file1?: string | undefined;
93
- file2?: string | undefined;
94
- content1?: string | undefined;
95
- content2?: string | undefined;
96
- ignore_whitespace?: boolean | undefined;
97
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
98
- };
25
+ export declare const diffTool: () => ToolDefinition;
99
26
  /**
100
27
  * JQ tool - JSON query and manipulation
101
28
  */
102
- export declare const jqTool: () => {
103
- description: string;
104
- args: {
105
- json_input: import("zod").ZodOptional<import("zod").ZodString>;
106
- file: import("zod").ZodOptional<import("zod").ZodString>;
107
- expression: import("zod").ZodString;
108
- raw_output: import("zod").ZodOptional<import("zod").ZodBoolean>;
109
- };
110
- execute(args: {
111
- expression: string;
112
- json_input?: string | undefined;
113
- file?: string | undefined;
114
- raw_output?: boolean | undefined;
115
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
116
- };
29
+ export declare const jqTool: () => ToolDefinition;
117
30
  /**
118
31
  * HTTP tool - make HTTP requests (curl-like)
119
32
  */
120
- export declare const httpTool: () => {
121
- description: string;
122
- args: {
123
- url: import("zod").ZodString;
124
- method: import("zod").ZodOptional<import("zod").ZodString>;
125
- headers: import("zod").ZodOptional<import("zod").ZodObject<{}, import("zod/v4/core").$strip>>;
126
- body: import("zod").ZodOptional<import("zod").ZodString>;
127
- timeout_ms: import("zod").ZodOptional<import("zod").ZodNumber>;
128
- };
129
- execute(args: {
130
- url: string;
131
- method?: string | undefined;
132
- headers?: Record<string, never> | undefined;
133
- body?: string | undefined;
134
- timeout_ms?: number | undefined;
135
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
136
- };
33
+ export declare const httpTool: () => ToolDefinition;
137
34
  /**
138
35
  * File stats tool - analyze directory/file statistics
139
36
  */
140
- export declare const fileStatsTool: (directory: string) => {
141
- description: string;
142
- args: {
143
- dir: import("zod").ZodOptional<import("zod").ZodString>;
144
- max_depth: import("zod").ZodOptional<import("zod").ZodNumber>;
145
- };
146
- execute(args: {
147
- dir?: string | undefined;
148
- max_depth?: number | undefined;
149
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
150
- };
37
+ export declare const fileStatsTool: (directory: string) => ToolDefinition;
151
38
  /**
152
39
  * Git diff tool - show uncommitted changes
153
40
  */
154
- export declare const gitDiffTool: (directory: string) => {
155
- description: string;
156
- args: {
157
- dir: import("zod").ZodOptional<import("zod").ZodString>;
158
- staged_only: import("zod").ZodOptional<import("zod").ZodBoolean>;
159
- };
160
- execute(args: {
161
- dir?: string | undefined;
162
- staged_only?: boolean | undefined;
163
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
164
- };
41
+ export declare const gitDiffTool: (directory: string) => ToolDefinition;
165
42
  /**
166
43
  * Git status tool - show repository status
167
44
  */
168
- export declare const gitStatusTool: (directory: string) => {
169
- description: string;
170
- args: {
171
- dir: import("zod").ZodOptional<import("zod").ZodString>;
172
- };
173
- execute(args: {
174
- dir?: string | undefined;
175
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
176
- };
45
+ export declare const gitStatusTool: (directory: string) => ToolDefinition;
@@ -1,3 +1,4 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin";
1
2
  /**
2
3
  * Slash commands for OpenCode Orchestrator
3
4
  * - /task: Mission mode trigger with full Commander prompt
@@ -10,12 +11,4 @@ export declare const COMMANDS: Record<string, {
10
11
  template: string;
11
12
  argumentHint?: string;
12
13
  }>;
13
- export declare function createSlashcommandTool(): {
14
- description: string;
15
- args: {
16
- command: import("zod").ZodString;
17
- };
18
- execute(args: {
19
- command: string;
20
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
21
- };
14
+ export declare function createSlashcommandTool(): ToolDefinition;
@@ -3,19 +3,5 @@
3
3
  *
4
4
  * Manage cached documentation
5
5
  */
6
- export declare const cacheDocsTool: {
7
- description: string;
8
- args: {
9
- action: import("zod").ZodEnum<{
10
- list: "list";
11
- get: "get";
12
- clear: "clear";
13
- stats: "stats";
14
- }>;
15
- filename: import("zod").ZodOptional<import("zod").ZodString>;
16
- };
17
- execute(args: {
18
- action: "list" | "get" | "clear" | "stats";
19
- filename?: string | undefined;
20
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
21
- };
6
+ import { type ToolDefinition } from "@opencode-ai/plugin";
7
+ export declare const cacheDocsTool: ToolDefinition;