@kici-dev/engine 0.7.0 → 0.9.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/context/hold-reason.d.ts +6 -11
- package/dist/context/hold-reason.js +1 -8
- package/dist/context/index.d.ts +3 -3
- package/dist/context/index.js +3 -3
- package/dist/context/types.d.ts +12 -10
- package/dist/context/types.js +12 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -6
- package/dist/metrics/catalog-policy.js +2 -2
- package/dist/protocol/dashboard-write-operations.d.ts +8 -18
- package/dist/protocol/dashboard-write-operations.js +5 -26
- package/dist/protocol/messages/agent-run-result.d.ts +0 -1
- package/dist/protocol/messages/auth.d.ts +3 -3
- package/dist/protocol/messages/capabilities.d.ts +3 -5
- package/dist/protocol/messages/capabilities.js +4 -10
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +10 -24
- package/dist/protocol/messages/dashboard-global-workflows.js +9 -15
- package/dist/protocol/messages/dashboard.d.ts +4 -23
- package/dist/protocol/messages/dashboard.js +4 -22
- package/dist/protocol/messages/oidc-token-relay.d.ts +2 -13
- package/dist/protocol/messages/oidc-token-relay.js +3 -10
- package/dist/protocol/messages/orchestrator-agent.d.ts +24 -9
- package/dist/protocol/messages/orchestrator-agent.js +24 -28
- package/dist/protocol/messages/peer.d.ts +26 -31
- package/dist/protocol/messages/peer.js +18 -38
- package/dist/protocol/messages/platform-orchestrator.d.ts +17 -79
- package/dist/protocol/messages/platform-orchestrator.js +6 -24
- package/dist/protocol/version.d.ts +10 -18
- package/dist/protocol/version.js +11 -19
- package/dist/provenance/id-token-claim-names.d.ts +13 -0
- package/dist/provenance/id-token-claim-names.js +44 -0
- package/dist/provenance/id-token-event-claims.d.ts +1 -8
- package/dist/provenance/id-token-event-claims.js +2 -7
- package/dist/provider/index.d.ts +1 -2
- package/dist/provider/index.test-d.d.ts +2 -0
- package/dist/provider/index.test-d.js +31 -0
- package/dist/provider/lock-file-fetcher.d.ts +8 -0
- package/dist/provider/webhook-normalizer.d.ts +0 -42
- package/dist/trigger/types.d.ts +8 -38
- package/dist/trigger/types.js +2 -12
- package/dist/trigger/types.test-d.d.ts +2 -0
- package/dist/trigger/types.test-d.js +63 -0
- package/package.json +7 -11
- package/sbom.spdx.json +20 -20
- package/dist/protocol/messages/oidc-mint.d.ts +0 -58
- package/dist/protocol/messages/oidc-mint.js +0 -62
- package/dist/provider/contributor-resolver.d.ts +0 -30
- package/dist/provider/contributor-resolver.js +0 -2
|
@@ -14,15 +14,13 @@
|
|
|
14
14
|
* source in the org. When present, it qualifies the entry to a single
|
|
15
15
|
* webhook source (e.g., `github:42` vs `generic:org:abcd`).
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* Two independent policy axes (see GlobalWorkflowPolicy in the orchestrator):
|
|
18
18
|
* - `allowedRepos` restricts which repos may AUTHOR global workflows.
|
|
19
19
|
* - `deniedRepos` blocks global dispatches for events FROM these SOURCE repos.
|
|
20
|
-
* - `elevatedRepos` is DEPRECATED and not enforced — see the field comments
|
|
21
|
-
* below and `docs/user/deprecations.md`.
|
|
22
20
|
*/
|
|
23
21
|
import { z } from 'zod';
|
|
24
22
|
/**
|
|
25
|
-
* One entry in
|
|
23
|
+
* One entry in either repo-pattern list. `routingKey` is the
|
|
26
24
|
* source-qualifier; when absent the entry applies to any source in the org.
|
|
27
25
|
*/
|
|
28
26
|
export declare const repoPatternEntrySchema: z.ZodObject<{
|
|
@@ -51,7 +49,11 @@ export type RepoPatternEntry = z.infer<typeof repoPatternEntrySchema>;
|
|
|
51
49
|
* compiles into a real inversion, and `[!…]`, which it does not.
|
|
52
50
|
*/
|
|
53
51
|
export declare function invalidRepoPatternReason(pattern: string): string | null;
|
|
54
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Projected org-level global workflow settings. `.strict()`: the projection
|
|
54
|
+
* once carried an unenforced elevated-access list, so an orchestrator still
|
|
55
|
+
* echoing one is on a build this protocol floor refuses.
|
|
56
|
+
*/
|
|
55
57
|
export declare const globalWorkflowSettingsSchema: z.ZodObject<{
|
|
56
58
|
customerId: z.ZodString;
|
|
57
59
|
enabled: z.ZodBoolean;
|
|
@@ -63,13 +65,9 @@ export declare const globalWorkflowSettingsSchema: z.ZodObject<{
|
|
|
63
65
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
64
66
|
pattern: z.ZodString;
|
|
65
67
|
}, z.core.$strip>>>;
|
|
66
|
-
elevatedRepos: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
67
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
68
|
-
pattern: z.ZodString;
|
|
69
|
-
}, z.core.$strip>>>;
|
|
70
68
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
71
69
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
72
|
-
}, z.core.$
|
|
70
|
+
}, z.core.$strict>;
|
|
73
71
|
export type GlobalWorkflowSettings = z.infer<typeof globalWorkflowSettingsSchema>;
|
|
74
72
|
/** Request the current global-workflow settings row. */
|
|
75
73
|
export declare const globalWorkflowsGetRequestSchema: z.ZodObject<{
|
|
@@ -150,10 +148,6 @@ export declare const globalWorkflowsUpdateRequestSchema: z.ZodObject<{
|
|
|
150
148
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
151
149
|
pattern: z.ZodString;
|
|
152
150
|
}, z.core.$strip>>>>;
|
|
153
|
-
elevatedRepos: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
154
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
155
|
-
pattern: z.ZodString;
|
|
156
|
-
}, z.core.$strip>>>>;
|
|
157
151
|
}, z.core.$strict>;
|
|
158
152
|
export declare const globalWorkflowsGetResponseSchema: z.ZodObject<{
|
|
159
153
|
type: z.ZodLiteral<"dashboard.global-workflows.get.response">;
|
|
@@ -169,13 +163,9 @@ export declare const globalWorkflowsGetResponseSchema: z.ZodObject<{
|
|
|
169
163
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
170
164
|
pattern: z.ZodString;
|
|
171
165
|
}, z.core.$strip>>>;
|
|
172
|
-
elevatedRepos: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
173
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
174
|
-
pattern: z.ZodString;
|
|
175
|
-
}, z.core.$strip>>>;
|
|
176
166
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
177
167
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
178
|
-
}, z.core.$
|
|
168
|
+
}, z.core.$strict>>;
|
|
179
169
|
error: z.ZodOptional<z.ZodString>;
|
|
180
170
|
}, z.core.$strip>;
|
|
181
171
|
export declare const globalWorkflowsUpdateResponseSchema: z.ZodObject<{
|
|
@@ -192,13 +182,9 @@ export declare const globalWorkflowsUpdateResponseSchema: z.ZodObject<{
|
|
|
192
182
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
193
183
|
pattern: z.ZodString;
|
|
194
184
|
}, z.core.$strip>>>;
|
|
195
|
-
elevatedRepos: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
196
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
197
|
-
pattern: z.ZodString;
|
|
198
|
-
}, z.core.$strip>>>;
|
|
199
185
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
200
186
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
201
|
-
}, z.core.$
|
|
187
|
+
}, z.core.$strict>>;
|
|
202
188
|
error: z.ZodOptional<z.ZodString>;
|
|
203
189
|
}, z.core.$strip>;
|
|
204
190
|
export type GlobalWorkflowsGetRequest = z.infer<typeof globalWorkflowsGetRequestSchema>;
|
|
@@ -19,14 +19,12 @@ import { z } from "zod";
|
|
|
19
19
|
* source in the org. When present, it qualifies the entry to a single
|
|
20
20
|
* webhook source (e.g., `github:42` vs `generic:org:abcd`).
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* Two independent policy axes (see GlobalWorkflowPolicy in the orchestrator):
|
|
23
23
|
* - `allowedRepos` restricts which repos may AUTHOR global workflows.
|
|
24
24
|
* - `deniedRepos` blocks global dispatches for events FROM these SOURCE repos.
|
|
25
|
-
* - `elevatedRepos` is DEPRECATED and not enforced — see the field comments
|
|
26
|
-
* below and `docs/user/deprecations.md`.
|
|
27
25
|
*/
|
|
28
26
|
/**
|
|
29
|
-
* One entry in
|
|
27
|
+
* One entry in either repo-pattern list. `routingKey` is the
|
|
30
28
|
* source-qualifier; when absent the entry applies to any source in the org.
|
|
31
29
|
*/
|
|
32
30
|
const repoPatternEntrySchema = z.object({
|
|
@@ -59,7 +57,11 @@ function invalidRepoPatternReason(pattern) {
|
|
|
59
57
|
if (negation) return `${negation} is not allowed on a policy list — the list's direction already encodes allow/deny`;
|
|
60
58
|
return null;
|
|
61
59
|
}
|
|
62
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Projected org-level global workflow settings. `.strict()`: the projection
|
|
62
|
+
* once carried an unenforced elevated-access list, so an orchestrator still
|
|
63
|
+
* echoing one is on a build this protocol floor refuses.
|
|
64
|
+
*/
|
|
63
65
|
const globalWorkflowSettingsSchema = z.object({
|
|
64
66
|
customerId: z.string(),
|
|
65
67
|
/**
|
|
@@ -71,15 +73,9 @@ const globalWorkflowSettingsSchema = z.object({
|
|
|
71
73
|
enabled: z.boolean(),
|
|
72
74
|
allowedRepos: z.array(repoPatternEntrySchema).nullable(),
|
|
73
75
|
deniedRepos: z.array(repoPatternEntrySchema).nullable(),
|
|
74
|
-
/**
|
|
75
|
-
* @deprecated Stored and echoed back, but never enforced: an organization-wide
|
|
76
|
-
* workflow's job is dispatched with no secret material at all, so there is no
|
|
77
|
-
* secret access for this list to widen. Removal at v1.0.0.
|
|
78
|
-
*/
|
|
79
|
-
elevatedRepos: z.array(repoPatternEntrySchema).nullable(),
|
|
80
76
|
createdAt: z.string().nullable(),
|
|
81
77
|
updatedAt: z.string().nullable()
|
|
82
|
-
});
|
|
78
|
+
}).strict();
|
|
83
79
|
/** Request the current global-workflow settings row. */
|
|
84
80
|
const globalWorkflowsGetRequestSchema = z.object({
|
|
85
81
|
type: z.literal("dashboard.global-workflows.get"),
|
|
@@ -102,9 +98,7 @@ const globalWorkflowsUpdateRequestSchema = z.object({
|
|
|
102
98
|
requestId: z.string(),
|
|
103
99
|
actor: actorPrincipalSchema,
|
|
104
100
|
allowedRepos: z.array(repoPatternEntrySchema).nullable().optional(),
|
|
105
|
-
deniedRepos: z.array(repoPatternEntrySchema).nullable().optional()
|
|
106
|
-
/** @deprecated Accepted and stored, but never enforced. Removal at v1.0.0. */
|
|
107
|
-
elevatedRepos: z.array(repoPatternEntrySchema).nullable().optional()
|
|
101
|
+
deniedRepos: z.array(repoPatternEntrySchema).nullable().optional()
|
|
108
102
|
}).strict();
|
|
109
103
|
const globalWorkflowsGetResponseSchema = z.object({
|
|
110
104
|
type: z.literal("dashboard.global-workflows.get.response"),
|
|
@@ -102,7 +102,6 @@ export declare const dashboardRunStructuredResponseSchema: z.ZodObject<{
|
|
|
102
102
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
103
103
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
104
104
|
trustTier: z.ZodNullable<z.ZodEnum<{
|
|
105
|
-
known: "known";
|
|
106
105
|
trusted: "trusted";
|
|
107
106
|
unknown: "unknown";
|
|
108
107
|
}>>;
|
|
@@ -563,7 +562,6 @@ export declare const dashboardRunDetailResponseSchema: z.ZodObject<{
|
|
|
563
562
|
}, z.core.$strip>>;
|
|
564
563
|
trustContext: z.ZodOptional<z.ZodObject<{
|
|
565
564
|
trustTier: z.ZodNullable<z.ZodEnum<{
|
|
566
|
-
known: "known";
|
|
567
565
|
trusted: "trusted";
|
|
568
566
|
unknown: "unknown";
|
|
569
567
|
}>>;
|
|
@@ -4442,6 +4440,7 @@ export declare const testRelayRunStatusResponseSchema: z.ZodObject<{
|
|
|
4442
4440
|
status: z.ZodString;
|
|
4443
4441
|
exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4444
4442
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4443
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4445
4444
|
}, z.core.$strip>>>;
|
|
4446
4445
|
done: z.ZodOptional<z.ZodBoolean>;
|
|
4447
4446
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -6745,10 +6744,6 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
6745
6744
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
6746
6745
|
pattern: z.ZodString;
|
|
6747
6746
|
}, z.core.$strip>>>>;
|
|
6748
|
-
elevatedRepos: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
6749
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
6750
|
-
pattern: z.ZodString;
|
|
6751
|
-
}, z.core.$strip>>>>;
|
|
6752
6747
|
}, z.core.$strict>, z.ZodObject<{
|
|
6753
6748
|
type: z.ZodLiteral<"dashboard.access-log.list">;
|
|
6754
6749
|
requestId: z.ZodString;
|
|
@@ -7209,7 +7204,6 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
7209
7204
|
}, z.core.$strip>>;
|
|
7210
7205
|
trustContext: z.ZodOptional<z.ZodObject<{
|
|
7211
7206
|
trustTier: z.ZodNullable<z.ZodEnum<{
|
|
7212
|
-
known: "known";
|
|
7213
7207
|
trusted: "trusted";
|
|
7214
7208
|
unknown: "unknown";
|
|
7215
7209
|
}>>;
|
|
@@ -7274,7 +7268,6 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
7274
7268
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
7275
7269
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
7276
7270
|
trustTier: z.ZodNullable<z.ZodEnum<{
|
|
7277
|
-
known: "known";
|
|
7278
7271
|
trusted: "trusted";
|
|
7279
7272
|
unknown: "unknown";
|
|
7280
7273
|
}>>;
|
|
@@ -8487,13 +8480,9 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8487
8480
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
8488
8481
|
pattern: z.ZodString;
|
|
8489
8482
|
}, z.core.$strip>>>;
|
|
8490
|
-
elevatedRepos: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
8491
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
8492
|
-
pattern: z.ZodString;
|
|
8493
|
-
}, z.core.$strip>>>;
|
|
8494
8483
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
8495
8484
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
8496
|
-
}, z.core.$
|
|
8485
|
+
}, z.core.$strict>>;
|
|
8497
8486
|
error: z.ZodOptional<z.ZodString>;
|
|
8498
8487
|
}, z.core.$strip>, z.ZodObject<{
|
|
8499
8488
|
type: z.ZodLiteral<"dashboard.global-workflows.update.response">;
|
|
@@ -8509,13 +8498,9 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8509
8498
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
8510
8499
|
pattern: z.ZodString;
|
|
8511
8500
|
}, z.core.$strip>>>;
|
|
8512
|
-
elevatedRepos: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
8513
|
-
routingKey: z.ZodOptional<z.ZodString>;
|
|
8514
|
-
pattern: z.ZodString;
|
|
8515
|
-
}, z.core.$strip>>>;
|
|
8516
8501
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
8517
8502
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
8518
|
-
}, z.core.$
|
|
8503
|
+
}, z.core.$strict>>;
|
|
8519
8504
|
error: z.ZodOptional<z.ZodString>;
|
|
8520
8505
|
}, z.core.$strip>, z.ZodObject<{
|
|
8521
8506
|
type: z.ZodLiteral<"dashboard.access-log.list.response">;
|
|
@@ -8690,6 +8675,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8690
8675
|
status: z.ZodString;
|
|
8691
8676
|
exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8692
8677
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8678
|
+
durationMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8693
8679
|
}, z.core.$strip>>>;
|
|
8694
8680
|
done: z.ZodOptional<z.ZodBoolean>;
|
|
8695
8681
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -8871,7 +8857,6 @@ export declare const dashboardRunDetailApiResponseSchema: z.ZodObject<{
|
|
|
8871
8857
|
}, z.core.$strip>>;
|
|
8872
8858
|
trustContext: z.ZodOptional<z.ZodObject<{
|
|
8873
8859
|
trustTier: z.ZodNullable<z.ZodEnum<{
|
|
8874
|
-
known: "known";
|
|
8875
8860
|
trusted: "trusted";
|
|
8876
8861
|
unknown: "unknown";
|
|
8877
8862
|
}>>;
|
|
@@ -9381,8 +9366,6 @@ export type RunEvent = z.infer<typeof runEventSchema>;
|
|
|
9381
9366
|
*/
|
|
9382
9367
|
export declare const trustPolicyResponseSchema: z.ZodObject<{
|
|
9383
9368
|
forkPolicy: z.ZodString;
|
|
9384
|
-
unknownContributorPolicy: z.ZodString;
|
|
9385
|
-
workflowChangePolicy: z.ZodString;
|
|
9386
9369
|
approvalExpiryHours: z.ZodNumber;
|
|
9387
9370
|
approvalExpirySeconds: z.ZodOptional<z.ZodNumber>;
|
|
9388
9371
|
}, z.core.$strip>;
|
|
@@ -9432,7 +9415,6 @@ export declare const orgMemberSchema: z.ZodObject<{
|
|
|
9432
9415
|
suspendedAt: z.ZodNullable<z.ZodCoercedString<unknown>>;
|
|
9433
9416
|
joinedAt: z.ZodCoercedString<unknown>;
|
|
9434
9417
|
ciTrustLevel: z.ZodString;
|
|
9435
|
-
ciTrustOverride: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9436
9418
|
identityLinks: z.ZodArray<z.ZodObject<{
|
|
9437
9419
|
provider: z.ZodString;
|
|
9438
9420
|
providerUsername: z.ZodString;
|
|
@@ -9453,7 +9435,6 @@ export declare const memberListResponseSchema: z.ZodObject<{
|
|
|
9453
9435
|
suspendedAt: z.ZodNullable<z.ZodCoercedString<unknown>>;
|
|
9454
9436
|
joinedAt: z.ZodCoercedString<unknown>;
|
|
9455
9437
|
ciTrustLevel: z.ZodString;
|
|
9456
|
-
ciTrustOverride: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9457
9438
|
identityLinks: z.ZodArray<z.ZodObject<{
|
|
9458
9439
|
provider: z.ZodString;
|
|
9459
9440
|
providerUsername: z.ZodString;
|
|
@@ -6,6 +6,7 @@ import { actorPrincipalSchema } from "./actor.js";
|
|
|
6
6
|
import { HeldRunStatus } from "../../context/held-run-status.js";
|
|
7
7
|
import { dashboardSealedEnvelopeSchema } from "./dashboard-sealed-write.js";
|
|
8
8
|
import { JobKind, StepConcurrencyKind, initFailureSchema, stateReplayRunSchema } from "./execution-status.js";
|
|
9
|
+
import { TrustTierSchema } from "../../context/types.js";
|
|
9
10
|
import { agentRunResultSchema } from "./agent-run-result.js";
|
|
10
11
|
import { kiciBundleSchema } from "../../provenance/bundle.js";
|
|
11
12
|
import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
|
|
@@ -208,11 +209,7 @@ const dashboardJobDetailSchema = z.object({
|
|
|
208
209
|
});
|
|
209
210
|
/** Trust context from orchestrator execution_runs (populated for PR-triggered runs). */
|
|
210
211
|
const trustContextSchema = z.object({
|
|
211
|
-
trustTier:
|
|
212
|
-
"trusted",
|
|
213
|
-
"known",
|
|
214
|
-
"unknown"
|
|
215
|
-
]).nullable(),
|
|
212
|
+
trustTier: TrustTierSchema.nullable(),
|
|
216
213
|
lockFileSource: z.enum(["head", "base"]).nullable(),
|
|
217
214
|
contributorUsername: z.string().nullable()
|
|
218
215
|
});
|
|
@@ -2040,7 +2037,8 @@ const testRelayRunStatusResponseSchema = z.object({
|
|
|
2040
2037
|
jobName: z.string(),
|
|
2041
2038
|
status: z.string(),
|
|
2042
2039
|
exitCode: z.number().nullable().optional(),
|
|
2043
|
-
errorMessage: z.string().nullable().optional()
|
|
2040
|
+
errorMessage: z.string().nullable().optional(),
|
|
2041
|
+
durationMs: z.number().nullable().optional()
|
|
2044
2042
|
})).optional(),
|
|
2045
2043
|
done: z.boolean().optional(),
|
|
2046
2044
|
error: z.string().optional()
|
|
@@ -2525,8 +2523,6 @@ const runEventSchema = z.object({
|
|
|
2525
2523
|
*/
|
|
2526
2524
|
const trustPolicyResponseSchema = z.object({
|
|
2527
2525
|
forkPolicy: z.string(),
|
|
2528
|
-
unknownContributorPolicy: z.string(),
|
|
2529
|
-
workflowChangePolicy: z.string(),
|
|
2530
2526
|
approvalExpiryHours: z.number(),
|
|
2531
2527
|
approvalExpirySeconds: z.number().optional()
|
|
2532
2528
|
});
|
|
@@ -2561,20 +2557,6 @@ const orgMemberSchema = z.object({
|
|
|
2561
2557
|
suspendedAt: z.coerce.string().nullable(),
|
|
2562
2558
|
joinedAt: z.coerce.string(),
|
|
2563
2559
|
ciTrustLevel: z.string(),
|
|
2564
|
-
/**
|
|
2565
|
-
* The per-member `ci_trust` override, when one is stored, or `null` when the
|
|
2566
|
-
* member's level is entirely role-derived.
|
|
2567
|
-
*
|
|
2568
|
-
* Carried beside `ciTrustLevel` rather than folded into it, because the two
|
|
2569
|
-
* answer different questions. `ciTrustLevel` is the effective level the CI
|
|
2570
|
-
* trust gate decides with — the role-derived level with any override applied
|
|
2571
|
-
* on top — so it cannot say which half produced it. An override OUTRANKS the
|
|
2572
|
-
* roles, so an org that lowered a member by override has no way to see that,
|
|
2573
|
-
* and no way to undo it, from a payload that reports only the result.
|
|
2574
|
-
*
|
|
2575
|
-
* Optional so an older client keeps parsing the response.
|
|
2576
|
-
*/
|
|
2577
|
-
ciTrustOverride: z.string().nullable().optional(),
|
|
2578
2560
|
identityLinks: z.array(memberIdentityLinkSchema)
|
|
2579
2561
|
});
|
|
2580
2562
|
/** Response for org members list endpoint. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
* agent.api method name for the provenance ID-token
|
|
3
|
+
* agent.api method name for the provenance ID-token request.
|
|
4
4
|
*
|
|
5
|
-
* Single source of truth: both the orchestrator's
|
|
5
|
+
* Single source of truth: both the orchestrator's mint-handler registration
|
|
6
6
|
* and the SDK `ctx.kici.oidc.token()` wrapper import this constant, so the
|
|
7
7
|
* wire method name lives in exactly one place.
|
|
8
8
|
*/
|
|
@@ -18,8 +18,6 @@ export declare const oidcTokenRequestParamsSchema: z.ZodObject<{
|
|
|
18
18
|
audience: z.ZodString;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
export type OidcTokenRequestParams = z.infer<typeof oidcTokenRequestParamsSchema>;
|
|
21
|
-
export { OidcMintErrorCode } from './oidc-mint.js';
|
|
22
|
-
export type { OidcMintErrorCode as OidcMintErrorCodeType } from './oidc-mint.js';
|
|
23
21
|
/** A successfully minted ID token bound to a job. */
|
|
24
22
|
export declare const oidcMintedTokenSchema: z.ZodObject<{
|
|
25
23
|
token: z.ZodString;
|
|
@@ -46,13 +44,4 @@ export declare const oidcTokenResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
46
44
|
}>;
|
|
47
45
|
}, z.core.$strip>]>;
|
|
48
46
|
export type OidcTokenResult = z.infer<typeof oidcTokenResultSchema>;
|
|
49
|
-
/** Extra fields a deferred *fulfilment* mint carries (orchestrator -> Platform). */
|
|
50
|
-
export declare const deferredMintParamsSchema: z.ZodObject<{
|
|
51
|
-
statementHash: z.ZodString;
|
|
52
|
-
origin: z.ZodEnum<{
|
|
53
|
-
deferred: "deferred";
|
|
54
|
-
"offline-backfill": "offline-backfill";
|
|
55
|
-
}>;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
export type DeferredMintParams = z.infer<typeof deferredMintParamsSchema>;
|
|
58
47
|
//# sourceMappingURL=oidc-token-relay.d.ts.map
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import "../../rolldown-runtime-ClRpJifh.js";
|
|
2
|
-
import { AttestationOrigin } from "../../provenance/attestation-origin.js";
|
|
3
|
-
import { OidcMintErrorCode } from "./oidc-mint.js";
|
|
4
2
|
import { z } from "zod";
|
|
5
3
|
//#region src/protocol/messages/oidc-token-relay.ts
|
|
6
4
|
/**
|
|
7
|
-
* agent.api method name for the provenance ID-token
|
|
5
|
+
* agent.api method name for the provenance ID-token request.
|
|
8
6
|
*
|
|
9
|
-
* Single source of truth: both the orchestrator's
|
|
7
|
+
* Single source of truth: both the orchestrator's mint-handler registration
|
|
10
8
|
* and the SDK `ctx.kici.oidc.token()` wrapper import this constant, so the
|
|
11
9
|
* wire method name lives in exactly one place.
|
|
12
10
|
*/
|
|
@@ -38,12 +36,7 @@ const oidcTokenResultSchema = z.union([oidcMintedTokenSchema, z.object({
|
|
|
38
36
|
deferred: z.literal(true),
|
|
39
37
|
code: z.enum(["unavailable", "failed"])
|
|
40
38
|
})]);
|
|
41
|
-
/** Extra fields a deferred *fulfilment* mint carries (orchestrator -> Platform). */
|
|
42
|
-
const deferredMintParamsSchema = z.object({
|
|
43
|
-
statementHash: z.string(),
|
|
44
|
-
origin: AttestationOrigin.extract(["deferred", "offline-backfill"])
|
|
45
|
-
});
|
|
46
39
|
//#endregion
|
|
47
|
-
export { OIDC_TOKEN_REQUEST_METHOD,
|
|
40
|
+
export { OIDC_TOKEN_REQUEST_METHOD, oidcMintedTokenSchema, oidcTokenRequestParamsSchema, oidcTokenResultSchema };
|
|
48
41
|
|
|
49
42
|
//# sourceMappingURL=oidc-token-relay.js.map
|
|
@@ -108,7 +108,6 @@ export declare const jobDispatchSchema: z.ZodObject<{
|
|
|
108
108
|
maxLogSizeBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
109
109
|
concurrencyWaitTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
110
110
|
sourceTarUrl: z.ZodOptional<z.ZodString>;
|
|
111
|
-
sourceTarHash: z.ZodOptional<z.ZodString>;
|
|
112
111
|
sourceTarDigest: z.ZodOptional<z.ZodString>;
|
|
113
112
|
depsUrl: z.ZodOptional<z.ZodString>;
|
|
114
113
|
depsHash: z.ZodOptional<z.ZodString>;
|
|
@@ -613,16 +612,21 @@ export declare const artifactsUploadResponseSchema: z.ZodObject<{
|
|
|
613
612
|
}>>;
|
|
614
613
|
error: z.ZodOptional<z.ZodString>;
|
|
615
614
|
}, z.core.$strip>;
|
|
616
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* Agent -> Orchestrator: confirm an artifact upload finished; records the DB row.
|
|
617
|
+
*
|
|
618
|
+
* The orchestrator derives the storage key from the server-resolved run and
|
|
619
|
+
* artifact name and reads the real object size back from storage, so the agent
|
|
620
|
+
* asserts neither. `.strict()`: an agent still echoing either is on a build the
|
|
621
|
+
* protocol floor refuses, and a stray field is a version-skew signal.
|
|
622
|
+
*/
|
|
617
623
|
export declare const artifactsUploadCompleteSchema: z.ZodObject<{
|
|
618
624
|
type: z.ZodLiteral<"artifacts.upload.complete">;
|
|
619
625
|
messageId: z.ZodString;
|
|
620
626
|
jobId: z.ZodString;
|
|
621
627
|
name: z.ZodString;
|
|
622
|
-
sizeBytes: z.ZodNumber;
|
|
623
628
|
sha256: z.ZodString;
|
|
624
|
-
|
|
625
|
-
}, z.core.$strip>;
|
|
629
|
+
}, z.core.$strict>;
|
|
626
630
|
/**
|
|
627
631
|
* Outcome the orchestrator reports for an artifact commit: the DB row was
|
|
628
632
|
* written (`committed`) or the commit could not be completed (`failed`).
|
|
@@ -780,6 +784,16 @@ export declare const fleetLogsRequestSchema: z.ZodObject<{
|
|
|
780
784
|
logWindowHours: z.ZodNumber;
|
|
781
785
|
maxBytes: z.ZodNumber;
|
|
782
786
|
}, z.core.$strip>;
|
|
787
|
+
/**
|
|
788
|
+
* The orchestrator dropped the agent's last frame because the connection's
|
|
789
|
+
* rate limiter refused it. Sent instead of processing the frame; the agent
|
|
790
|
+
* should wait `retryAfterMs` before sending more. A sustained overrun closes
|
|
791
|
+
* the connection instead.
|
|
792
|
+
*/
|
|
793
|
+
export declare const rateLimitWarningSchema: z.ZodObject<{
|
|
794
|
+
type: z.ZodLiteral<"rate.limit.warning">;
|
|
795
|
+
retryAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
796
|
+
}, z.core.$strip>;
|
|
783
797
|
/** One base64 frame of an agent's mini-bundle ZIP. */
|
|
784
798
|
export declare const fleetBundleChunkSchema: z.ZodObject<{
|
|
785
799
|
type: z.ZodLiteral<"fleet.bundle.chunk">;
|
|
@@ -883,7 +897,6 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
883
897
|
maxLogSizeBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
884
898
|
concurrencyWaitTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
885
899
|
sourceTarUrl: z.ZodOptional<z.ZodString>;
|
|
886
|
-
sourceTarHash: z.ZodOptional<z.ZodString>;
|
|
887
900
|
sourceTarDigest: z.ZodOptional<z.ZodString>;
|
|
888
901
|
depsUrl: z.ZodOptional<z.ZodString>;
|
|
889
902
|
depsHash: z.ZodOptional<z.ZodString>;
|
|
@@ -1094,6 +1107,9 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
1094
1107
|
rejected: "rejected";
|
|
1095
1108
|
}>;
|
|
1096
1109
|
reason: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1111
|
+
type: z.ZodLiteral<"rate.limit.warning">;
|
|
1112
|
+
retryAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
1097
1113
|
}, z.core.$strip>], "type">;
|
|
1098
1114
|
/** All messages that flow from Agent to Orchestrator. */
|
|
1099
1115
|
export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1324,10 +1340,8 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
1324
1340
|
messageId: z.ZodString;
|
|
1325
1341
|
jobId: z.ZodString;
|
|
1326
1342
|
name: z.ZodString;
|
|
1327
|
-
sizeBytes: z.ZodNumber;
|
|
1328
1343
|
sha256: z.ZodString;
|
|
1329
|
-
|
|
1330
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1344
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1331
1345
|
type: z.ZodLiteral<"artifacts.download.request">;
|
|
1332
1346
|
messageId: z.ZodString;
|
|
1333
1347
|
jobId: z.ZodString;
|
|
@@ -1430,6 +1444,7 @@ export type ArtifactsDownloadRequest = z.infer<typeof artifactsDownloadRequestSc
|
|
|
1430
1444
|
export type ArtifactsDownloadResponse = z.infer<typeof artifactsDownloadResponseSchema>;
|
|
1431
1445
|
export type FleetLogsRequest = z.infer<typeof fleetLogsRequestSchema>;
|
|
1432
1446
|
export type FleetBundleChunk = z.infer<typeof fleetBundleChunkSchema>;
|
|
1447
|
+
export type RateLimitWarning = z.infer<typeof rateLimitWarningSchema>;
|
|
1433
1448
|
export type FleetBundleError = z.infer<typeof fleetBundleErrorSchema>;
|
|
1434
1449
|
export type ScalerClaimCredentials = z.infer<typeof scalerClaimCredentialsSchema>;
|
|
1435
1450
|
export type ScalerClaimCredentialsResponse = z.infer<typeof scalerClaimCredentialsResponseSchema>;
|
|
@@ -105,13 +105,6 @@ const jobDispatchSchema = z.object({
|
|
|
105
105
|
/** URL or file:// path to a pre-packed `.kici/` source tarball. If present, agent extracts it into workDir instead of cloning the repo. */
|
|
106
106
|
sourceTarUrl: z.string().optional(),
|
|
107
107
|
/**
|
|
108
|
-
* @deprecated Use `sourceTarDigest`. Despite its name this carries the
|
|
109
|
-
* workflow `contentHash`, not a hash of the tarball bytes, so an agent
|
|
110
|
-
* could not verify a restored tarball against it. Kept on the wire for
|
|
111
|
-
* older agents; removed at v1.0.0.
|
|
112
|
-
*/
|
|
113
|
-
sourceTarHash: z.string().optional(),
|
|
114
|
-
/**
|
|
115
108
|
* SHA-256 of the source tarball's own bytes, for integrity verification
|
|
116
109
|
* before extraction. The sibling of `depsHash`, which has always carried
|
|
117
110
|
* the dependency tarball's real digest.
|
|
@@ -772,31 +765,22 @@ const artifactsUploadResponseSchema = z.object({
|
|
|
772
765
|
*/
|
|
773
766
|
error: z.string().optional()
|
|
774
767
|
});
|
|
775
|
-
/**
|
|
768
|
+
/**
|
|
769
|
+
* Agent -> Orchestrator: confirm an artifact upload finished; records the DB row.
|
|
770
|
+
*
|
|
771
|
+
* The orchestrator derives the storage key from the server-resolved run and
|
|
772
|
+
* artifact name and reads the real object size back from storage, so the agent
|
|
773
|
+
* asserts neither. `.strict()`: an agent still echoing either is on a build the
|
|
774
|
+
* protocol floor refuses, and a stray field is a version-skew signal.
|
|
775
|
+
*/
|
|
776
776
|
const artifactsUploadCompleteSchema = z.object({
|
|
777
777
|
type: z.literal("artifacts.upload.complete"),
|
|
778
778
|
messageId: z.string(),
|
|
779
779
|
jobId: z.string(),
|
|
780
780
|
name: z.string(),
|
|
781
|
-
/**
|
|
782
|
-
* Packed tarball size in bytes.
|
|
783
|
-
*
|
|
784
|
-
* @deprecated Advisory only — the orchestrator reads the real object size back
|
|
785
|
-
* from storage and records that instead. Still sent for backward compatibility
|
|
786
|
-
* with older orchestrators; removed at v1.0.0.
|
|
787
|
-
*/
|
|
788
|
-
sizeBytes: z.number().int().nonnegative(),
|
|
789
781
|
/** SHA-256 (hex) of the tarball bytes. */
|
|
790
|
-
sha256: z.string()
|
|
791
|
-
|
|
792
|
-
* Storage key echoed from the grant response.
|
|
793
|
-
*
|
|
794
|
-
* @deprecated Ignored server-side — the orchestrator derives the storage key
|
|
795
|
-
* from the server-resolved run and artifact name. Still sent for backward
|
|
796
|
-
* compatibility with older orchestrators; removed at v1.0.0.
|
|
797
|
-
*/
|
|
798
|
-
storageKey: z.string()
|
|
799
|
-
});
|
|
782
|
+
sha256: z.string()
|
|
783
|
+
}).strict();
|
|
800
784
|
/**
|
|
801
785
|
* Outcome the orchestrator reports for an artifact commit: the DB row was
|
|
802
786
|
* written (`committed`) or the commit could not be completed (`failed`).
|
|
@@ -985,6 +969,17 @@ const fleetLogsRequestSchema = z.object({
|
|
|
985
969
|
/** Per-node cap on raw log bytes. */
|
|
986
970
|
maxBytes: z.number()
|
|
987
971
|
});
|
|
972
|
+
/**
|
|
973
|
+
* The orchestrator dropped the agent's last frame because the connection's
|
|
974
|
+
* rate limiter refused it. Sent instead of processing the frame; the agent
|
|
975
|
+
* should wait `retryAfterMs` before sending more. A sustained overrun closes
|
|
976
|
+
* the connection instead.
|
|
977
|
+
*/
|
|
978
|
+
const rateLimitWarningSchema = z.object({
|
|
979
|
+
type: z.literal("rate.limit.warning"),
|
|
980
|
+
/** Estimated wait until the limiter admits another frame of that size. */
|
|
981
|
+
retryAfterMs: z.number().optional()
|
|
982
|
+
});
|
|
988
983
|
/** One base64 frame of an agent's mini-bundle ZIP. */
|
|
989
984
|
const fleetBundleChunkSchema = z.object({
|
|
990
985
|
type: z.literal("fleet.bundle.chunk"),
|
|
@@ -1084,7 +1079,8 @@ const orchestratorToAgentMessageSchema = z.discriminatedUnion("type", [
|
|
|
1084
1079
|
agentAuthSuccessSchema,
|
|
1085
1080
|
agentAuthFailureSchema,
|
|
1086
1081
|
fleetLogsRequestSchema,
|
|
1087
|
-
stepApprovalResolvedSchema
|
|
1082
|
+
stepApprovalResolvedSchema,
|
|
1083
|
+
rateLimitWarningSchema
|
|
1088
1084
|
]);
|
|
1089
1085
|
/** All messages that flow from Agent to Orchestrator. */
|
|
1090
1086
|
const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
@@ -1120,6 +1116,6 @@ const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
|
1120
1116
|
stepApprovalRequestSchema
|
|
1121
1117
|
]);
|
|
1122
1118
|
//#endregion
|
|
1123
|
-
export { ArtifactCompleteAckOutcome, ArtifactDownloadOutcome, ArtifactRejectReason, ArtifactUploadOutcome, CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, artifactsDownloadRequestSchema, artifactsDownloadResponseSchema, artifactsUploadCompleteAckSchema, artifactsUploadCompleteSchema, artifactsUploadRequestSchema, artifactsUploadResponseSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, globalEvalCandidateResultSchema, globalEvalRoundResultSchema, invokeResultSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, scalerClaimCredentialsResponseSchema, scalerClaimCredentialsSchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema };
|
|
1119
|
+
export { ArtifactCompleteAckOutcome, ArtifactDownloadOutcome, ArtifactRejectReason, ArtifactUploadOutcome, CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, artifactsDownloadRequestSchema, artifactsDownloadResponseSchema, artifactsUploadCompleteAckSchema, artifactsUploadCompleteSchema, artifactsUploadRequestSchema, artifactsUploadResponseSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, globalEvalCandidateResultSchema, globalEvalRoundResultSchema, invokeResultSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, rateLimitWarningSchema, registerAckSchema, scalerClaimCredentialsResponseSchema, scalerClaimCredentialsSchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema };
|
|
1124
1120
|
|
|
1125
1121
|
//# sourceMappingURL=orchestrator-agent.js.map
|