@elizaos/plugin-agent-orchestrator 2.0.3-beta.2 → 2.0.3-beta.4
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/cjs/index.d.ts +2 -0
- package/dist/cjs/index.node.cjs +20962 -0
- package/dist/cjs/index.node.js.map +82 -0
- package/dist/index.d.ts +2 -0
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.node.d.ts +4 -0
- package/dist/node/index.node.d.ts.map +1 -0
- package/dist/node/index.node.js +20946 -0
- package/dist/node/index.node.js.map +82 -0
- package/dist/node/src/actions/common.d.ts +114 -0
- package/dist/node/src/actions/common.d.ts.map +1 -0
- package/dist/node/src/actions/elizaos-capability.d.ts +3 -0
- package/dist/node/src/actions/elizaos-capability.d.ts.map +1 -0
- package/dist/node/src/actions/sandbox-stub.d.ts +25 -0
- package/dist/node/src/actions/sandbox-stub.d.ts.map +1 -0
- package/dist/node/src/actions/tasks.d.ts +108 -0
- package/dist/node/src/actions/tasks.d.ts.map +1 -0
- package/dist/node/src/api/agent-routes.d.ts +18 -0
- package/dist/node/src/api/agent-routes.d.ts.map +1 -0
- package/dist/node/src/api/bridge-routes.d.ts +70 -0
- package/dist/node/src/api/bridge-routes.d.ts.map +1 -0
- package/dist/node/src/api/credential-prompt.d.ts +38 -0
- package/dist/node/src/api/credential-prompt.d.ts.map +1 -0
- package/dist/node/src/api/issue-routes.d.ts +17 -0
- package/dist/node/src/api/issue-routes.d.ts.map +1 -0
- package/dist/node/src/api/orchestrator-routes.d.ts +25 -0
- package/dist/node/src/api/orchestrator-routes.d.ts.map +1 -0
- package/dist/node/src/api/parent-context-routes.d.ts +17 -0
- package/dist/node/src/api/parent-context-routes.d.ts.map +1 -0
- package/dist/node/src/api/route-utils.d.ts +34 -0
- package/dist/node/src/api/route-utils.d.ts.map +1 -0
- package/dist/node/src/api/routes.d.ts +22 -0
- package/dist/node/src/api/routes.d.ts.map +1 -0
- package/dist/node/src/api/workspace-routes.d.ts +17 -0
- package/dist/node/src/api/workspace-routes.d.ts.map +1 -0
- package/dist/node/src/evaluators/sub-agent-completion.d.ts +3 -0
- package/dist/node/src/evaluators/sub-agent-completion.d.ts.map +1 -0
- package/dist/node/src/index.d.ts +57 -0
- package/dist/node/src/index.d.ts.map +1 -0
- package/dist/node/src/providers/action-examples.d.ts +14 -0
- package/dist/node/src/providers/action-examples.d.ts.map +1 -0
- package/dist/node/src/providers/active-sub-agents.d.ts +15 -0
- package/dist/node/src/providers/active-sub-agents.d.ts.map +1 -0
- package/dist/node/src/providers/active-workspace-context.d.ts +13 -0
- package/dist/node/src/providers/active-workspace-context.d.ts.map +1 -0
- package/dist/node/src/providers/available-agents.d.ts +4 -0
- package/dist/node/src/providers/available-agents.d.ts.map +1 -0
- package/dist/node/src/providers/coding-session-changes.d.ts +17 -0
- package/dist/node/src/providers/coding-session-changes.d.ts.map +1 -0
- package/dist/node/src/register-routes.d.ts +31 -0
- package/dist/node/src/register-routes.d.ts.map +1 -0
- package/dist/node/src/services/acceptance-criteria.d.ts +84 -0
- package/dist/node/src/services/acceptance-criteria.d.ts.map +1 -0
- package/dist/node/src/services/acp-native-transport.d.ts +111 -0
- package/dist/node/src/services/acp-native-transport.d.ts.map +1 -0
- package/dist/node/src/services/acp-service.d.ts +226 -0
- package/dist/node/src/services/acp-service.d.ts.map +1 -0
- package/dist/node/src/services/active-session-forward.d.ts +31 -0
- package/dist/node/src/services/active-session-forward.d.ts.map +1 -0
- package/dist/node/src/services/agent-name-assignment.d.ts +50 -0
- package/dist/node/src/services/agent-name-assignment.d.ts.map +1 -0
- package/dist/node/src/services/ansi-utils.d.ts +64 -0
- package/dist/node/src/services/ansi-utils.d.ts.map +1 -0
- package/dist/node/src/services/app-deploy-guidance.d.ts +52 -0
- package/dist/node/src/services/app-deploy-guidance.d.ts.map +1 -0
- package/dist/node/src/services/audit.d.ts +18 -0
- package/dist/node/src/services/audit.d.ts.map +1 -0
- package/dist/node/src/services/coding-account-selection.d.ts +79 -0
- package/dist/node/src/services/coding-account-selection.d.ts.map +1 -0
- package/dist/node/src/services/completion-envelope.d.ts +63 -0
- package/dist/node/src/services/completion-envelope.d.ts.map +1 -0
- package/dist/node/src/services/completion-evidence.d.ts +144 -0
- package/dist/node/src/services/completion-evidence.d.ts.map +1 -0
- package/dist/node/src/services/config-env.d.ts +27 -0
- package/dist/node/src/services/config-env.d.ts.map +1 -0
- package/dist/node/src/services/goal-contract.d.ts +25 -0
- package/dist/node/src/services/goal-contract.d.ts.map +1 -0
- package/dist/node/src/services/goal-llm-verifier.d.ts +157 -0
- package/dist/node/src/services/goal-llm-verifier.d.ts.map +1 -0
- package/dist/node/src/services/goal-prompt.d.ts +82 -0
- package/dist/node/src/services/goal-prompt.d.ts.map +1 -0
- package/dist/node/src/services/independent-verifier.d.ts +58 -0
- package/dist/node/src/services/independent-verifier.d.ts.map +1 -0
- package/dist/node/src/services/interruption-decider.d.ts +43 -0
- package/dist/node/src/services/interruption-decider.d.ts.map +1 -0
- package/dist/node/src/services/json-model-output.d.ts +2 -0
- package/dist/node/src/services/json-model-output.d.ts.map +1 -0
- package/dist/node/src/services/opencode-config.d.ts +21 -0
- package/dist/node/src/services/opencode-config.d.ts.map +1 -0
- package/dist/node/src/services/orchestrator-device-support-matrix.d.ts +46 -0
- package/dist/node/src/services/orchestrator-device-support-matrix.d.ts.map +1 -0
- package/dist/node/src/services/orchestrator-task-mapper.d.ts +192 -0
- package/dist/node/src/services/orchestrator-task-mapper.d.ts.map +1 -0
- package/dist/node/src/services/orchestrator-task-service.d.ts +370 -0
- package/dist/node/src/services/orchestrator-task-service.d.ts.map +1 -0
- package/dist/node/src/services/orchestrator-task-store.d.ts +156 -0
- package/dist/node/src/services/orchestrator-task-store.d.ts.map +1 -0
- package/dist/node/src/services/orchestrator-task-types.d.ts +334 -0
- package/dist/node/src/services/orchestrator-task-types.d.ts.map +1 -0
- package/dist/node/src/services/parent-agent-broker.d.ts +23 -0
- package/dist/node/src/services/parent-agent-broker.d.ts.map +1 -0
- package/dist/node/src/services/parent-agent-dispatch.d.ts +62 -0
- package/dist/node/src/services/parent-agent-dispatch.d.ts.map +1 -0
- package/dist/node/src/services/repo-input.d.ts +16 -0
- package/dist/node/src/services/repo-input.d.ts.map +1 -0
- package/dist/node/src/services/screenshot-delivery.d.ts +38 -0
- package/dist/node/src/services/screenshot-delivery.d.ts.map +1 -0
- package/dist/node/src/services/session-event-queue.d.ts +18 -0
- package/dist/node/src/services/session-event-queue.d.ts.map +1 -0
- package/dist/node/src/services/session-store.d.ts +108 -0
- package/dist/node/src/services/session-store.d.ts.map +1 -0
- package/dist/node/src/services/skill-lifeops-context-broker.d.ts +20 -0
- package/dist/node/src/services/skill-lifeops-context-broker.d.ts.map +1 -0
- package/dist/node/src/services/skill-manifest.d.ts +48 -0
- package/dist/node/src/services/skill-manifest.d.ts.map +1 -0
- package/dist/node/src/services/skill-recommender.d.ts +53 -0
- package/dist/node/src/services/skill-recommender.d.ts.map +1 -0
- package/dist/node/src/services/smithers-task-executor.d.ts +73 -0
- package/dist/node/src/services/smithers-task-executor.d.ts.map +1 -0
- package/dist/node/src/services/smithers-task-integration.d.ts +52 -0
- package/dist/node/src/services/smithers-task-integration.d.ts.map +1 -0
- package/dist/node/src/services/smithers-task-runner.d.ts +27 -0
- package/dist/node/src/services/smithers-task-runner.d.ts.map +1 -0
- package/dist/node/src/services/smithers-task-types.d.ts +96 -0
- package/dist/node/src/services/smithers-task-types.d.ts.map +1 -0
- package/dist/node/src/services/spawn-trajectory.d.ts +23 -0
- package/dist/node/src/services/spawn-trajectory.d.ts.map +1 -0
- package/dist/node/src/services/spend-allowance.d.ts +143 -0
- package/dist/node/src/services/spend-allowance.d.ts.map +1 -0
- package/dist/node/src/services/ssrf-guard.d.ts +66 -0
- package/dist/node/src/services/ssrf-guard.d.ts.map +1 -0
- package/dist/node/src/services/sub-agent-identity.d.ts +27 -0
- package/dist/node/src/services/sub-agent-identity.d.ts.map +1 -0
- package/dist/node/src/services/sub-agent-inbox.d.ts +26 -0
- package/dist/node/src/services/sub-agent-inbox.d.ts.map +1 -0
- package/dist/node/src/services/sub-agent-router.d.ts +178 -0
- package/dist/node/src/services/sub-agent-router.d.ts.map +1 -0
- package/dist/node/src/services/task-agent-frameworks.d.ts +103 -0
- package/dist/node/src/services/task-agent-frameworks.d.ts.map +1 -0
- package/dist/node/src/services/task-agent-routing.d.ts +33 -0
- package/dist/node/src/services/task-agent-routing.d.ts.map +1 -0
- package/dist/node/src/services/task-policy.d.ts +17 -0
- package/dist/node/src/services/task-policy.d.ts.map +1 -0
- package/dist/node/src/services/task-supervisor-service.d.ts +65 -0
- package/dist/node/src/services/task-supervisor-service.d.ts.map +1 -0
- package/dist/node/src/services/task-watchdog-service.d.ts +50 -0
- package/dist/node/src/services/task-watchdog-service.d.ts.map +1 -0
- package/dist/node/src/services/terminal-capabilities.d.ts +48 -0
- package/dist/node/src/services/terminal-capabilities.d.ts.map +1 -0
- package/dist/node/src/services/trajectory-context.d.ts +69 -0
- package/dist/node/src/services/trajectory-context.d.ts.map +1 -0
- package/dist/node/src/services/trajectory-feedback.d.ts +53 -0
- package/dist/node/src/services/trajectory-feedback.d.ts.map +1 -0
- package/dist/node/src/services/types.d.ts +188 -0
- package/dist/node/src/services/types.d.ts.map +1 -0
- package/dist/node/src/services/view-deploy-guidance.d.ts +14 -0
- package/dist/node/src/services/view-deploy-guidance.d.ts.map +1 -0
- package/dist/node/src/services/workdir-validation.d.ts +10 -0
- package/dist/node/src/services/workdir-validation.d.ts.map +1 -0
- package/dist/node/src/services/workspace-diff.d.ts +50 -0
- package/dist/node/src/services/workspace-diff.d.ts.map +1 -0
- package/dist/node/src/services/workspace-git-ops.d.ts +28 -0
- package/dist/node/src/services/workspace-git-ops.d.ts.map +1 -0
- package/dist/node/src/services/workspace-github.d.ts +60 -0
- package/dist/node/src/services/workspace-github.d.ts.map +1 -0
- package/dist/node/src/services/workspace-lifecycle.d.ts +5 -0
- package/dist/node/src/services/workspace-lifecycle.d.ts.map +1 -0
- package/dist/node/src/services/workspace-service.d.ts +126 -0
- package/dist/node/src/services/workspace-service.d.ts.map +1 -0
- package/dist/node/src/services/workspace-types.d.ts +81 -0
- package/dist/node/src/services/workspace-types.d.ts.map +1 -0
- package/dist/node/src/setup-routes.d.ts +9 -0
- package/dist/node/src/setup-routes.d.ts.map +1 -0
- package/docs/multi-account-orchestration.md +1 -1
- package/package.json +7 -4
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrator task service.
|
|
3
|
+
*
|
|
4
|
+
* Bridges ephemeral ACP sub-agent sessions to the durable
|
|
5
|
+
* {@link OrchestratorTaskStore} and owns the task lifecycle the
|
|
6
|
+
* `/api/orchestrator/*` routes expose. Two responsibilities:
|
|
7
|
+
*
|
|
8
|
+
* 1. **Event bridge.** Subscribes to {@link AcpService} session events and
|
|
9
|
+
* records them against the owning task — status, tool activity, messages,
|
|
10
|
+
* token usage. A sub-agent's `task_complete` moves the task to `validating`,
|
|
11
|
+
* never straight to `done`; promotion to `done` requires an explicit
|
|
12
|
+
* {@link OrchestratorTaskService.validateTask} call.
|
|
13
|
+
* 2. **Lifecycle API.** Create / list / inspect / update / pause / resume /
|
|
14
|
+
* archive / reopen / delete / fork tasks, spawn and steer sub-agents through
|
|
15
|
+
* the mandatory goal wrapper, and aggregate cross-task status.
|
|
16
|
+
*
|
|
17
|
+
* @module services/orchestrator-task-service
|
|
18
|
+
*/
|
|
19
|
+
import { type IAgentRuntime, Service } from "@elizaos/core";
|
|
20
|
+
import { type GoalFollowUpReason } from "./goal-prompt.js";
|
|
21
|
+
import { type TaskEventDto, type TaskMessageDto, type TaskPlanRevisionDto, type TaskThreadDetailDto, type TaskThreadDto, type TaskTimelineItemDto } from "./orchestrator-task-mapper.js";
|
|
22
|
+
import { OrchestratorTaskStore } from "./orchestrator-task-store.js";
|
|
23
|
+
import { type CreateTaskInput, type OrchestratorAccountOverview, type OrchestratorRoomRosterOverview, type OrchestratorTaskRecord, type OrchestratorTaskStatus, type TaskListFilter, type TaskMessageDirection, type TaskMessageSenderKind, type TaskUsageSummary } from "./orchestrator-task-types.js";
|
|
24
|
+
import type { ApprovalPreset } from "./types.js";
|
|
25
|
+
/**
|
|
26
|
+
* Recoverable operator-recovery conflict.
|
|
27
|
+
*
|
|
28
|
+
* Thrown by the recovery methods (createPlanRevision / retry / rerun / restart)
|
|
29
|
+
* when the requested recovery cannot proceed against the current task state
|
|
30
|
+
* (missing plan revision, missing source message/event, no/terminal session,
|
|
31
|
+
* unsupported destructive rerun). The orchestrator recovery routes map this
|
|
32
|
+
* class to HTTP 409, so the status code is decoupled from the message wording —
|
|
33
|
+
* callers must not regex-match the message to derive the status.
|
|
34
|
+
*/
|
|
35
|
+
export declare class RecoveryConflictError extends Error {
|
|
36
|
+
constructor(message: string);
|
|
37
|
+
}
|
|
38
|
+
type RuntimeLike = IAgentRuntime & {
|
|
39
|
+
logger?: Partial<Record<"debug" | "info" | "warn" | "error", (message: string, data?: unknown) => void>>;
|
|
40
|
+
databaseAdapter?: unknown;
|
|
41
|
+
getSetting?: (key: string) => string | undefined | null;
|
|
42
|
+
};
|
|
43
|
+
export interface SpawnAgentForTaskOptions {
|
|
44
|
+
framework?: string;
|
|
45
|
+
providerSource?: string;
|
|
46
|
+
model?: string;
|
|
47
|
+
workdir?: string;
|
|
48
|
+
repo?: string;
|
|
49
|
+
label?: string;
|
|
50
|
+
/** Concrete first instruction; defaults to the task goal. */
|
|
51
|
+
task?: string;
|
|
52
|
+
approvalPreset?: ApprovalPreset;
|
|
53
|
+
/**
|
|
54
|
+
* Recursion depth for nested spawns. 0 (default) = spawned by the main agent;
|
|
55
|
+
* a sub-agent spawning its own child passes parentDepth + 1. Enforced against
|
|
56
|
+
* the max-nesting-depth cap so self-spawning can't run away.
|
|
57
|
+
*/
|
|
58
|
+
nestingDepth?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface AddMessageInput {
|
|
61
|
+
content: string;
|
|
62
|
+
senderKind: TaskMessageSenderKind;
|
|
63
|
+
sessionId?: string;
|
|
64
|
+
direction?: TaskMessageDirection;
|
|
65
|
+
metadata?: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
export interface RetryTaskTurnInput {
|
|
68
|
+
messageId?: string;
|
|
69
|
+
sessionId?: string;
|
|
70
|
+
instruction?: string;
|
|
71
|
+
planRevisionId?: string;
|
|
72
|
+
mode?: "same-session" | "new-session";
|
|
73
|
+
agent?: SpawnAgentForTaskOptions;
|
|
74
|
+
}
|
|
75
|
+
export interface RerunFromEventInput {
|
|
76
|
+
eventId: string;
|
|
77
|
+
instruction?: string;
|
|
78
|
+
planRevisionId?: string;
|
|
79
|
+
stopActive?: boolean;
|
|
80
|
+
preserveHistory?: boolean;
|
|
81
|
+
agent?: SpawnAgentForTaskOptions;
|
|
82
|
+
}
|
|
83
|
+
export interface RestartTaskInput {
|
|
84
|
+
instruction?: string;
|
|
85
|
+
planRevisionId?: string;
|
|
86
|
+
stopActive?: boolean;
|
|
87
|
+
agent?: SpawnAgentForTaskOptions;
|
|
88
|
+
}
|
|
89
|
+
export interface CreatePlanRevisionInput {
|
|
90
|
+
plan: Record<string, unknown>;
|
|
91
|
+
basePlanRevisionId?: string;
|
|
92
|
+
editSummary?: string;
|
|
93
|
+
createdBy?: string;
|
|
94
|
+
metadata?: Record<string, unknown>;
|
|
95
|
+
makeCurrent?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface RestartWithEditedPlanInput extends RestartTaskInput {
|
|
98
|
+
plan: Record<string, unknown>;
|
|
99
|
+
basePlanRevisionId?: string;
|
|
100
|
+
editSummary?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface PageResult<T> {
|
|
103
|
+
items: T[];
|
|
104
|
+
nextCursor: string | null;
|
|
105
|
+
}
|
|
106
|
+
export interface OrchestratorStatus {
|
|
107
|
+
taskCount: number;
|
|
108
|
+
activeTaskCount: number;
|
|
109
|
+
pausedTaskCount: number;
|
|
110
|
+
blockedTaskCount: number;
|
|
111
|
+
validatingTaskCount: number;
|
|
112
|
+
sessionCount: number;
|
|
113
|
+
activeSessionCount: number;
|
|
114
|
+
usage: TaskUsageSummary;
|
|
115
|
+
byStatus: Record<OrchestratorTaskStatus, number>;
|
|
116
|
+
}
|
|
117
|
+
export declare class OrchestratorTaskService extends Service {
|
|
118
|
+
static serviceType: string;
|
|
119
|
+
capabilityDescription: string;
|
|
120
|
+
protected readonly runtime: RuntimeLike;
|
|
121
|
+
private readonly store;
|
|
122
|
+
private readonly sessionTaskIndex;
|
|
123
|
+
private readonly autoVerifyInFlight;
|
|
124
|
+
private unsubscribe;
|
|
125
|
+
private started;
|
|
126
|
+
constructor(runtime: IAgentRuntime, opts?: {
|
|
127
|
+
store?: OrchestratorTaskStore;
|
|
128
|
+
});
|
|
129
|
+
static start(runtime: IAgentRuntime): Promise<OrchestratorTaskService>;
|
|
130
|
+
start(): Promise<void>;
|
|
131
|
+
private subscribeToAcp;
|
|
132
|
+
private bindToAcpWhenReady;
|
|
133
|
+
stop(): Promise<void>;
|
|
134
|
+
private readonly changeListeners;
|
|
135
|
+
/** Subscribe to change pings for a task. Returns an unsubscribe function. */
|
|
136
|
+
subscribeTaskChanges(taskId: string, listener: () => void): () => void;
|
|
137
|
+
private emitChange;
|
|
138
|
+
private onSessionEvent;
|
|
139
|
+
private applySessionEvent;
|
|
140
|
+
/**
|
|
141
|
+
* Mirror the real git change set a sub-agent produced into the durable task
|
|
142
|
+
* store session record's metadata, so the existing `/api/orchestrator/tasks/:id`
|
|
143
|
+
* detail route serves it (`TaskSessionDto.metadata.lastChangeSet`) and the
|
|
144
|
+
* task view can render a read-only diff without a new endpoint.
|
|
145
|
+
*
|
|
146
|
+
* Source of truth is the change set the router captured onto the LIVE ACP
|
|
147
|
+
* session metadata at `task_complete`. Because the router's capture and this
|
|
148
|
+
* event-bridge handler run on the same ACP event with no guaranteed ordering,
|
|
149
|
+
* fall back to capturing it here from the same session-scoped signals (spawn
|
|
150
|
+
* baseline + agent-written tool paths) when the ACP write hasn't landed yet.
|
|
151
|
+
*
|
|
152
|
+
* Additive and null-safe: when there is no change set (unchanged completion,
|
|
153
|
+
* non-git workdir), nothing is written and the DTO simply omits it.
|
|
154
|
+
*/
|
|
155
|
+
private mirrorChangeSetToStore;
|
|
156
|
+
/**
|
|
157
|
+
* Assemble the rich, sectioned completion-evidence string the auto
|
|
158
|
+
* goal-verifier grills against, from data the orchestrator already has —
|
|
159
|
+
* instead of feeding it only the thin `task_complete` event summary.
|
|
160
|
+
*
|
|
161
|
+
* Sections (each omitted when absent):
|
|
162
|
+
* - **CHANGESET** — the real git diff captured at completion (the same
|
|
163
|
+
* {@link WorkspaceChangeSet} the CODING_SESSION_CHANGES provider renders),
|
|
164
|
+
* read from the live ACP session or, failing that, the mirrored store
|
|
165
|
+
* session metadata;
|
|
166
|
+
* - **DELIVERABLE / FINAL REPLY** — the sub-agent's completion summary
|
|
167
|
+
* (its reported result) and any longer captured `sub_agent` reply recorded
|
|
168
|
+
* in the task room;
|
|
169
|
+
* - **VERIFIED URLS** — reachable URLs mined from the completion summary and
|
|
170
|
+
* recorded sub-agent messages (loopback-flagged so the verifier can reject
|
|
171
|
+
* localhost-only "deploys");
|
|
172
|
+
* - **TEST / BUILD / TYPECHECK OUTPUT** — lines that look like build/test
|
|
173
|
+
* output, mined from the durable event/message log of this session;
|
|
174
|
+
* - **ARTIFACTS** — screenshot/trajectory artifact references on the task or
|
|
175
|
+
* its session metadata.
|
|
176
|
+
*
|
|
177
|
+
* Fire-and-forget safety: this runs on the `task_complete` event-write path,
|
|
178
|
+
* so it must NEVER throw. Any failure falls back to the bare summary, which is
|
|
179
|
+
* exactly the prior behavior.
|
|
180
|
+
*/
|
|
181
|
+
private buildCompletionEvidence;
|
|
182
|
+
/**
|
|
183
|
+
* Assemble the TYPED {@link CompletionEvidenceBundle} from data the
|
|
184
|
+
* orchestrator already has (issue #8894). Each field resolves from a named
|
|
185
|
+
* source:
|
|
186
|
+
* - `summary` — the `task_complete` response (fallback);
|
|
187
|
+
* - `diffSummary` — the real git change set captured at completion, via the
|
|
188
|
+
* same {@link readLastChangeSet} mechanism the CODING_SESSION_CHANGES path
|
|
189
|
+
* and `mirrorChangeSetToStore` use, rendered with {@link renderChangeSetBody};
|
|
190
|
+
* - `toolOutput` — test/build/lint stdout mined from recorded `tool_running`
|
|
191
|
+
* events (and sub-agent messages) and classified by {@link classifyToolOutput};
|
|
192
|
+
* - `verifiedUrls` — URLs probed at completion (session/task `subAgentVerifiedUrls`
|
|
193
|
+
* metadata plus URLs mined from the summary and sub-agent replies);
|
|
194
|
+
* - `screenshots` — screenshot artifact paths on the task/session.
|
|
195
|
+
*
|
|
196
|
+
* Pure with respect to throwing: returns at least the summary on any error.
|
|
197
|
+
*/
|
|
198
|
+
private collectEvidenceBundle;
|
|
199
|
+
/** Build per-tool evidence signals from recorded `tool_running`/`tool_result`
|
|
200
|
+
* events: the signal text is the tool's captured stdout, and the source label
|
|
201
|
+
* carries the command/title so {@link classifyToolOutput} can class it. */
|
|
202
|
+
private extractToolSignals;
|
|
203
|
+
/** URLs the router stamped as verified onto the task or session metadata
|
|
204
|
+
* (`subAgentVerifiedUrls`), separate from URLs mined out of free text. */
|
|
205
|
+
private metadataVerifiedUrls;
|
|
206
|
+
/**
|
|
207
|
+
* Write the completion-evidence bundle as a single appended JSONL line and
|
|
208
|
+
* record the artifact path on a task event so a reviewer can re-read exactly
|
|
209
|
+
* what the verifier judged.
|
|
210
|
+
*
|
|
211
|
+
* Fire-and-forget: invoked with `void` from {@link buildCompletionEvidence},
|
|
212
|
+
* so every IO step is wrapped — a failure logs and continues without throwing
|
|
213
|
+
* into the `task_complete` event path. The path is already stamped on the
|
|
214
|
+
* bundle by the caller, so a write failure only means the artifact never lands;
|
|
215
|
+
* the evidence string still cites the (intended) path.
|
|
216
|
+
*/
|
|
217
|
+
private writeEvidenceTrajectory;
|
|
218
|
+
/** The completion-evidence trajectory file path: a `completion-evidence.jsonl`
|
|
219
|
+
* under the live session workdir's `.eliza/trajectories`, else a `~/.eliza`-
|
|
220
|
+
* scoped per-task dir when no workspace is available. Deterministic so it can
|
|
221
|
+
* be cited in the evidence before the file is actually written. */
|
|
222
|
+
private resolveTrajectoryPath;
|
|
223
|
+
/** The git change set for a completed session: prefer the live ACP session
|
|
224
|
+
* metadata (freshest), fall back to the mirrored store-session metadata. */
|
|
225
|
+
private resolveCompletionChangeSet;
|
|
226
|
+
/** Screenshot / trajectory / other artifact references for the verifier to
|
|
227
|
+
* cite, from the durable artifact rows plus any artifact paths stamped on
|
|
228
|
+
* the task or its session metadata. */
|
|
229
|
+
private collectArtifactRefs;
|
|
230
|
+
/**
|
|
231
|
+
* Advance a non-terminal task to `next`, but never override a status the
|
|
232
|
+
* operator or validation owns. `validating`/`waiting_on_user`/`blocked` are
|
|
233
|
+
* not stomped by a later `active`, and terminal tasks are immutable here.
|
|
234
|
+
*/
|
|
235
|
+
private advanceTaskStatus;
|
|
236
|
+
private markSessionAccountUnhealthy;
|
|
237
|
+
private recordUsage;
|
|
238
|
+
private recordMessage;
|
|
239
|
+
private resolveTaskId;
|
|
240
|
+
createTask(input: CreateTaskInput): Promise<TaskThreadDetailDto>;
|
|
241
|
+
/**
|
|
242
|
+
* When a task is created WITHOUT acceptance criteria and with a non-trivial
|
|
243
|
+
* goal, populate 3-5 measurable default criteria so the auto goal-verifier
|
|
244
|
+
* (#8896) always has something to grill against instead of fast-pathing to
|
|
245
|
+
* pass / parking forever in `validating`.
|
|
246
|
+
*
|
|
247
|
+
* - **No-op when criteria were supplied** — the caller's contract wins; the
|
|
248
|
+
* input is returned unchanged.
|
|
249
|
+
* - **Gated** behind `ELIZA_REQUIRE_GOAL_CONTRACT` (default ON; `"0"`
|
|
250
|
+
* disables), mirroring {@link shouldAutoVerifyGoal}.
|
|
251
|
+
* - **Defensive** — {@link generateDefaultAcceptanceCriteria} never throws;
|
|
252
|
+
* on any model failure it returns the static template set, so task creation
|
|
253
|
+
* can never be broken by criteria generation.
|
|
254
|
+
*/
|
|
255
|
+
private withDefaultAcceptanceCriteria;
|
|
256
|
+
/** Map an explicit `kind` on the create input to a task type when it lines up
|
|
257
|
+
* with a known template type, so the caller's stated kind beats keyword
|
|
258
|
+
* detection; otherwise let {@link detectTaskType} read the goal text. */
|
|
259
|
+
private taskTypeHintFor;
|
|
260
|
+
listTasks(filter?: TaskListFilter): Promise<TaskThreadDto[]>;
|
|
261
|
+
getTask(taskId: string): Promise<TaskThreadDetailDto | null>;
|
|
262
|
+
/**
|
|
263
|
+
* Resolve the originating chat target for a task — the room + connector source
|
|
264
|
+
* it was created from — so proactive surfaces (the TaskSupervisorService
|
|
265
|
+
* digest, #8900) can post back to where the user is. The origin `source` is
|
|
266
|
+
* read from the task record metadata stamped at create time. Returns null when
|
|
267
|
+
* the task has no origin room (e.g. an API-created task with no chat).
|
|
268
|
+
*/
|
|
269
|
+
getTaskOriginTarget(taskId: string): Promise<{
|
|
270
|
+
roomId: string;
|
|
271
|
+
source: string;
|
|
272
|
+
worldId?: string;
|
|
273
|
+
} | null>;
|
|
274
|
+
updateTask(taskId: string, patch: Partial<Pick<OrchestratorTaskRecord, "title" | "goal" | "summary" | "acceptanceCriteria" | "priority" | "currentPlan" | "providerPolicy" | "metadata">>): Promise<TaskThreadDetailDto | null>;
|
|
275
|
+
pauseTask(taskId: string): Promise<TaskThreadDetailDto | null>;
|
|
276
|
+
resumeTask(taskId: string): Promise<TaskThreadDetailDto | null>;
|
|
277
|
+
archiveTask(taskId: string): Promise<TaskThreadDetailDto | null>;
|
|
278
|
+
reopenTask(taskId: string): Promise<TaskThreadDetailDto | null>;
|
|
279
|
+
deleteTask(taskId: string): Promise<boolean>;
|
|
280
|
+
forkTask(taskId: string, overrides?: Partial<CreateTaskInput>): Promise<TaskThreadDetailDto | null>;
|
|
281
|
+
/** Promote a `validating` task to `done` (proof passed) or back to `active`
|
|
282
|
+
* (proof failed → retry). The orchestrator never reports `done` without this. */
|
|
283
|
+
validateTask(taskId: string, result: {
|
|
284
|
+
passed: boolean;
|
|
285
|
+
summary?: string;
|
|
286
|
+
evidence?: string;
|
|
287
|
+
verifier?: string;
|
|
288
|
+
humanOverride?: boolean;
|
|
289
|
+
}): Promise<TaskThreadDetailDto | null>;
|
|
290
|
+
/**
|
|
291
|
+
* Automatically judge a freshly-`validating` task against its acceptance
|
|
292
|
+
* criteria (issue #8124): the orchestrator should always behave like `/goal`,
|
|
293
|
+
* confirming the sub-agent met every criterion before reporting done.
|
|
294
|
+
*
|
|
295
|
+
* Behavior:
|
|
296
|
+
* - **Gated.** No-op when {@link shouldAutoVerifyGoal} is off, when the task
|
|
297
|
+
* has no acceptance criteria (so a criteria-free task incurs zero model
|
|
298
|
+
* spend and behaves exactly as before), or when the task is no longer
|
|
299
|
+
* `validating` (e.g. a human already validated it).
|
|
300
|
+
* - **Small model only.** Delegates to {@link verifyGoalCompletion}, which
|
|
301
|
+
* uses `ModelType.TEXT_SMALL`.
|
|
302
|
+
* - **Pass →** forwards a passing verdict to {@link validateTask} (task → done).
|
|
303
|
+
* - **Fail, under cap →** sends a corrective follow-up to the active sub-agent
|
|
304
|
+
* citing the unmet criteria (task returns to `active` via `sendToTaskAgent`),
|
|
305
|
+
* and increments the per-task attempt counter.
|
|
306
|
+
* - **Fail, cap reached →** stops looping and parks the task on
|
|
307
|
+
* `waiting_on_user` for a human, instead of re-prompting forever.
|
|
308
|
+
*
|
|
309
|
+
* Fire-and-forget from the event bridge: failures here must never break the
|
|
310
|
+
* session-event write path, so everything is wrapped and logged.
|
|
311
|
+
*/
|
|
312
|
+
private autoVerifyCompletion;
|
|
313
|
+
addMessage(taskId: string, input: AddMessageInput): Promise<boolean>;
|
|
314
|
+
/**
|
|
315
|
+
* Record a user turn in the task room and relay it to every live sub-agent
|
|
316
|
+
* as a goal-wrapped follow-up. This is the composer's entry point: talking to
|
|
317
|
+
* the room steers the workers attached to it. Terminal sessions are skipped;
|
|
318
|
+
* the message is still recorded so the room history stays complete.
|
|
319
|
+
*/
|
|
320
|
+
postUserMessage(taskId: string, content: string): Promise<{
|
|
321
|
+
recorded: boolean;
|
|
322
|
+
forwardedTo: string[];
|
|
323
|
+
failedTo: Array<{
|
|
324
|
+
sessionId: string;
|
|
325
|
+
error: string;
|
|
326
|
+
}>;
|
|
327
|
+
} | null>;
|
|
328
|
+
createPlanRevision(taskId: string, input: CreatePlanRevisionInput): Promise<TaskPlanRevisionDto | null>;
|
|
329
|
+
listPlanRevisions(taskId: string, opts?: {
|
|
330
|
+
limit?: number;
|
|
331
|
+
cursor?: string;
|
|
332
|
+
}): Promise<PageResult<TaskPlanRevisionDto> | null>;
|
|
333
|
+
retryTaskTurn(taskId: string, input?: RetryTaskTurnInput): Promise<TaskThreadDetailDto | null>;
|
|
334
|
+
rerunFromEvent(taskId: string, input: RerunFromEventInput): Promise<TaskThreadDetailDto | null>;
|
|
335
|
+
restartTask(taskId: string, input?: RestartTaskInput): Promise<TaskThreadDetailDto | null>;
|
|
336
|
+
restartWithEditedPlan(taskId: string, input: RestartWithEditedPlanInput): Promise<TaskThreadDetailDto | null>;
|
|
337
|
+
listMessages(taskId: string, opts?: {
|
|
338
|
+
limit?: number;
|
|
339
|
+
cursor?: string;
|
|
340
|
+
}): Promise<PageResult<TaskMessageDto> | null>;
|
|
341
|
+
listEvents(taskId: string, opts?: {
|
|
342
|
+
limit?: number;
|
|
343
|
+
cursor?: string;
|
|
344
|
+
}): Promise<PageResult<TaskEventDto> | null>;
|
|
345
|
+
listTimeline(taskId: string, opts?: {
|
|
346
|
+
limit?: number;
|
|
347
|
+
cursor?: string;
|
|
348
|
+
}): Promise<PageResult<TaskTimelineItemDto> | null>;
|
|
349
|
+
getUsage(taskId: string): Promise<TaskUsageSummary | null>;
|
|
350
|
+
spawnAgentForTask(taskId: string, opts?: SpawnAgentForTaskOptions): Promise<TaskThreadDetailDto | null>;
|
|
351
|
+
sendToTaskAgent(taskId: string, sessionId: string, message: string, reason?: GoalFollowUpReason): Promise<boolean>;
|
|
352
|
+
stopTaskAgent(taskId: string, sessionId: string): Promise<boolean>;
|
|
353
|
+
getStatus(): Promise<OrchestratorStatus>;
|
|
354
|
+
getAccountOverview(): Promise<OrchestratorAccountOverview>;
|
|
355
|
+
/**
|
|
356
|
+
* Per-room participant roster: groups live sessions by their task room and
|
|
357
|
+
* lists the orchestrator + owning user + each sub-agent (with its pooled
|
|
358
|
+
* account). The accounts overview is a flat global map; this is the
|
|
359
|
+
* room-scoped view the task-room sidebar renders. Only rooms with at least
|
|
360
|
+
* one sub-agent session are included (an empty room has no roster to show).
|
|
361
|
+
*/
|
|
362
|
+
getRoomRoster(): Promise<OrchestratorRoomRosterOverview>;
|
|
363
|
+
pauseAll(): Promise<number>;
|
|
364
|
+
resumeAll(): Promise<number>;
|
|
365
|
+
private stopActiveSessions;
|
|
366
|
+
private acp;
|
|
367
|
+
private log;
|
|
368
|
+
}
|
|
369
|
+
export {};
|
|
370
|
+
//# sourceMappingURL=orchestrator-task-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-task-service.d.ts","sourceRoot":"","sources":["../../../../src/services/orchestrator-task-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,EAAE,KAAK,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AA8B5D,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EAQzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAEL,KAAK,eAAe,EAGpB,KAAK,2BAA2B,EAGhC,KAAK,8BAA8B,EAEnC,KAAK,sBAAsB,EAE3B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AAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAC7C,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAY5C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAO1D,iBAAiB,CACrB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,wBAA6B,GAClC,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IA8IhC,eAAe,CACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,kBAAmC,GAC1C,OAAO,CAAC,OAAO,CAAC;IA+Bb,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA4BlE,SAAS,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA4CxC,kBAAkB,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAiDhE;;;;;;OAMG;IACG,aAAa,IAAI,OAAO,CAAC,8BAA8B,CAAC;IA8DxD,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAW3B,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;YAapB,kBAAkB;IAkDhC,OAAO,CAAC,GAAG;IAMX,OAAO,CAAC,GAAG;CAUZ"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable orchestrator task store.
|
|
3
|
+
*
|
|
4
|
+
* Persists one {@link OrchestratorTaskDocument} per task across three
|
|
5
|
+
* backends, picked in the same order as the ACP session store: a runtime SQL
|
|
6
|
+
* adapter when present, else a JSON file, else memory. The document model
|
|
7
|
+
* keeps each task's sessions / events / messages / usage / artifacts /
|
|
8
|
+
* decisions inline so a detail read is a single lookup.
|
|
9
|
+
*
|
|
10
|
+
* @module services/orchestrator-task-store
|
|
11
|
+
*/
|
|
12
|
+
import type { CreateTaskInput, OrchestratorTaskArtifact, OrchestratorTaskDecision, OrchestratorTaskDocument, OrchestratorTaskEvent, OrchestratorTaskMessage, OrchestratorTaskPlanRevision, OrchestratorTaskRecord, OrchestratorTaskSession, OrchestratorTaskUsage, TaskListFilter } from "./orchestrator-task-types.js";
|
|
13
|
+
export type TaskStoreBackend = "runtime-db" | "file" | "memory";
|
|
14
|
+
interface Logger {
|
|
15
|
+
warn?: (message: string, ...args: unknown[]) => void;
|
|
16
|
+
error?: (message: string, ...args: unknown[]) => void;
|
|
17
|
+
info?: (message: string, ...args: unknown[]) => void;
|
|
18
|
+
debug?: (message: string, ...args: unknown[]) => void;
|
|
19
|
+
}
|
|
20
|
+
interface TaskStoreRuntime {
|
|
21
|
+
databaseAdapter?: unknown;
|
|
22
|
+
logger?: Logger;
|
|
23
|
+
getSetting?: (key: string) => string | undefined;
|
|
24
|
+
}
|
|
25
|
+
type SqlDatabaseAdapter = {
|
|
26
|
+
query?: (sql: string, params?: unknown[]) => Promise<unknown> | unknown;
|
|
27
|
+
execute?: (sql: string, params?: unknown[]) => Promise<unknown> | unknown;
|
|
28
|
+
run?: (sql: string, params?: unknown[]) => Promise<unknown> | unknown;
|
|
29
|
+
all?: (sql: string, params?: unknown[]) => Promise<unknown[]> | unknown[];
|
|
30
|
+
get?: (sql: string, params?: unknown[]) => Promise<unknown> | unknown;
|
|
31
|
+
select?: (sql: string, params?: unknown[]) => Promise<unknown[]> | unknown[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* In-memory backend. The file backend extends this with JSON persistence; the
|
|
35
|
+
* SQL backend reimplements the same surface against a runtime adapter.
|
|
36
|
+
*/
|
|
37
|
+
export declare class InMemoryTaskStore {
|
|
38
|
+
protected readonly docs: Map<string, OrchestratorTaskDocument>;
|
|
39
|
+
private tail;
|
|
40
|
+
protected enqueue<T>(operation: () => Promise<T> | T): Promise<T>;
|
|
41
|
+
createTask(input: CreateTaskInput): Promise<OrchestratorTaskDocument>;
|
|
42
|
+
getTask(id: string): Promise<OrchestratorTaskDocument | null>;
|
|
43
|
+
listTasks(filter?: TaskListFilter): Promise<OrchestratorTaskRecord[]>;
|
|
44
|
+
updateTask(id: string, patch: Partial<OrchestratorTaskRecord>): Promise<OrchestratorTaskRecord | null>;
|
|
45
|
+
deleteTask(id: string): Promise<boolean>;
|
|
46
|
+
addSession(session: OrchestratorTaskSession): Promise<void>;
|
|
47
|
+
updateSession(sessionId: string, patch: Partial<OrchestratorTaskSession>): Promise<void>;
|
|
48
|
+
findSession(sessionId: string): Promise<{
|
|
49
|
+
taskId: string;
|
|
50
|
+
session: OrchestratorTaskSession;
|
|
51
|
+
} | null>;
|
|
52
|
+
addEvent(event: OrchestratorTaskEvent): Promise<void>;
|
|
53
|
+
addMessage(message: OrchestratorTaskMessage): Promise<void>;
|
|
54
|
+
addUsage(usage: OrchestratorTaskUsage): Promise<void>;
|
|
55
|
+
addArtifact(artifact: OrchestratorTaskArtifact): Promise<void>;
|
|
56
|
+
addDecision(decision: OrchestratorTaskDecision): Promise<void>;
|
|
57
|
+
addPlanRevision(revision: OrchestratorTaskPlanRevision): Promise<void>;
|
|
58
|
+
private appendChild;
|
|
59
|
+
protected afterWrite(): Promise<void>;
|
|
60
|
+
/** Replace the in-memory doc set from a durable source. Public so the SQL
|
|
61
|
+
* backend can seed this store as a single-document mutation engine. */
|
|
62
|
+
hydrate(docs: OrchestratorTaskDocument[]): void;
|
|
63
|
+
}
|
|
64
|
+
export declare class FileTaskStore extends InMemoryTaskStore {
|
|
65
|
+
private readonly filePath;
|
|
66
|
+
private readonly logger?;
|
|
67
|
+
private readonly lockFile;
|
|
68
|
+
private loaded;
|
|
69
|
+
constructor(filePath: string, logger?: Logger | undefined);
|
|
70
|
+
private ensureLoaded;
|
|
71
|
+
createTask(input: CreateTaskInput): Promise<OrchestratorTaskDocument>;
|
|
72
|
+
getTask(id: string): Promise<OrchestratorTaskDocument | null>;
|
|
73
|
+
listTasks(filter?: TaskListFilter): Promise<OrchestratorTaskRecord[]>;
|
|
74
|
+
updateTask(id: string, patch: Partial<OrchestratorTaskRecord>): Promise<OrchestratorTaskRecord | null>;
|
|
75
|
+
deleteTask(id: string): Promise<boolean>;
|
|
76
|
+
addSession(session: OrchestratorTaskSession): Promise<void>;
|
|
77
|
+
updateSession(sessionId: string, patch: Partial<OrchestratorTaskSession>): Promise<void>;
|
|
78
|
+
findSession(sessionId: string): Promise<{
|
|
79
|
+
taskId: string;
|
|
80
|
+
session: OrchestratorTaskSession;
|
|
81
|
+
} | null>;
|
|
82
|
+
addEvent(event: OrchestratorTaskEvent): Promise<void>;
|
|
83
|
+
addMessage(message: OrchestratorTaskMessage): Promise<void>;
|
|
84
|
+
addUsage(usage: OrchestratorTaskUsage): Promise<void>;
|
|
85
|
+
addArtifact(artifact: OrchestratorTaskArtifact): Promise<void>;
|
|
86
|
+
addDecision(decision: OrchestratorTaskDecision): Promise<void>;
|
|
87
|
+
addPlanRevision(revision: OrchestratorTaskPlanRevision): Promise<void>;
|
|
88
|
+
protected afterWrite(): Promise<void>;
|
|
89
|
+
private withLock;
|
|
90
|
+
private removeStaleLock;
|
|
91
|
+
}
|
|
92
|
+
/** SQL backend. Stores the whole document as a JSON column with indexed
|
|
93
|
+
* columns for the list query, so all reads/writes are single-row operations. */
|
|
94
|
+
export declare class RuntimeDbTaskStore {
|
|
95
|
+
private readonly adapter;
|
|
96
|
+
private readonly cache;
|
|
97
|
+
private initPromise;
|
|
98
|
+
private tail;
|
|
99
|
+
constructor(adapter: SqlDatabaseAdapter);
|
|
100
|
+
private enqueue;
|
|
101
|
+
private ensureInitialized;
|
|
102
|
+
private exec;
|
|
103
|
+
private rows;
|
|
104
|
+
private parseDoc;
|
|
105
|
+
private persist;
|
|
106
|
+
private loadOne;
|
|
107
|
+
createTask(input: CreateTaskInput): Promise<OrchestratorTaskDocument>;
|
|
108
|
+
getTask(id: string): Promise<OrchestratorTaskDocument | null>;
|
|
109
|
+
listTasks(filter?: TaskListFilter): Promise<OrchestratorTaskRecord[]>;
|
|
110
|
+
/** Run a mutation against the freshest stored document, then persist it. */
|
|
111
|
+
private mutate;
|
|
112
|
+
updateTask(id: string, patch: Partial<OrchestratorTaskRecord>): Promise<OrchestratorTaskRecord | null>;
|
|
113
|
+
deleteTask(id: string): Promise<boolean>;
|
|
114
|
+
addSession(session: OrchestratorTaskSession): Promise<void>;
|
|
115
|
+
updateSession(sessionId: string, patch: Partial<OrchestratorTaskSession>): Promise<void>;
|
|
116
|
+
findSession(sessionId: string): Promise<{
|
|
117
|
+
taskId: string;
|
|
118
|
+
session: OrchestratorTaskSession;
|
|
119
|
+
} | null>;
|
|
120
|
+
addEvent(event: OrchestratorTaskEvent): Promise<void>;
|
|
121
|
+
addMessage(message: OrchestratorTaskMessage): Promise<void>;
|
|
122
|
+
addUsage(usage: OrchestratorTaskUsage): Promise<void>;
|
|
123
|
+
addArtifact(artifact: OrchestratorTaskArtifact): Promise<void>;
|
|
124
|
+
addDecision(decision: OrchestratorTaskDecision): Promise<void>;
|
|
125
|
+
addPlanRevision(revision: OrchestratorTaskPlanRevision): Promise<void>;
|
|
126
|
+
}
|
|
127
|
+
export interface OrchestratorTaskStoreOptions {
|
|
128
|
+
runtime?: TaskStoreRuntime;
|
|
129
|
+
stateFile?: string;
|
|
130
|
+
backend?: TaskStoreBackend;
|
|
131
|
+
}
|
|
132
|
+
/** Backend-selecting facade. Mirrors `AcpSessionStore`'s selection order. */
|
|
133
|
+
export declare class OrchestratorTaskStore {
|
|
134
|
+
readonly backend: TaskStoreBackend;
|
|
135
|
+
private readonly delegate;
|
|
136
|
+
constructor(options?: OrchestratorTaskStoreOptions);
|
|
137
|
+
createTask(input: CreateTaskInput): Promise<OrchestratorTaskDocument>;
|
|
138
|
+
getTask(id: string): Promise<OrchestratorTaskDocument | null>;
|
|
139
|
+
listTasks(filter?: TaskListFilter): Promise<OrchestratorTaskRecord[]>;
|
|
140
|
+
updateTask(id: string, patch: Partial<OrchestratorTaskRecord>): Promise<OrchestratorTaskRecord | null>;
|
|
141
|
+
deleteTask(id: string): Promise<boolean>;
|
|
142
|
+
addSession(session: OrchestratorTaskSession): Promise<void>;
|
|
143
|
+
updateSession(sessionId: string, patch: Partial<OrchestratorTaskSession>): Promise<void>;
|
|
144
|
+
findSession(sessionId: string): Promise<{
|
|
145
|
+
taskId: string;
|
|
146
|
+
session: OrchestratorTaskSession;
|
|
147
|
+
} | null>;
|
|
148
|
+
addEvent(event: OrchestratorTaskEvent): Promise<void>;
|
|
149
|
+
addMessage(message: OrchestratorTaskMessage): Promise<void>;
|
|
150
|
+
addUsage(usage: OrchestratorTaskUsage): Promise<void>;
|
|
151
|
+
addArtifact(artifact: OrchestratorTaskArtifact): Promise<void>;
|
|
152
|
+
addDecision(decision: OrchestratorTaskDecision): Promise<void>;
|
|
153
|
+
addPlanRevision(revision: OrchestratorTaskPlanRevision): Promise<void>;
|
|
154
|
+
}
|
|
155
|
+
export {};
|
|
156
|
+
//# sourceMappingURL=orchestrator-task-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-task-store.d.ts","sourceRoot":"","sources":["../../../../src/services/orchestrator-task-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,UAAU,MAAM;IACd,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACrD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KA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