@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
package/dist/types.d.ts
CHANGED
|
@@ -1,612 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Factory orchestrator runtime types.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* This file re-exports all types from the domain-focused type files
|
|
5
|
+
* in ./types/ for backward compatibility. Consumers can continue to
|
|
6
|
+
* import from './types.js' unchanged, or import directly from the
|
|
7
|
+
* domain files for narrower imports.
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
import type { BaseConfig } from '@telora/daemon-core';
|
|
10
|
-
import type { ParsedTokenUsage } from './queries/shared.js';
|
|
11
|
-
/** The type of production run a factory spec targets. */
|
|
12
|
-
export type SpecType = 'prototype' | 'mvp' | 'extend_existing';
|
|
13
|
-
/** OTLP telemetry config for factory builder processes. */
|
|
14
|
-
export interface FactoryTelemetryConfig {
|
|
15
|
-
/** Whether to inject OTEL env vars into builder processes. Default: true. */
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
/** OTLP endpoint port. Default: 4318. */
|
|
18
|
-
port: number;
|
|
19
|
-
}
|
|
20
|
-
export interface FactoryConfig extends BaseConfig {
|
|
21
|
-
factoryWorktreeDir: string;
|
|
22
|
-
maxConcurrentInstances: number;
|
|
23
|
-
/** OTLP telemetry configuration for builder processes. */
|
|
24
|
-
telemetry: FactoryTelemetryConfig;
|
|
25
|
-
}
|
|
26
|
-
/** A single node in a pipeline graph, referencing a spec template. */
|
|
27
|
-
export interface PipelineNode {
|
|
28
|
-
id: string;
|
|
29
|
-
templateId: string;
|
|
30
|
-
templateType?: string;
|
|
31
|
-
label: string;
|
|
32
|
-
config?: Record<string, unknown>;
|
|
33
|
-
consumes?: string;
|
|
34
|
-
produces?: string;
|
|
35
|
-
delegates?: string;
|
|
36
|
-
}
|
|
37
|
-
/** Condition for conditional edges in the pipeline graph. */
|
|
38
|
-
export interface EdgeCondition {
|
|
39
|
-
field: string;
|
|
40
|
-
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
41
|
-
value: string | number | boolean;
|
|
42
|
-
}
|
|
43
|
-
/** A directed edge between two pipeline nodes. */
|
|
44
|
-
export interface PipelineEdge {
|
|
45
|
-
id: string;
|
|
46
|
-
from: string;
|
|
47
|
-
to: string;
|
|
48
|
-
condition?: EdgeCondition | null;
|
|
49
|
-
}
|
|
50
|
-
/** DAG of pipeline nodes and edges, stored on blueprints. */
|
|
51
|
-
export interface PipelineGraph {
|
|
52
|
-
nodes: PipelineNode[];
|
|
53
|
-
edges: PipelineEdge[];
|
|
54
|
-
}
|
|
55
|
-
export type InstanceStatus = 'pending' | 'designing' | 'planning' | 'building' | 'paused' | 'completed' | 'failed' | 'cancelled';
|
|
56
|
-
export type WorkUnitStatus = 'pending' | 'ready' | 'in_progress' | 'completed' | 'failed';
|
|
57
|
-
export type GateType = 'deterministic' | 'behavioral' | 'adversarial';
|
|
58
|
-
export type SessionType = 'builder' | 'adversary' | 'planner';
|
|
59
|
-
export type FactorySessionStatus = 'starting' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
60
|
-
export type ExecutionUnitStatus = 'idle' | 'assigned' | 'running' | 'terminated';
|
|
61
|
-
/** DB row type for factory_execution_units, mapped to camelCase. */
|
|
62
|
-
export interface ExecutionUnit {
|
|
63
|
-
id: string;
|
|
64
|
-
organizationId: string;
|
|
65
|
-
instanceId: string;
|
|
66
|
-
slotIndex: number;
|
|
67
|
-
status: ExecutionUnitStatus;
|
|
68
|
-
model: string | null;
|
|
69
|
-
claudeSessionId: string | null;
|
|
70
|
-
assignedStrategyId: string | null;
|
|
71
|
-
config: ExecutionUnitConfig | null;
|
|
72
|
-
assignedAt: string | null;
|
|
73
|
-
createdAt: string;
|
|
74
|
-
updatedAt: string;
|
|
75
|
-
}
|
|
76
|
-
/** Blueprint-level execution unit configuration (JSONB shape). */
|
|
77
|
-
export interface ExecutionUnitConfig {
|
|
78
|
-
defaultModel?: string;
|
|
79
|
-
mcpConfig?: Record<string, unknown>;
|
|
80
|
-
agentTeamsEnabled?: boolean;
|
|
81
|
-
envVars?: Record<string, string>;
|
|
82
|
-
}
|
|
83
|
-
export interface DeterministicGateConfig {
|
|
84
|
-
commands: string[];
|
|
85
|
-
}
|
|
86
|
-
export interface BehavioralGateConfig {
|
|
87
|
-
testGlob: string;
|
|
88
|
-
devServerCommand: string;
|
|
89
|
-
timeoutMs: number;
|
|
90
|
-
}
|
|
91
|
-
export interface AdversarialGateConfig {
|
|
92
|
-
maxSessions: number;
|
|
93
|
-
}
|
|
94
|
-
export interface FactoryBlueprint {
|
|
95
|
-
id: string;
|
|
96
|
-
organizationId: string;
|
|
97
|
-
name: string;
|
|
98
|
-
description: string | null;
|
|
99
|
-
operationalNotes: string | null;
|
|
100
|
-
specConstraints: string | null;
|
|
101
|
-
gatesEnabled: string[];
|
|
102
|
-
deterministicConfig: DeterministicGateConfig | null;
|
|
103
|
-
behavioralConfig: BehavioralGateConfig | null;
|
|
104
|
-
adversarialConfig: AdversarialGateConfig | null;
|
|
105
|
-
maxTokenBudget: number | null;
|
|
106
|
-
maxCostBudget: number | null;
|
|
107
|
-
maxWallClockHours: number | null;
|
|
108
|
-
maxIterationsPerWorkUnit: number | null;
|
|
109
|
-
maxWorkUnits: number | null;
|
|
110
|
-
escalationTriggers: string[];
|
|
111
|
-
pauseTimeoutHours: number | null;
|
|
112
|
-
traceChecks: TraceCheckConfig[];
|
|
113
|
-
maxInstanceIterations: number | null;
|
|
114
|
-
auditTimeoutMs: number | null;
|
|
115
|
-
auditMaxReportChars: number | null;
|
|
116
|
-
/** Optional timeout override for the strategy design phase (ms). */
|
|
117
|
-
strategyDesignTimeoutMs: number | null;
|
|
118
|
-
executionUnitCount: number;
|
|
119
|
-
executionUnitConfig: ExecutionUnitConfig | null;
|
|
120
|
-
/** Max gate retry cycles per strategy. Null = fall back to maxInstanceIterations. */
|
|
121
|
-
maxGateIterations: number | null;
|
|
122
|
-
/** How long a strategy can stay in gate_fix_pending (ms). Null = no timeout. */
|
|
123
|
-
gateFixTimeoutMs: number | null;
|
|
124
|
-
/** How long a unit can stay in 'assigned' before escalation (ms). Null = daemon default (300000). */
|
|
125
|
-
unitAssignmentTimeoutMs: number | null;
|
|
126
|
-
/** How long a dispatched work unit can run before escalation (ms). Null = daemon default (1800000). */
|
|
127
|
-
workUnitTimeoutMs: number | null;
|
|
128
|
-
/** How long without stdout before escalation (ms). Null = daemon default (600000). */
|
|
129
|
-
signalSilenceTimeoutMs: number | null;
|
|
130
|
-
/** Whether the AI completion gate (spec review) is enabled. Default false. */
|
|
131
|
-
completionGateEnabled: boolean;
|
|
132
|
-
/** Pipeline graph DAG from the blueprint. Null = legacy single-stage execution. */
|
|
133
|
-
pipelineGraph: PipelineGraph | null;
|
|
134
|
-
status: string;
|
|
135
|
-
createdAt: string;
|
|
136
|
-
updatedAt: string;
|
|
137
|
-
}
|
|
138
|
-
export interface FactoryInstance {
|
|
139
|
-
id: string;
|
|
140
|
-
organizationId: string;
|
|
141
|
-
blueprintId: string;
|
|
142
|
-
productId: string;
|
|
143
|
-
specification: string | null;
|
|
144
|
-
/** Spec type from the originating factory spec (null if instance has no linked spec). */
|
|
145
|
-
specType: SpecType | null;
|
|
146
|
-
specId: string | null;
|
|
147
|
-
status: InstanceStatus;
|
|
148
|
-
currentWorkflowStageId: string | null;
|
|
149
|
-
/** ID of the currently executing pipeline node. Null for legacy instances. */
|
|
150
|
-
currentPipelineNodeId: string | null;
|
|
151
|
-
branchName: string | null;
|
|
152
|
-
worktreePath: string | null;
|
|
153
|
-
tokensUsed: number;
|
|
154
|
-
costUsed: number;
|
|
155
|
-
wallClockStartedAt: string | null;
|
|
156
|
-
wallClockElapsedSeconds: number;
|
|
157
|
-
escalationReason: string | null;
|
|
158
|
-
escalationMessage: string | null;
|
|
159
|
-
escalatedAt: string | null;
|
|
160
|
-
completionMessage: string | null;
|
|
161
|
-
completionReport: FactoryCompletionReport | null;
|
|
162
|
-
completedAt: string | null;
|
|
163
|
-
createdAt: string;
|
|
164
|
-
updatedAt: string;
|
|
165
|
-
}
|
|
166
|
-
export interface FactoryWorkUnit {
|
|
167
|
-
id: string;
|
|
168
|
-
instanceId: string;
|
|
169
|
-
organizationId: string;
|
|
170
|
-
title: string;
|
|
171
|
-
description: string | null;
|
|
172
|
-
sortOrder: number;
|
|
173
|
-
blockedBy: string[];
|
|
174
|
-
status: WorkUnitStatus;
|
|
175
|
-
currentWorkflowStageId: string | null;
|
|
176
|
-
iterationCount: number;
|
|
177
|
-
cycleNumber: number;
|
|
178
|
-
builderSessionId: string | null;
|
|
179
|
-
/** Strategy this work unit belongs to (null for legacy/flat plans). */
|
|
180
|
-
strategyId: string | null;
|
|
181
|
-
/** When true, this unit is owned by the factory engine, not by agent sessions. */
|
|
182
|
-
infrastructureOwned: boolean;
|
|
183
|
-
createdAt: string;
|
|
184
|
-
updatedAt: string;
|
|
185
|
-
}
|
|
186
|
-
export interface FactoryGateResult {
|
|
187
|
-
id: string;
|
|
188
|
-
strategyId: string;
|
|
189
|
-
instanceId: string;
|
|
190
|
-
organizationId: string;
|
|
191
|
-
gateType: GateType;
|
|
192
|
-
iteration: number;
|
|
193
|
-
passed: boolean;
|
|
194
|
-
checkName: string | null;
|
|
195
|
-
output: string | null;
|
|
196
|
-
durationMs: number | null;
|
|
197
|
-
isAdversaryGenerated: boolean;
|
|
198
|
-
createdAt: string;
|
|
199
|
-
}
|
|
200
|
-
export interface FactorySession {
|
|
201
|
-
id: string;
|
|
202
|
-
instanceId: string;
|
|
203
|
-
organizationId: string;
|
|
204
|
-
sessionType: SessionType;
|
|
205
|
-
workUnitId: string | null;
|
|
206
|
-
status: FactorySessionStatus;
|
|
207
|
-
pid: number | null;
|
|
208
|
-
startedAt: string | null;
|
|
209
|
-
endedAt: string | null;
|
|
210
|
-
tokenCount: number | null;
|
|
211
|
-
costEstimate: number | null;
|
|
212
|
-
stdoutPath: string | null;
|
|
213
|
-
stderrPath: string | null;
|
|
214
|
-
lastNarration: string | null;
|
|
215
|
-
lastNarrationAt: string | null;
|
|
216
|
-
activitySummary: Record<string, unknown> | null;
|
|
217
|
-
commits: string[] | null;
|
|
218
|
-
filesModified: string[] | null;
|
|
219
|
-
filesRead: string[] | null;
|
|
220
|
-
exitReason: string | null;
|
|
221
|
-
/** Claude Code internal session ID for --resume support. */
|
|
222
|
-
claudeSessionId: string | null;
|
|
223
|
-
createdAt: string;
|
|
224
|
-
updatedAt: string;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* In-memory tracking of an execution unit.
|
|
228
|
-
* One per slot within a factory instance. Tracks both idle units
|
|
229
|
-
* (waiting for assignment) and running units (active session).
|
|
230
|
-
*/
|
|
231
|
-
export interface ExecutionUnitState {
|
|
232
|
-
/** DB execution unit record ID. */
|
|
233
|
-
unitId: string;
|
|
234
|
-
/** Parent factory instance ID. */
|
|
235
|
-
instanceId: string;
|
|
236
|
-
/** Slot position (0-based). */
|
|
237
|
-
slotIndex: number;
|
|
238
|
-
/** Current unit status. */
|
|
239
|
-
status: ExecutionUnitStatus;
|
|
240
|
-
/** OS process ID of the Claude Code process. Null when no session running. */
|
|
241
|
-
pid: number | null;
|
|
242
|
-
/** Process stdin for sending stream-json messages. Null when no session running. */
|
|
243
|
-
stdin: Writable | null;
|
|
244
|
-
/** StreamJsonParser attached to stdout (typed as unknown to avoid circular dep). */
|
|
245
|
-
streamParser: unknown;
|
|
246
|
-
/** Claude Code internal session ID for --resume support. */
|
|
247
|
-
claudeSessionId: string | null;
|
|
248
|
-
/** Currently assigned strategy ID (null when idle). */
|
|
249
|
-
assignedStrategyId: string | null;
|
|
250
|
-
/** When this unit was assigned to a strategy. Null when idle. */
|
|
251
|
-
assignedAt: Date | null;
|
|
252
|
-
/** Previous strategy ID (for resume-vs-fresh decision). */
|
|
253
|
-
previousStrategyId: string | null;
|
|
254
|
-
/** Activity tracking (typed as unknown to avoid circular dep). */
|
|
255
|
-
activityTracker: unknown;
|
|
256
|
-
/** Session communication adapter (typed as unknown to avoid circular dep). */
|
|
257
|
-
adapter: unknown;
|
|
258
|
-
/** When this unit's session was spawned. Null when idle. */
|
|
259
|
-
startedAt: Date | null;
|
|
260
|
-
/** When work was dispatched to this unit's session. Null when idle or no active dispatch. */
|
|
261
|
-
dispatchedAt: Date | null;
|
|
262
|
-
/** IDs of work units dispatched to this unit's session that have not yet completed. */
|
|
263
|
-
dispatchedWorkUnitIds: Set<string>;
|
|
264
|
-
/** Last stdout activity timestamp. Updated on any stream event. */
|
|
265
|
-
lastActivityAt: Date | null;
|
|
266
|
-
/** Accumulated token usage for this unit's session. */
|
|
267
|
-
tokensUsed: number;
|
|
268
|
-
/** Accumulated cost (USD) for this unit's session. */
|
|
269
|
-
costUsed: number;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* In-memory tracking of a running factory instance.
|
|
273
|
-
* Held in a Map<instanceId, FactoryInstanceState> by the lifecycle manager.
|
|
274
|
-
*/
|
|
275
|
-
export interface FactoryInstanceState {
|
|
276
|
-
instanceId: string;
|
|
277
|
-
blueprintId: string;
|
|
278
|
-
productId: string;
|
|
279
|
-
specType: SpecType | null;
|
|
280
|
-
/** The originating spec ID (null if instance was launched without a spec). */
|
|
281
|
-
specId: string | null;
|
|
282
|
-
status: InstanceStatus;
|
|
283
|
-
currentWorkflowStageId: string | null;
|
|
284
|
-
branchName: string | null;
|
|
285
|
-
worktreePath: string | null;
|
|
286
|
-
specification: string | null;
|
|
287
|
-
blueprint: FactoryBlueprint;
|
|
288
|
-
/** Pipeline graph loaded from blueprint at instance creation. Null = legacy mode. */
|
|
289
|
-
pipelineGraph: PipelineGraph | null;
|
|
290
|
-
/** ID of the currently executing pipeline node. Null for legacy instances or not yet started. */
|
|
291
|
-
currentPipelineNodeId: string | null;
|
|
292
|
-
/** Resolved workflow for this instance (cached at pickup). */
|
|
293
|
-
workflow: ResolvedFactoryWorkflow | null;
|
|
294
|
-
startedAt: Date;
|
|
295
|
-
/** Active builder sessions (legacy tracking, kept for crash recovery compatibility). */
|
|
296
|
-
activeBuilderSessions: Map<string, BuilderState>;
|
|
297
|
-
/** Execution units for this instance, keyed by execution unit ID. */
|
|
298
|
-
executionUnits: Map<string, ExecutionUnitState>;
|
|
299
|
-
/** Timestamp when the instance was escalated (paused). Used for pause timeout. */
|
|
300
|
-
escalatedAt: string | null;
|
|
301
|
-
/** Running total of tokens used across all sessions for this instance. */
|
|
302
|
-
tokensUsed: number;
|
|
303
|
-
/** Running total of cost (USD) across all sessions, including subagent costs. */
|
|
304
|
-
costUsed: number;
|
|
305
|
-
/** Number of completion gate iterations run for this instance. */
|
|
306
|
-
completionGateIterations: number;
|
|
307
|
-
/** Last gate failure feedback per strategy, keyed by strategyId. Used to re-deliver on session resume. */
|
|
308
|
-
gateFailureFeedback: Map<string, string>;
|
|
309
|
-
/** Cached completion report (set after generation, checked for idempotency). */
|
|
310
|
-
completionReport?: FactoryCompletionReport | null;
|
|
311
|
-
/** Gaps identified by the Review pipeline node's completion gate. Injected into next Engineering cycle's prompts and cleared after use. */
|
|
312
|
-
reviewGaps?: Array<{
|
|
313
|
-
area: string;
|
|
314
|
-
description: string;
|
|
315
|
-
severity: string;
|
|
316
|
-
suggestedFix: string;
|
|
317
|
-
}>;
|
|
318
|
-
/** Deployment profile snapshot from the linked product. Injected into agent prompts when present. */
|
|
319
|
-
deploymentProfileSnapshot?: {
|
|
320
|
-
name: string;
|
|
321
|
-
inceptionPrompt: string | null;
|
|
322
|
-
guidelines: string | null;
|
|
323
|
-
} | null;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* In-memory tracking of a running builder Claude Code session.
|
|
327
|
-
*/
|
|
328
|
-
export interface BuilderState {
|
|
329
|
-
sessionId: string;
|
|
330
|
-
workUnitId: string;
|
|
331
|
-
pid: number;
|
|
332
|
-
worktreePath: string;
|
|
333
|
-
startedAt: Date;
|
|
334
|
-
iterationCount: number;
|
|
335
|
-
/** Parsed token usage from the stream-json output (set after process exit). */
|
|
336
|
-
tokenUsage: ParsedTokenUsage | null;
|
|
337
|
-
/** Process stdin handle for sending stream-json messages. Nulled on process exit. */
|
|
338
|
-
stdin: Writable | null;
|
|
339
|
-
/** Claude Code internal session ID (captured from init event). */
|
|
340
|
-
claudeSessionId: string | null;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* In-memory tracking of an adversary Claude Code session.
|
|
344
|
-
*/
|
|
345
|
-
export interface AdversaryState {
|
|
346
|
-
sessionId: string;
|
|
347
|
-
workUnitId: string;
|
|
348
|
-
pid: number;
|
|
349
|
-
worktreePath: string;
|
|
350
|
-
startedAt: Date;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Result of a single gate layer evaluation.
|
|
354
|
-
*/
|
|
355
|
-
export interface GateRunState {
|
|
356
|
-
workUnitId: string;
|
|
357
|
-
instanceId: string;
|
|
358
|
-
gateType: GateType;
|
|
359
|
-
iteration: number;
|
|
360
|
-
passed: boolean;
|
|
361
|
-
results: GateCheckResult[];
|
|
362
|
-
startedAt: Date;
|
|
363
|
-
completedAt: Date | null;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Result of an individual check within a gate layer.
|
|
367
|
-
*/
|
|
368
|
-
export interface GateCheckResult {
|
|
369
|
-
checkName: string;
|
|
370
|
-
passed: boolean;
|
|
371
|
-
output: string;
|
|
372
|
-
durationMs: number;
|
|
373
|
-
isAdversaryGenerated: boolean;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* A single work unit in the AI-generated work plan.
|
|
377
|
-
* tempId is used for DAG references before real UUIDs are assigned.
|
|
378
|
-
*/
|
|
379
|
-
export interface WorkPlanUnit {
|
|
380
|
-
tempId: string;
|
|
381
|
-
title: string;
|
|
382
|
-
description: string;
|
|
383
|
-
sortOrder: number;
|
|
384
|
-
blockedBy: string[];
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* The full work plan returned by the planning phase AI.
|
|
388
|
-
*/
|
|
389
|
-
export interface WorkPlan {
|
|
390
|
-
workUnits: WorkPlanUnit[];
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* A single entry in the codebase audit report.
|
|
394
|
-
* Describes an area of the specification that is fully, partially, or not
|
|
395
|
-
* implemented in the existing codebase.
|
|
396
|
-
*/
|
|
397
|
-
export interface AuditEntry {
|
|
398
|
-
area: string;
|
|
399
|
-
description: string;
|
|
400
|
-
relevantFiles: string[];
|
|
401
|
-
confidence: 'high' | 'medium' | 'low';
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* A conflict between the existing codebase and the specification.
|
|
405
|
-
*/
|
|
406
|
-
export interface AuditConflict {
|
|
407
|
-
area: string;
|
|
408
|
-
existingBehavior: string;
|
|
409
|
-
specifiedBehavior: string;
|
|
410
|
-
relevantFiles: string[];
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Structured report from the pre-planning codebase audit.
|
|
414
|
-
* Produced by running Claude Code in --print mode to scan the codebase
|
|
415
|
-
* against the specification before the planning phase generates work units.
|
|
416
|
-
*/
|
|
417
|
-
export interface AuditReport {
|
|
418
|
-
existingImplementations: AuditEntry[];
|
|
419
|
-
partialImplementations: AuditEntry[];
|
|
420
|
-
gaps: AuditEntry[];
|
|
421
|
-
conflicts: AuditConflict[];
|
|
422
|
-
summary: string;
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* A gap identified by the completion gate -- something the specification
|
|
426
|
-
* requires that is not present in the factory instance's output.
|
|
427
|
-
*/
|
|
428
|
-
export interface CompletionGap {
|
|
429
|
-
area: string;
|
|
430
|
-
description: string;
|
|
431
|
-
severity: 'critical' | 'important';
|
|
432
|
-
suggestedFix: string;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* Result of the instance-level completion gate AI review.
|
|
436
|
-
* Determines whether the full specification has been satisfied by
|
|
437
|
-
* the combined output of all work units.
|
|
438
|
-
*/
|
|
439
|
-
export interface CompletionGateResult {
|
|
440
|
-
passed: boolean;
|
|
441
|
-
confidence: 'high' | 'medium' | 'low';
|
|
442
|
-
summary: string;
|
|
443
|
-
gaps: CompletionGap[];
|
|
444
|
-
suggestions: string[];
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Persisted record of a cycle evaluation. One row per completion gate
|
|
448
|
-
* evaluation per iteration cycle. Stored in factory_cycle_evaluations table.
|
|
449
|
-
*/
|
|
450
|
-
export interface FactoryCycleEvaluation {
|
|
451
|
-
id: string;
|
|
452
|
-
instanceId: string;
|
|
453
|
-
organizationId: string;
|
|
454
|
-
cycleNumber: number;
|
|
455
|
-
passed: boolean;
|
|
456
|
-
confidence: 'high' | 'medium' | 'low';
|
|
457
|
-
summary: string;
|
|
458
|
-
gaps: CompletionGap[];
|
|
459
|
-
suggestions: string[];
|
|
460
|
-
createdAt: string;
|
|
461
|
-
}
|
|
462
|
-
/** Score for a single spec dimension in the quality assessment. */
|
|
463
|
-
export interface DimensionScore {
|
|
464
|
-
dimension: string;
|
|
465
|
-
score: 'high' | 'medium' | 'low';
|
|
466
|
-
notes: string;
|
|
467
|
-
}
|
|
468
|
-
/** How well the spec served the factory -- per-dimension scores and identified gaps. */
|
|
469
|
-
export interface SpecQualityAssessment {
|
|
470
|
-
overallScore: 'high' | 'medium' | 'low';
|
|
471
|
-
dimensionScores: DimensionScore[];
|
|
472
|
-
gaps: string[];
|
|
473
|
-
}
|
|
474
|
-
/** Score for a single strategy in the design assessment. */
|
|
475
|
-
export interface StrategyScore {
|
|
476
|
-
strategyName: string;
|
|
477
|
-
score: 'high' | 'medium' | 'low';
|
|
478
|
-
notes: string;
|
|
479
|
-
}
|
|
480
|
-
/** How well the strategy decomposition worked -- parallel utilization and sizing. */
|
|
481
|
-
export interface StrategyDesignAssessment {
|
|
482
|
-
overallScore: 'high' | 'medium' | 'low';
|
|
483
|
-
strategyScores: StrategyScore[];
|
|
484
|
-
improvements: string[];
|
|
485
|
-
}
|
|
486
|
-
/** Computed execution metrics (not AI-generated). */
|
|
487
|
-
export interface ExecutionMetrics {
|
|
488
|
-
totalCycles: number;
|
|
489
|
-
totalWorkUnits: number;
|
|
490
|
-
completedWorkUnits: number;
|
|
491
|
-
failedWorkUnits: number;
|
|
492
|
-
gatePassRate: number;
|
|
493
|
-
totalTokensUsed: number;
|
|
494
|
-
wallClockSeconds: number;
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Structured keep/stop/change retrospective for a completed factory instance.
|
|
498
|
-
* Generated after the final completion gate passes. The AI produces
|
|
499
|
-
* keep/stop/change + assessments; executionMetrics are computed separately.
|
|
500
|
-
*/
|
|
501
|
-
export interface FactoryCompletionReport {
|
|
502
|
-
keep: string[];
|
|
503
|
-
stop: string[];
|
|
504
|
-
change: string[];
|
|
505
|
-
specQualityAssessment: SpecQualityAssessment;
|
|
506
|
-
strategyDesignAssessment: StrategyDesignAssessment;
|
|
507
|
-
executionMetrics: ExecutionMetrics;
|
|
508
|
-
}
|
|
509
|
-
/** Trace check type: built-in types have default patterns, custom requires all fields. */
|
|
510
|
-
export type TraceCheckType = 'action_handler' | 'import_export' | 'custom';
|
|
511
|
-
/**
|
|
512
|
-
* Configuration for a single trace check. Built-in types use defaults from
|
|
513
|
-
* BUILTIN_TRACES with optional overrides. Custom types require all fields.
|
|
514
|
-
*/
|
|
515
|
-
export interface TraceCheckConfig {
|
|
516
|
-
type: TraceCheckType;
|
|
517
|
-
name?: string;
|
|
518
|
-
sourceGlob?: string;
|
|
519
|
-
sourcePattern?: string;
|
|
520
|
-
targetGlob?: string;
|
|
521
|
-
targetPattern?: string;
|
|
522
|
-
description?: string;
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* A fully resolved trace check with all fields populated.
|
|
526
|
-
* Ready to be executed by the trace engine.
|
|
527
|
-
*/
|
|
528
|
-
export interface TraceCheck {
|
|
529
|
-
name: string;
|
|
530
|
-
type: TraceCheckType;
|
|
531
|
-
sourceGlob: string;
|
|
532
|
-
sourcePattern: string;
|
|
533
|
-
targetGlob: string;
|
|
534
|
-
targetPattern: string;
|
|
535
|
-
description: string;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* A single unresolved cross-boundary reference (source has no matching target).
|
|
539
|
-
*/
|
|
540
|
-
export interface TraceMiss {
|
|
541
|
-
value: string;
|
|
542
|
-
sourceFile: string;
|
|
543
|
-
line: number;
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Result of running a single trace check.
|
|
547
|
-
*/
|
|
548
|
-
export interface TraceResult {
|
|
549
|
-
checkName: string;
|
|
550
|
-
passed: boolean;
|
|
551
|
-
missingTargets: TraceMiss[];
|
|
552
|
-
orphanedTargets: string[];
|
|
553
|
-
sourceCount: number;
|
|
554
|
-
targetCount: number;
|
|
555
|
-
durationMs: number;
|
|
556
|
-
error?: string;
|
|
557
|
-
}
|
|
558
|
-
export type { GuardEnforcement, TriggerEvent, TriggerActionType, WorkflowStage, WorkflowTransition, DecisionPath, WorkflowGuard, WorkflowTrigger, GuardConditionNode, ContextDirective, TriggerExecutionTarget, FactoryTemplateContext, ConditionEvalResult, GuardEvalResult, TransitionGuardResult, TransitionEvaluationRecord, EvaluationContext, } from '@telora/daemon-core';
|
|
559
|
-
import type { WorkflowStage, WorkflowTransition } from '@telora/daemon-core';
|
|
560
|
-
/** Resolved workflow with stages and transitions, cached per instance. */
|
|
561
|
-
export interface ResolvedFactoryWorkflow {
|
|
562
|
-
id: string;
|
|
563
|
-
stages: WorkflowStage[];
|
|
564
|
-
transitions: WorkflowTransition[];
|
|
565
|
-
/** Stage name to ID lookup. */
|
|
566
|
-
stageByName: Map<string, WorkflowStage>;
|
|
567
|
-
/** Stage ID to stage lookup. */
|
|
568
|
-
stageById: Map<string, WorkflowStage>;
|
|
569
|
-
}
|
|
570
|
-
/** Context operation sent to a running builder session. */
|
|
571
|
-
export type ContextOperation = {
|
|
572
|
-
type: 'compact';
|
|
573
|
-
} | {
|
|
574
|
-
type: 'reset';
|
|
575
|
-
contextPayload: ContextPayload;
|
|
576
|
-
} | {
|
|
577
|
-
type: 'load_files';
|
|
578
|
-
files: string[];
|
|
579
|
-
};
|
|
580
|
-
/** A simplified interface contract item for context payloads. */
|
|
581
|
-
export interface ContextContractItem {
|
|
582
|
-
name: string;
|
|
583
|
-
description: string;
|
|
584
|
-
}
|
|
585
|
-
/** State loaded into a fresh builder session after a context reset. */
|
|
586
|
-
export interface ContextPayload {
|
|
587
|
-
workUnitTitle: string;
|
|
588
|
-
workUnitDescription: string;
|
|
589
|
-
strategyScope: string;
|
|
590
|
-
interfaceContracts: {
|
|
591
|
-
produces: ContextContractItem[];
|
|
592
|
-
consumes: ContextContractItem[];
|
|
593
|
-
};
|
|
594
|
-
recentGateResults: GateCheckResult[];
|
|
595
|
-
relevantFiles: string[];
|
|
596
|
-
operationalNotes: string | null;
|
|
597
|
-
}
|
|
598
|
-
/** Result of executing a context management operation. */
|
|
599
|
-
export interface ContextOperationResult {
|
|
600
|
-
success: boolean;
|
|
601
|
-
operation: ContextOperation['type'];
|
|
602
|
-
error?: string;
|
|
603
|
-
/** The message text to send to the builder session (prompt for reset, instruction for others). */
|
|
604
|
-
message?: string;
|
|
605
|
-
newSessionId?: string;
|
|
606
|
-
}
|
|
607
|
-
/** Interface for executing context management operations on builder sessions. */
|
|
608
|
-
export interface ContextManager {
|
|
609
|
-
executeOperation(sessionId: string, operation: ContextOperation): Promise<ContextOperationResult>;
|
|
610
|
-
buildResetPayload(state: FactoryInstanceState, workUnitId: string): ContextPayload;
|
|
611
|
-
}
|
|
9
|
+
export type * from './types/index.js';
|
|
612
10
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,GAAG,iBAAiB,CAAC;AAM/D,2DAA2D;AAC3D,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,OAAO,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0DAA0D;IAC1D,SAAS,EAAE,sBAAsB,CAAC;CACnC;AAMD,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;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.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mBAAmB,kBAAkB,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Factory orchestrator runtime types.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* This file re-exports all types from the domain-focused type files
|
|
5
|
+
* in ./types/ for backward compatibility. Consumers can continue to
|
|
6
|
+
* import from './types.js' unchanged, or import directly from the
|
|
7
|
+
* domain files for narrower imports.
|
|
7
8
|
*/
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/dist/unit-session.js
CHANGED
|
@@ -86,7 +86,7 @@ export async function spawnUnitSession(unit, strategy, state, config, governor)
|
|
|
86
86
|
if (resumeClaudeSessionId) {
|
|
87
87
|
args.push('--resume', resumeClaudeSessionId);
|
|
88
88
|
}
|
|
89
|
-
args.push(...buildStreamJsonArgs(
|
|
89
|
+
args.push(...buildStreamJsonArgs());
|
|
90
90
|
args.push('--teammate-mode', 'in-process');
|
|
91
91
|
// Acquire a resource governor slot
|
|
92
92
|
let slotAcquired = false;
|