@kici-dev/engine 0.14.2 → 0.16.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/approval/expiry-duration.d.ts +11 -0
- package/dist/approval/expiry-duration.js +29 -0
- package/dist/audit/access-log-policy.js +2 -0
- package/dist/audit/retention-policy.d.ts +1 -1
- package/dist/audit/retention-policy.js +5 -1
- package/dist/auth/permissions.d.ts +69 -0
- package/dist/auth/permissions.js +51 -0
- package/dist/context/hold-type.d.ts +0 -19
- package/dist/context/hold-type.js +1 -37
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +2 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +20 -15
- package/dist/labels.d.ts +2 -17
- package/dist/labels.js +3 -33
- package/dist/mcp/held-run-resolve.d.ts +2 -5
- package/dist/mcp/held-run-resolve.js +3 -4
- package/dist/metrics/metric-catalog.generated.d.ts +0 -5
- package/dist/metrics/metric-catalog.generated.js +0 -6
- package/dist/protocol/messages/access-log.d.ts +10 -0
- package/dist/protocol/messages/access-log.js +2 -0
- package/dist/protocol/messages/auth.d.ts +7 -8
- package/dist/protocol/messages/auth.js +12 -17
- package/dist/protocol/messages/browser.js +1 -1
- package/dist/protocol/messages/capabilities.d.ts +21 -100
- package/dist/protocol/messages/capabilities.js +22 -124
- package/dist/protocol/messages/dashboard.d.ts +64 -22
- package/dist/protocol/messages/dashboard.js +43 -40
- package/dist/protocol/messages/execution-status.d.ts +3 -3
- package/dist/protocol/messages/execution-status.js +7 -12
- package/dist/protocol/messages/join.d.ts +73 -2
- package/dist/protocol/messages/join.js +101 -12
- package/dist/protocol/messages/orchestrator-agent.d.ts +35 -40
- package/dist/protocol/messages/orchestrator-agent.js +63 -96
- package/dist/protocol/messages/peer.d.ts +278 -26
- package/dist/protocol/messages/peer.js +120 -65
- package/dist/protocol/messages/platform-orchestrator.d.ts +36 -141
- package/dist/protocol/messages/platform-orchestrator.js +24 -86
- package/dist/protocol/messages/source-registration.d.ts +0 -13
- package/dist/protocol/messages/source-registration.js +9 -10
- package/dist/protocol/version.d.ts +9 -15
- package/dist/protocol/version.js +9 -15
- package/dist/provenance/id-token-claim-names.d.ts +3 -5
- package/dist/provenance/id-token-claim-names.js +3 -5
- package/dist/status/presentation.d.ts +2 -14
- package/dist/status/presentation.js +3 -23
- package/dist/trigger/types.d.ts +125 -34
- package/dist/trigger/types.js +9 -24
- package/dist/util/date.d.ts +7 -0
- package/dist/util/date.js +14 -0
- package/dist/util/parse-duration.d.ts +6 -0
- package/dist/util/parse-duration.js +21 -0
- package/dist/util/sleep.d.ts +3 -0
- package/dist/util/sleep.js +10 -0
- package/dist/webhook/webhook-url-format.d.ts +2 -2
- package/dist/webhook/webhook-url-format.js +2 -2
- package/package.json +1 -1
- package/sbom.spdx.json +5 -5
|
@@ -269,8 +269,8 @@ const executionStatusSchema = z.object({
|
|
|
269
269
|
workflowName: z.string().max(128),
|
|
270
270
|
status: ExecutionRunStatus,
|
|
271
271
|
/**
|
|
272
|
-
* Routing key of the run's own source.
|
|
273
|
-
*
|
|
272
|
+
* Routing key of the run's own source. Absent for a run the orchestrator
|
|
273
|
+
* recorded no routing key for (the Platform then falls back to the WS
|
|
274
274
|
* connection's first routing key). Lets the Platform mirror attribute each
|
|
275
275
|
* run to its real source even when one orchestrator serves multiple sources.
|
|
276
276
|
*/
|
|
@@ -281,8 +281,7 @@ const executionStatusSchema = z.object({
|
|
|
281
281
|
* `repoIdentifier` — a global workflow authored in one repository and
|
|
282
282
|
* dispatched against another. Absent for every per-repository run, where the
|
|
283
283
|
* two are the same repository, so "present" is a precise marker for a
|
|
284
|
-
* cross-repository global run.
|
|
285
|
-
* older orchestrator that never sends it.
|
|
284
|
+
* cross-repository global run.
|
|
286
285
|
*/
|
|
287
286
|
workflowRepoIdentifier: z.string().max(256).optional(),
|
|
288
287
|
/**
|
|
@@ -292,8 +291,7 @@ const executionStatusSchema = z.object({
|
|
|
292
291
|
* The Platform mirrors it so its own re-run refusal can admit a round: a
|
|
293
292
|
* round is definitionally cross-repository, and re-running one re-evaluates
|
|
294
293
|
* the original event instead of resolving a workflow out of the acted-on
|
|
295
|
-
* repository's lock file. Absent means an ordinary run
|
|
296
|
-
* backward compatibility with an orchestrator that never sends it.
|
|
294
|
+
* repository's lock file. Absent means an ordinary run.
|
|
297
295
|
*/
|
|
298
296
|
isGlobalEvalRound: z.boolean().optional(),
|
|
299
297
|
/**
|
|
@@ -358,10 +356,8 @@ const executionStatusSchema = z.object({
|
|
|
358
356
|
* already dispatched reported in, and then continues). The Platform keeps a
|
|
359
357
|
* terminal status against a non-terminal frame unless the frame's generation
|
|
360
358
|
* is newer, so a frame that arrives late cannot move a finished run back.
|
|
361
|
-
* Optional for backward compatibility: an older orchestrator omits it, and the
|
|
362
|
-
* Platform then applies the frame unguarded.
|
|
363
359
|
*/
|
|
364
|
-
statusEpoch: statusEpochSchema
|
|
360
|
+
statusEpoch: statusEpochSchema
|
|
365
361
|
});
|
|
366
362
|
/** Per-step status forwarded from agent to Platform (real-time). */
|
|
367
363
|
const stepStatusForwardSchema = z.object({
|
|
@@ -413,8 +409,7 @@ const jobStatusForwardSchema = z.object({
|
|
|
413
409
|
initFailure: initFailureSchema.optional(),
|
|
414
410
|
/**
|
|
415
411
|
* Job kind. Absent means an ordinary `standard` job. `gate`/`proxy` mark an
|
|
416
|
-
* invoke gate and its per-run proxy children.
|
|
417
|
-
* peer ignores it.
|
|
412
|
+
* invoke gate and its per-run proxy children.
|
|
418
413
|
*/
|
|
419
414
|
jobKind: JobKind.optional(),
|
|
420
415
|
/** For a `proxy` job, the summoned run it mirrors. Additive/optional. */
|
|
@@ -459,7 +454,7 @@ const stateReplayRunSchema = z.object({
|
|
|
459
454
|
/** Why the run failed (`RunFailureClass`); only present for failed/cancelled runs. */
|
|
460
455
|
failureClass: RunFailureClass.optional(),
|
|
461
456
|
/** The run's status generation, with the same meaning as on `execution.status`. */
|
|
462
|
-
statusEpoch: statusEpochSchema
|
|
457
|
+
statusEpoch: statusEpochSchema,
|
|
463
458
|
jobs: z.array(z.object({
|
|
464
459
|
jobId: z.string().max(128),
|
|
465
460
|
jobName: z.string().max(128),
|
|
@@ -1,18 +1,89 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
2
|
+
export declare const JOIN_PROTOCOL_VERSION: 2;
|
|
3
|
+
/** `Upgrade` header value on the HTTP 426 that refuses a version-1 join. */
|
|
4
|
+
export declare const JOIN_PROTOCOL_UPGRADE_TOKEN = "kici-join-v2";
|
|
5
|
+
export declare const JOIN_PROTOCOL_V1_REMOVED_MESSAGE = "This kici-admin uses join protocol v1, which orchestrators no longer accept. Upgrade kici-admin, then run kici-admin join again.";
|
|
6
|
+
export declare const JOIN_PROTOCOL_UNSUPPORTED_MESSAGE = "The cluster's orchestrators predate join protocol v2. Upgrade them, then join again.";
|
|
7
|
+
export declare const LEGACY_JOINER_AUTH_MESSAGE = "This kici-admin cannot join through the Platform. Upgrade kici-admin, then run kici-admin join again.";
|
|
8
|
+
export declare const INVALID_JOIN_REQUEST_MESSAGE = "Invalid join request";
|
|
9
|
+
/** Why a join was refused. Every refusal on the Platform, the orchestrator and the HTTP route sets one. */
|
|
10
|
+
export declare const JoinErrorCode: z.ZodEnum<{
|
|
11
|
+
invalid_request: "invalid_request";
|
|
12
|
+
invalid_token: "invalid_token";
|
|
13
|
+
join_protocol_unsupported: "join_protocol_unsupported";
|
|
14
|
+
join_protocol_v1_removed: "join_protocol_v1_removed";
|
|
15
|
+
no_target: "no_target";
|
|
16
|
+
org_mismatch: "org_mismatch";
|
|
17
|
+
relay_timeout: "relay_timeout";
|
|
18
|
+
token_already_used: "token_already_used";
|
|
19
|
+
token_expired: "token_expired";
|
|
20
|
+
}>;
|
|
21
|
+
export type JoinErrorCode = z.infer<typeof JoinErrorCode>;
|
|
22
|
+
export declare const JoinRequestKind: z.ZodEnum<{
|
|
23
|
+
invalid: "invalid";
|
|
24
|
+
v1_removed: "v1_removed";
|
|
25
|
+
v2: "v2";
|
|
26
|
+
}>;
|
|
27
|
+
export type JoinRequestKind = z.infer<typeof JoinRequestKind>;
|
|
28
|
+
/** The decoded routing part of a join token. A lookup key only: the orchestrator trusts its stored row. */
|
|
29
|
+
export declare const joinRoutingSchema: z.ZodObject<{
|
|
30
|
+
orgId: z.ZodString;
|
|
31
|
+
routingKey: z.ZodString;
|
|
32
|
+
expiry: z.ZodNumber;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
|
+
export type JoinRouting = z.infer<typeof joinRoutingSchema>;
|
|
35
|
+
/** Join request sent by a new orchestrator (through the Platform relay or directly to a peer). */
|
|
3
36
|
export declare const joinRequestSchema: z.ZodObject<{
|
|
4
37
|
type: z.ZodLiteral<"join.request">;
|
|
5
38
|
messageId: z.ZodOptional<z.ZodString>;
|
|
6
|
-
|
|
39
|
+
joinProtocol: z.ZodLiteral<2>;
|
|
40
|
+
routing: z.ZodString;
|
|
41
|
+
joinerPublicKey: z.ZodString;
|
|
42
|
+
joinerNonce: z.ZodString;
|
|
43
|
+
joinerProof: z.ZodString;
|
|
7
44
|
}, z.core.$strip>;
|
|
8
45
|
/** Join response from an existing orchestrator back to the joiner. */
|
|
9
46
|
export declare const joinResponseSchema: z.ZodObject<{
|
|
10
47
|
type: z.ZodLiteral<"join.response">;
|
|
11
48
|
messageId: z.ZodOptional<z.ZodString>;
|
|
12
49
|
success: z.ZodBoolean;
|
|
50
|
+
joinProtocol: z.ZodOptional<z.ZodLiteral<2>>;
|
|
51
|
+
serverPublicKey: z.ZodOptional<z.ZodString>;
|
|
52
|
+
serverNonce: z.ZodOptional<z.ZodString>;
|
|
53
|
+
serverProof: z.ZodOptional<z.ZodString>;
|
|
13
54
|
encryptedBundle: z.ZodOptional<z.ZodString>;
|
|
14
55
|
error: z.ZodOptional<z.ZodString>;
|
|
56
|
+
errorCode: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
invalid_request: "invalid_request";
|
|
58
|
+
invalid_token: "invalid_token";
|
|
59
|
+
join_protocol_unsupported: "join_protocol_unsupported";
|
|
60
|
+
join_protocol_v1_removed: "join_protocol_v1_removed";
|
|
61
|
+
no_target: "no_target";
|
|
62
|
+
org_mismatch: "org_mismatch";
|
|
63
|
+
relay_timeout: "relay_timeout";
|
|
64
|
+
token_already_used: "token_already_used";
|
|
65
|
+
token_expired: "token_expired";
|
|
66
|
+
}>>;
|
|
15
67
|
}, z.core.$strip>;
|
|
16
68
|
export type JoinRequest = z.infer<typeof joinRequestSchema>;
|
|
17
69
|
export type JoinResponse = z.infer<typeof joinResponseSchema>;
|
|
70
|
+
export type ClassifiedJoinRequest = {
|
|
71
|
+
kind: typeof JoinRequestKind.enum.v2;
|
|
72
|
+
request: JoinRequest;
|
|
73
|
+
} | {
|
|
74
|
+
kind: typeof JoinRequestKind.enum.v1_removed;
|
|
75
|
+
messageId?: string;
|
|
76
|
+
} | {
|
|
77
|
+
kind: typeof JoinRequestKind.enum.invalid;
|
|
78
|
+
messageId?: string;
|
|
79
|
+
};
|
|
80
|
+
/** True for an object whose `type` is `join.request`, whatever else it carries. */
|
|
81
|
+
export declare function isJoinRequestFrame(raw: unknown): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Classify a join.request frame. A frame that carries `token` is version 1 even when
|
|
84
|
+
* v2 fields are present too: it is checked before the parse, which would strip it.
|
|
85
|
+
*/
|
|
86
|
+
export declare function classifyJoinRequest(raw: unknown): ClassifiedJoinRequest;
|
|
87
|
+
/** A refused join.response carrying its error code. */
|
|
88
|
+
export declare function buildJoinRefusal(messageId: string | undefined, errorCode: JoinErrorCode, error: string): JoinResponse;
|
|
18
89
|
//# sourceMappingURL=join.d.ts.map
|
|
@@ -1,28 +1,117 @@
|
|
|
1
1
|
import "../../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/protocol/messages/join.ts
|
|
4
|
-
|
|
4
|
+
const JOIN_PROTOCOL_VERSION = 2;
|
|
5
|
+
/** `Upgrade` header value on the HTTP 426 that refuses a version-1 join. */
|
|
6
|
+
const JOIN_PROTOCOL_UPGRADE_TOKEN = "kici-join-v2";
|
|
7
|
+
const JOIN_PROTOCOL_V1_REMOVED_MESSAGE = "This kici-admin uses join protocol v1, which orchestrators no longer accept. Upgrade kici-admin, then run kici-admin join again.";
|
|
8
|
+
const JOIN_PROTOCOL_UNSUPPORTED_MESSAGE = "The cluster's orchestrators predate join protocol v2. Upgrade them, then join again.";
|
|
9
|
+
const LEGACY_JOINER_AUTH_MESSAGE = "This kici-admin cannot join through the Platform. Upgrade kici-admin, then run kici-admin join again.";
|
|
10
|
+
const INVALID_JOIN_REQUEST_MESSAGE = "Invalid join request";
|
|
11
|
+
const BASE64URL = /^[A-Za-z0-9_-]+$/;
|
|
12
|
+
const BASE64 = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
13
|
+
const HEX_PROOF = /^[0-9a-f]{64}$/;
|
|
14
|
+
const MAX_MESSAGE_ID = 256;
|
|
15
|
+
/** Why a join was refused. Every refusal on the Platform, the orchestrator and the HTTP route sets one. */
|
|
16
|
+
const JoinErrorCode = z.enum([
|
|
17
|
+
"join_protocol_v1_removed",
|
|
18
|
+
"join_protocol_unsupported",
|
|
19
|
+
"invalid_request",
|
|
20
|
+
"invalid_token",
|
|
21
|
+
"token_expired",
|
|
22
|
+
"token_already_used",
|
|
23
|
+
"org_mismatch",
|
|
24
|
+
"no_target",
|
|
25
|
+
"relay_timeout"
|
|
26
|
+
]);
|
|
27
|
+
const JoinRequestKind = z.enum([
|
|
28
|
+
"v2",
|
|
29
|
+
"v1_removed",
|
|
30
|
+
"invalid"
|
|
31
|
+
]);
|
|
32
|
+
/** The decoded routing part of a join token. A lookup key only: the orchestrator trusts its stored row. */
|
|
33
|
+
const joinRoutingSchema = z.object({
|
|
34
|
+
orgId: z.string().min(1),
|
|
35
|
+
routingKey: z.string().min(1),
|
|
36
|
+
expiry: z.number().finite()
|
|
37
|
+
}).passthrough();
|
|
38
|
+
/** Join request sent by a new orchestrator (through the Platform relay or directly to a peer). */
|
|
5
39
|
const joinRequestSchema = z.object({
|
|
6
40
|
type: z.literal("join.request"),
|
|
7
|
-
/** Correlation ID
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
41
|
+
/** Correlation ID the Platform injects on relay to route the response back. */
|
|
42
|
+
messageId: z.string().max(MAX_MESSAGE_ID).optional(),
|
|
43
|
+
joinProtocol: z.literal(2),
|
|
44
|
+
/** The token's base64url routing part, exactly as it appears in the token. */
|
|
45
|
+
routing: z.string().max(2048).regex(BASE64URL),
|
|
46
|
+
/** The joiner's one-time X25519 public key, DER SPKI, base64. */
|
|
47
|
+
joinerPublicKey: z.string().max(128).regex(BASE64),
|
|
48
|
+
/** 32 random bytes, base64. */
|
|
49
|
+
joinerNonce: z.string().max(64).regex(BASE64),
|
|
50
|
+
/** HMAC-SHA256 over the request transcript, lowercase hex. */
|
|
51
|
+
joinerProof: z.string().regex(HEX_PROOF)
|
|
13
52
|
});
|
|
14
53
|
/** Join response from an existing orchestrator back to the joiner. */
|
|
15
54
|
const joinResponseSchema = z.object({
|
|
16
55
|
type: z.literal("join.response"),
|
|
17
56
|
/** Correlation ID echoed from join.request for Platform relay routing. */
|
|
18
|
-
messageId: z.string().optional(),
|
|
57
|
+
messageId: z.string().max(MAX_MESSAGE_ID).optional(),
|
|
19
58
|
success: z.boolean(),
|
|
20
|
-
|
|
59
|
+
joinProtocol: z.literal(2).optional(),
|
|
60
|
+
/** The existing orchestrator's one-time X25519 public key, DER SPKI, base64. */
|
|
61
|
+
serverPublicKey: z.string().max(128).regex(BASE64).optional(),
|
|
62
|
+
/** 32 random bytes, base64. */
|
|
63
|
+
serverNonce: z.string().max(64).regex(BASE64).optional(),
|
|
64
|
+
/** HMAC-SHA256 over the response transcript, lowercase hex. */
|
|
65
|
+
serverProof: z.string().regex(HEX_PROOF).optional(),
|
|
66
|
+
/** Base64 AES-256-GCM sealed configuration bundle (on success). */
|
|
21
67
|
encryptedBundle: z.string().optional(),
|
|
22
|
-
/** Error message (
|
|
23
|
-
error: z.string().optional()
|
|
68
|
+
/** Error message (on failure). */
|
|
69
|
+
error: z.string().optional(),
|
|
70
|
+
errorCode: JoinErrorCode.optional()
|
|
24
71
|
});
|
|
72
|
+
function isRecord(raw) {
|
|
73
|
+
return typeof raw === "object" && raw !== null && !Array.isArray(raw);
|
|
74
|
+
}
|
|
75
|
+
function messageIdOf(raw) {
|
|
76
|
+
if (!isRecord(raw)) return void 0;
|
|
77
|
+
const id = raw.messageId;
|
|
78
|
+
return typeof id === "string" && id.length <= MAX_MESSAGE_ID ? id : void 0;
|
|
79
|
+
}
|
|
80
|
+
/** True for an object whose `type` is `join.request`, whatever else it carries. */
|
|
81
|
+
function isJoinRequestFrame(raw) {
|
|
82
|
+
return isRecord(raw) && raw.type === "join.request";
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Classify a join.request frame. A frame that carries `token` is version 1 even when
|
|
86
|
+
* v2 fields are present too: it is checked before the parse, which would strip it.
|
|
87
|
+
*/
|
|
88
|
+
function classifyJoinRequest(raw) {
|
|
89
|
+
const messageId = messageIdOf(raw);
|
|
90
|
+
if (isJoinRequestFrame(raw) && Object.prototype.hasOwnProperty.call(raw, "token")) return {
|
|
91
|
+
kind: JoinRequestKind.enum.v1_removed,
|
|
92
|
+
messageId
|
|
93
|
+
};
|
|
94
|
+
const parsed = joinRequestSchema.safeParse(raw);
|
|
95
|
+
if (parsed.success) return {
|
|
96
|
+
kind: JoinRequestKind.enum.v2,
|
|
97
|
+
request: parsed.data
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
kind: JoinRequestKind.enum.invalid,
|
|
101
|
+
messageId
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** A refused join.response carrying its error code. */
|
|
105
|
+
function buildJoinRefusal(messageId, errorCode, error) {
|
|
106
|
+
return {
|
|
107
|
+
type: "join.response",
|
|
108
|
+
messageId,
|
|
109
|
+
success: false,
|
|
110
|
+
errorCode,
|
|
111
|
+
error
|
|
112
|
+
};
|
|
113
|
+
}
|
|
25
114
|
//#endregion
|
|
26
|
-
export { joinRequestSchema, joinResponseSchema };
|
|
115
|
+
export { INVALID_JOIN_REQUEST_MESSAGE, JOIN_PROTOCOL_UNSUPPORTED_MESSAGE, JOIN_PROTOCOL_UPGRADE_TOKEN, JOIN_PROTOCOL_V1_REMOVED_MESSAGE, JOIN_PROTOCOL_VERSION, JoinErrorCode, JoinRequestKind, LEGACY_JOINER_AUTH_MESSAGE, buildJoinRefusal, classifyJoinRequest, isJoinRequestFrame, joinRequestSchema, joinResponseSchema, joinRoutingSchema };
|
|
27
116
|
|
|
28
117
|
//# sourceMappingURL=join.js.map
|
|
@@ -102,7 +102,6 @@ export declare const jobDispatchSchema: z.ZodObject<{
|
|
|
102
102
|
lockFileUrl: z.ZodString;
|
|
103
103
|
jobConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
104
104
|
timestamp: z.ZodNumber;
|
|
105
|
-
token: z.ZodOptional<z.ZodString>;
|
|
106
105
|
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
107
106
|
namespacedSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
108
107
|
maxLogSizeBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -210,9 +209,7 @@ export declare const registerAckSchema: z.ZodObject<{
|
|
|
210
209
|
scalerManaged: z.ZodDefault<z.ZodBoolean>;
|
|
211
210
|
pendingDispatch: z.ZodOptional<z.ZodBoolean>;
|
|
212
211
|
warmPool: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
-
capabilities: z.ZodOptional<z.ZodObject<{
|
|
214
|
-
artifactCompleteAck: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
-
}, z.core.$loose>>;
|
|
212
|
+
capabilities: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
216
213
|
}, z.core.$strip>;
|
|
217
214
|
/** Agent registration with capabilities and capacity. */
|
|
218
215
|
export declare const agentRegisterSchema: z.ZodObject<{
|
|
@@ -237,9 +234,7 @@ export declare const agentRegisterSchema: z.ZodObject<{
|
|
|
237
234
|
runningAsUser: z.ZodOptional<z.ZodString>;
|
|
238
235
|
runningAsUid: z.ZodOptional<z.ZodNumber>;
|
|
239
236
|
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
240
|
-
capabilities: z.ZodOptional<z.ZodObject<{
|
|
241
|
-
globalEvalSkipsResultAwareGenerators: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
-
}, z.core.$loose>>;
|
|
237
|
+
capabilities: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
243
238
|
}, z.core.$strip>;
|
|
244
239
|
/** Periodic agent status update. */
|
|
245
240
|
export declare const agentStatusSchema: z.ZodObject<{
|
|
@@ -291,8 +286,8 @@ export declare const jobStatusSchema: z.ZodObject<{
|
|
|
291
286
|
* `LockJob` interface in `trigger/types.ts`, and a hand-written Zod copy would
|
|
292
287
|
* drift and start rejecting legitimate generated jobs.
|
|
293
288
|
*
|
|
294
|
-
* Every field beyond the verdict itself is `.optional()
|
|
295
|
-
*
|
|
289
|
+
* Every field beyond the verdict itself is `.optional()`: an undecided or
|
|
290
|
+
* job-less verdict omits them.
|
|
296
291
|
*/
|
|
297
292
|
export declare const globalEvalCandidateResultSchema: z.ZodObject<{
|
|
298
293
|
workflowName: z.ZodString;
|
|
@@ -387,10 +382,10 @@ export declare const agentLogChunkSchema: z.ZodObject<{
|
|
|
387
382
|
stepIndex: z.ZodNumber;
|
|
388
383
|
lines: z.ZodArray<z.ZodString>;
|
|
389
384
|
timestamp: z.ZodNumber;
|
|
390
|
-
stream: z.
|
|
385
|
+
stream: z.ZodEnum<{
|
|
391
386
|
stderr: "stderr";
|
|
392
387
|
stdout: "stdout";
|
|
393
|
-
}
|
|
388
|
+
}>;
|
|
394
389
|
}, z.core.$strip>;
|
|
395
390
|
/** Step-level execution state report (agent -> orchestrator). */
|
|
396
391
|
export declare const agentStepStatusSchema: z.ZodObject<{
|
|
@@ -640,9 +635,7 @@ export declare const ArtifactCompleteAckOutcome: z.ZodEnum<{
|
|
|
640
635
|
export type ArtifactCompleteAckOutcome = z.infer<typeof ArtifactCompleteAckOutcome>;
|
|
641
636
|
/**
|
|
642
637
|
* Orchestrator -> Agent: the outcome of committing an
|
|
643
|
-
* `artifacts.upload.complete`.
|
|
644
|
-
* `artifactCompleteAck` capability on `register.ack`; the agent awaits it and
|
|
645
|
-
* fails the workflow step on `failed`/timeout, so a lost commit surfaces as a
|
|
638
|
+
* `artifacts.upload.complete`. The agent awaits it and fails the workflow step on `failed`/timeout, so a lost commit surfaces as a
|
|
646
639
|
* failed step instead of a green run with a missing artifact. `requestId`
|
|
647
640
|
* echoes the complete message's `messageId`.
|
|
648
641
|
*/
|
|
@@ -702,8 +695,7 @@ export declare const eventEmitResponseSchema: z.ZodObject<{
|
|
|
702
695
|
* A provisioned agent normally sends this itself to self-bootstrap — the claim
|
|
703
696
|
* code is the authorization, so it may send it before it authenticates or
|
|
704
697
|
* registers. A provisioning workflow can also send it to obtain the token
|
|
705
|
-
* directly.
|
|
706
|
-
* are unaffected, so it needs no `PROTOCOL_VERSION` bump of its own.
|
|
698
|
+
* directly.
|
|
707
699
|
*/
|
|
708
700
|
export declare const scalerClaimCredentialsSchema: z.ZodObject<{
|
|
709
701
|
type: z.ZodLiteral<"scaler.claim-credentials">;
|
|
@@ -900,7 +892,6 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
900
892
|
lockFileUrl: z.ZodString;
|
|
901
893
|
jobConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
902
894
|
timestamp: z.ZodNumber;
|
|
903
|
-
token: z.ZodOptional<z.ZodString>;
|
|
904
895
|
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
905
896
|
namespacedSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
906
897
|
maxLogSizeBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -1004,9 +995,7 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
1004
995
|
scalerManaged: z.ZodDefault<z.ZodBoolean>;
|
|
1005
996
|
pendingDispatch: z.ZodOptional<z.ZodBoolean>;
|
|
1006
997
|
warmPool: z.ZodOptional<z.ZodBoolean>;
|
|
1007
|
-
capabilities: z.ZodOptional<z.ZodObject<{
|
|
1008
|
-
artifactCompleteAck: z.ZodOptional<z.ZodBoolean>;
|
|
1009
|
-
}, z.core.$loose>>;
|
|
998
|
+
capabilities: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1010
999
|
}, z.core.$strip>, z.ZodObject<{
|
|
1011
1000
|
type: z.ZodLiteral<"job.concurrency.ack">;
|
|
1012
1001
|
requestId: z.ZodString;
|
|
@@ -1143,9 +1132,7 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
1143
1132
|
runningAsUser: z.ZodOptional<z.ZodString>;
|
|
1144
1133
|
runningAsUid: z.ZodOptional<z.ZodNumber>;
|
|
1145
1134
|
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1146
|
-
capabilities: z.ZodOptional<z.ZodObject<{
|
|
1147
|
-
globalEvalSkipsResultAwareGenerators: z.ZodOptional<z.ZodBoolean>;
|
|
1148
|
-
}, z.core.$loose>>;
|
|
1135
|
+
capabilities: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1149
1136
|
}, z.core.$strip>, z.ZodObject<{
|
|
1150
1137
|
type: z.ZodLiteral<"agent.status">;
|
|
1151
1138
|
messageId: z.ZodString;
|
|
@@ -1204,10 +1191,10 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
1204
1191
|
stepIndex: z.ZodNumber;
|
|
1205
1192
|
lines: z.ZodArray<z.ZodString>;
|
|
1206
1193
|
timestamp: z.ZodNumber;
|
|
1207
|
-
stream: z.
|
|
1194
|
+
stream: z.ZodEnum<{
|
|
1208
1195
|
stderr: "stderr";
|
|
1209
1196
|
stdout: "stdout";
|
|
1210
|
-
}
|
|
1197
|
+
}>;
|
|
1211
1198
|
}, z.core.$strip>, z.ZodObject<{
|
|
1212
1199
|
type: z.ZodLiteral<"step.status">;
|
|
1213
1200
|
messageId: z.ZodString;
|
|
@@ -1263,37 +1250,45 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
1263
1250
|
type: z.ZodLiteral<"config.ack">;
|
|
1264
1251
|
messageId: z.ZodString;
|
|
1265
1252
|
agentId: z.ZodString;
|
|
1266
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1253
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1267
1254
|
type: z.ZodLiteral<"cache.upload.request">;
|
|
1268
1255
|
messageId: z.ZodString;
|
|
1269
1256
|
jobId: z.ZodString;
|
|
1270
|
-
cacheType: z.
|
|
1271
|
-
deps: "deps";
|
|
1272
|
-
source: "source";
|
|
1273
|
-
}>;
|
|
1257
|
+
cacheType: z.ZodLiteral<"source">;
|
|
1274
1258
|
contentHash: z.ZodOptional<z.ZodString>;
|
|
1259
|
+
platform: z.ZodString;
|
|
1260
|
+
arch: z.ZodString;
|
|
1261
|
+
sourceTarDigest: z.ZodString;
|
|
1262
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1263
|
+
type: z.ZodLiteral<"cache.upload.request">;
|
|
1264
|
+
messageId: z.ZodString;
|
|
1265
|
+
jobId: z.ZodString;
|
|
1266
|
+
cacheType: z.ZodLiteral<"deps">;
|
|
1275
1267
|
lockfileHash: z.ZodOptional<z.ZodString>;
|
|
1276
1268
|
platform: z.ZodString;
|
|
1277
1269
|
arch: z.ZodString;
|
|
1278
|
-
depsHash: z.
|
|
1279
|
-
sourceTarDigest: z.ZodOptional<z.ZodString>;
|
|
1270
|
+
depsHash: z.ZodString;
|
|
1280
1271
|
siblingsDigest: z.ZodOptional<z.ZodString>;
|
|
1281
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1272
|
+
}, z.core.$strip>], "cacheType">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1282
1273
|
type: z.ZodLiteral<"cache.upload.complete">;
|
|
1283
1274
|
messageId: z.ZodString;
|
|
1284
1275
|
jobId: z.ZodString;
|
|
1285
|
-
cacheType: z.
|
|
1286
|
-
deps: "deps";
|
|
1287
|
-
source: "source";
|
|
1288
|
-
}>;
|
|
1276
|
+
cacheType: z.ZodLiteral<"source">;
|
|
1289
1277
|
contentHash: z.ZodOptional<z.ZodString>;
|
|
1278
|
+
platform: z.ZodString;
|
|
1279
|
+
arch: z.ZodString;
|
|
1280
|
+
sourceTarDigest: z.ZodString;
|
|
1281
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1282
|
+
type: z.ZodLiteral<"cache.upload.complete">;
|
|
1283
|
+
messageId: z.ZodString;
|
|
1284
|
+
jobId: z.ZodString;
|
|
1285
|
+
cacheType: z.ZodLiteral<"deps">;
|
|
1290
1286
|
lockfileHash: z.ZodOptional<z.ZodString>;
|
|
1291
1287
|
platform: z.ZodString;
|
|
1292
1288
|
arch: z.ZodString;
|
|
1293
|
-
depsHash: z.
|
|
1294
|
-
sourceTarDigest: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
depsHash: z.ZodString;
|
|
1295
1290
|
siblingsDigest: z.ZodOptional<z.ZodString>;
|
|
1296
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1291
|
+
}, z.core.$strip>], "cacheType">, z.ZodObject<{
|
|
1297
1292
|
type: z.ZodLiteral<"cache.user.restore.request">;
|
|
1298
1293
|
messageId: z.ZodString;
|
|
1299
1294
|
jobId: z.ZodString;
|