@telora/daemon 0.13.17 → 0.13.19
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/build-info.json +2 -2
- package/dist/assembly-resolvers.js +219 -0
- package/dist/assembly-resolvers.js.map +1 -1
- package/dist/delivery-lifecycle.d.ts.map +1 -1
- package/dist/delivery-lifecycle.js.map +1 -1
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +6 -61
- package/dist/listener.js.map +1 -1
- package/dist/loop-engine.d.ts +115 -0
- package/dist/loop-engine.d.ts.map +1 -0
- package/dist/loop-engine.js +498 -0
- package/dist/loop-engine.js.map +1 -0
- package/dist/loop-event-bus.d.ts +28 -0
- package/dist/loop-event-bus.d.ts.map +1 -0
- package/dist/loop-event-bus.js +35 -0
- package/dist/loop-event-bus.js.map +1 -0
- package/dist/loop-llm-client.d.ts +16 -0
- package/dist/loop-llm-client.d.ts.map +1 -0
- package/dist/loop-llm-client.js +80 -0
- package/dist/loop-llm-client.js.map +1 -0
- package/dist/loop-prompt-builder.d.ts +39 -0
- package/dist/loop-prompt-builder.d.ts.map +1 -0
- package/dist/loop-prompt-builder.js +168 -0
- package/dist/loop-prompt-builder.js.map +1 -0
- package/dist/loop-variance.d.ts +89 -0
- package/dist/loop-variance.d.ts.map +1 -0
- package/dist/loop-variance.js +283 -0
- package/dist/loop-variance.js.map +1 -0
- package/dist/review-spawner.d.ts +32 -0
- package/dist/review-spawner.d.ts.map +1 -0
- package/dist/review-spawner.js +153 -0
- package/dist/review-spawner.js.map +1 -0
- package/dist/state-cascade.d.ts.map +1 -1
- package/dist/state-cascade.js +16 -0
- package/dist/state-cascade.js.map +1 -1
- package/dist/strategy-completion.d.ts.map +1 -1
- package/dist/strategy-completion.js +22 -28
- package/dist/strategy-completion.js.map +1 -1
- package/dist/team-spawner.d.ts.map +1 -1
- package/dist/team-spawner.js +15 -6
- package/dist/team-spawner.js.map +1 -1
- package/dist/unified-shell.d.ts.map +1 -1
- package/dist/unified-shell.js +43 -0
- package/dist/unified-shell.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variance computation for the Loop Agent differential receiver.
|
|
3
|
+
*
|
|
4
|
+
* Compares intent (loop data) against forecasted reality (metrics + projections)
|
|
5
|
+
* and produces a structured VarianceResult. Pure function, no side effects.
|
|
6
|
+
*/
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Computation
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
/**
|
|
11
|
+
* Compute variance between intent and forecasted reality.
|
|
12
|
+
*
|
|
13
|
+
* @param intent - Loop data (documents, questions, answers, persona)
|
|
14
|
+
* @param reality - Reality metrics and projections
|
|
15
|
+
* @param targetDate - Strategy target date (ISO string or null)
|
|
16
|
+
* @param previousVariance - Previous variance result for trend computation (optional)
|
|
17
|
+
* @returns Structured variance result
|
|
18
|
+
*/
|
|
19
|
+
export function computeVariance(intent, reality, targetDate, previousVariance) {
|
|
20
|
+
const metrics = reality.metrics;
|
|
21
|
+
const completion = reality.projections.completion;
|
|
22
|
+
const cost = reality.projections.cost;
|
|
23
|
+
const schedule = computeScheduleVariance(targetDate, completion);
|
|
24
|
+
const throughput = computeThroughputVariance(metrics, completion, targetDate);
|
|
25
|
+
const costVar = computeCostVariance(cost);
|
|
26
|
+
const staleness = computeStaleness(intent);
|
|
27
|
+
const completionConfidence = completion
|
|
28
|
+
? completion.confidence ?? null
|
|
29
|
+
: null;
|
|
30
|
+
const dimensions = {
|
|
31
|
+
schedule,
|
|
32
|
+
throughput,
|
|
33
|
+
cost: costVar,
|
|
34
|
+
staleness,
|
|
35
|
+
completionConfidence,
|
|
36
|
+
};
|
|
37
|
+
const noiseFlags = computeNoiseFlags(metrics);
|
|
38
|
+
const lockStatus = determineLockStatus(dimensions, noiseFlags);
|
|
39
|
+
const trendDirection = computeTrendDirection(dimensions, previousVariance ?? null);
|
|
40
|
+
const summary = buildSummary(lockStatus, dimensions, noiseFlags, trendDirection);
|
|
41
|
+
return { lockStatus, dimensions, noiseFlags, summary, trendDirection };
|
|
42
|
+
}
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// Dimension computations
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
function computeScheduleVariance(targetDate, completion) {
|
|
47
|
+
if (!targetDate) {
|
|
48
|
+
return { targetDate: null, projectedDate: null, varianceDays: 0, direction: 'unknown' };
|
|
49
|
+
}
|
|
50
|
+
const target = new Date(targetDate);
|
|
51
|
+
if (isNaN(target.getTime())) {
|
|
52
|
+
return { targetDate, projectedDate: null, varianceDays: 0, direction: 'unknown' };
|
|
53
|
+
}
|
|
54
|
+
if (!completion || completion.status === 'complete') {
|
|
55
|
+
return { targetDate, projectedDate: null, varianceDays: 0, direction: 'on_track' };
|
|
56
|
+
}
|
|
57
|
+
if (completion.status === 'stalled') {
|
|
58
|
+
// Stalled means we can't project -- treat as behind
|
|
59
|
+
return { targetDate, projectedDate: null, varianceDays: Infinity, direction: 'behind' };
|
|
60
|
+
}
|
|
61
|
+
const projectedDateStr = completion.projectedCompletionDate;
|
|
62
|
+
if (!projectedDateStr) {
|
|
63
|
+
return { targetDate, projectedDate: null, varianceDays: 0, direction: 'unknown' };
|
|
64
|
+
}
|
|
65
|
+
const projected = new Date(projectedDateStr);
|
|
66
|
+
const diffMs = projected.getTime() - target.getTime();
|
|
67
|
+
const diffDays = Math.round(diffMs / (24 * 60 * 60 * 1000));
|
|
68
|
+
let direction;
|
|
69
|
+
if (diffDays <= 0)
|
|
70
|
+
direction = 'ahead';
|
|
71
|
+
else if (diffDays <= 2)
|
|
72
|
+
direction = 'on_track';
|
|
73
|
+
else
|
|
74
|
+
direction = 'behind';
|
|
75
|
+
return {
|
|
76
|
+
targetDate,
|
|
77
|
+
projectedDate: projectedDateStr,
|
|
78
|
+
varianceDays: diffDays,
|
|
79
|
+
direction,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function computeThroughputVariance(metrics, completion, targetDate) {
|
|
83
|
+
if (!metrics)
|
|
84
|
+
return null;
|
|
85
|
+
const currentVelocity = completion
|
|
86
|
+
? completion.velocity ?? 0
|
|
87
|
+
: 0;
|
|
88
|
+
const remainingIssues = completion
|
|
89
|
+
? completion.remainingIssues ?? 0
|
|
90
|
+
: (metrics.issues_todo ?? 0) + (metrics.issues_in_progress ?? 0);
|
|
91
|
+
// Calculate required velocity if we have a target date
|
|
92
|
+
let requiredVelocity = null;
|
|
93
|
+
if (targetDate && remainingIssues > 0) {
|
|
94
|
+
const target = new Date(targetDate);
|
|
95
|
+
const daysToTarget = Math.max(1, (target.getTime() - Date.now()) / (24 * 60 * 60 * 1000));
|
|
96
|
+
requiredVelocity = remainingIssues / daysToTarget;
|
|
97
|
+
}
|
|
98
|
+
// Determine trend from windowed throughput
|
|
99
|
+
const done7d = metrics.issues_done_7d ?? 0;
|
|
100
|
+
const done14d = metrics.issues_done_14d ?? 0;
|
|
101
|
+
const done30d = metrics.issues_done_30d ?? 0;
|
|
102
|
+
let trend;
|
|
103
|
+
if (done7d === 0 && done14d === 0) {
|
|
104
|
+
trend = 'stalled';
|
|
105
|
+
}
|
|
106
|
+
else if (done14d > 0) {
|
|
107
|
+
// Compare first-half vs second-half velocity
|
|
108
|
+
const firstHalf = done14d - done7d; // issues 7-14 days ago
|
|
109
|
+
const secondHalf = done7d; // issues in last 7 days
|
|
110
|
+
if (secondHalf > firstHalf * 1.2)
|
|
111
|
+
trend = 'accelerating';
|
|
112
|
+
else if (secondHalf < firstHalf * 0.8)
|
|
113
|
+
trend = 'decelerating';
|
|
114
|
+
else
|
|
115
|
+
trend = 'steady';
|
|
116
|
+
}
|
|
117
|
+
else if (done30d > 0) {
|
|
118
|
+
trend = 'decelerating'; // Only older completions
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
trend = 'stalled';
|
|
122
|
+
}
|
|
123
|
+
return { currentVelocity, requiredVelocity, trend, remainingIssues };
|
|
124
|
+
}
|
|
125
|
+
function computeCostVariance(cost) {
|
|
126
|
+
if (!cost)
|
|
127
|
+
return null;
|
|
128
|
+
return {
|
|
129
|
+
costToDate: cost.costToDate ?? 0,
|
|
130
|
+
projectedTotal: cost.projectedTotalCost ?? null,
|
|
131
|
+
burnRatePerDay: cost.burnRatePerDay ?? 0,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function computeStaleness(intent) {
|
|
135
|
+
// If there are no documents, loop data hasn't been initialized yet
|
|
136
|
+
if (intent.documents.length === 0) {
|
|
137
|
+
return { isStale: true, reason: 'No loop documents exist yet' };
|
|
138
|
+
}
|
|
139
|
+
// Check if many questions are unanswered
|
|
140
|
+
const unanswered = intent.questions.filter(q => !q.answer && !q.isRetired);
|
|
141
|
+
if (unanswered.length > intent.questions.length * 0.5 && intent.questions.length > 0) {
|
|
142
|
+
return { isStale: true, reason: `${unanswered.length}/${intent.questions.length} questions unanswered` };
|
|
143
|
+
}
|
|
144
|
+
return { isStale: false, reason: null };
|
|
145
|
+
}
|
|
146
|
+
// ---------------------------------------------------------------------------
|
|
147
|
+
// Noise detection
|
|
148
|
+
// ---------------------------------------------------------------------------
|
|
149
|
+
function computeNoiseFlags(metrics) {
|
|
150
|
+
if (!metrics) {
|
|
151
|
+
return { activityWithoutProgress: false, extendedCodingNoVerify: false, highEscalationRate: false };
|
|
152
|
+
}
|
|
153
|
+
// High activity without progress: many sessions but no recent completions
|
|
154
|
+
const sessions = metrics.session_count ?? 0;
|
|
155
|
+
const done7d = metrics.issues_done_7d ?? 0;
|
|
156
|
+
const activityWithoutProgress = sessions > 5 && done7d === 0;
|
|
157
|
+
// Extended coding without verify: all deliveries in coding, none in verify/done
|
|
158
|
+
const coding = metrics.deliveries_coding ?? 0;
|
|
159
|
+
const verify = metrics.deliveries_verify ?? 0;
|
|
160
|
+
const done = metrics.deliveries_done ?? 0;
|
|
161
|
+
const total = metrics.total_deliveries ?? 0;
|
|
162
|
+
const extendedCodingNoVerify = coding > 0 && verify === 0 && done === 0 && total > 0;
|
|
163
|
+
// High escalation rate
|
|
164
|
+
const escalations = metrics.escalation_count ?? 0;
|
|
165
|
+
const highEscalationRate = sessions > 3 && escalations > sessions * 0.3;
|
|
166
|
+
return { activityWithoutProgress, extendedCodingNoVerify, highEscalationRate };
|
|
167
|
+
}
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
// Trend direction: is the gap converging or diverging?
|
|
170
|
+
// ---------------------------------------------------------------------------
|
|
171
|
+
function computeTrendDirection(current, previous) {
|
|
172
|
+
if (!previous)
|
|
173
|
+
return 'stable';
|
|
174
|
+
// Compute a simple "gap score" for current and previous.
|
|
175
|
+
// Higher score = larger gap between intent and reality.
|
|
176
|
+
const currentScore = gapScore(current);
|
|
177
|
+
const previousScore = gapScore(previous.dimensions);
|
|
178
|
+
// If both are zero, stable
|
|
179
|
+
if (currentScore === 0 && previousScore === 0)
|
|
180
|
+
return 'stable';
|
|
181
|
+
const delta = currentScore - previousScore;
|
|
182
|
+
// Threshold: 10% relative change or absolute change > 0.5
|
|
183
|
+
const threshold = Math.max(previousScore * 0.1, 0.5);
|
|
184
|
+
if (delta < -threshold)
|
|
185
|
+
return 'converging';
|
|
186
|
+
if (delta > threshold)
|
|
187
|
+
return 'diverging';
|
|
188
|
+
return 'stable';
|
|
189
|
+
}
|
|
190
|
+
function gapScore(dimensions) {
|
|
191
|
+
let score = 0;
|
|
192
|
+
// Schedule: days behind adds to gap score
|
|
193
|
+
if (dimensions.schedule) {
|
|
194
|
+
const days = dimensions.schedule.varianceDays;
|
|
195
|
+
if (days === Infinity)
|
|
196
|
+
score += 10;
|
|
197
|
+
else if (dimensions.schedule.direction === 'behind')
|
|
198
|
+
score += Math.min(days, 30);
|
|
199
|
+
}
|
|
200
|
+
// Throughput: stalled or decelerating increases gap
|
|
201
|
+
if (dimensions.throughput) {
|
|
202
|
+
const remaining = dimensions.throughput.remainingIssues;
|
|
203
|
+
if (dimensions.throughput.trend === 'stalled' && remaining > 0)
|
|
204
|
+
score += 5;
|
|
205
|
+
else if (dimensions.throughput.trend === 'decelerating')
|
|
206
|
+
score += 2;
|
|
207
|
+
// Velocity deficit
|
|
208
|
+
if (dimensions.throughput.requiredVelocity != null && dimensions.throughput.requiredVelocity > 0) {
|
|
209
|
+
const deficit = Math.max(0, dimensions.throughput.requiredVelocity - dimensions.throughput.currentVelocity);
|
|
210
|
+
score += deficit;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// Confidence: lower confidence = larger gap
|
|
214
|
+
if (dimensions.completionConfidence != null) {
|
|
215
|
+
score += (1 - dimensions.completionConfidence) * 5;
|
|
216
|
+
}
|
|
217
|
+
return score;
|
|
218
|
+
}
|
|
219
|
+
// ---------------------------------------------------------------------------
|
|
220
|
+
// Lock status determination
|
|
221
|
+
// ---------------------------------------------------------------------------
|
|
222
|
+
function determineLockStatus(dimensions, noiseFlags) {
|
|
223
|
+
// Unlocked: significant divergence
|
|
224
|
+
if (dimensions.schedule?.direction === 'behind' && dimensions.schedule.varianceDays > 7) {
|
|
225
|
+
return 'unlocked';
|
|
226
|
+
}
|
|
227
|
+
if (dimensions.throughput?.trend === 'stalled' && (dimensions.throughput.remainingIssues ?? 0) > 0) {
|
|
228
|
+
return 'unlocked';
|
|
229
|
+
}
|
|
230
|
+
if (dimensions.completionConfidence !== null && dimensions.completionConfidence < 0.3) {
|
|
231
|
+
return 'unlocked';
|
|
232
|
+
}
|
|
233
|
+
// Drifting: some divergence
|
|
234
|
+
if (dimensions.schedule?.direction === 'behind') {
|
|
235
|
+
return 'drifting';
|
|
236
|
+
}
|
|
237
|
+
if (dimensions.throughput?.trend === 'decelerating') {
|
|
238
|
+
return 'drifting';
|
|
239
|
+
}
|
|
240
|
+
if (dimensions.staleness?.isStale) {
|
|
241
|
+
return 'drifting';
|
|
242
|
+
}
|
|
243
|
+
if (noiseFlags.activityWithoutProgress || noiseFlags.extendedCodingNoVerify) {
|
|
244
|
+
return 'drifting';
|
|
245
|
+
}
|
|
246
|
+
// Locked: within thresholds
|
|
247
|
+
return 'locked';
|
|
248
|
+
}
|
|
249
|
+
// ---------------------------------------------------------------------------
|
|
250
|
+
// Summary builder
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
function buildSummary(lockStatus, dimensions, noiseFlags, trendDirection) {
|
|
253
|
+
const parts = [];
|
|
254
|
+
parts.push(`Lock status: ${lockStatus}`);
|
|
255
|
+
if (trendDirection !== 'stable') {
|
|
256
|
+
parts.push(`Trend: ${trendDirection}`);
|
|
257
|
+
}
|
|
258
|
+
if (dimensions.schedule) {
|
|
259
|
+
if (dimensions.schedule.direction === 'behind') {
|
|
260
|
+
parts.push(`Schedule: ${dimensions.schedule.varianceDays === Infinity ? 'stalled (no projection)' : `${dimensions.schedule.varianceDays}d behind target`}`);
|
|
261
|
+
}
|
|
262
|
+
else if (dimensions.schedule.direction === 'ahead') {
|
|
263
|
+
parts.push(`Schedule: ${Math.abs(dimensions.schedule.varianceDays)}d ahead of target`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (dimensions.throughput) {
|
|
267
|
+
parts.push(`Throughput: ${dimensions.throughput.trend} (${dimensions.throughput.currentVelocity.toFixed(2)} issues/day, ${dimensions.throughput.remainingIssues} remaining)`);
|
|
268
|
+
}
|
|
269
|
+
if (dimensions.cost && dimensions.cost.costToDate > 0) {
|
|
270
|
+
parts.push(`Cost: $${dimensions.cost.costToDate.toFixed(2)} spent${dimensions.cost.projectedTotal ? `, $${dimensions.cost.projectedTotal.toFixed(2)} projected` : ''}`);
|
|
271
|
+
}
|
|
272
|
+
if (dimensions.completionConfidence !== null) {
|
|
273
|
+
parts.push(`Confidence: ${dimensions.completionConfidence}`);
|
|
274
|
+
}
|
|
275
|
+
if (noiseFlags.activityWithoutProgress)
|
|
276
|
+
parts.push('Noise: activity without progress');
|
|
277
|
+
if (noiseFlags.extendedCodingNoVerify)
|
|
278
|
+
parts.push('Noise: extended coding without verification');
|
|
279
|
+
if (noiseFlags.highEscalationRate)
|
|
280
|
+
parts.push('Noise: high escalation rate');
|
|
281
|
+
return parts.join('. ');
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=loop-variance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop-variance.js","sourceRoot":"","sources":["../src/loop-variance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyFH,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAsB,EACtB,OAAoB,EACpB,UAAyB,EACzB,gBAAwC;IAExC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAwD,CAAC;IACjF,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,UAA4C,CAAC;IACpF,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,IAAsC,CAAC;IAExE,MAAM,QAAQ,GAAG,uBAAuB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACjE,MAAM,UAAU,GAAG,yBAAyB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,oBAAoB,GAAG,UAAU;QACrC,CAAC,CAAE,UAAU,CAAC,UAA4B,IAAI,IAAI;QAClD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,UAAU,GAAuB;QACrC,QAAQ;QACR,UAAU;QACV,IAAI,EAAE,OAAO;QACb,SAAS;QACT,oBAAoB;KACrB,CAAC;IAEF,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,mBAAmB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,qBAAqB,CAAC,UAAU,E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AAI,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,UAAU,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1K,CAAC;IAED,IAAI,UAAU,CAAC,oBAAoB,KAAK,IAAI,EAAE,CAAC;QAC7C,KAAK,CAAC,IAAI,CAAC,eAAe,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,UAAU,CAAC,uBAAuB;QAAE,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;IACvF,IAAI,UAAU,CAAC,sBAAsB;QAAE,KAAK,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;IACjG,IAAI,UAAU,CAAC,kBAAkB;QAAE,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAE7E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review spawner.
|
|
3
|
+
*
|
|
4
|
+
* First-class review handling in the poll loop. Detects strategies
|
|
5
|
+
* in `in_review` status and spawns a review team directly -- no
|
|
6
|
+
* directive executor, no pending spawn directives, no special seeding.
|
|
7
|
+
*
|
|
8
|
+
* The review team examines diffs against acceptance criteria and creates
|
|
9
|
+
* issues on specific deliveries where it finds gaps. When the team exits,
|
|
10
|
+
* the exit handler moves the strategy back to verify. The existing
|
|
11
|
+
* checkVerifyDeliveriesForOpenIssues poll handles delivery-level routing
|
|
12
|
+
* to iterating.
|
|
13
|
+
*/
|
|
14
|
+
import type { DaemonConfig, AgentRole } from './types.js';
|
|
15
|
+
import './assembly-resolvers.js';
|
|
16
|
+
/**
|
|
17
|
+
* Consume a pending review message for a strategy.
|
|
18
|
+
* Returns the message and removes it from the map.
|
|
19
|
+
*/
|
|
20
|
+
export declare function consumePendingReviewMessage(strategyId: string): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a strategy has a pending review message.
|
|
23
|
+
*/
|
|
24
|
+
export declare function hasPendingReview(strategyId: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Detect strategies in `in_review` status and spawn review teams.
|
|
27
|
+
*
|
|
28
|
+
* Called from the daemon poll loop. For each in_review strategy without
|
|
29
|
+
* an active team, assembles the review prompt and spawns a review team.
|
|
30
|
+
*/
|
|
31
|
+
export declare function processReviewStrategies(config: DaemonConfig, roles: ReadonlyMap<string, AgentRole>): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=review-spawner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-spawner.d.ts","sourceRoot":"","sources":["../src/review-spawner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK1D,OAAO,yBAAyB,CAAC;AAsFjC;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,GACpC,OAAO,CAAC,IAAI,CAAC,CAqCf"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review spawner.
|
|
3
|
+
*
|
|
4
|
+
* First-class review handling in the poll loop. Detects strategies
|
|
5
|
+
* in `in_review` status and spawns a review team directly -- no
|
|
6
|
+
* directive executor, no pending spawn directives, no special seeding.
|
|
7
|
+
*
|
|
8
|
+
* The review team examines diffs against acceptance criteria and creates
|
|
9
|
+
* issues on specific deliveries where it finds gaps. When the team exits,
|
|
10
|
+
* the exit handler moves the strategy back to verify. The existing
|
|
11
|
+
* checkVerifyDeliveriesForOpenIssues poll handles delivery-level routing
|
|
12
|
+
* to iterating.
|
|
13
|
+
*/
|
|
14
|
+
import { getActiveStrategies } from './queries/deliveries.js';
|
|
15
|
+
import { getStrategyDeliveries } from './queries/strategies.js';
|
|
16
|
+
import { resolveAssemblyRecipe } from './assembly-engine.js';
|
|
17
|
+
// Ensure resolvers are registered
|
|
18
|
+
import './assembly-resolvers.js';
|
|
19
|
+
import { hasActiveTeam, getActiveTeamCount } from './strategy-executor.js';
|
|
20
|
+
import { spawnStrategyTeam } from './team-spawner.js';
|
|
21
|
+
import { isInSpawnCooldown } from './spawn-cooldown.js';
|
|
22
|
+
import { configForProduct } from './config.js';
|
|
23
|
+
/**
|
|
24
|
+
* Assembly recipe for review context.
|
|
25
|
+
* Gathers acceptance criteria, the git diff, and delivery descriptions.
|
|
26
|
+
*/
|
|
27
|
+
const REVIEW_ASSEMBLY_RECIPE = [
|
|
28
|
+
'delivery.acceptance_criteria',
|
|
29
|
+
'delivery.description',
|
|
30
|
+
'delivery.listing',
|
|
31
|
+
'git.diff_against_base',
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Build the review prompt that gets sent to the review team after the
|
|
35
|
+
* standard strategy prompt.
|
|
36
|
+
*/
|
|
37
|
+
async function buildReviewMessage(config, strategyId, worktreePath) {
|
|
38
|
+
const deliveries = await getStrategyDeliveries(strategyId);
|
|
39
|
+
const assemblyContext = {
|
|
40
|
+
strategyId,
|
|
41
|
+
deliveryIds: deliveries.map(d => d.id),
|
|
42
|
+
worktreePath,
|
|
43
|
+
config,
|
|
44
|
+
organizationId: config.organizationId,
|
|
45
|
+
productId: config.productId,
|
|
46
|
+
};
|
|
47
|
+
let assembledContext = '';
|
|
48
|
+
try {
|
|
49
|
+
assembledContext = await resolveAssemblyRecipe(REVIEW_ASSEMBLY_RECIPE, assemblyContext);
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
console.warn(`[review-spawner] Assembly failed for strategy ${strategyId.slice(0, 8)}: ${err.message}`);
|
|
53
|
+
}
|
|
54
|
+
const prompt = `# Review Directive
|
|
55
|
+
|
|
56
|
+
You are reviewing this strategy's deliveries. Your job is to examine the code changes (git diff) against the acceptance criteria for each delivery and identify any gaps.
|
|
57
|
+
|
|
58
|
+
## Instructions
|
|
59
|
+
|
|
60
|
+
1. Read the acceptance criteria and delivery descriptions above carefully.
|
|
61
|
+
2. Examine the git diff to understand what was actually built.
|
|
62
|
+
3. For each delivery, compare what was built against what was specified.
|
|
63
|
+
4. If you find gaps -- missing functionality, incomplete implementation, or deviations from acceptance criteria -- create issues on the specific delivery where the gap exists using \`telora_product_issue_create\`.
|
|
64
|
+
5. If a delivery fully meets its acceptance criteria, do nothing for that delivery.
|
|
65
|
+
6. When you are done reviewing all deliveries, exit cleanly.
|
|
66
|
+
|
|
67
|
+
## Issue Creation Guidelines
|
|
68
|
+
|
|
69
|
+
- Create issues as type "Task" with status "To Do"
|
|
70
|
+
- Be specific: describe exactly what is missing or incomplete
|
|
71
|
+
- Reference the acceptance criterion that is not met
|
|
72
|
+
- One issue per distinct gap (don't bundle unrelated gaps)
|
|
73
|
+
- Do NOT create issues for style preferences or nice-to-haves -- only for acceptance criteria gaps
|
|
74
|
+
|
|
75
|
+
## Important
|
|
76
|
+
|
|
77
|
+
- Do NOT modify any code. This is a review, not a fix.
|
|
78
|
+
- Do NOT change delivery or strategy statuses.
|
|
79
|
+
- Do NOT create new deliveries.
|
|
80
|
+
- Focus only on acceptance criteria gaps in the actual code changes.`;
|
|
81
|
+
const parts = [];
|
|
82
|
+
if (assembledContext.trim()) {
|
|
83
|
+
parts.push(assembledContext);
|
|
84
|
+
}
|
|
85
|
+
parts.push(prompt);
|
|
86
|
+
return parts.join('\n\n');
|
|
87
|
+
}
|
|
88
|
+
// Store pending review messages for strategies that need a review team spawned.
|
|
89
|
+
// Keyed by strategyId. Consumed by spawnStrategyTeam via consumePendingReviewMessage.
|
|
90
|
+
const pendingReviewMessages = new Map();
|
|
91
|
+
/**
|
|
92
|
+
* Consume a pending review message for a strategy.
|
|
93
|
+
* Returns the message and removes it from the map.
|
|
94
|
+
*/
|
|
95
|
+
export function consumePendingReviewMessage(strategyId) {
|
|
96
|
+
const message = pendingReviewMessages.get(strategyId);
|
|
97
|
+
if (message) {
|
|
98
|
+
pendingReviewMessages.delete(strategyId);
|
|
99
|
+
}
|
|
100
|
+
return message;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Check if a strategy has a pending review message.
|
|
104
|
+
*/
|
|
105
|
+
export function hasPendingReview(strategyId) {
|
|
106
|
+
return pendingReviewMessages.has(strategyId);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Detect strategies in `in_review` status and spawn review teams.
|
|
110
|
+
*
|
|
111
|
+
* Called from the daemon poll loop. For each in_review strategy without
|
|
112
|
+
* an active team, assembles the review prompt and spawns a review team.
|
|
113
|
+
*/
|
|
114
|
+
export async function processReviewStrategies(config, roles) {
|
|
115
|
+
for (const product of config.products) {
|
|
116
|
+
const pc = configForProduct(config, product);
|
|
117
|
+
try {
|
|
118
|
+
const strategies = await getActiveStrategies(pc.organizationId, product.id);
|
|
119
|
+
for (const strategy of strategies) {
|
|
120
|
+
if (strategy.status !== 'in_review')
|
|
121
|
+
continue;
|
|
122
|
+
if (hasActiveTeam(strategy.strategy_id))
|
|
123
|
+
continue;
|
|
124
|
+
if (isInSpawnCooldown(strategy.strategy_id))
|
|
125
|
+
continue;
|
|
126
|
+
if (!strategy.assigned_agent_role_id)
|
|
127
|
+
continue;
|
|
128
|
+
if (getActiveTeamCount() >= config.maxTotalSessions)
|
|
129
|
+
break;
|
|
130
|
+
const role = roles.get(strategy.assigned_agent_role_id);
|
|
131
|
+
if (!role)
|
|
132
|
+
continue;
|
|
133
|
+
// Build the review message before spawning so it's ready when the team starts
|
|
134
|
+
console.log(`[review-spawner] Preparing review for "${strategy.strategy_name}"`);
|
|
135
|
+
const reviewMessage = await buildReviewMessage(pc, strategy.strategy_id, null);
|
|
136
|
+
pendingReviewMessages.set(strategy.strategy_id, reviewMessage);
|
|
137
|
+
await spawnStrategyTeam({
|
|
138
|
+
config: pc,
|
|
139
|
+
strategyId: strategy.strategy_id,
|
|
140
|
+
strategyName: strategy.strategy_name,
|
|
141
|
+
role,
|
|
142
|
+
pipelineConfig: strategy.pipeline_config,
|
|
143
|
+
readOnly: strategy.read_only,
|
|
144
|
+
lastClaudeSessionId: null,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
console.warn(`[review-spawner] Failed to process review strategies for product ${product.id}: ${err.message}`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=review-spawner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-spawner.js","sourceRoot":"","sources":["../src/review-spawner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AACnF,kCAAkC;AAClC,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,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AC9E,OAAO,CAAC,GAAG,CAAC,0CAA0C,QAAQ,CAAC,aAAa,GAAG,CAAC,CAAC;gBACjF,MAAM,aAAa,GAAG,MAAM,kBAAkB,CAAC,EAAE,EAAE,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC/E,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;gBAE/D,MAAM,iBAAiB,CAAC;oBACtB,MAAM,EAAE,EAAE;oBACV,UAAU,EAAE,QAAQ,CAAC,WAAW;oBAChC,YAAY,EAAE,QAAQ,CAAC,aAAa;oBACpC,IAAI;oBACJ,cAAc,EAAE,QAAQ,CAAC,eAAe;oBACxC,QAAQ,EAAE,QAAQ,CAAC,SAAS;oBAC5B,mBAAmB,EAAE,IAAI;iBAC1B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CACV,oEAAoE,OAAO,CAAC,EAAE,KAAM,GAAa,CAAC,OAAO,EAAE,CAC5G,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade.d.ts","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"state-cascade.d.ts","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAevD,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC1B,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC/E,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE;QAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1J,oCAAoC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CACjF;AAQD;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,IAAI,GAAE,WAAyB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA8Df;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,IAAI,GAAE,WAAyB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA4Cf;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,cAAc,GAAG,IAAI,EACrC,IAAI,GAAE,WAAyB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA8Cf;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB1E"}
|
package/dist/state-cascade.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { getActiveStrategies } from './supabase.js';
|
|
16
16
|
import { getStrategyDeliveries as _getStrategyDeliveries, updateStrategyStatus as _updateStrategyStatus, fetchStrategyWorkflowWithTransitions as _fetchStrategyWorkflowWithTransitions } from './queries/strategies.js';
|
|
17
17
|
import { configForProduct } from './config.js';
|
|
18
|
+
import { emitLoopTrigger } from './loop-event-bus.js';
|
|
18
19
|
// Delivery statuses that count as "complete" for cascade purposes
|
|
19
20
|
const DELIVERY_COMPLETE_STATUSES = new Set(['verify', 'done']);
|
|
20
21
|
// Delivery statuses to exclude from cascade checks entirely
|
|
@@ -65,6 +66,11 @@ export async function checkDeliveryToStrategyCascade(config, strategyId, strateg
|
|
|
65
66
|
await deps.updateStrategyStatus(strategyId, 'verify', verifyStage.id);
|
|
66
67
|
console.log(`[state-cascade] Strategy ${strategyId} cascaded building -> verify: ` +
|
|
67
68
|
`all ${activeDeliveries.length} active delivery(ies) in verify or beyond`);
|
|
69
|
+
emitLoopTrigger({
|
|
70
|
+
type: 'strategy_status_changed',
|
|
71
|
+
strategyId,
|
|
72
|
+
detail: 'building -> verify (all deliveries complete)',
|
|
73
|
+
});
|
|
68
74
|
}
|
|
69
75
|
catch (err) {
|
|
70
76
|
console.warn(`[state-cascade] Failed to check delivery->strategy cascade for ${strategyId}:`, err.message);
|
|
@@ -95,6 +101,11 @@ export async function handleStrategyRegression(config, strategyId, strategyStatu
|
|
|
95
101
|
await deps.updateStrategyStatus(strategyId, 'building', buildingStage.id, { reviewRequestedAt: null });
|
|
96
102
|
console.log(`[state-cascade] Strategy ${strategyId} regressed ${strategyStatus} -> building: ` +
|
|
97
103
|
`delivery reverted to non-verify status (review_requested_at cleared)`);
|
|
104
|
+
emitLoopTrigger({
|
|
105
|
+
type: 'review_completed',
|
|
106
|
+
strategyId,
|
|
107
|
+
detail: `${strategyStatus} -> building (delivery regression, review cleared)`,
|
|
108
|
+
});
|
|
98
109
|
}
|
|
99
110
|
catch (err) {
|
|
100
111
|
console.warn(`[state-cascade] Failed to check strategy regression for ${strategyId}:`, err.message);
|
|
@@ -130,6 +141,11 @@ export async function checkAutoReview(config, strategyId, strategyStatus, pipeli
|
|
|
130
141
|
await deps.updateStrategyStatus(strategyId, 'in_review', inReviewStage.id, { reviewRequestedAt: new Date().toISOString() });
|
|
131
142
|
console.log(`[state-cascade] Auto-review triggered for strategy ${strategyId}: ` +
|
|
132
143
|
`strategy transitioned to in_review`);
|
|
144
|
+
emitLoopTrigger({
|
|
145
|
+
type: 'strategy_status_changed',
|
|
146
|
+
strategyId,
|
|
147
|
+
detail: 'verify -> in_review (auto-review triggered)',
|
|
148
|
+
});
|
|
133
149
|
}
|
|
134
150
|
catch (err) {
|
|
135
151
|
console.warn(`[state-cascade] Failed to check auto-review for ${strategyId}:`, err.message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade.js","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,qBAAqB,IAAI,sBAAsB,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,oCAAoC,IAAI,qCAAqC,EAAE,MAAM,yBAAyB,CAAC;AACxN,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"state-cascade.js","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,qBAAqB,IAAI,sBAAsB,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,oCAAoC,IAAI,qCAAqC,EAAE,MAAM,yBAAyB,CAAC;AACxN,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,kEAAkE;AAClE,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CA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b,OAAO,CAAC,IAAI,CACV,4DAA4D,OAAO,CAAC,EAAE,GAAG,EACxE,GAAa,CAAC,OAAO,CACvB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy-completion.d.ts","sourceRoot":"","sources":["../src/strategy-completion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"strategy-completion.d.ts","sourceRoot":"","sources":["../src/strategy-completion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAclE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,aAA8B,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,aAAgC,CAAC;AAIhE,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoQtF;AAID;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAo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