@cat-factory/contracts 0.281.0 → 0.283.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/agent-presentation.d.ts +40 -0
- package/dist/agent-presentation.d.ts.map +1 -1
- package/dist/agent-presentation.js +21 -0
- package/dist/agent-presentation.js.map +1 -1
- package/dist/entities.d.ts +36 -0
- package/dist/entities.d.ts.map +1 -1
- package/dist/entities.js +18 -0
- package/dist/entities.js.map +1 -1
- package/dist/execution.d.ts +2 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pipeline-environment-lifecycle.d.ts +108 -0
- package/dist/pipeline-environment-lifecycle.d.ts.map +1 -0
- package/dist/pipeline-environment-lifecycle.js +142 -0
- package/dist/pipeline-environment-lifecycle.js.map +1 -0
- package/dist/pipeline-purpose-vocabulary.d.ts +32 -0
- package/dist/pipeline-purpose-vocabulary.d.ts.map +1 -0
- package/dist/pipeline-purpose-vocabulary.js +34 -0
- package/dist/pipeline-purpose-vocabulary.js.map +1 -0
- package/dist/pipeline-purpose.d.ts +43 -23
- package/dist/pipeline-purpose.d.ts.map +1 -1
- package/dist/pipeline-purpose.js +41 -25
- package/dist/pipeline-purpose.js.map +1 -1
- package/dist/pr-report.d.ts +17 -4
- package/dist/pr-report.d.ts.map +1 -1
- package/dist/pr-report.js +19 -2
- package/dist/pr-report.js.map +1 -1
- package/dist/requests.d.ts +2 -0
- package/dist/requests.d.ts.map +1 -1
- package/dist/routes/agent-runs.d.ts +2 -0
- package/dist/routes/agent-runs.d.ts.map +1 -1
- package/dist/routes/bug-hunt.d.ts +2 -0
- package/dist/routes/bug-hunt.d.ts.map +1 -1
- package/dist/routes/execution.d.ts +8 -0
- package/dist/routes/execution.d.ts.map +1 -1
- package/dist/routes/human-review.d.ts +1 -0
- package/dist/routes/human-review.d.ts.map +1 -1
- package/dist/routes/human-test.d.ts +5 -0
- package/dist/routes/human-test.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +8 -0
- package/dist/routes/pipelines.d.ts.map +1 -1
- package/dist/routes/public-evidence.d.ts +1 -1
- package/dist/routes/visual-confirm.d.ts +3 -0
- package/dist/routes/visual-confirm.d.ts.map +1 -1
- package/dist/routes/workspaces.d.ts +6 -0
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/snapshot.d.ts +3 -0
- package/dist/snapshot.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { TESTER_AGENT_KIND } from './run-evidence.js';
|
|
2
|
+
import { UI_TESTER_AGENT_KIND } from './visual-pipeline.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// The ENVIRONMENT LIFECYCLE a pipeline's steps have to spell out: provision (`deployer`) →
|
|
5
|
+
// consume (a tester / acceptance / human-test step) → reclaim (`disposer`).
|
|
6
|
+
//
|
|
7
|
+
// Stated once here, in the package both the backend and the SPA compile against, because three
|
|
8
|
+
// surfaces have to agree about it and each of them answers a different half of the same question:
|
|
9
|
+
//
|
|
10
|
+
// - the pipeline BUILDER, which warns while a draft is being composed;
|
|
11
|
+
// - the SAVE boundary, which refuses a draft that would run into one of these dead ends;
|
|
12
|
+
// - the palette, which has to offer the Deployer and the Disposer wherever a tester is offered.
|
|
13
|
+
//
|
|
14
|
+
// The rule is deliberately structural: it reads the step list and nothing else. Whether a given
|
|
15
|
+
// SERVICE actually needs an environment is workspace state a pipeline cannot see (a pipeline is a
|
|
16
|
+
// workspace-level template applied to any block), and the answer the platform settled on is that
|
|
17
|
+
// the Deployer is present unconditionally and NO-OPS on a service that stands nothing up
|
|
18
|
+
// (`infraless` / `docker-compose` with no handler). One pipeline covers every provision type;
|
|
19
|
+
// there is no pipeline-per-infra-type fan-out, and that is what makes a purely structural rule
|
|
20
|
+
// the right one to enforce.
|
|
21
|
+
//
|
|
22
|
+
// RECLAIM IS THE DEFAULT, NOT THE ONLY LEGAL END. An environment that deliberately outlives its
|
|
23
|
+
// run is a real shape (a preview a reviewer pokes at after the PR is open), so the reclaim leg is
|
|
24
|
+
// satisfied EITHER by a `disposer` or by the deployer step DECLARING the retention
|
|
25
|
+
// (`StepOptions.retainEnvironment`). What the rule refuses is the third case, silence: a chain
|
|
26
|
+
// that neither reclaims nor says it means not to, which is indistinguishable from an author who
|
|
27
|
+
// forgot. The declaration is not a validation bypass — it is the fact the PR verification report
|
|
28
|
+
// needs to render the teardown leg as `retained` rather than as a `pending` reclaim that is never
|
|
29
|
+
// coming (`prReport.environments.ts`).
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
/**
|
|
32
|
+
* The agent kind that PROVISIONS a run's ephemeral environments, the sole provisioner, which
|
|
33
|
+
* is why every consumer below is stated relative to it. The canonical slug also backs
|
|
34
|
+
* integrations' `DEPLOYER_AGENT_KIND` (re-exported there).
|
|
35
|
+
*/
|
|
36
|
+
export const DEPLOYER_AGENT_KIND = 'deployer';
|
|
37
|
+
/**
|
|
38
|
+
* The agent kind that RECLAIMS them again, the deployer's counterpart at the other end of the
|
|
39
|
+
* lifecycle. It tears down by the environment ids the deployer RECORDED on its own step, so it
|
|
40
|
+
* has nothing whatsoever to do without one earlier in the chain.
|
|
41
|
+
*/
|
|
42
|
+
export const DISPOSER_AGENT_KIND = 'disposer';
|
|
43
|
+
/**
|
|
44
|
+
* The agent kind of the human-testing gate: it parks for a person to validate the change in the
|
|
45
|
+
* live URL, so it reads the environment rather than standing one up. The canonical slug also
|
|
46
|
+
* backs orchestration's `HUMAN_TEST_AGENT_KIND` (re-exported there).
|
|
47
|
+
*/
|
|
48
|
+
export const HUMAN_TEST_AGENT_KIND = 'human-test';
|
|
49
|
+
/**
|
|
50
|
+
* The agent kind of the acceptance-test author. The canonical slug also backs agents'
|
|
51
|
+
* `ACCEPTANCE_AGENT_KINDS` (which is built from it).
|
|
52
|
+
*/
|
|
53
|
+
export const ACCEPTANCE_AGENT_KIND = 'playwright';
|
|
54
|
+
/**
|
|
55
|
+
* The steps that CONSUME a provisioned environment to run against: the API/UI testers, the
|
|
56
|
+
* acceptance runner, and the human-test gate. Each reads the environment's coordinates and none
|
|
57
|
+
* of them provisions, so a chain reaching one with no `deployer` in front of it dead-ends inside
|
|
58
|
+
* the consumer on any service that stands an environment up.
|
|
59
|
+
*/
|
|
60
|
+
export const ENV_CONSUMER_AGENT_KINDS = [
|
|
61
|
+
TESTER_AGENT_KIND,
|
|
62
|
+
UI_TESTER_AGENT_KIND,
|
|
63
|
+
ACCEPTANCE_AGENT_KIND,
|
|
64
|
+
HUMAN_TEST_AGENT_KIND,
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* Every environment-lifecycle fault in a step list, in step order.
|
|
68
|
+
*
|
|
69
|
+
* Walked as a STATE MACHINE over the enabled steps rather than as a set of presence checks,
|
|
70
|
+
* because every one of these faults is about ORDER and half of them are invisible to a scan that
|
|
71
|
+
* only asks whether a kind appears somewhere. The state is whether an environment is standing at
|
|
72
|
+
* this point in the chain: a `deployer` raises it, a `disposer` drops it, and a consumer is
|
|
73
|
+
* judged against what is standing WHEN IT RUNS. That is what separates a consumer with nothing
|
|
74
|
+
* yet provisioned from one whose environment has already been reclaimed, and it is what lets a
|
|
75
|
+
* chain that provisions twice (`deployer → tester → disposer → deployer → tester → disposer`)
|
|
76
|
+
* read as two clean lifecycles instead of a pile of contradictions.
|
|
77
|
+
*
|
|
78
|
+
* Evaluated over the ENABLED subset, like every other structural pipeline rule: a run is built
|
|
79
|
+
* from the enabled steps alone, so a disabled `deployer` provisions nothing and a disabled
|
|
80
|
+
* consumer needs nothing. That also means "disable the Deployer but leave the Tester on" is
|
|
81
|
+
* caught, which is the shape a half-edited draft most often reaches.
|
|
82
|
+
*
|
|
83
|
+
* Returns every fault rather than the first, so the builder can show a draft's whole remaining
|
|
84
|
+
* work at once instead of one refusal per save.
|
|
85
|
+
*/
|
|
86
|
+
export function pipelineEnvironmentProblems(agentKinds, enabled, stepOptions) {
|
|
87
|
+
const isEnabled = (i) => enabled?.[i] !== false;
|
|
88
|
+
const problems = [];
|
|
89
|
+
// Whether an environment is standing at this point in the chain. `reclaimed` is deliberately
|
|
90
|
+
// distinct from `none`: both mean a consumer here has nothing to run against, and they need
|
|
91
|
+
// opposite fixes.
|
|
92
|
+
let environment = 'none';
|
|
93
|
+
for (let i = 0; i < agentKinds.length; i++) {
|
|
94
|
+
const agentKind = agentKinds[i];
|
|
95
|
+
if (agentKind === undefined || !isEnabled(i))
|
|
96
|
+
continue;
|
|
97
|
+
if (agentKind === DEPLOYER_AGENT_KIND) {
|
|
98
|
+
environment = 'live';
|
|
99
|
+
// The disposer reclaims by the ids the deployer recorded, so ANY enabled disposer after
|
|
100
|
+
// this one takes this environment down: that is both what satisfies the reclaim
|
|
101
|
+
// requirement and what contradicts a retain declaration.
|
|
102
|
+
const reclaimed = agentKinds.some((kind, j) => j > i && kind === DISPOSER_AGENT_KIND && isEnabled(j));
|
|
103
|
+
if (stepOptions?.[i]?.retainEnvironment === true) {
|
|
104
|
+
if (reclaimed) {
|
|
105
|
+
problems.push({ reason: 'retained_deployer_reclaimed', index: i, agentKind });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else if (!reclaimed) {
|
|
109
|
+
problems.push({ reason: 'deployer_without_disposer', index: i, agentKind });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else if (agentKind === DISPOSER_AGENT_KIND) {
|
|
113
|
+
if (environment !== 'live') {
|
|
114
|
+
problems.push({ reason: 'disposer_without_deployer', index: i, agentKind });
|
|
115
|
+
}
|
|
116
|
+
environment = 'reclaimed';
|
|
117
|
+
}
|
|
118
|
+
else if (environment !== 'live' && ENV_CONSUMER_AGENT_KINDS.includes(agentKind)) {
|
|
119
|
+
problems.push({
|
|
120
|
+
reason: environment === 'reclaimed' ? 'consumer_after_disposer' : 'consumer_without_deployer',
|
|
121
|
+
index: i,
|
|
122
|
+
agentKind,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return problems;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The subset of {@link PipelineEnvironmentProblemReason} that names a step which would DEAD-END
|
|
130
|
+
* for want of a live environment, as opposed to one that leaves the lifecycle untidy.
|
|
131
|
+
*
|
|
132
|
+
* Exported because the two halves are enforced at different doors and only these cross both: the
|
|
133
|
+
* save boundary refuses the whole set on what is being AUTHORED, while the run door refuses a
|
|
134
|
+
* STORED chain (see `RunAdmission`) and may only refuse what would genuinely fail on the service
|
|
135
|
+
* the run was started against. A pipeline stored before this rule existed still runs; one whose
|
|
136
|
+
* tester has no environment to read does not.
|
|
137
|
+
*/
|
|
138
|
+
export const ENV_CONSUMER_STARVATION_REASONS = [
|
|
139
|
+
'consumer_without_deployer',
|
|
140
|
+
'consumer_after_disposer',
|
|
141
|
+
];
|
|
142
|
+
//# sourceMappingURL=pipeline-environment-lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-environment-lifecycle.js","sourceRoot":"","sources":["../src/pipeline-environment-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,8EAA8E;AAC9E,2FAA2F;AAC3F,4EAA4E;AAC5E,EAAE;AACF,+FAA+F;AAC/F,kGAAkG;AAClG,EAAE;AACF,wEAAwE;AACxE,0FAA0F;AAC1F,iGAAiG;AACjG,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,iGAAiG;AACjG,yFAAyF;AACzF,8FAA8F;AAC9F,+FAA+F;AAC/F,4BAA4B;AAC5B,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,mFAAmF;AACnF,+FAA+F;AAC/F,gGAAgG;AAChG,iGAAiG;AACjG,kGAAkG;AAClG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USE-CASE of a pipeline: what kind of work it exists to do. Chosen in the pipeline
|
|
4
|
+
* builder and stamped on every built-in preset, it is the classifier the SPA filters on:
|
|
5
|
+
*
|
|
6
|
+
* - `build` produces or changes application code (the default for engineering
|
|
7
|
+
* pipelines: full builds, bug fixes, refactors, dependency updates, …).
|
|
8
|
+
* - `document` authors or updates documentation (a PRD/RFC/runbook, business rules, …);
|
|
9
|
+
* a `document` task offers ONLY these.
|
|
10
|
+
* - `review` reviews existing code / a pull request and reports findings; writes no code.
|
|
11
|
+
* - `research` timeboxed investigation / analysis that delivers findings (a spike, an
|
|
12
|
+
* environment analysis).
|
|
13
|
+
* - `planning` decomposes and plans an initiative (no code, no repo write of its own).
|
|
14
|
+
*
|
|
15
|
+
* The gating predicates that read it live in `pipeline-purpose.ts`, which re-exports this
|
|
16
|
+
* module. The vocabulary sits apart from them because `agent-presentation.ts` has to name a
|
|
17
|
+
* purpose too (`AgentPresentation.purposes`) and the predicates have to name an
|
|
18
|
+
* `AgentCategory`: keeping the two halves in one file makes those a cycle, and a cycle whose
|
|
19
|
+
* modules both build a `Set` at evaluation time resolves to an empty one on whichever side
|
|
20
|
+
* loses the race.
|
|
21
|
+
*/
|
|
22
|
+
export declare const PIPELINE_PURPOSES: readonly ['build', 'document', 'review', 'research', 'planning'];
|
|
23
|
+
export declare const pipelinePurposeSchema: v.PicklistSchema<readonly ["build", "document", "review", "research", "planning"], undefined>;
|
|
24
|
+
export type PipelinePurpose = v.InferOutput<typeof pipelinePurposeSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* Whether a value is a purpose THIS BUILD knows, DERIVED from the picklist for the same reason
|
|
27
|
+
* `isAgentCategory` is: the vocabulary is closed but PERSISTED, on `Pipeline.purpose`, so a
|
|
28
|
+
* member retired from the union goes on living in stored rows and in the SPA bundle a browser
|
|
29
|
+
* cached before a new member shipped. Narrow with this before indexing anything by a purpose.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isPipelinePurpose(value: string): value is PipelinePurpose;
|
|
32
|
+
//# sourceMappingURL=pipeline-purpose-vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-purpose-vocabulary.d.ts","sourceRoot":"","sources":["../src/pipeline-purpose-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,YAAI,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AACjG,eAAO,MAAM,qBAAqB,+FAAgC,CAAA;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAIzE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAEzE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* The USE-CASE of a pipeline: what kind of work it exists to do. Chosen in the pipeline
|
|
4
|
+
* builder and stamped on every built-in preset, it is the classifier the SPA filters on:
|
|
5
|
+
*
|
|
6
|
+
* - `build` produces or changes application code (the default for engineering
|
|
7
|
+
* pipelines: full builds, bug fixes, refactors, dependency updates, …).
|
|
8
|
+
* - `document` authors or updates documentation (a PRD/RFC/runbook, business rules, …);
|
|
9
|
+
* a `document` task offers ONLY these.
|
|
10
|
+
* - `review` reviews existing code / a pull request and reports findings; writes no code.
|
|
11
|
+
* - `research` timeboxed investigation / analysis that delivers findings (a spike, an
|
|
12
|
+
* environment analysis).
|
|
13
|
+
* - `planning` decomposes and plans an initiative (no code, no repo write of its own).
|
|
14
|
+
*
|
|
15
|
+
* The gating predicates that read it live in `pipeline-purpose.ts`, which re-exports this
|
|
16
|
+
* module. The vocabulary sits apart from them because `agent-presentation.ts` has to name a
|
|
17
|
+
* purpose too (`AgentPresentation.purposes`) and the predicates have to name an
|
|
18
|
+
* `AgentCategory`: keeping the two halves in one file makes those a cycle, and a cycle whose
|
|
19
|
+
* modules both build a `Set` at evaluation time resolves to an empty one on whichever side
|
|
20
|
+
* loses the race.
|
|
21
|
+
*/
|
|
22
|
+
export const PIPELINE_PURPOSES = ['build', 'document', 'review', 'research', 'planning'];
|
|
23
|
+
export const pipelinePurposeSchema = v.picklist(PIPELINE_PURPOSES);
|
|
24
|
+
const PIPELINE_PURPOSE_SET = new Set(pipelinePurposeSchema.options);
|
|
25
|
+
/**
|
|
26
|
+
* Whether a value is a purpose THIS BUILD knows, DERIVED from the picklist for the same reason
|
|
27
|
+
* `isAgentCategory` is: the vocabulary is closed but PERSISTED, on `Pipeline.purpose`, so a
|
|
28
|
+
* member retired from the union goes on living in stored rows and in the SPA bundle a browser
|
|
29
|
+
* cached before a new member shipped. Narrow with this before indexing anything by a purpose.
|
|
30
|
+
*/
|
|
31
|
+
export function isPipelinePurpose(value) {
|
|
32
|
+
return PIPELINE_PURPOSE_SET.has(value);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=pipeline-purpose-vocabulary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-purpose-vocabulary.js","sourceRoot":"","sources":["../src/pipeline-purpose-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AACjG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;AAGlE,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAA;AAExF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
1
|
import { type AgentCategory } from './agent-presentation.js';
|
|
3
2
|
import type { Pipeline } from './entities.js';
|
|
3
|
+
import { type PipelinePurpose } from './pipeline-purpose-vocabulary.js';
|
|
4
4
|
import type { BlockLevel, TaskType } from './primitives.js';
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - `build` — produces or changes application code (the default for engineering
|
|
10
|
-
* pipelines: full builds, bug fixes, refactors, dependency updates, …).
|
|
11
|
-
* - `document` — authors or updates documentation (a PRD/RFC/runbook, business rules, …);
|
|
12
|
-
* a `document` task offers ONLY these.
|
|
13
|
-
* - `review` — reviews existing code / a pull request and reports findings; writes no code.
|
|
14
|
-
* - `research` — timeboxed investigation / analysis that delivers findings (a spike, an
|
|
15
|
-
* environment analysis).
|
|
16
|
-
* - `planning` — decomposes and plans an initiative (no code, no repo write of its own).
|
|
6
|
+
* The pipeline-purpose vocabulary itself ({@link PipelinePurpose} and what each member means)
|
|
7
|
+
* lives in `pipeline-purpose-vocabulary.ts` and is re-exported here, so every consumer keeps
|
|
8
|
+
* importing the classifier and the predicates that read it from one place.
|
|
17
9
|
*
|
|
18
10
|
* A non-`build` purpose hides the Implementation/Testing agent kinds in the builder
|
|
19
11
|
* ({@link purposeAllowsAgentCategory}), narrows what its palette offers
|
|
20
|
-
* ({@link
|
|
12
|
+
* ({@link purposeSuggestsAgentKind}) and its saved-pipeline library lists
|
|
21
13
|
* ({@link pipelineMatchesPurpose}), and scopes the pipeline in the task pickers
|
|
22
14
|
* ({@link pipelineAllowedForTaskType}). The `Pipeline.purpose` field references this schema.
|
|
23
15
|
*/
|
|
24
|
-
export
|
|
25
|
-
export declare const pipelinePurposeSchema: v.PicklistSchema<readonly ["build", "document", "review", "research", "planning"], undefined>;
|
|
26
|
-
export type PipelinePurpose = v.InferOutput<typeof pipelinePurposeSchema>;
|
|
27
|
-
/**
|
|
28
|
-
* Whether a value is a purpose THIS BUILD knows, DERIVED from the picklist for the same reason
|
|
29
|
-
* {@link isAgentCategory} is: the vocabulary is closed but PERSISTED, on `Pipeline.purpose`, so a
|
|
30
|
-
* member retired from the union goes on living in stored rows and in the SPA bundle a browser
|
|
31
|
-
* cached before a new member shipped. Narrow with this before indexing anything by a purpose.
|
|
32
|
-
*/
|
|
33
|
-
export declare function isPipelinePurpose(value: string): value is PipelinePurpose;
|
|
16
|
+
export * from './pipeline-purpose-vocabulary.js';
|
|
34
17
|
/**
|
|
35
18
|
* Whether a pipeline of `purpose` may use an agent kind in `category`: the builder's SAVE
|
|
36
19
|
* gate. A `build` pipeline may use anything; every other purpose refuses the Implementation
|
|
@@ -60,6 +43,43 @@ export declare function purposeAllowsAgentCategory(purpose: Pipeline['purpose'],
|
|
|
60
43
|
* and the runtime one exists only for the values it structurally cannot have.
|
|
61
44
|
*/
|
|
62
45
|
export declare function purposeSuggestsAgentCategory(purpose: Pipeline['purpose'], category: AgentCategory): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* What a palette entry declares for the purpose dial to judge it by: the section it groups under
|
|
48
|
+
* and, when it knows better than its section does, the purposes it is worth offering to.
|
|
49
|
+
*/
|
|
50
|
+
export interface AgentPurposeRelevance {
|
|
51
|
+
/** The palette section, i.e. what {@link purposeSuggestsAgentCategory} reads. */
|
|
52
|
+
category?: AgentCategory;
|
|
53
|
+
/** The kind's OWN answer, from `AgentPresentation.purposes`. */
|
|
54
|
+
purposes?: readonly PipelinePurpose[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Whether an agent KIND is worth OFFERING to a pipeline of `purpose`: what the builder palette
|
|
58
|
+
* actually filters on.
|
|
59
|
+
*
|
|
60
|
+
* A category is a SHELF LABEL, not a statement of what a kind does, so
|
|
61
|
+
* {@link purposeSuggestsAgentCategory} can only ever remove whole sections: keeping `docs` for a
|
|
62
|
+
* `review` pipeline so the Domain Rules Reviewer survives also offered it the two agents that
|
|
63
|
+
* WRITE documentation into the repo, and `document` and `research` had identical rows, so moving
|
|
64
|
+
* the dial between them narrowed nothing at all. A kind that knows it belongs to one use-case says
|
|
65
|
+
* so itself, and the section keeps deciding for every kind that does not.
|
|
66
|
+
*
|
|
67
|
+
* The two narrowings INTERSECT: a declaration may only ever hide MORE than the section already
|
|
68
|
+
* does, never buy a kind back into a purpose its section is not offered to. That is not a
|
|
69
|
+
* convenience, it is what keeps relevance a SUBSET of compatibility
|
|
70
|
+
* ({@link purposeAllowsAgentCategory}) no matter what a deployment declares: a kind offered
|
|
71
|
+
* outside its category's row would be a palette entry whose step then blocks the save, the one
|
|
72
|
+
* dead end this pair of tables exists to prevent.
|
|
73
|
+
*
|
|
74
|
+
* Declaring nothing is the normal case and stays exactly as permissive as before. A declared list
|
|
75
|
+
* naming only purposes this build cannot NAME is read as declaring nothing rather than as
|
|
76
|
+
* excluding everything, the same default-open reading its siblings give an unrecognised value: a
|
|
77
|
+
* kind whose entire list was retired would otherwise vanish from every palette in the build that
|
|
78
|
+
* has to fix it. An AUTHORED empty list never reaches here at all: `agentPresentationSchema`
|
|
79
|
+
* refuses one at registration, so this reading cannot double as a way of saying "offer me
|
|
80
|
+
* nowhere", which is what someone typing `purposes: []` means and the opposite of what it does.
|
|
81
|
+
*/
|
|
82
|
+
export declare function purposeSuggestsAgentKind(purpose: Pipeline['purpose'], kind: AgentPurposeRelevance): boolean;
|
|
63
83
|
/**
|
|
64
84
|
* Whether `pipeline` belongs in a library being browsed AT `purpose`: the builder's saved-pipeline
|
|
65
85
|
* list, the third surface the purpose dial narrows (the palette's catalog and the save gate being
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-purpose.d.ts","sourceRoot":"","sources":["../src/pipeline-purpose.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version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,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,EACnC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAC7B,OAAO,CAQT;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,EACnC,UAAU,EAAE,UAAU,GAAG,SAAS,GACjC,OAAO,CAIT"}
|
package/dist/pipeline-purpose.js
CHANGED
|
@@ -1,36 +1,17 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
1
|
import { isAgentCategory } from './agent-presentation.js';
|
|
2
|
+
import { isPipelinePurpose } from './pipeline-purpose-vocabulary.js';
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - `build` — produces or changes application code (the default for engineering
|
|
8
|
-
* pipelines: full builds, bug fixes, refactors, dependency updates, …).
|
|
9
|
-
* - `document` — authors or updates documentation (a PRD/RFC/runbook, business rules, …);
|
|
10
|
-
* a `document` task offers ONLY these.
|
|
11
|
-
* - `review` — reviews existing code / a pull request and reports findings; writes no code.
|
|
12
|
-
* - `research` — timeboxed investigation / analysis that delivers findings (a spike, an
|
|
13
|
-
* environment analysis).
|
|
14
|
-
* - `planning` — decomposes and plans an initiative (no code, no repo write of its own).
|
|
4
|
+
* The pipeline-purpose vocabulary itself ({@link PipelinePurpose} and what each member means)
|
|
5
|
+
* lives in `pipeline-purpose-vocabulary.ts` and is re-exported here, so every consumer keeps
|
|
6
|
+
* importing the classifier and the predicates that read it from one place.
|
|
15
7
|
*
|
|
16
8
|
* A non-`build` purpose hides the Implementation/Testing agent kinds in the builder
|
|
17
9
|
* ({@link purposeAllowsAgentCategory}), narrows what its palette offers
|
|
18
|
-
* ({@link
|
|
10
|
+
* ({@link purposeSuggestsAgentKind}) and its saved-pipeline library lists
|
|
19
11
|
* ({@link pipelineMatchesPurpose}), and scopes the pipeline in the task pickers
|
|
20
12
|
* ({@link pipelineAllowedForTaskType}). The `Pipeline.purpose` field references this schema.
|
|
21
13
|
*/
|
|
22
|
-
export
|
|
23
|
-
export const pipelinePurposeSchema = v.picklist(PIPELINE_PURPOSES);
|
|
24
|
-
const PIPELINE_PURPOSE_SET = new Set(pipelinePurposeSchema.options);
|
|
25
|
-
/**
|
|
26
|
-
* Whether a value is a purpose THIS BUILD knows, DERIVED from the picklist for the same reason
|
|
27
|
-
* {@link isAgentCategory} is: the vocabulary is closed but PERSISTED, on `Pipeline.purpose`, so a
|
|
28
|
-
* member retired from the union goes on living in stored rows and in the SPA bundle a browser
|
|
29
|
-
* cached before a new member shipped. Narrow with this before indexing anything by a purpose.
|
|
30
|
-
*/
|
|
31
|
-
export function isPipelinePurpose(value) {
|
|
32
|
-
return PIPELINE_PURPOSE_SET.has(value);
|
|
33
|
-
}
|
|
14
|
+
export * from './pipeline-purpose-vocabulary.js';
|
|
34
15
|
// ---------------------------------------------------------------------------
|
|
35
16
|
// Pipeline-purpose gating (shared by the SPA pickers + the builder palette).
|
|
36
17
|
//
|
|
@@ -148,6 +129,41 @@ export function purposeSuggestsAgentCategory(purpose, category) {
|
|
|
148
129
|
return true;
|
|
149
130
|
return PURPOSE_SUGGESTED_CATEGORIES[classifier][category];
|
|
150
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Whether an agent KIND is worth OFFERING to a pipeline of `purpose`: what the builder palette
|
|
134
|
+
* actually filters on.
|
|
135
|
+
*
|
|
136
|
+
* A category is a SHELF LABEL, not a statement of what a kind does, so
|
|
137
|
+
* {@link purposeSuggestsAgentCategory} can only ever remove whole sections: keeping `docs` for a
|
|
138
|
+
* `review` pipeline so the Domain Rules Reviewer survives also offered it the two agents that
|
|
139
|
+
* WRITE documentation into the repo, and `document` and `research` had identical rows, so moving
|
|
140
|
+
* the dial between them narrowed nothing at all. A kind that knows it belongs to one use-case says
|
|
141
|
+
* so itself, and the section keeps deciding for every kind that does not.
|
|
142
|
+
*
|
|
143
|
+
* The two narrowings INTERSECT: a declaration may only ever hide MORE than the section already
|
|
144
|
+
* does, never buy a kind back into a purpose its section is not offered to. That is not a
|
|
145
|
+
* convenience, it is what keeps relevance a SUBSET of compatibility
|
|
146
|
+
* ({@link purposeAllowsAgentCategory}) no matter what a deployment declares: a kind offered
|
|
147
|
+
* outside its category's row would be a palette entry whose step then blocks the save, the one
|
|
148
|
+
* dead end this pair of tables exists to prevent.
|
|
149
|
+
*
|
|
150
|
+
* Declaring nothing is the normal case and stays exactly as permissive as before. A declared list
|
|
151
|
+
* naming only purposes this build cannot NAME is read as declaring nothing rather than as
|
|
152
|
+
* excluding everything, the same default-open reading its siblings give an unrecognised value: a
|
|
153
|
+
* kind whose entire list was retired would otherwise vanish from every palette in the build that
|
|
154
|
+
* has to fix it. An AUTHORED empty list never reaches here at all: `agentPresentationSchema`
|
|
155
|
+
* refuses one at registration, so this reading cannot double as a way of saying "offer me
|
|
156
|
+
* nowhere", which is what someone typing `purposes: []` means and the opposite of what it does.
|
|
157
|
+
*/
|
|
158
|
+
export function purposeSuggestsAgentKind(purpose, kind) {
|
|
159
|
+
const classifier = classifierFor(purpose);
|
|
160
|
+
if (classifier === null)
|
|
161
|
+
return true;
|
|
162
|
+
if (kind.category && !purposeSuggestsAgentCategory(purpose, kind.category))
|
|
163
|
+
return false;
|
|
164
|
+
const declared = kind.purposes?.filter((p) => isPipelinePurpose(p)) ?? [];
|
|
165
|
+
return declared.length === 0 || declared.includes(classifier);
|
|
166
|
+
}
|
|
151
167
|
/**
|
|
152
168
|
* Whether `pipeline` belongs in a library being browsed AT `purpose`: the builder's saved-pipeline
|
|
153
169
|
* list, the third surface the purpose dial narrows (the palette's catalog and the save gate being
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-purpose.js","sourceRoot":"","sources":["../src/pipeline-purpose.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pipeline-purpose.js","sourceRoot":"","sources":["../src/pipeline-pur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AE,OAAO,QAAQ,CAAC,OAAO,KAAK,UAAU,CAAA;IACnE,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAA;IAC/D,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACjD,MAAM,GAAG,GAAG,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAC3C,OAAO,GAAG,KAAK,IAAI,IAAI,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC5D,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,QAAmC,EACnC,UAAkC;IAElC,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACzC,IAAI,UAAU,KAAK,YAAY;QAAE,OAAO,QAAQ,CAAC,OAAO,KAAK,UAAU,CAAA;IACvE,OAAO,QAAQ,CAAC,OAAO,KAAK,UAAU,CAAA;AACxC,CAAC"}
|
package/dist/pr-report.d.ts
CHANGED
|
@@ -554,6 +554,13 @@ export type PrReportEnvironmentEvidence = v.InferOutput<typeof prReportEnvironme
|
|
|
554
554
|
* and distinct from `pending` because the platform did do its part; see
|
|
555
555
|
* {@link teardownConfirmationSchema} for which of the causes applies.
|
|
556
556
|
* - `pending` — at least one is still standing (the run may still be using it).
|
|
557
|
+
* - `retained` — at least one is still standing AND the pipeline's deployer step DECLARED
|
|
558
|
+
* that its environments outlive the run
|
|
559
|
+
* ({@link StepOptions.retainEnvironment}), so no reclaim is coming from this
|
|
560
|
+
* run and the TTL sweep or an operator owns it from here. Distinct from
|
|
561
|
+
* `pending`, which says a teardown is still expected: a reviewer reading
|
|
562
|
+
* `pending` on a preview environment waits for something that never happens,
|
|
563
|
+
* and an operator reading it goes looking for the failure that isn't there.
|
|
557
564
|
* - `failed` — an environment's latest teardown attempt FAILED, so it is still standing
|
|
558
565
|
* for a reason someone has to act on.
|
|
559
566
|
* - `not_applicable` — nothing was ever provisioned.
|
|
@@ -569,7 +576,7 @@ export declare const prReportEnvironmentsSchema: v.ObjectSchema<{
|
|
|
569
576
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
570
577
|
readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
571
578
|
}, undefined>, undefined>;
|
|
572
|
-
readonly teardown: v.PicklistSchema<["confirmed", "unconfirmed", "pending", "failed", "not_applicable"], undefined>;
|
|
579
|
+
readonly teardown: v.PicklistSchema<["confirmed", "unconfirmed", "pending", "retained", "failed", "not_applicable"], undefined>;
|
|
573
580
|
readonly timeline: v.ObjectSchema<{
|
|
574
581
|
/**
|
|
575
582
|
* Why this timeline is empty, or `null` when the log was read whole and the dates below are
|
|
@@ -657,7 +664,10 @@ export declare const prReportEnvironmentsSchema: v.ObjectSchema<{
|
|
|
657
664
|
}, undefined>;
|
|
658
665
|
/**
|
|
659
666
|
* The composed verdict over the three legs:
|
|
660
|
-
* - `complete`: up, observed, and reclaimed
|
|
667
|
+
* - `complete`: up, observed, and reclaimed — or, where the deployer declared the
|
|
668
|
+
* environment outlives the run, up, observed and deliberately kept. It
|
|
669
|
+
* means the run did everything it undertook to do, NOT that nothing is
|
|
670
|
+
* left standing; {@link teardown} is where that is stated.
|
|
661
671
|
* - `incomplete`: at least one leg is missing; {@link gaps} names which.
|
|
662
672
|
* - `not_applicable`: no environment was ever meant to stand up (no deployer step, or every
|
|
663
673
|
* frame is infraless), so there is nothing to prove.
|
|
@@ -1431,7 +1441,7 @@ export declare const prVerificationReportSchema: v.ObjectSchema<{
|
|
|
1431
1441
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1432
1442
|
readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1433
1443
|
}, undefined>, undefined>;
|
|
1434
|
-
readonly teardown: v.PicklistSchema<["confirmed", "unconfirmed", "pending", "failed", "not_applicable"], undefined>;
|
|
1444
|
+
readonly teardown: v.PicklistSchema<["confirmed", "unconfirmed", "pending", "retained", "failed", "not_applicable"], undefined>;
|
|
1435
1445
|
readonly timeline: v.ObjectSchema<{
|
|
1436
1446
|
/**
|
|
1437
1447
|
* Why this timeline is empty, or `null` when the log was read whole and the dates below are
|
|
@@ -1519,7 +1529,10 @@ export declare const prVerificationReportSchema: v.ObjectSchema<{
|
|
|
1519
1529
|
}, undefined>;
|
|
1520
1530
|
/**
|
|
1521
1531
|
* The composed verdict over the three legs:
|
|
1522
|
-
* - `complete`: up, observed, and reclaimed
|
|
1532
|
+
* - `complete`: up, observed, and reclaimed — or, where the deployer declared the
|
|
1533
|
+
* environment outlives the run, up, observed and deliberately kept. It
|
|
1534
|
+
* means the run did everything it undertook to do, NOT that nothing is
|
|
1535
|
+
* left standing; {@link teardown} is where that is stated.
|
|
1523
1536
|
* - `incomplete`: at least one leg is missing; {@link gaps} names which.
|
|
1524
1537
|
* - `not_applicable`: no environment was ever meant to stand up (no deployer step, or every
|
|
1525
1538
|
* frame is infraless), so there is nothing to prove.
|
package/dist/pr-report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-report.d.ts","sourceRoot":"","sources":["../src/pr-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAkC5B;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAA;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,OAAQ,CAAA;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,qDAAqC,CAAA;AAC7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF,gEAAgE;AAChE,eAAO,MAAM,kBAAkB;I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;;;;;;;;;;;;;;;;QA8FH,+DAA+D;;;YA/B/D,6EAA6E;;;YAG7E,8FAA8F;;YAE9F,+EAA+E;;;YAG/E,uFAAuF;;YAEvF,uCAAuC;;YAEvC,iFAAiF;;;;;;;YAEjF,yEAAyE;;;YAGzE,2CAA2C;;YAE3C;;;;eAIG;;;;;;;;;QArDH;;;;;;;;WAQG;;QAEH;;;;WAIG;;;IAgSH;;;;;;;;;OASG;;aAEH,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAE9E"}
|
package/dist/pr-report.js
CHANGED
|
@@ -477,6 +477,13 @@ export const prReportEnvironmentEvidenceSchema = v.object({
|
|
|
477
477
|
* and distinct from `pending` because the platform did do its part; see
|
|
478
478
|
* {@link teardownConfirmationSchema} for which of the causes applies.
|
|
479
479
|
* - `pending` — at least one is still standing (the run may still be using it).
|
|
480
|
+
* - `retained` — at least one is still standing AND the pipeline's deployer step DECLARED
|
|
481
|
+
* that its environments outlive the run
|
|
482
|
+
* ({@link StepOptions.retainEnvironment}), so no reclaim is coming from this
|
|
483
|
+
* run and the TTL sweep or an operator owns it from here. Distinct from
|
|
484
|
+
* `pending`, which says a teardown is still expected: a reviewer reading
|
|
485
|
+
* `pending` on a preview environment waits for something that never happens,
|
|
486
|
+
* and an operator reading it goes looking for the failure that isn't there.
|
|
480
487
|
* - `failed` — an environment's latest teardown attempt FAILED, so it is still standing
|
|
481
488
|
* for a reason someone has to act on.
|
|
482
489
|
* - `not_applicable` — nothing was ever provisioned.
|
|
@@ -485,12 +492,22 @@ export const prReportEnvironmentsSchema = v.object({
|
|
|
485
492
|
status: prReportSectionStatusSchema,
|
|
486
493
|
note: v.optional(v.nullable(v.string())),
|
|
487
494
|
entries: v.array(prReportEnvironmentSchema),
|
|
488
|
-
teardown: v.picklist([
|
|
495
|
+
teardown: v.picklist([
|
|
496
|
+
'confirmed',
|
|
497
|
+
'unconfirmed',
|
|
498
|
+
'pending',
|
|
499
|
+
'retained',
|
|
500
|
+
'failed',
|
|
501
|
+
'not_applicable',
|
|
502
|
+
]),
|
|
489
503
|
timeline: prReportEnvironmentTimelineSchema,
|
|
490
504
|
evidence: prReportEnvironmentEvidenceSchema,
|
|
491
505
|
/**
|
|
492
506
|
* The composed verdict over the three legs:
|
|
493
|
-
* - `complete`: up, observed, and reclaimed
|
|
507
|
+
* - `complete`: up, observed, and reclaimed — or, where the deployer declared the
|
|
508
|
+
* environment outlives the run, up, observed and deliberately kept. It
|
|
509
|
+
* means the run did everything it undertook to do, NOT that nothing is
|
|
510
|
+
* left standing; {@link teardown} is where that is stated.
|
|
494
511
|
* - `incomplete`: at least one leg is missing; {@link gaps} names which.
|
|
495
512
|
* - `not_applicable`: no environment was ever meant to stand up (no deployer step, or every
|
|
496
513
|
* frame is infraless), so there is nothing to prove.
|