opencode-orchestrator 1.2.6 → 1.2.11

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 (31) hide show
  1. package/dist/core/loop/mission-loop.d.ts +1 -30
  2. package/dist/hooks/registry.d.ts +4 -4
  3. package/dist/hooks/types.d.ts +5 -5
  4. package/dist/index.js +15580 -1761
  5. package/dist/plugin-handlers/chat-message-handler.d.ts +17 -1
  6. package/dist/plugin-handlers/interfaces/index.d.ts +1 -0
  7. package/dist/plugin-handlers/interfaces/tool-hook.d.ts +14 -0
  8. package/dist/plugin-handlers/tool-execute-handler.d.ts +2 -11
  9. package/dist/plugin-handlers/tool-execute-pre-handler.d.ts +2 -7
  10. package/dist/shared/constants/system-messages.d.ts +2 -0
  11. package/dist/shared/loop/interfaces/index.d.ts +3 -2
  12. package/dist/shared/loop/interfaces/mission-loop.d.ts +29 -0
  13. package/dist/tools/ast/index.d.ts +3 -28
  14. package/dist/tools/background-cmd/check.d.ts +2 -11
  15. package/dist/tools/background-cmd/kill.d.ts +2 -9
  16. package/dist/tools/background-cmd/list.d.ts +2 -14
  17. package/dist/tools/background-cmd/run.d.ts +2 -15
  18. package/dist/tools/callAgent.d.ts +2 -17
  19. package/dist/tools/lsp/index.d.ts +2 -11
  20. package/dist/tools/parallel/cancel-task.d.ts +2 -9
  21. package/dist/tools/parallel/delegate-task.d.ts +2 -25
  22. package/dist/tools/parallel/get-task-result.d.ts +2 -9
  23. package/dist/tools/parallel/list-tasks.d.ts +2 -9
  24. package/dist/tools/parallel/update-todo.d.ts +2 -23
  25. package/dist/tools/search.d.ts +11 -142
  26. package/dist/tools/slashCommand.d.ts +2 -9
  27. package/dist/tools/web/cache-docs.d.ts +2 -16
  28. package/dist/tools/web/codesearch.d.ts +2 -13
  29. package/dist/tools/web/webfetch.d.ts +2 -13
  30. package/dist/tools/web/websearch.d.ts +2 -11
  31. package/package.json +4 -4
@@ -5,32 +5,7 @@
5
5
  * This system moves away from explicit signaling (seals) and relies
6
6
  * strictly on file-based state verification.
7
7
  */
8
- export interface MissionLoopState {
9
- /** Whether loop is active */
10
- active: boolean;
11
- /** Current iteration number */
12
- iteration: number;
13
- /** Maximum allowed iterations */
14
- maxIterations: number;
15
- /** Original task prompt */
16
- prompt: string;
17
- /** Session ID */
18
- sessionID: string;
19
- /** When loop started */
20
- startedAt: string;
21
- /** Last activity timestamp */
22
- lastActivity?: string;
23
- /** Last known progress string (e.g., "3/10") */
24
- lastProgress?: string;
25
- /** Number of iterations without progress */
26
- stagnationCount?: number;
27
- }
28
- export interface MissionLoopOptions {
29
- /** Maximum iterations before stopping (default: 1000) */
30
- maxIterations?: number;
31
- /** Countdown seconds before auto-continue (default: 3) */
32
- countdownSeconds?: number;
33
- }
8
+ import type { MissionLoopState, MissionLoopOptions } from "../../shared/loop/interfaces/mission-loop.js";
34
9
  /**
35
10
  * Read loop state from disk
36
11
  */
@@ -71,7 +46,3 @@ export declare function generateCompletionNotification(state: MissionLoopState):
71
46
  * Generate max iterations reached notification
72
47
  */
73
48
  export declare function generateMaxIterationsNotification(state: MissionLoopState): string;
74
- /**
75
- * Stagnation intervention prompt
76
- */
77
- 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>";
@@ -19,15 +19,15 @@ export declare class HookRegistry {
19
19
  private prepareMetadata;
20
20
  private sortHooks;
21
21
  private topologicalSort;
22
- executePreTool(ctx: HookContext, tool: string, args: any): Promise<{
22
+ executePreTool(ctx: HookContext, tool: string, args: Record<string, unknown>): Promise<{
23
23
  action: typeof HOOK_ACTIONS.ALLOW | typeof HOOK_ACTIONS.BLOCK | typeof HOOK_ACTIONS.MODIFY;
24
- modifiedArgs?: any;
24
+ modifiedArgs?: Record<string, unknown>;
25
25
  reason?: string;
26
26
  }>;
27
- executePostTool(ctx: HookContext, tool: string, input: any, output: {
27
+ executePostTool(ctx: HookContext, tool: string, input: Record<string, unknown>, output: {
28
28
  title: string;
29
29
  output: string;
30
- metadata: any;
30
+ metadata: Record<string, unknown>;
31
31
  }): Promise<void>;
32
32
  executeChat(ctx: HookContext, message: string): Promise<{
33
33
  action: typeof HOOK_ACTIONS.PROCESS | typeof HOOK_ACTIONS.INTERCEPT;
@@ -7,7 +7,7 @@ export interface HookContext {
7
7
  sessionID: string;
8
8
  agent?: string;
9
9
  directory: string;
10
- sessions: Map<string, any>;
10
+ sessions: Map<string, unknown>;
11
11
  }
12
12
  export interface HookMetadata {
13
13
  name: string;
@@ -31,9 +31,9 @@ export type HookResult = {
31
31
  */
32
32
  export interface PreToolUseHook {
33
33
  name: string;
34
- execute(context: HookContext, tool: string, args: any): Promise<{
34
+ execute(context: HookContext, tool: string, args: Record<string, unknown>): Promise<{
35
35
  action: typeof HOOK_ACTIONS.ALLOW | typeof HOOK_ACTIONS.BLOCK | typeof HOOK_ACTIONS.MODIFY;
36
- modifiedArgs?: any;
36
+ modifiedArgs?: Record<string, unknown>;
37
37
  reason?: string;
38
38
  }>;
39
39
  }
@@ -43,10 +43,10 @@ export interface PreToolUseHook {
43
43
  */
44
44
  export interface PostToolUseHook {
45
45
  name: string;
46
- execute(context: HookContext, tool: string, input: any, output: {
46
+ execute(context: HookContext, tool: string, input: Record<string, unknown>, output: {
47
47
  title: string;
48
48
  output: string;
49
- metadata: any;
49
+ metadata: Record<string, unknown>;
50
50
  }): Promise<{
51
51
  output?: string;
52
52
  }>;