@cat-factory/contracts 0.216.0 → 0.218.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/capability-credentials.d.ts +29 -3
- package/dist/capability-credentials.d.ts.map +1 -1
- package/dist/capability-credentials.js +29 -4
- package/dist/capability-credentials.js.map +1 -1
- package/dist/pr-report.d.ts +298 -7
- package/dist/pr-report.d.ts.map +1 -1
- package/dist/pr-report.js +153 -7
- package/dist/pr-report.js.map +1 -1
- package/dist/routes/capability-credentials.d.ts +145 -88
- package/dist/routes/capability-credentials.d.ts.map +1 -1
- package/dist/routes/capability-credentials.js +21 -6
- package/dist/routes/capability-credentials.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,6 +25,21 @@ export declare const capabilityCredentialEntrySchema: v.ObjectSchema<{
|
|
|
25
25
|
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
|
|
26
26
|
}, undefined>;
|
|
27
27
|
export type CapabilityCredentialEntry = v.InferOutput<typeof capabilityCredentialEntrySchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Set ONE credential's value, leaving every other stored key sealed as it is.
|
|
30
|
+
*
|
|
31
|
+
* The whole-set PUT cannot serve an operator filling in a checklist. The client never received
|
|
32
|
+
* the values, so re-sending the set means re-typing every secret, and sending only the edited one
|
|
33
|
+
* REPLACES the set: a workspace that fills in its second credential silently deletes its first.
|
|
34
|
+
* The narrow write is the twin of the per-key delete, and for the same reason.
|
|
35
|
+
*
|
|
36
|
+
* The key rides the path, held to {@link capabilityCredentialKeySchema} there, so a reserved name
|
|
37
|
+
* is refused at this boundary rather than reaching the store.
|
|
38
|
+
*/
|
|
39
|
+
export declare const setCapabilityCredentialSchema: v.ObjectSchema<{
|
|
40
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
|
|
41
|
+
}, undefined>;
|
|
42
|
+
export type SetCapabilityCredentialInput = v.InferOutput<typeof setCapabilityCredentialSchema>;
|
|
28
43
|
/**
|
|
29
44
|
* The non-secret projection of a stored credential — what the API returns and the UI lists.
|
|
30
45
|
*
|
|
@@ -73,6 +88,11 @@ export declare const capabilityCredentialStatusSchema: v.ObjectSchema<{
|
|
|
73
88
|
readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
74
89
|
}, undefined>;
|
|
75
90
|
export type CapabilityCredentialStatus = v.InferOutput<typeof capabilityCredentialStatusSchema>;
|
|
91
|
+
/**
|
|
92
|
+
* How many credentials one workspace may store. Exported because the per-KEY write has to hold
|
|
93
|
+
* the same ceiling as the whole-set PUT, and a second literal is a second number to keep in step.
|
|
94
|
+
*/
|
|
95
|
+
export declare const MAX_CAPABILITY_CREDENTIALS = 100;
|
|
76
96
|
/** Set/replace a workspace's capability credentials. Values write-only; keys unique. */
|
|
77
97
|
export declare const upsertCapabilityCredentialsSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
78
98
|
readonly entries: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -127,14 +147,20 @@ export declare const capabilityCredentialsViewSchema: v.ObjectSchema<{
|
|
|
127
147
|
readonly updatedAt: v.NumberSchema<undefined>;
|
|
128
148
|
}, undefined>, undefined>;
|
|
129
149
|
/**
|
|
130
|
-
* Whether the deployment ALSO has an environment-variable fallback behind this store
|
|
131
|
-
*
|
|
150
|
+
* Whether the deployment ALSO has an environment-variable fallback behind this store, read off
|
|
151
|
+
* the chain the facade actually COMPOSED rather than asserted by the surface that renders it.
|
|
132
152
|
*
|
|
133
153
|
* Stated because it changes what an EMPTY row means: with the fallback, a key nothing is stored
|
|
134
154
|
* for may still resolve from the deployment's environment, so the UI must not report it as
|
|
135
155
|
* missing. "Absent" and "zero" again.
|
|
156
|
+
*
|
|
157
|
+
* Three states, not two, because a deployment that supplied its OWN `ToolSecretResolver`
|
|
158
|
+
* replaced the whole chain, and the platform cannot describe what it put there: that resolver
|
|
159
|
+
* may read Vault, or the environment, or both. Absent is that answer. Rendering a guess either
|
|
160
|
+
* way is the same mistake in opposite directions: `true` sends an operator away from a
|
|
161
|
+
* credential nothing will resolve, `false` sends them hunting for a value that already answers.
|
|
136
162
|
*/
|
|
137
|
-
readonly environmentFallback: v.BooleanSchema<undefined>;
|
|
163
|
+
readonly environmentFallback: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
138
164
|
/**
|
|
139
165
|
* Whether the DECLARATION half of this view is known to be incomplete — the generative
|
|
140
166
|
* integrations are read through `BinaryGeneratorSource`, which THROWS rather than answering an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-credentials.d.ts","sourceRoot":"","sources":["../src/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiC5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,6BAA6B,2ZAiBzC,CAAA;AAED,8FAA8F;AAC9F,eAAO,MAAM,+BAA+B;;;aAG1C,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B;;IAExC,2FAA2F;;aAE3F,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC;;IAE3C,mFAAmF;;;;;QAM/E,mFAAmF;;;IAIvF,uEAAuE;;IAEvE,iDAAiD;;IAEjD,6EAA6E;;aAE7E,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F,wFAAwF;AACxF,eAAO,MAAM,iCAAi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iD;;QAEjD,6EAA6E;;;IAwC7E,qDAAqD;;;QA5ErD,2FAA2F;;;IA8E3F;;;;;;;;;;;;;OAaG;;IAEH;;;;;;;;;OASG;;aAEH,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F,gGAAgG;AAChG,eAAO,MAAM,iCAAiC;;;yBAA2C,CAAA;AACzF,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,OAAO,GAAG,yBAAyB,EAAE,CAE1F;AAED,6FAA6F;AAC7F,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,yBAAyB,EAAE,EACpC,SAAS,EAAE,MAAM,GAChB,uBAAuB,EAAE,CAE3B"}
|
|
@@ -49,6 +49,20 @@ export const capabilityCredentialEntrySchema = v.object({
|
|
|
49
49
|
key: capabilityCredentialKeySchema,
|
|
50
50
|
value: v.pipe(v.string(), v.minLength(1), v.maxLength(8192)),
|
|
51
51
|
});
|
|
52
|
+
/**
|
|
53
|
+
* Set ONE credential's value, leaving every other stored key sealed as it is.
|
|
54
|
+
*
|
|
55
|
+
* The whole-set PUT cannot serve an operator filling in a checklist. The client never received
|
|
56
|
+
* the values, so re-sending the set means re-typing every secret, and sending only the edited one
|
|
57
|
+
* REPLACES the set: a workspace that fills in its second credential silently deletes its first.
|
|
58
|
+
* The narrow write is the twin of the per-key delete, and for the same reason.
|
|
59
|
+
*
|
|
60
|
+
* The key rides the path, held to {@link capabilityCredentialKeySchema} there, so a reserved name
|
|
61
|
+
* is refused at this boundary rather than reaching the store.
|
|
62
|
+
*/
|
|
63
|
+
export const setCapabilityCredentialSchema = v.object({
|
|
64
|
+
value: v.pipe(v.string(), v.minLength(1), v.maxLength(8192)),
|
|
65
|
+
});
|
|
52
66
|
/**
|
|
53
67
|
* The non-secret projection of a stored credential — what the API returns and the UI lists.
|
|
54
68
|
*
|
|
@@ -95,8 +109,13 @@ export const capabilityCredentialStatusSchema = v.object({
|
|
|
95
109
|
/** When the stored value was last written. Absent when nothing is stored. */
|
|
96
110
|
updatedAt: v.optional(v.number()),
|
|
97
111
|
});
|
|
112
|
+
/**
|
|
113
|
+
* How many credentials one workspace may store. Exported because the per-KEY write has to hold
|
|
114
|
+
* the same ceiling as the whole-set PUT, and a second literal is a second number to keep in step.
|
|
115
|
+
*/
|
|
116
|
+
export const MAX_CAPABILITY_CREDENTIALS = 100;
|
|
98
117
|
/** Set/replace a workspace's capability credentials. Values write-only; keys unique. */
|
|
99
|
-
export const upsertCapabilityCredentialsSchema = v.pipe(v.object({ entries: v.array(capabilityCredentialEntrySchema) }), v.check((o) => new Set(o.entries.map((e) => e.key)).size === o.entries.length, 'capability credential keys must be unique within a workspace'), v.check((o) => o.entries.length <=
|
|
118
|
+
export const upsertCapabilityCredentialsSchema = v.pipe(v.object({ entries: v.array(capabilityCredentialEntrySchema) }), v.check((o) => new Set(o.entries.map((e) => e.key)).size === o.entries.length, 'capability credential keys must be unique within a workspace'), v.check((o) => o.entries.length <= MAX_CAPABILITY_CREDENTIALS, `at most ${MAX_CAPABILITY_CREDENTIALS} capability credentials per workspace`));
|
|
100
119
|
/**
|
|
101
120
|
* What the credential surface returns: what this deployment's capabilities DECLARE joined to what
|
|
102
121
|
* this workspace has STORED, plus any stored key nothing declares.
|
|
@@ -113,14 +132,20 @@ export const capabilityCredentialsViewSchema = v.object({
|
|
|
113
132
|
/** Stored keys no registered capability declares. */
|
|
114
133
|
orphaned: v.array(capabilityCredentialRefSchema),
|
|
115
134
|
/**
|
|
116
|
-
* Whether the deployment ALSO has an environment-variable fallback behind this store
|
|
117
|
-
*
|
|
135
|
+
* Whether the deployment ALSO has an environment-variable fallback behind this store, read off
|
|
136
|
+
* the chain the facade actually COMPOSED rather than asserted by the surface that renders it.
|
|
118
137
|
*
|
|
119
138
|
* Stated because it changes what an EMPTY row means: with the fallback, a key nothing is stored
|
|
120
139
|
* for may still resolve from the deployment's environment, so the UI must not report it as
|
|
121
140
|
* missing. "Absent" and "zero" again.
|
|
141
|
+
*
|
|
142
|
+
* Three states, not two, because a deployment that supplied its OWN `ToolSecretResolver`
|
|
143
|
+
* replaced the whole chain, and the platform cannot describe what it put there: that resolver
|
|
144
|
+
* may read Vault, or the environment, or both. Absent is that answer. Rendering a guess either
|
|
145
|
+
* way is the same mistake in opposite directions: `true` sends an operator away from a
|
|
146
|
+
* credential nothing will resolve, `false` sends them hunting for a value that already answers.
|
|
122
147
|
*/
|
|
123
|
-
environmentFallback: v.boolean(),
|
|
148
|
+
environmentFallback: v.optional(v.boolean()),
|
|
124
149
|
/**
|
|
125
150
|
* Whether the DECLARATION half of this view is known to be incomplete — the generative
|
|
126
151
|
* integrations are read through `BinaryGeneratorSource`, which THROWS rather than answering an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-credentials.js","sourceRoot":"","sources":["../src/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,wBAAwB,CAAA;AAE/B,8EAA8E;AAC9E,2FAA2F;AAC3F,kCAAkC;AAClC,EAAE;AACF,gGAAgG;AAChG,+FAA+F;AAC/F,kGAAkG;AAClG,+FAA+F;AAC/F,gGAAgG;AAChG,iGAAiG;AACjG,sFAAsF;AACtF,EAAE;AACF,kGAAkG;AAClG,yFAAyF;AACzF,+FAA+F;AAC/F,+FAA+F;AAC/F,4FAA4F;AAC5F,8FAA8F;AAC9F,EAAE;AACF,gGAAgG;AAChG,+FAA+F;AAC/F,yFAAyF;AACzF,yDAAyD;AACzD,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,IAAI,CACjD,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,IAAI,EAAE,EACR,CAAC,CAAC,SAAS,CAAC,C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G,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AAChE,CAAC"}
|
package/dist/pr-report.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as v from 'valibot';
|
|
|
4
4
|
* external consumer must notice. Backwards compatibility is a non-goal (see CLAUDE.md), so
|
|
5
5
|
* a bump means "re-read the schema", not "a compatibility shim exists".
|
|
6
6
|
*/
|
|
7
|
-
export declare const PR_VERIFICATION_REPORT_VERSION =
|
|
7
|
+
export declare const PR_VERIFICATION_REPORT_VERSION = 4;
|
|
8
8
|
/**
|
|
9
9
|
* Whether a section has evidence to show.
|
|
10
10
|
* - `reported` — the producing step ran and its evidence is below.
|
|
@@ -162,10 +162,143 @@ export declare const prReportEnvironmentSchema: v.ObjectSchema<{
|
|
|
162
162
|
}, undefined>;
|
|
163
163
|
export type PrReportEnvironment = v.InferOutput<typeof prReportEnvironmentSchema>;
|
|
164
164
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
165
|
+
* Why the lifecycle could not be dated, as a MACHINE-READABLE cause rather than prose. The four
|
|
166
|
+
* are kept apart because each is a different thing to fix, and because three of them would
|
|
167
|
+
* otherwise be reported as the fourth: an empty timeline is what a deployment retaining no log,
|
|
168
|
+
* a failed read, a truncated read and a run that stood nothing up all produce, and only one of
|
|
169
|
+
* those is a statement about how the deployment is configured.
|
|
170
|
+
*
|
|
171
|
+
* - `unwired`: no provisioning-log repository is wired, so nothing records these dates.
|
|
172
|
+
* - `unreadable`: the log is wired and the read FAILED. A transport blip, not a
|
|
173
|
+
* configuration fact; re-attempted on the next publish.
|
|
174
|
+
* - `truncated`: the run has more provisioning rows than one report read may take, so
|
|
175
|
+
* what came back cannot be reasoned over as a complete history. Stated
|
|
176
|
+
* rather than folded, because a partial history yields a CONFIDENT wrong
|
|
177
|
+
* answer (an environment whose bring-up row fell off the end looks like
|
|
178
|
+
* one that was never stood up, and therefore never needs reclaiming).
|
|
179
|
+
* - `not_provisioned`: the run has no deployer step, so no lifecycle was ever meant to exist
|
|
180
|
+
* and the log was deliberately not queried.
|
|
181
|
+
*/
|
|
182
|
+
export declare const prReportTimelineGapSchema: v.PicklistSchema<["unwired", "unreadable", "truncated", "not_provisioned"], undefined>;
|
|
183
|
+
export type PrReportTimelineGap = v.InferOutput<typeof prReportTimelineGapSchema>;
|
|
184
|
+
/**
|
|
185
|
+
* The DATED half of the environment lifecycle, read off the run's rows in the provisioning
|
|
186
|
+
* event log, the only store that records WHEN a throwaway environment came up and when it
|
|
187
|
+
* went away. The step state can say an environment is gone; only the log can say it was torn
|
|
188
|
+
* down at a time, by an attempt that succeeded.
|
|
189
|
+
*
|
|
190
|
+
* `gap` is the honest-absence flag and it is NOT a formality: a deployment that retains no
|
|
191
|
+
* provisioning log, and one whose environments were never torn down, produce the same empty
|
|
192
|
+
* timeline and opposite facts. Reporting either as `tornDownAt: null` alone would let a reader
|
|
193
|
+
* conclude the environment is still running. It is a single field rather than a boolean beside
|
|
194
|
+
* a reason, so the two can never disagree.
|
|
195
|
+
*/
|
|
196
|
+
export declare const prReportEnvironmentTimelineSchema: v.ObjectSchema<{
|
|
197
|
+
/**
|
|
198
|
+
* Why this timeline is empty, or `null` when the log was read whole and the dates below are
|
|
199
|
+
* the history. Non-null ⇒ every field below is a zero because nothing (or not enough) was
|
|
200
|
+
* READ, not because nothing happened; `note` renders the same fact for a human.
|
|
201
|
+
*/
|
|
202
|
+
readonly gap: v.NullableSchema<v.PicklistSchema<["unwired", "unreadable", "truncated", "not_provisioned"], undefined>, undefined>;
|
|
203
|
+
/** Says why the timeline is empty when `gap` is set. */
|
|
204
|
+
readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
205
|
+
/** Epoch ms of the run's FIRST successful environment provision, when one is on record. */
|
|
206
|
+
readonly provisionedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
207
|
+
/**
|
|
208
|
+
* Epoch ms of the run's LAST successful environment teardown, when one is on record. This is
|
|
209
|
+
* the last one RECORDED, which is the end of the lifecycle only once {@link
|
|
210
|
+
* prReportEnvironmentsSchema.entries.teardown} is `confirmed`: a run that replaced an
|
|
211
|
+
* environment mid-flight reclaimed the superseded one and is still holding its replacement.
|
|
212
|
+
*/
|
|
213
|
+
readonly tornDownAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
214
|
+
/**
|
|
215
|
+
* How many provisioning attempts the log records as failures for this run (0 on a clean
|
|
216
|
+
* bring-up). Counted at whatever grain the provider logged: a whole environment that failed to
|
|
217
|
+
* come up, or one step of a multi-step stack recipe. Both are attempts that did not work, and
|
|
218
|
+
* the log does not distinguish them, so neither does this.
|
|
219
|
+
*/
|
|
220
|
+
readonly provisionFailures: v.NumberSchema<undefined>;
|
|
221
|
+
/**
|
|
222
|
+
* How many environments the run stood up whose LATEST teardown attempt failed. A non-zero
|
|
223
|
+
* count is the state the live-projection tri-state below cannot express: the platform tried to
|
|
224
|
+
* reclaim the environment and the provider refused, which is an operator's problem rather than
|
|
225
|
+
* a run's. Counted per environment, not per attempt, so a retry loop against one stuck
|
|
226
|
+
* environment does not read as a fleet of them.
|
|
227
|
+
*/
|
|
228
|
+
readonly teardownFailures: v.NumberSchema<undefined>;
|
|
229
|
+
}, undefined>;
|
|
230
|
+
export type PrReportEnvironmentTimeline = v.InferOutput<typeof prReportEnvironmentTimelineSchema>;
|
|
231
|
+
/** One artifact the UI tester captured while exercising the live environment. */
|
|
232
|
+
export declare const prReportEvidenceArtifactSchema: v.ObjectSchema<{
|
|
233
|
+
/** The logical view the screenshot was taken of. */
|
|
234
|
+
readonly view: v.StringSchema<undefined>;
|
|
235
|
+
/** The stored artifact id, in the deployment's binary-artifact store. */
|
|
236
|
+
readonly artifactId: v.StringSchema<undefined>;
|
|
237
|
+
/** Whether a reference design image was paired with it for visual confirmation. */
|
|
238
|
+
readonly hasReference: v.BooleanSchema<undefined>;
|
|
239
|
+
}, undefined>;
|
|
240
|
+
export type PrReportEvidenceArtifact = v.InferOutput<typeof prReportEvidenceArtifactSchema>;
|
|
241
|
+
/**
|
|
242
|
+
* The MIDDLE leg of the lifecycle proof: what was actually observed against the environment
|
|
243
|
+
* while it was live. An environment that came up and was torn down again proves only that the
|
|
244
|
+
* platform can spin infrastructure; it becomes evidence for the CHANGE when something was
|
|
245
|
+
* exercised against it in between.
|
|
246
|
+
*
|
|
247
|
+
* The four statuses are kept apart because they call for different reactions:
|
|
248
|
+
* - `captured`: a tester ran against the ephemeral environment and its observations are below.
|
|
249
|
+
* - `local`: a tester ran, but against locally stood-up dependencies, so nothing was
|
|
250
|
+
* observed against the environment this section is about.
|
|
251
|
+
* - `undeclared`: a tester reported without saying where it ran, so its observations cannot be
|
|
252
|
+
* ATTRIBUTED to this environment. Distinct from `local`, which is a positive
|
|
253
|
+
* statement that it ran somewhere else; guessing either way would turn an
|
|
254
|
+
* unknown into a claim, in the one section whose whole job is provenance.
|
|
255
|
+
* - `absent`: no tester report at all (no tester step, or it never settled).
|
|
256
|
+
*
|
|
257
|
+
* The artifacts and counts are reported WHATEVER the status: they exist, and a reviewer should
|
|
258
|
+
* be able to reach them. What the status governs is whether they may be read as evidence about
|
|
259
|
+
* this environment, which is why the attribution rides the section rather than the rows.
|
|
260
|
+
*/
|
|
261
|
+
export declare const prReportEnvironmentEvidenceSchema: v.ObjectSchema<{
|
|
262
|
+
readonly status: v.PicklistSchema<["captured", "local", "undeclared", "absent"], undefined>;
|
|
263
|
+
/** Says why the observations below are not evidence about this environment. */
|
|
264
|
+
readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
265
|
+
/** Where the tester stood the system under test up, when a report says. */
|
|
266
|
+
readonly ranAgainst: v.NullableSchema<v.PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
|
|
267
|
+
/** Epoch ms the tester step settled: the observation's place on the timeline above. */
|
|
268
|
+
readonly capturedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
269
|
+
/** How many areas the tester reported an outcome for. */
|
|
270
|
+
readonly outcomes: v.NumberSchema<undefined>;
|
|
271
|
+
/** How many spec requirements it returned a verdict on. */
|
|
272
|
+
readonly requirementVerdicts: v.NumberSchema<undefined>;
|
|
273
|
+
/** The screenshots it captured (capped like every other list; see `truncations`). */
|
|
274
|
+
readonly screenshots: v.ArraySchema<v.ObjectSchema<{
|
|
275
|
+
/** The logical view the screenshot was taken of. */
|
|
276
|
+
readonly view: v.StringSchema<undefined>;
|
|
277
|
+
/** The stored artifact id, in the deployment's binary-artifact store. */
|
|
278
|
+
readonly artifactId: v.StringSchema<undefined>;
|
|
279
|
+
/** Whether a reference design image was paired with it for visual confirmation. */
|
|
280
|
+
readonly hasReference: v.BooleanSchema<undefined>;
|
|
281
|
+
}, undefined>, undefined>;
|
|
282
|
+
/**
|
|
283
|
+
* Deep link into the run's captured evidence in the app. Null when the deployment configured
|
|
284
|
+
* no public app URL, so the report never emits a link to nowhere. The rows above still name
|
|
285
|
+
* each artifact, which is what an operator greps the store for.
|
|
286
|
+
*/
|
|
287
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
288
|
+
}, undefined>;
|
|
289
|
+
export type PrReportEnvironmentEvidence = v.InferOutput<typeof prReportEnvironmentEvidenceSchema>;
|
|
290
|
+
/**
|
|
291
|
+
* The ephemeral-environment lifecycle, as the three-leg proof a reviewer needs: the
|
|
292
|
+
* environment came UP, evidence was CAPTURED from it while it was live, and it was TORN DOWN
|
|
293
|
+
* again. Each leg is a captured fact from a different producer, and `proof` is COMPUTED from
|
|
294
|
+
* the three in code, never read off any agent's claim that it tested against a preview.
|
|
295
|
+
*
|
|
296
|
+
* `teardown` prefers the provisioning log's RECORDED attempts, per environment identity, and
|
|
297
|
+
* falls back to the run's live step projection only when there is no log to read:
|
|
298
|
+
* - `confirmed` — every environment the run stood up was reclaimed.
|
|
299
|
+
* - `pending` — at least one is still standing (the run may still be using it).
|
|
300
|
+
* - `failed` — an environment's latest teardown attempt FAILED, so it is still standing
|
|
301
|
+
* for a reason someone has to act on.
|
|
169
302
|
* - `not_applicable` — nothing was ever provisioned.
|
|
170
303
|
*/
|
|
171
304
|
export declare const prReportEnvironmentsSchema: v.ObjectSchema<{
|
|
@@ -179,7 +312,86 @@ export declare const prReportEnvironmentsSchema: v.ObjectSchema<{
|
|
|
179
312
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
180
313
|
readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
181
314
|
}, undefined>, undefined>;
|
|
182
|
-
readonly teardown: v.PicklistSchema<["confirmed", "pending", "not_applicable"], undefined>;
|
|
315
|
+
readonly teardown: v.PicklistSchema<["confirmed", "pending", "failed", "not_applicable"], undefined>;
|
|
316
|
+
readonly timeline: v.ObjectSchema<{
|
|
317
|
+
/**
|
|
318
|
+
* Why this timeline is empty, or `null` when the log was read whole and the dates below are
|
|
319
|
+
* the history. Non-null ⇒ every field below is a zero because nothing (or not enough) was
|
|
320
|
+
* READ, not because nothing happened; `note` renders the same fact for a human.
|
|
321
|
+
*/
|
|
322
|
+
readonly gap: v.NullableSchema<v.PicklistSchema<["unwired", "unreadable", "truncated", "not_provisioned"], undefined>, undefined>;
|
|
323
|
+
/** Says why the timeline is empty when `gap` is set. */
|
|
324
|
+
readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
325
|
+
/** Epoch ms of the run's FIRST successful environment provision, when one is on record. */
|
|
326
|
+
readonly provisionedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
327
|
+
/**
|
|
328
|
+
* Epoch ms of the run's LAST successful environment teardown, when one is on record. This is
|
|
329
|
+
* the last one RECORDED, which is the end of the lifecycle only once {@link
|
|
330
|
+
* prReportEnvironmentsSchema.entries.teardown} is `confirmed`: a run that replaced an
|
|
331
|
+
* environment mid-flight reclaimed the superseded one and is still holding its replacement.
|
|
332
|
+
*/
|
|
333
|
+
readonly tornDownAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
334
|
+
/**
|
|
335
|
+
* How many provisioning attempts the log records as failures for this run (0 on a clean
|
|
336
|
+
* bring-up). Counted at whatever grain the provider logged: a whole environment that failed to
|
|
337
|
+
* come up, or one step of a multi-step stack recipe. Both are attempts that did not work, and
|
|
338
|
+
* the log does not distinguish them, so neither does this.
|
|
339
|
+
*/
|
|
340
|
+
readonly provisionFailures: v.NumberSchema<undefined>;
|
|
341
|
+
/**
|
|
342
|
+
* How many environments the run stood up whose LATEST teardown attempt failed. A non-zero
|
|
343
|
+
* count is the state the live-projection tri-state below cannot express: the platform tried to
|
|
344
|
+
* reclaim the environment and the provider refused, which is an operator's problem rather than
|
|
345
|
+
* a run's. Counted per environment, not per attempt, so a retry loop against one stuck
|
|
346
|
+
* environment does not read as a fleet of them.
|
|
347
|
+
*/
|
|
348
|
+
readonly teardownFailures: v.NumberSchema<undefined>;
|
|
349
|
+
}, undefined>;
|
|
350
|
+
readonly evidence: v.ObjectSchema<{
|
|
351
|
+
readonly status: v.PicklistSchema<["captured", "local", "undeclared", "absent"], undefined>;
|
|
352
|
+
/** Says why the observations below are not evidence about this environment. */
|
|
353
|
+
readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
354
|
+
/** Where the tester stood the system under test up, when a report says. */
|
|
355
|
+
readonly ranAgainst: v.NullableSchema<v.PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
|
|
356
|
+
/** Epoch ms the tester step settled: the observation's place on the timeline above. */
|
|
357
|
+
readonly capturedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
358
|
+
/** How many areas the tester reported an outcome for. */
|
|
359
|
+
readonly outcomes: v.NumberSchema<undefined>;
|
|
360
|
+
/** How many spec requirements it returned a verdict on. */
|
|
361
|
+
readonly requirementVerdicts: v.NumberSchema<undefined>;
|
|
362
|
+
/** The screenshots it captured (capped like every other list; see `truncations`). */
|
|
363
|
+
readonly screenshots: v.ArraySchema<v.ObjectSchema<{
|
|
364
|
+
/** The logical view the screenshot was taken of. */
|
|
365
|
+
readonly view: v.StringSchema<undefined>;
|
|
366
|
+
/** The stored artifact id, in the deployment's binary-artifact store. */
|
|
367
|
+
readonly artifactId: v.StringSchema<undefined>;
|
|
368
|
+
/** Whether a reference design image was paired with it for visual confirmation. */
|
|
369
|
+
readonly hasReference: v.BooleanSchema<undefined>;
|
|
370
|
+
}, undefined>, undefined>;
|
|
371
|
+
/**
|
|
372
|
+
* Deep link into the run's captured evidence in the app. Null when the deployment configured
|
|
373
|
+
* no public app URL, so the report never emits a link to nowhere. The rows above still name
|
|
374
|
+
* each artifact, which is what an operator greps the store for.
|
|
375
|
+
*/
|
|
376
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
377
|
+
}, undefined>;
|
|
378
|
+
/**
|
|
379
|
+
* The composed verdict over the three legs:
|
|
380
|
+
* - `complete`: up, observed, and reclaimed.
|
|
381
|
+
* - `incomplete`: at least one leg is missing; {@link gaps} names which.
|
|
382
|
+
* - `not_applicable`: no environment was ever meant to stand up (no deployer step, or every
|
|
383
|
+
* frame is infraless), so there is nothing to prove.
|
|
384
|
+
*
|
|
385
|
+
* COMPUTED from the legs, never asserted: this is the platform's judgement about its own
|
|
386
|
+
* evidence, and a reviewer must be able to re-derive it from the rows above.
|
|
387
|
+
*/
|
|
388
|
+
readonly proof: v.PicklistSchema<["complete", "incomplete", "not_applicable"], undefined>;
|
|
389
|
+
/**
|
|
390
|
+
* One human-readable line per missing or contradictory leg, so an `incomplete` proof always
|
|
391
|
+
* says WHAT is missing rather than leaving a reader to diff the sections. Empty when
|
|
392
|
+
* `proof` is `complete`.
|
|
393
|
+
*/
|
|
394
|
+
readonly gaps: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
183
395
|
}, undefined>;
|
|
184
396
|
export type PrReportEnvironments = v.InferOutput<typeof prReportEnvironmentsSchema>;
|
|
185
397
|
/**
|
|
@@ -535,7 +747,86 @@ export declare const prVerificationReportSchema: v.ObjectSchema<{
|
|
|
535
747
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
536
748
|
readonly error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
537
749
|
}, undefined>, undefined>;
|
|
538
|
-
readonly teardown: v.PicklistSchema<["confirmed", "pending", "not_applicable"], undefined>;
|
|
750
|
+
readonly teardown: v.PicklistSchema<["confirmed", "pending", "failed", "not_applicable"], undefined>;
|
|
751
|
+
readonly timeline: v.ObjectSchema<{
|
|
752
|
+
/**
|
|
753
|
+
* Why this timeline is empty, or `null` when the log was read whole and the dates below are
|
|
754
|
+
* the history. Non-null ⇒ every field below is a zero because nothing (or not enough) was
|
|
755
|
+
* READ, not because nothing happened; `note` renders the same fact for a human.
|
|
756
|
+
*/
|
|
757
|
+
readonly gap: v.NullableSchema<v.PicklistSchema<["unwired", "unreadable", "truncated", "not_provisioned"], undefined>, undefined>;
|
|
758
|
+
/** Says why the timeline is empty when `gap` is set. */
|
|
759
|
+
readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
760
|
+
/** Epoch ms of the run's FIRST successful environment provision, when one is on record. */
|
|
761
|
+
readonly provisionedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
762
|
+
/**
|
|
763
|
+
* Epoch ms of the run's LAST successful environment teardown, when one is on record. This is
|
|
764
|
+
* the last one RECORDED, which is the end of the lifecycle only once {@link
|
|
765
|
+
* prReportEnvironmentsSchema.entries.teardown} is `confirmed`: a run that replaced an
|
|
766
|
+
* environment mid-flight reclaimed the superseded one and is still holding its replacement.
|
|
767
|
+
*/
|
|
768
|
+
readonly tornDownAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
769
|
+
/**
|
|
770
|
+
* How many provisioning attempts the log records as failures for this run (0 on a clean
|
|
771
|
+
* bring-up). Counted at whatever grain the provider logged: a whole environment that failed to
|
|
772
|
+
* come up, or one step of a multi-step stack recipe. Both are attempts that did not work, and
|
|
773
|
+
* the log does not distinguish them, so neither does this.
|
|
774
|
+
*/
|
|
775
|
+
readonly provisionFailures: v.NumberSchema<undefined>;
|
|
776
|
+
/**
|
|
777
|
+
* How many environments the run stood up whose LATEST teardown attempt failed. A non-zero
|
|
778
|
+
* count is the state the live-projection tri-state below cannot express: the platform tried to
|
|
779
|
+
* reclaim the environment and the provider refused, which is an operator's problem rather than
|
|
780
|
+
* a run's. Counted per environment, not per attempt, so a retry loop against one stuck
|
|
781
|
+
* environment does not read as a fleet of them.
|
|
782
|
+
*/
|
|
783
|
+
readonly teardownFailures: v.NumberSchema<undefined>;
|
|
784
|
+
}, undefined>;
|
|
785
|
+
readonly evidence: v.ObjectSchema<{
|
|
786
|
+
readonly status: v.PicklistSchema<["captured", "local", "undeclared", "absent"], undefined>;
|
|
787
|
+
/** Says why the observations below are not evidence about this environment. */
|
|
788
|
+
readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
789
|
+
/** Where the tester stood the system under test up, when a report says. */
|
|
790
|
+
readonly ranAgainst: v.NullableSchema<v.PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
|
|
791
|
+
/** Epoch ms the tester step settled: the observation's place on the timeline above. */
|
|
792
|
+
readonly capturedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
793
|
+
/** How many areas the tester reported an outcome for. */
|
|
794
|
+
readonly outcomes: v.NumberSchema<undefined>;
|
|
795
|
+
/** How many spec requirements it returned a verdict on. */
|
|
796
|
+
readonly requirementVerdicts: v.NumberSchema<undefined>;
|
|
797
|
+
/** The screenshots it captured (capped like every other list; see `truncations`). */
|
|
798
|
+
readonly screenshots: v.ArraySchema<v.ObjectSchema<{
|
|
799
|
+
/** The logical view the screenshot was taken of. */
|
|
800
|
+
readonly view: v.StringSchema<undefined>;
|
|
801
|
+
/** The stored artifact id, in the deployment's binary-artifact store. */
|
|
802
|
+
readonly artifactId: v.StringSchema<undefined>;
|
|
803
|
+
/** Whether a reference design image was paired with it for visual confirmation. */
|
|
804
|
+
readonly hasReference: v.BooleanSchema<undefined>;
|
|
805
|
+
}, undefined>, undefined>;
|
|
806
|
+
/**
|
|
807
|
+
* Deep link into the run's captured evidence in the app. Null when the deployment configured
|
|
808
|
+
* no public app URL, so the report never emits a link to nowhere. The rows above still name
|
|
809
|
+
* each artifact, which is what an operator greps the store for.
|
|
810
|
+
*/
|
|
811
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
812
|
+
}, undefined>;
|
|
813
|
+
/**
|
|
814
|
+
* The composed verdict over the three legs:
|
|
815
|
+
* - `complete`: up, observed, and reclaimed.
|
|
816
|
+
* - `incomplete`: at least one leg is missing; {@link gaps} names which.
|
|
817
|
+
* - `not_applicable`: no environment was ever meant to stand up (no deployer step, or every
|
|
818
|
+
* frame is infraless), so there is nothing to prove.
|
|
819
|
+
*
|
|
820
|
+
* COMPUTED from the legs, never asserted: this is the platform's judgement about its own
|
|
821
|
+
* evidence, and a reviewer must be able to re-derive it from the rows above.
|
|
822
|
+
*/
|
|
823
|
+
readonly proof: v.PicklistSchema<["complete", "incomplete", "not_applicable"], undefined>;
|
|
824
|
+
/**
|
|
825
|
+
* One human-readable line per missing or contradictory leg, so an `incomplete` proof always
|
|
826
|
+
* says WHAT is missing rather than leaving a reader to diff the sections. Empty when
|
|
827
|
+
* `proof` is `complete`.
|
|
828
|
+
*/
|
|
829
|
+
readonly gaps: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
539
830
|
}, undefined>;
|
|
540
831
|
readonly merge: v.ObjectSchema<{
|
|
541
832
|
readonly status: v.PicklistSchema<["reported", "absent"], undefined>;
|
package/dist/pr-report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-report.d.ts","sour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,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAE9E"}
|
package/dist/pr-report.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { mergeAssessmentSchema } from './merge.js';
|
|
3
3
|
import { judgeDispositionSchema, judgeFindingSchema } from './judge.js';
|
|
4
4
|
import { requirementPrioritySchema, requirementStateSchema } from './spec.js';
|
|
5
|
-
import { requirementVerdictStatusSchema } from './testing.js';
|
|
5
|
+
import { requirementVerdictStatusSchema, testEnvironmentSchema } from './testing.js';
|
|
6
6
|
import { vcsProviderSchema } from './routes/auth.js';
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
// PR verification report — the structured evidence bundle the ENGINE maintains on a
|
|
@@ -26,7 +26,7 @@ import { vcsProviderSchema } from './routes/auth.js';
|
|
|
26
26
|
* external consumer must notice. Backwards compatibility is a non-goal (see CLAUDE.md), so
|
|
27
27
|
* a bump means "re-read the schema", not "a compatibility shim exists".
|
|
28
28
|
*/
|
|
29
|
-
export const PR_VERIFICATION_REPORT_VERSION =
|
|
29
|
+
export const PR_VERIFICATION_REPORT_VERSION = 4;
|
|
30
30
|
/**
|
|
31
31
|
* Whether a section has evidence to show.
|
|
32
32
|
* - `reported` — the producing step ran and its evidence is below.
|
|
@@ -144,17 +144,163 @@ export const prReportEnvironmentSchema = v.object({
|
|
|
144
144
|
error: v.optional(v.nullable(v.string())),
|
|
145
145
|
});
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
147
|
+
* Why the lifecycle could not be dated, as a MACHINE-READABLE cause rather than prose. The four
|
|
148
|
+
* are kept apart because each is a different thing to fix, and because three of them would
|
|
149
|
+
* otherwise be reported as the fourth: an empty timeline is what a deployment retaining no log,
|
|
150
|
+
* a failed read, a truncated read and a run that stood nothing up all produce, and only one of
|
|
151
|
+
* those is a statement about how the deployment is configured.
|
|
152
|
+
*
|
|
153
|
+
* - `unwired`: no provisioning-log repository is wired, so nothing records these dates.
|
|
154
|
+
* - `unreadable`: the log is wired and the read FAILED. A transport blip, not a
|
|
155
|
+
* configuration fact; re-attempted on the next publish.
|
|
156
|
+
* - `truncated`: the run has more provisioning rows than one report read may take, so
|
|
157
|
+
* what came back cannot be reasoned over as a complete history. Stated
|
|
158
|
+
* rather than folded, because a partial history yields a CONFIDENT wrong
|
|
159
|
+
* answer (an environment whose bring-up row fell off the end looks like
|
|
160
|
+
* one that was never stood up, and therefore never needs reclaiming).
|
|
161
|
+
* - `not_provisioned`: the run has no deployer step, so no lifecycle was ever meant to exist
|
|
162
|
+
* and the log was deliberately not queried.
|
|
163
|
+
*/
|
|
164
|
+
export const prReportTimelineGapSchema = v.picklist([
|
|
165
|
+
'unwired',
|
|
166
|
+
'unreadable',
|
|
167
|
+
'truncated',
|
|
168
|
+
'not_provisioned',
|
|
169
|
+
]);
|
|
170
|
+
/**
|
|
171
|
+
* The DATED half of the environment lifecycle, read off the run's rows in the provisioning
|
|
172
|
+
* event log, the only store that records WHEN a throwaway environment came up and when it
|
|
173
|
+
* went away. The step state can say an environment is gone; only the log can say it was torn
|
|
174
|
+
* down at a time, by an attempt that succeeded.
|
|
175
|
+
*
|
|
176
|
+
* `gap` is the honest-absence flag and it is NOT a formality: a deployment that retains no
|
|
177
|
+
* provisioning log, and one whose environments were never torn down, produce the same empty
|
|
178
|
+
* timeline and opposite facts. Reporting either as `tornDownAt: null` alone would let a reader
|
|
179
|
+
* conclude the environment is still running. It is a single field rather than a boolean beside
|
|
180
|
+
* a reason, so the two can never disagree.
|
|
181
|
+
*/
|
|
182
|
+
export const prReportEnvironmentTimelineSchema = v.object({
|
|
183
|
+
/**
|
|
184
|
+
* Why this timeline is empty, or `null` when the log was read whole and the dates below are
|
|
185
|
+
* the history. Non-null ⇒ every field below is a zero because nothing (or not enough) was
|
|
186
|
+
* READ, not because nothing happened; `note` renders the same fact for a human.
|
|
187
|
+
*/
|
|
188
|
+
gap: v.nullable(prReportTimelineGapSchema),
|
|
189
|
+
/** Says why the timeline is empty when `gap` is set. */
|
|
190
|
+
note: v.optional(v.nullable(v.string())),
|
|
191
|
+
/** Epoch ms of the run's FIRST successful environment provision, when one is on record. */
|
|
192
|
+
provisionedAt: v.nullable(v.number()),
|
|
193
|
+
/**
|
|
194
|
+
* Epoch ms of the run's LAST successful environment teardown, when one is on record. This is
|
|
195
|
+
* the last one RECORDED, which is the end of the lifecycle only once {@link
|
|
196
|
+
* prReportEnvironmentsSchema.entries.teardown} is `confirmed`: a run that replaced an
|
|
197
|
+
* environment mid-flight reclaimed the superseded one and is still holding its replacement.
|
|
198
|
+
*/
|
|
199
|
+
tornDownAt: v.nullable(v.number()),
|
|
200
|
+
/**
|
|
201
|
+
* How many provisioning attempts the log records as failures for this run (0 on a clean
|
|
202
|
+
* bring-up). Counted at whatever grain the provider logged: a whole environment that failed to
|
|
203
|
+
* come up, or one step of a multi-step stack recipe. Both are attempts that did not work, and
|
|
204
|
+
* the log does not distinguish them, so neither does this.
|
|
205
|
+
*/
|
|
206
|
+
provisionFailures: v.number(),
|
|
207
|
+
/**
|
|
208
|
+
* How many environments the run stood up whose LATEST teardown attempt failed. A non-zero
|
|
209
|
+
* count is the state the live-projection tri-state below cannot express: the platform tried to
|
|
210
|
+
* reclaim the environment and the provider refused, which is an operator's problem rather than
|
|
211
|
+
* a run's. Counted per environment, not per attempt, so a retry loop against one stuck
|
|
212
|
+
* environment does not read as a fleet of them.
|
|
213
|
+
*/
|
|
214
|
+
teardownFailures: v.number(),
|
|
215
|
+
});
|
|
216
|
+
/** One artifact the UI tester captured while exercising the live environment. */
|
|
217
|
+
export const prReportEvidenceArtifactSchema = v.object({
|
|
218
|
+
/** The logical view the screenshot was taken of. */
|
|
219
|
+
view: v.string(),
|
|
220
|
+
/** The stored artifact id, in the deployment's binary-artifact store. */
|
|
221
|
+
artifactId: v.string(),
|
|
222
|
+
/** Whether a reference design image was paired with it for visual confirmation. */
|
|
223
|
+
hasReference: v.boolean(),
|
|
224
|
+
});
|
|
225
|
+
/**
|
|
226
|
+
* The MIDDLE leg of the lifecycle proof: what was actually observed against the environment
|
|
227
|
+
* while it was live. An environment that came up and was torn down again proves only that the
|
|
228
|
+
* platform can spin infrastructure; it becomes evidence for the CHANGE when something was
|
|
229
|
+
* exercised against it in between.
|
|
230
|
+
*
|
|
231
|
+
* The four statuses are kept apart because they call for different reactions:
|
|
232
|
+
* - `captured`: a tester ran against the ephemeral environment and its observations are below.
|
|
233
|
+
* - `local`: a tester ran, but against locally stood-up dependencies, so nothing was
|
|
234
|
+
* observed against the environment this section is about.
|
|
235
|
+
* - `undeclared`: a tester reported without saying where it ran, so its observations cannot be
|
|
236
|
+
* ATTRIBUTED to this environment. Distinct from `local`, which is a positive
|
|
237
|
+
* statement that it ran somewhere else; guessing either way would turn an
|
|
238
|
+
* unknown into a claim, in the one section whose whole job is provenance.
|
|
239
|
+
* - `absent`: no tester report at all (no tester step, or it never settled).
|
|
240
|
+
*
|
|
241
|
+
* The artifacts and counts are reported WHATEVER the status: they exist, and a reviewer should
|
|
242
|
+
* be able to reach them. What the status governs is whether they may be read as evidence about
|
|
243
|
+
* this environment, which is why the attribution rides the section rather than the rows.
|
|
244
|
+
*/
|
|
245
|
+
export const prReportEnvironmentEvidenceSchema = v.object({
|
|
246
|
+
status: v.picklist(['captured', 'local', 'undeclared', 'absent']),
|
|
247
|
+
/** Says why the observations below are not evidence about this environment. */
|
|
248
|
+
note: v.optional(v.nullable(v.string())),
|
|
249
|
+
/** Where the tester stood the system under test up, when a report says. */
|
|
250
|
+
ranAgainst: v.nullable(testEnvironmentSchema),
|
|
251
|
+
/** Epoch ms the tester step settled: the observation's place on the timeline above. */
|
|
252
|
+
capturedAt: v.nullable(v.number()),
|
|
253
|
+
/** How many areas the tester reported an outcome for. */
|
|
254
|
+
outcomes: v.number(),
|
|
255
|
+
/** How many spec requirements it returned a verdict on. */
|
|
256
|
+
requirementVerdicts: v.number(),
|
|
257
|
+
/** The screenshots it captured (capped like every other list; see `truncations`). */
|
|
258
|
+
screenshots: v.array(prReportEvidenceArtifactSchema),
|
|
259
|
+
/**
|
|
260
|
+
* Deep link into the run's captured evidence in the app. Null when the deployment configured
|
|
261
|
+
* no public app URL, so the report never emits a link to nowhere. The rows above still name
|
|
262
|
+
* each artifact, which is what an operator greps the store for.
|
|
263
|
+
*/
|
|
264
|
+
url: v.nullable(v.string()),
|
|
265
|
+
});
|
|
266
|
+
/**
|
|
267
|
+
* The ephemeral-environment lifecycle, as the three-leg proof a reviewer needs: the
|
|
268
|
+
* environment came UP, evidence was CAPTURED from it while it was live, and it was TORN DOWN
|
|
269
|
+
* again. Each leg is a captured fact from a different producer, and `proof` is COMPUTED from
|
|
270
|
+
* the three in code, never read off any agent's claim that it tested against a preview.
|
|
271
|
+
*
|
|
272
|
+
* `teardown` prefers the provisioning log's RECORDED attempts, per environment identity, and
|
|
273
|
+
* falls back to the run's live step projection only when there is no log to read:
|
|
274
|
+
* - `confirmed` — every environment the run stood up was reclaimed.
|
|
275
|
+
* - `pending` — at least one is still standing (the run may still be using it).
|
|
276
|
+
* - `failed` — an environment's latest teardown attempt FAILED, so it is still standing
|
|
277
|
+
* for a reason someone has to act on.
|
|
151
278
|
* - `not_applicable` — nothing was ever provisioned.
|
|
152
279
|
*/
|
|
153
280
|
export const prReportEnvironmentsSchema = v.object({
|
|
154
281
|
status: prReportSectionStatusSchema,
|
|
155
282
|
note: v.optional(v.nullable(v.string())),
|
|
156
283
|
entries: v.array(prReportEnvironmentSchema),
|
|
157
|
-
teardown: v.picklist(['confirmed', 'pending', 'not_applicable']),
|
|
284
|
+
teardown: v.picklist(['confirmed', 'pending', 'failed', 'not_applicable']),
|
|
285
|
+
timeline: prReportEnvironmentTimelineSchema,
|
|
286
|
+
evidence: prReportEnvironmentEvidenceSchema,
|
|
287
|
+
/**
|
|
288
|
+
* The composed verdict over the three legs:
|
|
289
|
+
* - `complete`: up, observed, and reclaimed.
|
|
290
|
+
* - `incomplete`: at least one leg is missing; {@link gaps} names which.
|
|
291
|
+
* - `not_applicable`: no environment was ever meant to stand up (no deployer step, or every
|
|
292
|
+
* frame is infraless), so there is nothing to prove.
|
|
293
|
+
*
|
|
294
|
+
* COMPUTED from the legs, never asserted: this is the platform's judgement about its own
|
|
295
|
+
* evidence, and a reviewer must be able to re-derive it from the rows above.
|
|
296
|
+
*/
|
|
297
|
+
proof: v.picklist(['complete', 'incomplete', 'not_applicable']),
|
|
298
|
+
/**
|
|
299
|
+
* One human-readable line per missing or contradictory leg, so an `incomplete` proof always
|
|
300
|
+
* says WHAT is missing rather than leaving a reader to diff the sections. Empty when
|
|
301
|
+
* `proof` is `complete`.
|
|
302
|
+
*/
|
|
303
|
+
gaps: v.array(v.string()),
|
|
158
304
|
});
|
|
159
305
|
/**
|
|
160
306
|
* The `merger` step's scored assessment plus the engine's resolved decision. `assessment` is
|
package/dist/pr-report.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-report.js","sourceRoot":"","sources":["../src/pr-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"pr-report.js","sourceRoot":"","sources":["../src/pr-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE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IACxC,YAAY,EAAE,0BAA0B;IACxC,KAAK,EAAE,mBAAmB;IAC1B,MAAM,EAAE,oBAAoB;IAC5B,aAAa,EAAE,2BAA2B;IAC1C;;;;;;;;;OASG;IACH,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACjC,CAAC,CAAA;AAGF;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,OAAO,CAAC,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAA;AACnD,CAAC"}
|
|
@@ -1,144 +1,201 @@
|
|
|
1
1
|
import { ContractNoBody } from '@toad-contracts/valibot';
|
|
2
|
+
import * as v from 'valibot';
|
|
2
3
|
export declare const getCapabilityCredentialsContract: {
|
|
3
4
|
readonly method: "get";
|
|
4
5
|
readonly pathResolver: () => string;
|
|
5
6
|
readonly responsesByStatusCode: {
|
|
6
|
-
readonly '4xx':
|
|
7
|
-
readonly error:
|
|
8
|
-
readonly code:
|
|
9
|
-
readonly message:
|
|
10
|
-
readonly details:
|
|
11
|
-
readonly issues:
|
|
12
|
-
readonly path:
|
|
13
|
-
readonly message:
|
|
7
|
+
readonly '4xx': v.ObjectSchema<{
|
|
8
|
+
readonly error: v.ObjectSchema<{
|
|
9
|
+
readonly code: v.StringSchema<undefined>;
|
|
10
|
+
readonly message: v.StringSchema<undefined>;
|
|
11
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
12
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
13
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
14
|
+
readonly message: v.StringSchema<undefined>;
|
|
14
15
|
}, undefined>, undefined>, undefined>;
|
|
15
16
|
}, undefined>;
|
|
16
17
|
}, undefined>;
|
|
17
|
-
readonly '5xx':
|
|
18
|
-
readonly error:
|
|
19
|
-
readonly code:
|
|
20
|
-
readonly message:
|
|
21
|
-
readonly details:
|
|
22
|
-
readonly issues:
|
|
23
|
-
readonly path:
|
|
24
|
-
readonly message:
|
|
18
|
+
readonly '5xx': v.ObjectSchema<{
|
|
19
|
+
readonly error: v.ObjectSchema<{
|
|
20
|
+
readonly code: v.StringSchema<undefined>;
|
|
21
|
+
readonly message: v.StringSchema<undefined>;
|
|
22
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
23
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
24
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
25
|
+
readonly message: v.StringSchema<undefined>;
|
|
25
26
|
}, undefined>, undefined>, undefined>;
|
|
26
27
|
}, undefined>;
|
|
27
28
|
}, undefined>;
|
|
28
|
-
readonly 200:
|
|
29
|
-
readonly declared:
|
|
30
|
-
readonly key:
|
|
31
|
-
readonly declaredBy:
|
|
32
|
-
readonly subject:
|
|
33
|
-
readonly id:
|
|
34
|
-
readonly label:
|
|
35
|
-
readonly usage:
|
|
29
|
+
readonly 200: v.ObjectSchema<{
|
|
30
|
+
readonly declared: v.ArraySchema<v.ObjectSchema<{
|
|
31
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
32
|
+
readonly declaredBy: v.ArraySchema<v.ObjectSchema<{
|
|
33
|
+
readonly subject: v.PicklistSchema<["tool-server", "binary-generator"], undefined>;
|
|
34
|
+
readonly id: v.StringSchema<undefined>;
|
|
35
|
+
readonly label: v.StringSchema<undefined>;
|
|
36
|
+
readonly usage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
36
37
|
}, undefined>, undefined>;
|
|
37
|
-
readonly required:
|
|
38
|
-
readonly stored:
|
|
39
|
-
readonly updatedAt:
|
|
38
|
+
readonly required: v.BooleanSchema<undefined>;
|
|
39
|
+
readonly stored: v.BooleanSchema<undefined>;
|
|
40
|
+
readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
40
41
|
}, undefined>, undefined>;
|
|
41
|
-
readonly orphaned:
|
|
42
|
-
readonly key:
|
|
43
|
-
readonly updatedAt:
|
|
42
|
+
readonly orphaned: v.ArraySchema<v.ObjectSchema<{
|
|
43
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
44
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
44
45
|
}, undefined>, undefined>;
|
|
45
|
-
readonly environmentFallback:
|
|
46
|
-
readonly declarationsIncomplete:
|
|
46
|
+
readonly environmentFallback: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
47
|
+
readonly declarationsIncomplete: v.BooleanSchema<undefined>;
|
|
47
48
|
}, undefined>;
|
|
48
49
|
};
|
|
49
50
|
};
|
|
50
51
|
export declare const setCapabilityCredentialsContract: {
|
|
51
52
|
readonly method: "put";
|
|
52
53
|
readonly pathResolver: () => string;
|
|
53
|
-
readonly requestBodySchema:
|
|
54
|
-
readonly entries:
|
|
55
|
-
readonly key:
|
|
56
|
-
readonly value:
|
|
54
|
+
readonly requestBodySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
55
|
+
readonly entries: v.ArraySchema<v.ObjectSchema<{
|
|
56
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
57
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
|
|
57
58
|
}, undefined>, undefined>;
|
|
58
|
-
}, undefined>,
|
|
59
|
+
}, undefined>, v.CheckAction<{
|
|
59
60
|
entries: {
|
|
60
61
|
key: string;
|
|
61
62
|
value: string;
|
|
62
63
|
}[];
|
|
63
|
-
}, "capability credential keys must be unique within a workspace">,
|
|
64
|
+
}, "capability credential keys must be unique within a workspace">, v.CheckAction<{
|
|
64
65
|
entries: {
|
|
65
66
|
key: string;
|
|
66
67
|
value: string;
|
|
67
68
|
}[];
|
|
68
69
|
}, "at most 100 capability credentials per workspace">]>;
|
|
69
70
|
readonly responsesByStatusCode: {
|
|
70
|
-
readonly '4xx':
|
|
71
|
-
readonly error:
|
|
72
|
-
readonly code:
|
|
73
|
-
readonly message:
|
|
74
|
-
readonly details:
|
|
75
|
-
readonly issues:
|
|
76
|
-
readonly path:
|
|
77
|
-
readonly message:
|
|
71
|
+
readonly '4xx': v.ObjectSchema<{
|
|
72
|
+
readonly error: v.ObjectSchema<{
|
|
73
|
+
readonly code: v.StringSchema<undefined>;
|
|
74
|
+
readonly message: v.StringSchema<undefined>;
|
|
75
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
76
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
77
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
78
|
+
readonly message: v.StringSchema<undefined>;
|
|
78
79
|
}, undefined>, undefined>, undefined>;
|
|
79
80
|
}, undefined>;
|
|
80
81
|
}, undefined>;
|
|
81
|
-
readonly '5xx':
|
|
82
|
-
readonly error:
|
|
83
|
-
readonly code:
|
|
84
|
-
readonly message:
|
|
85
|
-
readonly details:
|
|
86
|
-
readonly issues:
|
|
87
|
-
readonly path:
|
|
88
|
-
readonly message:
|
|
82
|
+
readonly '5xx': v.ObjectSchema<{
|
|
83
|
+
readonly error: v.ObjectSchema<{
|
|
84
|
+
readonly code: v.StringSchema<undefined>;
|
|
85
|
+
readonly message: v.StringSchema<undefined>;
|
|
86
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
87
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
88
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
89
|
+
readonly message: v.StringSchema<undefined>;
|
|
89
90
|
}, undefined>, undefined>, undefined>;
|
|
90
91
|
}, undefined>;
|
|
91
92
|
}, undefined>;
|
|
92
|
-
readonly 200:
|
|
93
|
-
readonly declared:
|
|
94
|
-
readonly key:
|
|
95
|
-
readonly declaredBy:
|
|
96
|
-
readonly subject:
|
|
97
|
-
readonly id:
|
|
98
|
-
readonly label:
|
|
99
|
-
readonly usage:
|
|
93
|
+
readonly 200: v.ObjectSchema<{
|
|
94
|
+
readonly declared: v.ArraySchema<v.ObjectSchema<{
|
|
95
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
96
|
+
readonly declaredBy: v.ArraySchema<v.ObjectSchema<{
|
|
97
|
+
readonly subject: v.PicklistSchema<["tool-server", "binary-generator"], undefined>;
|
|
98
|
+
readonly id: v.StringSchema<undefined>;
|
|
99
|
+
readonly label: v.StringSchema<undefined>;
|
|
100
|
+
readonly usage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
100
101
|
}, undefined>, undefined>;
|
|
101
|
-
readonly required:
|
|
102
|
-
readonly stored:
|
|
103
|
-
readonly updatedAt:
|
|
102
|
+
readonly required: v.BooleanSchema<undefined>;
|
|
103
|
+
readonly stored: v.BooleanSchema<undefined>;
|
|
104
|
+
readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
104
105
|
}, undefined>, undefined>;
|
|
105
|
-
readonly orphaned:
|
|
106
|
-
readonly key:
|
|
107
|
-
readonly updatedAt:
|
|
106
|
+
readonly orphaned: v.ArraySchema<v.ObjectSchema<{
|
|
107
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
108
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
108
109
|
}, undefined>, undefined>;
|
|
109
|
-
readonly environmentFallback:
|
|
110
|
-
readonly declarationsIncomplete:
|
|
110
|
+
readonly environmentFallback: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
111
|
+
readonly declarationsIncomplete: v.BooleanSchema<undefined>;
|
|
112
|
+
}, undefined>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export declare const setCapabilityCredentialContract: {
|
|
116
|
+
readonly method: "put";
|
|
117
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
118
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
119
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
120
|
+
readonly pathResolver: ({ key }: {
|
|
121
|
+
key: string;
|
|
122
|
+
}) => string;
|
|
123
|
+
readonly requestBodySchema: v.ObjectSchema<{
|
|
124
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8192, undefined>]>;
|
|
125
|
+
}, undefined>;
|
|
126
|
+
readonly responsesByStatusCode: {
|
|
127
|
+
readonly '4xx': v.ObjectSchema<{
|
|
128
|
+
readonly error: v.ObjectSchema<{
|
|
129
|
+
readonly code: v.StringSchema<undefined>;
|
|
130
|
+
readonly message: v.StringSchema<undefined>;
|
|
131
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
132
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
133
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
134
|
+
readonly message: v.StringSchema<undefined>;
|
|
135
|
+
}, undefined>, undefined>, undefined>;
|
|
136
|
+
}, undefined>;
|
|
137
|
+
}, undefined>;
|
|
138
|
+
readonly '5xx': v.ObjectSchema<{
|
|
139
|
+
readonly error: v.ObjectSchema<{
|
|
140
|
+
readonly code: v.StringSchema<undefined>;
|
|
141
|
+
readonly message: v.StringSchema<undefined>;
|
|
142
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
143
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
144
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
145
|
+
readonly message: v.StringSchema<undefined>;
|
|
146
|
+
}, undefined>, undefined>, undefined>;
|
|
147
|
+
}, undefined>;
|
|
148
|
+
}, undefined>;
|
|
149
|
+
readonly 200: v.ObjectSchema<{
|
|
150
|
+
readonly declared: v.ArraySchema<v.ObjectSchema<{
|
|
151
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
152
|
+
readonly declaredBy: v.ArraySchema<v.ObjectSchema<{
|
|
153
|
+
readonly subject: v.PicklistSchema<["tool-server", "binary-generator"], undefined>;
|
|
154
|
+
readonly id: v.StringSchema<undefined>;
|
|
155
|
+
readonly label: v.StringSchema<undefined>;
|
|
156
|
+
readonly usage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
157
|
+
}, undefined>, undefined>;
|
|
158
|
+
readonly required: v.BooleanSchema<undefined>;
|
|
159
|
+
readonly stored: v.BooleanSchema<undefined>;
|
|
160
|
+
readonly updatedAt: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
161
|
+
}, undefined>, undefined>;
|
|
162
|
+
readonly orphaned: v.ArraySchema<v.ObjectSchema<{
|
|
163
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "must be a valid environment variable name (letters, digits and underscores, not starting with a digit)">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
|
|
164
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
165
|
+
}, undefined>, undefined>;
|
|
166
|
+
readonly environmentFallback: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
167
|
+
readonly declarationsIncomplete: v.BooleanSchema<undefined>;
|
|
111
168
|
}, undefined>;
|
|
112
169
|
};
|
|
113
170
|
};
|
|
114
171
|
export declare const deleteCapabilityCredentialContract: {
|
|
115
172
|
readonly method: "delete";
|
|
116
|
-
readonly requestPathParamsSchema:
|
|
117
|
-
key:
|
|
173
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
174
|
+
key: v.StringSchema<undefined>;
|
|
118
175
|
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
119
176
|
readonly pathResolver: ({ key }: {
|
|
120
177
|
key: string;
|
|
121
178
|
}) => string;
|
|
122
179
|
readonly responsesByStatusCode: {
|
|
123
|
-
readonly '4xx':
|
|
124
|
-
readonly error:
|
|
125
|
-
readonly code:
|
|
126
|
-
readonly message:
|
|
127
|
-
readonly details:
|
|
128
|
-
readonly issues:
|
|
129
|
-
readonly path:
|
|
130
|
-
readonly message:
|
|
180
|
+
readonly '4xx': v.ObjectSchema<{
|
|
181
|
+
readonly error: v.ObjectSchema<{
|
|
182
|
+
readonly code: v.StringSchema<undefined>;
|
|
183
|
+
readonly message: v.StringSchema<undefined>;
|
|
184
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
185
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
186
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
187
|
+
readonly message: v.StringSchema<undefined>;
|
|
131
188
|
}, undefined>, undefined>, undefined>;
|
|
132
189
|
}, undefined>;
|
|
133
190
|
}, undefined>;
|
|
134
|
-
readonly '5xx':
|
|
135
|
-
readonly error:
|
|
136
|
-
readonly code:
|
|
137
|
-
readonly message:
|
|
138
|
-
readonly details:
|
|
139
|
-
readonly issues:
|
|
140
|
-
readonly path:
|
|
141
|
-
readonly message:
|
|
191
|
+
readonly '5xx': v.ObjectSchema<{
|
|
192
|
+
readonly error: v.ObjectSchema<{
|
|
193
|
+
readonly code: v.StringSchema<undefined>;
|
|
194
|
+
readonly message: v.StringSchema<undefined>;
|
|
195
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
196
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
197
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
198
|
+
readonly message: v.StringSchema<undefined>;
|
|
142
199
|
}, undefined>, undefined>, undefined>;
|
|
143
200
|
}, undefined>;
|
|
144
201
|
}, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-credentials.d.ts","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"capability-credentials.d.ts","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqC,MAAM,yBAAyB,CAAA;AAC3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAoB5B,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK3C,CAAA;AAOF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM1C,CAAA;AAQF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK7C,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
|
|
2
|
-
import
|
|
1
|
+
import { ContractNoBody, defineApiContract, withObjectKeys } from '@toad-contracts/valibot';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { capabilityCredentialKeySchema, capabilityCredentialsViewSchema, setCapabilityCredentialSchema, upsertCapabilityCredentialsSchema, } from '../capability-credentials.js';
|
|
3
4
|
import { errorResponses, singleStringParam } from './_shared.js';
|
|
4
5
|
// ---------------------------------------------------------------------------
|
|
5
6
|
// Per-workspace CAPABILITY CREDENTIAL route contracts. Mounted under
|
|
@@ -21,10 +22,24 @@ export const setCapabilityCredentialsContract = defineApiContract({
|
|
|
21
22
|
requestBodySchema: upsertCapabilityCredentialsSchema,
|
|
22
23
|
responsesByStatusCode: { 200: capabilityCredentialsViewSchema, ...errorResponses },
|
|
23
24
|
});
|
|
24
|
-
// A per-KEY
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
25
|
+
// A per-KEY write beside the whole-set PUT. The set-replacing PUT is the API caller's operation
|
|
26
|
+
// (declare the whole set in one call); a UI filling in a CHECKLIST edits one key at a time and
|
|
27
|
+
// cannot use it, because it never received the other values: re-sending the set would mean
|
|
28
|
+
// re-typing every secret, and sending only the edited key would delete the rest. The key is
|
|
29
|
+
// held to the credential-key schema here, so a reserved name is refused before the store sees it.
|
|
30
|
+
export const setCapabilityCredentialContract = defineApiContract({
|
|
31
|
+
method: 'put',
|
|
32
|
+
requestPathParamsSchema: withObjectKeys(v.object({ key: capabilityCredentialKeySchema })),
|
|
33
|
+
pathResolver: ({ key }) => `/capability-credentials/${key}`,
|
|
34
|
+
requestBodySchema: setCapabilityCredentialSchema,
|
|
35
|
+
responsesByStatusCode: { 200: capabilityCredentialsViewSchema, ...errorResponses },
|
|
36
|
+
});
|
|
37
|
+
// A per-KEY delete for the same reason, and the operation that makes an ORPHANED credential
|
|
38
|
+
// removable at all: removing one stored key must not require re-sending every other value.
|
|
39
|
+
// Deliberately LOOSE on the key (a bare string, not the credential-key schema the PUT holds):
|
|
40
|
+
// what a delete targets is whatever is ALREADY STORED, and an orphan written before a rule
|
|
41
|
+
// tightened (or under a rule a newer build added) must stay removable, or the invalid row is
|
|
42
|
+
// exactly the one nothing can clean up.
|
|
28
43
|
export const deleteCapabilityCredentialContract = defineApiContract({
|
|
29
44
|
method: 'delete',
|
|
30
45
|
requestPathParamsSchema: keyParams,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-credentials.js","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"capability-credentials.js","sourceRoot":"","sources":["../../src/routes/capability-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,qEAAqE;AACrE,6EAA6E;AAC7E,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,kEAAkE;AAClE,8EAA8E;AAE9E,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;AAE1C,MAAM,CAAC,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAChE,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,yBAAyB;IAC7C,qBAAqB,EAAE,EAAE,GAAG,EAAE,+BAA+B,EAAE,GAAG,cAAc,EAAE;CACnF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAChE,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,yBAAyB;IAC7C,iBAAiB,EAAE,iCAAiC;IACpD,qBAAqB,EAAE,EAAE,GAAG,EAAE,+BAA+B,EAAE,GAAG,cAAc,EAAE;CACnF,CAAC,CAAA;AAEF,gGAAgG;AAChG,+FAA+F;AAC/F,2FAA2F;AAC3F,4FAA4F;AAC5F,kGAAkG;AAClG,MAAM,CAAC,MAAM,+BAA+B,GAAG,iBAAiB,C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