@kici-dev/engine 0.1.23 → 0.1.25
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/approval/types.js +1 -1
- package/dist/audit/access-log-policy.d.ts +4 -1
- package/dist/audit/access-log-policy.js +11 -2
- package/dist/audit/activity.d.ts +4 -2
- package/dist/audit/activity.js +15 -1
- package/dist/audit/retention-policy.js +5 -3
- package/dist/bundler/index.js +1 -1
- package/dist/bundler/rolldown-config.js +1 -1
- package/dist/check-mode.js +1 -1
- package/dist/dev-ops/operations.d.ts +56 -0
- package/dist/dev-ops/operations.js +135 -0
- package/dist/env/environment-allowlist.js +1 -1
- package/dist/environment/host-match.js +1 -1
- package/dist/environment/index.d.ts +2 -0
- package/dist/environment/index.js +4 -2
- package/dist/environment/multi-env.d.ts +30 -0
- package/dist/environment/multi-env.js +38 -0
- package/dist/environment/scope-resolver.js +1 -1
- package/dist/environment/scope-template.js +1 -1
- package/dist/environment/types.d.ts +8 -2
- package/dist/environment/types.js +19 -2
- package/dist/fanout/materialize.js +3 -3
- package/dist/index.d.ts +10 -1
- package/dist/index.js +25 -13
- package/dist/inputs/build.js +1 -1
- package/dist/inputs/coerce.js +1 -1
- package/dist/inputs/descriptor.js +1 -1
- package/dist/inputs/extract.js +1 -1
- package/dist/inputs/index.d.ts +1 -0
- package/dist/inputs/index.js +3 -2
- package/dist/inputs/schedule.d.ts +19 -0
- package/dist/inputs/schedule.js +33 -0
- package/dist/inventory.js +1 -1
- package/dist/labels/compile.js +1 -1
- package/dist/labels-match.js +1 -1
- package/dist/labels.js +2 -2
- package/dist/matrix/expand.js +1 -1
- package/dist/matrix/format.js +1 -1
- package/dist/mcp/fence.d.ts +22 -0
- package/dist/mcp/fence.js +65 -0
- package/dist/mcp/held-run-resolve.d.ts +52 -0
- package/dist/mcp/held-run-resolve.js +53 -0
- package/dist/mcp/tool-schemas.d.ts +74 -0
- package/dist/mcp/tool-schemas.js +78 -0
- package/dist/metrics/catalog-policy.js +1 -1
- package/dist/metrics/metric-catalog.generated.d.ts +105 -0
- package/dist/metrics/metric-catalog.generated.js +127 -1
- package/dist/protocol/analytics-events.js +1 -1
- package/dist/protocol/cluster-name.js +1 -1
- package/dist/protocol/dashboard-global-workflows.js +1 -1
- package/dist/protocol/dashboard-write-operations.d.ts +5 -1
- package/dist/protocol/dashboard-write-operations.js +13 -2
- package/dist/protocol/event-log-payload.js +1 -1
- package/dist/protocol/messages/access-log.d.ts +43 -20
- package/dist/protocol/messages/access-log.js +16 -2
- package/dist/protocol/messages/actor.d.ts +21 -0
- package/dist/protocol/messages/actor.js +42 -8
- package/dist/protocol/messages/agent-dev-ops.d.ts +118 -0
- package/dist/protocol/messages/agent-dev-ops.js +89 -0
- package/dist/protocol/messages/agent-run-result.d.ts +425 -0
- package/dist/protocol/messages/agent-run-result.js +165 -0
- package/dist/protocol/messages/auth.d.ts +3 -0
- package/dist/protocol/messages/auth.js +11 -2
- package/dist/protocol/messages/browser.js +1 -1
- package/dist/protocol/messages/capabilities.d.ts +3 -0
- package/dist/protocol/messages/capabilities.js +16 -3
- package/dist/protocol/messages/common.js +1 -1
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +14 -0
- package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
- package/dist/protocol/messages/dashboard.d.ts +1998 -48
- package/dist/protocol/messages/dashboard.js +269 -15
- package/dist/protocol/messages/deployment-identity.js +1 -1
- package/dist/protocol/messages/event-log.js +1 -1
- package/dist/protocol/messages/execution-status.d.ts +67 -4
- package/dist/protocol/messages/execution-status.js +133 -57
- package/dist/protocol/messages/join.js +1 -1
- package/dist/protocol/messages/log-pull.js +1 -1
- package/dist/protocol/messages/oidc-mint.d.ts +51 -0
- package/dist/protocol/messages/oidc-mint.js +55 -0
- package/dist/protocol/messages/oidc-token-relay.d.ts +31 -4
- package/dist/protocol/messages/oidc-token-relay.js +22 -7
- package/dist/protocol/messages/orchestrator-agent.d.ts +66 -5
- package/dist/protocol/messages/orchestrator-agent.js +35 -3
- 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/peer.js +1 -1
- package/dist/protocol/messages/platform-orchestrator.d.ts +685 -17
- package/dist/protocol/messages/platform-orchestrator.js +8 -5
- package/dist/protocol/messages/run-events.d.ts +8 -1
- package/dist/protocol/messages/run-events.js +1 -1
- package/dist/protocol/messages/scaler-event.js +1 -1
- package/dist/protocol/messages/source-registration.js +1 -1
- package/dist/protocol/source-origin.d.ts +20 -0
- package/dist/protocol/source-origin.js +21 -0
- package/dist/protocol/version.js +1 -1
- package/dist/provenance/attestation-origin.d.ts +18 -0
- package/dist/provenance/attestation-origin.js +22 -0
- package/dist/provenance/bundle.js +1 -1
- package/dist/provenance/dsse.js +1 -1
- package/dist/provenance/schema.d.ts +48 -0
- package/dist/provenance/schema.js +21 -7
- package/dist/provenance/statement-hash.d.ts +9 -0
- package/dist/provenance/statement-hash.js +17 -0
- package/dist/provenance/verify.d.ts +7 -0
- package/dist/provenance/verify.js +49 -10
- package/dist/provider/changed-files-fetcher.js +1 -1
- package/dist/provider/check-run-conclusion.d.ts +1 -1
- package/dist/provider/check-run-conclusion.js +1 -1
- package/dist/provider/check-status-poster.js +1 -1
- package/dist/provider/clone-token-provider.js +1 -1
- package/dist/provider/contributor-resolver.js +1 -1
- package/dist/provider/index.js +1 -1
- package/dist/provider/lock-file-fetcher.js +1 -1
- package/dist/provider/lock-file-parse-error.js +1 -1
- package/dist/provider/repo-url-builder.js +1 -1
- package/dist/provider/types.js +1 -1
- package/dist/provider/webhook-normalizer.js +1 -1
- package/dist/registration/registerable-trigger-type.d.ts +1 -1
- package/dist/registration/registerable-trigger-type.js +1 -1
- package/dist/{chunk-BTugEXQM.js → rolldown-runtime-ClRpJifh.js} +0 -1
- package/dist/scaler/resource-types.js +1 -1
- package/dist/scaler/scaler-backend-type.js +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/types.d.ts +0 -24
- package/dist/secrets/types.js +1 -1
- package/dist/state-machine/index.js +1 -1
- package/dist/state-machine/machine.js +1 -1
- package/dist/state-machine/types.js +1 -1
- package/dist/trigger/decision-trace.js +1 -1
- package/dist/trigger/jsonpath-matcher.js +1 -1
- package/dist/trigger/matcher.js +1 -1
- package/dist/trigger/trigger-event-type.js +1 -1
- package/dist/trigger/types.d.ts +35 -7
- package/dist/trigger/types.js +8 -3
- package/dist/webhook/signature.js +1 -1
- package/dist/webhook/webhook-url-format.d.ts +7 -0
- package/dist/webhook/webhook-url-format.js +11 -2
- package/dist/ws/close-codes.d.ts +8 -2
- package/dist/ws/close-codes.js +10 -4
- package/dist/ws/rate-limiter.js +1 -1
- package/dist/ws/ws-like.js +1 -1
- package/package.json +9 -1
- package/sbom.spdx.json +5 -5
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import "../../
|
|
1
|
+
import "../../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { CheckMode, CheckStepOutcome } from "../../check-mode.js";
|
|
3
|
+
import { SourceOrigin } from "../source-origin.js";
|
|
4
|
+
import { AttestationOrigin } from "../../provenance/attestation-origin.js";
|
|
3
5
|
import { actorPrincipalSchema } from "./actor.js";
|
|
4
|
-
import { initFailureSchema } from "./execution-status.js";
|
|
5
|
-
import {
|
|
6
|
-
import { SourceSubtype } from "./source-registration.js";
|
|
6
|
+
import { StepConcurrencyKind, initFailureSchema } from "./execution-status.js";
|
|
7
|
+
import { agentRunResultSchema } from "./agent-run-result.js";
|
|
7
8
|
import { kiciBundleSchema } from "../../provenance/bundle.js";
|
|
8
9
|
import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
|
|
9
10
|
import { dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema } from "./run-events.js";
|
|
10
11
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./event-log.js";
|
|
12
|
+
import { DeploymentContainerRuntimeSchema, DeploymentModeSchema } from "./deployment-identity.js";
|
|
13
|
+
import { SourceSubtype } from "./source-registration.js";
|
|
11
14
|
import { ScalerBackendType } from "../../scaler/scaler-backend-type.js";
|
|
12
15
|
import { ApprovalDecision, HoldScope, approverClauseSchema } from "../../approval/types.js";
|
|
13
16
|
import { NeedsRunOn, OnUnreachableMode } from "../../trigger/types.js";
|
|
@@ -23,6 +26,24 @@ const dashboardRunDetailRequestSchema = z.object({
|
|
|
23
26
|
actor: actorPrincipalSchema,
|
|
24
27
|
runId: z.string()
|
|
25
28
|
});
|
|
29
|
+
/**
|
|
30
|
+
* Request the machine-first, provenance-tagged structured run result from the
|
|
31
|
+
* orchestrator (user-plane equivalent of the orchestrator-admin
|
|
32
|
+
* `/runs/:id/structured` endpoint). Reuses the Phase-1 `AgentRunResult` shape.
|
|
33
|
+
*/
|
|
34
|
+
const dashboardRunStructuredRequestSchema = z.object({
|
|
35
|
+
type: z.literal("dashboard.run.structured"),
|
|
36
|
+
requestId: z.string(),
|
|
37
|
+
actor: actorPrincipalSchema,
|
|
38
|
+
runId: z.string()
|
|
39
|
+
});
|
|
40
|
+
/** Response carrying the provenance-tagged AgentRunResult (null when not found). */
|
|
41
|
+
const dashboardRunStructuredResponseSchema = z.object({
|
|
42
|
+
type: z.literal("dashboard.run.structured.response"),
|
|
43
|
+
requestId: z.string(),
|
|
44
|
+
result: agentRunResultSchema.nullable(),
|
|
45
|
+
error: z.string().optional()
|
|
46
|
+
});
|
|
26
47
|
/** Request step logs from orchestrator. */
|
|
27
48
|
const dashboardStepLogsRequestSchema = z.object({
|
|
28
49
|
type: z.literal("dashboard.step.logs"),
|
|
@@ -30,7 +51,17 @@ const dashboardStepLogsRequestSchema = z.object({
|
|
|
30
51
|
actor: actorPrincipalSchema,
|
|
31
52
|
runId: z.string(),
|
|
32
53
|
jobId: z.string(),
|
|
33
|
-
stepIndex: z.number()
|
|
54
|
+
stepIndex: z.number(),
|
|
55
|
+
/**
|
|
56
|
+
* Optional line-offset cursor (a prior response's `nextCursor`). Absent reads
|
|
57
|
+
* from the start.
|
|
58
|
+
*/
|
|
59
|
+
cursor: z.string().optional(),
|
|
60
|
+
/**
|
|
61
|
+
* Optional max lines to return. Absent = unbounded (the human dashboard relies
|
|
62
|
+
* on this); the MCP layer opts into paging by sending an explicit limit.
|
|
63
|
+
*/
|
|
64
|
+
limit: z.number().int().positive().optional()
|
|
34
65
|
});
|
|
35
66
|
/** Step detail within a job response. */
|
|
36
67
|
const dashboardStepDetailSchema = z.object({
|
|
@@ -49,7 +80,11 @@ const dashboardStepDetailSchema = z.object({
|
|
|
49
80
|
/** Idempotent per-step outcome under a check mode. null/absent for non-check runs. */
|
|
50
81
|
checkOutcome: CheckStepOutcome.nullable().optional(),
|
|
51
82
|
/** Human-readable drift summary, present when the step reported drift. */
|
|
52
|
-
driftSummary: z.string().nullable().optional()
|
|
83
|
+
driftSummary: z.string().nullable().optional(),
|
|
84
|
+
/** Step concurrency role; absent/`sequential` for ordinary steps. */
|
|
85
|
+
concurrencyKind: StepConcurrencyKind.nullable().optional(),
|
|
86
|
+
/** Parallel-group correlation id shared by a group's children (e.g. `g0`). */
|
|
87
|
+
groupId: z.string().nullable().optional()
|
|
53
88
|
});
|
|
54
89
|
/** Job detail within a run detail response. */
|
|
55
90
|
const dashboardJobDetailSchema = z.object({
|
|
@@ -71,6 +106,19 @@ const dashboardJobDetailSchema = z.object({
|
|
|
71
106
|
errorMessage: z.string().nullable(),
|
|
72
107
|
/** Labels used for agent routing (e.g. ["kici:os:linux", "kici:arch:x64"]). */
|
|
73
108
|
runsOnLabels: z.array(z.string()).nullable().optional(),
|
|
109
|
+
/**
|
|
110
|
+
* Ordered bound deployment-environment names for this job, in merge order
|
|
111
|
+
* (later environments override earlier on key collisions). A `(dynamic)`
|
|
112
|
+
* entry marks an element resolved at runtime. null/absent = no binding.
|
|
113
|
+
*/
|
|
114
|
+
environments: z.array(z.string()).nullable().optional(),
|
|
115
|
+
/**
|
|
116
|
+
* Bound environments skipped on a test/local run (non-test or unconfigured).
|
|
117
|
+
* null/absent when nothing was skipped.
|
|
118
|
+
*/
|
|
119
|
+
skippedEnvironments: z.array(z.string()).nullable().optional(),
|
|
120
|
+
/** User-visible warning naming the skipped test-run environments. null/absent when none. */
|
|
121
|
+
envWarning: z.string().nullable().optional(),
|
|
74
122
|
/** Aggregated step outputs (step-keyed map). Present when job completed successfully with outputs. */
|
|
75
123
|
outputs: z.record(z.string(), z.record(z.string(), z.unknown())).nullable().optional(),
|
|
76
124
|
/** Secret output key names produced by this job (values are NOT included -- display masked). */
|
|
@@ -122,6 +170,8 @@ const dashboardStepLogsResponseSchema = z.object({
|
|
|
122
170
|
requestId: z.string(),
|
|
123
171
|
lines: z.array(z.string()),
|
|
124
172
|
totalLines: z.number(),
|
|
173
|
+
/** Next line-offset cursor, or null when the page reached the end. */
|
|
174
|
+
nextCursor: z.string().nullable().optional(),
|
|
125
175
|
error: z.string().optional()
|
|
126
176
|
});
|
|
127
177
|
/** Request the build-provenance attestations for a run. */
|
|
@@ -132,6 +182,22 @@ const dashboardAttestationsListRequestSchema = z.object({
|
|
|
132
182
|
runId: z.string()
|
|
133
183
|
});
|
|
134
184
|
/**
|
|
185
|
+
* Server-side verification verdict for an attestation, computed at ingest.
|
|
186
|
+
* - `verified` — `verifyKiciBundle` succeeded.
|
|
187
|
+
* - `failed` — verification ran and the bundle failed (signature / identity /
|
|
188
|
+
* build-context / unsupported mode). A provenance-integrity signal.
|
|
189
|
+
* - `unverifiable` — no verdict could be computed (no trust root configured, or
|
|
190
|
+
* the JWKS / bundle could not be read). NOT a forgery signal.
|
|
191
|
+
* - `pending` — verdict not yet computed (pre-backfill row, or ingest raced the
|
|
192
|
+
* trust root).
|
|
193
|
+
*/
|
|
194
|
+
const attestationVerifyStatusSchema = z.enum([
|
|
195
|
+
"verified",
|
|
196
|
+
"failed",
|
|
197
|
+
"unverifiable",
|
|
198
|
+
"pending"
|
|
199
|
+
]);
|
|
200
|
+
/**
|
|
135
201
|
* Single attestation in the list response, with its bundle inlined from object
|
|
136
202
|
* storage so the dashboard verifies it without a second fetch. The bundle is a
|
|
137
203
|
* KiCI Mode-A bundle (`@kici-dev/engine/provenance/bundle`).
|
|
@@ -145,7 +211,28 @@ const attestationListItemSchema = z.object({
|
|
|
145
211
|
mode: z.string(),
|
|
146
212
|
mediaType: z.string(),
|
|
147
213
|
createdAt: z.string(),
|
|
148
|
-
bundle: kiciBundleSchema
|
|
214
|
+
bundle: kiciBundleSchema,
|
|
215
|
+
/**
|
|
216
|
+
* Owning run id — populated by the single-attestation detail get (for the
|
|
217
|
+
* "view run" link); omitted by the per-run list (the run is already known).
|
|
218
|
+
*/
|
|
219
|
+
runId: z.string().optional(),
|
|
220
|
+
/** Stored server-side verdict — populated by the detail get (omitted per-run). */
|
|
221
|
+
verifyStatus: attestationVerifyStatusSchema.optional(),
|
|
222
|
+
/** First failure reason for the stored verdict, when failed (detail get only). */
|
|
223
|
+
verifyReason: z.string().nullable().optional(),
|
|
224
|
+
/**
|
|
225
|
+
* Source-origin brand: triggered vs kici run remote (local working-tree
|
|
226
|
+
* overlay). Read from the signed statement's internalParameters.
|
|
227
|
+
*/
|
|
228
|
+
sourceOrigin: SourceOrigin.optional(),
|
|
229
|
+
/** Authoritative origin: the customer's public org id (from the signed statement). */
|
|
230
|
+
originOrgId: z.string().optional(),
|
|
231
|
+
/**
|
|
232
|
+
* Mint-timing origin: live / deferred / offline-backfill. Read from the token
|
|
233
|
+
* claim or the signed statement's internalParameters; absent defaults to live.
|
|
234
|
+
*/
|
|
235
|
+
attestationOrigin: AttestationOrigin.optional()
|
|
149
236
|
});
|
|
150
237
|
/** Response with the run's attestations (correlates to dashboard.attestations.list). */
|
|
151
238
|
const dashboardAttestationsListResponseSchema = z.object({
|
|
@@ -155,6 +242,98 @@ const dashboardAttestationsListResponseSchema = z.object({
|
|
|
155
242
|
error: z.string().optional()
|
|
156
243
|
});
|
|
157
244
|
/**
|
|
245
|
+
* Metadata-only summary row for the org-wide list. No inlined bundle (keeps the
|
|
246
|
+
* list cheap). `repository` / `workflow` are joined from `execution_runs` when
|
|
247
|
+
* available.
|
|
248
|
+
*/
|
|
249
|
+
const attestationListSummarySchema = z.object({
|
|
250
|
+
id: z.string(),
|
|
251
|
+
runId: z.string(),
|
|
252
|
+
jobId: z.string(),
|
|
253
|
+
jobName: z.string().nullable(),
|
|
254
|
+
subjectName: z.string(),
|
|
255
|
+
subjectDigest: z.string(),
|
|
256
|
+
mode: z.string(),
|
|
257
|
+
mediaType: z.string(),
|
|
258
|
+
createdAt: z.string(),
|
|
259
|
+
verifyStatus: attestationVerifyStatusSchema,
|
|
260
|
+
verifyReason: z.string().nullable(),
|
|
261
|
+
repository: z.string().nullable(),
|
|
262
|
+
workflow: z.string().nullable(),
|
|
263
|
+
/**
|
|
264
|
+
* Source-origin brand: triggered vs kici run remote (local working-tree
|
|
265
|
+
* overlay). Derived from the run's local_working_tree flag.
|
|
266
|
+
*/
|
|
267
|
+
sourceOrigin: SourceOrigin.optional(),
|
|
268
|
+
/** Mint-timing origin: live / deferred / offline-backfill. */
|
|
269
|
+
attestationOrigin: AttestationOrigin.optional(),
|
|
270
|
+
/**
|
|
271
|
+
* True for a row still in the deferred-attestation outbox (not yet minted):
|
|
272
|
+
* `verifyStatus: 'pending'`, no bundle. The page offers a retry action.
|
|
273
|
+
*/
|
|
274
|
+
pending: z.boolean().optional()
|
|
275
|
+
});
|
|
276
|
+
/** Filters for the org-wide attestations list. */
|
|
277
|
+
const attestationListFiltersSchema = z.object({
|
|
278
|
+
digest: z.string().optional(),
|
|
279
|
+
name: z.string().optional(),
|
|
280
|
+
status: attestationVerifyStatusSchema.optional(),
|
|
281
|
+
repository: z.string().optional(),
|
|
282
|
+
workflow: z.string().optional(),
|
|
283
|
+
job: z.string().optional(),
|
|
284
|
+
createdAfter: z.string().optional(),
|
|
285
|
+
createdBefore: z.string().optional()
|
|
286
|
+
});
|
|
287
|
+
/** Request the org-wide, paginated, filtered list of attestations. */
|
|
288
|
+
const dashboardAttestationsListAllRequestSchema = z.object({
|
|
289
|
+
type: z.literal("dashboard.attestations.list.all"),
|
|
290
|
+
requestId: z.string(),
|
|
291
|
+
actor: actorPrincipalSchema,
|
|
292
|
+
page: z.number().int().positive(),
|
|
293
|
+
sort: z.string().optional(),
|
|
294
|
+
filters: attestationListFiltersSchema.default({})
|
|
295
|
+
});
|
|
296
|
+
/** Response with one page of org-wide attestation summaries. */
|
|
297
|
+
const dashboardAttestationsListAllResponseSchema = z.object({
|
|
298
|
+
type: z.literal("dashboard.attestations.list.all.response"),
|
|
299
|
+
requestId: z.string(),
|
|
300
|
+
attestations: z.array(attestationListSummarySchema),
|
|
301
|
+
page: z.number().int(),
|
|
302
|
+
pageSize: z.number().int(),
|
|
303
|
+
total: z.number().int(),
|
|
304
|
+
error: z.string().optional()
|
|
305
|
+
});
|
|
306
|
+
/** Request a single attestation by id (detail page; inlines the one bundle). */
|
|
307
|
+
const dashboardAttestationGetRequestSchema = z.object({
|
|
308
|
+
type: z.literal("dashboard.attestation.get"),
|
|
309
|
+
requestId: z.string(),
|
|
310
|
+
actor: actorPrincipalSchema,
|
|
311
|
+
attestationId: z.string()
|
|
312
|
+
});
|
|
313
|
+
/** Response with one attestation (the existing item shape with bundle), or null. */
|
|
314
|
+
const dashboardAttestationGetResponseSchema = z.object({
|
|
315
|
+
type: z.literal("dashboard.attestation.get.response"),
|
|
316
|
+
requestId: z.string(),
|
|
317
|
+
attestation: attestationListItemSchema.nullable(),
|
|
318
|
+
error: z.string().optional()
|
|
319
|
+
});
|
|
320
|
+
/** Request an on-demand drain of the deferred-attestation outbox (optionally one run). */
|
|
321
|
+
const dashboardAttestationRetryRequestSchema = z.object({
|
|
322
|
+
type: z.literal("dashboard.attestation.retry"),
|
|
323
|
+
requestId: z.string(),
|
|
324
|
+
actor: actorPrincipalSchema,
|
|
325
|
+
/** Scope to a single run; omitted drains every pending attestation. */
|
|
326
|
+
runId: z.string().optional()
|
|
327
|
+
});
|
|
328
|
+
/** Response with the drain counts. */
|
|
329
|
+
const dashboardAttestationRetryResponseSchema = z.object({
|
|
330
|
+
type: z.literal("dashboard.attestation.retry.response"),
|
|
331
|
+
requestId: z.string(),
|
|
332
|
+
minted: z.number().int(),
|
|
333
|
+
stillPending: z.number().int(),
|
|
334
|
+
error: z.string().optional()
|
|
335
|
+
});
|
|
336
|
+
/**
|
|
158
337
|
* Run-summary projection from the orchestrator's execution_runs table.
|
|
159
338
|
*
|
|
160
339
|
* The required fields (`runId` / `routingKey` / `status`) are always present.
|
|
@@ -175,13 +354,17 @@ const dashboardRunSummarySchema = z.object({
|
|
|
175
354
|
triggerEvent: z.string().optional(),
|
|
176
355
|
commitMessage: z.string().optional(),
|
|
177
356
|
jobCount: z.number().optional(),
|
|
357
|
+
/** Distinct bound deployment-environment names across the run's jobs (first-seen order). */
|
|
358
|
+
environments: z.array(z.string()).optional(),
|
|
178
359
|
startedAt: z.string().optional(),
|
|
179
360
|
completedAt: z.string().optional(),
|
|
180
361
|
durationMs: z.number().optional(),
|
|
181
362
|
parentRunId: z.string().optional(),
|
|
182
363
|
originalRunId: z.string().optional(),
|
|
183
364
|
triggeredBy: z.string().optional(),
|
|
365
|
+
triggeredByAgentLabel: z.string().nullable().optional(),
|
|
184
366
|
cancelledBy: z.string().optional(),
|
|
367
|
+
cancelledByAgentLabel: z.string().nullable().optional(),
|
|
185
368
|
failureReason: z.string().optional(),
|
|
186
369
|
hadCompileJob: z.boolean().optional(),
|
|
187
370
|
compileJobId: z.string().optional(),
|
|
@@ -291,7 +474,9 @@ const manualScheduleRequestSchema = z.object({
|
|
|
291
474
|
type: z.literal("run.manual_schedule.request"),
|
|
292
475
|
requestId: z.string(),
|
|
293
476
|
actor: actorPrincipalSchema,
|
|
294
|
-
registrationId: z.string()
|
|
477
|
+
registrationId: z.string(),
|
|
478
|
+
/** Agent provenance label when triggered through an agent credential. */
|
|
479
|
+
triggeredByAgentLabel: z.string().nullable().optional()
|
|
295
480
|
});
|
|
296
481
|
/** Response to a manual schedule trigger request. */
|
|
297
482
|
const manualScheduleResponseSchema = z.object({
|
|
@@ -935,12 +1120,12 @@ const envSecretScopeDeleteResponseSchema = z.object({
|
|
|
935
1120
|
requestId: z.string(),
|
|
936
1121
|
error: z.string().optional()
|
|
937
1122
|
});
|
|
938
|
-
/** Fetch runs that targeted a specific environment. */
|
|
1123
|
+
/** Fetch runs that targeted a specific environment, keyed by environment id. */
|
|
939
1124
|
const envHistoryRequestSchema = z.object({
|
|
940
1125
|
type: z.literal("dashboard.environments.history"),
|
|
941
1126
|
requestId: z.string(),
|
|
942
1127
|
actor: actorPrincipalSchema,
|
|
943
|
-
|
|
1128
|
+
environmentId: z.string(),
|
|
944
1129
|
limit: z.number().optional(),
|
|
945
1130
|
offset: z.number().optional()
|
|
946
1131
|
});
|
|
@@ -976,7 +1161,17 @@ const heldRunsListRequestSchema = z.object({
|
|
|
976
1161
|
actor: actorPrincipalSchema,
|
|
977
1162
|
status: HeldRunStatus.optional(),
|
|
978
1163
|
queueType: HeldRunQueueType.optional(),
|
|
979
|
-
runId: z.string().optional()
|
|
1164
|
+
runId: z.string().optional(),
|
|
1165
|
+
/**
|
|
1166
|
+
* Target org the read must be scoped to, carried per-request by the Platform
|
|
1167
|
+
* (the validated `:orgId` path param). The orchestrator honors this over its
|
|
1168
|
+
* static connection-level org so a Platform-first `kici run remote` org —
|
|
1169
|
+
* anchored only by `remote_sources` — sees its own held runs even when the
|
|
1170
|
+
* orchestrator's connection also serves a webhook source for a different org.
|
|
1171
|
+
* Absent on the legacy customer-dashboard path, where the connection org is
|
|
1172
|
+
* already the request org.
|
|
1173
|
+
*/
|
|
1174
|
+
orgId: z.string().optional()
|
|
980
1175
|
});
|
|
981
1176
|
const heldRunsListResponseSchema = z.object({
|
|
982
1177
|
type: z.literal("dashboard.held-runs.list.response"),
|
|
@@ -1028,7 +1223,15 @@ const heldRunApproveRequestSchema = z.object({
|
|
|
1028
1223
|
* is still enforced (this only changes the audit action to
|
|
1029
1224
|
* `held_run.auto_approve`); it is never a bypass.
|
|
1030
1225
|
*/
|
|
1031
|
-
autoApprove: z.boolean().optional()
|
|
1226
|
+
autoApprove: z.boolean().optional(),
|
|
1227
|
+
/**
|
|
1228
|
+
* Target org the decision must be scoped to, carried per-request by the
|
|
1229
|
+
* Platform (the validated `:orgId` path param). Honored over the static
|
|
1230
|
+
* connection-level org so a remote run's hold — recorded under the run's own
|
|
1231
|
+
* `remote_sources` org — is resolvable even when the orchestrator's
|
|
1232
|
+
* connection also serves a webhook source for a different org.
|
|
1233
|
+
*/
|
|
1234
|
+
orgId: z.string().optional()
|
|
1032
1235
|
});
|
|
1033
1236
|
const heldRunApproveResponseSchema = z.object({
|
|
1034
1237
|
type: z.literal("dashboard.held-runs.approve.response"),
|
|
@@ -1041,7 +1244,15 @@ const heldRunRejectRequestSchema = z.object({
|
|
|
1041
1244
|
requestId: z.string(),
|
|
1042
1245
|
actor: actorPrincipalSchema,
|
|
1043
1246
|
heldRunId: z.string(),
|
|
1044
|
-
reason: z.string().optional()
|
|
1247
|
+
reason: z.string().optional(),
|
|
1248
|
+
/**
|
|
1249
|
+
* Target org the decision must be scoped to, carried per-request by the
|
|
1250
|
+
* Platform (the validated `:orgId` path param). Honored over the static
|
|
1251
|
+
* connection-level org so a remote run's hold — recorded under the run's own
|
|
1252
|
+
* `remote_sources` org — is resolvable even when the orchestrator's
|
|
1253
|
+
* connection also serves a webhook source for a different org.
|
|
1254
|
+
*/
|
|
1255
|
+
orgId: z.string().optional()
|
|
1045
1256
|
});
|
|
1046
1257
|
const heldRunRejectResponseSchema = z.object({
|
|
1047
1258
|
type: z.literal("dashboard.held-runs.reject.response"),
|
|
@@ -1585,6 +1796,8 @@ const testRelayTriggerResponseSchema = z.object({
|
|
|
1585
1796
|
status: z.enum(["accepted", "rejected"]).optional(),
|
|
1586
1797
|
reason: z.string().optional(),
|
|
1587
1798
|
jobIds: z.array(z.string()).optional(),
|
|
1799
|
+
/** User-visible warnings on acceptance (e.g. skipped non-test bound environments). */
|
|
1800
|
+
warnings: z.array(z.string()).optional(),
|
|
1588
1801
|
error: z.string().optional()
|
|
1589
1802
|
});
|
|
1590
1803
|
/** Request a snapshot of a run's status. */
|
|
@@ -1645,8 +1858,12 @@ const testRelayCancelResponseSchema = z.object({
|
|
|
1645
1858
|
/** Dashboard messages flowing from Platform to Orchestrator. */
|
|
1646
1859
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1647
1860
|
dashboardRunDetailRequestSchema,
|
|
1861
|
+
dashboardRunStructuredRequestSchema,
|
|
1648
1862
|
dashboardStepLogsRequestSchema,
|
|
1649
1863
|
dashboardAttestationsListRequestSchema,
|
|
1864
|
+
dashboardAttestationsListAllRequestSchema,
|
|
1865
|
+
dashboardAttestationGetRequestSchema,
|
|
1866
|
+
dashboardAttestationRetryRequestSchema,
|
|
1650
1867
|
dashboardRunsListRequestSchema,
|
|
1651
1868
|
dashboardRunsFiltersRequestSchema,
|
|
1652
1869
|
dashboardSourcesListRequestSchema,
|
|
@@ -1715,8 +1932,12 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1715
1932
|
/** Dashboard messages flowing from Orchestrator to Platform. */
|
|
1716
1933
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1717
1934
|
dashboardRunDetailResponseSchema,
|
|
1935
|
+
dashboardRunStructuredResponseSchema,
|
|
1718
1936
|
dashboardStepLogsResponseSchema,
|
|
1719
1937
|
dashboardAttestationsListResponseSchema,
|
|
1938
|
+
dashboardAttestationsListAllResponseSchema,
|
|
1939
|
+
dashboardAttestationGetResponseSchema,
|
|
1940
|
+
dashboardAttestationRetryResponseSchema,
|
|
1720
1941
|
dashboardRunsListResponseSchema,
|
|
1721
1942
|
dashboardRunsFiltersResponseSchema,
|
|
1722
1943
|
dashboardSourcesListResponseSchema,
|
|
@@ -1799,7 +2020,9 @@ const dashboardRunDetailApiResponseSchema = z.object({
|
|
|
1799
2020
|
/** REST API response for step logs. */
|
|
1800
2021
|
const dashboardStepLogsApiResponseSchema = z.object({
|
|
1801
2022
|
lines: z.array(z.string()),
|
|
1802
|
-
totalLines: z.number()
|
|
2023
|
+
totalLines: z.number(),
|
|
2024
|
+
/** Next line-offset cursor, or null when the page reached the end. */
|
|
2025
|
+
nextCursor: z.string().nullable().optional()
|
|
1803
2026
|
});
|
|
1804
2027
|
/**
|
|
1805
2028
|
* REST API response for the run attestations list. The orchestrator-relayed
|
|
@@ -1846,12 +2069,27 @@ const runListItemSchema = z.object({
|
|
|
1846
2069
|
parentRunId: z.string().nullable(),
|
|
1847
2070
|
originalRunId: z.string().nullable(),
|
|
1848
2071
|
triggeredBy: z.string().nullable(),
|
|
2072
|
+
triggeredByAgentLabel: z.string().nullable().optional(),
|
|
1849
2073
|
triggeredByUser: runListPrincipalUserSchema.nullable(),
|
|
1850
2074
|
cancelledBy: z.string().nullable(),
|
|
2075
|
+
cancelledByAgentLabel: z.string().nullable().optional(),
|
|
1851
2076
|
cancelledByUser: runListPrincipalUserSchema.nullable(),
|
|
1852
2077
|
failureReason: z.string().optional(),
|
|
1853
2078
|
hadCompileJob: z.boolean(),
|
|
1854
2079
|
compileJobId: z.string().nullable(),
|
|
2080
|
+
/**
|
|
2081
|
+
* Distinct bound deployment-environment names across the run's jobs
|
|
2082
|
+
* (first-seen order). Drives the run-list environment chips; empty/absent
|
|
2083
|
+
* when no job binds an environment.
|
|
2084
|
+
*/
|
|
2085
|
+
environments: z.array(z.string()).optional(),
|
|
2086
|
+
/**
|
|
2087
|
+
* Run-level repo provider (origin host) — distinct from `source.provider`
|
|
2088
|
+
* which is derived from the routing key. Drives provider-aware repo links.
|
|
2089
|
+
*/
|
|
2090
|
+
repoProvider: z.string().nullable(),
|
|
2091
|
+
/** True when the run executed a developer's local working tree (`kici run remote`). */
|
|
2092
|
+
localWorkingTree: z.boolean(),
|
|
1855
2093
|
source: runListSourceSchema.nullable()
|
|
1856
2094
|
});
|
|
1857
2095
|
/** Paginated run list response envelope. */
|
|
@@ -2030,7 +2268,23 @@ const orgMemberSchema = z.object({
|
|
|
2030
2268
|
});
|
|
2031
2269
|
/** Response for org members list endpoint. */
|
|
2032
2270
|
const memberListResponseSchema = z.object({ members: z.array(orgMemberSchema) });
|
|
2271
|
+
/**
|
|
2272
|
+
* Every dashboard request type the local build understands, derived from the
|
|
2273
|
+
* discriminated union so it can never drift. A component advertises this set to
|
|
2274
|
+
* describe ITSELF; gating decisions always compare against the REMOTE's
|
|
2275
|
+
* advertised set, never this local one.
|
|
2276
|
+
*/
|
|
2277
|
+
const DASHBOARD_REQUEST_TYPES = dashboardPlatformToOrchSchema.options.map((o) => o.shape.type.value);
|
|
2278
|
+
/** Membership-test form of {@link DASHBOARD_REQUEST_TYPES}. */
|
|
2279
|
+
const DASHBOARD_REQUEST_TYPE_SET = new Set(DASHBOARD_REQUEST_TYPES);
|
|
2280
|
+
/** Structured error code on a dashboard `*.response` frame's `code` field. */
|
|
2281
|
+
const DashboardResponseErrorCode = z.enum([
|
|
2282
|
+
"unsupported_request_type",
|
|
2283
|
+
"invalid_payload",
|
|
2284
|
+
"unsupported_message_type",
|
|
2285
|
+
"internal_error"
|
|
2286
|
+
]);
|
|
2033
2287
|
//#endregion
|
|
2034
|
-
export { EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, 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, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, 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 };
|
|
2288
|
+
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, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, 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 };
|
|
2035
2289
|
|
|
2036
2290
|
//# 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,46 @@ 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
|
+
* The status values a notification subscription may target at the given level.
|
|
53
|
+
*
|
|
54
|
+
* A run-level subscription matches against an `ExecutionRunStatus`; a job-level
|
|
55
|
+
* subscription matches against an `ExecutionJobStatus` (which carries job-only
|
|
56
|
+
* terminal states like `timed_out_stale` / `drift_dropped` / `skipped`). Both
|
|
57
|
+
* the Platform validation and the dashboard editor derive their allowed set
|
|
58
|
+
* from this single helper so server validation and UI options cannot diverge.
|
|
59
|
+
*/
|
|
60
|
+
export declare function statusOptionsForLevel(level: 'run' | 'job'): readonly string[];
|
|
61
|
+
/**
|
|
62
|
+
* Status values for execution steps (execution_steps table + step.status protocol messages).
|
|
63
|
+
*
|
|
64
|
+
* - `pending` — a parallel-group child queued behind `maxParallel`, not yet launched.
|
|
65
|
+
* - `cancelled` — a parallel-group sibling aborted by fail-fast (NOT a failure).
|
|
66
|
+
*/
|
|
38
67
|
export declare const ExecutionStepStatus: z.ZodEnum<{
|
|
39
68
|
skipped: "skipped";
|
|
40
69
|
success: "success";
|
|
70
|
+
pending: "pending";
|
|
41
71
|
running: "running";
|
|
42
72
|
failed: "failed";
|
|
73
|
+
cancelled: "cancelled";
|
|
43
74
|
}>;
|
|
44
75
|
export type ExecutionStepStatus = z.infer<typeof ExecutionStepStatus>;
|
|
76
|
+
/**
|
|
77
|
+
* How a step participates in a job's step concurrency model.
|
|
78
|
+
*
|
|
79
|
+
* - `sequential` — an ordinary step in the flat step sequence.
|
|
80
|
+
* - `parallel-child` — a child of a `parallel()` group, running concurrently
|
|
81
|
+
* with its siblings, each its own observable step.
|
|
82
|
+
* - `parallel-group` — the structural group wrapper (no flat step index); used
|
|
83
|
+
* only for the dashboard band aggregate, not persisted per step.
|
|
84
|
+
*/
|
|
85
|
+
export declare const StepConcurrencyKind: z.ZodEnum<{
|
|
86
|
+
sequential: "sequential";
|
|
87
|
+
"parallel-child": "parallel-child";
|
|
88
|
+
"parallel-group": "parallel-group";
|
|
89
|
+
}>;
|
|
90
|
+
export type StepConcurrencyKind = z.infer<typeof StepConcurrencyKind>;
|
|
45
91
|
/**
|
|
46
92
|
* Distinct reasons a run/job ended because a configured wall-clock timeout
|
|
47
93
|
* was exceeded. Surfaced in the failure/cancel reason so the dashboard can
|
|
@@ -122,8 +168,8 @@ export type CacheOutcome = z.infer<typeof CacheOutcome>;
|
|
|
122
168
|
/** Structured init-failure signal. Presence on a run/job means "never started". */
|
|
123
169
|
export declare const initFailureSchema: z.ZodObject<{
|
|
124
170
|
scope: z.ZodEnum<{
|
|
125
|
-
run: "run";
|
|
126
171
|
job: "job";
|
|
172
|
+
run: "run";
|
|
127
173
|
}>;
|
|
128
174
|
category: z.ZodEnum<{
|
|
129
175
|
secret_resolution: "secret_resolution";
|
|
@@ -159,6 +205,8 @@ export declare const executionStatusSchema: z.ZodObject<{
|
|
|
159
205
|
held: "held";
|
|
160
206
|
}>;
|
|
161
207
|
repoIdentifier: z.ZodOptional<z.ZodString>;
|
|
208
|
+
repoProvider: z.ZodOptional<z.ZodString>;
|
|
209
|
+
localWorkingTree: z.ZodOptional<z.ZodBoolean>;
|
|
162
210
|
sha: z.ZodOptional<z.ZodString>;
|
|
163
211
|
ref: z.ZodOptional<z.ZodString>;
|
|
164
212
|
triggerEvent: z.ZodOptional<z.ZodString>;
|
|
@@ -171,12 +219,16 @@ export declare const executionStatusSchema: z.ZodObject<{
|
|
|
171
219
|
parentRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
220
|
originalRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
221
|
triggeredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
222
|
+
triggeredByAgentLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
triggerActorProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
triggerActorUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
+
triggerActorUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
226
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
175
227
|
logBytes: z.ZodOptional<z.ZodNumber>;
|
|
176
228
|
initFailure: z.ZodOptional<z.ZodObject<{
|
|
177
229
|
scope: z.ZodEnum<{
|
|
178
|
-
run: "run";
|
|
179
230
|
job: "job";
|
|
231
|
+
run: "run";
|
|
180
232
|
}>;
|
|
181
233
|
category: z.ZodEnum<{
|
|
182
234
|
secret_resolution: "secret_resolution";
|
|
@@ -204,12 +256,20 @@ export declare const stepStatusForwardSchema: z.ZodObject<{
|
|
|
204
256
|
state: z.ZodEnum<{
|
|
205
257
|
skipped: "skipped";
|
|
206
258
|
success: "success";
|
|
259
|
+
pending: "pending";
|
|
207
260
|
running: "running";
|
|
208
261
|
failed: "failed";
|
|
262
|
+
cancelled: "cancelled";
|
|
209
263
|
}>;
|
|
210
264
|
timestamp: z.ZodNumber;
|
|
211
265
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
212
266
|
secretsAccessed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
+
concurrencyKind: z.ZodOptional<z.ZodEnum<{
|
|
268
|
+
sequential: "sequential";
|
|
269
|
+
"parallel-child": "parallel-child";
|
|
270
|
+
"parallel-group": "parallel-group";
|
|
271
|
+
}>>;
|
|
272
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
213
273
|
}, z.core.$strip>;
|
|
214
274
|
/** Per-job status forwarded from orchestrator to Platform (real-time). */
|
|
215
275
|
export declare const jobStatusForwardSchema: z.ZodObject<{
|
|
@@ -239,12 +299,13 @@ export declare const jobStatusForwardSchema: z.ZodObject<{
|
|
|
239
299
|
agentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
300
|
orchestratorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
301
|
runsOnLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
303
|
logBytes: z.ZodOptional<z.ZodNumber>;
|
|
243
304
|
timestamp: z.ZodNumber;
|
|
244
305
|
initFailure: z.ZodOptional<z.ZodObject<{
|
|
245
306
|
scope: z.ZodEnum<{
|
|
246
|
-
run: "run";
|
|
247
307
|
job: "job";
|
|
308
|
+
run: "run";
|
|
248
309
|
}>;
|
|
249
310
|
category: z.ZodEnum<{
|
|
250
311
|
secret_resolution: "secret_resolution";
|
|
@@ -289,6 +350,7 @@ export declare const stateReplaySchema: z.ZodObject<{
|
|
|
289
350
|
parentRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
290
351
|
originalRunId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
291
352
|
triggeredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
triggeredByAgentLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
354
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
293
355
|
jobs: z.ZodArray<z.ZodObject<{
|
|
294
356
|
jobId: z.ZodString;
|
|
@@ -300,6 +362,7 @@ export declare const stateReplaySchema: z.ZodObject<{
|
|
|
300
362
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
363
|
agentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
302
364
|
runsOnLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
365
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
366
|
}, z.core.$strip>>;
|
|
304
367
|
}, z.core.$strip>>;
|
|
305
368
|
timestamp: z.ZodNumber;
|