@cat-factory/kernel 0.71.0 → 0.72.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.
|
@@ -41,13 +41,17 @@ export type GateHelperOutcome = {
|
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* Build the record of a just-finished gate-helper attempt (a ci-fixer / conflict-resolver
|
|
44
|
-
* run) for {@link GateStepState.attemptLog}.
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
44
|
+
* run) for {@link GateStepState.attemptLog}. It captures BOTH sides of the round so the run
|
|
45
|
+
* detail can show it in full (the gate analogue of the Tester attempt's `concerns` + `summary`):
|
|
46
|
+
* - `instructions` / `failingChecks` — what the round was ASKED to fix, carried from the
|
|
47
|
+
* dispatch-time `lastDispatchedInstructions` + `failingChecks` stash on the gate state.
|
|
48
|
+
* - `summary` — the helper's OWN account: its output on completion (which the conflict-resolver
|
|
49
|
+
* fills with the files it left conflicting), or the error on failure.
|
|
50
|
+
* Tagged with the current attempt number + the gated head sha. The gate's next precheck remains
|
|
51
|
+
* the source of truth for pass/fail; this is purely the per-attempt history the UI shows so a
|
|
52
|
+
* looping gate isn't a black box.
|
|
49
53
|
*/
|
|
50
|
-
export declare function recordGateAttempt(gate: Pick<GateStepState, 'attempts' | 'headSha'>, outcome: GateHelperOutcome, at: number): GateAttempt;
|
|
54
|
+
export declare function recordGateAttempt(gate: Pick<GateStepState, 'attempts' | 'headSha' | 'lastDispatchedInstructions' | 'failingChecks'>, outcome: GateHelperOutcome, at: number): GateAttempt;
|
|
51
55
|
/**
|
|
52
56
|
* The settled outcome of a gate-helper job, handed to {@link GateDefinition.resolveHelperCompletion}.
|
|
53
57
|
* Carries the FULL agent result on success (an investigate-don't-fix helper like `on-call`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-registry.d.ts","sourceRoot":"","sources":["../../src/domain/gate-registry.ts"],"names":[],"m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AAG,CAAC,CAAA;CAC/C;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,cAAc,CAAA;AAQ9D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAErE;AAED,wDAAwD;AACxD,wBAAgB,uBAAuB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,EAAE,CAElF;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAYjF"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { getProvider as registryGetProvider, requireProvider as registryRequireProvider, } from './provider-registry.js';
|
|
2
2
|
/**
|
|
3
3
|
* Build the record of a just-finished gate-helper attempt (a ci-fixer / conflict-resolver
|
|
4
|
-
* run) for {@link GateStepState.attemptLog}.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* run) for {@link GateStepState.attemptLog}. It captures BOTH sides of the round so the run
|
|
5
|
+
* detail can show it in full (the gate analogue of the Tester attempt's `concerns` + `summary`):
|
|
6
|
+
* - `instructions` / `failingChecks` — what the round was ASKED to fix, carried from the
|
|
7
|
+
* dispatch-time `lastDispatchedInstructions` + `failingChecks` stash on the gate state.
|
|
8
|
+
* - `summary` — the helper's OWN account: its output on completion (which the conflict-resolver
|
|
9
|
+
* fills with the files it left conflicting), or the error on failure.
|
|
10
|
+
* Tagged with the current attempt number + the gated head sha. The gate's next precheck remains
|
|
11
|
+
* the source of truth for pass/fail; this is purely the per-attempt history the UI shows so a
|
|
12
|
+
* looping gate isn't a black box.
|
|
9
13
|
*/
|
|
10
14
|
export function recordGateAttempt(gate, outcome, at) {
|
|
11
15
|
return {
|
|
@@ -13,6 +17,10 @@ export function recordGateAttempt(gate, outcome, at) {
|
|
|
13
17
|
at,
|
|
14
18
|
outcome: outcome.state === 'done' ? 'completed' : 'failed',
|
|
15
19
|
headSha: gate.headSha ?? null,
|
|
20
|
+
...(gate.lastDispatchedInstructions ? { instructions: gate.lastDispatchedInstructions } : {}),
|
|
21
|
+
...(gate.failingChecks && gate.failingChecks.length
|
|
22
|
+
? { failingChecks: gate.failingChecks }
|
|
23
|
+
: {}),
|
|
16
24
|
summary: outcome.state === 'done'
|
|
17
25
|
? outcome.output
|
|
18
26
|
: (outcome.error ?? 'The helper agent failed without finishing.'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-registry.js","sourceRoot":"","sources":["../../src/domain/gate-registry.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,WAAW,IAAI,mBAAmB,EAClC,eAAe,IAAI,uBAAuB,GAE3C,MAAM,wBAAwB,CAAA;AAgD/B
|
|
1
|
+
{"version":3,"file":"gate-registry.js","sourceRoot":"","sources":["../../src/domain/gate-registry.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,WAAW,IAAI,mBAAmB,EAClC,eAAe,IAAI,uBAAuB,GAE3C,MAAM,wBAAwB,CAAA;AAgD/B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAGC,EACD,OAA0B,EAC1B,EAAU;IAEV,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,QAAQ;QACtB,EAAE;QACF,OAAO,EAAE,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;QAC1D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;QAC7B,GAAG,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,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AW,EAAE,mBAAmB;QAChC,eAAe,EAAE,uBAAuB;QACxC,GAAG,SAAS;KACb,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
4
4
|
"description": "Shared vocabulary, pure logic, and port interfaces for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^6.0.214",
|
|
28
|
-
"@cat-factory/contracts": "0.
|
|
28
|
+
"@cat-factory/contracts": "0.85.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "7.0.1-rc"
|