@kici-dev/engine 0.15.0 → 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 +18 -13
- 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 -10
- package/dist/protocol/messages/auth.js +8 -22
- package/dist/protocol/messages/browser.js +1 -1
- package/dist/protocol/messages/capabilities.d.ts +21 -106
- package/dist/protocol/messages/capabilities.js +23 -133
- package/dist/protocol/messages/dashboard.d.ts +24 -28
- package/dist/protocol/messages/dashboard.js +19 -38
- package/dist/protocol/messages/execution-status.d.ts +3 -3
- package/dist/protocol/messages/execution-status.js +7 -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 +223 -18
- package/dist/protocol/messages/peer.js +90 -55
- package/dist/protocol/messages/platform-orchestrator.d.ts +36 -145
- 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/package.json +1 -1
- package/sbom.spdx.json +5 -5
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import "../../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { dashboardWritePolicyMap } from "../dashboard-write-operations.js";
|
|
3
3
|
import { dashboardEncryptionJwkSchema } from "./dashboard-sealed-write.js";
|
|
4
|
-
import { DASHBOARD_REQUEST_TYPES } from "./dashboard.js";
|
|
5
4
|
import { z } from "zod";
|
|
6
5
|
//#region src/protocol/messages/capabilities.ts
|
|
7
6
|
/**
|
|
8
|
-
* Capability
|
|
7
|
+
* Capability schemas — bidirectional.
|
|
9
8
|
*
|
|
10
9
|
* Modeled after peerCapabilitiesSchema in peer.ts.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* the Platform pre-flight-checks orchestrator capabilities before sending
|
|
16
|
-
* feature-gated messages (e.g. the dashboard-request manifest).
|
|
11
|
+
* - **orchestrator → Platform** (`orchCapabilitiesSchema`, sent in `auth.request`
|
|
12
|
+
* and rebroadcast as `orch.capabilities.update`): the orchestrator's role and
|
|
13
|
+
* the dashboard settings the Platform caches per org.
|
|
17
14
|
* - **Platform → orchestrator** (`platformCapabilitiesSchema`, advertised once
|
|
18
|
-
* after auth)
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
15
|
+
* after auth), **orchestrator → agent** (`orchAgentCapabilitiesSchema`, on
|
|
16
|
+
* `register.ack`) and **agent → orchestrator** (`agentCapabilitiesSchema`, on
|
|
17
|
+
* `agent.register`): each defines no flag at protocol 4 and is advertised
|
|
18
|
+
* empty. A later release adds a flag to one of them without a protocol bump.
|
|
22
19
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* compatibility; `.passthrough()` preserves unknown flags from a newer peer.
|
|
26
|
-
* A peer that never advertises at all is treated as "unknown" (optimistic),
|
|
27
|
-
* never as "supports nothing".
|
|
20
|
+
* Every schema uses `.passthrough()`, so a newer peer's unknown fields are
|
|
21
|
+
* preserved rather than stripped.
|
|
28
22
|
*/
|
|
29
23
|
/** Orchestrator role in a cluster topology. */
|
|
30
24
|
const OrchRole = z.enum(["coordinator", "worker"]);
|
|
@@ -34,7 +28,7 @@ const OrchRole = z.enum(["coordinator", "worker"]);
|
|
|
34
28
|
*/
|
|
35
29
|
const orchCapabilitiesSchema = z.object({
|
|
36
30
|
/** Orchestrator's role in the cluster (coordinator manages DB/vault, worker is stateless). */
|
|
37
|
-
orchRole: OrchRole
|
|
31
|
+
orchRole: OrchRole,
|
|
38
32
|
/**
|
|
39
33
|
* Per-operation dashboard-write policy. Sparse map where each
|
|
40
34
|
* present key flips one `DashboardWriteOperation` to false. Missing
|
|
@@ -45,15 +39,6 @@ const orchCapabilitiesSchema = z.object({
|
|
|
45
39
|
*/
|
|
46
40
|
dashboardWrites: dashboardWritePolicyMap.optional(),
|
|
47
41
|
/**
|
|
48
|
-
* Every `dashboard.*` request type this orchestrator build understands.
|
|
49
|
-
* The Platform pre-flight-checks an incoming dashboard request against this
|
|
50
|
-
* set and refuses (with a precise "upgrade orchestrator" error) when the
|
|
51
|
-
* type is absent. Derived from the orchestrator's own protocol schema, so it
|
|
52
|
-
* cannot drift. Absent on pre-capability builds → treated as "unknown",
|
|
53
|
-
* never as "supports nothing".
|
|
54
|
-
*/
|
|
55
|
-
supportedDashboardRequests: z.array(z.string()).optional(),
|
|
56
|
-
/**
|
|
57
42
|
* The orchestrator's active X25519 dashboard-encryption public key. Feeds
|
|
58
43
|
* the Convenient tier: the key reaches the hosted control plane over the
|
|
59
44
|
* authenticated orchestrator connection, and the dashboard fetches it from
|
|
@@ -68,118 +53,23 @@ const orchCapabilitiesSchema = z.object({
|
|
|
68
53
|
* `dashboard_verified_issuer` cluster setting. Null/absent ⇒ the Verified
|
|
69
54
|
* tier is not offered and the Convenient tier applies.
|
|
70
55
|
*/
|
|
71
|
-
dashboardVerifiedIssuer: z.string().nullable().optional()
|
|
72
|
-
/**
|
|
73
|
-
* The orchestrator answers join protocol v2 `join.request` frames. The Platform
|
|
74
|
-
* relays a join only to an orchestrator that advertises this, because an older
|
|
75
|
-
* build drops a v2 frame without a reply.
|
|
76
|
-
*/
|
|
77
|
-
clusterJoinV2: z.boolean().optional()
|
|
56
|
+
dashboardVerifiedIssuer: z.string().nullable().optional()
|
|
78
57
|
}).passthrough();
|
|
79
58
|
/** Default orchestrator capabilities sent in auth.request. */
|
|
80
|
-
const ORCH_CAPABILITIES = Object.freeze({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
/**
|
|
85
|
-
* Check whether an orchestrator advertises a specific capability flag.
|
|
86
|
-
*
|
|
87
|
-
* Takes `string` (not `keyof`) because newer versions may have flags the current code
|
|
88
|
-
* doesn't know about. Returns false if capabilities is undefined (pre-capability
|
|
89
|
-
* orchestrator) or the flag is missing/false.
|
|
90
|
-
*/
|
|
91
|
-
function hasOrchCapability(capabilities, flag) {
|
|
92
|
-
return capabilities?.[flag] === true;
|
|
93
|
-
}
|
|
94
|
-
/** Flag names of {@link orchCapabilitiesSchema}, for {@link hasOrchCapability} lookups. */
|
|
95
|
-
const OrchCapabilityFlag = z.enum(["clusterJoinV2"]);
|
|
96
|
-
/**
|
|
97
|
-
* Platform-advertised capabilities sent to the orchestrator after auth.
|
|
98
|
-
* Uses .passthrough() so a newer Platform's unknown flags are preserved.
|
|
99
|
-
* Every field is optional and absent = unsupported (same evolution contract as
|
|
100
|
-
* `orchCapabilitiesSchema`).
|
|
101
|
-
*/
|
|
102
|
-
const platformCapabilitiesSchema = z.object({
|
|
103
|
-
/** Platform ingests periodic `orch.metrics` telemetry pushes. */
|
|
104
|
-
orchMetrics: z.boolean().optional() }).passthrough();
|
|
59
|
+
const ORCH_CAPABILITIES = Object.freeze({ orchRole: OrchRole.enum.coordinator });
|
|
60
|
+
/** Platform-advertised capabilities sent to the orchestrator after auth. */
|
|
61
|
+
const platformCapabilitiesSchema = z.object({}).passthrough();
|
|
105
62
|
/** Default Platform capabilities advertised to the orchestrator after auth. */
|
|
106
|
-
const PLATFORM_CAPABILITIES = Object.freeze({
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
*
|
|
110
|
-
* Takes `string` (not `keyof`) because a newer Platform may advertise flags the
|
|
111
|
-
* current orchestrator build doesn't know about. Returns false if capabilities
|
|
112
|
-
* is undefined (nothing advertised yet) or the flag is missing/false.
|
|
113
|
-
*
|
|
114
|
-
* NOTE: "undefined → false" here is the plain reader semantics. A feature-gated
|
|
115
|
-
* SEND that must stay backward-safe against a pre-capability Platform (which
|
|
116
|
-
* never advertises) treats "nothing advertised yet" as optimistic-send — that
|
|
117
|
-
* layer lives in the orchestrator's `sendIfPlatformSupports`, not here.
|
|
118
|
-
*/
|
|
119
|
-
function hasPlatformCapability(capabilities, flag) {
|
|
120
|
-
return capabilities?.[flag] === true;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Orchestrator -> Agent capabilities, advertised on `register.ack`. Same
|
|
124
|
-
* evolution contract as the other two directions: every field optional,
|
|
125
|
-
* absent = unsupported, `.passthrough()` preserves a newer orchestrator's
|
|
126
|
-
* unknown flags. Lets the agent learn which optional agent-facing protocol
|
|
127
|
-
* features this orchestrator build supports.
|
|
128
|
-
*/
|
|
129
|
-
const orchAgentCapabilitiesSchema = z.object({
|
|
130
|
-
/**
|
|
131
|
-
* Orchestrator acks `artifacts.upload.complete` (with committed|failed) so
|
|
132
|
-
* the agent can fail the workflow step on a lost commit instead of losing
|
|
133
|
-
* the artifact silently. Absent -> agent stays fire-and-forget.
|
|
134
|
-
*/
|
|
135
|
-
artifactCompleteAck: z.boolean().optional() }).passthrough();
|
|
63
|
+
const PLATFORM_CAPABILITIES = Object.freeze({});
|
|
64
|
+
/** Orchestrator -> agent capabilities, advertised on `register.ack`. */
|
|
65
|
+
const orchAgentCapabilitiesSchema = z.object({}).passthrough();
|
|
136
66
|
/** Default orchestrator -> agent capabilities advertised on register.ack. */
|
|
137
|
-
const ORCH_AGENT_CAPABILITIES = Object.freeze({
|
|
138
|
-
/**
|
|
139
|
-
|
|
140
|
-
* flag.
|
|
141
|
-
*
|
|
142
|
-
* Takes `string` (not `keyof`) because a newer orchestrator may advertise flags
|
|
143
|
-
* this agent build doesn't know about. Returns false if capabilities is
|
|
144
|
-
* undefined (pre-capability orchestrator) or the flag is missing/false.
|
|
145
|
-
*/
|
|
146
|
-
function hasOrchAgentCapability(capabilities, flag) {
|
|
147
|
-
return capabilities?.[flag] === true;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Agent -> Orchestrator capabilities, advertised on `agent.register`. Same
|
|
151
|
-
* evolution contract as the other directions: every field optional, absent =
|
|
152
|
-
* unsupported, `.passthrough()` preserves a newer agent's unknown flags. Lets
|
|
153
|
-
* the orchestrator route work that depends on an optional agent behaviour only
|
|
154
|
-
* to agents that implement it.
|
|
155
|
-
*/
|
|
156
|
-
const agentCapabilitiesSchema = z.object({
|
|
157
|
-
/**
|
|
158
|
-
* In a pre-run global eval round the agent runs only the needs-free
|
|
159
|
-
* `DynamicJobFn`s and skips every generator declared with upstream `needs`
|
|
160
|
-
* (a result-aware generator). Such a generator runs later, on the run's
|
|
161
|
-
* deferred path, with its upstream outputs. An agent without this flag runs
|
|
162
|
-
* every generator in the round — including a result-aware one, which then
|
|
163
|
-
* sees no upstream outputs and produces the wrong jobs — so the
|
|
164
|
-
* orchestrator sends a round containing a result-aware generator only to an
|
|
165
|
-
* agent that advertises it.
|
|
166
|
-
*/
|
|
167
|
-
globalEvalSkipsResultAwareGenerators: z.boolean().optional() }).passthrough();
|
|
168
|
-
/** Flag names of {@link agentCapabilitiesSchema}, for {@link hasAgentCapability} lookups. */
|
|
169
|
-
const AgentCapabilityFlag = z.enum(["globalEvalSkipsResultAwareGenerators"]);
|
|
67
|
+
const ORCH_AGENT_CAPABILITIES = Object.freeze({});
|
|
68
|
+
/** Agent -> orchestrator capabilities, advertised on `agent.register`. */
|
|
69
|
+
const agentCapabilitiesSchema = z.object({}).passthrough();
|
|
170
70
|
/** Default agent -> orchestrator capabilities advertised on agent.register. */
|
|
171
|
-
const AGENT_CAPABILITIES = Object.freeze({
|
|
172
|
-
/**
|
|
173
|
-
* Check whether an agent advertises a specific capability flag.
|
|
174
|
-
*
|
|
175
|
-
* Takes `string` (not `keyof`) because a newer agent may advertise flags this
|
|
176
|
-
* orchestrator build doesn't know about. Returns false if capabilities is
|
|
177
|
-
* undefined (pre-capability agent) or the flag is missing/false.
|
|
178
|
-
*/
|
|
179
|
-
function hasAgentCapability(capabilities, flag) {
|
|
180
|
-
return capabilities?.[flag] === true;
|
|
181
|
-
}
|
|
71
|
+
const AGENT_CAPABILITIES = Object.freeze({});
|
|
182
72
|
//#endregion
|
|
183
|
-
export { AGENT_CAPABILITIES,
|
|
73
|
+
export { AGENT_CAPABILITIES, ORCH_AGENT_CAPABILITIES, ORCH_CAPABILITIES, OrchRole, PLATFORM_CAPABILITIES, agentCapabilitiesSchema, orchAgentCapabilitiesSchema, orchCapabilitiesSchema, platformCapabilitiesSchema };
|
|
184
74
|
|
|
185
75
|
//# sourceMappingURL=capabilities.js.map
|
|
@@ -319,7 +319,7 @@ export declare const dashboardRunStateResponseSchema: z.ZodObject<{
|
|
|
319
319
|
step_failure: "step_failure";
|
|
320
320
|
timed_out: "timed_out";
|
|
321
321
|
}>>;
|
|
322
|
-
statusEpoch: z.
|
|
322
|
+
statusEpoch: z.ZodNumber;
|
|
323
323
|
jobs: z.ZodArray<z.ZodObject<{
|
|
324
324
|
jobId: z.ZodString;
|
|
325
325
|
jobName: z.ZodString;
|
|
@@ -1041,6 +1041,7 @@ export declare const dashboardAttestationGetResponseSchema: z.ZodObject<{
|
|
|
1041
1041
|
"offline-backfill": "offline-backfill";
|
|
1042
1042
|
}>>;
|
|
1043
1043
|
}, z.core.$strip>>;
|
|
1044
|
+
trustedIssuer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1044
1045
|
error: z.ZodOptional<z.ZodString>;
|
|
1045
1046
|
}, z.core.$strip>;
|
|
1046
1047
|
export type DashboardAttestationGetResponse = z.infer<typeof dashboardAttestationGetResponseSchema>;
|
|
@@ -1424,7 +1425,7 @@ export declare const runRerunRequestSchema: z.ZodObject<{
|
|
|
1424
1425
|
component: z.ZodString;
|
|
1425
1426
|
}, z.core.$strip>], "type">;
|
|
1426
1427
|
runId: z.ZodString;
|
|
1427
|
-
routingKey: z.
|
|
1428
|
+
routingKey: z.ZodString;
|
|
1428
1429
|
}, z.core.$strip>;
|
|
1429
1430
|
/** Request to manually trigger a cron-scheduled workflow. */
|
|
1430
1431
|
export declare const manualScheduleRequestSchema: z.ZodObject<{
|
|
@@ -3218,7 +3219,7 @@ export type FleetPreviewHost = z.infer<typeof fleetPreviewHostSchema>;
|
|
|
3218
3219
|
* A roster host as the dashboard sees it: the SDK inventory entry plus whether
|
|
3219
3220
|
* an agent registration or an operator declaration confirmed it. An
|
|
3220
3221
|
* unconfirmed host was created from the dashboard and is not a fan-out or
|
|
3221
|
-
* inventory target.
|
|
3222
|
+
* inventory target.
|
|
3222
3223
|
*/
|
|
3223
3224
|
export declare const fleetHostEntrySchema: z.ZodObject<{
|
|
3224
3225
|
agentId: z.ZodString;
|
|
@@ -3237,7 +3238,7 @@ export declare const fleetHostEntrySchema: z.ZodObject<{
|
|
|
3237
3238
|
unreachable: "unreachable";
|
|
3238
3239
|
}>;
|
|
3239
3240
|
lastSeen: z.ZodString;
|
|
3240
|
-
confirmed: z.
|
|
3241
|
+
confirmed: z.ZodBoolean;
|
|
3241
3242
|
}, z.core.$strip>;
|
|
3242
3243
|
export type FleetHostEntry = z.infer<typeof fleetHostEntrySchema>;
|
|
3243
3244
|
export declare const dashboardFleetHostsRequestSchema: z.ZodObject<{
|
|
@@ -3352,7 +3353,7 @@ export declare const dashboardFleetHostsResponseSchema: z.ZodObject<{
|
|
|
3352
3353
|
unreachable: "unreachable";
|
|
3353
3354
|
}>;
|
|
3354
3355
|
lastSeen: z.ZodString;
|
|
3355
|
-
confirmed: z.
|
|
3356
|
+
confirmed: z.ZodBoolean;
|
|
3356
3357
|
}, z.core.$strip>>;
|
|
3357
3358
|
}, z.core.$strip>;
|
|
3358
3359
|
export declare const dashboardFleetHostResponseSchema: z.ZodObject<{
|
|
@@ -3375,7 +3376,7 @@ export declare const dashboardFleetHostResponseSchema: z.ZodObject<{
|
|
|
3375
3376
|
unreachable: "unreachable";
|
|
3376
3377
|
}>;
|
|
3377
3378
|
lastSeen: z.ZodString;
|
|
3378
|
-
confirmed: z.
|
|
3379
|
+
confirmed: z.ZodBoolean;
|
|
3379
3380
|
}, z.core.$strip>>;
|
|
3380
3381
|
runs: z.ZodArray<z.ZodObject<{
|
|
3381
3382
|
runId: z.ZodString;
|
|
@@ -5033,7 +5034,7 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
5033
5034
|
component: z.ZodString;
|
|
5034
5035
|
}, z.core.$strip>], "type">;
|
|
5035
5036
|
runId: z.ZodString;
|
|
5036
|
-
routingKey: z.
|
|
5037
|
+
routingKey: z.ZodString;
|
|
5037
5038
|
}, z.core.$strip>, z.ZodObject<{
|
|
5038
5039
|
type: z.ZodLiteral<"run.manual_schedule.request">;
|
|
5039
5040
|
requestId: z.ZodString;
|
|
@@ -6870,6 +6871,7 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
6870
6871
|
"db.create_role": "db.create_role";
|
|
6871
6872
|
"db.ensure": "db.ensure";
|
|
6872
6873
|
"db.fresh": "db.fresh";
|
|
6874
|
+
"db.migrate": "db.migrate";
|
|
6873
6875
|
"db.refresh_collation_version": "db.refresh_collation_version";
|
|
6874
6876
|
"db.reindex": "db.reindex";
|
|
6875
6877
|
"diagnostics.read": "diagnostics.read";
|
|
@@ -6913,6 +6915,7 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
6913
6915
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
6914
6916
|
"scaler.orphan.stop": "scaler.orphan.stop";
|
|
6915
6917
|
"scaler.orphans.read": "scaler.orphans.read";
|
|
6918
|
+
"scaler.reload": "scaler.reload";
|
|
6916
6919
|
"secret.delete": "secret.delete";
|
|
6917
6920
|
"secret.list.read": "secret.list.read";
|
|
6918
6921
|
"secret.reveal": "secret.reveal";
|
|
@@ -7501,7 +7504,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
7501
7504
|
step_failure: "step_failure";
|
|
7502
7505
|
timed_out: "timed_out";
|
|
7503
7506
|
}>>;
|
|
7504
|
-
statusEpoch: z.
|
|
7507
|
+
statusEpoch: z.ZodNumber;
|
|
7505
7508
|
jobs: z.ZodArray<z.ZodObject<{
|
|
7506
7509
|
jobId: z.ZodString;
|
|
7507
7510
|
jobName: z.ZodString;
|
|
@@ -7656,6 +7659,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
7656
7659
|
"offline-backfill": "offline-backfill";
|
|
7657
7660
|
}>>;
|
|
7658
7661
|
}, z.core.$strip>>;
|
|
7662
|
+
trustedIssuer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7659
7663
|
error: z.ZodOptional<z.ZodString>;
|
|
7660
7664
|
}, z.core.$strip>, z.ZodObject<{
|
|
7661
7665
|
type: z.ZodLiteral<"dashboard.attestation.retry.response">;
|
|
@@ -8194,7 +8198,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8194
8198
|
unreachable: "unreachable";
|
|
8195
8199
|
}>;
|
|
8196
8200
|
lastSeen: z.ZodString;
|
|
8197
|
-
confirmed: z.
|
|
8201
|
+
confirmed: z.ZodBoolean;
|
|
8198
8202
|
}, z.core.$strip>>;
|
|
8199
8203
|
}, z.core.$strip>, z.ZodObject<{
|
|
8200
8204
|
type: z.ZodLiteral<"dashboard.fleet.host.response">;
|
|
@@ -8216,7 +8220,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8216
8220
|
unreachable: "unreachable";
|
|
8217
8221
|
}>;
|
|
8218
8222
|
lastSeen: z.ZodString;
|
|
8219
|
-
confirmed: z.
|
|
8223
|
+
confirmed: z.ZodBoolean;
|
|
8220
8224
|
}, z.core.$strip>>;
|
|
8221
8225
|
runs: z.ZodArray<z.ZodObject<{
|
|
8222
8226
|
runId: z.ZodString;
|
|
@@ -8617,6 +8621,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8617
8621
|
"db.create_role": "db.create_role";
|
|
8618
8622
|
"db.ensure": "db.ensure";
|
|
8619
8623
|
"db.fresh": "db.fresh";
|
|
8624
|
+
"db.migrate": "db.migrate";
|
|
8620
8625
|
"db.refresh_collation_version": "db.refresh_collation_version";
|
|
8621
8626
|
"db.reindex": "db.reindex";
|
|
8622
8627
|
"diagnostics.read": "diagnostics.read";
|
|
@@ -8660,6 +8665,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
8660
8665
|
"scaler.capacity.read": "scaler.capacity.read";
|
|
8661
8666
|
"scaler.orphan.stop": "scaler.orphan.stop";
|
|
8662
8667
|
"scaler.orphans.read": "scaler.orphans.read";
|
|
8668
|
+
"scaler.reload": "scaler.reload";
|
|
8663
8669
|
"secret.delete": "secret.delete";
|
|
8664
8670
|
"secret.list.read": "secret.list.read";
|
|
8665
8671
|
"secret.reveal": "secret.reveal";
|
|
@@ -8973,14 +8979,12 @@ export declare const dashboardStepLogsApiResponseSchema: z.ZodObject<{
|
|
|
8973
8979
|
recorded: z.ZodOptional<z.ZodBoolean>;
|
|
8974
8980
|
}, z.core.$strip>;
|
|
8975
8981
|
/**
|
|
8976
|
-
* REST API response for the run attestations list.
|
|
8977
|
-
*
|
|
8978
|
-
*
|
|
8979
|
-
*
|
|
8980
|
-
*
|
|
8981
|
-
*
|
|
8982
|
-
* dashboard then lists + downloads the bundles but renders the badge as
|
|
8983
|
-
* "verification unavailable".
|
|
8982
|
+
* REST API response for the run attestations list. `trustedIssuer` is the
|
|
8983
|
+
* signing orchestrator's provenance issuer, which the dashboard pins each
|
|
8984
|
+
* bundle's identity token to (never the bundle's own `iss`), and `jwksUri` is
|
|
8985
|
+
* the discovery JWKS endpoint the dashboard fetches to verify. Both are null
|
|
8986
|
+
* when the orchestrator does not sign — the dashboard then lists + downloads
|
|
8987
|
+
* the bundles but renders the badge as "verification unavailable".
|
|
8984
8988
|
*/
|
|
8985
8989
|
export declare const dashboardAttestationsApiResponseSchema: z.ZodObject<{
|
|
8986
8990
|
trustedIssuer: z.ZodNullable<z.ZodString>;
|
|
@@ -9429,18 +9433,10 @@ export declare const runEventSchema: z.ZodObject<{
|
|
|
9429
9433
|
parentSpanId: z.ZodNullable<z.ZodString>;
|
|
9430
9434
|
}, z.core.$strip>;
|
|
9431
9435
|
export type RunEvent = z.infer<typeof runEventSchema>;
|
|
9432
|
-
/**
|
|
9433
|
-
* Trust policy response (from trust_policies table).
|
|
9434
|
-
*
|
|
9435
|
-
* `approvalExpirySeconds` is the authoritative window and `approvalExpiryHours`
|
|
9436
|
-
* its coarse, rounded-up view, so a client reading only the older field still
|
|
9437
|
-
* gets a usable number. Both are always sent by this build; the seconds field is
|
|
9438
|
-
* optional so a dashboard build reading an older Platform still parses.
|
|
9439
|
-
*/
|
|
9436
|
+
/** Trust policy response (from trust_policies table). The window is in seconds. */
|
|
9440
9437
|
export declare const trustPolicyResponseSchema: z.ZodObject<{
|
|
9441
9438
|
forkPolicy: z.ZodString;
|
|
9442
|
-
|
|
9443
|
-
approvalExpirySeconds: z.ZodOptional<z.ZodNumber>;
|
|
9439
|
+
approvalExpirySeconds: z.ZodNumber;
|
|
9444
9440
|
}, z.core.$strip>;
|
|
9445
9441
|
export type TrustPolicy = z.infer<typeof trustPolicyResponseSchema>;
|
|
9446
9442
|
/** Single identity link item. */
|
|
@@ -6,14 +6,14 @@ 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 { DeploymentContainerRuntimeSchema, DeploymentModeSchema } from "./deployment-identity.js";
|
|
10
|
+
import { SourceSubtype } from "./source-registration.js";
|
|
9
11
|
import { TrustTierSchema } from "../../context/types.js";
|
|
10
12
|
import { agentRunResultSchema } from "./agent-run-result.js";
|
|
11
13
|
import { kiciBundleSchema } from "../../provenance/bundle.js";
|
|
12
14
|
import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
|
|
13
15
|
import { dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema } from "./run-events.js";
|
|
14
16
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./event-log.js";
|
|
15
|
-
import { DeploymentContainerRuntimeSchema, DeploymentModeSchema } from "./deployment-identity.js";
|
|
16
|
-
import { SourceSubtype } from "./source-registration.js";
|
|
17
17
|
import { ScalerBackendType } from "../../scaler/scaler-backend-type.js";
|
|
18
18
|
import { ApprovalDecision, HoldScope, approverClauseSchema } from "../../approval/types.js";
|
|
19
19
|
import { NeedsRunOn, OnUnreachableMode } from "../../trigger/types.js";
|
|
@@ -131,8 +131,6 @@ const dashboardJobDetailSchema = z.object({
|
|
|
131
131
|
* Job kind: `standard` runs steps on an agent, `gate` is an invoke gate, and
|
|
132
132
|
* `proxy` mirrors a summoned source-repo run. Absent/null for a standard job.
|
|
133
133
|
*
|
|
134
|
-
* OPTIONAL, and must stay optional: the wire protocol is compatibility-
|
|
135
|
-
* protected, so an orchestrator that predates invoke gates omits it.
|
|
136
134
|
*/
|
|
137
135
|
jobKind: JobKind.nullable().optional(),
|
|
138
136
|
/**
|
|
@@ -150,10 +148,6 @@ const dashboardJobDetailSchema = z.object({
|
|
|
150
148
|
* Why this job cannot currently be routed to any agent, present only while it
|
|
151
149
|
* is still queued and nothing in the fleet matches its `runsOn`; cleared once
|
|
152
150
|
* a matching agent or scaler backend appears.
|
|
153
|
-
*
|
|
154
|
-
* OPTIONAL, and must stay optional: the wire protocol is compatibility-
|
|
155
|
-
* protected, so an orchestrator that predates the unroutable probe
|
|
156
|
-
* omits it.
|
|
157
151
|
*/
|
|
158
152
|
routingReason: z.string().nullable().optional(),
|
|
159
153
|
/** Labels used for agent routing (e.g. ["kici:os:linux", "kici:arch:x64"]). */
|
|
@@ -311,9 +305,8 @@ const dashboardAttestationsListResponseSchema = z.object({
|
|
|
311
305
|
* The provenance issuer that signs this orchestrator's attestations, when it
|
|
312
306
|
* owns signing (`KICI_ORCHESTRATOR_PROVENANCE_ISSUER`). The Platform surfaces
|
|
313
307
|
* it as `trustedIssuer` so the dashboard / CLI verify against the orchestrator
|
|
314
|
-
* that
|
|
315
|
-
*
|
|
316
|
-
* compatibility with older orchestrators.
|
|
308
|
+
* that signed the bundles; null or absent → no trust root, and the dashboard
|
|
309
|
+
* shows verification as unavailable. Absent on an error response.
|
|
317
310
|
*/
|
|
318
311
|
trustedIssuer: z.string().nullable().optional(),
|
|
319
312
|
error: z.string().optional()
|
|
@@ -347,8 +340,7 @@ const dashboardArtifactsListResponseSchema = z.object({
|
|
|
347
340
|
* Signature-validity window (seconds) of the presigned `downloadUrl`s in this
|
|
348
341
|
* response, from the storage backend's presigned-GET expiry; the dashboard
|
|
349
342
|
* refreshes the list on a fraction of it so a displayed link is never stale.
|
|
350
|
-
*
|
|
351
|
-
* `trustedIssuer`).
|
|
343
|
+
* Absent on an error response.
|
|
352
344
|
*/
|
|
353
345
|
downloadUrlExpiresInSeconds: z.number().int().positive().optional(),
|
|
354
346
|
error: z.string().optional()
|
|
@@ -429,6 +421,8 @@ const dashboardAttestationGetResponseSchema = z.object({
|
|
|
429
421
|
type: z.literal("dashboard.attestation.get.response"),
|
|
430
422
|
requestId: z.string(),
|
|
431
423
|
attestation: attestationListItemSchema.nullable(),
|
|
424
|
+
/** See `dashboardAttestationsListResponseSchema.trustedIssuer`. */
|
|
425
|
+
trustedIssuer: z.string().nullable().optional(),
|
|
432
426
|
error: z.string().optional()
|
|
433
427
|
});
|
|
434
428
|
/** Request an on-demand drain of the deferred-attestation outbox (optionally one run). */
|
|
@@ -607,12 +601,9 @@ const runRerunRequestSchema = z.object({
|
|
|
607
601
|
/**
|
|
608
602
|
* The Platform forwards the original run's `routing_key` so the
|
|
609
603
|
* orchestrator can probe its cold-store under the right tenant prefix
|
|
610
|
-
* when the run is missing from PG.
|
|
611
|
-
* with older Platform versions in mixed deploys; if absent, the
|
|
612
|
-
* orchestrator skips the cold-store probe and surfaces the legacy
|
|
613
|
-
* `runArchivedNotRerunnable` / "Run not found" branches.
|
|
604
|
+
* when the run is missing from PG.
|
|
614
605
|
*/
|
|
615
|
-
routingKey: z.string()
|
|
606
|
+
routingKey: z.string()
|
|
616
607
|
});
|
|
617
608
|
/** Response to a re-run request. */
|
|
618
609
|
const runRerunResponseSchema = z.object({
|
|
@@ -1516,9 +1507,9 @@ const fleetPreviewHostSchema = z.object({
|
|
|
1516
1507
|
* A roster host as the dashboard sees it: the SDK inventory entry plus whether
|
|
1517
1508
|
* an agent registration or an operator declaration confirmed it. An
|
|
1518
1509
|
* unconfirmed host was created from the dashboard and is not a fan-out or
|
|
1519
|
-
* inventory target.
|
|
1510
|
+
* inventory target.
|
|
1520
1511
|
*/
|
|
1521
|
-
const fleetHostEntrySchema = HostInventoryEntry.extend({ confirmed: z.boolean()
|
|
1512
|
+
const fleetHostEntrySchema = HostInventoryEntry.extend({ confirmed: z.boolean() });
|
|
1522
1513
|
const dashboardFleetHostsRequestSchema = z.object({
|
|
1523
1514
|
type: z.literal("dashboard.fleet.hosts"),
|
|
1524
1515
|
requestId: z.string(),
|
|
@@ -2300,14 +2291,12 @@ const dashboardStepLogsApiResponseSchema = z.object({
|
|
|
2300
2291
|
recorded: z.boolean().optional()
|
|
2301
2292
|
});
|
|
2302
2293
|
/**
|
|
2303
|
-
* REST API response for the run attestations list.
|
|
2304
|
-
*
|
|
2305
|
-
*
|
|
2306
|
-
*
|
|
2307
|
-
*
|
|
2308
|
-
*
|
|
2309
|
-
* dashboard then lists + downloads the bundles but renders the badge as
|
|
2310
|
-
* "verification unavailable".
|
|
2294
|
+
* REST API response for the run attestations list. `trustedIssuer` is the
|
|
2295
|
+
* signing orchestrator's provenance issuer, which the dashboard pins each
|
|
2296
|
+
* bundle's identity token to (never the bundle's own `iss`), and `jwksUri` is
|
|
2297
|
+
* the discovery JWKS endpoint the dashboard fetches to verify. Both are null
|
|
2298
|
+
* when the orchestrator does not sign — the dashboard then lists + downloads
|
|
2299
|
+
* the bundles but renders the badge as "verification unavailable".
|
|
2311
2300
|
*/
|
|
2312
2301
|
const dashboardAttestationsApiResponseSchema = z.object({
|
|
2313
2302
|
trustedIssuer: z.string().nullable(),
|
|
@@ -2560,18 +2549,10 @@ const runEventSchema = z.object({
|
|
|
2560
2549
|
spanId: z.string().nullable(),
|
|
2561
2550
|
parentSpanId: z.string().nullable()
|
|
2562
2551
|
});
|
|
2563
|
-
/**
|
|
2564
|
-
* Trust policy response (from trust_policies table).
|
|
2565
|
-
*
|
|
2566
|
-
* `approvalExpirySeconds` is the authoritative window and `approvalExpiryHours`
|
|
2567
|
-
* its coarse, rounded-up view, so a client reading only the older field still
|
|
2568
|
-
* gets a usable number. Both are always sent by this build; the seconds field is
|
|
2569
|
-
* optional so a dashboard build reading an older Platform still parses.
|
|
2570
|
-
*/
|
|
2552
|
+
/** Trust policy response (from trust_policies table). The window is in seconds. */
|
|
2571
2553
|
const trustPolicyResponseSchema = z.object({
|
|
2572
2554
|
forkPolicy: z.string(),
|
|
2573
|
-
|
|
2574
|
-
approvalExpirySeconds: z.number().optional()
|
|
2555
|
+
approvalExpirySeconds: z.number()
|
|
2575
2556
|
});
|
|
2576
2557
|
/** Single identity link item. */
|
|
2577
2558
|
const identityLinkItemSchema = z.object({
|
|
@@ -352,7 +352,7 @@ export declare const executionStatusSchema: z.ZodObject<{
|
|
|
352
352
|
step_failure: "step_failure";
|
|
353
353
|
timed_out: "timed_out";
|
|
354
354
|
}>>;
|
|
355
|
-
statusEpoch: z.
|
|
355
|
+
statusEpoch: z.ZodNumber;
|
|
356
356
|
}, z.core.$strip>;
|
|
357
357
|
/** Per-step status forwarded from agent to Platform (real-time). */
|
|
358
358
|
export declare const stepStatusForwardSchema: z.ZodObject<{
|
|
@@ -485,7 +485,7 @@ export declare const stateReplayRunSchema: z.ZodObject<{
|
|
|
485
485
|
step_failure: "step_failure";
|
|
486
486
|
timed_out: "timed_out";
|
|
487
487
|
}>>;
|
|
488
|
-
statusEpoch: z.
|
|
488
|
+
statusEpoch: z.ZodNumber;
|
|
489
489
|
jobs: z.ZodArray<z.ZodObject<{
|
|
490
490
|
jobId: z.ZodString;
|
|
491
491
|
jobName: z.ZodString;
|
|
@@ -538,7 +538,7 @@ export declare const stateReplaySchema: z.ZodObject<{
|
|
|
538
538
|
step_failure: "step_failure";
|
|
539
539
|
timed_out: "timed_out";
|
|
540
540
|
}>>;
|
|
541
|
-
statusEpoch: z.
|
|
541
|
+
statusEpoch: z.ZodNumber;
|
|
542
542
|
jobs: z.ZodArray<z.ZodObject<{
|
|
543
543
|
jobId: z.ZodString;
|
|
544
544
|
jobName: z.ZodString;
|
|
@@ -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),
|