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.
- package/dist/agents/commander.d.ts +6 -0
- package/dist/agents/prompts/commander/agents.d.ts +4 -0
- package/dist/agents/prompts/commander/execution.d.ts +4 -0
- package/dist/agents/prompts/commander/forbidden.d.ts +4 -0
- package/dist/agents/prompts/commander/identity.d.ts +4 -0
- package/dist/agents/prompts/commander/index.d.ts +12 -0
- package/dist/agents/prompts/commander/parallel.d.ts +4 -0
- package/dist/agents/prompts/commander/required.d.ts +4 -0
- package/dist/agents/prompts/commander/role.d.ts +4 -0
- package/dist/agents/prompts/commander/todo-format.d.ts +4 -0
- package/dist/agents/prompts/commander/tools.d.ts +4 -0
- package/dist/agents/prompts/common/anti-hallucination.d.ts +6 -0
- package/dist/agents/prompts/common/environment-discovery.d.ts +6 -0
- package/dist/agents/prompts/common/index.d.ts +11 -0
- package/dist/agents/prompts/common/mission-seal.d.ts +6 -0
- package/dist/agents/prompts/common/shared-workspace.d.ts +6 -0
- package/dist/agents/prompts/common/todo-rules.d.ts +6 -0
- package/dist/agents/prompts/common/verification.d.ts +6 -0
- package/dist/agents/prompts/index.d.ts +11 -0
- package/dist/agents/prompts/planner/forbidden.d.ts +4 -0
- package/dist/agents/prompts/planner/index.d.ts +8 -0
- package/dist/agents/prompts/planner/required.d.ts +4 -0
- package/dist/agents/prompts/planner/research.d.ts +4 -0
- package/dist/agents/prompts/planner/role.d.ts +4 -0
- package/dist/agents/prompts/planner/todo-format.d.ts +4 -0
- package/dist/agents/prompts/reviewer/forbidden.d.ts +4 -0
- package/dist/agents/prompts/reviewer/index.d.ts +9 -0
- package/dist/agents/prompts/reviewer/output.d.ts +4 -0
- package/dist/agents/prompts/reviewer/required.d.ts +4 -0
- package/dist/agents/prompts/reviewer/role.d.ts +4 -0
- package/dist/agents/prompts/reviewer/todo-update.d.ts +4 -0
- package/dist/agents/prompts/reviewer/verification.d.ts +4 -0
- package/dist/agents/prompts/worker/forbidden.d.ts +4 -0
- package/dist/agents/prompts/worker/index.d.ts +8 -0
- package/dist/agents/prompts/worker/quality.d.ts +4 -0
- package/dist/agents/prompts/worker/required.d.ts +4 -0
- package/dist/agents/prompts/worker/role.d.ts +4 -0
- package/dist/agents/prompts/worker/workflow.d.ts +4 -0
- package/dist/agents/subagents/planner.d.ts +8 -0
- package/dist/agents/subagents/reviewer.d.ts +9 -0
- package/dist/agents/subagents/worker.d.ts +8 -0
- package/dist/core/cache/interfaces/cache-document-entry.d.ts +10 -0
- package/dist/core/cache/interfaces/cache-list-entry.d.ts +12 -0
- package/dist/core/cache/interfaces/cache-metadata.d.ts +8 -0
- package/dist/core/cache/interfaces/cache-stats.d.ts +10 -0
- package/dist/core/cache/interfaces/cached-document.d.ts +11 -0
- package/dist/core/cache/interfaces/index.d.ts +8 -0
- package/dist/core/cache/interfaces.d.ts +3 -50
- 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 +5 -32
- package/dist/core/loop/mission-seal-handler.d.ts +3 -0
- package/dist/core/loop/mission-seal.d.ts +3 -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/notification/presets/index.d.ts +9 -0
- package/dist/core/notification/presets/mission.d.ts +5 -0
- package/dist/core/notification/presets/parallel.d.ts +6 -0
- package/dist/core/notification/presets/session.d.ts +6 -0
- package/dist/core/notification/presets/task-lifecycle.d.ts +7 -0
- package/dist/core/notification/presets/tools.d.ts +6 -0
- package/dist/core/notification/presets/warnings.d.ts +7 -0
- package/dist/core/notification/presets.d.ts +5 -22
- package/dist/core/notification/types/index.d.ts +6 -0
- package/dist/core/notification/types/toast-message.d.ts +13 -0
- package/dist/core/notification/types/toast-options.d.ts +10 -0
- package/dist/core/notification/types/toast-variant.d.ts +4 -0
- package/dist/core/notification/types.d.ts +3 -16
- 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 +3 -51
- 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 +24 -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 +3 -60
- 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 +3 -50
- 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 +3 -51
- package/dist/index.js +1005 -773
- package/dist/plugin-handlers/chat-message-handler.d.ts +3 -10
- package/dist/plugin-handlers/event-handler.d.ts +4 -29
- 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 +9 -0
- package/dist/plugin-handlers/interfaces/orchestrator-state.d.ts +14 -0
- package/dist/plugin-handlers/interfaces/session-state.d.ts +10 -0
- package/dist/plugin-handlers/interfaces/tool-execute-context.d.ts +7 -0
- package/dist/plugin-handlers/tool-execute-handler.d.ts +3 -5
- package/dist/shared/agent/definition.d.ts +10 -0
- package/dist/shared/agent/index.d.ts +6 -0
- package/dist/shared/agent/names.d.ts +10 -0
- package/dist/shared/agent.d.ts +2 -21
- package/dist/shared/constants/background-status.d.ts +10 -0
- package/dist/shared/constants/background-task.d.ts +7 -0
- package/dist/shared/constants/cache-actions.d.ts +10 -0
- package/dist/shared/constants/filter-status.d.ts +12 -0
- package/dist/shared/constants/id-prefix.d.ts +8 -0
- package/dist/shared/constants/index.d.ts +28 -0
- package/dist/shared/constants/memory-limits.d.ts +12 -0
- package/dist/shared/constants/mission-seal.d.ts +24 -0
- package/dist/shared/constants/parallel-task.d.ts +13 -0
- package/dist/shared/constants/part-types.d.ts +9 -0
- package/dist/shared/constants/paths.d.ts +14 -0
- package/dist/shared/constants/prompts.d.ts +8 -0
- package/dist/shared/constants/slash-commands.d.ts +10 -0
- package/dist/shared/constants/status.d.ts +15 -0
- package/dist/shared/constants/time.d.ts +8 -0
- package/dist/shared/constants/toast-variants.d.ts +10 -0
- package/dist/shared/constants/tool-names.d.ts +22 -0
- package/dist/shared/constants.d.ts +3 -140
- package/dist/shared/error-patterns.d.ts +3 -35
- package/dist/shared/errors/detection.d.ts +5 -0
- package/dist/shared/errors/index.d.ts +7 -0
- package/dist/shared/errors/patterns.d.ts +14 -0
- package/dist/shared/errors/retry.d.ts +7 -0
- package/dist/tools/background-cmd/list.d.ts +2 -2
- package/dist/utils/common.d.ts +5 -13
- 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.d.ts +0 -4
- package/package.json +1 -1
- package/dist/agents/consolidated/planner.d.ts +0 -8
- package/dist/agents/consolidated/reviewer.d.ts +0 -8
- package/dist/agents/consolidated/worker.d.ts +0 -8
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Toast Presets
|
|
2
|
+
* Toast Presets
|
|
3
|
+
*
|
|
4
|
+
* Re-exports for backward compatibility.
|
|
3
5
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
taskCompleted: (taskId: string, agent: string) => import("./types.js").ToastMessage;
|
|
7
|
-
taskFailed: (taskId: string, error: string) => import("./types.js").ToastMessage;
|
|
8
|
-
allTasksComplete: (count: number) => import("./types.js").ToastMessage;
|
|
9
|
-
sessionCreated: (sessionId: string, agent: string) => import("./types.js").ToastMessage;
|
|
10
|
-
sessionResumed: (sessionId: string, agent: string) => import("./types.js").ToastMessage;
|
|
11
|
-
sessionCompleted: (sessionId: string, duration: string) => import("./types.js").ToastMessage;
|
|
12
|
-
parallelTasksLaunched: (count: number, agents: string[]) => import("./types.js").ToastMessage;
|
|
13
|
-
concurrencyAcquired: (agent: string, slot: string) => import("./types.js").ToastMessage;
|
|
14
|
-
concurrencyReleased: (agent: string) => import("./types.js").ToastMessage;
|
|
15
|
-
missionComplete: (summary: string) => import("./types.js").ToastMessage;
|
|
16
|
-
missionStarted: (description: string) => import("./types.js").ToastMessage;
|
|
17
|
-
toolExecuted: (toolName: string, target: string) => import("./types.js").ToastMessage;
|
|
18
|
-
documentCached: (filename: string) => import("./types.js").ToastMessage;
|
|
19
|
-
researchStarted: (topic: string) => import("./types.js").ToastMessage;
|
|
20
|
-
warningRateLimited: () => import("./types.js").ToastMessage;
|
|
21
|
-
errorRecovery: (action: string) => import("./types.js").ToastMessage;
|
|
22
|
-
warningMaxDepth: (depth: number) => import("./types.js").ToastMessage;
|
|
23
|
-
warningMaxRetries: () => import("./types.js").ToastMessage;
|
|
24
|
-
};
|
|
6
|
+
import * as presetFunctions from "./presets/index.js";
|
|
7
|
+
export declare const presets: typeof presetFunctions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast Message Interface
|
|
3
|
+
*/
|
|
4
|
+
import type { ToastVariant } from "./toast-variant.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
|
+
}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Toast Types
|
|
3
|
+
*
|
|
4
|
+
* Re-exports for backward compatibility.
|
|
3
5
|
*/
|
|
4
|
-
export
|
|
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
|
-
}
|
|
14
|
-
export interface ToastOptions {
|
|
15
|
-
title: string;
|
|
16
|
-
message: string;
|
|
17
|
-
variant?: ToastVariant;
|
|
18
|
-
duration?: number;
|
|
19
|
-
}
|
|
6
|
+
export * from "./types/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Interfaces - Index
|
|
3
|
+
*/
|
|
4
|
+
export type { TodoProgress } from "./todo-progress.js";
|
|
5
|
+
export type { TaskProgress } from "./task-progress.js";
|
|
6
|
+
export type { StepProgress } from "./step-progress.js";
|
|
7
|
+
export type { ProgressSnapshot } from "./progress-snapshot.js";
|
|
8
|
+
export type { SnapshotInput } from "./snapshot-input.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Snapshot Interface
|
|
3
|
+
*/
|
|
4
|
+
import type { TodoProgress } from "./todo-progress.js";
|
|
5
|
+
import type { TaskProgress } from "./task-progress.js";
|
|
6
|
+
import type { StepProgress } from "./step-progress.js";
|
|
7
|
+
export interface ProgressSnapshot {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
timestamp: Date;
|
|
10
|
+
todos: TodoProgress;
|
|
11
|
+
tasks: TaskProgress;
|
|
12
|
+
steps: StepProgress;
|
|
13
|
+
startedAt: Date;
|
|
14
|
+
elapsedMs: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snapshot Input Interface
|
|
3
|
+
*/
|
|
4
|
+
export interface SnapshotInput {
|
|
5
|
+
todoTotal?: number;
|
|
6
|
+
todoCompleted?: number;
|
|
7
|
+
taskTotal?: number;
|
|
8
|
+
taskRunning?: number;
|
|
9
|
+
taskCompleted?: number;
|
|
10
|
+
taskFailed?: number;
|
|
11
|
+
currentStep?: number;
|
|
12
|
+
maxSteps?: number;
|
|
13
|
+
}
|
|
@@ -1,54 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Progress Tracker Interfaces
|
|
3
|
+
*
|
|
4
|
+
* Re-exports for backward compatibility.
|
|
3
5
|
*/
|
|
4
|
-
|
|
5
|
-
* Todo progress data
|
|
6
|
-
*/
|
|
7
|
-
export interface TodoProgress {
|
|
8
|
-
total: number;
|
|
9
|
-
completed: number;
|
|
10
|
-
pending: number;
|
|
11
|
-
percentage: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Task progress data
|
|
15
|
-
*/
|
|
16
|
-
export interface TaskProgress {
|
|
17
|
-
total: number;
|
|
18
|
-
running: number;
|
|
19
|
-
completed: number;
|
|
20
|
-
failed: number;
|
|
21
|
-
percentage: number;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Step progress data
|
|
25
|
-
*/
|
|
26
|
-
export interface StepProgress {
|
|
27
|
-
current: number;
|
|
28
|
-
max: number;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Progress snapshot at a point in time
|
|
32
|
-
*/
|
|
33
|
-
export interface ProgressSnapshot {
|
|
34
|
-
sessionId: string;
|
|
35
|
-
timestamp: Date;
|
|
36
|
-
todos: TodoProgress;
|
|
37
|
-
tasks: TaskProgress;
|
|
38
|
-
steps: StepProgress;
|
|
39
|
-
startedAt: Date;
|
|
40
|
-
elapsedMs: number;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Input data for recording a snapshot
|
|
44
|
-
*/
|
|
45
|
-
export interface SnapshotInput {
|
|
46
|
-
todoTotal?: number;
|
|
47
|
-
todoCompleted?: number;
|
|
48
|
-
taskTotal?: number;
|
|
49
|
-
taskRunning?: number;
|
|
50
|
-
taskCompleted?: number;
|
|
51
|
-
taskFailed?: number;
|
|
52
|
-
currentStep?: number;
|
|
53
|
-
maxSteps?: number;
|
|
54
|
-
}
|
|
6
|
+
export * from "./interfaces/index.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Pattern Interface
|
|
3
|
+
*/
|
|
4
|
+
import type { ErrorContext } from "./error-context.js";
|
|
5
|
+
import type { RecoveryAction } from "./recovery-action.js";
|
|
6
|
+
export interface ErrorPattern {
|
|
7
|
+
pattern: RegExp | string;
|
|
8
|
+
category: string;
|
|
9
|
+
handler: (context: ErrorContext) => RecoveryAction;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery Interfaces - Index
|
|
3
|
+
*/
|
|
4
|
+
export type { RecoveryAction } from "./recovery-action.js";
|
|
5
|
+
export type { ErrorContext } from "./error-context.js";
|
|
6
|
+
export type { ErrorPattern } from "./error-pattern.js";
|
|
7
|
+
export type { RecoveryRecord } from "./recovery-record.js";
|
|
8
|
+
export type { RecoveryStats } from "./recovery-stats.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery Action Type
|
|
3
|
+
*/
|
|
4
|
+
export type RecoveryAction = {
|
|
5
|
+
type: "retry";
|
|
6
|
+
delay: number;
|
|
7
|
+
attempt: number;
|
|
8
|
+
} | {
|
|
9
|
+
type: "skip";
|
|
10
|
+
reason: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "escalate";
|
|
13
|
+
to: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: "resume";
|
|
17
|
+
sessionId: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: "compact";
|
|
20
|
+
reason: string;
|
|
21
|
+
} | {
|
|
22
|
+
type: "abort";
|
|
23
|
+
reason: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovery Record Interface
|
|
3
|
+
*/
|
|
4
|
+
import type { ErrorContext } from "./error-context.js";
|
|
5
|
+
import type { RecoveryAction } from "./recovery-action.js";
|
|
6
|
+
export interface RecoveryRecord {
|
|
7
|
+
context: ErrorContext;
|
|
8
|
+
action: RecoveryAction;
|
|
9
|
+
timestamp: Date;
|
|
10
|
+
}
|
|
@@ -1,63 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto Recovery Interfaces & Types
|
|
3
|
+
*
|
|
4
|
+
* Re-exports for backward compatibility.
|
|
3
5
|
*/
|
|
4
|
-
|
|
5
|
-
* Recovery action types
|
|
6
|
-
*/
|
|
7
|
-
export type RecoveryAction = {
|
|
8
|
-
type: "retry";
|
|
9
|
-
delay: number;
|
|
10
|
-
attempt: number;
|
|
11
|
-
} | {
|
|
12
|
-
type: "skip";
|
|
13
|
-
reason: string;
|
|
14
|
-
} | {
|
|
15
|
-
type: "escalate";
|
|
16
|
-
to: string;
|
|
17
|
-
reason: string;
|
|
18
|
-
} | {
|
|
19
|
-
type: "resume";
|
|
20
|
-
sessionId: string;
|
|
21
|
-
} | {
|
|
22
|
-
type: "compact";
|
|
23
|
-
reason: string;
|
|
24
|
-
} | {
|
|
25
|
-
type: "abort";
|
|
26
|
-
reason: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Error context for recovery
|
|
30
|
-
*/
|
|
31
|
-
export interface ErrorContext {
|
|
32
|
-
sessionId: string;
|
|
33
|
-
taskId?: string;
|
|
34
|
-
agent?: string;
|
|
35
|
-
error: Error;
|
|
36
|
-
attempt: number;
|
|
37
|
-
timestamp: Date;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Error pattern definition
|
|
41
|
-
*/
|
|
42
|
-
export interface ErrorPattern {
|
|
43
|
-
pattern: RegExp | string;
|
|
44
|
-
category: string;
|
|
45
|
-
handler: (context: ErrorContext) => RecoveryAction;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Recovery history entry
|
|
49
|
-
*/
|
|
50
|
-
export interface RecoveryRecord {
|
|
51
|
-
context: ErrorContext;
|
|
52
|
-
action: RecoveryAction;
|
|
53
|
-
timestamp: Date;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Recovery statistics
|
|
57
|
-
*/
|
|
58
|
-
export interface RecoveryStats {
|
|
59
|
-
totalRecoveries: number;
|
|
60
|
-
byCategory: Record<string, number>;
|
|
61
|
-
byAction: Record<string, number>;
|
|
62
|
-
successRate: number;
|
|
63
|
-
}
|
|
6
|
+
export * from "./interfaces/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Interfaces - Index
|
|
3
|
+
*/
|
|
4
|
+
export type { SharedDocument } from "./shared-document.js";
|
|
5
|
+
export type { SharedFinding } from "./shared-finding.js";
|
|
6
|
+
export type { SharedDecision } from "./shared-decision.js";
|
|
7
|
+
export type { SharedContext } from "./shared-context.js";
|
|
8
|
+
export type { ContextStats } from "./context-stats.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Context Interface
|
|
3
|
+
*/
|
|
4
|
+
import type { SharedDocument } from "./shared-document.js";
|
|
5
|
+
import type { SharedFinding } from "./shared-finding.js";
|
|
6
|
+
import type { SharedDecision } from "./shared-decision.js";
|
|
7
|
+
export interface SharedContext {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
parentId?: string;
|
|
10
|
+
documents: Map<string, SharedDocument>;
|
|
11
|
+
findings: SharedFinding[];
|
|
12
|
+
decisions: Map<string, SharedDecision>;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
|
@@ -1,53 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared Context Interfaces
|
|
3
|
+
*
|
|
4
|
+
* Re-exports for backward compatibility.
|
|
3
5
|
*/
|
|
4
|
-
|
|
5
|
-
* Cached document reference
|
|
6
|
-
*/
|
|
7
|
-
export interface SharedDocument {
|
|
8
|
-
url: string;
|
|
9
|
-
filename: string;
|
|
10
|
-
title: string;
|
|
11
|
-
cachedAt: Date;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Research finding
|
|
15
|
-
*/
|
|
16
|
-
export interface SharedFinding {
|
|
17
|
-
id: string;
|
|
18
|
-
content: string;
|
|
19
|
-
source: string;
|
|
20
|
-
timestamp: Date;
|
|
21
|
-
category: "pattern" | "api" | "config" | "warning" | "decision";
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Decision record
|
|
25
|
-
*/
|
|
26
|
-
export interface SharedDecision {
|
|
27
|
-
id: string;
|
|
28
|
-
question: string;
|
|
29
|
-
answer: string;
|
|
30
|
-
rationale: string;
|
|
31
|
-
decidedAt: Date;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Complete shared context
|
|
35
|
-
*/
|
|
36
|
-
export interface SharedContext {
|
|
37
|
-
sessionId: string;
|
|
38
|
-
parentId?: string;
|
|
39
|
-
documents: Map<string, SharedDocument>;
|
|
40
|
-
findings: SharedFinding[];
|
|
41
|
-
decisions: Map<string, SharedDecision>;
|
|
42
|
-
createdAt: Date;
|
|
43
|
-
updatedAt: Date;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Context statistics
|
|
47
|
-
*/
|
|
48
|
-
export interface ContextStats {
|
|
49
|
-
totalContexts: number;
|
|
50
|
-
totalDocuments: number;
|
|
51
|
-
totalFindings: number;
|
|
52
|
-
totalDecisions: number;
|
|
53
|
-
}
|
|
6
|
+
export * from "./interfaces/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Interfaces - Index
|
|
3
|
+
*/
|
|
4
|
+
export type { TaskNode, TaskStatus } from "./task-node.js";
|
|
5
|
+
export type { TaskHierarchy } from "./task-hierarchy.js";
|
|
6
|
+
export type { TaskProgress } from "./task-progress.js";
|
|
7
|
+
export type { TaskInput } from "./task-input.js";
|
|
8
|
+
export { TASK_STATUS } from "../../../shared/constants.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Node Interface
|
|
3
|
+
*/
|
|
4
|
+
import type { ParallelTaskStatus } from "../../../shared/constants.js";
|
|
5
|
+
export type TaskStatus = ParallelTaskStatus;
|
|
6
|
+
export interface TaskNode {
|
|
7
|
+
id: string;
|
|
8
|
+
description: string;
|
|
9
|
+
level: number;
|
|
10
|
+
parent?: string;
|
|
11
|
+
children: string[];
|
|
12
|
+
status: TaskStatus;
|
|
13
|
+
agent?: string;
|
|
14
|
+
parallelGroup?: string;
|
|
15
|
+
dependsOn: string[];
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
startedAt?: Date;
|
|
18
|
+
completedAt?: Date;
|
|
19
|
+
result?: string;
|
|
20
|
+
}
|
|
@@ -1,54 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Task Decomposer Interfaces
|
|
3
|
+
*
|
|
4
|
+
* Re-exports for backward compatibility.
|
|
3
5
|
*/
|
|
4
|
-
|
|
5
|
-
export { TASK_STATUS };
|
|
6
|
-
export type TaskStatus = ParallelTaskStatus;
|
|
7
|
-
/**
|
|
8
|
-
* Single task node
|
|
9
|
-
*/
|
|
10
|
-
export interface TaskNode {
|
|
11
|
-
id: string;
|
|
12
|
-
description: string;
|
|
13
|
-
level: number;
|
|
14
|
-
parent?: string;
|
|
15
|
-
children: string[];
|
|
16
|
-
status: TaskStatus;
|
|
17
|
-
agent?: string;
|
|
18
|
-
parallelGroup?: string;
|
|
19
|
-
dependsOn: string[];
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
startedAt?: Date;
|
|
22
|
-
completedAt?: Date;
|
|
23
|
-
result?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Complete task hierarchy
|
|
27
|
-
*/
|
|
28
|
-
export interface TaskHierarchy {
|
|
29
|
-
rootId: string;
|
|
30
|
-
nodes: Map<string, TaskNode>;
|
|
31
|
-
parallelGroups: Map<string, string[]>;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Task progress statistics
|
|
35
|
-
*/
|
|
36
|
-
export interface TaskProgress {
|
|
37
|
-
total: number;
|
|
38
|
-
pending: number;
|
|
39
|
-
running: number;
|
|
40
|
-
completed: number;
|
|
41
|
-
failed: number;
|
|
42
|
-
percentage: number;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Task creation input
|
|
46
|
-
*/
|
|
47
|
-
export interface TaskInput {
|
|
48
|
-
description: string;
|
|
49
|
-
level: number;
|
|
50
|
-
parentId?: string;
|
|
51
|
-
agent?: string;
|
|
52
|
-
parallelGroup?: string;
|
|
53
|
-
dependsOn?: string[];
|
|
54
|
-
}
|
|
6
|
+
export * from "./interfaces/index.js";
|