opencode-orchestrator 0.8.10 → 0.8.12

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 (147) hide show
  1. package/dist/agents/commander.d.ts +6 -0
  2. package/dist/agents/prompts/commander/agents.d.ts +4 -0
  3. package/dist/agents/prompts/commander/execution.d.ts +4 -0
  4. package/dist/agents/prompts/commander/forbidden.d.ts +4 -0
  5. package/dist/agents/prompts/commander/identity.d.ts +4 -0
  6. package/dist/agents/prompts/commander/index.d.ts +12 -0
  7. package/dist/agents/prompts/commander/parallel.d.ts +4 -0
  8. package/dist/agents/prompts/commander/required.d.ts +4 -0
  9. package/dist/agents/prompts/commander/role.d.ts +4 -0
  10. package/dist/agents/prompts/commander/todo-format.d.ts +4 -0
  11. package/dist/agents/prompts/commander/tools.d.ts +4 -0
  12. package/dist/agents/prompts/common/anti-hallucination.d.ts +6 -0
  13. package/dist/agents/prompts/common/environment-discovery.d.ts +6 -0
  14. package/dist/agents/prompts/common/index.d.ts +11 -0
  15. package/dist/agents/prompts/common/mission-seal.d.ts +6 -0
  16. package/dist/agents/prompts/common/shared-workspace.d.ts +6 -0
  17. package/dist/agents/prompts/common/todo-rules.d.ts +6 -0
  18. package/dist/agents/prompts/common/verification.d.ts +6 -0
  19. package/dist/agents/prompts/index.d.ts +11 -0
  20. package/dist/agents/prompts/planner/forbidden.d.ts +4 -0
  21. package/dist/agents/prompts/planner/index.d.ts +8 -0
  22. package/dist/agents/prompts/planner/required.d.ts +4 -0
  23. package/dist/agents/prompts/planner/research.d.ts +4 -0
  24. package/dist/agents/prompts/planner/role.d.ts +4 -0
  25. package/dist/agents/prompts/planner/todo-format.d.ts +4 -0
  26. package/dist/agents/prompts/reviewer/forbidden.d.ts +4 -0
  27. package/dist/agents/prompts/reviewer/index.d.ts +9 -0
  28. package/dist/agents/prompts/reviewer/output.d.ts +4 -0
  29. package/dist/agents/prompts/reviewer/required.d.ts +4 -0
  30. package/dist/agents/prompts/reviewer/role.d.ts +4 -0
  31. package/dist/agents/prompts/reviewer/todo-update.d.ts +4 -0
  32. package/dist/agents/prompts/reviewer/verification.d.ts +4 -0
  33. package/dist/agents/prompts/worker/forbidden.d.ts +4 -0
  34. package/dist/agents/prompts/worker/index.d.ts +8 -0
  35. package/dist/agents/prompts/worker/quality.d.ts +4 -0
  36. package/dist/agents/prompts/worker/required.d.ts +4 -0
  37. package/dist/agents/prompts/worker/role.d.ts +4 -0
  38. package/dist/agents/prompts/worker/workflow.d.ts +4 -0
  39. package/dist/agents/subagents/planner.d.ts +8 -0
  40. package/dist/agents/subagents/reviewer.d.ts +9 -0
  41. package/dist/agents/subagents/worker.d.ts +8 -0
  42. package/dist/core/cache/interfaces/cache-document-entry.d.ts +10 -0
  43. package/dist/core/cache/interfaces/cache-list-entry.d.ts +12 -0
  44. package/dist/core/cache/interfaces/cache-metadata.d.ts +8 -0
  45. package/dist/core/cache/interfaces/cache-stats.d.ts +10 -0
  46. package/dist/core/cache/interfaces/cached-document.d.ts +11 -0
  47. package/dist/core/cache/interfaces/index.d.ts +8 -0
  48. package/dist/core/cache/interfaces.d.ts +3 -50
  49. package/dist/core/loop/interfaces/index.d.ts +5 -0
  50. package/dist/core/loop/interfaces/todo-stats.d.ts +11 -0
  51. package/dist/core/loop/interfaces/todo.d.ts +13 -0
  52. package/dist/core/loop/interfaces.d.ts +5 -32
  53. package/dist/core/loop/mission-seal-handler.d.ts +3 -0
  54. package/dist/core/loop/mission-seal.d.ts +3 -0
  55. package/dist/core/loop/types/index.d.ts +5 -0
  56. package/dist/core/loop/types/todo-priority.d.ts +4 -0
  57. package/dist/core/loop/types/todo-status.d.ts +4 -0
  58. package/dist/core/notification/presets/index.d.ts +9 -0
  59. package/dist/core/notification/presets/mission.d.ts +5 -0
  60. package/dist/core/notification/presets/parallel.d.ts +6 -0
  61. package/dist/core/notification/presets/session.d.ts +6 -0
  62. package/dist/core/notification/presets/task-lifecycle.d.ts +7 -0
  63. package/dist/core/notification/presets/tools.d.ts +6 -0
  64. package/dist/core/notification/presets/warnings.d.ts +7 -0
  65. package/dist/core/notification/presets.d.ts +5 -22
  66. package/dist/core/notification/types/index.d.ts +6 -0
  67. package/dist/core/notification/types/toast-message.d.ts +13 -0
  68. package/dist/core/notification/types/toast-options.d.ts +10 -0
  69. package/dist/core/notification/types/toast-variant.d.ts +4 -0
  70. package/dist/core/notification/types.d.ts +3 -16
  71. package/dist/core/progress/interfaces/index.d.ts +8 -0
  72. package/dist/core/progress/interfaces/progress-snapshot.d.ts +15 -0
  73. package/dist/core/progress/interfaces/snapshot-input.d.ts +13 -0
  74. package/dist/core/progress/interfaces/step-progress.d.ts +7 -0
  75. package/dist/core/progress/interfaces/task-progress.d.ts +10 -0
  76. package/dist/core/progress/interfaces/todo-progress.d.ts +9 -0
  77. package/dist/core/progress/interfaces.d.ts +3 -51
  78. package/dist/core/recovery/interfaces/error-context.d.ts +11 -0
  79. package/dist/core/recovery/interfaces/error-pattern.d.ts +10 -0
  80. package/dist/core/recovery/interfaces/index.d.ts +8 -0
  81. package/dist/core/recovery/interfaces/recovery-action.d.ts +24 -0
  82. package/dist/core/recovery/interfaces/recovery-record.d.ts +10 -0
  83. package/dist/core/recovery/interfaces/recovery-stats.d.ts +9 -0
  84. package/dist/core/recovery/interfaces.d.ts +3 -60
  85. package/dist/core/session/interfaces/context-stats.d.ts +9 -0
  86. package/dist/core/session/interfaces/index.d.ts +8 -0
  87. package/dist/core/session/interfaces/shared-context.d.ts +15 -0
  88. package/dist/core/session/interfaces/shared-decision.d.ts +10 -0
  89. package/dist/core/session/interfaces/shared-document.d.ts +9 -0
  90. package/dist/core/session/interfaces/shared-finding.d.ts +10 -0
  91. package/dist/core/session/interfaces.d.ts +3 -50
  92. package/dist/core/task/interfaces/index.d.ts +8 -0
  93. package/dist/core/task/interfaces/task-hierarchy.d.ts +9 -0
  94. package/dist/core/task/interfaces/task-input.d.ts +11 -0
  95. package/dist/core/task/interfaces/task-node.d.ts +20 -0
  96. package/dist/core/task/interfaces/task-progress.d.ts +11 -0
  97. package/dist/core/task/interfaces.d.ts +3 -51
  98. package/dist/index.js +1005 -773
  99. package/dist/plugin-handlers/chat-message-handler.d.ts +3 -10
  100. package/dist/plugin-handlers/event-handler.d.ts +4 -29
  101. package/dist/plugin-handlers/interfaces/assistant-done-context.d.ts +12 -0
  102. package/dist/plugin-handlers/interfaces/chat-message-context.d.ts +12 -0
  103. package/dist/plugin-handlers/interfaces/event-handler-context.d.ts +14 -0
  104. package/dist/plugin-handlers/interfaces/index.d.ts +9 -0
  105. package/dist/plugin-handlers/interfaces/orchestrator-state.d.ts +14 -0
  106. package/dist/plugin-handlers/interfaces/session-state.d.ts +10 -0
  107. package/dist/plugin-handlers/interfaces/tool-execute-context.d.ts +7 -0
  108. package/dist/plugin-handlers/tool-execute-handler.d.ts +3 -5
  109. package/dist/shared/agent/definition.d.ts +10 -0
  110. package/dist/shared/agent/index.d.ts +6 -0
  111. package/dist/shared/agent/names.d.ts +10 -0
  112. package/dist/shared/agent.d.ts +2 -21
  113. package/dist/shared/constants/background-status.d.ts +10 -0
  114. package/dist/shared/constants/background-task.d.ts +7 -0
  115. package/dist/shared/constants/cache-actions.d.ts +10 -0
  116. package/dist/shared/constants/filter-status.d.ts +12 -0
  117. package/dist/shared/constants/id-prefix.d.ts +8 -0
  118. package/dist/shared/constants/index.d.ts +28 -0
  119. package/dist/shared/constants/memory-limits.d.ts +12 -0
  120. package/dist/shared/constants/mission-seal.d.ts +24 -0
  121. package/dist/shared/constants/parallel-task.d.ts +13 -0
  122. package/dist/shared/constants/part-types.d.ts +9 -0
  123. package/dist/shared/constants/paths.d.ts +14 -0
  124. package/dist/shared/constants/prompts.d.ts +8 -0
  125. package/dist/shared/constants/slash-commands.d.ts +10 -0
  126. package/dist/shared/constants/status.d.ts +15 -0
  127. package/dist/shared/constants/time.d.ts +8 -0
  128. package/dist/shared/constants/toast-variants.d.ts +10 -0
  129. package/dist/shared/constants/tool-names.d.ts +22 -0
  130. package/dist/shared/constants.d.ts +3 -140
  131. package/dist/shared/error-patterns.d.ts +3 -35
  132. package/dist/shared/errors/detection.d.ts +5 -0
  133. package/dist/shared/errors/index.d.ts +7 -0
  134. package/dist/shared/errors/patterns.d.ts +14 -0
  135. package/dist/shared/errors/retry.d.ts +7 -0
  136. package/dist/tools/background-cmd/list.d.ts +2 -2
  137. package/dist/utils/common.d.ts +5 -13
  138. package/dist/utils/formatting/elapsed-time.d.ts +4 -0
  139. package/dist/utils/formatting/index.d.ts +5 -0
  140. package/dist/utils/formatting/timestamp.d.ts +4 -0
  141. package/dist/utils/parsing/index.d.ts +4 -0
  142. package/dist/utils/parsing/slash-command.d.ts +7 -0
  143. package/dist/utils/sanity.d.ts +0 -4
  144. package/package.json +1 -1
  145. package/dist/agents/consolidated/planner.d.ts +0 -8
  146. package/dist/agents/consolidated/reviewer.d.ts +0 -8
  147. package/dist/agents/consolidated/worker.d.ts +0 -8
@@ -1,38 +1,6 @@
1
1
  /**
2
- * Error Patterns - Common error detection patterns used across the system
2
+ * Error Patterns
3
3
  *
4
- * These patterns are used by:
5
- * - SessionRecovery for automatic error handling
6
- * - Recovery handler for retry decisions
7
- * - Logging for error categorization
4
+ * Re-exports for backward compatibility.
8
5
  */
9
- /**
10
- * Error type detection patterns (from OpenCode sessions)
11
- */
12
- export declare const ERROR_PATTERNS: {
13
- readonly TOOL_RESULT_MISSING: RegExp;
14
- readonly THINKING_BLOCK_ORDER: RegExp;
15
- readonly THINKING_DISABLED: RegExp;
16
- readonly RATE_LIMIT: RegExp;
17
- readonly CONTEXT_OVERFLOW: RegExp;
18
- readonly MESSAGE_ABORTED: RegExp;
19
- readonly NETWORK_ERROR: RegExp;
20
- readonly AUTH_ERROR: RegExp;
21
- };
22
- export type ErrorPatternType = keyof typeof ERROR_PATTERNS;
23
- /**
24
- * Detect error type from error message or object
25
- */
26
- export declare function detectErrorType(error: unknown): ErrorPatternType | null;
27
- /**
28
- * Check if error is retryable
29
- */
30
- export declare function isRetryableError(errorType: ErrorPatternType | null): boolean;
31
- /**
32
- * Check if error should abort (no recovery)
33
- */
34
- export declare function shouldAbortOnError(errorType: ErrorPatternType | null): boolean;
35
- /**
36
- * Get recommended delay for retry (in ms)
37
- */
38
- export declare function getRetryDelay(errorType: ErrorPatternType | null, attempt: number): number;
6
+ export * from "./errors/index.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Error Detection
3
+ */
4
+ import { type ErrorPatternType } from "./patterns.js";
5
+ export declare function detectErrorType(error: unknown): ErrorPatternType | null;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Errors - Index
3
+ */
4
+ export { ERROR_PATTERNS } from "./patterns.js";
5
+ export type { ErrorPatternType } from "./patterns.js";
6
+ export { detectErrorType } from "./detection.js";
7
+ export { isRetryableError, shouldAbortOnError, getRetryDelay } from "./retry.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Error Patterns
3
+ */
4
+ export declare const ERROR_PATTERNS: {
5
+ readonly TOOL_RESULT_MISSING: RegExp;
6
+ readonly THINKING_BLOCK_ORDER: RegExp;
7
+ readonly THINKING_DISABLED: RegExp;
8
+ readonly RATE_LIMIT: RegExp;
9
+ readonly CONTEXT_OVERFLOW: RegExp;
10
+ readonly MESSAGE_ABORTED: RegExp;
11
+ readonly NETWORK_ERROR: RegExp;
12
+ readonly AUTH_ERROR: RegExp;
13
+ };
14
+ export type ErrorPatternType = keyof typeof ERROR_PATTERNS;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Error Retry Logic
3
+ */
4
+ import type { ErrorPatternType } from "./patterns.js";
5
+ export declare function isRetryableError(errorType: ErrorPatternType | null): boolean;
6
+ export declare function shouldAbortOnError(errorType: ErrorPatternType | null): boolean;
7
+ export declare function getRetryDelay(errorType: ErrorPatternType | null, attempt: number): number;
@@ -6,12 +6,12 @@ export declare const listBackgroundTool: {
6
6
  args: {
7
7
  status: import("zod").ZodOptional<import("zod").ZodEnum<{
8
8
  running: "running";
9
- error: "error";
10
9
  done: "done";
10
+ error: "error";
11
11
  all: "all";
12
12
  }>>;
13
13
  };
14
14
  execute(args: {
15
- status?: "running" | "error" | "done" | "all" | undefined;
15
+ status?: "running" | "done" | "error" | "all" | undefined;
16
16
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
17
17
  };
@@ -1,15 +1,7 @@
1
- export declare function detectSlashCommand(text: string): {
2
- command: string;
3
- args: string;
4
- } | null;
5
1
  /**
6
- * Format a timestamp in human-readable format: YYYY-MM-DD HH:mm:ss
2
+ * Common Utils - Index
3
+ *
4
+ * Re-exports for backward compatibility.
7
5
  */
8
- export declare function formatTimestamp(date?: Date): string;
9
- /**
10
- * Calculate and format elapsed time between two timestamps in human-readable format
11
- * @param startMs Start timestamp in milliseconds
12
- * @param endMs End timestamp in milliseconds (defaults to now)
13
- * @returns Formatted string like "2h 30m 15s" or "45s"
14
- */
15
- export declare function formatElapsedTime(startMs: number, endMs?: number): string;
6
+ export { detectSlashCommand } from "./parsing/index.js";
7
+ export { formatTimestamp, formatElapsedTime } from "./formatting/index.js";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Elapsed Time Formatter
3
+ */
4
+ export declare function formatElapsedTime(startMs: number, endMs?: number): string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Formatting Utils - Index
3
+ */
4
+ export { formatTimestamp } from "./timestamp.js";
5
+ export { formatElapsedTime } from "./elapsed-time.js";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Timestamp Formatter
3
+ */
4
+ export declare function formatTimestamp(date?: Date): string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Parsing Utils - Index
3
+ */
4
+ export { detectSlashCommand } from "./slash-command.js";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Slash Command Parser
3
+ */
4
+ export declare function detectSlashCommand(text: string): {
5
+ command: string;
6
+ args: string;
7
+ } | null;
@@ -23,10 +23,6 @@ export interface SanityResult {
23
23
  * Check if LLM output shows signs of degeneration
24
24
  */
25
25
  export declare function checkOutputSanity(text: string): SanityResult;
26
- /**
27
- * Check if text is completely empty or meaningless
28
- */
29
- export declare function isEmptyOrMeaningless(text: string): boolean;
30
26
  /**
31
27
  * Recovery prompt for single anomaly
32
28
  */
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "opencode-orchestrator",
3
3
  "displayName": "OpenCode Orchestrator",
4
4
  "description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
5
- "version": "0.8.10",
5
+ "version": "0.8.12",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -1,8 +0,0 @@
1
- /**
2
- * Planner Agent - Strategic Planning + Research
3
- *
4
- * Combines: Architect + Researcher
5
- * Role: Plan tasks, research technologies, prepare documentation
6
- */
7
- import { AgentDefinition } from "../../shared/agent.js";
8
- export declare const planner: AgentDefinition;
@@ -1,8 +0,0 @@
1
- /**
2
- * Reviewer Agent - Verification + Context Management
3
- *
4
- * Combines: Inspector + Recorder
5
- * Role: Verify implementations, track progress, manage context
6
- */
7
- import { AgentDefinition } from "../../shared/agent.js";
8
- export declare const reviewer: AgentDefinition;
@@ -1,8 +0,0 @@
1
- /**
2
- * Worker Agent - Implementation + Documentation
3
- *
4
- * Combines: Builder + Librarian
5
- * Role: Write code, create files, fetch and cache documentation
6
- */
7
- import { AgentDefinition } from "../../shared/agent.js";
8
- export declare const worker: AgentDefinition;