devcontour-harness 0.1.0-alpha.16 → 0.1.0-alpha.18
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/README.md +18 -2
- package/docs/architecture.md +71 -3
- package/docs/quickstart.md +1 -1
- package/docs/release-notes/0.1.0-alpha.17.md +86 -0
- package/docs/release-notes/0.1.0-alpha.18.md +48 -0
- package/docs/review-probes.md +9 -3
- package/docs/review-protocol.md +9 -0
- package/docs/upgrade.md +16 -15
- package/lib/agents/cli-adapter.js +14 -10
- package/lib/agents/review-probe.d.ts +9 -0
- package/lib/agents/review-probe.js +23 -1
- package/lib/agents/schemas.d.ts +206 -0
- package/lib/agents/schemas.js +37 -1
- package/lib/agents/usage.d.ts +22 -0
- package/lib/agents/usage.js +112 -6
- package/lib/contracts/cli.d.ts +30 -0
- package/lib/contracts/diagnosis.d.ts +3 -1
- package/lib/contracts/diagnosis.js +2 -0
- package/lib/contracts/events.d.ts +12 -0
- package/lib/contracts/execution.d.ts +81 -5
- package/lib/contracts/execution.js +58 -0
- package/lib/contracts/failure.d.ts +17 -3
- package/lib/contracts/failure.js +4 -2
- package/lib/contracts/published.d.ts +39 -1
- package/lib/contracts/repair-policy.d.ts +7 -0
- package/lib/contracts/repair-policy.js +17 -0
- package/lib/contracts/review.d.ts +12 -0
- package/lib/contracts/review.js +19 -0
- package/lib/control/harness.d.ts +2 -2
- package/lib/control/recovery.d.ts +1 -1
- package/lib/engine/engine.d.ts +41 -14
- package/lib/engine/engine.js +92 -8
- package/lib/engine/failure.d.ts +1 -1
- package/lib/engine/failure.js +1 -1
- package/lib/engine/property-recovery.d.ts +1 -0
- package/lib/engine/property-recovery.js +4 -1
- package/lib/engine/repair.d.ts +26 -0
- package/lib/engine/repair.js +83 -1
- package/lib/engine/runner.d.ts +7 -0
- package/lib/engine/runner.js +179 -31
- package/lib/explain/state.js +4 -2
- package/lib/index.d.ts +4 -2
- package/lib/index.js +4 -2
- package/lib/projections/stop.d.ts +1 -1
- package/lib/projections/stop.js +16 -0
- package/lib/storage/document.d.ts +48 -8
- package/lib/verification/already-satisfied.d.ts +44 -0
- package/lib/verification/already-satisfied.js +49 -0
- package/lib/verification/gate-scope.d.ts +36 -0
- package/lib/verification/gate-scope.js +97 -0
- package/lib/verification/gates-at.d.ts +67 -0
- package/lib/verification/gates-at.js +173 -0
- package/lib/verification/gates.d.ts +5 -0
- package/lib/verification/gates.js +6 -1
- package/package.json +1 -1
- package/schemas/execution-document.schema.json +134 -0
- package/schemas/run-event.schema.json +4 -0
- package/schemas/stop-diagnosis.schema.json +2 -0
package/lib/agents/schemas.d.ts
CHANGED
|
@@ -164,6 +164,9 @@ export declare const reviewOutputSchema: {
|
|
|
164
164
|
input: {
|
|
165
165
|
type: string;
|
|
166
166
|
};
|
|
167
|
+
inputClass: {
|
|
168
|
+
type: string[];
|
|
169
|
+
};
|
|
167
170
|
expected: {
|
|
168
171
|
type: string[];
|
|
169
172
|
};
|
|
@@ -215,3 +218,206 @@ export declare const reviewOutputSchema: {
|
|
|
215
218
|
};
|
|
216
219
|
required: string[];
|
|
217
220
|
};
|
|
221
|
+
/**
|
|
222
|
+
* Ответ reviewer попытки без изменений: тот же протокол и обязательное
|
|
223
|
+
* `alreadySatisfied` (`null` — подтверждения нет). Обычное ревью этого поля
|
|
224
|
+
* не получает: его вид ответа не меняется.
|
|
225
|
+
*/
|
|
226
|
+
export declare const alreadySatisfiedReviewOutputSchema: {
|
|
227
|
+
properties: {
|
|
228
|
+
alreadySatisfied: {
|
|
229
|
+
anyOf: ({
|
|
230
|
+
type: string;
|
|
231
|
+
additionalProperties?: undefined;
|
|
232
|
+
properties?: undefined;
|
|
233
|
+
required?: undefined;
|
|
234
|
+
} | {
|
|
235
|
+
type: string;
|
|
236
|
+
additionalProperties: boolean;
|
|
237
|
+
properties: {
|
|
238
|
+
gates: {
|
|
239
|
+
type: string;
|
|
240
|
+
minItems: number;
|
|
241
|
+
maxItems: number;
|
|
242
|
+
items: {
|
|
243
|
+
type: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
evidence: {
|
|
247
|
+
type: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
required: string[];
|
|
251
|
+
})[];
|
|
252
|
+
};
|
|
253
|
+
execution: {
|
|
254
|
+
type: string;
|
|
255
|
+
additionalProperties: boolean;
|
|
256
|
+
properties: {
|
|
257
|
+
commands: {
|
|
258
|
+
type: string;
|
|
259
|
+
maxItems: number;
|
|
260
|
+
items: {
|
|
261
|
+
type: string;
|
|
262
|
+
additionalProperties: boolean;
|
|
263
|
+
properties: {
|
|
264
|
+
command: {
|
|
265
|
+
type: string;
|
|
266
|
+
};
|
|
267
|
+
exitCode: {
|
|
268
|
+
type: string;
|
|
269
|
+
};
|
|
270
|
+
summary: {
|
|
271
|
+
type: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
required: string[];
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
noCommandsReason: {
|
|
278
|
+
type: string[];
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
required: string[];
|
|
282
|
+
};
|
|
283
|
+
approved: {
|
|
284
|
+
type: string;
|
|
285
|
+
};
|
|
286
|
+
summary: {
|
|
287
|
+
type: string;
|
|
288
|
+
};
|
|
289
|
+
discoveries: {
|
|
290
|
+
type: string;
|
|
291
|
+
maxItems: number;
|
|
292
|
+
items: {
|
|
293
|
+
type: string;
|
|
294
|
+
additionalProperties: boolean;
|
|
295
|
+
properties: {
|
|
296
|
+
kind: {
|
|
297
|
+
type: string;
|
|
298
|
+
enum: string[];
|
|
299
|
+
};
|
|
300
|
+
title: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
path: {
|
|
304
|
+
type: string;
|
|
305
|
+
};
|
|
306
|
+
line: {
|
|
307
|
+
type: string;
|
|
308
|
+
minimum: number;
|
|
309
|
+
};
|
|
310
|
+
observation: {
|
|
311
|
+
type: string;
|
|
312
|
+
};
|
|
313
|
+
consequence: {
|
|
314
|
+
type: string;
|
|
315
|
+
};
|
|
316
|
+
reproduction: {
|
|
317
|
+
type: string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
required: string[];
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
findings: {
|
|
324
|
+
type: string;
|
|
325
|
+
items: {
|
|
326
|
+
type: string;
|
|
327
|
+
additionalProperties: boolean;
|
|
328
|
+
properties: {
|
|
329
|
+
severity: {
|
|
330
|
+
type: string;
|
|
331
|
+
enum: string[];
|
|
332
|
+
};
|
|
333
|
+
message: {
|
|
334
|
+
type: string;
|
|
335
|
+
};
|
|
336
|
+
path: {
|
|
337
|
+
type: string[];
|
|
338
|
+
};
|
|
339
|
+
line: {
|
|
340
|
+
type: string[];
|
|
341
|
+
minimum: number;
|
|
342
|
+
};
|
|
343
|
+
rule: {
|
|
344
|
+
type: string[];
|
|
345
|
+
};
|
|
346
|
+
consequence: {
|
|
347
|
+
type: string[];
|
|
348
|
+
};
|
|
349
|
+
evidence: {
|
|
350
|
+
type: string[];
|
|
351
|
+
};
|
|
352
|
+
reproduction: {
|
|
353
|
+
anyOf: ({
|
|
354
|
+
type: string;
|
|
355
|
+
additionalProperties?: undefined;
|
|
356
|
+
properties?: undefined;
|
|
357
|
+
required?: undefined;
|
|
358
|
+
} | {
|
|
359
|
+
type: string;
|
|
360
|
+
additionalProperties: boolean;
|
|
361
|
+
properties: {
|
|
362
|
+
property: {
|
|
363
|
+
type: string[];
|
|
364
|
+
};
|
|
365
|
+
input: {
|
|
366
|
+
type: string;
|
|
367
|
+
};
|
|
368
|
+
inputClass: {
|
|
369
|
+
type: string[];
|
|
370
|
+
};
|
|
371
|
+
expected: {
|
|
372
|
+
type: string[];
|
|
373
|
+
};
|
|
374
|
+
actual: {
|
|
375
|
+
type: string[];
|
|
376
|
+
};
|
|
377
|
+
command: {
|
|
378
|
+
type: string[];
|
|
379
|
+
items: {
|
|
380
|
+
type: string;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
executed: {
|
|
384
|
+
type: string;
|
|
385
|
+
};
|
|
386
|
+
run: {
|
|
387
|
+
type: string[];
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
required: string[];
|
|
391
|
+
})[];
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
required: string[];
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
previous: {
|
|
398
|
+
type: string;
|
|
399
|
+
items: {
|
|
400
|
+
type: string;
|
|
401
|
+
additionalProperties: boolean;
|
|
402
|
+
properties: {
|
|
403
|
+
id: {
|
|
404
|
+
type: string;
|
|
405
|
+
pattern: string;
|
|
406
|
+
};
|
|
407
|
+
status: {
|
|
408
|
+
type: string;
|
|
409
|
+
enum: ("open" | "closed" | "withdrawn")[];
|
|
410
|
+
};
|
|
411
|
+
basis: {
|
|
412
|
+
type: string;
|
|
413
|
+
pattern: string;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
required: string[];
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
required: string[];
|
|
421
|
+
type: string;
|
|
422
|
+
additionalProperties: boolean;
|
|
423
|
+
};
|
package/lib/agents/schemas.js
CHANGED
|
@@ -80,13 +80,23 @@ export const reviewOutputSchema = {
|
|
|
80
80
|
properties: {
|
|
81
81
|
property: { type: ['string', 'null'] },
|
|
82
82
|
input: { type: 'string' },
|
|
83
|
+
inputClass: { type: ['string', 'null'] },
|
|
83
84
|
expected: { type: ['string', 'null'] },
|
|
84
85
|
actual: { type: ['string', 'null'] },
|
|
85
86
|
command: { type: ['array', 'null'], items: { type: 'string' } },
|
|
86
87
|
executed: { type: 'boolean' },
|
|
87
88
|
run: { type: ['string', 'null'] },
|
|
88
89
|
},
|
|
89
|
-
required: [
|
|
90
|
+
required: [
|
|
91
|
+
'property',
|
|
92
|
+
'input',
|
|
93
|
+
'inputClass',
|
|
94
|
+
'expected',
|
|
95
|
+
'actual',
|
|
96
|
+
'command',
|
|
97
|
+
'executed',
|
|
98
|
+
'run',
|
|
99
|
+
],
|
|
90
100
|
},
|
|
91
101
|
],
|
|
92
102
|
},
|
|
@@ -122,3 +132,29 @@ export const reviewOutputSchema = {
|
|
|
122
132
|
},
|
|
123
133
|
required: ['approved', 'summary', 'findings', 'discoveries', 'execution', 'previous'],
|
|
124
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Ответ reviewer попытки без изменений: тот же протокол и обязательное
|
|
137
|
+
* `alreadySatisfied` (`null` — подтверждения нет). Обычное ревью этого поля
|
|
138
|
+
* не получает: его вид ответа не меняется.
|
|
139
|
+
*/
|
|
140
|
+
export const alreadySatisfiedReviewOutputSchema = {
|
|
141
|
+
...reviewOutputSchema,
|
|
142
|
+
properties: {
|
|
143
|
+
...reviewOutputSchema.properties,
|
|
144
|
+
alreadySatisfied: {
|
|
145
|
+
anyOf: [
|
|
146
|
+
{ type: 'null' },
|
|
147
|
+
{
|
|
148
|
+
type: 'object',
|
|
149
|
+
additionalProperties: false,
|
|
150
|
+
properties: {
|
|
151
|
+
gates: { type: 'array', minItems: 1, maxItems: 20, items: { type: 'string' } },
|
|
152
|
+
evidence: { type: 'string' },
|
|
153
|
+
},
|
|
154
|
+
required: ['gates', 'evidence'],
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
required: [...reviewOutputSchema.required, 'alreadySatisfied'],
|
|
160
|
+
};
|
package/lib/agents/usage.d.ts
CHANGED
|
@@ -6,3 +6,25 @@ export declare function parseUsage(runtime: 'codex' | 'claude', stdout: string,
|
|
|
6
6
|
export declare function runtimeVersion(executable: string, env?: NodeJS.ProcessEnv): Promise<string | null>;
|
|
7
7
|
/** Модель, которую runtime выбрал на самом деле: событие system у claude, ключи modelUsage у codex. */
|
|
8
8
|
export declare function reportedModel(stdout: string): string | null;
|
|
9
|
+
/** Строка потока длиннее — не разбирается и делает телеметрию неполной. */
|
|
10
|
+
export declare const LINE_LIMIT = 8000000;
|
|
11
|
+
/**
|
|
12
|
+
* Телеметрия, собранная по ходу потока runtime, а не из хвоста вывода. Хвост
|
|
13
|
+
* stdout и журнал вызова ограничены, и у долгого вызова итоговое событие
|
|
14
|
+
* `result` (стоимость и счётчики claude) или ранние `turn.completed` codex
|
|
15
|
+
* оказывались за пределом: стоимость, сообщённая провайдером, терялась или
|
|
16
|
+
* учитывалась неполной. Здесь каждая строка разбирается сразу; хранятся
|
|
17
|
+
* только поля телеметрии — последнее событие `result`, события
|
|
18
|
+
* `turn.completed` и первая сообщённая модель, — а не текст вывода.
|
|
19
|
+
*/
|
|
20
|
+
export declare function usageStream(runtime: 'codex' | 'claude'): {
|
|
21
|
+
/**
|
|
22
|
+
* Очередной фрагмент stdout runtime (без маски: берутся только числа).
|
|
23
|
+
* Вызывается из обработчика вывода процесса и не бросает: сбой разбора —
|
|
24
|
+
* неполная телеметрия, а не падение controller.
|
|
25
|
+
*/
|
|
26
|
+
push(text: string): void;
|
|
27
|
+
/** Телеметрия всего потока; `completed` — вызов завершился штатно. */
|
|
28
|
+
usage(completed: boolean): Usage;
|
|
29
|
+
model: () => string | null;
|
|
30
|
+
};
|
package/lib/agents/usage.js
CHANGED
|
@@ -69,15 +69,121 @@ export function runtimeVersion(executable, env) {
|
|
|
69
69
|
.catch(() => null));
|
|
70
70
|
return versions.get(key);
|
|
71
71
|
}
|
|
72
|
+
/** Модель события runtime: событие system у claude, ключи modelUsage у codex. */
|
|
73
|
+
function eventModel(event) {
|
|
74
|
+
if (typeof event.model === 'string' && event.model && event.model !== '<synthetic>')
|
|
75
|
+
return event.model;
|
|
76
|
+
const usage = event.modelUsage;
|
|
77
|
+
const [name] = Object.keys(usage ?? {});
|
|
78
|
+
return name ?? null;
|
|
79
|
+
}
|
|
72
80
|
/** Модель, которую runtime выбрал на самом деле: событие system у claude, ключи modelUsage у codex. */
|
|
73
81
|
export function reportedModel(stdout) {
|
|
74
82
|
for (const event of runtimeEvents(stdout).events) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const [name] = Object.keys(usage ?? {});
|
|
79
|
-
if (name)
|
|
80
|
-
return name;
|
|
83
|
+
const model = eventModel(event);
|
|
84
|
+
if (model)
|
|
85
|
+
return model;
|
|
81
86
|
}
|
|
82
87
|
return null;
|
|
83
88
|
}
|
|
89
|
+
/** Строка потока длиннее — не разбирается и делает телеметрию неполной. */
|
|
90
|
+
export const LINE_LIMIT = 8_000_000;
|
|
91
|
+
/**
|
|
92
|
+
* Только числовые поля верхнего уровня `usage`: вложенная структура любой
|
|
93
|
+
* глубины не хранится и не сериализуется (глубокая вложенность роняла бы
|
|
94
|
+
* `JSON.stringify` в обработчике вывода процесса).
|
|
95
|
+
*/
|
|
96
|
+
const flatUsage = (usage) => usage && typeof usage === 'object' && !Array.isArray(usage)
|
|
97
|
+
? Object.fromEntries(Object.entries(usage).filter(([, v]) => typeof v === 'number' || v === null))
|
|
98
|
+
: usage === undefined
|
|
99
|
+
? undefined
|
|
100
|
+
: {};
|
|
101
|
+
/**
|
|
102
|
+
* Телеметрия, собранная по ходу потока runtime, а не из хвоста вывода. Хвост
|
|
103
|
+
* stdout и журнал вызова ограничены, и у долгого вызова итоговое событие
|
|
104
|
+
* `result` (стоимость и счётчики claude) или ранние `turn.completed` codex
|
|
105
|
+
* оказывались за пределом: стоимость, сообщённая провайдером, терялась или
|
|
106
|
+
* учитывалась неполной. Здесь каждая строка разбирается сразу; хранятся
|
|
107
|
+
* только поля телеметрии — последнее событие `result`, события
|
|
108
|
+
* `turn.completed` и первая сообщённая модель, — а не текст вывода.
|
|
109
|
+
*/
|
|
110
|
+
export function usageStream(runtime) {
|
|
111
|
+
let partial = '', overflow = false, malformed = false, model = null, result;
|
|
112
|
+
const turns = [];
|
|
113
|
+
const line = (text) => {
|
|
114
|
+
if (!text.trim())
|
|
115
|
+
return;
|
|
116
|
+
let event;
|
|
117
|
+
try {
|
|
118
|
+
event = JSON.parse(text);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
malformed = true;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (!event || typeof event !== 'object' || Array.isArray(event)) {
|
|
125
|
+
malformed = true;
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const e = event;
|
|
129
|
+
model ??= eventModel(e);
|
|
130
|
+
if (runtime === 'claude' && e.type === 'result')
|
|
131
|
+
result = JSON.stringify({
|
|
132
|
+
type: e.type,
|
|
133
|
+
usage: flatUsage(e.usage),
|
|
134
|
+
total_cost_usd: typeof e.total_cost_usd === 'number' ? e.total_cost_usd : null,
|
|
135
|
+
});
|
|
136
|
+
if (runtime === 'codex' && e.type === 'turn.completed')
|
|
137
|
+
turns.push(JSON.stringify({ type: e.type, usage: flatUsage(e.usage) }));
|
|
138
|
+
};
|
|
139
|
+
const flush = () => {
|
|
140
|
+
if (overflow)
|
|
141
|
+
malformed = true;
|
|
142
|
+
else
|
|
143
|
+
line(partial);
|
|
144
|
+
partial = '';
|
|
145
|
+
overflow = false;
|
|
146
|
+
};
|
|
147
|
+
const append = (piece) => {
|
|
148
|
+
if (overflow)
|
|
149
|
+
return;
|
|
150
|
+
if (partial.length + piece.length > LINE_LIMIT) {
|
|
151
|
+
partial = '';
|
|
152
|
+
overflow = true;
|
|
153
|
+
}
|
|
154
|
+
else
|
|
155
|
+
partial += piece;
|
|
156
|
+
};
|
|
157
|
+
const consume = (text) => {
|
|
158
|
+
let start = 0;
|
|
159
|
+
for (let end = text.indexOf('\n'); end >= 0; end = text.indexOf('\n', start)) {
|
|
160
|
+
append(text.slice(start, end));
|
|
161
|
+
flush();
|
|
162
|
+
start = end + 1;
|
|
163
|
+
}
|
|
164
|
+
append(text.slice(start));
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
/**
|
|
168
|
+
* Очередной фрагмент stdout runtime (без маски: берутся только числа).
|
|
169
|
+
* Вызывается из обработчика вывода процесса и не бросает: сбой разбора —
|
|
170
|
+
* неполная телеметрия, а не падение controller.
|
|
171
|
+
*/
|
|
172
|
+
push(text) {
|
|
173
|
+
try {
|
|
174
|
+
consume(text);
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
malformed = true;
|
|
178
|
+
partial = '';
|
|
179
|
+
overflow = true;
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
/** Телеметрия всего потока; `completed` — вызов завершился штатно. */
|
|
183
|
+
usage(completed) {
|
|
184
|
+
flush();
|
|
185
|
+
return parseUsage(runtime, [...turns, ...(result ? [result] : [])].join('\n'), completed && !malformed);
|
|
186
|
+
},
|
|
187
|
+
model: () => model,
|
|
188
|
+
};
|
|
189
|
+
}
|
package/lib/contracts/cli.d.ts
CHANGED
|
@@ -492,10 +492,12 @@ export declare const statusDataSchema: z.ZodObject<{
|
|
|
492
492
|
"provider-auth": "provider-auth";
|
|
493
493
|
"stale-base": "stale-base";
|
|
494
494
|
"empty-result": "empty-result";
|
|
495
|
+
unfinished: "unfinished";
|
|
495
496
|
"scope-violation": "scope-violation";
|
|
496
497
|
"review-protocol": "review-protocol";
|
|
497
498
|
merge: "merge";
|
|
498
499
|
budget: "budget";
|
|
500
|
+
"needs-lead": "needs-lead";
|
|
499
501
|
}>>>;
|
|
500
502
|
waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
501
503
|
kind: z.ZodEnum<{
|
|
@@ -734,10 +736,12 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
734
736
|
"provider-auth": "provider-auth";
|
|
735
737
|
"stale-base": "stale-base";
|
|
736
738
|
"empty-result": "empty-result";
|
|
739
|
+
unfinished: "unfinished";
|
|
737
740
|
"scope-violation": "scope-violation";
|
|
738
741
|
"review-protocol": "review-protocol";
|
|
739
742
|
merge: "merge";
|
|
740
743
|
budget: "budget";
|
|
744
|
+
"needs-lead": "needs-lead";
|
|
741
745
|
}>;
|
|
742
746
|
message: z.ZodString;
|
|
743
747
|
blocked: z.ZodBoolean;
|
|
@@ -773,10 +777,12 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
773
777
|
"provider-auth": "provider-auth";
|
|
774
778
|
"stale-base": "stale-base";
|
|
775
779
|
"empty-result": "empty-result";
|
|
780
|
+
unfinished: "unfinished";
|
|
776
781
|
"scope-violation": "scope-violation";
|
|
777
782
|
"review-protocol": "review-protocol";
|
|
778
783
|
merge: "merge";
|
|
779
784
|
budget: "budget";
|
|
785
|
+
"needs-lead": "needs-lead";
|
|
780
786
|
}>>>;
|
|
781
787
|
}, z.core.$strict> | z.ZodObject<{
|
|
782
788
|
reason: z.ZodEnum<{
|
|
@@ -985,10 +991,12 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
985
991
|
"provider-auth": "provider-auth";
|
|
986
992
|
"stale-base": "stale-base";
|
|
987
993
|
"empty-result": "empty-result";
|
|
994
|
+
unfinished: "unfinished";
|
|
988
995
|
"scope-violation": "scope-violation";
|
|
989
996
|
"review-protocol": "review-protocol";
|
|
990
997
|
merge: "merge";
|
|
991
998
|
budget: "budget";
|
|
999
|
+
"needs-lead": "needs-lead";
|
|
992
1000
|
}>;
|
|
993
1001
|
message: z.ZodString;
|
|
994
1002
|
blocked: z.ZodBoolean;
|
|
@@ -1024,10 +1032,12 @@ export declare const eventsDataSchema: z.ZodObject<{
|
|
|
1024
1032
|
"provider-auth": "provider-auth";
|
|
1025
1033
|
"stale-base": "stale-base";
|
|
1026
1034
|
"empty-result": "empty-result";
|
|
1035
|
+
unfinished: "unfinished";
|
|
1027
1036
|
"scope-violation": "scope-violation";
|
|
1028
1037
|
"review-protocol": "review-protocol";
|
|
1029
1038
|
merge: "merge";
|
|
1030
1039
|
budget: "budget";
|
|
1040
|
+
"needs-lead": "needs-lead";
|
|
1031
1041
|
}>>>;
|
|
1032
1042
|
}, z.core.$strict> | z.ZodObject<{
|
|
1033
1043
|
reason: z.ZodEnum<{
|
|
@@ -1242,10 +1252,12 @@ export declare const controlDataSchema: z.ZodObject<{
|
|
|
1242
1252
|
"provider-auth": "provider-auth";
|
|
1243
1253
|
"stale-base": "stale-base";
|
|
1244
1254
|
"empty-result": "empty-result";
|
|
1255
|
+
unfinished: "unfinished";
|
|
1245
1256
|
"scope-violation": "scope-violation";
|
|
1246
1257
|
"review-protocol": "review-protocol";
|
|
1247
1258
|
merge: "merge";
|
|
1248
1259
|
budget: "budget";
|
|
1260
|
+
"needs-lead": "needs-lead";
|
|
1249
1261
|
}>>>;
|
|
1250
1262
|
waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1251
1263
|
kind: z.ZodEnum<{
|
|
@@ -1881,10 +1893,12 @@ export declare const explainDataSchema: z.ZodObject<{
|
|
|
1881
1893
|
"provider-auth": "provider-auth";
|
|
1882
1894
|
"stale-base": "stale-base";
|
|
1883
1895
|
"empty-result": "empty-result";
|
|
1896
|
+
unfinished: "unfinished";
|
|
1884
1897
|
"scope-violation": "scope-violation";
|
|
1885
1898
|
"review-protocol": "review-protocol";
|
|
1886
1899
|
merge: "merge";
|
|
1887
1900
|
budget: "budget";
|
|
1901
|
+
"needs-lead": "needs-lead";
|
|
1888
1902
|
"runtime-missing": "runtime-missing";
|
|
1889
1903
|
"controller-busy": "controller-busy";
|
|
1890
1904
|
"operator-pause": "operator-pause";
|
|
@@ -2153,10 +2167,12 @@ export declare const cliDataSchemas: {
|
|
|
2153
2167
|
"provider-auth": "provider-auth";
|
|
2154
2168
|
"stale-base": "stale-base";
|
|
2155
2169
|
"empty-result": "empty-result";
|
|
2170
|
+
unfinished: "unfinished";
|
|
2156
2171
|
"scope-violation": "scope-violation";
|
|
2157
2172
|
"review-protocol": "review-protocol";
|
|
2158
2173
|
merge: "merge";
|
|
2159
2174
|
budget: "budget";
|
|
2175
|
+
"needs-lead": "needs-lead";
|
|
2160
2176
|
}>>>;
|
|
2161
2177
|
waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2162
2178
|
kind: z.ZodEnum<{
|
|
@@ -2395,10 +2411,12 @@ export declare const cliDataSchemas: {
|
|
|
2395
2411
|
"provider-auth": "provider-auth";
|
|
2396
2412
|
"stale-base": "stale-base";
|
|
2397
2413
|
"empty-result": "empty-result";
|
|
2414
|
+
unfinished: "unfinished";
|
|
2398
2415
|
"scope-violation": "scope-violation";
|
|
2399
2416
|
"review-protocol": "review-protocol";
|
|
2400
2417
|
merge: "merge";
|
|
2401
2418
|
budget: "budget";
|
|
2419
|
+
"needs-lead": "needs-lead";
|
|
2402
2420
|
}>;
|
|
2403
2421
|
message: z.ZodString;
|
|
2404
2422
|
blocked: z.ZodBoolean;
|
|
@@ -2434,10 +2452,12 @@ export declare const cliDataSchemas: {
|
|
|
2434
2452
|
"provider-auth": "provider-auth";
|
|
2435
2453
|
"stale-base": "stale-base";
|
|
2436
2454
|
"empty-result": "empty-result";
|
|
2455
|
+
unfinished: "unfinished";
|
|
2437
2456
|
"scope-violation": "scope-violation";
|
|
2438
2457
|
"review-protocol": "review-protocol";
|
|
2439
2458
|
merge: "merge";
|
|
2440
2459
|
budget: "budget";
|
|
2460
|
+
"needs-lead": "needs-lead";
|
|
2441
2461
|
}>>>;
|
|
2442
2462
|
}, z.core.$strict> | z.ZodObject<{
|
|
2443
2463
|
reason: z.ZodEnum<{
|
|
@@ -2646,10 +2666,12 @@ export declare const cliDataSchemas: {
|
|
|
2646
2666
|
"provider-auth": "provider-auth";
|
|
2647
2667
|
"stale-base": "stale-base";
|
|
2648
2668
|
"empty-result": "empty-result";
|
|
2669
|
+
unfinished: "unfinished";
|
|
2649
2670
|
"scope-violation": "scope-violation";
|
|
2650
2671
|
"review-protocol": "review-protocol";
|
|
2651
2672
|
merge: "merge";
|
|
2652
2673
|
budget: "budget";
|
|
2674
|
+
"needs-lead": "needs-lead";
|
|
2653
2675
|
}>;
|
|
2654
2676
|
message: z.ZodString;
|
|
2655
2677
|
blocked: z.ZodBoolean;
|
|
@@ -2685,10 +2707,12 @@ export declare const cliDataSchemas: {
|
|
|
2685
2707
|
"provider-auth": "provider-auth";
|
|
2686
2708
|
"stale-base": "stale-base";
|
|
2687
2709
|
"empty-result": "empty-result";
|
|
2710
|
+
unfinished: "unfinished";
|
|
2688
2711
|
"scope-violation": "scope-violation";
|
|
2689
2712
|
"review-protocol": "review-protocol";
|
|
2690
2713
|
merge: "merge";
|
|
2691
2714
|
budget: "budget";
|
|
2715
|
+
"needs-lead": "needs-lead";
|
|
2692
2716
|
}>>>;
|
|
2693
2717
|
}, z.core.$strict> | z.ZodObject<{
|
|
2694
2718
|
reason: z.ZodEnum<{
|
|
@@ -2820,10 +2844,12 @@ export declare const cliDataSchemas: {
|
|
|
2820
2844
|
"provider-auth": "provider-auth";
|
|
2821
2845
|
"stale-base": "stale-base";
|
|
2822
2846
|
"empty-result": "empty-result";
|
|
2847
|
+
unfinished: "unfinished";
|
|
2823
2848
|
"scope-violation": "scope-violation";
|
|
2824
2849
|
"review-protocol": "review-protocol";
|
|
2825
2850
|
merge: "merge";
|
|
2826
2851
|
budget: "budget";
|
|
2852
|
+
"needs-lead": "needs-lead";
|
|
2827
2853
|
}>>>;
|
|
2828
2854
|
waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2829
2855
|
kind: z.ZodEnum<{
|
|
@@ -2873,10 +2899,12 @@ export declare const cliDataSchemas: {
|
|
|
2873
2899
|
"provider-auth": "provider-auth";
|
|
2874
2900
|
"stale-base": "stale-base";
|
|
2875
2901
|
"empty-result": "empty-result";
|
|
2902
|
+
unfinished: "unfinished";
|
|
2876
2903
|
"scope-violation": "scope-violation";
|
|
2877
2904
|
"review-protocol": "review-protocol";
|
|
2878
2905
|
merge: "merge";
|
|
2879
2906
|
budget: "budget";
|
|
2907
|
+
"needs-lead": "needs-lead";
|
|
2880
2908
|
}>>>;
|
|
2881
2909
|
waits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2882
2910
|
kind: z.ZodEnum<{
|
|
@@ -4181,10 +4209,12 @@ export declare const cliDataSchemas: {
|
|
|
4181
4209
|
"provider-auth": "provider-auth";
|
|
4182
4210
|
"stale-base": "stale-base";
|
|
4183
4211
|
"empty-result": "empty-result";
|
|
4212
|
+
unfinished: "unfinished";
|
|
4184
4213
|
"scope-violation": "scope-violation";
|
|
4185
4214
|
"review-protocol": "review-protocol";
|
|
4186
4215
|
merge: "merge";
|
|
4187
4216
|
budget: "budget";
|
|
4217
|
+
"needs-lead": "needs-lead";
|
|
4188
4218
|
"runtime-missing": "runtime-missing";
|
|
4189
4219
|
"controller-busy": "controller-busy";
|
|
4190
4220
|
"operator-pause": "operator-pause";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const diagnosisActors: readonly ["controller", "lead", "user"];
|
|
3
3
|
export declare const diagnosisActions: readonly ["none", "wait", "review-plan", "retry", "diagnose-failure", "reset-attempts", "raise-budget", "replan-dependents", "recovery-decision", "user-decision", "resume-queue", "fix-environment", "fix-access"];
|
|
4
|
-
export declare const diagnosisCauses: readonly ["provider-auth", "environment", "timeout", "stale-base", "empty-result", "scope-violation", "gate", "review", "review-protocol", "merge", "cancelled", "budget", "unknown", "runtime-missing", "controller-busy", "operator-pause", "approval-required", "not-ready"];
|
|
4
|
+
export declare const diagnosisCauses: readonly ["provider-auth", "environment", "timeout", "stale-base", "empty-result", "unfinished", "scope-violation", "gate", "review", "review-protocol", "merge", "cancelled", "budget", "needs-lead", "unknown", "runtime-missing", "controller-busy", "operator-pause", "approval-required", "not-ready"];
|
|
5
5
|
export declare const diagnosisPhases: readonly ["preflight", "claim", "implementation", "gates", "review", "integration", "delivery"];
|
|
6
6
|
/** Объяснение остановки: код, причина, фаза, кто действует и что допустимо. */
|
|
7
7
|
export declare const stopDiagnosisSchema: z.ZodObject<{
|
|
@@ -52,10 +52,12 @@ export declare const stopDiagnosisSchema: z.ZodObject<{
|
|
|
52
52
|
"provider-auth": "provider-auth";
|
|
53
53
|
"stale-base": "stale-base";
|
|
54
54
|
"empty-result": "empty-result";
|
|
55
|
+
unfinished: "unfinished";
|
|
55
56
|
"scope-violation": "scope-violation";
|
|
56
57
|
"review-protocol": "review-protocol";
|
|
57
58
|
merge: "merge";
|
|
58
59
|
budget: "budget";
|
|
60
|
+
"needs-lead": "needs-lead";
|
|
59
61
|
"runtime-missing": "runtime-missing";
|
|
60
62
|
"controller-busy": "controller-busy";
|
|
61
63
|
"operator-pause": "operator-pause";
|
|
@@ -24,6 +24,7 @@ export const diagnosisCauses = [
|
|
|
24
24
|
'timeout',
|
|
25
25
|
'stale-base',
|
|
26
26
|
'empty-result',
|
|
27
|
+
'unfinished',
|
|
27
28
|
'scope-violation',
|
|
28
29
|
'gate',
|
|
29
30
|
'review',
|
|
@@ -31,6 +32,7 @@ export const diagnosisCauses = [
|
|
|
31
32
|
'merge',
|
|
32
33
|
'cancelled',
|
|
33
34
|
'budget',
|
|
35
|
+
'needs-lead',
|
|
34
36
|
'unknown',
|
|
35
37
|
'runtime-missing',
|
|
36
38
|
'controller-busy',
|