@kici-dev/engine 0.1.23 → 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 +9 -1
- package/dist/audit/activity.d.ts +2 -2
- package/dist/audit/retention-policy.js +2 -0
- package/dist/environment/index.d.ts +2 -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/types.d.ts +8 -2
- package/dist/environment/types.js +18 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -8
- package/dist/inputs/index.d.ts +1 -0
- package/dist/inputs/index.js +2 -1
- package/dist/inputs/schedule.d.ts +19 -0
- package/dist/inputs/schedule.js +33 -0
- package/dist/mcp/tool-schemas.d.ts +41 -0
- package/dist/mcp/tool-schemas.js +49 -0
- package/dist/metrics/metric-catalog.generated.d.ts +20 -0
- package/dist/metrics/metric-catalog.generated.js +24 -0
- package/dist/protocol/messages/access-log.d.ts +29 -15
- package/dist/protocol/messages/access-log.js +3 -1
- 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 +1376 -42
- package/dist/protocol/messages/dashboard.js +161 -6
- 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 +393 -7
- 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 +35 -7
- package/dist/trigger/types.js +7 -2
- package/package.json +1 -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(),
|
|
@@ -1645,8 +1765,11 @@ const testRelayCancelResponseSchema = z.object({
|
|
|
1645
1765
|
/** Dashboard messages flowing from Platform to Orchestrator. */
|
|
1646
1766
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1647
1767
|
dashboardRunDetailRequestSchema,
|
|
1768
|
+
dashboardRunStructuredRequestSchema,
|
|
1648
1769
|
dashboardStepLogsRequestSchema,
|
|
1649
1770
|
dashboardAttestationsListRequestSchema,
|
|
1771
|
+
dashboardAttestationsListAllRequestSchema,
|
|
1772
|
+
dashboardAttestationGetRequestSchema,
|
|
1650
1773
|
dashboardRunsListRequestSchema,
|
|
1651
1774
|
dashboardRunsFiltersRequestSchema,
|
|
1652
1775
|
dashboardSourcesListRequestSchema,
|
|
@@ -1715,8 +1838,11 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1715
1838
|
/** Dashboard messages flowing from Orchestrator to Platform. */
|
|
1716
1839
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1717
1840
|
dashboardRunDetailResponseSchema,
|
|
1841
|
+
dashboardRunStructuredResponseSchema,
|
|
1718
1842
|
dashboardStepLogsResponseSchema,
|
|
1719
1843
|
dashboardAttestationsListResponseSchema,
|
|
1844
|
+
dashboardAttestationsListAllResponseSchema,
|
|
1845
|
+
dashboardAttestationGetResponseSchema,
|
|
1720
1846
|
dashboardRunsListResponseSchema,
|
|
1721
1847
|
dashboardRunsFiltersResponseSchema,
|
|
1722
1848
|
dashboardSourcesListResponseSchema,
|
|
@@ -1852,6 +1978,19 @@ const runListItemSchema = z.object({
|
|
|
1852
1978
|
failureReason: z.string().optional(),
|
|
1853
1979
|
hadCompileJob: z.boolean(),
|
|
1854
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(),
|
|
1855
1994
|
source: runListSourceSchema.nullable()
|
|
1856
1995
|
});
|
|
1857
1996
|
/** Paginated run list response envelope. */
|
|
@@ -2030,7 +2169,23 @@ const orgMemberSchema = z.object({
|
|
|
2030
2169
|
});
|
|
2031
2170
|
/** Response for org members list endpoint. */
|
|
2032
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
|
+
]);
|
|
2033
2188
|
//#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 };
|
|
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 };
|
|
2035
2190
|
|
|
2036
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;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/protocol/messages/execution-status.ts
|
|
4
|
+
/** Max length for ids and short identifier fields (runId, jobId, sha, ref, …). */
|
|
5
|
+
const STATUS_ID_MAX = 128;
|
|
6
|
+
/** Max length for the repo identifier (`owner/repo` can be long). */
|
|
7
|
+
const REPO_IDENTIFIER_MAX = 256;
|
|
8
|
+
/** Max length for free-text fields (commit message, failure/error reason). */
|
|
9
|
+
const STATUS_FREE_TEXT_MAX = 2e3;
|
|
10
|
+
/** Max number of runs in a single `state.replay` snapshot. */
|
|
11
|
+
const STATE_REPLAY_MAX_RUNS = 500;
|
|
12
|
+
/** Max number of jobs attached to a single run in a `state.replay` snapshot. */
|
|
13
|
+
const MAX_JOBS_PER_RUN = 1e3;
|
|
14
|
+
/** Max number of `runsOn` / `secretsAccessed` label entries on a job/step. */
|
|
15
|
+
const RUNS_ON_LABELS_MAX = 30;
|
|
16
|
+
/** Max number of bound deployment-environment names on a job. */
|
|
17
|
+
const ENVIRONMENTS_MAX = 30;
|
|
4
18
|
/**
|
|
5
19
|
* Status values for execution runs (execution_runs table).
|
|
6
20
|
*
|
|
@@ -34,12 +48,33 @@ const ExecutionJobStatus = z.enum([
|
|
|
34
48
|
"timed_out_stale",
|
|
35
49
|
"drift_dropped"
|
|
36
50
|
]);
|
|
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
|
const ExecutionStepStatus = z.enum([
|
|
39
58
|
"running",
|
|
40
59
|
"success",
|
|
41
60
|
"failed",
|
|
42
|
-
"skipped"
|
|
61
|
+
"skipped",
|
|
62
|
+
"pending",
|
|
63
|
+
"cancelled"
|
|
64
|
+
]);
|
|
65
|
+
/**
|
|
66
|
+
* How a step participates in a job's step concurrency model.
|
|
67
|
+
*
|
|
68
|
+
* - `sequential` — an ordinary step in the flat step sequence.
|
|
69
|
+
* - `parallel-child` — a child of a `parallel()` group, running concurrently
|
|
70
|
+
* with its siblings, each its own observable step.
|
|
71
|
+
* - `parallel-group` — the structural group wrapper (no flat step index); used
|
|
72
|
+
* only for the dashboard band aggregate, not persisted per step.
|
|
73
|
+
*/
|
|
74
|
+
const StepConcurrencyKind = z.enum([
|
|
75
|
+
"sequential",
|
|
76
|
+
"parallel-child",
|
|
77
|
+
"parallel-group"
|
|
43
78
|
]);
|
|
44
79
|
/**
|
|
45
80
|
* Distinct reasons a run/job ended because a configured wall-clock timeout
|
|
@@ -109,9 +144,9 @@ const initFailureSchema = z.object({
|
|
|
109
144
|
scope: z.enum(["run", "job"]),
|
|
110
145
|
category: InitFailureCategory,
|
|
111
146
|
/** Human-readable failure message (same content surfaced by RunFailureSummary). */
|
|
112
|
-
message: z.string(),
|
|
147
|
+
message: z.string().max(STATUS_FREE_TEXT_MAX),
|
|
113
148
|
/** Set when scope === 'job'. */
|
|
114
|
-
jobName: z.string().optional()
|
|
149
|
+
jobName: z.string().max(128).optional()
|
|
115
150
|
});
|
|
116
151
|
/** Terminal run states that indicate the run has completed. */
|
|
117
152
|
const TERMINAL_RUN_STATES = new Set([
|
|
@@ -131,31 +166,50 @@ const TERMINAL_JOB_STATES = new Set([
|
|
|
131
166
|
/** Structured execution status update for Platform metadata tracking. */
|
|
132
167
|
const executionStatusSchema = z.object({
|
|
133
168
|
type: z.literal("execution.status"),
|
|
134
|
-
messageId: z.string(),
|
|
135
|
-
runId: z.string(),
|
|
136
|
-
workflowName: z.string(),
|
|
169
|
+
messageId: z.string().max(128),
|
|
170
|
+
runId: z.string().max(128),
|
|
171
|
+
workflowName: z.string().max(128),
|
|
137
172
|
status: ExecutionRunStatus,
|
|
138
|
-
repoIdentifier: z.string().optional(),
|
|
139
|
-
|
|
173
|
+
repoIdentifier: z.string().max(256).optional(),
|
|
174
|
+
/**
|
|
175
|
+
* Run-level repo provider (origin host: `github` / `gitlab` / `bitbucket` /
|
|
176
|
+
* `local`). Distinct from the routing-key-derived source provider; drives the
|
|
177
|
+
* dashboard's provider-aware repo links.
|
|
178
|
+
*/
|
|
179
|
+
repoProvider: z.string().max(128).optional(),
|
|
180
|
+
/** True when the run executed a developer's uploaded local working tree (`kici run remote`). */
|
|
181
|
+
localWorkingTree: z.boolean().optional(),
|
|
182
|
+
sha: z.string().max(128).optional(),
|
|
140
183
|
/** Git branch or tag (e.g. "main", "refs/tags/v1.0"). */
|
|
141
|
-
ref: z.string().optional(),
|
|
184
|
+
ref: z.string().max(128).optional(),
|
|
142
185
|
/** Trigger event type (e.g. "push", "pr:open"). */
|
|
143
|
-
triggerEvent: z.string().optional(),
|
|
186
|
+
triggerEvent: z.string().max(128).optional(),
|
|
144
187
|
/** First line of the commit message. */
|
|
145
|
-
commitMessage: z.string().optional(),
|
|
188
|
+
commitMessage: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
|
|
146
189
|
jobCount: z.number().optional(),
|
|
147
190
|
startedAt: z.number(),
|
|
148
191
|
completedAt: z.number().optional(),
|
|
149
192
|
durationMs: z.number().optional(),
|
|
150
193
|
timestamp: z.number(),
|
|
151
194
|
/** Parent run ID for re-run lineage (null/undefined for original runs). */
|
|
152
|
-
parentRunId: z.string().nullable().optional(),
|
|
195
|
+
parentRunId: z.string().max(128).nullable().optional(),
|
|
153
196
|
/** Root ancestor run ID for re-run lineage (null/undefined for original runs). Always points to the first run in the chain. */
|
|
154
|
-
originalRunId: z.string().nullable().optional(),
|
|
197
|
+
originalRunId: z.string().max(128).nullable().optional(),
|
|
155
198
|
/** User identity that triggered this re-run (null/undefined for webhook-triggered). */
|
|
156
|
-
triggeredBy: z.string().nullable().optional(),
|
|
199
|
+
triggeredBy: z.string().max(128).nullable().optional(),
|
|
200
|
+
/**
|
|
201
|
+
* Triggering-actor identity captured from the provider event (the pusher / PR
|
|
202
|
+
* author), distinct from `triggeredBy` (the KiCI re-run user). Provider
|
|
203
|
+
* identities only — never tenant attribution (the wire-schema invariant: no
|
|
204
|
+
* `orgId` here). Powers the dashboard "triggered by @x" and actor-scope
|
|
205
|
+
* notifications. `triggerActorUsername` uses the wider repo-identifier bound
|
|
206
|
+
* because provider logins can be long display names.
|
|
207
|
+
*/
|
|
208
|
+
triggerActorProvider: z.string().max(128).nullable().optional(),
|
|
209
|
+
triggerActorUsername: z.string().max(256).nullable().optional(),
|
|
210
|
+
triggerActorUserId: z.string().max(128).nullable().optional(),
|
|
157
211
|
/** Human-readable reason why the run failed (only present for failed runs). */
|
|
158
|
-
failureReason: z.string().optional(),
|
|
212
|
+
failureReason: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
|
|
159
213
|
/**
|
|
160
214
|
* Total raw log bytes accumulated across all jobs of this run, summed by the
|
|
161
215
|
* orchestrator from per-step `logBytesStreamed` values reported by the agent.
|
|
@@ -173,35 +227,41 @@ const executionStatusSchema = z.object({
|
|
|
173
227
|
/** Per-step status forwarded from agent to Platform (real-time). */
|
|
174
228
|
const stepStatusForwardSchema = z.object({
|
|
175
229
|
type: z.literal("step.status.forward"),
|
|
176
|
-
messageId: z.string(),
|
|
177
|
-
runId: z.string(),
|
|
178
|
-
jobId: z.string(),
|
|
179
|
-
jobName: z.string(),
|
|
230
|
+
messageId: z.string().max(128),
|
|
231
|
+
runId: z.string().max(128),
|
|
232
|
+
jobId: z.string().max(128),
|
|
233
|
+
jobName: z.string().max(128),
|
|
180
234
|
stepIndex: z.number(),
|
|
181
|
-
stepName: z.string(),
|
|
235
|
+
stepName: z.string().max(256),
|
|
182
236
|
state: ExecutionStepStatus,
|
|
183
237
|
timestamp: z.number(),
|
|
184
|
-
data: z.record(z.string(), z.unknown()).optional(),
|
|
238
|
+
data: z.record(z.string().max(128), z.unknown()).optional(),
|
|
185
239
|
/** Secret key names accessed by this step. Forwarded from agent for dashboard display. */
|
|
186
|
-
secretsAccessed: z.array(z.string()).optional()
|
|
240
|
+
secretsAccessed: z.array(z.string().max(128)).max(30).optional(),
|
|
241
|
+
/** Step concurrency role; absent means an ordinary sequential step. */
|
|
242
|
+
concurrencyKind: StepConcurrencyKind.optional(),
|
|
243
|
+
/** Parallel-group correlation id shared by a group's children (e.g. `g0`). */
|
|
244
|
+
groupId: z.string().max(128).optional()
|
|
187
245
|
});
|
|
188
246
|
/** Per-job status forwarded from orchestrator to Platform (real-time). */
|
|
189
247
|
const jobStatusForwardSchema = z.object({
|
|
190
248
|
type: z.literal("job.status.forward"),
|
|
191
|
-
messageId: z.string(),
|
|
192
|
-
runId: z.string(),
|
|
193
|
-
jobId: z.string(),
|
|
194
|
-
jobName: z.string(),
|
|
249
|
+
messageId: z.string().max(128),
|
|
250
|
+
runId: z.string().max(128),
|
|
251
|
+
jobId: z.string().max(128),
|
|
252
|
+
jobName: z.string().max(128),
|
|
195
253
|
status: ExecutionJobStatus,
|
|
196
|
-
matrixValues: z.record(z.string(), z.unknown()).optional(),
|
|
254
|
+
matrixValues: z.record(z.string().max(128), z.unknown()).optional(),
|
|
197
255
|
startedAt: z.number().optional(),
|
|
198
256
|
completedAt: z.number().optional(),
|
|
199
257
|
durationMs: z.number().optional(),
|
|
200
|
-
errorMessage: z.string().nullable().optional(),
|
|
201
|
-
agentId: z.string().nullable().optional(),
|
|
202
|
-
orchestratorId: z.string().nullable().optional(),
|
|
258
|
+
errorMessage: z.string().max(STATUS_FREE_TEXT_MAX).nullable().optional(),
|
|
259
|
+
agentId: z.string().max(128).nullable().optional(),
|
|
260
|
+
orchestratorId: z.string().max(128).nullable().optional(),
|
|
203
261
|
/** Labels used for agent routing. */
|
|
204
|
-
runsOnLabels: z.array(z.string()).optional(),
|
|
262
|
+
runsOnLabels: z.array(z.string().max(128)).max(30).optional(),
|
|
263
|
+
/** Ordered bound deployment-environment names for this job (multi-env jobs). */
|
|
264
|
+
environments: z.array(z.string().max(128)).max(30).optional(),
|
|
205
265
|
/**
|
|
206
266
|
* Total raw log bytes accumulated across all steps of this job, summed by
|
|
207
267
|
* the orchestrator from per-step `logBytesStreamed` values reported by the
|
|
@@ -216,41 +276,42 @@ const jobStatusForwardSchema = z.object({
|
|
|
216
276
|
/** State replay sent on orchestrator reconnection -- full snapshot of active runs and jobs. */
|
|
217
277
|
const stateReplaySchema = z.object({
|
|
218
278
|
type: z.literal("state.replay"),
|
|
219
|
-
messageId: z.string(),
|
|
279
|
+
messageId: z.string().max(128),
|
|
220
280
|
runs: z.array(z.object({
|
|
221
|
-
runId: z.string(),
|
|
222
|
-
workflowName: z.string(),
|
|
281
|
+
runId: z.string().max(128),
|
|
282
|
+
workflowName: z.string().max(128),
|
|
223
283
|
status: ExecutionRunStatus,
|
|
224
|
-
routingKey: z.string().optional(),
|
|
225
|
-
repoIdentifier: z.string().optional(),
|
|
226
|
-
sha: z.string().optional(),
|
|
227
|
-
ref: z.string().optional(),
|
|
228
|
-
triggerEvent: z.string().optional(),
|
|
229
|
-
commitMessage: z.string().optional(),
|
|
284
|
+
routingKey: z.string().max(128).optional(),
|
|
285
|
+
repoIdentifier: z.string().max(256).optional(),
|
|
286
|
+
sha: z.string().max(128).optional(),
|
|
287
|
+
ref: z.string().max(128).optional(),
|
|
288
|
+
triggerEvent: z.string().max(128).optional(),
|
|
289
|
+
commitMessage: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
|
|
230
290
|
jobCount: z.number(),
|
|
231
291
|
startedAt: z.number(),
|
|
232
292
|
completedAt: z.number().optional(),
|
|
233
293
|
durationMs: z.number().optional(),
|
|
234
|
-
parentRunId: z.string().nullable().optional(),
|
|
235
|
-
originalRunId: z.string().nullable().optional(),
|
|
236
|
-
triggeredBy: z.string().nullable().optional(),
|
|
294
|
+
parentRunId: z.string().max(128).nullable().optional(),
|
|
295
|
+
originalRunId: z.string().max(128).nullable().optional(),
|
|
296
|
+
triggeredBy: z.string().max(128).nullable().optional(),
|
|
237
297
|
/** Human-readable reason why the run failed (only present for failed runs). */
|
|
238
|
-
failureReason: z.string().optional(),
|
|
298
|
+
failureReason: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
|
|
239
299
|
jobs: z.array(z.object({
|
|
240
|
-
jobId: z.string(),
|
|
241
|
-
jobName: z.string(),
|
|
242
|
-
status: z.string(),
|
|
300
|
+
jobId: z.string().max(128),
|
|
301
|
+
jobName: z.string().max(128),
|
|
302
|
+
status: z.string().max(128),
|
|
243
303
|
startedAt: z.number().optional(),
|
|
244
304
|
completedAt: z.number().optional(),
|
|
245
305
|
durationMs: z.number().optional(),
|
|
246
|
-
errorMessage: z.string().nullable().optional(),
|
|
247
|
-
agentId: z.string().nullable().optional(),
|
|
248
|
-
runsOnLabels: z.array(z.string()).optional()
|
|
249
|
-
|
|
250
|
-
|
|
306
|
+
errorMessage: z.string().max(STATUS_FREE_TEXT_MAX).nullable().optional(),
|
|
307
|
+
agentId: z.string().max(128).nullable().optional(),
|
|
308
|
+
runsOnLabels: z.array(z.string().max(128)).max(30).optional(),
|
|
309
|
+
environments: z.array(z.string().max(128)).max(30).optional()
|
|
310
|
+
})).max(MAX_JOBS_PER_RUN)
|
|
311
|
+
})).max(500),
|
|
251
312
|
timestamp: z.number()
|
|
252
313
|
});
|
|
253
314
|
//#endregion
|
|
254
|
-
export { CacheOutcome, CacheRunEventType, CacheStepType, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
|
|
315
|
+
export { CacheOutcome, CacheRunEventType, CacheStepType, ENVIRONMENTS_MAX, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, MAX_JOBS_PER_RUN, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
|
|
255
316
|
|
|
256
317
|
//# sourceMappingURL=execution-status.js.map
|