@cat-factory/orchestration 0.137.0 → 0.139.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/container/dependencies.d.ts +674 -0
- package/dist/container/dependencies.d.ts.map +1 -0
- package/dist/container/dependencies.js +10 -0
- package/dist/container/dependencies.js.map +1 -0
- package/dist/container.d.ts +9 -702
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +1 -1
- package/dist/container.js.map +1 -1
- package/dist/modules/environments/EnvironmentTestService.d.ts.map +1 -1
- package/dist/modules/environments/EnvironmentTestService.js +7 -1
- package/dist/modules/environments/EnvironmentTestService.js.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.d.ts +20 -0
- package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.js +31 -0
- package/dist/modules/execution/AgentContextBuilder.js.map +1 -1
- package/dist/modules/execution/ExecutionService.d.ts +1 -1
- package/dist/modules/execution/ExecutionService.d.ts.map +1 -1
- package/dist/modules/execution/ExecutionService.js +19 -34
- package/dist/modules/execution/ExecutionService.js.map +1 -1
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts +8 -0
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts.map +1 -1
- package/dist/modules/execution/PollCompletionController.d.ts +7 -0
- package/dist/modules/execution/PollCompletionController.d.ts.map +1 -1
- package/dist/modules/execution/PollCompletionController.js +21 -1
- package/dist/modules/execution/PollCompletionController.js.map +1 -1
- package/dist/modules/execution/RunDispatcher.d.ts +0 -17
- package/dist/modules/execution/RunDispatcher.d.ts.map +1 -1
- package/dist/modules/execution/RunDispatcher.js +19 -51
- package/dist/modules/execution/RunDispatcher.js.map +1 -1
- package/dist/modules/execution/retry.logic.d.ts +28 -1
- package/dist/modules/execution/retry.logic.d.ts.map +1 -1
- package/dist/modules/execution/retry.logic.js +36 -0
- package/dist/modules/execution/retry.logic.js.map +1 -1
- package/dist/modules/execution/runStartOptions.d.ts +12 -0
- package/dist/modules/execution/runStartOptions.d.ts.map +1 -1
- package/dist/modules/execution/step-fold.logic.d.ts +25 -0
- package/dist/modules/execution/step-fold.logic.d.ts.map +1 -0
- package/dist/modules/execution/step-fold.logic.js +53 -0
- package/dist/modules/execution/step-fold.logic.js.map +1 -0
- package/dist/modules/execution/validation.logic.d.ts +23 -0
- package/dist/modules/execution/validation.logic.d.ts.map +1 -0
- package/dist/modules/execution/validation.logic.js +72 -0
- package/dist/modules/execution/validation.logic.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PipelineStep, ValidationReport } from '@cat-factory/kernel';
|
|
2
|
+
/**
|
|
3
|
+
* Fold a harness-produced validation report onto a step, returning whether anything changed.
|
|
4
|
+
*
|
|
5
|
+
* Applied on all three poll paths — the live `running` republish (so the repair loop is visible
|
|
6
|
+
* while it runs), the successful terminal result (the captured proof the checkout was green
|
|
7
|
+
* before the PR opened), and the failed terminal result (the evidence behind an exhausted
|
|
8
|
+
* budget). Lenient by construction: a malformed/absent payload leaves the step untouched rather
|
|
9
|
+
* than failing the run, since the report is observability, never a control signal — the harness
|
|
10
|
+
* already decided whether to open the PR.
|
|
11
|
+
*/
|
|
12
|
+
export declare function applyValidationReport(step: PipelineStep, raw: unknown): boolean;
|
|
13
|
+
/** Parse a harness report defensively; `null` for absent/unparseable payloads. */
|
|
14
|
+
export declare function coerceValidationReport(raw: unknown): ValidationReport | null;
|
|
15
|
+
/**
|
|
16
|
+
* The failure detail for a step whose run died because pre-PR validation never went green:
|
|
17
|
+
* the one-line summary (which checks failed, with exit codes) followed by the last failing
|
|
18
|
+
* command's captured output. This is what the board's failure card shows, so the operator sees
|
|
19
|
+
* WHY without opening the run — the whole reason the output is captured rather than asserted.
|
|
20
|
+
* `null` when the report describes no failure (nothing to explain).
|
|
21
|
+
*/
|
|
22
|
+
export declare function validationFailureDetail(report: ValidationReport): string | null;
|
|
23
|
+
//# sourceMappingURL=validation.logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/validation.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAQzE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAM/E;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAO5E;AAqBD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAS/E"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { parseValidationReport, summarizeValidationFailure } from '@cat-factory/contracts';
|
|
2
|
+
// Pure helpers for the PRE-PR VALIDATION report the executor-harness produces (see
|
|
3
|
+
// docs/initiatives/pre-pr-validation.md). NO repository access — the engine's only job here is
|
|
4
|
+
// to fold the harness's verdict onto the step; the loop itself runs in the container, because
|
|
5
|
+
// the commands must EXECUTE against a checkout.
|
|
6
|
+
/**
|
|
7
|
+
* Fold a harness-produced validation report onto a step, returning whether anything changed.
|
|
8
|
+
*
|
|
9
|
+
* Applied on all three poll paths — the live `running` republish (so the repair loop is visible
|
|
10
|
+
* while it runs), the successful terminal result (the captured proof the checkout was green
|
|
11
|
+
* before the PR opened), and the failed terminal result (the evidence behind an exhausted
|
|
12
|
+
* budget). Lenient by construction: a malformed/absent payload leaves the step untouched rather
|
|
13
|
+
* than failing the run, since the report is observability, never a control signal — the harness
|
|
14
|
+
* already decided whether to open the PR.
|
|
15
|
+
*/
|
|
16
|
+
export function applyValidationReport(step, raw) {
|
|
17
|
+
const report = coerceValidationReport(raw);
|
|
18
|
+
if (!report)
|
|
19
|
+
return false;
|
|
20
|
+
if (sameValidationReport(step.validation ?? null, report))
|
|
21
|
+
return false;
|
|
22
|
+
step.validation = report;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
/** Parse a harness report defensively; `null` for absent/unparseable payloads. */
|
|
26
|
+
export function coerceValidationReport(raw) {
|
|
27
|
+
if (raw === undefined || raw === null)
|
|
28
|
+
return null;
|
|
29
|
+
try {
|
|
30
|
+
return parseValidationReport(raw);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Whether two reports are the same publish. Compared on the attempt identity + verdict rather
|
|
38
|
+
* than deep-equality of the (potentially 40 KB of) output tails, so an idle poll re-offering the
|
|
39
|
+
* same attempt doesn't churn storage or the event stream.
|
|
40
|
+
*/
|
|
41
|
+
function sameValidationReport(a, b) {
|
|
42
|
+
if (!a)
|
|
43
|
+
return false;
|
|
44
|
+
return (a.attempts === b.attempts &&
|
|
45
|
+
a.passed === b.passed &&
|
|
46
|
+
a.at === b.at &&
|
|
47
|
+
a.outcomes.length === b.outcomes.length &&
|
|
48
|
+
a.outcomes.every((o, i) => {
|
|
49
|
+
const other = b.outcomes[i];
|
|
50
|
+
return other !== undefined && o.label === other.label && o.exitCode === other.exitCode;
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The failure detail for a step whose run died because pre-PR validation never went green:
|
|
55
|
+
* the one-line summary (which checks failed, with exit codes) followed by the last failing
|
|
56
|
+
* command's captured output. This is what the board's failure card shows, so the operator sees
|
|
57
|
+
* WHY without opening the run — the whole reason the output is captured rather than asserted.
|
|
58
|
+
* `null` when the report describes no failure (nothing to explain).
|
|
59
|
+
*/
|
|
60
|
+
export function validationFailureDetail(report) {
|
|
61
|
+
if (report.passed)
|
|
62
|
+
return null;
|
|
63
|
+
const failed = report.outcomes.filter((o) => !o.passed);
|
|
64
|
+
if (failed.length === 0)
|
|
65
|
+
return summarizeValidationFailure(report);
|
|
66
|
+
const last = failed[failed.length - 1];
|
|
67
|
+
const tail = last?.outputTail?.trim();
|
|
68
|
+
return tail
|
|
69
|
+
? `${summarizeValidationFailure(report)}\n\n$ ${last?.command}\n${tail}`
|
|
70
|
+
: summarizeValidationFailure(report);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=validation.logic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.logic.js","sourceRoot":"","sources":["../../../src/modules/execution/validation.logic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAE1F,mFAAmF;AACnF,+FAA+F;AAC/F,8FAA8F;AAC9F,gDAAgD;AAEhD;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAkB,EAAE,GAAY;IACpE,MAAM,MAAM,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAC1C,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IACzB,IAAI,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE,MAAM,CAAC;QAAE,OAAO,KAAK,CAAA;IACvE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;IACxB,OAAO,IAAI,CAAA;AACb,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,sBAAsB,CAAC,GAAY;IACjD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAClD,IAAI,CAAC;QACH,OAAO,qBAAqB,CAAC,GAAG,CAAC,CAAA;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,CAA0B,EAAE,CAAmB;IAC3E,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAA;IACpB,OAAO,CACL,CAAC,CAAC,Q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
|
"name": "@cat-factory/orchestration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.139.0",
|
|
4
4
|
"description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^7.0.35",
|
|
28
|
-
"@cat-factory/agents": "0.69.
|
|
29
|
-
"@cat-factory/caching": "0.10.
|
|
30
|
-
"@cat-factory/contracts": "0.
|
|
31
|
-
"@cat-factory/integrations": "0.
|
|
32
|
-
"@cat-factory/kernel": "0.
|
|
33
|
-
"@cat-factory/prompt-fragments": "0.14.
|
|
34
|
-
"@cat-factory/sandbox": "0.9.
|
|
35
|
-
"@cat-factory/spend": "0.12.
|
|
36
|
-
"@cat-factory/workspaces": "0.17.
|
|
28
|
+
"@cat-factory/agents": "0.69.6",
|
|
29
|
+
"@cat-factory/caching": "0.10.39",
|
|
30
|
+
"@cat-factory/contracts": "0.164.0",
|
|
31
|
+
"@cat-factory/integrations": "0.96.0",
|
|
32
|
+
"@cat-factory/kernel": "0.158.0",
|
|
33
|
+
"@cat-factory/prompt-fragments": "0.14.12",
|
|
34
|
+
"@cat-factory/sandbox": "0.9.144",
|
|
35
|
+
"@cat-factory/spend": "0.12.83",
|
|
36
|
+
"@cat-factory/workspaces": "0.17.26"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "7.0.2",
|
|
40
40
|
"vitest": "^4.1.10",
|
|
41
|
-
"@cat-factory/sandbox-fixtures": "0.7.
|
|
41
|
+
"@cat-factory/sandbox-fixtures": "0.7.195"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsc -b tsconfig.build.json",
|