@dsh-enhanced/plugin-control-plane 0.1.6 → 0.1.12
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/README.md +153 -32
- package/bin/dsh-local-release-adapter.js +1381 -0
- package/cordis.patch.yml +1 -0
- package/lib/approval.d.ts +13 -0
- package/lib/approval.d.ts.map +1 -0
- package/lib/approval.js +79 -0
- package/lib/approval.js.map +1 -0
- package/lib/attestation.d.ts +14 -0
- package/lib/attestation.d.ts.map +1 -0
- package/lib/attestation.js +222 -0
- package/lib/attestation.js.map +1 -0
- package/lib/catalog-interpreter.d.ts +12 -0
- package/lib/catalog-interpreter.d.ts.map +1 -0
- package/lib/catalog-interpreter.js +100 -0
- package/lib/catalog-interpreter.js.map +1 -0
- package/lib/catalog.d.ts +95 -10
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +1031 -18
- package/lib/catalog.js.map +1 -1
- package/lib/cli.d.ts +9 -0
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +1160 -162
- package/lib/cli.js.map +1 -1
- package/lib/host-attestor.d.ts +13 -0
- package/lib/host-attestor.d.ts.map +1 -0
- package/lib/host-attestor.js +139 -0
- package/lib/host-attestor.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/lockfile.d.ts +7 -0
- package/lib/lockfile.d.ts.map +1 -0
- package/lib/lockfile.js +271 -0
- package/lib/lockfile.js.map +1 -0
- package/lib/release.d.ts +51 -0
- package/lib/release.d.ts.map +1 -0
- package/lib/release.js +1188 -0
- package/lib/release.js.map +1 -0
- package/lib/service.d.ts +9 -11
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +57 -29
- package/lib/service.js.map +1 -1
- package/lib/sqlite.d.ts +9 -0
- package/lib/sqlite.d.ts.map +1 -0
- package/lib/sqlite.js +705 -0
- package/lib/sqlite.js.map +1 -0
- package/lib/store.d.ts +258 -0
- package/lib/store.d.ts.map +1 -0
- package/lib/store.js +1848 -0
- package/lib/store.js.map +1 -0
- package/lib/tools.d.ts.map +1 -1
- package/lib/tools.js +23 -3
- package/lib/tools.js.map +1 -1
- package/lib/trust.d.ts +79 -0
- package/lib/trust.d.ts.map +1 -0
- package/lib/trust.js +477 -0
- package/lib/trust.js.map +1 -0
- package/lib/types.d.ts +740 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.d.ts.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,740 @@
|
|
|
1
|
+
import type { CatalogEntry, CatalogPackage } from './catalog.js';
|
|
2
|
+
export type PlanStatus = 'pending-approval' | 'approved' | 'staging' | 'awaiting-reload' | 'awaiting-readiness' | 'awaiting-effect-blocked-replay' | 'awaiting-shadow' | 'awaiting-canary' | 'awaiting-soak' | 'awaiting-health' | 'commit-pending' | 'rollback-pending' | 'activated' | 'rolled-back';
|
|
3
|
+
export type HostAttestationPhase = 'reload' | 'readiness' | 'effect-blocked-replay' | 'shadow' | 'canary' | 'soak' | 'health';
|
|
4
|
+
export interface HostAttestationPolicy {
|
|
5
|
+
readinessMinimumChecks: number;
|
|
6
|
+
effectBlockedMinimumDeliveryAttempts: number;
|
|
7
|
+
effectBlockedMinimumToolExecutionAttempts: number;
|
|
8
|
+
shadowMinimumSamples: number;
|
|
9
|
+
shadowMaximumMismatches: number;
|
|
10
|
+
canaryMinimumSamples: number;
|
|
11
|
+
canaryMaximumFailures: number;
|
|
12
|
+
soakMinimumWindowMs: number;
|
|
13
|
+
soakMinimumSamples: number;
|
|
14
|
+
soakMaximumFailureRate: number;
|
|
15
|
+
healthMinimumChecks: number;
|
|
16
|
+
healthMaximumFailures: number;
|
|
17
|
+
receiptTtlMs: number;
|
|
18
|
+
}
|
|
19
|
+
export type HostAttestationRequirements = {
|
|
20
|
+
kind: 'reload';
|
|
21
|
+
previousHostGeneration: number;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'readiness';
|
|
24
|
+
minimumChecks: number;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'effect-blocked-replay';
|
|
27
|
+
minimumDeliveryAttempts: number;
|
|
28
|
+
minimumToolExecutionAttempts: number;
|
|
29
|
+
maximumExternalEffects: 0;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'shadow';
|
|
32
|
+
minimumSamples: number;
|
|
33
|
+
maximumMismatches: number;
|
|
34
|
+
maximumExternalEffects: 0;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'canary';
|
|
37
|
+
maximumExposures: 1;
|
|
38
|
+
minimumSamples: number;
|
|
39
|
+
maximumFailures: number;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'soak';
|
|
42
|
+
minimumWindowMs: number;
|
|
43
|
+
minimumSamples: number;
|
|
44
|
+
maximumFailureRate: number;
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'health';
|
|
47
|
+
minimumChecks: number;
|
|
48
|
+
maximumFailures: number;
|
|
49
|
+
};
|
|
50
|
+
export interface HostAttestationRequest {
|
|
51
|
+
schemaVersion: 1;
|
|
52
|
+
kind: 'dsh-host-attestation-request';
|
|
53
|
+
operationId: string;
|
|
54
|
+
requestedAt: number;
|
|
55
|
+
receiptTtlMs: number;
|
|
56
|
+
installationId: string;
|
|
57
|
+
ledger: {
|
|
58
|
+
id: string;
|
|
59
|
+
path: string;
|
|
60
|
+
};
|
|
61
|
+
plan: {
|
|
62
|
+
id: string;
|
|
63
|
+
digest: string;
|
|
64
|
+
};
|
|
65
|
+
activation: {
|
|
66
|
+
id: string;
|
|
67
|
+
fence: number;
|
|
68
|
+
};
|
|
69
|
+
profile: {
|
|
70
|
+
name: string;
|
|
71
|
+
path: string;
|
|
72
|
+
};
|
|
73
|
+
issuer: {
|
|
74
|
+
mode: 'owner-manual';
|
|
75
|
+
} | {
|
|
76
|
+
mode: 'configured-executable';
|
|
77
|
+
id: string;
|
|
78
|
+
version: string;
|
|
79
|
+
path: string;
|
|
80
|
+
sha256: string;
|
|
81
|
+
interpreter: {
|
|
82
|
+
path: string;
|
|
83
|
+
sha256: string;
|
|
84
|
+
} | null;
|
|
85
|
+
authority: string;
|
|
86
|
+
keyId: string;
|
|
87
|
+
};
|
|
88
|
+
phase: HostAttestationPhase;
|
|
89
|
+
requirements: HostAttestationRequirements;
|
|
90
|
+
}
|
|
91
|
+
export type HostAttestationEvidence = {
|
|
92
|
+
kind: 'reload';
|
|
93
|
+
reloaded: boolean;
|
|
94
|
+
previousHostGeneration: number;
|
|
95
|
+
currentHostGeneration: number;
|
|
96
|
+
probeDigest: string;
|
|
97
|
+
} | {
|
|
98
|
+
kind: 'readiness';
|
|
99
|
+
checks: number;
|
|
100
|
+
failures: number;
|
|
101
|
+
probeDigest: string;
|
|
102
|
+
} | {
|
|
103
|
+
kind: 'effect-blocked-replay';
|
|
104
|
+
deliveryAttempts: number;
|
|
105
|
+
deliveryBlocked: number;
|
|
106
|
+
toolExecutionAttempts: number;
|
|
107
|
+
toolExecutionBlocked: number;
|
|
108
|
+
externalEffects: number;
|
|
109
|
+
replayDigest: string;
|
|
110
|
+
} | {
|
|
111
|
+
kind: 'shadow';
|
|
112
|
+
samples: number;
|
|
113
|
+
mismatches: number;
|
|
114
|
+
externalEffects: number;
|
|
115
|
+
traceDigest: string;
|
|
116
|
+
} | {
|
|
117
|
+
kind: 'canary';
|
|
118
|
+
exposureId: string;
|
|
119
|
+
exposures: number;
|
|
120
|
+
samples: number;
|
|
121
|
+
failures: number;
|
|
122
|
+
traceDigest: string;
|
|
123
|
+
} | {
|
|
124
|
+
kind: 'soak';
|
|
125
|
+
windowStartedAt: number;
|
|
126
|
+
windowEndedAt: number;
|
|
127
|
+
samples: number;
|
|
128
|
+
failures: number;
|
|
129
|
+
traceDigest: string;
|
|
130
|
+
} | {
|
|
131
|
+
kind: 'health';
|
|
132
|
+
checks: number;
|
|
133
|
+
failures: number;
|
|
134
|
+
probeDigest: string;
|
|
135
|
+
};
|
|
136
|
+
export interface CapabilityGapInput {
|
|
137
|
+
idempotencyKey: string;
|
|
138
|
+
capability: string;
|
|
139
|
+
context: string;
|
|
140
|
+
expectedValue: number;
|
|
141
|
+
frequency: number;
|
|
142
|
+
estimatedCost: number;
|
|
143
|
+
risk: number;
|
|
144
|
+
}
|
|
145
|
+
export interface StoredCapabilityGap extends CapabilityGapInput {
|
|
146
|
+
id: string;
|
|
147
|
+
inputDigest: string;
|
|
148
|
+
roi: number;
|
|
149
|
+
status: 'open' | 'matched' | 'closed';
|
|
150
|
+
revision: number;
|
|
151
|
+
candidateId?: string;
|
|
152
|
+
createdAt: number;
|
|
153
|
+
updatedAt: number;
|
|
154
|
+
}
|
|
155
|
+
export interface PluginActivationPlan {
|
|
156
|
+
schemaVersion: 4;
|
|
157
|
+
kind: 'activation';
|
|
158
|
+
id: string;
|
|
159
|
+
gapId: string;
|
|
160
|
+
gapSnapshot: {
|
|
161
|
+
revision: number;
|
|
162
|
+
inputDigest: string;
|
|
163
|
+
roi: number;
|
|
164
|
+
capability: string;
|
|
165
|
+
};
|
|
166
|
+
status: PlanStatus;
|
|
167
|
+
revision: number;
|
|
168
|
+
createdAt: number;
|
|
169
|
+
expiresAt: number;
|
|
170
|
+
profile: string;
|
|
171
|
+
candidate: CatalogEntry;
|
|
172
|
+
dossier: {
|
|
173
|
+
catalogDigest: string;
|
|
174
|
+
catalogProvenance: 'owner-provided-integrity-pinned';
|
|
175
|
+
matchedCapabilities: readonly string[];
|
|
176
|
+
authorities: readonly string[];
|
|
177
|
+
packages: readonly CatalogPackage[];
|
|
178
|
+
};
|
|
179
|
+
installationId: string;
|
|
180
|
+
ledger: {
|
|
181
|
+
id: string;
|
|
182
|
+
path: string;
|
|
183
|
+
};
|
|
184
|
+
target: {
|
|
185
|
+
dshHome: string;
|
|
186
|
+
profile: string;
|
|
187
|
+
profilePath: string;
|
|
188
|
+
};
|
|
189
|
+
executor: {
|
|
190
|
+
id: string;
|
|
191
|
+
version: string;
|
|
192
|
+
path: string;
|
|
193
|
+
sha256: string;
|
|
194
|
+
};
|
|
195
|
+
digest: string;
|
|
196
|
+
approval?: VerifiedApprovalReceipt;
|
|
197
|
+
activation?: {
|
|
198
|
+
id: string;
|
|
199
|
+
fence: number;
|
|
200
|
+
/** Durable baseline used to distinguish restore-from-backup from remove-on-rollback. */
|
|
201
|
+
targetOriginallyExisted?: boolean;
|
|
202
|
+
failureCode?: string;
|
|
203
|
+
updatedAt: number;
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export type SourceReleasePhase = 'pr' | 'review' | 'merge' | 'build' | 'sign' | 'publish' | 'registry-verify' | 'catalog-admission';
|
|
207
|
+
export type SourcePlanStatus = 'pending-approval' | 'approved' | 'running-local-checks' | 'ready-for-human-review' | 'local-checks-failed' | 'awaiting-pr' | 'awaiting-review' | 'awaiting-merge' | 'awaiting-build' | 'awaiting-sign' | 'awaiting-publish' | 'awaiting-registry-verify' | 'awaiting-catalog-admission' | 'release-complete' | 'release-failed' | 'publish-ambiguous';
|
|
208
|
+
export interface PluginSourcePlan {
|
|
209
|
+
schemaVersion: 1;
|
|
210
|
+
kind: 'source';
|
|
211
|
+
id: string;
|
|
212
|
+
gapId: string;
|
|
213
|
+
gapSnapshot: PluginActivationPlan['gapSnapshot'];
|
|
214
|
+
status: SourcePlanStatus;
|
|
215
|
+
revision: number;
|
|
216
|
+
createdAt: number;
|
|
217
|
+
expiresAt: number;
|
|
218
|
+
digest: string;
|
|
219
|
+
repository: string;
|
|
220
|
+
worktree: string;
|
|
221
|
+
baseCommit: string;
|
|
222
|
+
name: string;
|
|
223
|
+
generatorDigest: string;
|
|
224
|
+
scope: readonly string[];
|
|
225
|
+
approval?: VerifiedApprovalReceipt;
|
|
226
|
+
sourceCheck?: SourceCheckEvidence;
|
|
227
|
+
releaseAuthorization?: VerifiedSourceReleaseAuthorization;
|
|
228
|
+
release?: {
|
|
229
|
+
id: string;
|
|
230
|
+
fence: number;
|
|
231
|
+
failurePhase?: SourceReleasePhase;
|
|
232
|
+
failureCode?: string;
|
|
233
|
+
updatedAt: number;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/** Exact source bytes that completed the local post-generation check gate. */
|
|
237
|
+
export interface SourceCheckEvidence {
|
|
238
|
+
treeDigest: string;
|
|
239
|
+
patchDigest: string;
|
|
240
|
+
checkedAt: number;
|
|
241
|
+
}
|
|
242
|
+
export interface SourceReleasePolicy {
|
|
243
|
+
targetBranch: string;
|
|
244
|
+
candidateId: string;
|
|
245
|
+
packageName: string;
|
|
246
|
+
packageVersion: string;
|
|
247
|
+
packagePath: string;
|
|
248
|
+
dshBaseline: string;
|
|
249
|
+
capabilities: readonly string[];
|
|
250
|
+
authorities: readonly string[];
|
|
251
|
+
requires: readonly {
|
|
252
|
+
package: string;
|
|
253
|
+
version: string;
|
|
254
|
+
integrity: string;
|
|
255
|
+
}[];
|
|
256
|
+
registryId: string;
|
|
257
|
+
registryLocator: string;
|
|
258
|
+
registryReference: string;
|
|
259
|
+
catalogId: string;
|
|
260
|
+
catalogPath: string;
|
|
261
|
+
minimumReproducibleBuilds: number;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* A fresh owner decision made after local checks. It deliberately cannot be
|
|
265
|
+
* substituted with the approval that authorized source generation.
|
|
266
|
+
*/
|
|
267
|
+
export interface SourceReleaseAuthorization {
|
|
268
|
+
schemaVersion: 1;
|
|
269
|
+
kind: 'dsh-source-release-authorization';
|
|
270
|
+
authorizationId: string;
|
|
271
|
+
authority: string;
|
|
272
|
+
keyId: string;
|
|
273
|
+
planId: string;
|
|
274
|
+
planDigest: string;
|
|
275
|
+
baseCommit: string;
|
|
276
|
+
checkedTreeDigest: string;
|
|
277
|
+
checkedPatchDigest: string;
|
|
278
|
+
scope: readonly string[];
|
|
279
|
+
releasePolicy: SourceReleasePolicy;
|
|
280
|
+
authorizedAt: number;
|
|
281
|
+
expiresAt: number;
|
|
282
|
+
signature: string;
|
|
283
|
+
}
|
|
284
|
+
export interface VerifiedSourceReleaseAuthorization extends SourceReleaseAuthorization {
|
|
285
|
+
signatureDigest: string;
|
|
286
|
+
}
|
|
287
|
+
export interface SourceReleaseAuthorizationAuthority {
|
|
288
|
+
verify(authorization: SourceReleaseAuthorization, plan: PluginSourcePlan): Promise<VerifiedSourceReleaseAuthorization>;
|
|
289
|
+
}
|
|
290
|
+
export interface SourceReleaseAdapterIdentity {
|
|
291
|
+
id: string;
|
|
292
|
+
version: string;
|
|
293
|
+
path: string;
|
|
294
|
+
sha256: string;
|
|
295
|
+
interpreter: {
|
|
296
|
+
path: string;
|
|
297
|
+
sha256: string;
|
|
298
|
+
} | null;
|
|
299
|
+
authority: string;
|
|
300
|
+
keyId: string;
|
|
301
|
+
}
|
|
302
|
+
export interface SourceReleaseArtifact {
|
|
303
|
+
candidateId: string;
|
|
304
|
+
sourceName: string;
|
|
305
|
+
packagePath: string;
|
|
306
|
+
packageName: string;
|
|
307
|
+
packageVersion: string;
|
|
308
|
+
tarballPath: string;
|
|
309
|
+
tarballBytes: number;
|
|
310
|
+
tarballSha256: string;
|
|
311
|
+
tarballIntegrity: string;
|
|
312
|
+
sbomPath: string;
|
|
313
|
+
sbomSha256: string;
|
|
314
|
+
provenancePath: string;
|
|
315
|
+
provenanceSha256: string;
|
|
316
|
+
mergedCommit: string;
|
|
317
|
+
dshBaseline: string;
|
|
318
|
+
capabilities: readonly string[];
|
|
319
|
+
authorities: readonly string[];
|
|
320
|
+
requires: readonly {
|
|
321
|
+
package: string;
|
|
322
|
+
version: string;
|
|
323
|
+
integrity: string;
|
|
324
|
+
}[];
|
|
325
|
+
}
|
|
326
|
+
interface SourceReleaseRequestBase {
|
|
327
|
+
schemaVersion: 1;
|
|
328
|
+
kind: 'dsh-source-release-request';
|
|
329
|
+
operationId: string;
|
|
330
|
+
attempt: number;
|
|
331
|
+
requestedAt: number;
|
|
332
|
+
receiptTtlMs: number;
|
|
333
|
+
installationId: string;
|
|
334
|
+
ledger: {
|
|
335
|
+
id: string;
|
|
336
|
+
path: string;
|
|
337
|
+
};
|
|
338
|
+
plan: {
|
|
339
|
+
id: string;
|
|
340
|
+
digest: string;
|
|
341
|
+
revision: number;
|
|
342
|
+
};
|
|
343
|
+
release: {
|
|
344
|
+
id: string;
|
|
345
|
+
fence: number;
|
|
346
|
+
};
|
|
347
|
+
authorization: VerifiedSourceReleaseAuthorization;
|
|
348
|
+
adapter: SourceReleaseAdapterIdentity;
|
|
349
|
+
registry: {
|
|
350
|
+
id: string;
|
|
351
|
+
locator: string;
|
|
352
|
+
};
|
|
353
|
+
catalog: {
|
|
354
|
+
id: string;
|
|
355
|
+
path: string;
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
export type SourceReleaseRequest = SourceReleaseRequestBase & ({
|
|
359
|
+
phase: 'pr';
|
|
360
|
+
input: {
|
|
361
|
+
repository: string;
|
|
362
|
+
worktree: string;
|
|
363
|
+
baseCommit: string;
|
|
364
|
+
name: string;
|
|
365
|
+
scope: readonly string[];
|
|
366
|
+
expectedTreeDigest: string;
|
|
367
|
+
expectedPatchDigest: string;
|
|
368
|
+
};
|
|
369
|
+
} | {
|
|
370
|
+
phase: 'review';
|
|
371
|
+
input: {
|
|
372
|
+
prId: string;
|
|
373
|
+
headCommit: string;
|
|
374
|
+
baseCommit: string;
|
|
375
|
+
prEvidenceDigest: string;
|
|
376
|
+
};
|
|
377
|
+
} | {
|
|
378
|
+
phase: 'merge';
|
|
379
|
+
input: {
|
|
380
|
+
prId: string;
|
|
381
|
+
headCommit: string;
|
|
382
|
+
reviewId: string;
|
|
383
|
+
reviewEvidenceDigest: string;
|
|
384
|
+
targetBranch: string;
|
|
385
|
+
};
|
|
386
|
+
} | {
|
|
387
|
+
phase: 'build';
|
|
388
|
+
input: {
|
|
389
|
+
repository: string;
|
|
390
|
+
mergeCommit: string;
|
|
391
|
+
mergeEvidenceDigest: string;
|
|
392
|
+
name: string;
|
|
393
|
+
expectedCandidateId: string;
|
|
394
|
+
expectedPackageName: string;
|
|
395
|
+
expectedPackageVersion: string;
|
|
396
|
+
expectedPackagePath: string;
|
|
397
|
+
expectedDshBaseline: string;
|
|
398
|
+
expectedCapabilities: readonly string[];
|
|
399
|
+
expectedAuthorities: readonly string[];
|
|
400
|
+
expectedRequires: readonly {
|
|
401
|
+
package: string;
|
|
402
|
+
version: string;
|
|
403
|
+
integrity: string;
|
|
404
|
+
}[];
|
|
405
|
+
};
|
|
406
|
+
} | {
|
|
407
|
+
phase: 'sign';
|
|
408
|
+
input: {
|
|
409
|
+
artifact: SourceReleaseArtifact;
|
|
410
|
+
buildEvidenceDigest: string;
|
|
411
|
+
};
|
|
412
|
+
} | {
|
|
413
|
+
phase: 'publish';
|
|
414
|
+
input: {
|
|
415
|
+
artifact: SourceReleaseArtifact;
|
|
416
|
+
artifactStatementDigest: string;
|
|
417
|
+
artifactSignature: string;
|
|
418
|
+
signEvidenceDigest: string;
|
|
419
|
+
};
|
|
420
|
+
} | {
|
|
421
|
+
phase: 'registry-verify';
|
|
422
|
+
input: {
|
|
423
|
+
artifact: SourceReleaseArtifact;
|
|
424
|
+
artifactStatementDigest: string;
|
|
425
|
+
artifactSignature: string;
|
|
426
|
+
registryReference: string;
|
|
427
|
+
publishEvidenceDigest: string;
|
|
428
|
+
};
|
|
429
|
+
} | {
|
|
430
|
+
phase: 'catalog-admission';
|
|
431
|
+
input: {
|
|
432
|
+
artifact: SourceReleaseArtifact;
|
|
433
|
+
artifactStatementDigest: string;
|
|
434
|
+
artifactSignature: string;
|
|
435
|
+
registryReference: string;
|
|
436
|
+
registryVerificationRequest: Extract<SourceReleaseRequest, {
|
|
437
|
+
phase: 'registry-verify';
|
|
438
|
+
}>;
|
|
439
|
+
registryVerificationReceipt: SourceReleaseReceipt;
|
|
440
|
+
verificationEvidenceDigest: string;
|
|
441
|
+
expectedBeforeCatalogDigest: string;
|
|
442
|
+
expectedAfterCatalogDigest: string;
|
|
443
|
+
candidate: CatalogEntry;
|
|
444
|
+
};
|
|
445
|
+
});
|
|
446
|
+
export type SourceReleaseSuccessEvidence = {
|
|
447
|
+
kind: 'pr';
|
|
448
|
+
prId: string;
|
|
449
|
+
baseCommit: string;
|
|
450
|
+
headCommit: string;
|
|
451
|
+
treeDigest: string;
|
|
452
|
+
patchDigest: string;
|
|
453
|
+
repositoryDigest: string;
|
|
454
|
+
} | {
|
|
455
|
+
kind: 'review';
|
|
456
|
+
prId: string;
|
|
457
|
+
headCommit: string;
|
|
458
|
+
reviewId: string;
|
|
459
|
+
decision: 'approved';
|
|
460
|
+
reviewerPrincipalDigest: string;
|
|
461
|
+
prEvidenceDigest: string;
|
|
462
|
+
} | {
|
|
463
|
+
kind: 'merge';
|
|
464
|
+
prId: string;
|
|
465
|
+
reviewedHeadCommit: string;
|
|
466
|
+
reviewId: string;
|
|
467
|
+
reviewEvidenceDigest: string;
|
|
468
|
+
mergeCommit: string;
|
|
469
|
+
targetBranch: string;
|
|
470
|
+
} | ({
|
|
471
|
+
kind: 'build';
|
|
472
|
+
isolated: true;
|
|
473
|
+
reproducibleBuilds: number;
|
|
474
|
+
firstBuildSha256: string;
|
|
475
|
+
secondBuildSha256: string;
|
|
476
|
+
mergeEvidenceDigest: string;
|
|
477
|
+
} & SourceReleaseArtifact) | {
|
|
478
|
+
kind: 'sign';
|
|
479
|
+
artifactStatementDigest: string;
|
|
480
|
+
artifactSignature: string;
|
|
481
|
+
artifactSignatureDigest: string;
|
|
482
|
+
buildEvidenceDigest: string;
|
|
483
|
+
} | {
|
|
484
|
+
kind: 'publish';
|
|
485
|
+
registryId: string;
|
|
486
|
+
registryReference: string;
|
|
487
|
+
packageName: string;
|
|
488
|
+
packageVersion: string;
|
|
489
|
+
tarballSha256: string;
|
|
490
|
+
tarballIntegrity: string;
|
|
491
|
+
artifactStatementDigest: string;
|
|
492
|
+
artifactSignatureDigest: string;
|
|
493
|
+
signEvidenceDigest: string;
|
|
494
|
+
immutable: true;
|
|
495
|
+
} | {
|
|
496
|
+
kind: 'registry-verify';
|
|
497
|
+
registryId: string;
|
|
498
|
+
registryReference: string;
|
|
499
|
+
independentlyDownloaded: true;
|
|
500
|
+
downloadedBytes: number;
|
|
501
|
+
downloadedSha256: string;
|
|
502
|
+
downloadedIntegrity: string;
|
|
503
|
+
artifactStatementDigest: string;
|
|
504
|
+
artifactSignatureDigest: string;
|
|
505
|
+
publishEvidenceDigest: string;
|
|
506
|
+
} | {
|
|
507
|
+
kind: 'catalog-admission';
|
|
508
|
+
admissionId: string;
|
|
509
|
+
catalogId: string;
|
|
510
|
+
beforeCatalogDigest: string;
|
|
511
|
+
afterCatalogDigest: string;
|
|
512
|
+
registryReference: string;
|
|
513
|
+
artifactStatementDigest: string;
|
|
514
|
+
artifactSignatureDigest: string;
|
|
515
|
+
verificationEvidenceDigest: string;
|
|
516
|
+
candidate: CatalogEntry;
|
|
517
|
+
};
|
|
518
|
+
export interface SourceReleaseFailureEvidence {
|
|
519
|
+
kind: 'failure';
|
|
520
|
+
phase: SourceReleasePhase;
|
|
521
|
+
code: string;
|
|
522
|
+
remoteState: 'unchanged' | 'created-not-reverted' | 'unknown';
|
|
523
|
+
detailDigest: string;
|
|
524
|
+
}
|
|
525
|
+
export interface SourceReleasePublishAmbiguityEvidence {
|
|
526
|
+
kind: 'publish-ambiguity';
|
|
527
|
+
registryId: string;
|
|
528
|
+
packageName: string;
|
|
529
|
+
packageVersion: string;
|
|
530
|
+
tarballSha256: string;
|
|
531
|
+
detailDigest: string;
|
|
532
|
+
}
|
|
533
|
+
export interface SourcePublishReconciliationRequest {
|
|
534
|
+
schemaVersion: 1;
|
|
535
|
+
kind: 'dsh-source-publish-reconciliation-request';
|
|
536
|
+
operationId: string;
|
|
537
|
+
attempt: number;
|
|
538
|
+
requestedAt: number;
|
|
539
|
+
receiptTtlMs: number;
|
|
540
|
+
installationId: string;
|
|
541
|
+
ledger: {
|
|
542
|
+
id: string;
|
|
543
|
+
path: string;
|
|
544
|
+
};
|
|
545
|
+
plan: {
|
|
546
|
+
id: string;
|
|
547
|
+
digest: string;
|
|
548
|
+
revision: number;
|
|
549
|
+
};
|
|
550
|
+
release: {
|
|
551
|
+
id: string;
|
|
552
|
+
fence: number;
|
|
553
|
+
};
|
|
554
|
+
authorization: VerifiedSourceReleaseAuthorization;
|
|
555
|
+
adapter: SourceReleaseAdapterIdentity;
|
|
556
|
+
registry: {
|
|
557
|
+
id: string;
|
|
558
|
+
locator: string;
|
|
559
|
+
};
|
|
560
|
+
ambiguousPublish: {
|
|
561
|
+
operationId: string;
|
|
562
|
+
receiptId: string;
|
|
563
|
+
receiptDigest: string;
|
|
564
|
+
evidenceDigest: string;
|
|
565
|
+
};
|
|
566
|
+
artifact: {
|
|
567
|
+
packageName: string;
|
|
568
|
+
packageVersion: string;
|
|
569
|
+
tarballSha256: string;
|
|
570
|
+
tarballIntegrity: string;
|
|
571
|
+
};
|
|
572
|
+
expectedArtifactStatementDigest: string;
|
|
573
|
+
expectedArtifactSignatureDigest: string;
|
|
574
|
+
expectedRegistryReference: string;
|
|
575
|
+
}
|
|
576
|
+
export interface SourcePublishReconciliationEvidence {
|
|
577
|
+
kind: 'publish-reconciliation';
|
|
578
|
+
outcome: 'exists-match' | 'absent' | 'unknown' | 'digest-conflict';
|
|
579
|
+
registryId: string;
|
|
580
|
+
registryReference: string | null;
|
|
581
|
+
packageName: string;
|
|
582
|
+
packageVersion: string;
|
|
583
|
+
expectedTarballSha256: string;
|
|
584
|
+
expectedTarballIntegrity: string;
|
|
585
|
+
expectedArtifactStatementDigest: string;
|
|
586
|
+
expectedArtifactSignatureDigest: string;
|
|
587
|
+
observedTarballSha256: string | null;
|
|
588
|
+
observedTarballIntegrity: string | null;
|
|
589
|
+
observedArtifactStatementDigest: string | null;
|
|
590
|
+
observedArtifactSignatureDigest: string | null;
|
|
591
|
+
ambiguousPublishOperationId: string;
|
|
592
|
+
ambiguousPublishReceiptDigest: string;
|
|
593
|
+
detailDigest: string;
|
|
594
|
+
}
|
|
595
|
+
export interface SourcePublishReconciliationReceipt {
|
|
596
|
+
schemaVersion: 1;
|
|
597
|
+
kind: 'dsh-source-publish-reconciliation-receipt';
|
|
598
|
+
receiptId: string;
|
|
599
|
+
authority: string;
|
|
600
|
+
keyId: string;
|
|
601
|
+
installationId: string;
|
|
602
|
+
planId: string;
|
|
603
|
+
planDigest: string;
|
|
604
|
+
releaseId: string;
|
|
605
|
+
fence: number;
|
|
606
|
+
operationId: string;
|
|
607
|
+
requestDigest: string;
|
|
608
|
+
evidence: SourcePublishReconciliationEvidence;
|
|
609
|
+
evidenceDigest: string;
|
|
610
|
+
observedAt: number;
|
|
611
|
+
expiresAt: number;
|
|
612
|
+
signature: string;
|
|
613
|
+
}
|
|
614
|
+
export interface VerifiedSourcePublishReconciliationReceipt extends Omit<SourcePublishReconciliationReceipt, 'signature'> {
|
|
615
|
+
signatureDigest: string;
|
|
616
|
+
}
|
|
617
|
+
export interface SourcePublishReconciliationAuthority {
|
|
618
|
+
verify(receipt: SourcePublishReconciliationReceipt, plan: PluginSourcePlan, request: SourcePublishReconciliationRequest): Promise<VerifiedSourcePublishReconciliationReceipt>;
|
|
619
|
+
}
|
|
620
|
+
export interface SourceReleaseReceipt {
|
|
621
|
+
schemaVersion: 1;
|
|
622
|
+
receiptId: string;
|
|
623
|
+
authority: string;
|
|
624
|
+
keyId: string;
|
|
625
|
+
installationId: string;
|
|
626
|
+
planId: string;
|
|
627
|
+
planDigest: string;
|
|
628
|
+
releaseId: string;
|
|
629
|
+
fence: number;
|
|
630
|
+
operationId: string;
|
|
631
|
+
requestDigest: string;
|
|
632
|
+
phase: SourceReleasePhase;
|
|
633
|
+
outcome: 'passed' | 'failed' | 'ambiguous';
|
|
634
|
+
evidence: SourceReleaseSuccessEvidence | SourceReleaseFailureEvidence | SourceReleasePublishAmbiguityEvidence;
|
|
635
|
+
evidenceDigest: string;
|
|
636
|
+
observedAt: number;
|
|
637
|
+
expiresAt: number;
|
|
638
|
+
signature: string;
|
|
639
|
+
}
|
|
640
|
+
export interface VerifiedSourceReleaseReceipt extends Omit<SourceReleaseReceipt, 'signature'> {
|
|
641
|
+
signatureDigest: string;
|
|
642
|
+
}
|
|
643
|
+
export interface SourceReleaseAuthority {
|
|
644
|
+
verify(receipt: SourceReleaseReceipt, plan: PluginSourcePlan, request: SourceReleaseRequest): Promise<VerifiedSourceReleaseReceipt>;
|
|
645
|
+
}
|
|
646
|
+
export interface SourceReleaseOperation {
|
|
647
|
+
planId: string;
|
|
648
|
+
phase: SourceReleasePhase;
|
|
649
|
+
operationId: string;
|
|
650
|
+
attempt: number;
|
|
651
|
+
fence: number;
|
|
652
|
+
bindingDigest: string;
|
|
653
|
+
requestDigest: string;
|
|
654
|
+
request: SourceReleaseRequest;
|
|
655
|
+
status: 'pending' | 'completed' | 'applied';
|
|
656
|
+
receipt?: SourceReleaseReceipt;
|
|
657
|
+
createdAt: number;
|
|
658
|
+
completedAt?: number;
|
|
659
|
+
appliedAt?: number;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Receipt returned by an owner-controlled approval authority. The authority
|
|
663
|
+
* signs the canonical fields; the control plane never accepts a display name
|
|
664
|
+
* or caller assertion as an approval decision.
|
|
665
|
+
*/
|
|
666
|
+
export interface ApprovalReceipt {
|
|
667
|
+
schemaVersion: 1;
|
|
668
|
+
approvalId: string;
|
|
669
|
+
authority: string;
|
|
670
|
+
keyId: string;
|
|
671
|
+
planId: string;
|
|
672
|
+
planDigest: string;
|
|
673
|
+
decision: 'approved' | 'rejected';
|
|
674
|
+
principal: string;
|
|
675
|
+
decidedAt: number;
|
|
676
|
+
expiresAt: number;
|
|
677
|
+
signature: string;
|
|
678
|
+
}
|
|
679
|
+
export interface VerifiedApprovalReceipt extends Omit<ApprovalReceipt, 'signature'> {
|
|
680
|
+
signatureDigest: string;
|
|
681
|
+
}
|
|
682
|
+
export interface ApprovalAuthority {
|
|
683
|
+
verify(receipt: ApprovalReceipt, plan: Pick<PluginActivationPlan | PluginSourcePlan, 'id' | 'digest' | 'createdAt' | 'expiresAt'>): Promise<VerifiedApprovalReceipt>;
|
|
684
|
+
}
|
|
685
|
+
export interface HostAttestationReceipt {
|
|
686
|
+
schemaVersion: 2;
|
|
687
|
+
receiptId: string;
|
|
688
|
+
authority: string;
|
|
689
|
+
keyId: string;
|
|
690
|
+
installationId: string;
|
|
691
|
+
planId: string;
|
|
692
|
+
planDigest: string;
|
|
693
|
+
activationId: string;
|
|
694
|
+
fence: number;
|
|
695
|
+
operationId: string;
|
|
696
|
+
requestDigest: string;
|
|
697
|
+
phase: HostAttestationPhase;
|
|
698
|
+
outcome: 'passed' | 'failed';
|
|
699
|
+
hostGeneration: number;
|
|
700
|
+
evidence: HostAttestationEvidence;
|
|
701
|
+
evidenceDigest: string;
|
|
702
|
+
observedAt: number;
|
|
703
|
+
expiresAt: number;
|
|
704
|
+
signature: string;
|
|
705
|
+
}
|
|
706
|
+
export interface VerifiedHostAttestation extends Omit<HostAttestationReceipt, 'signature'> {
|
|
707
|
+
signatureDigest: string;
|
|
708
|
+
}
|
|
709
|
+
export interface HostAttestationAuthority {
|
|
710
|
+
verify(receipt: HostAttestationReceipt, plan: PluginActivationPlan, request: HostAttestationRequest): Promise<VerifiedHostAttestation>;
|
|
711
|
+
}
|
|
712
|
+
export interface HostAttestationOperation {
|
|
713
|
+
planId: string;
|
|
714
|
+
phase: HostAttestationPhase;
|
|
715
|
+
operationId: string;
|
|
716
|
+
bindingDigest: string;
|
|
717
|
+
requestDigest: string;
|
|
718
|
+
request: HostAttestationRequest;
|
|
719
|
+
status: 'pending' | 'completed' | 'applied';
|
|
720
|
+
receipt?: HostAttestationReceipt;
|
|
721
|
+
createdAt: number;
|
|
722
|
+
completedAt?: number;
|
|
723
|
+
appliedAt?: number;
|
|
724
|
+
}
|
|
725
|
+
export interface OperationReceipt<T> {
|
|
726
|
+
idempotencyKey: string;
|
|
727
|
+
operation: string;
|
|
728
|
+
inputDigest: string;
|
|
729
|
+
result: T;
|
|
730
|
+
createdAt: number;
|
|
731
|
+
}
|
|
732
|
+
export interface PluginControlPlaneHealth {
|
|
733
|
+
gaps: number;
|
|
734
|
+
readyPlans: number;
|
|
735
|
+
activeActivations: number;
|
|
736
|
+
failed: number;
|
|
737
|
+
rollbackPending: number;
|
|
738
|
+
}
|
|
739
|
+
export {};
|
|
740
|
+
//# sourceMappingURL=types.d.ts.map
|