@jterrats/open-orchestra 0.1.0
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/AGENTS.md +151 -0
- package/CLAUDE.md +157 -0
- package/README.md +60 -0
- package/bin/orchestra.js +8 -0
- package/dist/args.d.ts +3 -0
- package/dist/args.js +30 -0
- package/dist/args.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +190 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands.d.ts +44 -0
- package/dist/commands.js +883 -0
- package/dist/commands.js.map +1 -0
- package/dist/constants.d.ts +15 -0
- package/dist/constants.js +69 -0
- package/dist/constants.js.map +1 -0
- package/dist/defaults.d.ts +72 -0
- package/dist/defaults.js +694 -0
- package/dist/defaults.js.map +1 -0
- package/dist/fs-utils.d.ts +8 -0
- package/dist/fs-utils.js +35 -0
- package/dist/fs-utils.js.map +1 -0
- package/dist/model-providers.d.ts +19 -0
- package/dist/model-providers.js +78 -0
- package/dist/model-providers.js.map +1 -0
- package/dist/types.d.ts +550 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +10 -0
- package/dist/validation.js +163 -0
- package/dist/validation.js.map +1 -0
- package/dist/web-api.d.ts +16 -0
- package/dist/web-api.js +220 -0
- package/dist/web-api.js.map +1 -0
- package/dist/web-chart-contracts.d.ts +13 -0
- package/dist/web-chart-contracts.js +13 -0
- package/dist/web-chart-contracts.js.map +1 -0
- package/dist/web-console.d.ts +1 -0
- package/dist/web-console.js +232 -0
- package/dist/web-console.js.map +1 -0
- package/dist/web-evidence.d.ts +25 -0
- package/dist/web-evidence.js +67 -0
- package/dist/web-evidence.js.map +1 -0
- package/dist/web-playwright.d.ts +3 -0
- package/dist/web-playwright.js +14 -0
- package/dist/web-playwright.js.map +1 -0
- package/dist/web-roles.d.ts +33 -0
- package/dist/web-roles.js +70 -0
- package/dist/web-roles.js.map +1 -0
- package/dist/workflow-gates.d.ts +7 -0
- package/dist/workflow-gates.js +291 -0
- package/dist/workflow-gates.js.map +1 -0
- package/dist/workflow-services.d.ts +56 -0
- package/dist/workflow-services.js +1240 -0
- package/dist/workflow-services.js.map +1 -0
- package/dist/workspace-validator.d.ts +6 -0
- package/dist/workspace-validator.js +189 -0
- package/dist/workspace-validator.js.map +1 -0
- package/dist/workspace.d.ts +10 -0
- package/dist/workspace.js +72 -0
- package/dist/workspace.js.map +1 -0
- package/docs/multi-agent-orchestrator-backlog.md +445 -0
- package/docs/multi-agent-orchestrator-sprint-1.md +433 -0
- package/docs/orchestra-mvp.md +176 -0
- package/package.json +63 -0
- package/rules/agent-collaboration.mdc +58 -0
- package/rules/agent-roles.mdc +105 -0
- package/rules/ai-assisted-development.mdc +31 -0
- package/rules/api-design.mdc +31 -0
- package/rules/architecture-decisions.mdc +27 -0
- package/rules/code-review-engineering.mdc +34 -0
- package/rules/concurrency-async.mdc +32 -0
- package/rules/configuration-management.mdc +31 -0
- package/rules/data-modeling-domain.mdc +31 -0
- package/rules/delivery-quality-gates.mdc +40 -0
- package/rules/dependency-management.mdc +31 -0
- package/rules/devops-tooling.mdc +55 -0
- package/rules/documentation-standards.mdc +26 -0
- package/rules/dry-clean-code.mdc +30 -0
- package/rules/error-handling.mdc +28 -0
- package/rules/frontend-engineering.mdc +32 -0
- package/rules/git-discipline.mdc +39 -0
- package/rules/infra-data-encryption.mdc +81 -0
- package/rules/performance-reliability.mdc +32 -0
- package/rules/readiness-done.mdc +32 -0
- package/rules/release-rollback.mdc +32 -0
- package/rules/rule-composition.mdc +28 -0
- package/rules/security-guardrails.mdc +37 -0
- package/rules/solid-architecture.mdc +32 -0
- package/rules/static-analysis-githooks.mdc +32 -0
- package/rules/testing-discipline.mdc +42 -0
- package/rules/ux-ui-product-experience.mdc +51 -0
- package/rules/work-intake-sequencing.mdc +39 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
export type TaskStatus = "pending" | "ready" | "in_progress" | "blocked" | "review" | "approved" | "rejected" | "done" | "canceled";
|
|
2
|
+
export type ReviewResult = "approve" | "block" | "changes";
|
|
3
|
+
export type Severity = "info" | "low" | "medium" | "high" | "critical";
|
|
4
|
+
export type EvidenceType = "command" | "file" | "screenshot" | "trace" | "video" | "log" | "report";
|
|
5
|
+
export interface Role {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
capabilities: string[];
|
|
10
|
+
requiredHandoffFields: string[];
|
|
11
|
+
blockingAuthority: string[];
|
|
12
|
+
activationCriteria?: string[];
|
|
13
|
+
expectedEvidence?: string[];
|
|
14
|
+
gateParticipation?: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface MechanicalOverride {
|
|
17
|
+
rationale: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ArchitectureApproval {
|
|
20
|
+
proposal?: string;
|
|
21
|
+
userApproved?: boolean;
|
|
22
|
+
approvedBy?: string;
|
|
23
|
+
approvedAt?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface QaGateMetadata {
|
|
26
|
+
plan?: string;
|
|
27
|
+
executionStatus?: "not_run" | "passed" | "failed" | "deferred";
|
|
28
|
+
deferredRationale?: string;
|
|
29
|
+
deferredOwner?: string;
|
|
30
|
+
}
|
|
31
|
+
export type RiskImpactArea = "security" | "sre" | "dba" | "devops" | "compliance" | "ux";
|
|
32
|
+
export interface RiskAcceptance {
|
|
33
|
+
acceptedBy?: string;
|
|
34
|
+
rationale?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface RiskGateMetadata {
|
|
37
|
+
impactAreas?: RiskImpactArea[];
|
|
38
|
+
acceptance?: RiskAcceptance;
|
|
39
|
+
}
|
|
40
|
+
export interface Task {
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
ownerRole: string;
|
|
44
|
+
status: TaskStatus;
|
|
45
|
+
dependencies: string[];
|
|
46
|
+
backlogItem?: string;
|
|
47
|
+
goal?: string;
|
|
48
|
+
scope?: string;
|
|
49
|
+
acceptanceCriteria?: string[];
|
|
50
|
+
assumptions?: string[];
|
|
51
|
+
risks?: string[];
|
|
52
|
+
paths?: string[];
|
|
53
|
+
testStrategy?: string;
|
|
54
|
+
blockedReason?: string;
|
|
55
|
+
mechanicalOverride?: MechanicalOverride;
|
|
56
|
+
architectureApproval?: ArchitectureApproval;
|
|
57
|
+
qaGate?: QaGateMetadata;
|
|
58
|
+
riskGate?: RiskGateMetadata;
|
|
59
|
+
createdAt?: string;
|
|
60
|
+
updatedAt?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface LockEntry {
|
|
63
|
+
id: string;
|
|
64
|
+
taskId: string;
|
|
65
|
+
ownerRole: string;
|
|
66
|
+
path: string;
|
|
67
|
+
reason: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
expiresAt?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface EventEntry {
|
|
72
|
+
id: string;
|
|
73
|
+
type: string;
|
|
74
|
+
timestamp: string;
|
|
75
|
+
actor: string;
|
|
76
|
+
summary: string;
|
|
77
|
+
taskId: string | null;
|
|
78
|
+
artifacts?: string[];
|
|
79
|
+
metadata: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
export interface EventInput {
|
|
82
|
+
type: string;
|
|
83
|
+
actor: string;
|
|
84
|
+
summary: string;
|
|
85
|
+
taskId?: string;
|
|
86
|
+
artifacts?: string[];
|
|
87
|
+
metadata?: Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
export interface ToolConfig {
|
|
90
|
+
enabled?: boolean;
|
|
91
|
+
command: string;
|
|
92
|
+
args: string[];
|
|
93
|
+
cwd: string;
|
|
94
|
+
allowedRoles: string[];
|
|
95
|
+
timeoutMs: number;
|
|
96
|
+
evidence: string;
|
|
97
|
+
risk: string;
|
|
98
|
+
}
|
|
99
|
+
export interface ModelProviderCapabilities {
|
|
100
|
+
streaming: boolean;
|
|
101
|
+
tools: boolean;
|
|
102
|
+
vision: boolean;
|
|
103
|
+
jsonMode: boolean;
|
|
104
|
+
maxContextTokens: number;
|
|
105
|
+
timeoutMs: number;
|
|
106
|
+
}
|
|
107
|
+
export interface ModelMessage {
|
|
108
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
109
|
+
content: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ModelRequest {
|
|
112
|
+
messages: ModelMessage[];
|
|
113
|
+
model: string;
|
|
114
|
+
temperature?: number;
|
|
115
|
+
maxTokens?: number;
|
|
116
|
+
jsonMode?: boolean;
|
|
117
|
+
tools?: unknown[];
|
|
118
|
+
timeoutMs?: number;
|
|
119
|
+
}
|
|
120
|
+
export interface ModelResponse {
|
|
121
|
+
id: string;
|
|
122
|
+
provider: string;
|
|
123
|
+
model: string;
|
|
124
|
+
content: string;
|
|
125
|
+
usage: {
|
|
126
|
+
inputTokens: number;
|
|
127
|
+
outputTokens: number;
|
|
128
|
+
};
|
|
129
|
+
finishReason: "stop" | "length" | "tool_call" | "error";
|
|
130
|
+
}
|
|
131
|
+
export interface ModelStreamEvent {
|
|
132
|
+
type: "content" | "tool_call" | "done" | "error";
|
|
133
|
+
content?: string;
|
|
134
|
+
error?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface ModelProviderError {
|
|
137
|
+
provider: string;
|
|
138
|
+
code: string;
|
|
139
|
+
message: string;
|
|
140
|
+
retryable: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface ProviderFallbackResult {
|
|
143
|
+
provider: string;
|
|
144
|
+
model: string;
|
|
145
|
+
response: ModelResponse;
|
|
146
|
+
fallbackUsed: boolean;
|
|
147
|
+
failedProviders: {
|
|
148
|
+
provider: string;
|
|
149
|
+
reason: string;
|
|
150
|
+
}[];
|
|
151
|
+
}
|
|
152
|
+
export interface ModelProvenanceInput {
|
|
153
|
+
task: string;
|
|
154
|
+
role: string;
|
|
155
|
+
provider: string;
|
|
156
|
+
model: string;
|
|
157
|
+
promptId: string;
|
|
158
|
+
responseId: string;
|
|
159
|
+
inputTokens: number;
|
|
160
|
+
outputTokens: number;
|
|
161
|
+
estimatedCostUsd: number;
|
|
162
|
+
finishReason: ModelResponse["finishReason"];
|
|
163
|
+
}
|
|
164
|
+
export interface ModelProvenanceRecord extends ModelProvenanceInput {
|
|
165
|
+
timestamp: string;
|
|
166
|
+
}
|
|
167
|
+
export interface ModelProvider {
|
|
168
|
+
id: string;
|
|
169
|
+
capabilities: ModelProviderCapabilities;
|
|
170
|
+
complete(request: ModelRequest): Promise<ModelResponse>;
|
|
171
|
+
stream?(request: ModelRequest): AsyncIterable<ModelStreamEvent>;
|
|
172
|
+
}
|
|
173
|
+
export interface ConfiguredProviderSummary {
|
|
174
|
+
scope: string;
|
|
175
|
+
provider: string;
|
|
176
|
+
model: string;
|
|
177
|
+
fallbacks: string[];
|
|
178
|
+
maxTokens: number;
|
|
179
|
+
maxCostUsd: number;
|
|
180
|
+
timeoutMs: number;
|
|
181
|
+
retries: number;
|
|
182
|
+
requiredCapabilities: string[];
|
|
183
|
+
}
|
|
184
|
+
export interface ProviderRouting {
|
|
185
|
+
provider: string;
|
|
186
|
+
model: string;
|
|
187
|
+
fallbacks: string[];
|
|
188
|
+
maxTokens: number;
|
|
189
|
+
maxCostUsd: number;
|
|
190
|
+
timeoutMs: number;
|
|
191
|
+
retries: number;
|
|
192
|
+
requiredCapabilities: string[];
|
|
193
|
+
}
|
|
194
|
+
export interface WorkflowProvidersConfig {
|
|
195
|
+
defaults: ProviderRouting;
|
|
196
|
+
byRole: Record<string, ProviderRouting>;
|
|
197
|
+
}
|
|
198
|
+
export interface BudgetLimit {
|
|
199
|
+
maxRequests?: number;
|
|
200
|
+
maxInputTokens?: number;
|
|
201
|
+
maxOutputTokens?: number;
|
|
202
|
+
maxTotalTokens?: number;
|
|
203
|
+
maxEstimatedCostUsd?: number;
|
|
204
|
+
}
|
|
205
|
+
export interface BudgetPolicy {
|
|
206
|
+
defaults?: BudgetLimit;
|
|
207
|
+
byRole: Record<string, BudgetLimit>;
|
|
208
|
+
byTask: Record<string, BudgetLimit>;
|
|
209
|
+
}
|
|
210
|
+
export interface WorkflowConfig {
|
|
211
|
+
version: number;
|
|
212
|
+
providers: WorkflowProvidersConfig;
|
|
213
|
+
budgets?: BudgetPolicy;
|
|
214
|
+
tools: Record<string, ToolConfig>;
|
|
215
|
+
staticAnalysis: {
|
|
216
|
+
preCommit: {
|
|
217
|
+
required: boolean;
|
|
218
|
+
checks: string[];
|
|
219
|
+
disallowNoVerifyWithoutApproval: boolean;
|
|
220
|
+
};
|
|
221
|
+
ci: {
|
|
222
|
+
checks: string[];
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
export interface Workspace {
|
|
227
|
+
base: string;
|
|
228
|
+
roles: Role[];
|
|
229
|
+
roleIds: Set<string>;
|
|
230
|
+
tasks: Task[];
|
|
231
|
+
locks: LockEntry[];
|
|
232
|
+
}
|
|
233
|
+
export interface CliOptions {
|
|
234
|
+
_: string[];
|
|
235
|
+
[key: string]: string | boolean | string[];
|
|
236
|
+
}
|
|
237
|
+
export interface CliIo {
|
|
238
|
+
log(message: string): void;
|
|
239
|
+
}
|
|
240
|
+
export interface ReadinessReport {
|
|
241
|
+
isReady: boolean;
|
|
242
|
+
missing: string[];
|
|
243
|
+
}
|
|
244
|
+
export interface GateEvaluationContext {
|
|
245
|
+
task: Task;
|
|
246
|
+
events: EventEntry[];
|
|
247
|
+
locks: LockEntry[];
|
|
248
|
+
}
|
|
249
|
+
export interface GateEvaluationResult {
|
|
250
|
+
gateId: string;
|
|
251
|
+
passed: boolean;
|
|
252
|
+
blocking: boolean;
|
|
253
|
+
summary: string;
|
|
254
|
+
missing: string[];
|
|
255
|
+
metadata: Record<string, unknown>;
|
|
256
|
+
}
|
|
257
|
+
export interface WorkflowGate {
|
|
258
|
+
id: string;
|
|
259
|
+
description: string;
|
|
260
|
+
evaluate(context: GateEvaluationContext): GateEvaluationResult;
|
|
261
|
+
}
|
|
262
|
+
export interface WorkflowStatus {
|
|
263
|
+
tasks: {
|
|
264
|
+
total: number;
|
|
265
|
+
byStatus: Record<string, number>;
|
|
266
|
+
blocked: {
|
|
267
|
+
id: string;
|
|
268
|
+
title: string;
|
|
269
|
+
reason: string;
|
|
270
|
+
}[];
|
|
271
|
+
};
|
|
272
|
+
locks: {
|
|
273
|
+
total: number;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
export interface WorkflowSummary {
|
|
277
|
+
tasks: Task[];
|
|
278
|
+
locks: LockEntry[];
|
|
279
|
+
reviews: EventEntry[];
|
|
280
|
+
evidence: EventEntry[];
|
|
281
|
+
blockers: Task[];
|
|
282
|
+
eventCount: number;
|
|
283
|
+
}
|
|
284
|
+
export interface DependencyStatus {
|
|
285
|
+
id: string;
|
|
286
|
+
status: TaskStatus;
|
|
287
|
+
isComplete: boolean;
|
|
288
|
+
}
|
|
289
|
+
export interface DependencyReport {
|
|
290
|
+
taskId: string;
|
|
291
|
+
isSatisfied: boolean;
|
|
292
|
+
dependencies: DependencyStatus[];
|
|
293
|
+
incomplete: DependencyStatus[];
|
|
294
|
+
}
|
|
295
|
+
export interface TaskGraphReadyItem {
|
|
296
|
+
id: string;
|
|
297
|
+
title: string;
|
|
298
|
+
status: TaskStatus;
|
|
299
|
+
ownerRole: string;
|
|
300
|
+
}
|
|
301
|
+
export interface TaskGraphBlockedItem extends TaskGraphReadyItem {
|
|
302
|
+
incomplete: DependencyStatus[];
|
|
303
|
+
}
|
|
304
|
+
export interface TaskGraphLockInfo {
|
|
305
|
+
id: string;
|
|
306
|
+
path: string;
|
|
307
|
+
conflictPath?: string;
|
|
308
|
+
ownerRole: string;
|
|
309
|
+
reason: string;
|
|
310
|
+
}
|
|
311
|
+
export interface TaskGraphLockedItem extends TaskGraphReadyItem {
|
|
312
|
+
locks: TaskGraphLockInfo[];
|
|
313
|
+
}
|
|
314
|
+
export interface TaskGraphCompleteItem {
|
|
315
|
+
id: string;
|
|
316
|
+
title: string;
|
|
317
|
+
status: TaskStatus;
|
|
318
|
+
ownerRole: string;
|
|
319
|
+
}
|
|
320
|
+
export interface TaskGraphPlan {
|
|
321
|
+
ready: TaskGraphReadyItem[];
|
|
322
|
+
blocked: TaskGraphBlockedItem[];
|
|
323
|
+
locked: TaskGraphLockedItem[];
|
|
324
|
+
complete: TaskGraphCompleteItem[];
|
|
325
|
+
}
|
|
326
|
+
export interface PullRequestSummary {
|
|
327
|
+
task: Task;
|
|
328
|
+
handoffs: EventEntry[];
|
|
329
|
+
reviews: EventEntry[];
|
|
330
|
+
evidence: EventEntry[];
|
|
331
|
+
gates: EventEntry[];
|
|
332
|
+
locks: LockEntry[];
|
|
333
|
+
risks: string[];
|
|
334
|
+
rollout: string;
|
|
335
|
+
rollback: string;
|
|
336
|
+
}
|
|
337
|
+
export interface PlaywrightScenario {
|
|
338
|
+
name: string;
|
|
339
|
+
source: string;
|
|
340
|
+
pageObject: string;
|
|
341
|
+
selectors: string[];
|
|
342
|
+
assertions: string[];
|
|
343
|
+
evidence: string[];
|
|
344
|
+
}
|
|
345
|
+
export interface PlaywrightTestPlan {
|
|
346
|
+
taskId: string;
|
|
347
|
+
title: string;
|
|
348
|
+
targetUser: string;
|
|
349
|
+
scenarios: PlaywrightScenario[];
|
|
350
|
+
fixtures: string[];
|
|
351
|
+
notes: string[];
|
|
352
|
+
}
|
|
353
|
+
export interface AddTaskInput {
|
|
354
|
+
id: string;
|
|
355
|
+
title: string;
|
|
356
|
+
ownerRole: string;
|
|
357
|
+
dependencies: string[];
|
|
358
|
+
backlogItem?: string;
|
|
359
|
+
goal?: string;
|
|
360
|
+
scope?: string;
|
|
361
|
+
acceptanceCriteria?: string[];
|
|
362
|
+
assumptions?: string[];
|
|
363
|
+
risks?: string[];
|
|
364
|
+
paths?: string[];
|
|
365
|
+
testStrategy?: string;
|
|
366
|
+
architectureApproval?: ArchitectureApproval;
|
|
367
|
+
qaGate?: QaGateMetadata;
|
|
368
|
+
riskGate?: RiskGateMetadata;
|
|
369
|
+
}
|
|
370
|
+
export interface UpdateTaskInput {
|
|
371
|
+
id: string;
|
|
372
|
+
status?: TaskStatus;
|
|
373
|
+
blockedReason?: string;
|
|
374
|
+
}
|
|
375
|
+
export interface ClaimLockInput {
|
|
376
|
+
id?: string;
|
|
377
|
+
taskId: string;
|
|
378
|
+
ownerRole: string;
|
|
379
|
+
path: string;
|
|
380
|
+
reason: string;
|
|
381
|
+
expiresAt?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface HandoffInput {
|
|
384
|
+
task: string;
|
|
385
|
+
from: string;
|
|
386
|
+
to: string;
|
|
387
|
+
changed: string;
|
|
388
|
+
behavior: string;
|
|
389
|
+
tests: string;
|
|
390
|
+
commands: string;
|
|
391
|
+
status?: string;
|
|
392
|
+
gaps?: string;
|
|
393
|
+
risks?: string;
|
|
394
|
+
playwright?: string;
|
|
395
|
+
}
|
|
396
|
+
export interface ReviewInput {
|
|
397
|
+
task: string;
|
|
398
|
+
role: string;
|
|
399
|
+
result: string;
|
|
400
|
+
severity: string;
|
|
401
|
+
findings: string;
|
|
402
|
+
recommendation: string;
|
|
403
|
+
}
|
|
404
|
+
export interface EvidenceInput {
|
|
405
|
+
task: string;
|
|
406
|
+
role: string;
|
|
407
|
+
type: string;
|
|
408
|
+
summary: string;
|
|
409
|
+
path?: string | boolean | string[];
|
|
410
|
+
command?: string | boolean | string[];
|
|
411
|
+
exitCode?: string | boolean | string[];
|
|
412
|
+
}
|
|
413
|
+
export interface PlaywrightEvidenceInput {
|
|
414
|
+
task: string;
|
|
415
|
+
kind: "screenshot" | "trace" | "video" | "report";
|
|
416
|
+
path: string;
|
|
417
|
+
summary: string;
|
|
418
|
+
runId?: string;
|
|
419
|
+
}
|
|
420
|
+
export interface ArtifactResult {
|
|
421
|
+
artifact: string;
|
|
422
|
+
content: string;
|
|
423
|
+
}
|
|
424
|
+
export interface DecisionInput {
|
|
425
|
+
task: string;
|
|
426
|
+
title: string;
|
|
427
|
+
context: string;
|
|
428
|
+
decision: string;
|
|
429
|
+
consequences: string;
|
|
430
|
+
status: "proposed" | "accepted" | "superseded";
|
|
431
|
+
owner: string;
|
|
432
|
+
}
|
|
433
|
+
export interface DecisionRecord extends DecisionInput {
|
|
434
|
+
artifact: string;
|
|
435
|
+
}
|
|
436
|
+
export interface TaskContext {
|
|
437
|
+
task: Task;
|
|
438
|
+
dependencies: DependencyReport;
|
|
439
|
+
locks: LockEntry[];
|
|
440
|
+
decisions: EventEntry[];
|
|
441
|
+
handoffs: EventEntry[];
|
|
442
|
+
reviews: EventEntry[];
|
|
443
|
+
evidence: EventEntry[];
|
|
444
|
+
gates: EventEntry[];
|
|
445
|
+
modelProvenance: ModelProvenanceRecord[];
|
|
446
|
+
risks: string[];
|
|
447
|
+
}
|
|
448
|
+
export interface ExecutionPlanStep {
|
|
449
|
+
id: string;
|
|
450
|
+
role: string;
|
|
451
|
+
action: string;
|
|
452
|
+
dependsOn: string[];
|
|
453
|
+
gate?: string;
|
|
454
|
+
}
|
|
455
|
+
export interface ExecutionPlan {
|
|
456
|
+
taskId: string;
|
|
457
|
+
steps: ExecutionPlanStep[];
|
|
458
|
+
}
|
|
459
|
+
export interface ExecutionRunStep {
|
|
460
|
+
id: string;
|
|
461
|
+
role: string;
|
|
462
|
+
status: "completed" | "failed";
|
|
463
|
+
provider: string;
|
|
464
|
+
model: string;
|
|
465
|
+
responseId?: string;
|
|
466
|
+
artifact?: string;
|
|
467
|
+
error?: string;
|
|
468
|
+
}
|
|
469
|
+
export interface ExecutionRun {
|
|
470
|
+
taskId: string;
|
|
471
|
+
provider: string;
|
|
472
|
+
model: string;
|
|
473
|
+
steps: ExecutionRunStep[];
|
|
474
|
+
budgetEscalation?: BudgetEscalationResult;
|
|
475
|
+
}
|
|
476
|
+
export interface TaskGraphBatchFailure {
|
|
477
|
+
taskId: string;
|
|
478
|
+
error: string;
|
|
479
|
+
}
|
|
480
|
+
export interface TaskGraphBatchRun {
|
|
481
|
+
selectedTaskIds: string[];
|
|
482
|
+
runs: ExecutionRun[];
|
|
483
|
+
locked: TaskGraphLockedItem[];
|
|
484
|
+
failure?: TaskGraphBatchFailure;
|
|
485
|
+
artifact?: string;
|
|
486
|
+
}
|
|
487
|
+
export interface UsageBreakdown {
|
|
488
|
+
key: string;
|
|
489
|
+
requests: number;
|
|
490
|
+
inputTokens: number;
|
|
491
|
+
outputTokens: number;
|
|
492
|
+
totalTokens: number;
|
|
493
|
+
estimatedCostUsd: number;
|
|
494
|
+
}
|
|
495
|
+
export interface UsageReport {
|
|
496
|
+
taskId?: string;
|
|
497
|
+
totals: UsageBreakdown;
|
|
498
|
+
byRole: UsageBreakdown[];
|
|
499
|
+
byProvider: UsageBreakdown[];
|
|
500
|
+
}
|
|
501
|
+
export interface BudgetViolation {
|
|
502
|
+
scope: string;
|
|
503
|
+
metric: string;
|
|
504
|
+
actual: number;
|
|
505
|
+
limit: number;
|
|
506
|
+
}
|
|
507
|
+
export interface BudgetCheckResult {
|
|
508
|
+
taskId?: string;
|
|
509
|
+
passed: boolean;
|
|
510
|
+
usage: UsageReport;
|
|
511
|
+
appliedBudgets: string[];
|
|
512
|
+
violations: BudgetViolation[];
|
|
513
|
+
}
|
|
514
|
+
export interface BudgetFallbackProposal {
|
|
515
|
+
fromProvider: string;
|
|
516
|
+
fromModel: string;
|
|
517
|
+
toProvider: string;
|
|
518
|
+
toModel: string;
|
|
519
|
+
violations: BudgetViolation[];
|
|
520
|
+
artifact?: string;
|
|
521
|
+
}
|
|
522
|
+
export interface BudgetEscalationDecision {
|
|
523
|
+
approved: boolean;
|
|
524
|
+
approver?: string;
|
|
525
|
+
rationale?: string;
|
|
526
|
+
}
|
|
527
|
+
export interface BudgetEscalationResult {
|
|
528
|
+
status: "not_required" | "approved" | "rejected";
|
|
529
|
+
proposal?: BudgetFallbackProposal;
|
|
530
|
+
approver?: string;
|
|
531
|
+
rationale?: string;
|
|
532
|
+
approvalId?: string;
|
|
533
|
+
approvalSource?: "explicit" | "stored";
|
|
534
|
+
}
|
|
535
|
+
export interface ApprovalRecord {
|
|
536
|
+
id: string;
|
|
537
|
+
taskId?: string;
|
|
538
|
+
artifact: string;
|
|
539
|
+
status: "pending" | "approved" | "rejected";
|
|
540
|
+
summary: string;
|
|
541
|
+
requestedAt?: string;
|
|
542
|
+
decidedAt?: string;
|
|
543
|
+
approver?: string;
|
|
544
|
+
rationale?: string;
|
|
545
|
+
}
|
|
546
|
+
export interface ApprovalDecisionInput {
|
|
547
|
+
id: string;
|
|
548
|
+
approver: string;
|
|
549
|
+
rationale: string;
|
|
550
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EvidenceInput, ReadinessReport, ReviewInput, Task } from "./types.js";
|
|
2
|
+
export declare function assertObject(value: unknown, name: string): asserts value is Record<string, unknown>;
|
|
3
|
+
export declare function validateLocks(locks: unknown, taskIds: Set<string>, roleIds: Set<string>): void;
|
|
4
|
+
export declare function taskIdsFor(tasks: Task[]): Set<string>;
|
|
5
|
+
export declare function assertNonEmptyString(value: unknown, name: string): asserts value is string;
|
|
6
|
+
export declare function validateRoles(roles: unknown): Set<string>;
|
|
7
|
+
export declare function validateTasks(tasks: unknown, roleIds: Set<string>): void;
|
|
8
|
+
export declare function validateReviewInput(input: ReviewInput, roleIds: Set<string>): void;
|
|
9
|
+
export declare function validateEvidenceInput(input: EvidenceInput, roleIds: Set<string>): void;
|
|
10
|
+
export declare function validateReadiness(task: Task): ReadinessReport;
|