@kici-dev/engine 0.1.22 → 0.1.24
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/types.d.ts +1 -1
- package/dist/audit/access-log-policy.d.ts +4 -1
- package/dist/audit/access-log-policy.js +11 -1
- package/dist/audit/activity.d.ts +3 -1
- package/dist/audit/activity.js +8 -16
- package/dist/audit/retention-policy.js +6 -0
- package/dist/environment/host-match.d.ts +25 -0
- package/dist/environment/host-match.js +67 -0
- package/dist/environment/index.d.ts +3 -0
- package/dist/environment/index.js +3 -1
- package/dist/environment/multi-env.d.ts +30 -0
- package/dist/environment/multi-env.js +38 -0
- package/dist/environment/scope-resolver.d.ts +15 -4
- package/dist/environment/scope-resolver.js +55 -15
- package/dist/environment/scope-template.d.ts +18 -0
- package/dist/environment/scope-template.js +43 -0
- package/dist/environment/types.d.ts +15 -2
- package/dist/environment/types.js +18 -1
- package/dist/fanout/materialize.d.ts +34 -0
- package/dist/fanout/materialize.js +72 -45
- package/dist/index.d.ts +5 -1
- package/dist/index.js +21 -10
- package/dist/inputs/build.d.ts +9 -0
- package/dist/inputs/build.js +44 -0
- package/dist/inputs/coerce.d.ts +25 -0
- package/dist/inputs/coerce.js +51 -0
- package/dist/inputs/descriptor.d.ts +53 -0
- package/dist/inputs/descriptor.js +42 -0
- package/dist/inputs/extract.d.ts +15 -0
- package/dist/inputs/extract.js +117 -0
- package/dist/inputs/index.d.ts +6 -0
- package/dist/inputs/index.js +7 -0
- package/dist/inputs/schedule.d.ts +19 -0
- package/dist/inputs/schedule.js +33 -0
- package/dist/labels/compile.d.ts +9 -0
- package/dist/labels/compile.js +10 -1
- package/dist/labels.d.ts +29 -0
- package/dist/labels.js +32 -1
- package/dist/mcp/tool-schemas.d.ts +41 -0
- package/dist/mcp/tool-schemas.js +49 -0
- package/dist/metrics/catalog-policy.d.ts +7 -0
- package/dist/metrics/catalog-policy.js +11 -12
- package/dist/metrics/metric-catalog.generated.d.ts +22 -2
- package/dist/metrics/metric-catalog.generated.js +34 -2
- package/dist/protocol/messages/access-log.d.ts +39 -10
- package/dist/protocol/messages/access-log.js +7 -2
- package/dist/protocol/messages/actor.d.ts +8 -0
- package/dist/protocol/messages/actor.js +17 -3
- package/dist/protocol/messages/agent-run-result.d.ts +350 -0
- package/dist/protocol/messages/agent-run-result.js +123 -0
- package/dist/protocol/messages/auth.d.ts +2 -0
- package/dist/protocol/messages/auth.js +10 -1
- package/dist/protocol/messages/capabilities.d.ts +2 -0
- package/dist/protocol/messages/capabilities.js +15 -2
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +8 -0
- package/dist/protocol/messages/dashboard.d.ts +1513 -39
- package/dist/protocol/messages/dashboard.js +210 -15
- package/dist/protocol/messages/execution-status.d.ts +52 -1
- package/dist/protocol/messages/execution-status.js +115 -54
- package/dist/protocol/messages/orchestrator-agent.d.ts +21 -5
- package/dist/protocol/messages/orchestrator-agent.js +5 -1
- package/dist/protocol/messages/pat-kind.d.ts +16 -0
- package/dist/protocol/messages/pat-kind.js +17 -0
- package/dist/protocol/messages/peer.d.ts +7 -7
- package/dist/protocol/messages/platform-orchestrator.d.ts +424 -8
- package/dist/protocol/messages/platform-orchestrator.js +3 -3
- package/dist/protocol/messages/run-events.d.ts +5 -1
- package/dist/provider/check-run-conclusion.d.ts +1 -1
- package/dist/trigger/types.d.ts +75 -7
- package/dist/trigger/types.js +19 -2
- package/package.json +9 -1
- package/sbom.spdx.json +5 -5
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { CheckMode, CheckStepOutcome } from "../../check-mode.js";
|
|
3
3
|
import { actorPrincipalSchema } from "./actor.js";
|
|
4
|
-
import { initFailureSchema } from "./execution-status.js";
|
|
5
|
-
import {
|
|
6
|
-
import { SourceSubtype } from "./source-registration.js";
|
|
4
|
+
import { StepConcurrencyKind, initFailureSchema } from "./execution-status.js";
|
|
5
|
+
import { agentRunResultSchema } from "./agent-run-result.js";
|
|
7
6
|
import { kiciBundleSchema } from "../../provenance/bundle.js";
|
|
8
7
|
import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
|
|
9
8
|
import { dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema } from "./run-events.js";
|
|
10
9
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./event-log.js";
|
|
10
|
+
import { DeploymentContainerRuntimeSchema, DeploymentModeSchema } from "./deployment-identity.js";
|
|
11
|
+
import { SourceSubtype } from "./source-registration.js";
|
|
11
12
|
import { ScalerBackendType } from "../../scaler/scaler-backend-type.js";
|
|
12
13
|
import { ApprovalDecision, HoldScope, approverClauseSchema } from "../../approval/types.js";
|
|
13
14
|
import { NeedsRunOn, OnUnreachableMode } from "../../trigger/types.js";
|
|
@@ -23,6 +24,24 @@ const dashboardRunDetailRequestSchema = z.object({
|
|
|
23
24
|
actor: actorPrincipalSchema,
|
|
24
25
|
runId: z.string()
|
|
25
26
|
});
|
|
27
|
+
/**
|
|
28
|
+
* Request the machine-first, provenance-tagged structured run result from the
|
|
29
|
+
* orchestrator (user-plane equivalent of the orchestrator-admin
|
|
30
|
+
* `/runs/:id/structured` endpoint). Reuses the Phase-1 `AgentRunResult` shape.
|
|
31
|
+
*/
|
|
32
|
+
const dashboardRunStructuredRequestSchema = z.object({
|
|
33
|
+
type: z.literal("dashboard.run.structured"),
|
|
34
|
+
requestId: z.string(),
|
|
35
|
+
actor: actorPrincipalSchema,
|
|
36
|
+
runId: z.string()
|
|
37
|
+
});
|
|
38
|
+
/** Response carrying the provenance-tagged AgentRunResult (null when not found). */
|
|
39
|
+
const dashboardRunStructuredResponseSchema = z.object({
|
|
40
|
+
type: z.literal("dashboard.run.structured.response"),
|
|
41
|
+
requestId: z.string(),
|
|
42
|
+
result: agentRunResultSchema.nullable(),
|
|
43
|
+
error: z.string().optional()
|
|
44
|
+
});
|
|
26
45
|
/** Request step logs from orchestrator. */
|
|
27
46
|
const dashboardStepLogsRequestSchema = z.object({
|
|
28
47
|
type: z.literal("dashboard.step.logs"),
|
|
@@ -49,7 +68,11 @@ const dashboardStepDetailSchema = z.object({
|
|
|
49
68
|
/** Idempotent per-step outcome under a check mode. null/absent for non-check runs. */
|
|
50
69
|
checkOutcome: CheckStepOutcome.nullable().optional(),
|
|
51
70
|
/** Human-readable drift summary, present when the step reported drift. */
|
|
52
|
-
driftSummary: z.string().nullable().optional()
|
|
71
|
+
driftSummary: z.string().nullable().optional(),
|
|
72
|
+
/** Step concurrency role; absent/`sequential` for ordinary steps. */
|
|
73
|
+
concurrencyKind: StepConcurrencyKind.nullable().optional(),
|
|
74
|
+
/** Parallel-group correlation id shared by a group's children (e.g. `g0`). */
|
|
75
|
+
groupId: z.string().nullable().optional()
|
|
53
76
|
});
|
|
54
77
|
/** Job detail within a run detail response. */
|
|
55
78
|
const dashboardJobDetailSchema = z.object({
|
|
@@ -71,6 +94,12 @@ const dashboardJobDetailSchema = z.object({
|
|
|
71
94
|
errorMessage: z.string().nullable(),
|
|
72
95
|
/** Labels used for agent routing (e.g. ["kici:os:linux", "kici:arch:x64"]). */
|
|
73
96
|
runsOnLabels: z.array(z.string()).nullable().optional(),
|
|
97
|
+
/**
|
|
98
|
+
* Ordered bound deployment-environment names for this job, in merge order
|
|
99
|
+
* (later environments override earlier on key collisions). A `(dynamic)`
|
|
100
|
+
* entry marks an element resolved at runtime. null/absent = no binding.
|
|
101
|
+
*/
|
|
102
|
+
environments: z.array(z.string()).nullable().optional(),
|
|
74
103
|
/** Aggregated step outputs (step-keyed map). Present when job completed successfully with outputs. */
|
|
75
104
|
outputs: z.record(z.string(), z.record(z.string(), z.unknown())).nullable().optional(),
|
|
76
105
|
/** Secret output key names produced by this job (values are NOT included -- display masked). */
|
|
@@ -132,6 +161,22 @@ const dashboardAttestationsListRequestSchema = z.object({
|
|
|
132
161
|
runId: z.string()
|
|
133
162
|
});
|
|
134
163
|
/**
|
|
164
|
+
* Server-side verification verdict for an attestation, computed at ingest.
|
|
165
|
+
* - `verified` — `verifyKiciBundle` succeeded.
|
|
166
|
+
* - `failed` — verification ran and the bundle failed (signature / identity /
|
|
167
|
+
* build-context / unsupported mode). A provenance-integrity signal.
|
|
168
|
+
* - `unverifiable` — no verdict could be computed (no trust root configured, or
|
|
169
|
+
* the JWKS / bundle could not be read). NOT a forgery signal.
|
|
170
|
+
* - `pending` — verdict not yet computed (pre-backfill row, or ingest raced the
|
|
171
|
+
* trust root).
|
|
172
|
+
*/
|
|
173
|
+
const attestationVerifyStatusSchema = z.enum([
|
|
174
|
+
"verified",
|
|
175
|
+
"failed",
|
|
176
|
+
"unverifiable",
|
|
177
|
+
"pending"
|
|
178
|
+
]);
|
|
179
|
+
/**
|
|
135
180
|
* Single attestation in the list response, with its bundle inlined from object
|
|
136
181
|
* storage so the dashboard verifies it without a second fetch. The bundle is a
|
|
137
182
|
* KiCI Mode-A bundle (`@kici-dev/engine/provenance/bundle`).
|
|
@@ -145,7 +190,16 @@ const attestationListItemSchema = z.object({
|
|
|
145
190
|
mode: z.string(),
|
|
146
191
|
mediaType: z.string(),
|
|
147
192
|
createdAt: z.string(),
|
|
148
|
-
bundle: kiciBundleSchema
|
|
193
|
+
bundle: kiciBundleSchema,
|
|
194
|
+
/**
|
|
195
|
+
* Owning run id — populated by the single-attestation detail get (for the
|
|
196
|
+
* "view run" link); omitted by the per-run list (the run is already known).
|
|
197
|
+
*/
|
|
198
|
+
runId: z.string().optional(),
|
|
199
|
+
/** Stored server-side verdict — populated by the detail get (omitted per-run). */
|
|
200
|
+
verifyStatus: attestationVerifyStatusSchema.optional(),
|
|
201
|
+
/** First failure reason for the stored verdict, when failed (detail get only). */
|
|
202
|
+
verifyReason: z.string().nullable().optional()
|
|
149
203
|
});
|
|
150
204
|
/** Response with the run's attestations (correlates to dashboard.attestations.list). */
|
|
151
205
|
const dashboardAttestationsListResponseSchema = z.object({
|
|
@@ -155,6 +209,70 @@ const dashboardAttestationsListResponseSchema = z.object({
|
|
|
155
209
|
error: z.string().optional()
|
|
156
210
|
});
|
|
157
211
|
/**
|
|
212
|
+
* Metadata-only summary row for the org-wide list. No inlined bundle (keeps the
|
|
213
|
+
* list cheap). `repository` / `workflow` are joined from `execution_runs` when
|
|
214
|
+
* available.
|
|
215
|
+
*/
|
|
216
|
+
const attestationListSummarySchema = z.object({
|
|
217
|
+
id: z.string(),
|
|
218
|
+
runId: z.string(),
|
|
219
|
+
jobId: z.string(),
|
|
220
|
+
jobName: z.string().nullable(),
|
|
221
|
+
subjectName: z.string(),
|
|
222
|
+
subjectDigest: z.string(),
|
|
223
|
+
mode: z.string(),
|
|
224
|
+
mediaType: z.string(),
|
|
225
|
+
createdAt: z.string(),
|
|
226
|
+
verifyStatus: attestationVerifyStatusSchema,
|
|
227
|
+
verifyReason: z.string().nullable(),
|
|
228
|
+
repository: z.string().nullable(),
|
|
229
|
+
workflow: z.string().nullable()
|
|
230
|
+
});
|
|
231
|
+
/** Filters for the org-wide attestations list. */
|
|
232
|
+
const attestationListFiltersSchema = z.object({
|
|
233
|
+
digest: z.string().optional(),
|
|
234
|
+
name: z.string().optional(),
|
|
235
|
+
status: attestationVerifyStatusSchema.optional(),
|
|
236
|
+
repository: z.string().optional(),
|
|
237
|
+
workflow: z.string().optional(),
|
|
238
|
+
job: z.string().optional(),
|
|
239
|
+
createdAfter: z.string().optional(),
|
|
240
|
+
createdBefore: z.string().optional()
|
|
241
|
+
});
|
|
242
|
+
/** Request the org-wide, paginated, filtered list of attestations. */
|
|
243
|
+
const dashboardAttestationsListAllRequestSchema = z.object({
|
|
244
|
+
type: z.literal("dashboard.attestations.list.all"),
|
|
245
|
+
requestId: z.string(),
|
|
246
|
+
actor: actorPrincipalSchema,
|
|
247
|
+
page: z.number().int().positive(),
|
|
248
|
+
sort: z.string().optional(),
|
|
249
|
+
filters: attestationListFiltersSchema.default({})
|
|
250
|
+
});
|
|
251
|
+
/** Response with one page of org-wide attestation summaries. */
|
|
252
|
+
const dashboardAttestationsListAllResponseSchema = z.object({
|
|
253
|
+
type: z.literal("dashboard.attestations.list.all.response"),
|
|
254
|
+
requestId: z.string(),
|
|
255
|
+
attestations: z.array(attestationListSummarySchema),
|
|
256
|
+
page: z.number().int(),
|
|
257
|
+
pageSize: z.number().int(),
|
|
258
|
+
total: z.number().int(),
|
|
259
|
+
error: z.string().optional()
|
|
260
|
+
});
|
|
261
|
+
/** Request a single attestation by id (detail page; inlines the one bundle). */
|
|
262
|
+
const dashboardAttestationGetRequestSchema = z.object({
|
|
263
|
+
type: z.literal("dashboard.attestation.get"),
|
|
264
|
+
requestId: z.string(),
|
|
265
|
+
actor: actorPrincipalSchema,
|
|
266
|
+
attestationId: z.string()
|
|
267
|
+
});
|
|
268
|
+
/** Response with one attestation (the existing item shape with bundle), or null. */
|
|
269
|
+
const dashboardAttestationGetResponseSchema = z.object({
|
|
270
|
+
type: z.literal("dashboard.attestation.get.response"),
|
|
271
|
+
requestId: z.string(),
|
|
272
|
+
attestation: attestationListItemSchema.nullable(),
|
|
273
|
+
error: z.string().optional()
|
|
274
|
+
});
|
|
275
|
+
/**
|
|
158
276
|
* Run-summary projection from the orchestrator's execution_runs table.
|
|
159
277
|
*
|
|
160
278
|
* The required fields (`runId` / `routingKey` / `status`) are always present.
|
|
@@ -175,6 +293,8 @@ const dashboardRunSummarySchema = z.object({
|
|
|
175
293
|
triggerEvent: z.string().optional(),
|
|
176
294
|
commitMessage: z.string().optional(),
|
|
177
295
|
jobCount: z.number().optional(),
|
|
296
|
+
/** Distinct bound deployment-environment names across the run's jobs (first-seen order). */
|
|
297
|
+
environments: z.array(z.string()).optional(),
|
|
178
298
|
startedAt: z.string().optional(),
|
|
179
299
|
completedAt: z.string().optional(),
|
|
180
300
|
durationMs: z.number().optional(),
|
|
@@ -819,6 +939,15 @@ const envSourceOverrideDeleteResponseSchema = z.object({
|
|
|
819
939
|
requestId: z.string(),
|
|
820
940
|
error: z.string().optional()
|
|
821
941
|
});
|
|
942
|
+
/**
|
|
943
|
+
* A scope→environment binding with its host selector. `hostPattern` is the host
|
|
944
|
+
* the binding applies to (`'**'` = all hosts); exact / glob / regex over a
|
|
945
|
+
* fan-out child's agentId / hostname / labels.
|
|
946
|
+
*/
|
|
947
|
+
const envBindingEntrySchema = z.object({
|
|
948
|
+
scopePattern: z.string(),
|
|
949
|
+
hostPattern: z.string()
|
|
950
|
+
});
|
|
822
951
|
/** List bindings for an environment. */
|
|
823
952
|
const envBindingsListRequestSchema = z.object({
|
|
824
953
|
type: z.literal("dashboard.environments.bindings.list"),
|
|
@@ -829,16 +958,16 @@ const envBindingsListRequestSchema = z.object({
|
|
|
829
958
|
const envBindingsListResponseSchema = z.object({
|
|
830
959
|
type: z.literal("dashboard.environments.bindings.list.response"),
|
|
831
960
|
requestId: z.string(),
|
|
832
|
-
|
|
961
|
+
bindings: z.array(envBindingEntrySchema).optional(),
|
|
833
962
|
error: z.string().optional()
|
|
834
963
|
});
|
|
835
|
-
/** Set bindings (scope patterns) for an environment. */
|
|
964
|
+
/** Set bindings (scope + host patterns) for an environment. */
|
|
836
965
|
const envBindingsSetRequestSchema = z.object({
|
|
837
966
|
type: z.literal("dashboard.environments.bindings.set"),
|
|
838
967
|
requestId: z.string(),
|
|
839
968
|
actor: actorPrincipalSchema,
|
|
840
969
|
environmentId: z.string(),
|
|
841
|
-
|
|
970
|
+
bindings: z.array(envBindingEntrySchema)
|
|
842
971
|
});
|
|
843
972
|
const envBindingsSetResponseSchema = z.object({
|
|
844
973
|
type: z.literal("dashboard.environments.bindings.set.response"),
|
|
@@ -1054,14 +1183,16 @@ const fleetPinnedRunSchema = z.object({
|
|
|
1054
1183
|
status: z.string(),
|
|
1055
1184
|
createdAt: z.string()
|
|
1056
1185
|
});
|
|
1186
|
+
/** How a runsOnAll fan-out would treat one host, given its current reachability. */
|
|
1187
|
+
const FleetHostDisposition = z.enum([
|
|
1188
|
+
"target",
|
|
1189
|
+
"unreachable-durable",
|
|
1190
|
+
"skipped-ephemeral"
|
|
1191
|
+
]);
|
|
1057
1192
|
/** A host matched by a runsOnAll preview, plus how the fan-out would treat it. */
|
|
1058
1193
|
const fleetPreviewHostSchema = z.object({
|
|
1059
1194
|
entry: HostInventoryEntry,
|
|
1060
|
-
disposition:
|
|
1061
|
-
"target",
|
|
1062
|
-
"unreachable-durable",
|
|
1063
|
-
"skipped-ephemeral"
|
|
1064
|
-
])
|
|
1195
|
+
disposition: FleetHostDisposition
|
|
1065
1196
|
});
|
|
1066
1197
|
const dashboardFleetHostsRequestSchema = z.object({
|
|
1067
1198
|
type: z.literal("dashboard.fleet.hosts"),
|
|
@@ -1098,13 +1229,33 @@ const dashboardFleetPreviewResponseSchema = z.object({
|
|
|
1098
1229
|
onUnreachable: OnUnreachableMode,
|
|
1099
1230
|
estimatedChildCount: z.number()
|
|
1100
1231
|
});
|
|
1232
|
+
/** Request: which registered runsOnAll fan-outs target this host? */
|
|
1233
|
+
const dashboardFleetWorkflowsForHostRequestSchema = z.object({
|
|
1234
|
+
type: z.literal("dashboard.fleet.workflows-for-host"),
|
|
1235
|
+
requestId: z.string(),
|
|
1236
|
+
actor: actorPrincipalSchema,
|
|
1237
|
+
agentId: z.string()
|
|
1238
|
+
});
|
|
1239
|
+
/** One registered runsOnAll workflow whose selector matches the host. */
|
|
1240
|
+
const fleetHostWorkflowSchema = z.object({
|
|
1241
|
+
workflowName: z.string(),
|
|
1242
|
+
repoIdentifier: z.string(),
|
|
1243
|
+
sourceFile: z.string().nullable(),
|
|
1244
|
+
onUnreachable: OnUnreachableMode,
|
|
1245
|
+
disposition: FleetHostDisposition
|
|
1246
|
+
});
|
|
1247
|
+
const dashboardFleetWorkflowsForHostResponseSchema = z.object({
|
|
1248
|
+
type: z.literal("dashboard.fleet.workflows-for-host.response"),
|
|
1249
|
+
requestId: z.string(),
|
|
1250
|
+
workflows: z.array(fleetHostWorkflowSchema)
|
|
1251
|
+
});
|
|
1101
1252
|
/** Declare a static host into the roster (wraps HostRosterStore.declareStatic). */
|
|
1102
1253
|
const fleetHostDeclareRequestSchema = z.object({
|
|
1103
1254
|
type: z.literal("dashboard.fleet.host.declare"),
|
|
1104
1255
|
requestId: z.string(),
|
|
1105
1256
|
actor: actorPrincipalSchema,
|
|
1106
1257
|
agentId: z.string(),
|
|
1107
|
-
labels: z.array(z.string()),
|
|
1258
|
+
labels: z.array(z.string()).optional(),
|
|
1108
1259
|
hostname: z.string().optional(),
|
|
1109
1260
|
properties: z.record(z.string(), z.union([
|
|
1110
1261
|
z.string(),
|
|
@@ -1116,6 +1267,7 @@ const fleetHostDeclareResponseSchema = z.object({
|
|
|
1116
1267
|
type: z.literal("dashboard.fleet.host.declare.response"),
|
|
1117
1268
|
requestId: z.string(),
|
|
1118
1269
|
declared: z.boolean().optional(),
|
|
1270
|
+
created: z.boolean().optional(),
|
|
1119
1271
|
error: z.string().optional()
|
|
1120
1272
|
});
|
|
1121
1273
|
/** Remove a host from the roster by agent id (HostRosterStore.removeStatic). */
|
|
@@ -1535,6 +1687,12 @@ const testRelayTriggerRequestSchema = z.object({
|
|
|
1535
1687
|
* job's matched roster with this selector. Omitted for webhook runs.
|
|
1536
1688
|
*/
|
|
1537
1689
|
target: HostTargetSelector.optional(),
|
|
1690
|
+
/**
|
|
1691
|
+
* Raw operator-supplied `kici run --input KEY=VALUE` pairs (not coerced /
|
|
1692
|
+
* defaulted), relayed verbatim. The orchestrator validates + coerces + applies
|
|
1693
|
+
* defaults authoritatively against the matched workflow's lock descriptor.
|
|
1694
|
+
*/
|
|
1695
|
+
dispatchInputs: z.record(z.string(), z.string()).optional(),
|
|
1538
1696
|
secrets: z.record(z.string(), z.string()).optional(),
|
|
1539
1697
|
encryptedSecrets: z.string().optional(),
|
|
1540
1698
|
encryptedSecretsKey: z.string().optional()
|
|
@@ -1607,8 +1765,11 @@ const testRelayCancelResponseSchema = z.object({
|
|
|
1607
1765
|
/** Dashboard messages flowing from Platform to Orchestrator. */
|
|
1608
1766
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1609
1767
|
dashboardRunDetailRequestSchema,
|
|
1768
|
+
dashboardRunStructuredRequestSchema,
|
|
1610
1769
|
dashboardStepLogsRequestSchema,
|
|
1611
1770
|
dashboardAttestationsListRequestSchema,
|
|
1771
|
+
dashboardAttestationsListAllRequestSchema,
|
|
1772
|
+
dashboardAttestationGetRequestSchema,
|
|
1612
1773
|
dashboardRunsListRequestSchema,
|
|
1613
1774
|
dashboardRunsFiltersRequestSchema,
|
|
1614
1775
|
dashboardSourcesListRequestSchema,
|
|
@@ -1648,6 +1809,7 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1648
1809
|
dashboardFleetHostsRequestSchema,
|
|
1649
1810
|
dashboardFleetHostRequestSchema,
|
|
1650
1811
|
dashboardFleetPreviewRequestSchema,
|
|
1812
|
+
dashboardFleetWorkflowsForHostRequestSchema,
|
|
1651
1813
|
fleetHostDeclareRequestSchema,
|
|
1652
1814
|
fleetHostRemoveRequestSchema,
|
|
1653
1815
|
dashboardScalerCapacityRequestSchema,
|
|
@@ -1676,8 +1838,11 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1676
1838
|
/** Dashboard messages flowing from Orchestrator to Platform. */
|
|
1677
1839
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1678
1840
|
dashboardRunDetailResponseSchema,
|
|
1841
|
+
dashboardRunStructuredResponseSchema,
|
|
1679
1842
|
dashboardStepLogsResponseSchema,
|
|
1680
1843
|
dashboardAttestationsListResponseSchema,
|
|
1844
|
+
dashboardAttestationsListAllResponseSchema,
|
|
1845
|
+
dashboardAttestationGetResponseSchema,
|
|
1681
1846
|
dashboardRunsListResponseSchema,
|
|
1682
1847
|
dashboardRunsFiltersResponseSchema,
|
|
1683
1848
|
dashboardSourcesListResponseSchema,
|
|
@@ -1717,6 +1882,7 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
|
1717
1882
|
dashboardFleetHostsResponseSchema,
|
|
1718
1883
|
dashboardFleetHostResponseSchema,
|
|
1719
1884
|
dashboardFleetPreviewResponseSchema,
|
|
1885
|
+
dashboardFleetWorkflowsForHostResponseSchema,
|
|
1720
1886
|
fleetHostDeclareResponseSchema,
|
|
1721
1887
|
fleetHostRemoveResponseSchema,
|
|
1722
1888
|
dashboardScalerCapacityResponseSchema,
|
|
@@ -1812,6 +1978,19 @@ const runListItemSchema = z.object({
|
|
|
1812
1978
|
failureReason: z.string().optional(),
|
|
1813
1979
|
hadCompileJob: z.boolean(),
|
|
1814
1980
|
compileJobId: z.string().nullable(),
|
|
1981
|
+
/**
|
|
1982
|
+
* Distinct bound deployment-environment names across the run's jobs
|
|
1983
|
+
* (first-seen order). Drives the run-list environment chips; empty/absent
|
|
1984
|
+
* when no job binds an environment.
|
|
1985
|
+
*/
|
|
1986
|
+
environments: z.array(z.string()).optional(),
|
|
1987
|
+
/**
|
|
1988
|
+
* Run-level repo provider (origin host) — distinct from `source.provider`
|
|
1989
|
+
* which is derived from the routing key. Drives provider-aware repo links.
|
|
1990
|
+
*/
|
|
1991
|
+
repoProvider: z.string().nullable(),
|
|
1992
|
+
/** True when the run executed a developer's local working tree (`kici run remote`). */
|
|
1993
|
+
localWorkingTree: z.boolean(),
|
|
1815
1994
|
source: runListSourceSchema.nullable()
|
|
1816
1995
|
});
|
|
1817
1996
|
/** Paginated run list response envelope. */
|
|
@@ -1990,7 +2169,23 @@ const orgMemberSchema = z.object({
|
|
|
1990
2169
|
});
|
|
1991
2170
|
/** Response for org members list endpoint. */
|
|
1992
2171
|
const memberListResponseSchema = z.object({ members: z.array(orgMemberSchema) });
|
|
2172
|
+
/**
|
|
2173
|
+
* Every dashboard request type the local build understands, derived from the
|
|
2174
|
+
* discriminated union so it can never drift. A component advertises this set to
|
|
2175
|
+
* describe ITSELF; gating decisions always compare against the REMOTE's
|
|
2176
|
+
* advertised set, never this local one.
|
|
2177
|
+
*/
|
|
2178
|
+
const DASHBOARD_REQUEST_TYPES = dashboardPlatformToOrchSchema.options.map((o) => o.shape.type.value);
|
|
2179
|
+
/** Membership-test form of {@link DASHBOARD_REQUEST_TYPES}. */
|
|
2180
|
+
const DASHBOARD_REQUEST_TYPE_SET = new Set(DASHBOARD_REQUEST_TYPES);
|
|
2181
|
+
/** Structured error code on a dashboard `*.response` frame's `code` field. */
|
|
2182
|
+
const DashboardResponseErrorCode = z.enum([
|
|
2183
|
+
"unsupported_request_type",
|
|
2184
|
+
"invalid_payload",
|
|
2185
|
+
"unsupported_message_type",
|
|
2186
|
+
"internal_error"
|
|
2187
|
+
]);
|
|
1993
2188
|
//#endregion
|
|
1994
|
-
export { EnvDeleteErrorCode, EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListItemSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema };
|
|
2189
|
+
export { DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema };
|
|
1995
2190
|
|
|
1996
2191
|
//# sourceMappingURL=dashboard.js.map
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** Max length for ids and short identifier fields (runId, jobId, sha, ref, …). */
|
|
3
|
+
export declare const STATUS_ID_MAX = 128;
|
|
4
|
+
/** Max length for the repo identifier (`owner/repo` can be long). */
|
|
5
|
+
export declare const REPO_IDENTIFIER_MAX = 256;
|
|
6
|
+
/** Max length for free-text fields (commit message, failure/error reason). */
|
|
7
|
+
export declare const STATUS_FREE_TEXT_MAX = 2000;
|
|
8
|
+
/** Max number of runs in a single `state.replay` snapshot. */
|
|
9
|
+
export declare const STATE_REPLAY_MAX_RUNS = 500;
|
|
10
|
+
/** Max number of jobs attached to a single run in a `state.replay` snapshot. */
|
|
11
|
+
export declare const MAX_JOBS_PER_RUN = 1000;
|
|
12
|
+
/** Max number of `runsOn` / `secretsAccessed` label entries on a job/step. */
|
|
13
|
+
export declare const RUNS_ON_LABELS_MAX = 30;
|
|
14
|
+
/** Max number of bound deployment-environment names on a job. */
|
|
15
|
+
export declare const ENVIRONMENTS_MAX = 30;
|
|
2
16
|
/**
|
|
3
17
|
* Status values for execution runs (execution_runs table).
|
|
4
18
|
*
|
|
@@ -34,14 +48,36 @@ export declare const ExecutionJobStatus: z.ZodEnum<{
|
|
|
34
48
|
drift_dropped: "drift_dropped";
|
|
35
49
|
}>;
|
|
36
50
|
export type ExecutionJobStatus = z.infer<typeof ExecutionJobStatus>;
|
|
37
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Status values for execution steps (execution_steps table + step.status protocol messages).
|
|
53
|
+
*
|
|
54
|
+
* - `pending` — a parallel-group child queued behind `maxParallel`, not yet launched.
|
|
55
|
+
* - `cancelled` — a parallel-group sibling aborted by fail-fast (NOT a failure).
|
|
56
|
+
*/
|
|
38
57
|
export declare const ExecutionStepStatus: z.ZodEnum<{
|
|
39
58
|
skipped: "skipped";
|
|
40
59
|
success: "success";
|
|
60
|
+
pending: "pending";
|
|
41
61
|
running: "running";
|
|
42
62
|
failed: "failed";
|
|
63
|
+
cancelled: "cancelled";
|
|
43
64
|
}>;
|
|
44
65
|
export type ExecutionStepStatus = z.infer<typeof ExecutionStepStatus>;
|
|
66
|
+
/**
|
|
67
|
+
* How a step participates in a job's step concurrency model.
|
|
68
|
+
*
|
|
69
|
+
* - `sequential` — an ordinary step in the flat step sequence.
|
|
70
|
+
* - `parallel-child` — a child of a `parallel()` group, running concurrently
|
|
71
|
+
* with its siblings, each its own observable step.
|
|
72
|
+
* - `parallel-group` — the structural group wrapper (no flat step index); used
|
|
73
|
+
* only for the dashboard band aggregate, not persisted per step.
|
|
74
|
+
*/
|
|
75
|
+
export declare const StepConcurrencyKind: z.ZodEnum<{
|
|
76
|
+
sequential: "sequential";
|
|
77
|
+
"parallel-child": "parallel-child";
|
|
78
|
+
"parallel-group": "parallel-group";
|
|
79
|
+
}>;
|
|
80
|
+
export type StepConcurrencyKind = z.infer<typeof StepConcurrencyKind>;
|
|
45
81
|
/**
|
|
46
82
|
* Distinct reasons a run/job ended because a configured wall-clock timeout
|
|
47
83
|
* was exceeded. Surfaced in the failure/cancel reason so the dashboard can
|
|
@@ -159,6 +195,8 @@ export declare const executionStatusSchema: z.ZodObject<{
|
|
|
159
195
|
held: "held";
|
|
160
196
|
}>;
|
|
161
197
|
repoIdentifier: z.ZodOptional<z.ZodString>;
|
|
198
|
+
repoProvider: z.ZodOptional<z.ZodString>;
|
|
199
|
+
localWorkingTree: z.ZodOptional<z.ZodBoolean>;
|
|
162
200
|
sha: z.ZodOptional<z.ZodString>;
|
|
163
201
|
ref: z.ZodOptional<z.ZodString>;
|
|
164
202
|
triggerEvent: z.ZodOptional<z.ZodString>;
|
|
@@ -171,6 +209,9 @@ export declare const executionStatusSchema: z.ZodObject<{
|
|
|
171
209
|
parentRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
210
|
originalRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
211
|
triggeredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
212
|
+
triggerActorProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
|
+
triggerActorUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
|
+
triggerActorUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
215
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
175
216
|
logBytes: z.ZodOptional<z.ZodNumber>;
|
|
176
217
|
initFailure: z.ZodOptional<z.ZodObject<{
|
|
@@ -204,12 +245,20 @@ export declare const stepStatusForwardSchema: z.ZodObject<{
|
|
|
204
245
|
state: z.ZodEnum<{
|
|
205
246
|
skipped: "skipped";
|
|
206
247
|
success: "success";
|
|
248
|
+
pending: "pending";
|
|
207
249
|
running: "running";
|
|
208
250
|
failed: "failed";
|
|
251
|
+
cancelled: "cancelled";
|
|
209
252
|
}>;
|
|
210
253
|
timestamp: z.ZodNumber;
|
|
211
254
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
212
255
|
secretsAccessed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
+
concurrencyKind: z.ZodOptional<z.ZodEnum<{
|
|
257
|
+
sequential: "sequential";
|
|
258
|
+
"parallel-child": "parallel-child";
|
|
259
|
+
"parallel-group": "parallel-group";
|
|
260
|
+
}>>;
|
|
261
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
213
262
|
}, z.core.$strip>;
|
|
214
263
|
/** Per-job status forwarded from orchestrator to Platform (real-time). */
|
|
215
264
|
export declare const jobStatusForwardSchema: z.ZodObject<{
|
|
@@ -239,6 +288,7 @@ export declare const jobStatusForwardSchema: z.ZodObject<{
|
|
|
239
288
|
agentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
289
|
orchestratorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
290
|
runsOnLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
291
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
292
|
logBytes: z.ZodOptional<z.ZodNumber>;
|
|
243
293
|
timestamp: z.ZodNumber;
|
|
244
294
|
initFailure: z.ZodOptional<z.ZodObject<{
|
|
@@ -300,6 +350,7 @@ export declare const stateReplaySchema: z.ZodObject<{
|
|
|
300
350
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
351
|
agentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
302
352
|
runsOnLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
353
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
354
|
}, z.core.$strip>>;
|
|
304
355
|
}, z.core.$strip>>;
|
|
305
356
|
timestamp: z.ZodNumber;
|