opencode-orchestrator 0.9.73 → 0.9.74
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 +19 -7
- package/dist/core/agents/concurrency.d.ts +6 -0
- package/dist/core/agents/interfaces/parallel-task.interface.d.ts +1 -0
- package/dist/core/agents/manager/task-poller.d.ts +1 -1
- package/dist/core/agents/manager.d.ts +1 -0
- package/dist/core/agents/persistence/task-wal.d.ts +26 -0
- package/dist/core/agents/types/parallel-task-status.type.d.ts +2 -1
- package/dist/core/notification/os-notify/handler.d.ts +19 -0
- package/dist/core/notification/os-notify/index.d.ts +6 -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 +2 -1
- package/dist/index.js +837 -97
- package/dist/plugin-handlers/interfaces/event-handler-context.d.ts +2 -0
- package/dist/shared/core/constants/index.d.ts +1 -0
- package/dist/shared/core/constants/status-labels.d.ts +1 -0
- package/dist/shared/core/constants/wal-actions.d.ts +10 -0
- package/dist/shared/index.d.ts +1 -15
- package/dist/shared/loop/constants/index.d.ts +1 -0
- package/dist/shared/loop/constants/todo-status.d.ts +9 -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 +19 -0
- package/dist/shared/notification/os-notify/interfaces/notification-state.d.ts +15 -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/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/package.json +1 -1
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
5
5
|
import type { SessionState } from "./session-state.js";
|
|
6
6
|
import type { OrchestratorState } from "./orchestrator-state.js";
|
|
7
|
+
import type { SessionNotificationHandler } from "../../core/notification/os-notify/index.js";
|
|
7
8
|
type OpencodeClient = PluginInput["client"];
|
|
8
9
|
export interface EventHandlerContext {
|
|
9
10
|
client: OpencodeClient;
|
|
10
11
|
directory: string;
|
|
11
12
|
sessions: Map<string, SessionState>;
|
|
12
13
|
state: OrchestratorState;
|
|
14
|
+
sessionNotifyHandler?: SessionNotificationHandler;
|
|
13
15
|
}
|
|
14
16
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAL (Write-Ahead Log) Action constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const WAL_ACTIONS: {
|
|
5
|
+
readonly LAUNCH: "LAUNCH";
|
|
6
|
+
readonly UPDATE: "UPDATE";
|
|
7
|
+
readonly COMPLETE: "COMPLETE";
|
|
8
|
+
readonly DELETE: "DELETE";
|
|
9
|
+
};
|
|
10
|
+
export type WALAction = typeof WAL_ACTIONS[keyof typeof WAL_ACTIONS];
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared Module - Central Exports
|
|
3
|
-
*
|
|
4
|
-
* Domain-first organization:
|
|
5
|
-
* - shared/agent/ - AGENT_NAMES, AgentDefinition, AgentName
|
|
6
|
-
* - shared/core/ - TIME, PATHS, ID_PREFIX
|
|
7
|
-
* - shared/task/ - PARALLEL_TASK, ParallelTask, ParallelTaskStatus
|
|
8
|
-
* - shared/loop/ - LOOP, Todo, TodoStatus
|
|
9
|
-
* - shared/notification/ - TOAST_DURATION, ToastMessage, ToastVariant
|
|
10
|
-
* - shared/recovery/ - RECOVERY, ErrorContext, RecoveryAction
|
|
11
|
-
* - shared/cache/ - CACHE, CACHE_ACTIONS
|
|
12
|
-
* - shared/session/ - SESSION_EVENTS, EVENT_TYPES
|
|
13
|
-
* - shared/command/ - BackgroundTask, BackgroundTaskStatus
|
|
14
|
-
* - shared/tool/ - TOOL_NAMES, TOOL_OUTPUT
|
|
15
|
-
* - shared/message/ - PART_TYPES, PROMPTS
|
|
16
|
-
* - shared/errors/ - ERROR_PATTERNS, ERROR_TYPE
|
|
17
|
-
* - shared/prompt/ - PROMPT_TAGS, WORK_STATUS
|
|
18
3
|
*/
|
|
19
4
|
export * from "./agent/index.js";
|
|
20
5
|
export * from "./core/index.js";
|
|
@@ -27,6 +12,7 @@ export * from "./session/index.js";
|
|
|
27
12
|
export * from "./command/index.js";
|
|
28
13
|
export * from "./tool/index.js";
|
|
29
14
|
export * from "./message/index.js";
|
|
15
|
+
export * from "./os/index.js";
|
|
30
16
|
export * from "./errors/index.js";
|
|
31
17
|
export * from "./prompt/index.js";
|
|
32
18
|
export { TASK_STATUS, TODO_STATUS } from "../core/agents/consts/task-status.const.js";
|
|
@@ -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,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Config Interface
|
|
3
|
+
*/
|
|
4
|
+
export interface NotificationConfig {
|
|
5
|
+
/** Notification title (default: "OpenCode Orchestrator") */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Notification message (default: "Agent is ready for input") */
|
|
8
|
+
message?: string;
|
|
9
|
+
/** Play sound with notification (default: true) */
|
|
10
|
+
playSound?: boolean;
|
|
11
|
+
/** Custom sound file path */
|
|
12
|
+
soundPath?: string;
|
|
13
|
+
/** Delay in ms before sending notification to confirm session is still idle (default: 1500) */
|
|
14
|
+
idleConfirmationDelay?: number;
|
|
15
|
+
/** Skip notification if there are incomplete todos (default: true) */
|
|
16
|
+
skipIfIncompleteTodos?: boolean;
|
|
17
|
+
/** Maximum number of sessions to track before cleanup (default: 100) */
|
|
18
|
+
maxTrackedSessions?: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
/** Sessions with activity since idle event */
|
|
10
|
+
sessionActivitySinceIdle: Set<string>;
|
|
11
|
+
/** Version tracking for race condition handling */
|
|
12
|
+
notificationVersions: Map<string, number>;
|
|
13
|
+
/** Sessions currently executing notification */
|
|
14
|
+
executingNotifications: Set<string>;
|
|
15
|
+
}
|
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.9.
|
|
5
|
+
"version": "0.9.74",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|