@cat-factory/kernel 0.23.0 → 0.25.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.
@@ -0,0 +1,90 @@
1
+ import type { CiCheck } from '../ports/ci-status.js';
2
+ import type { ReleaseEvidence, ReleaseHealthReport, ReleaseSignal } from '../ports/release-health.js';
3
+ /** The agent kind of the special CI-gate step (polls checks, loops the ci-fixer). */
4
+ export declare const CI_AGENT_KIND = "ci";
5
+ /** The agent kind of the container agent that fixes failing CI on the PR branch. */
6
+ export declare const CI_FIXER_AGENT_KIND = "ci-fixer";
7
+ /**
8
+ * The agent kind of the special pre-merge gate step: it checks whether the PR can
9
+ * be merged and, on a conflict, loops the conflict-resolver — mirroring the CI gate.
10
+ */
11
+ export declare const CONFLICTS_AGENT_KIND = "conflicts";
12
+ /**
13
+ * The agent kind of the container agent that resolves merge conflicts: it merges
14
+ * the base into the PR branch, fixes the conflicts and pushes back onto the branch.
15
+ */
16
+ export declare const CONFLICT_RESOLVER_AGENT_KIND = "conflict-resolver";
17
+ /**
18
+ * The agent kind of the special post-release-health gate step. Like `ci`/`conflicts`
19
+ * it is NOT a container/inline LLM agent: it polls a `ReleaseHealthProvider` (Datadog
20
+ * monitors/SLOs) over a monitoring window after deploy and only escalates to the
21
+ * `on-call` agent on a regression. Passes through when no provider/config is wired.
22
+ */
23
+ export declare const POST_RELEASE_HEALTH_AGENT_KIND = "post-release-health";
24
+ /**
25
+ * The agent kind of the `on-call` container agent dispatched on a release regression.
26
+ * It clones the released PR head, reasons over the evidence bundle (alerting
27
+ * monitors/SLOs + recent error logs) against the diff, and returns a JSON assessment
28
+ * (culprit confidence + recommendation). It makes NO commits and reverts nothing —
29
+ * the engine raises a `release_regression` notification for a human to decide.
30
+ */
31
+ export declare const ON_CALL_AGENT_KIND = "on-call";
32
+ /**
33
+ * The aggregate CI verdict for a PR head commit, derived from its check runs:
34
+ * - `none` — no checks reported (nothing to gate; treated as green).
35
+ * - `pending` — at least one check is still queued/in-progress and none failed.
36
+ * - `success` — every completed check succeeded (or was neutral/skipped) and none pending.
37
+ * - `failure` — at least one check concluded in a non-success terminal state.
38
+ */
39
+ export type CiVerdict = 'none' | 'pending' | 'success' | 'failure';
40
+ /**
41
+ * Reduce a set of check runs to a single verdict. A failure dominates (one red
42
+ * check fails the gate); otherwise a still-running check keeps it pending; with
43
+ * everything completed-and-passing it is green; with no checks at all it is
44
+ * `none` (the engine treats `none` as green so a repo with no CI configured isn't
45
+ * blocked forever).
46
+ */
47
+ export declare function aggregateCi(checks: CiCheck[]): CiVerdict;
48
+ /** Whether a verdict means the gate may advance (green or nothing to gate). */
49
+ export declare function isCiGreen(verdict: CiVerdict): boolean;
50
+ /** The completed-and-non-passing checks behind a `failure` verdict. */
51
+ export declare function listFailingChecks(checks: CiCheck[]): {
52
+ name: string;
53
+ conclusion: string | null;
54
+ url: string | null;
55
+ }[];
56
+ /** A short, human-readable summary of the failing checks, for the step output / notification. */
57
+ export declare function describeFailingChecks(checks: CiCheck[]): string;
58
+ /** The gate verdict for one post-release-health probe. */
59
+ export type ReleaseGateVerdict = 'pass' | 'pending' | 'fail';
60
+ /**
61
+ * Decide the gate verdict from the provider's signal verdict + the monitoring-window
62
+ * timing:
63
+ * - `regressed` → `fail` (escalate to the on-call agent).
64
+ * - anything else & window not elapsed → `pending` (keep watching the rest of the window).
65
+ * - anything else & window elapsed → `pass` (no regression observed in the window).
66
+ *
67
+ * The non-regressed states (`healthy` AND `pending`/`no_data`) are treated the same way:
68
+ * keep watching until the window elapses, then pass. This is deliberate — a `pending`
69
+ * verdict means "no regression detected yet" (e.g. a quiet or `no_data` monitor right
70
+ * after deploy), NOT "broken". Blocking advancement on it forever (the old behaviour)
71
+ * meant a permanently-`no_data` monitor burned the whole poll budget and then failed an
72
+ * otherwise-healthy release as a false `timeout`. The window is the grace period; once it
73
+ * elapses with nothing alerting, the release ships.
74
+ *
75
+ * `warn` states do not regress the gate — only `alert`/SLO-breach (which the provider
76
+ * maps to `regressed`) do — so a warning threshold doesn't pause the pipeline.
77
+ */
78
+ export declare function classifyReleaseHealth(args: {
79
+ report: ReleaseHealthReport;
80
+ windowElapsed: boolean;
81
+ }): ReleaseGateVerdict;
82
+ /** A short, human-readable summary of the regressed signals, for the notification + on-call. */
83
+ export declare function describeRegressedSignals(signals: ReleaseSignal[]): string;
84
+ /**
85
+ * Render the on-call evidence bundle (regressed signals + recent errors + notes) into the
86
+ * prompt the `on-call` agent investigates. Pure (same evidence → same bytes); the engine
87
+ * hands the result to the agent via the gate's `gatherHelperPriorOutputs`.
88
+ */
89
+ export declare function renderReleaseEvidence(evidence: ReleaseEvidence): string;
90
+ //# sourceMappingURL=gate-logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-logic.d.ts","sourceRoot":"","sources":["../../src/domain/gate-logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,aAAa,EACd,MAAM,4BAA4B,CAAA;AAWnC,qFAAqF;AACrF,eAAO,MAAM,aAAa,OAAO,CAAA;AAEjC,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAE7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,cAAc,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,sBAAsB,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,wBAAwB,CAAA;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAI3C;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AAKlE;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAYxD;AAED,+EAA+E;AAC/E,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAErD;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EAAE,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAAE,CAInE;AAED,iGAAiG;AACjG,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAK/D;AAID,0DAA0D;AAC1D,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAA;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,mBAAmB,CAAA;IAC3B,aAAa,EAAE,OAAO,CAAA;CACvB,GAAG,kBAAkB,CAGrB;AAED,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAOzE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CA0BvE"}
@@ -0,0 +1,141 @@
1
+ // Pure gate logic + the gate/helper agent-kind constants, shared by the built-in gate
2
+ // suite (`@cat-factory/gates`) and the engine. Lives in kernel (not orchestration) so a
3
+ // gate package can author a full polling gate — `probe()` classification, helper
4
+ // escalation, notification copy — depending only on kernel, never on the engine. Pure:
5
+ // every function here is a deterministic reduction over its inputs (kernel types only),
6
+ // so it is trivially unit-testable and runtime-neutral.
7
+ // --- Gate + helper agent-kind constants -----------------------------------------------
8
+ /** The agent kind of the special CI-gate step (polls checks, loops the ci-fixer). */
9
+ export const CI_AGENT_KIND = 'ci';
10
+ /** The agent kind of the container agent that fixes failing CI on the PR branch. */
11
+ export const CI_FIXER_AGENT_KIND = 'ci-fixer';
12
+ /**
13
+ * The agent kind of the special pre-merge gate step: it checks whether the PR can
14
+ * be merged and, on a conflict, loops the conflict-resolver — mirroring the CI gate.
15
+ */
16
+ export const CONFLICTS_AGENT_KIND = 'conflicts';
17
+ /**
18
+ * The agent kind of the container agent that resolves merge conflicts: it merges
19
+ * the base into the PR branch, fixes the conflicts and pushes back onto the branch.
20
+ */
21
+ export const CONFLICT_RESOLVER_AGENT_KIND = 'conflict-resolver';
22
+ /**
23
+ * The agent kind of the special post-release-health gate step. Like `ci`/`conflicts`
24
+ * it is NOT a container/inline LLM agent: it polls a `ReleaseHealthProvider` (Datadog
25
+ * monitors/SLOs) over a monitoring window after deploy and only escalates to the
26
+ * `on-call` agent on a regression. Passes through when no provider/config is wired.
27
+ */
28
+ export const POST_RELEASE_HEALTH_AGENT_KIND = 'post-release-health';
29
+ /**
30
+ * The agent kind of the `on-call` container agent dispatched on a release regression.
31
+ * It clones the released PR head, reasons over the evidence bundle (alerting
32
+ * monitors/SLOs + recent error logs) against the diff, and returns a JSON assessment
33
+ * (culprit confidence + recommendation). It makes NO commits and reverts nothing —
34
+ * the engine raises a `release_regression` notification for a human to decide.
35
+ */
36
+ export const ON_CALL_AGENT_KIND = 'on-call';
37
+ /** Conclusions GitHub reports for a *completed* check that are NOT failures. */
38
+ const PASSING_CONCLUSIONS = new Set(['success', 'neutral', 'skipped']);
39
+ /**
40
+ * Reduce a set of check runs to a single verdict. A failure dominates (one red
41
+ * check fails the gate); otherwise a still-running check keeps it pending; with
42
+ * everything completed-and-passing it is green; with no checks at all it is
43
+ * `none` (the engine treats `none` as green so a repo with no CI configured isn't
44
+ * blocked forever).
45
+ */
46
+ export function aggregateCi(checks) {
47
+ if (checks.length === 0)
48
+ return 'none';
49
+ let pending = false;
50
+ for (const check of checks) {
51
+ if (check.status !== 'completed') {
52
+ pending = true;
53
+ continue;
54
+ }
55
+ const conclusion = check.conclusion ?? '';
56
+ if (!PASSING_CONCLUSIONS.has(conclusion))
57
+ return 'failure';
58
+ }
59
+ return pending ? 'pending' : 'success';
60
+ }
61
+ /** Whether a verdict means the gate may advance (green or nothing to gate). */
62
+ export function isCiGreen(verdict) {
63
+ return verdict === 'success' || verdict === 'none';
64
+ }
65
+ /** The completed-and-non-passing checks behind a `failure` verdict. */
66
+ export function listFailingChecks(checks) {
67
+ return checks
68
+ .filter((c) => c.status === 'completed' && !PASSING_CONCLUSIONS.has(c.conclusion ?? ''))
69
+ .map((c) => ({ name: c.name, conclusion: c.conclusion, url: c.url ?? null }));
70
+ }
71
+ /** A short, human-readable summary of the failing checks, for the step output / notification. */
72
+ export function describeFailingChecks(checks) {
73
+ const failing = listFailingChecks(checks);
74
+ if (failing.length === 0)
75
+ return 'CI reported a failure.';
76
+ const names = failing.map((c) => `${c.name} (${c.conclusion ?? 'failure'})`).join(', ');
77
+ return `Failing checks: ${names}`;
78
+ }
79
+ /**
80
+ * Decide the gate verdict from the provider's signal verdict + the monitoring-window
81
+ * timing:
82
+ * - `regressed` → `fail` (escalate to the on-call agent).
83
+ * - anything else & window not elapsed → `pending` (keep watching the rest of the window).
84
+ * - anything else & window elapsed → `pass` (no regression observed in the window).
85
+ *
86
+ * The non-regressed states (`healthy` AND `pending`/`no_data`) are treated the same way:
87
+ * keep watching until the window elapses, then pass. This is deliberate — a `pending`
88
+ * verdict means "no regression detected yet" (e.g. a quiet or `no_data` monitor right
89
+ * after deploy), NOT "broken". Blocking advancement on it forever (the old behaviour)
90
+ * meant a permanently-`no_data` monitor burned the whole poll budget and then failed an
91
+ * otherwise-healthy release as a false `timeout`. The window is the grace period; once it
92
+ * elapses with nothing alerting, the release ships.
93
+ *
94
+ * `warn` states do not regress the gate — only `alert`/SLO-breach (which the provider
95
+ * maps to `regressed`) do — so a warning threshold doesn't pause the pipeline.
96
+ */
97
+ export function classifyReleaseHealth(args) {
98
+ if (args.report.status === 'regressed')
99
+ return 'fail';
100
+ return args.windowElapsed ? 'pass' : 'pending';
101
+ }
102
+ /** A short, human-readable summary of the regressed signals, for the notification + on-call. */
103
+ export function describeRegressedSignals(signals) {
104
+ const bad = signals.filter((s) => s.state === 'alert');
105
+ if (bad.length === 0)
106
+ return 'A monitored release signal regressed.';
107
+ const names = bad
108
+ .map((s) => `${s.name} (${s.state}${s.detail ? `: ${s.detail}` : ''})`)
109
+ .join(', ');
110
+ return `Regressed signals: ${names}`;
111
+ }
112
+ /**
113
+ * Render the on-call evidence bundle (regressed signals + recent errors + notes) into the
114
+ * prompt the `on-call` agent investigates. Pure (same evidence → same bytes); the engine
115
+ * hands the result to the agent via the gate's `gatherHelperPriorOutputs`.
116
+ */
117
+ export function renderReleaseEvidence(evidence) {
118
+ const lines = ['## Post-release regression evidence', ''];
119
+ if (evidence.regressedSignals.length > 0) {
120
+ lines.push('Regressed signals:');
121
+ for (const s of evidence.regressedSignals) {
122
+ lines.push(`- ${s.kind} "${s.name}" (${s.id}): ${s.state}${s.detail ? ` — ${s.detail}` : ''}`);
123
+ }
124
+ lines.push('');
125
+ }
126
+ if (evidence.errors.length > 0) {
127
+ lines.push('Recent errors:');
128
+ for (const e of evidence.errors) {
129
+ lines.push(`- ${e.title}${e.count != null ? ` ×${e.count}` : ''}${e.sampleMessage ? ` — ${e.sampleMessage}` : ''}`);
130
+ }
131
+ lines.push('');
132
+ }
133
+ if (evidence.notes)
134
+ lines.push(evidence.notes, '');
135
+ lines.push('Investigate whether THIS PR is the likely cause: correlate its diff with the regressed ' +
136
+ 'signals and errors above (and the service logs). Beware correlation ≠ causation. Return a ' +
137
+ 'JSON assessment: { "culpritConfidence": 0..1, "recommendation": "revert"|"hold"|"monitor", ' +
138
+ '"rationale": "…", "evidence": ["…"] }. Do NOT make commits or revert anything — a human decides.');
139
+ return lines.join('\n');
140
+ }
141
+ //# sourceMappingURL=gate-logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-logic.js","sourceRoot":"","sources":["../../src/domain/gate-logic.ts"],"names":[],"mappings":"AAOA,sFAAsF;AACtF,wFAAwF;AACxF,iFAAiF;AACjF,uFAAuF;AACvF,wFAAwF;AACxF,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ACR,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CACxG,CAAA;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAChB,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAClD,KAAK,CAAC,IAAI,CACR,yFAAyF;QACvF,4FAA4F;QAC5F,6FAA6F;QAC7F,kGAAkG,CACrG,CAAA;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { Block, ExecutionInstance, GateAttempt, GateStepState, MergeThresholdPreset, PipelineStep } from './types.js';
2
+ import type { AgentRunResult } from '../ports/agent-executor.js';
2
3
  import type { RaiseNotificationInput } from '../ports/notification-channel.js';
3
4
  import type { Clock } from '../ports/runtime.js';
4
5
  import type { RunInitiatorScope } from '../ports/user-secret-repositories.js';
@@ -46,6 +47,27 @@ export type GateHelperOutcome = {
46
47
  * is purely the per-attempt history the UI shows so a looping gate isn't a black box.
47
48
  */
48
49
  export declare function recordGateAttempt(gate: Pick<GateStepState, 'attempts' | 'headSha'>, outcome: GateHelperOutcome, at: number): GateAttempt;
50
+ /**
51
+ * The settled outcome of a gate-helper job, handed to {@link GateDefinition.resolveHelperCompletion}.
52
+ * Carries the FULL agent result on success (an investigate-don't-fix helper like `on-call`
53
+ * needs its structured assessment, not just the output string).
54
+ */
55
+ export type GateHelperJobResult = {
56
+ state: 'done';
57
+ result: AgentRunResult;
58
+ } | {
59
+ state: 'failed';
60
+ error: string | null;
61
+ };
62
+ /** Inputs to a gate's helper-completion hook ({@link GateDefinition.resolveHelperCompletion}). */
63
+ export interface GateHelperCompletionArgs {
64
+ workspaceId: string;
65
+ instance: ExecutionInstance;
66
+ block: Block;
67
+ step: PipelineStep;
68
+ /** The helper job's settled outcome (done with its result, or failed). */
69
+ result: GateHelperJobResult;
70
+ }
49
71
  /** Inputs to a gate's exhaustion handler (budget spent / no executor to escalate to). */
50
72
  export interface GateExhaustedArgs {
51
73
  workspaceId: string;
@@ -114,6 +136,20 @@ export interface GateDefinition {
114
136
  onExhausted(args: GateExhaustedArgs): Promise<{
115
137
  error: string;
116
138
  }>;
139
+ /**
140
+ * Optional: handle this gate's helper job FINISHING (or failing) instead of the default
141
+ * "re-probe the precheck" behaviour. Most helpers FIX the gated condition (ci-fixer
142
+ * pushes a fix; conflict-resolver re-merges), so the engine re-runs the precheck after
143
+ * they finish — the gate's verdict stays the source of truth. But an INVESTIGATE-don't-fix
144
+ * helper (`on-call`) changes nothing the precheck would observe: re-probing would just
145
+ * regress again and burn the budget. When this hook is present the engine, on the helper's
146
+ * completion, calls it (instead of re-probing) and finishes the gate step with the returned
147
+ * output — letting the gate raise a notification / enrich an incident and let the run
148
+ * complete for a human to act out-of-band. Absent → the default re-probe loop.
149
+ */
150
+ resolveHelperCompletion?(args: GateHelperCompletionArgs): Promise<{
151
+ output: string;
152
+ }>;
117
153
  }
118
154
  /**
119
155
  * The shared engine seams a registered (custom) gate legitimately needs, handed to its
@@ -1 +1 @@
1
- {"version":3,"file":"gate-registry.d.ts","sourceRoot":"","sources":["../../src/domain/gate-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACb,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAC9E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;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 export { BLOCK_TYPE_LABEL, DEFAULT_MERGE_PRESET, DEFAULT_CI_MAX_ATTEMPTS, DEFAUL
6
6
  export { type SelectableModel, type ModelVariant, type SubscriptionVariant, type SubscriptionVendorConfig, type ProviderCapabilities, type ModelCostResolver, MODEL_CATALOG, SUBSCRIPTION_VENDORS, ALL_SUBSCRIPTION_VENDORS, getSelectableModel, contextWindowFor, effectiveCatalog, effectiveCatalogWith, type LocalEndpointModels, localSelectableModels, parseLocalModelId, openRouterSelectableModels, parseOpenRouterModelId, resolveModelRef, isModelUsable, subscriptionOptionFor, isIndividualVendor, INDIVIDUAL_VENDORS, individualVendorForModelId, personalCredentialVendorForModelId, } from './domain/models.js';
7
7
  export { seedBlocks, seedPipelines, BLUEPRINT_PIPELINE_ID, DEP_UPDATE_PIPELINE_ID, TECH_DEBT_PIPELINE_ID, } from './domain/seed.js';
8
8
  export { registerPipeline, registerPipelines, registeredPipelines, clearRegisteredPipelines, } from './domain/pipeline-registry.js';
9
- export { type GateProbe, type GateHelperOutcome, type GateExhaustedArgs, type GateDefinition, type GateContext, type GateFactory, recordGateAttempt, registerGate, registeredGateFactories, clearRegisteredGates, stubGateContext, } from './domain/gate-registry.js';
9
+ export { type GateProbe, type GateHelperOutcome, type GateHelperJobResult, type GateHelperCompletionArgs, type GateExhaustedArgs, type GateDefinition, type GateContext, type GateFactory, recordGateAttempt, registerGate, registeredGateFactories, clearRegisteredGates, stubGateContext, } from './domain/gate-registry.js';
10
10
  export { type StepResolverContext, type StepResolution, type StepCompletionResolver, type ResolverContext, type StepResolverFactory, registerStepResolver, registeredStepResolverFactories, clearRegisteredStepResolvers, stubResolverContext, } from './domain/step-resolver-registry.js';
11
+ export { CI_AGENT_KIND, CI_FIXER_AGENT_KIND, CONFLICTS_AGENT_KIND, CONFLICT_RESOLVER_AGENT_KIND, POST_RELEASE_HEALTH_AGENT_KIND, ON_CALL_AGENT_KIND, type CiVerdict, type ReleaseGateVerdict, aggregateCi, isCiGreen, listFailingChecks, describeFailingChecks, classifyReleaseHealth, describeRegressedSignals, renderReleaseEvidence, } from './domain/gate-logic.js';
11
12
  export * from './ports/index.js';
12
13
  export { type ServiceRegistrationDeps, registerServiceForFrame, } from './domain/service-registration.js';
13
14
  export { MapSourceRegistry } from './shared/source-registry.logic.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAA;AACjC,OAAO,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,wBAAwB,GAC9B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,s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,EACjB,YAAY,EACZ,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,GAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,oCAAoC,CAAA;AAI3C,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,8BAA8B,EAC9B,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA;AAE/B,cAAc,kBAAkB,CAAA;AAEhC,OAAO,EACL,KAAK,uBAAuB,EAC5B,uBAAuB,GACxB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AACnG,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,KAAK,eAAe,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA"}
package/dist/index.js CHANGED
@@ -17,6 +17,9 @@ export { registerPipeline, registerPipelines, registeredPipelines, clearRegister
17
17
  // built-ins. See `domain/gate-registry.ts` / `domain/step-resolver-registry.ts`.
18
18
  export { recordGateAttempt, registerGate, registeredGateFactories, clearRegisteredGates, stubGateContext, } from './domain/gate-registry.js';
19
19
  export { registerStepResolver, registeredStepResolverFactories, clearRegisteredStepResolvers, stubResolverContext, } from './domain/step-resolver-registry.js';
20
+ // Pure gate logic + gate/helper agent-kind constants, shared by the built-in gate suite
21
+ // (`@cat-factory/gates`) and the engine. See `domain/gate-logic.ts`.
22
+ export { CI_AGENT_KIND, CI_FIXER_AGENT_KIND, CONFLICTS_AGENT_KIND, CONFLICT_RESOLVER_AGENT_KIND, POST_RELEASE_HEALTH_AGENT_KIND, ON_CALL_AGENT_KIND, aggregateCi, isCiGreen, listFailingChecks, describeFailingChecks, classifyReleaseHealth, describeRegressedSignals, renderReleaseEvidence, } from './domain/gate-logic.js';
20
23
  export * from './ports/index.js';
21
24
  export { registerServiceForFrame, } from './domain/service-registration.js';
22
25
  export { MapSourceRegistry } from './shared/source-registry.logic.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,8DAA8D;AAE9D,cAAc,mBAAmB,CAAA;AACjC,OAAO,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,eAAe,GAGhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GAEvB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAOL,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAEpB,qBAAqB,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mBAAmB,GACpB,MAAM,oCAAoC,CAAA;AAE3C,wFAAwF;AACxF,qEAAqE;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,8BAA8B,EAC9B,kBAAkB,EAGlB,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA;AAE/B,cAAc,kBAAkB,CAAA;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AACnG,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAwB,iBAAiB,EAAE,MAAM,gCAAgC,CAAA"}
@@ -80,6 +80,19 @@ export interface EnvironmentProvider {
80
80
  * the SPA falls back to the manifest editor.
81
81
  */
82
82
  describeConfig?(manifest?: EnvironmentManifest): ProviderConfigField[];
83
+ /**
84
+ * The base manifest a NATIVE adapter is configured through, so the SPA can render the
85
+ * flat `describeConfig` form yet still persist a full manifest (the single storage
86
+ * path — see `backend/docs/native-environment-adapter.md`). The SPA overlays each
87
+ * field value onto this scaffold: a `secret` field goes into the secret bundle (the
88
+ * scaffold's `auth` already references its key), a non-secret field into
89
+ * `providerConfig[key]` (a `baseUrl` field onto `baseUrl`). The scaffold supplies the
90
+ * parts no flat field carries — `auth` scheme, the `provision`/`status`/`teardown`
91
+ * request templates (which a native adapter ignores at run time but the schema
92
+ * requires), and `response`. Absent ⇒ a manifest-authored provider; the SPA edits the
93
+ * manifest directly. Carries NO secret values — only the shape + secret-ref keys.
94
+ */
95
+ describeManifestTemplate?(): EnvironmentManifest;
83
96
  /** Probe the connection without persisting. Optional — absent ⇒ "nothing to test". */
84
97
  testConnection?(req: EnvironmentConnectionTestRequest): Promise<ConnectionTestResult>;
85
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"environment-provider.d.ts","sourceRoot":"","sources":["../../src/ports/environment-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAS3B,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;AAEhE,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,wBA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AG,EAAE,gCAAgC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;CACtF"}
1
+ {"version":3,"file":"environment-provider.d.ts","sourceRoot":"","sources":["../../src/ports/environment-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAS3B,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;AAEhE,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,0EAA0E;IAC1E,eAAe,EAAE,eAAe,CAAA;IAChC,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,0BAA0B;I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ise<void>;
30
30
  /** Declare the config fields this pool provider expects (see EnvironmentProvider). */
31
31
  describeConfig?(manifest?: RunnerPoolManifest): ProviderConfigField[];
32
+ /**
33
+ * The base manifest a native pool adapter is configured through, so the SPA can render
34
+ * the flat `describeConfig` form yet persist a full manifest (mirrors
35
+ * `EnvironmentProvider.describeManifestTemplate`). Absent ⇒ a manifest-authored pool.
36
+ * The shipped generic `HttpRunnerPoolProvider` does not implement it.
37
+ */
38
+ describeManifestTemplate?(): RunnerPoolManifest;
32
39
  /** Probe the connection without persisting. Optional — absent ⇒ "nothing to test". */
33
40
  testConnection?(req: RunnerPoolConnectionTestRequest): Promise<ConnectionTestResult>;
34
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runner-pool-provider.d.ts","sourceRoot":"","sources":["../../src/ports/runner-pool-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAS1D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,+EAA+E;AAC/E,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,aAAa,EAA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;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,aAAa,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnD,oEAAoE;IACpE,IAAI,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;IACpD,kFAAkF;IAClF,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,sFAAsF;IACtF,cAAc,CAAC,CAAC,QAAQ,CAAC,EAAE,kBAAkB,GAAG,mBAAmB,EAAE,CAAA;IACrE;;;;;OAKG;IACH,wBAAwB,CAAC,IAAI,kBAAkB,CAAA;IAC/C,sFAAsF;IACtF,cAAc,CAAC,CAAC,GAAG,EAAE,+BAA+B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;CACrF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/kernel",
3
- "version": "0.23.0",
3
+ "version": "0.25.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.209",
28
- "@cat-factory/contracts": "0.22.0"
28
+ "@cat-factory/contracts": "0.23.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "typescript": "7.0.1-rc"