@kici-dev/engine 0.8.0 → 0.9.1

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.
Files changed (47) hide show
  1. package/dist/context/hold-reason.d.ts +6 -11
  2. package/dist/context/hold-reason.js +1 -8
  3. package/dist/context/index.d.ts +3 -3
  4. package/dist/context/index.js +3 -3
  5. package/dist/context/types.d.ts +12 -10
  6. package/dist/context/types.js +12 -14
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +6 -5
  9. package/dist/metrics/catalog-policy.js +2 -2
  10. package/dist/protocol/dashboard-write-operations.d.ts +8 -18
  11. package/dist/protocol/dashboard-write-operations.js +5 -26
  12. package/dist/protocol/messages/agent-run-result.d.ts +0 -1
  13. package/dist/protocol/messages/auth.d.ts +3 -3
  14. package/dist/protocol/messages/capabilities.d.ts +3 -5
  15. package/dist/protocol/messages/capabilities.js +4 -10
  16. package/dist/protocol/messages/dashboard-global-workflows.d.ts +10 -24
  17. package/dist/protocol/messages/dashboard-global-workflows.js +9 -15
  18. package/dist/protocol/messages/dashboard.d.ts +2 -23
  19. package/dist/protocol/messages/dashboard.js +2 -21
  20. package/dist/protocol/messages/oidc-token-relay.d.ts +2 -13
  21. package/dist/protocol/messages/oidc-token-relay.js +3 -10
  22. package/dist/protocol/messages/orchestrator-agent.d.ts +10 -9
  23. package/dist/protocol/messages/orchestrator-agent.js +10 -26
  24. package/dist/protocol/messages/peer.d.ts +26 -31
  25. package/dist/protocol/messages/peer.js +18 -38
  26. package/dist/protocol/messages/platform-orchestrator.d.ts +17 -79
  27. package/dist/protocol/messages/platform-orchestrator.js +6 -24
  28. package/dist/protocol/version.d.ts +10 -18
  29. package/dist/protocol/version.js +11 -19
  30. package/dist/provenance/id-token-claim-names.d.ts +13 -0
  31. package/dist/provenance/id-token-claim-names.js +44 -0
  32. package/dist/provenance/id-token-event-claims.d.ts +1 -8
  33. package/dist/provenance/id-token-event-claims.js +2 -7
  34. package/dist/provider/index.d.ts +1 -2
  35. package/dist/provider/index.test-d.d.ts +2 -0
  36. package/dist/provider/index.test-d.js +31 -0
  37. package/dist/provider/webhook-normalizer.d.ts +0 -42
  38. package/dist/trigger/types.d.ts +8 -38
  39. package/dist/trigger/types.js +2 -12
  40. package/dist/trigger/types.test-d.d.ts +2 -0
  41. package/dist/trigger/types.test-d.js +63 -0
  42. package/package.json +7 -11
  43. package/sbom.spdx.json +20 -20
  44. package/dist/protocol/messages/oidc-mint.d.ts +0 -58
  45. package/dist/protocol/messages/oidc-mint.js +0 -62
  46. package/dist/provider/contributor-resolver.d.ts +0 -30
  47. package/dist/provider/contributor-resolver.js +0 -2
@@ -7,35 +7,6 @@
7
7
  */
8
8
  import type { SimulatedEvent } from '../trigger/types.js';
9
9
  import type { ProviderType } from './types.js';
10
- /**
11
- * Discriminated union describing which cached provider-permission entries a
12
- * webhook event invalidates. Returned by
13
- * `WebhookNormalizer.getAccessCacheInvalidations`.
14
- *
15
- * @deprecated Trust is derived from the git ref, so the orchestrator holds no
16
- * contributor-permission cache and nothing consumes these entries. Removed at
17
- * v1.0.0.
18
- *
19
- * Three scopes:
20
- * - `repo-user`: a single `{repo, user}` permission changed (e.g. GitHub
21
- * `member` event on a specific collaborator).
22
- * - `repo`: every contributor's effective permission on a repo may have
23
- * shifted (e.g. a team was added/removed from the repo).
24
- * - `user-in-org`: a user's org membership changed, so any repo under that
25
- * org may now return a different permission for them.
26
- */
27
- export type AccessCacheInvalidation = {
28
- kind: 'repo-user';
29
- repoFullName: string;
30
- username: string;
31
- } | {
32
- kind: 'repo';
33
- repoFullName: string;
34
- } | {
35
- kind: 'user-in-org';
36
- orgLogin: string;
37
- username: string;
38
- };
39
10
  export interface WebhookNormalizer {
40
11
  readonly provider: ProviderType;
41
12
  /**
@@ -146,18 +117,5 @@ export interface WebhookNormalizer {
146
117
  * Returns null when the field is missing or cannot be resolved.
147
118
  */
148
119
  extractDefaultBranch?(payload: unknown): string | null;
149
- /**
150
- * Map a webhook event to the cached provider-permission entries it implies a
151
- * shift in. Events that do not imply a permission shift (most events,
152
- * including `push` / `pull_request` / etc.) return `[]`.
153
- *
154
- * @deprecated Trust is derived from the git ref, so the orchestrator holds no
155
- * contributor-permission cache and never calls this. Removed at v1.0.0.
156
- *
157
- * @param eventType Provider-specific event type (from extractEventType).
158
- * @param action Event action/sub-type, if applicable.
159
- * @param payload Raw webhook payload.
160
- */
161
- getAccessCacheInvalidations?(eventType: string, action: string | null, payload: unknown): AccessCacheInvalidation[];
162
120
  }
163
121
  //# sourceMappingURL=webhook-normalizer.d.ts.map
@@ -13,7 +13,7 @@
13
13
  * Schema version 8 (additive): adds runsOn polymorphic type (string | string[] | selector) and excludeLabels.
14
14
  * Schema version 9 (additive): adds repos/notRepos repo pattern fields to git-event triggers for global workflow matching.
15
15
  * Schema version 10 (BREAKING): removes notRepos/notPaths fields, negative patterns use ! prefix in repos/paths arrays.
16
- * Schema version 11 (additive): adds LockInlineValue type for pure function inline evaluation.
16
+ * Schema version 11 (additive): added an inline-expression value shape for dynamic fields, which is no longer parsed.
17
17
  * Schema version 14 (additive): adds declarative cache specs to LockJob and LockStep.
18
18
  * Schema version 15 (additive): adds per-job init config(s) to LockJob.
19
19
  * Schema version 16 (additive): adds normalized approval config to LockWorkflow/LockJob/LockStep.
@@ -565,29 +565,6 @@ export interface LockParallelStep {
565
565
  export type LockStepEntry = LockStep | LockParallelStep;
566
566
  /** Type guard distinguishing a parallel group from an ordinary lock step. */
567
567
  export declare function isLockParallelStep(entry: LockStepEntry): entry is LockParallelStep;
568
- /**
569
- * Serialized inline expression for a dynamic env/context/concurrencyGroup
570
- * field, shaped as `{ _type: 'inline', expression: '(event) => ...' }`
571
- * alongside the existing 'static' and 'dynamic' discriminants.
572
- *
573
- * @deprecated Schema v11 inline expressions are no longer evaluated in the
574
- * orchestrator. Dynamic env/context/concurrencyGroup fields are resolved on the
575
- * eval agent's init-runner. The compiler no longer emits this type; readers keep
576
- * recognizing it only to defer an old lock's field to the init round. Removed at
577
- * the next major (v1.0.0).
578
- */
579
- export interface LockInlineValue {
580
- readonly _type: 'inline';
581
- readonly expression: string;
582
- }
583
- /**
584
- * Type guard for inline expression values.
585
- *
586
- * @deprecated See {@link LockInlineValue}. Retained only so a reader can
587
- * recognize an old lock's inline field and defer it to the eval agent's
588
- * init-runner. Removed at the next major (v1.0.0).
589
- */
590
- export declare function isLockInlineValue(value: unknown): value is LockInlineValue;
591
568
  /**
592
569
  * Author-facing keyword sugar for a `needs` edge's run condition. Each keyword
593
570
  * resolves (at compile time) to a set of upstream terminal statuses; the
@@ -832,25 +809,18 @@ export interface LockJob {
832
809
  /**
833
810
  * Bound contexts in merge order. Each entry is a static name; `dynamic` is set
834
811
  * when it is a function resolved on the eval agent's init-runner. Later entries
835
- * override earlier ones on name collisions. The `LockInlineValue` shape is a
836
- * deprecated form still accepted from old locks (see {@link LockInlineValue}).
812
+ * override earlier ones on name collisions.
837
813
  */
838
814
  readonly contexts?: ReadonlyArray<{
839
- value: string | LockInlineValue;
815
+ value: string;
840
816
  dynamic: boolean;
841
817
  }>;
842
- /**
843
- * Static environment variables. A deprecated `LockInlineValue` shape is still
844
- * accepted from old locks (see {@link LockInlineValue}).
845
- */
846
- readonly env?: Record<string, string> | LockInlineValue;
818
+ /** Static environment variables. */
819
+ readonly env?: Record<string, string>;
847
820
  /** When true, env is dynamic (function) -- resolved on the eval agent's init-runner. */
848
821
  readonly dynamicEnv?: boolean;
849
- /**
850
- * Concurrency group name (static string). A deprecated `LockInlineValue` shape
851
- * is still accepted from old locks (see {@link LockInlineValue}).
852
- */
853
- readonly concurrencyGroup?: string | LockInlineValue;
822
+ /** Concurrency group name (static string). */
823
+ readonly concurrencyGroup?: string;
854
824
  /** When true, concurrencyGroup is dynamic (function) -- resolved on the eval agent's init-runner. */
855
825
  readonly dynamicConcurrencyGroup?: boolean;
856
826
  /** Total job wall-clock timeout in milliseconds (init + all steps + hooks). Threaded to the agent via jobConfig. */
@@ -1039,7 +1009,7 @@ export interface LockWorkflow {
1039
1009
  * v8 adds runsOn polymorphic type (string | string[] | selector) and excludeLabels.
1040
1010
  * v9 adds repos/notRepos repo pattern fields to git-event triggers for global workflow matching.
1041
1011
  * v10 removes notRepos/notPaths fields; negative patterns use ! prefix in repos/paths arrays.
1042
- * v11 adds the LockInlineValue type (deprecated; inline dynamic fields are resolved on the eval agent).
1012
+ * v11 added an inline-expression value shape for dynamic fields, which is no longer parsed.
1043
1013
  * v12 adds workflow-level registries and installEnv for private npm registry auth.
1044
1014
  * v13 adds job-level and workflow-level timeout.
1045
1015
  * v40 adds siblingsDigest — the in-repo `workspace:` sibling closure the deps
@@ -18,7 +18,7 @@ import { z } from "zod";
18
18
  * Schema version 8 (additive): adds runsOn polymorphic type (string | string[] | selector) and excludeLabels.
19
19
  * Schema version 9 (additive): adds repos/notRepos repo pattern fields to git-event triggers for global workflow matching.
20
20
  * Schema version 10 (BREAKING): removes notRepos/notPaths fields, negative patterns use ! prefix in repos/paths arrays.
21
- * Schema version 11 (additive): adds LockInlineValue type for pure function inline evaluation.
21
+ * Schema version 11 (additive): added an inline-expression value shape for dynamic fields, which is no longer parsed.
22
22
  * Schema version 14 (additive): adds declarative cache specs to LockJob and LockStep.
23
23
  * Schema version 15 (additive): adds per-job init config(s) to LockJob.
24
24
  * Schema version 16 (additive): adds normalized approval config to LockWorkflow/LockJob/LockStep.
@@ -92,16 +92,6 @@ function isLockParallelStep(entry) {
92
92
  return entry.kind === "parallel";
93
93
  }
94
94
  /**
95
- * Type guard for inline expression values.
96
- *
97
- * @deprecated See {@link LockInlineValue}. Retained only so a reader can
98
- * recognize an old lock's inline field and defer it to the eval agent's
99
- * init-runner. Removed at the next major (v1.0.0).
100
- */
101
- function isLockInlineValue(value) {
102
- return typeof value === "object" && value !== null && value._type === "inline";
103
- }
104
- /**
105
95
  * Author-facing keyword sugar for a `needs` edge's run condition. Each keyword
106
96
  * resolves (at compile time) to a set of upstream terminal statuses; the
107
97
  * downstream edge is dispatch-satisfied when the upstream's terminal status is
@@ -214,6 +204,6 @@ const changedFilesStatusSchema = z.enum([
214
204
  "skipped"
215
205
  ]);
216
206
  //#endregion
217
- export { BREAKING_FLOOR, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SANDBOX_NETWORK_MODES, SCHEMA_VERSION, changedFilesStatusSchema, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, resolveContentFormat, resolveWhenToRunOn };
207
+ export { BREAKING_FLOOR, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SANDBOX_NETWORK_MODES, SCHEMA_VERSION, changedFilesStatusSchema, isLockDynamicJobFn, isLockParallelStep, isLockStaticJob, resolveContentFormat, resolveWhenToRunOn };
218
208
 
219
209
  //# sourceMappingURL=types.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.test-d.d.ts.map
@@ -0,0 +1,63 @@
1
+ import "../rolldown-runtime-ClRpJifh.js";
2
+ import { describe, expectTypeOf, it } from "vitest";
3
+ //#region src/trigger/types.test-d.ts
4
+ /**
5
+ * The lock-file dynamic fields no longer admit the schema-v11 inline
6
+ * expression `{ _type: 'inline', expression }`. That object is itself a
7
+ * `Record<string, string>`, so the `env` axis is pinned by type identity rather
8
+ * than by an assignment the compiler would accept either way; the two string
9
+ * fields refuse the object outright.
10
+ */
11
+ describe("LockJob dynamic fields", () => {
12
+ it("refuses an inline expression as the concurrency group", () => {
13
+ expectTypeOf({
14
+ _type: "static",
15
+ name: "build",
16
+ steps: [],
17
+ needs: [],
18
+ concurrencyGroup: {
19
+ _type: "inline",
20
+ expression: "() => \"deploy\""
21
+ }
22
+ }).toBeObject();
23
+ });
24
+ it("refuses an inline expression as a context name", () => {
25
+ expectTypeOf({
26
+ _type: "static",
27
+ name: "build",
28
+ steps: [],
29
+ needs: [],
30
+ contexts: [{
31
+ value: {
32
+ _type: "inline",
33
+ expression: "() => \"prod\""
34
+ },
35
+ dynamic: false
36
+ }]
37
+ }).toBeObject();
38
+ });
39
+ it("types env as exactly a plain record", () => {
40
+ expectTypeOf().toEqualTypeOf();
41
+ });
42
+ it("accepts the static shapes", () => {
43
+ const job = {
44
+ _type: "static",
45
+ name: "build",
46
+ steps: [],
47
+ needs: [],
48
+ env: { NODE_ENV: "test" },
49
+ dynamicEnv: true,
50
+ concurrencyGroup: "deploy",
51
+ contexts: [{
52
+ value: "production",
53
+ dynamic: false
54
+ }]
55
+ };
56
+ expectTypeOf(job.env).toEqualTypeOf();
57
+ expectTypeOf(job.concurrencyGroup).toEqualTypeOf();
58
+ });
59
+ });
60
+ //#endregion
61
+ export {};
62
+
63
+ //# sourceMappingURL=types.test-d.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kici-dev/engine",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
5
5
  "keywords": [
6
6
  "ci",
@@ -105,10 +105,6 @@
105
105
  "import": "./dist/protocol/messages/dashboard-sealed-write.js",
106
106
  "types": "./dist/protocol/messages/dashboard-sealed-write.d.ts"
107
107
  },
108
- "./protocol/messages/oidc-mint": {
109
- "import": "./dist/protocol/messages/oidc-mint.js",
110
- "types": "./dist/protocol/messages/oidc-mint.d.ts"
111
- },
112
108
  "./protocol/messages/git-credential-relay": {
113
109
  "import": "./dist/protocol/messages/git-credential-relay.js",
114
110
  "types": "./dist/protocol/messages/git-credential-relay.d.ts"
@@ -147,20 +143,20 @@
147
143
  }
148
144
  },
149
145
  "dependencies": {
150
- "jose": "^6.2.10",
146
+ "jose": "^6.2.12",
151
147
  "jsonpath-plus": "^10.4.0",
152
148
  "picomatch": "^4.0.7",
153
149
  "safe-regex": "^2.1.1",
154
- "yaml": "^2.9.0",
155
- "zod": "^4.4.3"
150
+ "yaml": "^2.9.1",
151
+ "zod": "^4.6.5"
156
152
  },
157
153
  "devDependencies": {
158
- "@types/node": "^24.12.0",
154
+ "@types/node": "^24.13.4",
159
155
  "@types/safe-regex": "^1.1.6"
160
156
  },
161
157
  "scripts": {
162
- "build": "node ../../scripts/build-ts.mjs && tsgo --emitDeclarationOnly",
163
- "typecheck": "tsgo --noEmit",
158
+ "build": "node ../../scripts/build-ts.mjs && tsc --emitDeclarationOnly",
159
+ "typecheck": "tsc --noEmit",
164
160
  "test": "vitest run"
165
161
  }
166
162
  }
package/sbom.spdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "spdxVersion": "SPDX-2.3",
3
3
  "dataLicense": "CC0-1.0",
4
4
  "SPDXID": "SPDXRef-DOCUMENT",
5
- "name": "@kici-dev/engine@0.8.0",
6
- "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.8.0/d8d0338d-8ea5-46df-a0ab-7373b6ab0df1",
5
+ "name": "@kici-dev/engine@0.9.1",
6
+ "documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.9.1/6069e1a4-5c5d-4efa-878f-506b7563ca06",
7
7
  "creationInfo": {
8
- "created": "2026-09-13T12:24:34Z",
8
+ "created": "2026-09-22T02:16:18Z",
9
9
  "creators": [
10
10
  "Tool: kici-sbom-generator"
11
11
  ]
@@ -54,7 +54,7 @@
54
54
  {
55
55
  "SPDXID": "SPDXRef-RootPackage",
56
56
  "name": "@kici-dev/engine",
57
- "versionInfo": "0.8.0",
57
+ "versionInfo": "0.9.1",
58
58
  "downloadLocation": "NOASSERTION",
59
59
  "filesAnalyzed": false,
60
60
  "licenseConcluded": "NOASSERTION",
@@ -65,17 +65,17 @@
65
65
  {
66
66
  "referenceCategory": "PACKAGE-MANAGER",
67
67
  "referenceType": "purl",
68
- "referenceLocator": "pkg:npm/%40kici-dev/engine@0.8.0"
68
+ "referenceLocator": "pkg:npm/%40kici-dev/engine@0.9.1"
69
69
  }
70
70
  ],
71
71
  "description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
72
72
  "homepage": "https://kici.dev"
73
73
  },
74
74
  {
75
- "SPDXID": "SPDXRef-Package-jose-6.2.10",
75
+ "SPDXID": "SPDXRef-Package-jose-6.2.12",
76
76
  "name": "jose",
77
- "versionInfo": "6.2.10",
78
- "downloadLocation": "https://registry.npmjs.org/jose/-/jose-6.2.10.tgz",
77
+ "versionInfo": "6.2.12",
78
+ "downloadLocation": "https://registry.npmjs.org/jose/-/jose-6.2.12.tgz",
79
79
  "filesAnalyzed": false,
80
80
  "licenseConcluded": "NOASSERTION",
81
81
  "licenseDeclared": "MIT",
@@ -85,7 +85,7 @@
85
85
  {
86
86
  "referenceCategory": "PACKAGE-MANAGER",
87
87
  "referenceType": "purl",
88
- "referenceLocator": "pkg:npm/jose@6.2.10"
88
+ "referenceLocator": "pkg:npm/jose@6.2.12"
89
89
  }
90
90
  ],
91
91
  "description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
@@ -192,10 +192,10 @@
192
192
  "homepage": "https://github.com/davisjam/safe-regex"
193
193
  },
194
194
  {
195
- "SPDXID": "SPDXRef-Package-yaml-2.9.0",
195
+ "SPDXID": "SPDXRef-Package-yaml-2.9.1",
196
196
  "name": "yaml",
197
- "versionInfo": "2.9.0",
198
- "downloadLocation": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",
197
+ "versionInfo": "2.9.1",
198
+ "downloadLocation": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
199
199
  "filesAnalyzed": false,
200
200
  "licenseConcluded": "NOASSERTION",
201
201
  "licenseDeclared": "ISC",
@@ -205,17 +205,17 @@
205
205
  {
206
206
  "referenceCategory": "PACKAGE-MANAGER",
207
207
  "referenceType": "purl",
208
- "referenceLocator": "pkg:npm/yaml@2.9.0"
208
+ "referenceLocator": "pkg:npm/yaml@2.9.1"
209
209
  }
210
210
  ],
211
211
  "description": "JavaScript parser and stringifier for YAML",
212
212
  "homepage": "https://eemeli.org/yaml/"
213
213
  },
214
214
  {
215
- "SPDXID": "SPDXRef-Package-zod-4.4.3",
215
+ "SPDXID": "SPDXRef-Package-zod-4.6.5",
216
216
  "name": "zod",
217
- "versionInfo": "4.4.3",
218
- "downloadLocation": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
217
+ "versionInfo": "4.6.5",
218
+ "downloadLocation": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz",
219
219
  "filesAnalyzed": false,
220
220
  "licenseConcluded": "NOASSERTION",
221
221
  "licenseDeclared": "MIT",
@@ -225,7 +225,7 @@
225
225
  {
226
226
  "referenceCategory": "PACKAGE-MANAGER",
227
227
  "referenceType": "purl",
228
- "referenceLocator": "pkg:npm/zod@4.4.3"
228
+ "referenceLocator": "pkg:npm/zod@4.6.5"
229
229
  }
230
230
  ],
231
231
  "description": "TypeScript-first schema declaration and validation library with static type inference",
@@ -250,7 +250,7 @@
250
250
  },
251
251
  {
252
252
  "spdxElementId": "SPDXRef-RootPackage",
253
- "relatedSpdxElement": "SPDXRef-Package-jose-6.2.10",
253
+ "relatedSpdxElement": "SPDXRef-Package-jose-6.2.12",
254
254
  "relationshipType": "DEPENDS_ON"
255
255
  },
256
256
  {
@@ -270,12 +270,12 @@
270
270
  },
271
271
  {
272
272
  "spdxElementId": "SPDXRef-RootPackage",
273
- "relatedSpdxElement": "SPDXRef-Package-yaml-2.9.0",
273
+ "relatedSpdxElement": "SPDXRef-Package-yaml-2.9.1",
274
274
  "relationshipType": "DEPENDS_ON"
275
275
  },
276
276
  {
277
277
  "spdxElementId": "SPDXRef-RootPackage",
278
- "relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
278
+ "relatedSpdxElement": "SPDXRef-Package-zod-4.6.5",
279
279
  "relationshipType": "DEPENDS_ON"
280
280
  },
281
281
  {
@@ -1,58 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * @deprecated The `oidc.mint.*` RPC pair (Platform-rooted identity mint) is
4
- * hard-deprecated in favor of orchestrator-owned signing. It is kept
5
- * wire-compatible for the mixed-version rollout window and removed at v1.0; a
6
- * fresh orchestrator with its own signer never sends it. See
7
- * docs/user/deprecations.md.
8
- */
9
- /**
10
- * Error discriminator for a failed provenance mint, carried on
11
- * `oidc.mint.response.error.code`. Mirrors the three orchestrator-side error
12
- * classes that consume it:
13
- * rejected -> run/job missing or job terminal (MintRejectedError)
14
- * unavailable -> the Platform signer/issuer is not configured (MintUnavailableError)
15
- * failed -> any other Platform-side failure (MintRelayError)
16
- */
17
- export declare const OidcMintErrorCode: z.ZodEnum<{
18
- failed: "failed";
19
- rejected: "rejected";
20
- unavailable: "unavailable";
21
- }>;
22
- export type OidcMintErrorCode = z.infer<typeof OidcMintErrorCode>;
23
- /** orchestrator -> Platform: request a short-lived OIDC ID token for a job. */
24
- export declare const oidcMintRequestSchema: z.ZodObject<{
25
- type: z.ZodLiteral<"oidc.mint.request">;
26
- requestId: z.ZodString;
27
- orchestratorId: z.ZodString;
28
- runId: z.ZodString;
29
- jobId: z.ZodString;
30
- audience: z.ZodString;
31
- deferred: z.ZodOptional<z.ZodLiteral<true>>;
32
- statementHash: z.ZodOptional<z.ZodString>;
33
- origin: z.ZodOptional<z.ZodEnum<{
34
- deferred: "deferred";
35
- "offline-backfill": "offline-backfill";
36
- }>>;
37
- }, z.core.$strip>;
38
- export type OidcMintRequest = z.infer<typeof oidcMintRequestSchema>;
39
- /** Platform -> orchestrator: the minted token or a typed error (exactly one). */
40
- export declare const oidcMintResponseSchema: z.ZodObject<{
41
- type: z.ZodLiteral<"oidc.mint.response">;
42
- requestId: z.ZodString;
43
- result: z.ZodOptional<z.ZodObject<{
44
- token: z.ZodString;
45
- expiresIn: z.ZodNumber;
46
- jti: z.ZodString;
47
- }, z.core.$strip>>;
48
- error: z.ZodOptional<z.ZodObject<{
49
- code: z.ZodEnum<{
50
- failed: "failed";
51
- rejected: "rejected";
52
- unavailable: "unavailable";
53
- }>;
54
- message: z.ZodString;
55
- }, z.core.$strip>>;
56
- }, z.core.$strip>;
57
- export type OidcMintResponse = z.infer<typeof oidcMintResponseSchema>;
58
- //# sourceMappingURL=oidc-mint.d.ts.map
@@ -1,62 +0,0 @@
1
- import "../../rolldown-runtime-ClRpJifh.js";
2
- import { AttestationOrigin } from "../../provenance/attestation-origin.js";
3
- import { z } from "zod";
4
- //#region src/protocol/messages/oidc-mint.ts
5
- /**
6
- * @deprecated The `oidc.mint.*` RPC pair (Platform-rooted identity mint) is
7
- * hard-deprecated in favor of orchestrator-owned signing. It is kept
8
- * wire-compatible for the mixed-version rollout window and removed at v1.0; a
9
- * fresh orchestrator with its own signer never sends it. See
10
- * docs/user/deprecations.md.
11
- */
12
- /**
13
- * Error discriminator for a failed provenance mint, carried on
14
- * `oidc.mint.response.error.code`. Mirrors the three orchestrator-side error
15
- * classes that consume it:
16
- * rejected -> run/job missing or job terminal (MintRejectedError)
17
- * unavailable -> the Platform signer/issuer is not configured (MintUnavailableError)
18
- * failed -> any other Platform-side failure (MintRelayError)
19
- */
20
- const OidcMintErrorCode = z.enum([
21
- "rejected",
22
- "unavailable",
23
- "failed"
24
- ]);
25
- /** orchestrator -> Platform: request a short-lived OIDC ID token for a job. */
26
- const oidcMintRequestSchema = z.object({
27
- type: z.literal("oidc.mint.request"),
28
- requestId: z.string().min(1),
29
- orchestratorId: z.string().min(1),
30
- runId: z.string().min(1),
31
- jobId: z.string().min(1),
32
- audience: z.string().min(1).max(255),
33
- /**
34
- * Deferred fulfilment (attest-later): when true, the mint knowingly targets a
35
- * completed job and binds `statementHash` + `origin` into the token. Absent
36
- * for the live agent path. `orgId` is never on the wire — the Platform derives
37
- * it from the authenticated connection.
38
- */
39
- deferred: z.literal(true).optional(),
40
- /** SHA-256 of the frozen DSSE statement the deferred token binds to. */
41
- statementHash: z.string().optional(),
42
- /** Mint-timing origin for a deferred fulfilment (never `live` here). */
43
- origin: AttestationOrigin.extract(["deferred", "offline-backfill"]).optional()
44
- });
45
- /** Platform -> orchestrator: the minted token or a typed error (exactly one). */
46
- const oidcMintResponseSchema = z.object({
47
- type: z.literal("oidc.mint.response"),
48
- requestId: z.string().min(1),
49
- result: z.object({
50
- token: z.string().min(1),
51
- expiresIn: z.number().int().positive(),
52
- jti: z.string().min(1)
53
- }).optional(),
54
- error: z.object({
55
- code: OidcMintErrorCode,
56
- message: z.string()
57
- }).optional()
58
- }).refine((m) => m.result === void 0 !== (m.error === void 0), { message: "oidc.mint.response must carry exactly one of result | error" });
59
- //#endregion
60
- export { OidcMintErrorCode, oidcMintRequestSchema, oidcMintResponseSchema };
61
-
62
- //# sourceMappingURL=oidc-mint.js.map
@@ -1,30 +0,0 @@
1
- /**
2
- * ContributorResolver interface for determining contributor permissions.
3
- *
4
- * Deprecated in favour of ref-based trust: the whole interface, including the
5
- * `ContributorPermission` / `ContributorInfo` shapes it carries, is retained
6
- * for compatibility and has no caller in this repo.
7
- */
8
- import type { ProviderType } from './types.js';
9
- /** Contributor's permission level on a repository. */
10
- export type ContributorPermission = 'admin' | 'write' | 'read' | 'none';
11
- /** Information about a contributor and their relationship to a PR. */
12
- export interface ContributorInfo {
13
- username: string;
14
- permission: ContributorPermission;
15
- /** Whether the PR comes from a fork */
16
- isForkPR: boolean;
17
- }
18
- /**
19
- * Resolves contributor information from a git hosting provider.
20
- *
21
- * @deprecated Trust is derived from the git ref, not from the contributor's
22
- * permission level, so nothing in the webhook pipeline calls a resolver. The
23
- * type stays exported for wire compatibility with external implementations and
24
- * is removed at v1.0.0.
25
- */
26
- export interface ContributorResolver {
27
- readonly provider: ProviderType;
28
- resolveContributor(repoIdentifier: string, username: string, credentials: unknown): Promise<ContributorInfo>;
29
- }
30
- //# sourceMappingURL=contributor-resolver.d.ts.map
@@ -1,2 +0,0 @@
1
- import "../rolldown-runtime-ClRpJifh.js";
2
- export {};