opencode-orchestrator 1.2.23 โ 1.2.32
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.
- package/README.md +91 -41
- package/dist/core/agents/agent-registry.d.ts +28 -0
- package/dist/core/agents/concurrency.d.ts +41 -0
- package/dist/core/agents/config.d.ts +10 -0
- package/dist/core/agents/consts/index.d.ts +4 -0
- package/dist/core/agents/index.d.ts +2 -3
- package/dist/core/agents/interfaces/session-pool.interface.d.ts +0 -7
- package/dist/core/agents/manager/event-handler.d.ts +35 -0
- package/dist/core/agents/manager/index.d.ts +10 -0
- package/dist/core/agents/manager/task-cleaner.d.ts +29 -0
- package/dist/core/agents/manager/task-launcher.d.ts +35 -0
- package/dist/core/agents/manager/task-poller.d.ts +30 -0
- package/dist/core/agents/manager/task-resumer.d.ts +18 -0
- package/dist/core/agents/manager.d.ts +36 -8
- package/dist/core/agents/persistence/task-wal.d.ts +26 -0
- package/dist/core/agents/session-pool.d.ts +0 -5
- package/dist/core/agents/task-store.d.ts +54 -0
- package/dist/core/agents/unified-task-executor.d.ts +92 -10
- package/dist/core/cleanup/cleanup-scheduler.d.ts +11 -0
- package/dist/core/context/context-window-monitor.d.ts +66 -0
- package/dist/core/context/index.d.ts +6 -0
- package/dist/core/loop/continuation-lock.d.ts +57 -0
- package/dist/core/loop/formatters.d.ts +17 -0
- package/dist/core/loop/interfaces/index.d.ts +5 -0
- package/dist/core/loop/interfaces/todo-stats.d.ts +11 -0
- package/dist/core/loop/interfaces/todo.d.ts +13 -0
- package/dist/core/loop/interfaces.d.ts +7 -0
- package/dist/core/loop/mission-loop-handler.d.ts +25 -0
- package/dist/core/loop/mission-loop.d.ts +48 -0
- package/dist/core/loop/parser.d.ts +8 -0
- package/dist/core/loop/stats.d.ts +24 -0
- package/dist/core/loop/todo-continuation.d.ts +39 -0
- package/dist/core/loop/todo-enforcer.d.ts +9 -0
- package/dist/core/loop/todo-manager.d.ts +22 -0
- package/dist/core/loop/types/index.d.ts +5 -0
- package/dist/core/loop/types/todo-priority.d.ts +4 -0
- package/dist/core/loop/types/todo-status.d.ts +4 -0
- package/dist/core/loop/verification.d.ts +27 -0
- package/dist/core/memory/interfaces.d.ts +33 -0
- package/dist/core/memory/memory-manager.d.ts +40 -0
- package/dist/core/metrics/collector.d.ts +27 -0
- package/dist/core/notification/os-notify/index.d.ts +7 -0
- package/dist/core/notification/os-notify/notifier.d.ts +7 -0
- package/dist/core/notification/os-notify/platform-resolver.d.ts +7 -0
- package/dist/core/notification/os-notify/platform.d.ts +7 -0
- package/dist/core/notification/os-notify/sound-player.d.ts +7 -0
- package/dist/core/notification/os-notify/todo-checker.d.ts +5 -0
- package/dist/core/notification/task-toast-manager.d.ts +127 -0
- package/dist/core/notification/toast-core.d.ts +36 -0
- package/dist/core/notification/toast.d.ts +9 -0
- package/dist/core/orchestrator/index.d.ts +6 -0
- package/dist/core/orchestrator/interfaces/index.d.ts +4 -0
- package/dist/core/orchestrator/interfaces/session-state.d.ts +11 -0
- package/dist/core/orchestrator/session-manager.d.ts +31 -0
- package/dist/core/orchestrator/state.d.ts +10 -0
- package/dist/core/orchestrator/types/index.d.ts +4 -0
- package/dist/core/orchestrator/types/task-status.d.ts +5 -0
- package/dist/core/plugins/interfaces.d.ts +30 -0
- package/dist/core/plugins/plugin-manager.d.ts +21 -0
- package/dist/core/progress/calculator.d.ts +11 -0
- package/dist/core/progress/formatters.d.ts +20 -0
- package/dist/core/progress/interfaces/index.d.ts +8 -0
- package/dist/core/progress/interfaces/progress-snapshot.d.ts +15 -0
- package/dist/core/progress/interfaces/snapshot-input.d.ts +13 -0
- package/dist/core/progress/interfaces/step-progress.d.ts +7 -0
- package/dist/core/progress/interfaces/task-progress.d.ts +10 -0
- package/dist/core/progress/interfaces/todo-progress.d.ts +9 -0
- package/dist/core/progress/interfaces.d.ts +6 -0
- package/dist/core/progress/progress-notifier.d.ts +14 -0
- package/dist/core/progress/state-broadcaster.d.ts +29 -0
- package/dist/core/progress/store.d.ts +28 -0
- package/dist/core/progress/tracker.d.ts +11 -0
- package/dist/core/queue/async-queue.d.ts +46 -0
- package/dist/core/queue/async-utils.d.ts +20 -0
- package/dist/core/queue/index.d.ts +8 -0
- package/dist/core/queue/work-pool.d.ts +19 -0
- package/dist/core/recovery/auto-recovery.d.ts +9 -0
- package/dist/core/recovery/constants.d.ts +9 -0
- package/dist/core/recovery/handler.d.ts +27 -0
- package/dist/core/recovery/interfaces/error-context.d.ts +11 -0
- package/dist/core/recovery/interfaces/error-pattern.d.ts +10 -0
- package/dist/core/recovery/interfaces/index.d.ts +8 -0
- package/dist/core/recovery/interfaces/recovery-action.d.ts +25 -0
- package/dist/core/recovery/interfaces/recovery-record.d.ts +10 -0
- package/dist/core/recovery/interfaces/recovery-stats.d.ts +9 -0
- package/dist/core/recovery/interfaces.d.ts +6 -0
- package/dist/core/recovery/patterns.d.ts +8 -0
- package/dist/core/recovery/retry.d.ts +59 -0
- package/dist/core/recovery/session-recovery.d.ts +30 -0
- package/dist/core/session/interfaces/context-stats.d.ts +9 -0
- package/dist/core/session/interfaces/index.d.ts +8 -0
- package/dist/core/session/interfaces/shared-context.d.ts +15 -0
- package/dist/core/session/interfaces/shared-decision.d.ts +10 -0
- package/dist/core/session/interfaces/shared-document.d.ts +9 -0
- package/dist/core/session/interfaces/shared-finding.d.ts +10 -0
- package/dist/core/session/interfaces.d.ts +6 -0
- package/dist/core/session/session-health.d.ts +93 -0
- package/dist/core/session/shared-context.d.ts +8 -0
- package/dist/core/session/store.d.ts +44 -0
- package/dist/core/session/summary.d.ts +7 -0
- package/dist/core/sync/todo-parser.d.ts +5 -0
- package/dist/core/sync/todo-sync-service.d.ts +42 -0
- package/dist/core/task/interfaces/index.d.ts +8 -0
- package/dist/core/task/interfaces/task-hierarchy.d.ts +9 -0
- package/dist/core/task/interfaces/task-input.d.ts +11 -0
- package/dist/core/task/interfaces/task-node.d.ts +20 -0
- package/dist/core/task/interfaces/task-progress.d.ts +11 -0
- package/dist/core/task/interfaces.d.ts +6 -0
- package/dist/core/task/parser.d.ts +8 -0
- package/dist/core/task/scheduler.d.ts +12 -0
- package/dist/core/task/store.d.ts +32 -0
- package/dist/core/task/summary.d.ts +7 -0
- package/dist/core/task/task-decomposer.d.ts +10 -0
- package/dist/core/todo/todo-manager.d.ts +36 -0
- package/dist/hooks/compatibility/external-plugin.d.ts +10 -0
- package/dist/hooks/constants.d.ts +27 -0
- package/dist/hooks/custom/agent-ui.d.ts +20 -0
- package/dist/hooks/custom/memory-gate.d.ts +21 -0
- package/dist/hooks/custom/metrics.d.ts +14 -0
- package/dist/hooks/custom/resource-control.d.ts +13 -0
- package/dist/hooks/custom/secret-scanner.d.ts +19 -0
- package/dist/hooks/custom/strict-role-guard.d.ts +21 -0
- package/dist/hooks/custom/user-activity.d.ts +11 -0
- package/dist/hooks/features/mission-loop.d.ts +18 -0
- package/dist/hooks/features/sanity-check.d.ts +15 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/registry.d.ts +37 -0
- package/dist/hooks/types.d.ts +72 -0
- package/dist/index.js +19426 -3884
- package/dist/plugin-handlers/assistant-done-handler.d.ts +12 -0
- package/dist/plugin-handlers/chat-message-handler.d.ts +30 -0
- package/dist/plugin-handlers/config-handler.d.ts +9 -0
- package/dist/plugin-handlers/event-handler.d.ts +18 -0
- package/dist/plugin-handlers/index.d.ts +9 -0
- package/dist/plugin-handlers/interfaces/assistant-done-context.d.ts +12 -0
- package/dist/plugin-handlers/interfaces/chat-message-context.d.ts +12 -0
- package/dist/plugin-handlers/interfaces/event-handler-context.d.ts +14 -0
- package/dist/plugin-handlers/interfaces/index.d.ts +12 -0
- package/dist/plugin-handlers/interfaces/orchestrator-state.d.ts +14 -0
- package/dist/plugin-handlers/interfaces/session-compacting.d.ts +19 -0
- package/dist/plugin-handlers/interfaces/session-state.d.ts +15 -0
- package/dist/plugin-handlers/interfaces/system-transform.d.ts +17 -0
- package/dist/plugin-handlers/interfaces/tool-execute-context.d.ts +8 -0
- package/dist/plugin-handlers/interfaces/tool-hook.d.ts +14 -0
- package/dist/plugin-handlers/session-compacting-handler.d.ts +14 -0
- package/dist/plugin-handlers/system-transform-handler.d.ts +14 -0
- package/dist/plugin-handlers/tool-execute-handler.d.ts +14 -0
- package/dist/plugin-handlers/tool-execute-pre-handler.d.ts +8 -0
- package/dist/shared/constants/system-messages.d.ts +3 -3
- package/dist/shared/core/constants/index.d.ts +0 -4
- package/dist/shared/errors/constants/error-patterns.d.ts +13 -0
- package/dist/shared/errors/constants/error-type.d.ts +13 -0
- package/dist/shared/errors/constants/index.d.ts +5 -0
- package/dist/shared/errors/detection.d.ts +5 -0
- package/dist/shared/errors/index.d.ts +7 -0
- package/dist/shared/errors/retry.d.ts +7 -0
- package/dist/shared/errors/types/error-pattern-type.d.ts +5 -0
- package/dist/shared/errors/types/index.d.ts +4 -0
- package/dist/shared/index.d.ts +8 -6
- package/dist/shared/loop/constants/index.d.ts +7 -0
- package/dist/shared/loop/constants/labels.d.ts +33 -0
- package/dist/shared/loop/constants/loop.d.ts +17 -0
- package/dist/shared/loop/constants/mission-control.d.ts +20 -0
- package/dist/shared/loop/constants/todo-status.d.ts +9 -0
- package/dist/shared/loop/index.d.ts +6 -0
- package/dist/shared/loop/interfaces/index.d.ts +6 -0
- package/dist/shared/loop/interfaces/mission-loop.d.ts +29 -0
- package/dist/shared/loop/interfaces/todo-stats.d.ts +11 -0
- package/dist/shared/loop/interfaces/todo.d.ts +13 -0
- package/dist/shared/loop/types/index.d.ts +5 -0
- package/dist/shared/loop/types/todo-priority.d.ts +4 -0
- package/dist/shared/loop/types/todo-status.d.ts +4 -0
- package/dist/shared/message/constants/index.d.ts +8 -0
- package/dist/shared/message/constants/message-roles.d.ts +23 -0
- package/dist/shared/message/constants/part-types.d.ts +13 -0
- package/dist/shared/message/constants/plugin-hooks.d.ts +15 -0
- package/dist/shared/message/constants/prompts.d.ts +8 -0
- package/dist/shared/message/constants/slash-commands.d.ts +21 -0
- package/dist/shared/message/index.d.ts +4 -0
- package/dist/shared/notification/constants/index.d.ts +3 -0
- package/dist/shared/notification/constants/toast-duration.d.ts +19 -0
- package/dist/shared/notification/constants/toast-variants.d.ts +10 -0
- package/dist/shared/notification/constants/tui.const.d.ts +24 -0
- package/dist/shared/notification/index.d.ts +7 -0
- package/dist/shared/notification/interfaces/index.d.ts +6 -0
- package/dist/shared/notification/interfaces/task-toast.interface.d.ts +18 -0
- package/dist/shared/notification/interfaces/toast-message.d.ts +13 -0
- package/dist/shared/notification/interfaces/toast-options.d.ts +10 -0
- package/dist/shared/notification/os-notify/constants/index.d.ts +6 -0
- package/dist/shared/notification/os-notify/constants/notification-command-keys.d.ts +11 -0
- package/dist/shared/notification/os-notify/constants/notification-commands.d.ts +11 -0
- package/dist/shared/notification/os-notify/constants/notification-defaults.d.ts +5 -0
- package/dist/shared/notification/os-notify/index.d.ts +6 -0
- package/dist/shared/notification/os-notify/interfaces/index.d.ts +5 -0
- package/dist/shared/notification/os-notify/interfaces/notification-config.d.ts +15 -0
- package/dist/shared/notification/os-notify/interfaces/notification-state.d.ts +13 -0
- package/dist/shared/notification/os-notify/types/index.d.ts +4 -0
- package/dist/shared/notification/os-notify/types/notification-commands.d.ts +5 -0
- package/dist/shared/notification/presets/index.d.ts +9 -0
- package/dist/shared/notification/presets/mission.d.ts +5 -0
- package/dist/shared/notification/presets/parallel.d.ts +6 -0
- package/dist/shared/notification/presets/session.d.ts +6 -0
- package/dist/shared/notification/presets/task-lifecycle.d.ts +7 -0
- package/dist/shared/notification/presets/tools.d.ts +6 -0
- package/dist/shared/notification/presets/warnings.d.ts +7 -0
- package/dist/shared/notification/types/index.d.ts +4 -0
- package/dist/shared/notification/types/toast-variant.d.ts +4 -0
- package/dist/shared/os/constants/index.d.ts +4 -0
- package/dist/shared/os/constants/platform.d.ts +9 -0
- package/dist/shared/os/index.d.ts +5 -0
- package/dist/shared/os/types/index.d.ts +4 -0
- package/dist/shared/os/types/platform.d.ts +5 -0
- package/dist/shared/prompt/index.d.ts +0 -1
- package/dist/shared/recovery/constants/history.d.ts +11 -0
- package/dist/shared/recovery/constants/index.d.ts +6 -0
- package/dist/shared/recovery/constants/recovery-level.d.ts +15 -0
- package/dist/shared/recovery/constants/recovery.d.ts +13 -0
- package/dist/shared/recovery/index.d.ts +6 -0
- package/dist/shared/recovery/interfaces/error-context.d.ts +11 -0
- package/dist/shared/recovery/interfaces/index.d.ts +5 -0
- package/dist/shared/recovery/interfaces/recovery-record.d.ts +10 -0
- package/dist/shared/recovery/types/index.d.ts +4 -0
- package/dist/shared/recovery/types/recovery-action.d.ts +4 -0
- package/dist/shared/session/constants/index.d.ts +0 -2
- package/dist/shared/session/index.d.ts +0 -1
- package/dist/shared/verification/constants/categories.d.ts +95 -0
- package/dist/shared/verification/constants/checklist.d.ts +16 -0
- package/dist/shared/verification/constants/index.d.ts +7 -0
- package/dist/shared/verification/constants/patterns.d.ts +19 -0
- package/dist/shared/verification/constants/signals.d.ts +10 -0
- package/dist/shared/verification/index.d.ts +8 -0
- package/dist/shared/verification/interfaces/checklist-item.d.ts +21 -0
- package/dist/shared/verification/interfaces/checklist-verification-result.d.ts +24 -0
- package/dist/shared/verification/interfaces/index.d.ts +7 -0
- package/dist/shared/verification/interfaces/verification-checklist.d.ts +19 -0
- package/dist/shared/verification/interfaces/verification-result.d.ts +29 -0
- package/dist/shared/verification/types/checklist-category.d.ts +18 -0
- package/dist/shared/verification/types/index.d.ts +4 -0
- package/dist/tools/parallel/list-agents.d.ts +1 -1
- package/dist/tools/parallel/show-metrics.d.ts +10 -0
- package/dist/tools/parallel/update-todo.d.ts +7 -0
- package/dist/utils/common.d.ts +5 -3
- package/dist/utils/compatibility/claude.d.ts +9 -0
- package/dist/utils/formatting/elapsed-time.d.ts +4 -0
- package/dist/utils/formatting/index.d.ts +5 -0
- package/dist/utils/formatting/timestamp.d.ts +4 -0
- package/dist/utils/parsing/index.d.ts +4 -0
- package/dist/utils/parsing/slash-command.d.ts +7 -0
- package/dist/utils/sanity/checker.d.ts +8 -0
- package/dist/utils/sanity/constants/escalation-prompt.d.ts +4 -0
- package/dist/utils/sanity/constants/index.d.ts +6 -0
- package/dist/utils/sanity/constants/recovery-prompt.d.ts +4 -0
- package/dist/utils/sanity/constants/severity.d.ts +8 -0
- package/dist/utils/sanity/index.d.ts +7 -0
- package/dist/utils/sanity/interfaces/index.d.ts +4 -0
- package/dist/utils/sanity/interfaces/sanity-result.d.ts +9 -0
- package/dist/utils/sanity/types/index.d.ts +4 -0
- package/dist/utils/sanity/types/severity.d.ts +5 -0
- package/package.json +3 -3
- package/dist/core/agents/adaptive-concurrency.d.ts +0 -57
- /package/dist/{shared/task/constants/task-status.d.ts โ core/agents/consts/task-status.const.d.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Part Types
|
|
3
|
+
*/
|
|
4
|
+
export declare const PART_TYPES: {
|
|
5
|
+
readonly TEXT: "text";
|
|
6
|
+
readonly REASONING: "reasoning";
|
|
7
|
+
readonly TOOL_CALL: "tool_call";
|
|
8
|
+
readonly TOOL_RESULT: "tool_result";
|
|
9
|
+
/** Anthropic-style tool reference */
|
|
10
|
+
readonly TOOL: "tool";
|
|
11
|
+
/** Anthropic-style tool invocation */
|
|
12
|
+
readonly TOOL_USE: "tool_use";
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Hook Constants
|
|
3
|
+
*
|
|
4
|
+
* OpenCode plugin hook names (from @opencode-ai/plugin)
|
|
5
|
+
* Use these instead of hardcoded strings
|
|
6
|
+
*/
|
|
7
|
+
export declare const PLUGIN_HOOKS: {
|
|
8
|
+
/** Intercepts user messages before sending to LLM */
|
|
9
|
+
readonly CHAT_MESSAGE: "chat.message";
|
|
10
|
+
/** Runs after LLM finishes responding */
|
|
11
|
+
readonly ASSISTANT_DONE: "assistant.done";
|
|
12
|
+
/** Runs after any tool call completes */
|
|
13
|
+
readonly TOOL_EXECUTE_AFTER: "tool.execute.after";
|
|
14
|
+
};
|
|
15
|
+
export type PluginHookName = typeof PLUGIN_HOOKS[keyof typeof PLUGIN_HOOKS];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slash Commands (with slash prefix)
|
|
3
|
+
*/
|
|
4
|
+
export declare const SLASH_COMMANDS: {
|
|
5
|
+
readonly TASK: "/task";
|
|
6
|
+
readonly PLAN: "/plan";
|
|
7
|
+
readonly STATUS: "/status";
|
|
8
|
+
readonly STOP: "/stop";
|
|
9
|
+
readonly CANCEL: "/cancel";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Command Names (without slash prefix, for comparison after parsing)
|
|
13
|
+
*/
|
|
14
|
+
export declare const COMMAND_NAMES: {
|
|
15
|
+
readonly TASK: "task";
|
|
16
|
+
readonly PLAN: "plan";
|
|
17
|
+
readonly STATUS: "status";
|
|
18
|
+
readonly STOP: "stop";
|
|
19
|
+
readonly CANCEL: "cancel";
|
|
20
|
+
};
|
|
21
|
+
export type CommandName = typeof COMMAND_NAMES[keyof typeof COMMAND_NAMES];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast Duration Constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const TOAST_DURATION: {
|
|
5
|
+
/** Extra short: 1.5 seconds */
|
|
6
|
+
readonly EXTRA_SHORT: 1500;
|
|
7
|
+
/** Short: 2 seconds */
|
|
8
|
+
readonly SHORT: number;
|
|
9
|
+
/** Medium: 3 seconds */
|
|
10
|
+
readonly MEDIUM: number;
|
|
11
|
+
/** Default: 4 seconds */
|
|
12
|
+
readonly DEFAULT: number;
|
|
13
|
+
/** Long: 5 seconds */
|
|
14
|
+
readonly LONG: number;
|
|
15
|
+
/** Extended: 7 seconds */
|
|
16
|
+
readonly EXTENDED: number;
|
|
17
|
+
/** Persistent: 0 (stays until dismissed) */
|
|
18
|
+
readonly PERSISTENT: 0;
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast Variants
|
|
3
|
+
*/
|
|
4
|
+
export declare const TOAST_VARIANTS: {
|
|
5
|
+
readonly INFO: "info";
|
|
6
|
+
readonly SUCCESS: "success";
|
|
7
|
+
readonly WARNING: "warning";
|
|
8
|
+
readonly ERROR: "error";
|
|
9
|
+
};
|
|
10
|
+
export type ToastVariant = (typeof TOAST_VARIANTS)[keyof typeof TOAST_VARIANTS];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI Constants for Notification System
|
|
3
|
+
*/
|
|
4
|
+
export declare const TUI_ICONS: {
|
|
5
|
+
readonly RUNNING: "โก";
|
|
6
|
+
readonly QUEUED: "โณ";
|
|
7
|
+
readonly MISSION_COMPLETE: "๐";
|
|
8
|
+
readonly SHIELD: "๐ก๏ธ";
|
|
9
|
+
readonly NEW: " <- NEW";
|
|
10
|
+
};
|
|
11
|
+
export declare const TUI_BLOCKS: {
|
|
12
|
+
readonly FILLED: "โฃ";
|
|
13
|
+
readonly EMPTY: "โข";
|
|
14
|
+
};
|
|
15
|
+
export declare const TUI_TAGS: {
|
|
16
|
+
readonly BACKGROUND: "BACKGROUND";
|
|
17
|
+
readonly FOREGROUND: "FOREGROUND";
|
|
18
|
+
readonly WAITING: "WAITING";
|
|
19
|
+
readonly PENDING: "PENDING";
|
|
20
|
+
};
|
|
21
|
+
export declare const TUI_MESSAGES: {
|
|
22
|
+
readonly MISSION_COMPLETE_TITLE: "MISSION ACCOMPLISHED";
|
|
23
|
+
readonly MISSION_COMPLETE_SUBTITLE: "Passed all verifications.\nWork is complete.";
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TaskStatus } from "../../core/index.js";
|
|
2
|
+
export interface TrackedTask {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
agent: string;
|
|
6
|
+
status: TaskStatus;
|
|
7
|
+
startedAt: Date;
|
|
8
|
+
isBackground: boolean;
|
|
9
|
+
parentSessionID?: string;
|
|
10
|
+
sessionID?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TaskCompletionInfo {
|
|
13
|
+
id: string;
|
|
14
|
+
description: string;
|
|
15
|
+
duration: string;
|
|
16
|
+
status: TaskStatus;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast message with metadata
|
|
3
|
+
*/
|
|
4
|
+
import type { ToastVariant } from "../types/index.js";
|
|
5
|
+
export interface ToastMessage {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
message: string;
|
|
9
|
+
variant: ToastVariant;
|
|
10
|
+
timestamp: Date;
|
|
11
|
+
duration: number;
|
|
12
|
+
dismissed: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OS Notification Command Keys
|
|
3
|
+
*/
|
|
4
|
+
export declare const NOTIFICATION_COMMAND_KEYS: {
|
|
5
|
+
readonly OSASCRIPT: "osascript";
|
|
6
|
+
readonly NOTIFY_SEND: "notifySend";
|
|
7
|
+
readonly POWERSHELL: "powershell";
|
|
8
|
+
readonly AFPLAY: "afplay";
|
|
9
|
+
readonly PAPLAY: "paplay";
|
|
10
|
+
readonly APLAY: "aplay";
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OS Notification Commands
|
|
3
|
+
*/
|
|
4
|
+
export declare const NOTIFICATION_COMMANDS: {
|
|
5
|
+
readonly OSASCRIPT: "osascript";
|
|
6
|
+
readonly NOTIFY_SEND: "notify-send";
|
|
7
|
+
readonly POWERSHELL: "powershell";
|
|
8
|
+
readonly AFPLAY: "afplay";
|
|
9
|
+
readonly PAPLAY: "paplay";
|
|
10
|
+
readonly APLAY: "aplay";
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Config Interface
|
|
3
|
+
*/
|
|
4
|
+
export interface NotificationConfig {
|
|
5
|
+
/** Notification title (default: "OpenCode Orchestrator") */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Notification message (default: "Task completed") */
|
|
8
|
+
message?: string;
|
|
9
|
+
/** Play sound with notification (default: true) */
|
|
10
|
+
playSound?: boolean;
|
|
11
|
+
/** Custom sound file path */
|
|
12
|
+
soundPath?: string;
|
|
13
|
+
/** Maximum number of sessions to track before cleanup (default: 100) */
|
|
14
|
+
maxTrackedSessions?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification State Interface
|
|
3
|
+
*/
|
|
4
|
+
export interface NotificationState {
|
|
5
|
+
/** Sessions that have already been notified */
|
|
6
|
+
notifiedSessions: Set<string>;
|
|
7
|
+
/** Pending notification timers */
|
|
8
|
+
pendingTimers: Map<string, ReturnType<typeof setTimeout>>;
|
|
9
|
+
/** Version tracking for race condition handling */
|
|
10
|
+
notificationVersions: Map<string, number>;
|
|
11
|
+
/** Sessions currently executing notification */
|
|
12
|
+
executingNotifications: Set<string>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Presets - Index
|
|
3
|
+
*/
|
|
4
|
+
export { taskStarted, taskCompleted, taskFailed, allTasksComplete, } from "./task-lifecycle.js";
|
|
5
|
+
export { sessionCreated, sessionResumed, sessionCompleted, } from "./session.js";
|
|
6
|
+
export { parallelTasksLaunched, concurrencyAcquired, concurrencyReleased, } from "./parallel.js";
|
|
7
|
+
export { missionComplete, missionStarted, } from "./mission.js";
|
|
8
|
+
export { toolExecuted, documentCached, researchStarted, } from "./tools.js";
|
|
9
|
+
export { warningRateLimited, errorRecovery, warningMaxDepth, warningMaxRetries, } from "./warnings.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallel Processing Presets
|
|
3
|
+
*/
|
|
4
|
+
export declare const parallelTasksLaunched: (count: number, agents: string[]) => import("../index.js").ToastMessage;
|
|
5
|
+
export declare const concurrencyAcquired: (agent: string, slot: string) => import("../index.js").ToastMessage;
|
|
6
|
+
export declare const concurrencyReleased: (agent: string) => import("../index.js").ToastMessage;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Management Presets
|
|
3
|
+
*/
|
|
4
|
+
export declare const sessionCreated: (sessionId: string, agent: string) => import("../index.js").ToastMessage;
|
|
5
|
+
export declare const sessionResumed: (sessionId: string, agent: string) => import("../index.js").ToastMessage;
|
|
6
|
+
export declare const sessionCompleted: (sessionId: string, duration: string) => import("../index.js").ToastMessage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Lifecycle Presets
|
|
3
|
+
*/
|
|
4
|
+
export declare const taskStarted: (taskId: string, agent: string) => import("../index.js").ToastMessage;
|
|
5
|
+
export declare const taskCompleted: (taskId: string, agent: string) => import("../index.js").ToastMessage;
|
|
6
|
+
export declare const taskFailed: (taskId: string, error: string) => import("../index.js").ToastMessage;
|
|
7
|
+
export declare const allTasksComplete: (count: number) => import("../index.js").ToastMessage;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tools & Research Presets
|
|
3
|
+
*/
|
|
4
|
+
export declare const toolExecuted: (toolName: string, target: string) => import("../index.js").ToastMessage;
|
|
5
|
+
export declare const documentCached: (filename: string) => import("../index.js").ToastMessage;
|
|
6
|
+
export declare const researchStarted: (topic: string) => import("../index.js").ToastMessage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warnings & Errors Presets
|
|
3
|
+
*/
|
|
4
|
+
export declare const warningRateLimited: () => import("../index.js").ToastMessage;
|
|
5
|
+
export declare const errorRecovery: (action: string) => import("../index.js").ToastMessage;
|
|
6
|
+
export declare const warningMaxDepth: (depth: number) => import("../index.js").ToastMessage;
|
|
7
|
+
export declare const warningMaxRetries: () => import("../index.js").ToastMessage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History & Storage Limits
|
|
3
|
+
*/
|
|
4
|
+
export declare const HISTORY: {
|
|
5
|
+
/** Recovery history max entries */
|
|
6
|
+
readonly MAX_RECOVERY: 100;
|
|
7
|
+
/** Toast history max entries */
|
|
8
|
+
readonly MAX_TOAST: 50;
|
|
9
|
+
/** Progress store max entries */
|
|
10
|
+
readonly MAX_PROGRESS: 100;
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery Level Constants
|
|
3
|
+
*
|
|
4
|
+
* Escalation levels for agent failure handling.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RECOVERY_LEVEL: {
|
|
7
|
+
/** Level 1: Split task into smaller units */
|
|
8
|
+
readonly DECOMPOSE: "DECOMPOSE";
|
|
9
|
+
/** Level 2: Step back and create new strategy */
|
|
10
|
+
readonly RE_PLAN: "RE-PLAN";
|
|
11
|
+
/** Level 3: Ask user for direction */
|
|
12
|
+
readonly ASK_USER: "ASK USER";
|
|
13
|
+
};
|
|
14
|
+
export declare const RECOVERY_PRINCIPLE = "DECOMPOSE \u2192 RE-PLAN \u2192 ASK. Never give up silently.";
|
|
15
|
+
export type RecoveryLevel = (typeof RECOVERY_LEVEL)[keyof typeof RECOVERY_LEVEL];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery Configuration Constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const RECOVERY: {
|
|
5
|
+
/** Maximum recovery attempts per session */
|
|
6
|
+
readonly MAX_ATTEMPTS: 3;
|
|
7
|
+
/** Minimum time between recovery attempts */
|
|
8
|
+
readonly MIN_INTERVAL_MS: number;
|
|
9
|
+
/** Base delay for retry backoff calculation */
|
|
10
|
+
readonly BASE_DELAY_MS: number;
|
|
11
|
+
/** Maximum retry multiplier */
|
|
12
|
+
readonly MAX_RETRY_MULTIPLIER: 5;
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery history record
|
|
3
|
+
*/
|
|
4
|
+
import type { ErrorContext } from "./error-context.js";
|
|
5
|
+
import type { RecoveryAction } from "../types/index.js";
|
|
6
|
+
export interface RecoveryRecord {
|
|
7
|
+
context: ErrorContext;
|
|
8
|
+
action: RecoveryAction;
|
|
9
|
+
timestamp: Date;
|
|
10
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checklist Category Constants
|
|
3
|
+
*
|
|
4
|
+
* Category definitions for verification checklist items.
|
|
5
|
+
* Categories are used to group and organize verification steps.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Category IDs - Used as keys for category identification
|
|
9
|
+
*/
|
|
10
|
+
export declare const CATEGORY_ID: {
|
|
11
|
+
readonly CODE_QUALITY: "code-quality";
|
|
12
|
+
readonly UNIT_TESTS: "unit-tests";
|
|
13
|
+
readonly INTEGRATION_TESTS: "integration-tests";
|
|
14
|
+
readonly BUILD: "build";
|
|
15
|
+
readonly RUNTIME: "runtime";
|
|
16
|
+
readonly INFRASTRUCTURE: "infrastructure";
|
|
17
|
+
readonly CUSTOM: "custom";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Category Display Labels - Human-readable names for each category
|
|
21
|
+
*/
|
|
22
|
+
export declare const CATEGORY_LABEL: {
|
|
23
|
+
readonly "code-quality": "Code Quality";
|
|
24
|
+
readonly "unit-tests": "Unit Tests";
|
|
25
|
+
readonly "integration-tests": "Integration Tests";
|
|
26
|
+
readonly build: "Build Verification";
|
|
27
|
+
readonly runtime: "Runtime Verification";
|
|
28
|
+
readonly infrastructure: "Infrastructure & Environment";
|
|
29
|
+
readonly custom: "Project-Specific Checks";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Category Descriptions - Detailed descriptions for each category
|
|
33
|
+
*/
|
|
34
|
+
export declare const CATEGORY_DESCRIPTION: {
|
|
35
|
+
readonly "code-quality": "Lint, type check, static analysis";
|
|
36
|
+
readonly "unit-tests": "Unit tests execution";
|
|
37
|
+
readonly "integration-tests": "E2E and integration tests";
|
|
38
|
+
readonly build: "Build verification";
|
|
39
|
+
readonly runtime: "Runtime verification (starts, runs)";
|
|
40
|
+
readonly infrastructure: "Docker, compose, CI/CD, etc.";
|
|
41
|
+
readonly custom: "Project-specific custom checks";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Category Icons - Visual indicators for each category
|
|
45
|
+
*/
|
|
46
|
+
export declare const CATEGORY_ICON: {
|
|
47
|
+
readonly "code-quality": "๐";
|
|
48
|
+
readonly "unit-tests": "๐งช";
|
|
49
|
+
readonly "integration-tests": "๐";
|
|
50
|
+
readonly build: "๐จ";
|
|
51
|
+
readonly runtime: "โถ๏ธ";
|
|
52
|
+
readonly infrastructure: "๐๏ธ";
|
|
53
|
+
readonly custom: "โ๏ธ";
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Combined category information object
|
|
57
|
+
*/
|
|
58
|
+
export declare const CHECKLIST_CATEGORIES: {
|
|
59
|
+
readonly IDS: {
|
|
60
|
+
readonly CODE_QUALITY: "code-quality";
|
|
61
|
+
readonly UNIT_TESTS: "unit-tests";
|
|
62
|
+
readonly INTEGRATION_TESTS: "integration-tests";
|
|
63
|
+
readonly BUILD: "build";
|
|
64
|
+
readonly RUNTIME: "runtime";
|
|
65
|
+
readonly INFRASTRUCTURE: "infrastructure";
|
|
66
|
+
readonly CUSTOM: "custom";
|
|
67
|
+
};
|
|
68
|
+
readonly LABELS: {
|
|
69
|
+
readonly "code-quality": "Code Quality";
|
|
70
|
+
readonly "unit-tests": "Unit Tests";
|
|
71
|
+
readonly "integration-tests": "Integration Tests";
|
|
72
|
+
readonly build: "Build Verification";
|
|
73
|
+
readonly runtime: "Runtime Verification";
|
|
74
|
+
readonly infrastructure: "Infrastructure & Environment";
|
|
75
|
+
readonly custom: "Project-Specific Checks";
|
|
76
|
+
};
|
|
77
|
+
readonly DESCRIPTIONS: {
|
|
78
|
+
readonly "code-quality": "Lint, type check, static analysis";
|
|
79
|
+
readonly "unit-tests": "Unit tests execution";
|
|
80
|
+
readonly "integration-tests": "E2E and integration tests";
|
|
81
|
+
readonly build: "Build verification";
|
|
82
|
+
readonly runtime: "Runtime verification (starts, runs)";
|
|
83
|
+
readonly infrastructure: "Docker, compose, CI/CD, etc.";
|
|
84
|
+
readonly custom: "Project-specific custom checks";
|
|
85
|
+
};
|
|
86
|
+
readonly ICONS: {
|
|
87
|
+
readonly "code-quality": "๐";
|
|
88
|
+
readonly "unit-tests": "๐งช";
|
|
89
|
+
readonly "integration-tests": "๐";
|
|
90
|
+
readonly build: "๐จ";
|
|
91
|
+
readonly runtime: "โถ๏ธ";
|
|
92
|
+
readonly infrastructure: "๐๏ธ";
|
|
93
|
+
readonly custom: "โ๏ธ";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification Checklist Constants
|
|
3
|
+
*
|
|
4
|
+
* File paths and configuration for the verification checklist system.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Checklist file and configuration constants
|
|
8
|
+
*/
|
|
9
|
+
export declare const CHECKLIST: {
|
|
10
|
+
/** Path to the verification checklist file */
|
|
11
|
+
readonly FILE: ".opencode/verification-checklist.md";
|
|
12
|
+
/** Minimum required items for valid checklist */
|
|
13
|
+
readonly MIN_ITEMS: 1;
|
|
14
|
+
/** Maximum items to show in error messages */
|
|
15
|
+
readonly MAX_ERROR_ITEMS: 5;
|
|
16
|
+
};
|