@telora/factory 0.4.5 → 0.4.6
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/builder-completion.js +1 -1
- package/dist/builder-completion.js.map +1 -1
- package/dist/builder-spawner.d.ts +7 -1
- package/dist/builder-spawner.d.ts.map +1 -1
- package/dist/builder-spawner.js +9 -11
- package/dist/builder-spawner.js.map +1 -1
- package/dist/execution.d.ts +1 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js.map +1 -1
- package/dist/git-factory.d.ts +9 -10
- package/dist/git-factory.d.ts.map +1 -1
- package/dist/git-factory.js +15 -42
- package/dist/git-factory.js.map +1 -1
- package/dist/instance-phase-dispatch.d.ts.map +1 -1
- package/dist/instance-phase-dispatch.js +53 -29
- package/dist/instance-phase-dispatch.js.map +1 -1
- package/dist/instance-poll-loop.d.ts.map +1 -1
- package/dist/instance-poll-loop.js +12 -10
- package/dist/instance-poll-loop.js.map +1 -1
- package/dist/plan-parser.d.ts +3 -31
- package/dist/plan-parser.d.ts.map +1 -1
- package/dist/planning-phase.d.ts.map +1 -1
- package/dist/planning-phase.js +1 -1
- package/dist/planning-phase.js.map +1 -1
- package/dist/queries/execution-units.d.ts +7 -12
- package/dist/queries/execution-units.d.ts.map +1 -1
- package/dist/queries/shared.d.ts +5 -5
- package/dist/queries/shared.d.ts.map +1 -1
- package/dist/strategy-design-schema.d.ts +125 -527
- package/dist/strategy-design-schema.d.ts.map +1 -1
- package/dist/types/config.d.ts +20 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +5 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/context.d.ts +48 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/context.js +5 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/gates.d.ts +126 -0
- package/dist/types/gates.d.ts.map +1 -0
- package/dist/types/gates.js +5 -0
- package/dist/types/gates.js.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance.d.ts +403 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/instance.js +7 -0
- package/dist/types/instance.js.map +1 -0
- package/dist/types/pipeline.d.ts +33 -0
- package/dist/types/pipeline.d.ts.map +1 -0
- package/dist/types/pipeline.js +5 -0
- package/dist/types/pipeline.js.map +1 -0
- package/dist/types.d.ts +5 -607
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -3
- package/dist/types.js.map +1 -1
- package/dist/unit-session.js +1 -1
- package/dist/unit-session.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Instance, builder, session, execution unit, work unit, and work plan types.
|
|
3
|
+
* Also includes API response types (camelCase mapped from DB snake_case)
|
|
4
|
+
* and completion report types.
|
|
5
|
+
*/
|
|
6
|
+
import type { Writable } from 'node:stream';
|
|
7
|
+
import type { WorkflowStage, WorkflowTransition } from '@telora/daemon-core';
|
|
8
|
+
import type { ParsedTokenUsage } from '../queries/shared.js';
|
|
9
|
+
import type { SpecType } from './config.js';
|
|
10
|
+
import type { PipelineGraph } from './pipeline.js';
|
|
11
|
+
import type { GateType, DeterministicGateConfig, BehavioralGateConfig, AdversarialGateConfig, TraceCheckConfig } from './gates.js';
|
|
12
|
+
export type InstanceStatus = 'pending' | 'designing' | 'planning' | 'building' | 'paused' | 'completed' | 'failed' | 'cancelled';
|
|
13
|
+
export type WorkUnitStatus = 'pending' | 'ready' | 'in_progress' | 'completed' | 'failed';
|
|
14
|
+
export type SessionType = 'builder' | 'adversary' | 'planner';
|
|
15
|
+
export type FactorySessionStatus = 'starting' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
16
|
+
export type ExecutionUnitStatus = 'idle' | 'assigned' | 'running' | 'terminated';
|
|
17
|
+
/** DB row type for factory_execution_units, mapped to camelCase. */
|
|
18
|
+
export interface ExecutionUnit {
|
|
19
|
+
id: string;
|
|
20
|
+
organizationId: string;
|
|
21
|
+
instanceId: string;
|
|
22
|
+
slotIndex: number;
|
|
23
|
+
status: ExecutionUnitStatus;
|
|
24
|
+
model: string | null;
|
|
25
|
+
claudeSessionId: string | null;
|
|
26
|
+
assignedStrategyId: string | null;
|
|
27
|
+
config: ExecutionUnitConfig | null;
|
|
28
|
+
assignedAt: string | null;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}
|
|
32
|
+
/** Blueprint-level execution unit configuration (JSONB shape). */
|
|
33
|
+
export interface ExecutionUnitConfig {
|
|
34
|
+
defaultModel?: string;
|
|
35
|
+
mcpConfig?: Record<string, unknown>;
|
|
36
|
+
agentTeamsEnabled?: boolean;
|
|
37
|
+
envVars?: Record<string, string>;
|
|
38
|
+
}
|
|
39
|
+
export interface FactoryBlueprint {
|
|
40
|
+
id: string;
|
|
41
|
+
organizationId: string;
|
|
42
|
+
name: string;
|
|
43
|
+
description: string | null;
|
|
44
|
+
operationalNotes: string | null;
|
|
45
|
+
specConstraints: string | null;
|
|
46
|
+
gatesEnabled: string[];
|
|
47
|
+
deterministicConfig: DeterministicGateConfig | null;
|
|
48
|
+
behavioralConfig: BehavioralGateConfig | null;
|
|
49
|
+
adversarialConfig: AdversarialGateConfig | null;
|
|
50
|
+
maxTokenBudget: number | null;
|
|
51
|
+
maxCostBudget: number | null;
|
|
52
|
+
maxWallClockHours: number | null;
|
|
53
|
+
maxIterationsPerWorkUnit: number | null;
|
|
54
|
+
maxWorkUnits: number | null;
|
|
55
|
+
escalationTriggers: string[];
|
|
56
|
+
pauseTimeoutHours: number | null;
|
|
57
|
+
traceChecks: TraceCheckConfig[];
|
|
58
|
+
maxInstanceIterations: number | null;
|
|
59
|
+
auditTimeoutMs: number | null;
|
|
60
|
+
auditMaxReportChars: number | null;
|
|
61
|
+
/** Optional timeout override for the strategy design phase (ms). */
|
|
62
|
+
strategyDesignTimeoutMs: number | null;
|
|
63
|
+
executionUnitCount: number;
|
|
64
|
+
executionUnitConfig: ExecutionUnitConfig | null;
|
|
65
|
+
/** Max gate retry cycles per strategy. Null = fall back to maxInstanceIterations. */
|
|
66
|
+
maxGateIterations: number | null;
|
|
67
|
+
/** How long a strategy can stay in gate_fix_pending (ms). Null = no timeout. */
|
|
68
|
+
gateFixTimeoutMs: number | null;
|
|
69
|
+
/** How long a unit can stay in 'assigned' before escalation (ms). Null = daemon default (300000). */
|
|
70
|
+
unitAssignmentTimeoutMs: number | null;
|
|
71
|
+
/** How long a dispatched work unit can run before escalation (ms). Null = daemon default (1800000). */
|
|
72
|
+
workUnitTimeoutMs: number | null;
|
|
73
|
+
/** How long without stdout before escalation (ms). Null = daemon default (600000). */
|
|
74
|
+
signalSilenceTimeoutMs: number | null;
|
|
75
|
+
/** Whether the AI completion gate (spec review) is enabled. Default false. */
|
|
76
|
+
completionGateEnabled: boolean;
|
|
77
|
+
/** Pipeline graph DAG from the blueprint. Null = legacy single-stage execution. */
|
|
78
|
+
pipelineGraph: PipelineGraph | null;
|
|
79
|
+
status: string;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
}
|
|
83
|
+
export interface FactoryInstance {
|
|
84
|
+
id: string;
|
|
85
|
+
organizationId: string;
|
|
86
|
+
blueprintId: string;
|
|
87
|
+
productId: string;
|
|
88
|
+
specification: string | null;
|
|
89
|
+
/** Spec type from the originating factory spec (null if instance has no linked spec). */
|
|
90
|
+
specType: SpecType | null;
|
|
91
|
+
specId: string | null;
|
|
92
|
+
status: InstanceStatus;
|
|
93
|
+
currentWorkflowStageId: string | null;
|
|
94
|
+
/** ID of the currently executing pipeline node. Null for legacy instances. */
|
|
95
|
+
currentPipelineNodeId: string | null;
|
|
96
|
+
branchName: string | null;
|
|
97
|
+
worktreePath: string | null;
|
|
98
|
+
tokensUsed: number;
|
|
99
|
+
costUsed: number;
|
|
100
|
+
wallClockStartedAt: string | null;
|
|
101
|
+
wallClockElapsedSeconds: number;
|
|
102
|
+
escalationReason: string | null;
|
|
103
|
+
escalationMessage: string | null;
|
|
104
|
+
escalatedAt: string | null;
|
|
105
|
+
completionMessage: string | null;
|
|
106
|
+
completionReport: FactoryCompletionReport | null;
|
|
107
|
+
completedAt: string | null;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
updatedAt: string;
|
|
110
|
+
}
|
|
111
|
+
export interface FactoryWorkUnit {
|
|
112
|
+
id: string;
|
|
113
|
+
instanceId: string;
|
|
114
|
+
organizationId: string;
|
|
115
|
+
title: string;
|
|
116
|
+
description: string | null;
|
|
117
|
+
sortOrder: number;
|
|
118
|
+
blockedBy: string[];
|
|
119
|
+
status: WorkUnitStatus;
|
|
120
|
+
currentWorkflowStageId: string | null;
|
|
121
|
+
iterationCount: number;
|
|
122
|
+
cycleNumber: number;
|
|
123
|
+
builderSessionId: string | null;
|
|
124
|
+
/** Strategy this work unit belongs to (null for legacy/flat plans). */
|
|
125
|
+
strategyId: string | null;
|
|
126
|
+
/** When true, this unit is owned by the factory engine, not by agent sessions. */
|
|
127
|
+
infrastructureOwned: boolean;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
}
|
|
131
|
+
export interface FactoryGateResult {
|
|
132
|
+
id: string;
|
|
133
|
+
strategyId: string;
|
|
134
|
+
instanceId: string;
|
|
135
|
+
organizationId: string;
|
|
136
|
+
gateType: GateType;
|
|
137
|
+
iteration: number;
|
|
138
|
+
passed: boolean;
|
|
139
|
+
checkName: string | null;
|
|
140
|
+
output: string | null;
|
|
141
|
+
durationMs: number | null;
|
|
142
|
+
isAdversaryGenerated: boolean;
|
|
143
|
+
createdAt: string;
|
|
144
|
+
}
|
|
145
|
+
export interface FactorySession {
|
|
146
|
+
id: string;
|
|
147
|
+
instanceId: string;
|
|
148
|
+
organizationId: string;
|
|
149
|
+
sessionType: SessionType;
|
|
150
|
+
workUnitId: string | null;
|
|
151
|
+
status: FactorySessionStatus;
|
|
152
|
+
pid: number | null;
|
|
153
|
+
startedAt: string | null;
|
|
154
|
+
endedAt: string | null;
|
|
155
|
+
tokenCount: number | null;
|
|
156
|
+
costEstimate: number | null;
|
|
157
|
+
stdoutPath: string | null;
|
|
158
|
+
stderrPath: string | null;
|
|
159
|
+
lastNarration: string | null;
|
|
160
|
+
lastNarrationAt: string | null;
|
|
161
|
+
activitySummary: Record<string, unknown> | null;
|
|
162
|
+
commits: string[] | null;
|
|
163
|
+
filesModified: string[] | null;
|
|
164
|
+
filesRead: string[] | null;
|
|
165
|
+
exitReason: string | null;
|
|
166
|
+
/** Claude Code internal session ID for --resume support. */
|
|
167
|
+
claudeSessionId: string | null;
|
|
168
|
+
createdAt: string;
|
|
169
|
+
updatedAt: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* In-memory tracking of an execution unit.
|
|
173
|
+
* One per slot within a factory instance. Tracks both idle units
|
|
174
|
+
* (waiting for assignment) and running units (active session).
|
|
175
|
+
*/
|
|
176
|
+
export interface ExecutionUnitState {
|
|
177
|
+
/** DB execution unit record ID. */
|
|
178
|
+
unitId: string;
|
|
179
|
+
/** Parent factory instance ID. */
|
|
180
|
+
instanceId: string;
|
|
181
|
+
/** Slot position (0-based). */
|
|
182
|
+
slotIndex: number;
|
|
183
|
+
/** Current unit status. */
|
|
184
|
+
status: ExecutionUnitStatus;
|
|
185
|
+
/** OS process ID of the Claude Code process. Null when no session running. */
|
|
186
|
+
pid: number | null;
|
|
187
|
+
/** Process stdin for sending stream-json messages. Null when no session running. */
|
|
188
|
+
stdin: Writable | null;
|
|
189
|
+
/** StreamJsonParser attached to stdout (typed as unknown to avoid circular dep). */
|
|
190
|
+
streamParser: unknown;
|
|
191
|
+
/** Claude Code internal session ID for --resume support. */
|
|
192
|
+
claudeSessionId: string | null;
|
|
193
|
+
/** Currently assigned strategy ID (null when idle). */
|
|
194
|
+
assignedStrategyId: string | null;
|
|
195
|
+
/** When this unit was assigned to a strategy. Null when idle. */
|
|
196
|
+
assignedAt: Date | null;
|
|
197
|
+
/** Previous strategy ID (for resume-vs-fresh decision). */
|
|
198
|
+
previousStrategyId: string | null;
|
|
199
|
+
/** Activity tracking (typed as unknown to avoid circular dep). */
|
|
200
|
+
activityTracker: unknown;
|
|
201
|
+
/** Session communication adapter (typed as unknown to avoid circular dep). */
|
|
202
|
+
adapter: unknown;
|
|
203
|
+
/** When this unit's session was spawned. Null when idle. */
|
|
204
|
+
startedAt: Date | null;
|
|
205
|
+
/** When work was dispatched to this unit's session. Null when idle or no active dispatch. */
|
|
206
|
+
dispatchedAt: Date | null;
|
|
207
|
+
/** IDs of work units dispatched to this unit's session that have not yet completed. */
|
|
208
|
+
dispatchedWorkUnitIds: Set<string>;
|
|
209
|
+
/** Last stdout activity timestamp. Updated on any stream event. */
|
|
210
|
+
lastActivityAt: Date | null;
|
|
211
|
+
/** Accumulated token usage for this unit's session. */
|
|
212
|
+
tokensUsed: number;
|
|
213
|
+
/** Accumulated cost (USD) for this unit's session. */
|
|
214
|
+
costUsed: number;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* In-memory tracking of a running factory instance.
|
|
218
|
+
* Held in a Map<instanceId, FactoryInstanceState> by the lifecycle manager.
|
|
219
|
+
*/
|
|
220
|
+
export interface FactoryInstanceState {
|
|
221
|
+
instanceId: string;
|
|
222
|
+
blueprintId: string;
|
|
223
|
+
productId: string;
|
|
224
|
+
specType: SpecType | null;
|
|
225
|
+
/** The originating spec ID (null if instance was launched without a spec). */
|
|
226
|
+
specId: string | null;
|
|
227
|
+
status: InstanceStatus;
|
|
228
|
+
currentWorkflowStageId: string | null;
|
|
229
|
+
branchName: string | null;
|
|
230
|
+
worktreePath: string | null;
|
|
231
|
+
specification: string | null;
|
|
232
|
+
blueprint: FactoryBlueprint;
|
|
233
|
+
/** Pipeline graph loaded from blueprint at instance creation. Null = legacy mode. */
|
|
234
|
+
pipelineGraph: PipelineGraph | null;
|
|
235
|
+
/** ID of the currently executing pipeline node. Null for legacy instances or not yet started. */
|
|
236
|
+
currentPipelineNodeId: string | null;
|
|
237
|
+
/** Resolved workflow for this instance (cached at pickup). */
|
|
238
|
+
workflow: ResolvedFactoryWorkflow | null;
|
|
239
|
+
startedAt: Date;
|
|
240
|
+
/** Active builder sessions (legacy tracking, kept for crash recovery compatibility). */
|
|
241
|
+
activeBuilderSessions: Map<string, BuilderState>;
|
|
242
|
+
/** Execution units for this instance, keyed by execution unit ID. */
|
|
243
|
+
executionUnits: Map<string, ExecutionUnitState>;
|
|
244
|
+
/** Timestamp when the instance was escalated (paused). Used for pause timeout. */
|
|
245
|
+
escalatedAt: string | null;
|
|
246
|
+
/** Running total of tokens used across all sessions for this instance. */
|
|
247
|
+
tokensUsed: number;
|
|
248
|
+
/** Running total of cost (USD) across all sessions, including subagent costs. */
|
|
249
|
+
costUsed: number;
|
|
250
|
+
/** Number of completion gate iterations run for this instance. */
|
|
251
|
+
completionGateIterations: number;
|
|
252
|
+
/** Last gate failure feedback per strategy, keyed by strategyId. Used to re-deliver on session resume. */
|
|
253
|
+
gateFailureFeedback: Map<string, string>;
|
|
254
|
+
/** Cached completion report (set after generation, checked for idempotency). */
|
|
255
|
+
completionReport?: FactoryCompletionReport | null;
|
|
256
|
+
/** Gaps identified by the Review pipeline node's completion gate. Injected into next Engineering cycle's prompts and cleared after use. */
|
|
257
|
+
reviewGaps?: Array<{
|
|
258
|
+
area: string;
|
|
259
|
+
description: string;
|
|
260
|
+
severity: string;
|
|
261
|
+
suggestedFix: string;
|
|
262
|
+
}>;
|
|
263
|
+
/** Deployment profile snapshot from the linked product. Injected into agent prompts when present. */
|
|
264
|
+
deploymentProfileSnapshot?: {
|
|
265
|
+
name: string;
|
|
266
|
+
inceptionPrompt: string | null;
|
|
267
|
+
guidelines: string | null;
|
|
268
|
+
} | null;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* In-memory tracking of a running builder Claude Code session.
|
|
272
|
+
*/
|
|
273
|
+
export interface BuilderState {
|
|
274
|
+
sessionId: string;
|
|
275
|
+
workUnitId: string;
|
|
276
|
+
pid: number;
|
|
277
|
+
worktreePath: string;
|
|
278
|
+
startedAt: Date;
|
|
279
|
+
iterationCount: number;
|
|
280
|
+
/** Parsed token usage from the stream-json output (set after process exit). */
|
|
281
|
+
tokenUsage: ParsedTokenUsage | null;
|
|
282
|
+
/** Process stdin handle for sending stream-json messages. Nulled on process exit. */
|
|
283
|
+
stdin: Writable | null;
|
|
284
|
+
/** Claude Code internal session ID (captured from init event). */
|
|
285
|
+
claudeSessionId: string | null;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* In-memory tracking of an adversary Claude Code session.
|
|
289
|
+
*/
|
|
290
|
+
export interface AdversaryState {
|
|
291
|
+
sessionId: string;
|
|
292
|
+
workUnitId: string;
|
|
293
|
+
pid: number;
|
|
294
|
+
worktreePath: string;
|
|
295
|
+
startedAt: Date;
|
|
296
|
+
}
|
|
297
|
+
/** Resolved workflow with stages and transitions, cached per instance. */
|
|
298
|
+
export interface ResolvedFactoryWorkflow {
|
|
299
|
+
id: string;
|
|
300
|
+
stages: WorkflowStage[];
|
|
301
|
+
transitions: WorkflowTransition[];
|
|
302
|
+
/** Stage name to ID lookup. */
|
|
303
|
+
stageByName: Map<string, WorkflowStage>;
|
|
304
|
+
/** Stage ID to stage lookup. */
|
|
305
|
+
stageById: Map<string, WorkflowStage>;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* A single work unit in the AI-generated work plan.
|
|
309
|
+
* tempId is used for DAG references before real UUIDs are assigned.
|
|
310
|
+
*/
|
|
311
|
+
export interface WorkPlanUnit {
|
|
312
|
+
tempId: string;
|
|
313
|
+
title: string;
|
|
314
|
+
description: string;
|
|
315
|
+
sortOrder: number;
|
|
316
|
+
blockedBy: string[];
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* The full work plan returned by the planning phase AI.
|
|
320
|
+
*/
|
|
321
|
+
export interface WorkPlan {
|
|
322
|
+
workUnits: WorkPlanUnit[];
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* A single entry in the codebase audit report.
|
|
326
|
+
* Describes an area of the specification that is fully, partially, or not
|
|
327
|
+
* implemented in the existing codebase.
|
|
328
|
+
*/
|
|
329
|
+
export interface AuditEntry {
|
|
330
|
+
area: string;
|
|
331
|
+
description: string;
|
|
332
|
+
relevantFiles: string[];
|
|
333
|
+
confidence: 'high' | 'medium' | 'low';
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* A conflict between the existing codebase and the specification.
|
|
337
|
+
*/
|
|
338
|
+
export interface AuditConflict {
|
|
339
|
+
area: string;
|
|
340
|
+
existingBehavior: string;
|
|
341
|
+
specifiedBehavior: string;
|
|
342
|
+
relevantFiles: string[];
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Structured report from the pre-planning codebase audit.
|
|
346
|
+
* Produced by running Claude Code in --print mode to scan the codebase
|
|
347
|
+
* against the specification before the planning phase generates work units.
|
|
348
|
+
*/
|
|
349
|
+
export interface AuditReport {
|
|
350
|
+
existingImplementations: AuditEntry[];
|
|
351
|
+
partialImplementations: AuditEntry[];
|
|
352
|
+
gaps: AuditEntry[];
|
|
353
|
+
conflicts: AuditConflict[];
|
|
354
|
+
summary: string;
|
|
355
|
+
}
|
|
356
|
+
/** Score for a single spec dimension in the quality assessment. */
|
|
357
|
+
export interface DimensionScore {
|
|
358
|
+
dimension: string;
|
|
359
|
+
score: 'high' | 'medium' | 'low';
|
|
360
|
+
notes: string;
|
|
361
|
+
}
|
|
362
|
+
/** How well the spec served the factory -- per-dimension scores and identified gaps. */
|
|
363
|
+
export interface SpecQualityAssessment {
|
|
364
|
+
overallScore: 'high' | 'medium' | 'low';
|
|
365
|
+
dimensionScores: DimensionScore[];
|
|
366
|
+
gaps: string[];
|
|
367
|
+
}
|
|
368
|
+
/** Score for a single strategy in the design assessment. */
|
|
369
|
+
export interface StrategyScore {
|
|
370
|
+
strategyName: string;
|
|
371
|
+
score: 'high' | 'medium' | 'low';
|
|
372
|
+
notes: string;
|
|
373
|
+
}
|
|
374
|
+
/** How well the strategy decomposition worked -- parallel utilization and sizing. */
|
|
375
|
+
export interface StrategyDesignAssessment {
|
|
376
|
+
overallScore: 'high' | 'medium' | 'low';
|
|
377
|
+
strategyScores: StrategyScore[];
|
|
378
|
+
improvements: string[];
|
|
379
|
+
}
|
|
380
|
+
/** Computed execution metrics (not AI-generated). */
|
|
381
|
+
export interface ExecutionMetrics {
|
|
382
|
+
totalCycles: number;
|
|
383
|
+
totalWorkUnits: number;
|
|
384
|
+
completedWorkUnits: number;
|
|
385
|
+
failedWorkUnits: number;
|
|
386
|
+
gatePassRate: number;
|
|
387
|
+
totalTokensUsed: number;
|
|
388
|
+
wallClockSeconds: number;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Structured keep/stop/change retrospective for a completed factory instance.
|
|
392
|
+
* Generated after the final completion gate passes. The AI produces
|
|
393
|
+
* keep/stop/change + assessments; executionMetrics are computed separately.
|
|
394
|
+
*/
|
|
395
|
+
export interface FactoryCompletionReport {
|
|
396
|
+
keep: string[];
|
|
397
|
+
stop: string[];
|
|
398
|
+
change: string[];
|
|
399
|
+
specQualityAssessment: SpecQualityAssessment;
|
|
400
|
+
strategyDesignAssessment: StrategyDesignAssessment;
|
|
401
|
+
executionMetrics: ExecutionMetrics;
|
|
402
|
+
}
|
|
403
|
+
//# sourceMappingURL=instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/types/instance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,O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AM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,gBAAgB,EAAE,gBAAgB,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/types/instance.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline graph types (blueprint-level DAG for multi-stage pipelines).
|
|
3
|
+
*/
|
|
4
|
+
/** A single node in a pipeline graph, referencing a spec template. */
|
|
5
|
+
export interface PipelineNode {
|
|
6
|
+
id: string;
|
|
7
|
+
templateId: string;
|
|
8
|
+
templateType?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
config?: Record<string, unknown>;
|
|
11
|
+
consumes?: string;
|
|
12
|
+
produces?: string;
|
|
13
|
+
delegates?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Condition for conditional edges in the pipeline graph. */
|
|
16
|
+
export interface EdgeCondition {
|
|
17
|
+
field: string;
|
|
18
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
19
|
+
value: string | number | boolean;
|
|
20
|
+
}
|
|
21
|
+
/** A directed edge between two pipeline nodes. */
|
|
22
|
+
export interface PipelineEdge {
|
|
23
|
+
id: string;
|
|
24
|
+
from: string;
|
|
25
|
+
to: string;
|
|
26
|
+
condition?: EdgeCondition | null;
|
|
27
|
+
}
|
|
28
|
+
/** DAG of pipeline nodes and edges, stored on blueprints. */
|
|
29
|
+
export interface PipelineGraph {
|
|
30
|
+
nodes: PipelineNode[];
|
|
31
|
+
edges: PipelineEdge[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/types/pipeline.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;IACrD,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAClC;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/types/pipeline.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|