@kici-dev/engine 0.1.14 → 0.1.15
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/README.md +13 -1
- package/dist/audit/access-log-policy.js +12 -0
- package/dist/audit/retention-policy.js +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -7
- package/dist/labels.d.ts +7 -0
- package/dist/labels.js +11 -2
- package/dist/metrics/metric-catalog.generated.d.ts +50 -0
- package/dist/metrics/metric-catalog.generated.js +60 -0
- package/dist/protocol/analytics-events.d.ts +16 -0
- package/dist/protocol/analytics-events.js +20 -0
- package/dist/protocol/dashboard-write-operations.d.ts +4 -1
- package/dist/protocol/dashboard-write-operations.js +11 -1
- package/dist/protocol/messages/access-log.d.ts +16 -0
- package/dist/protocol/messages/access-log.js +3 -0
- package/dist/protocol/messages/actor.d.ts +2 -0
- package/dist/protocol/messages/actor.js +12 -2
- package/dist/protocol/messages/auth.d.ts +1 -0
- package/dist/protocol/messages/capabilities.d.ts +1 -0
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +2 -0
- package/dist/protocol/messages/dashboard.d.ts +559 -6
- package/dist/protocol/messages/dashboard.js +164 -9
- package/dist/protocol/messages/event-log.d.ts +4 -0
- package/dist/protocol/messages/event-log.js +4 -0
- package/dist/protocol/messages/execution-status.d.ts +56 -3
- package/dist/protocol/messages/execution-status.js +44 -4
- package/dist/protocol/messages/orchestrator-agent.d.ts +164 -0
- package/dist/protocol/messages/orchestrator-agent.js +118 -2
- package/dist/protocol/messages/peer.d.ts +13 -0
- package/dist/protocol/messages/peer.js +14 -1
- package/dist/protocol/messages/platform-orchestrator.d.ts +152 -0
- package/dist/protocol/messages/platform-orchestrator.js +3 -55
- package/dist/protocol/messages/run-events.d.ts +1 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +2 -1
- package/dist/provider/lock-file-parse-error.d.ts +14 -0
- package/dist/provider/lock-file-parse-error.js +22 -0
- package/dist/trigger/types.d.ts +8 -1
- package/dist/trigger/types.js +3 -1
- package/dist/ws/close-codes.d.ts +7 -0
- package/dist/ws/close-codes.js +8 -1
- package/package.json +15 -8
- package/sbom.spdx.json +5 -5
|
@@ -5,6 +5,7 @@ import { SourceSubtype } from "./source-registration.js";
|
|
|
5
5
|
import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
|
|
6
6
|
import { dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema } from "./run-events.js";
|
|
7
7
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./event-log.js";
|
|
8
|
+
import { ScalerBackendType } from "../../scaler/scaler-backend-type.js";
|
|
8
9
|
import { globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema } from "./dashboard-global-workflows.js";
|
|
9
10
|
import { z } from "zod";
|
|
10
11
|
//#region src/protocol/messages/dashboard.ts
|
|
@@ -95,6 +96,108 @@ const dashboardStepLogsResponseSchema = z.object({
|
|
|
95
96
|
totalLines: z.number(),
|
|
96
97
|
error: z.string().optional()
|
|
97
98
|
});
|
|
99
|
+
/**
|
|
100
|
+
* Run-summary projection from the orchestrator's execution_runs table.
|
|
101
|
+
*
|
|
102
|
+
* The required fields (`runId` / `routingKey` / `status`) are always present.
|
|
103
|
+
* Every other field is optional: the orchestrator omits what it cannot
|
|
104
|
+
* supply, and the customer runs page degrades a missing field to '—'.
|
|
105
|
+
*/
|
|
106
|
+
const dashboardRunSummarySchema = z.object({
|
|
107
|
+
runId: z.string(),
|
|
108
|
+
routingKey: z.string(),
|
|
109
|
+
status: z.string(),
|
|
110
|
+
repoIdentifier: z.string().nullable().optional(),
|
|
111
|
+
createdAt: z.string(),
|
|
112
|
+
updatedAt: z.string().optional(),
|
|
113
|
+
trigger: z.string().optional(),
|
|
114
|
+
workflowName: z.string().optional(),
|
|
115
|
+
sha: z.string().optional(),
|
|
116
|
+
ref: z.string().optional(),
|
|
117
|
+
triggerEvent: z.string().optional(),
|
|
118
|
+
commitMessage: z.string().optional(),
|
|
119
|
+
jobCount: z.number().optional(),
|
|
120
|
+
startedAt: z.string().optional(),
|
|
121
|
+
completedAt: z.string().optional(),
|
|
122
|
+
durationMs: z.number().optional(),
|
|
123
|
+
parentRunId: z.string().optional(),
|
|
124
|
+
originalRunId: z.string().optional(),
|
|
125
|
+
triggeredBy: z.string().optional(),
|
|
126
|
+
cancelledBy: z.string().optional(),
|
|
127
|
+
failureReason: z.string().optional(),
|
|
128
|
+
hadCompileJob: z.boolean().optional(),
|
|
129
|
+
compileJobId: z.string().optional(),
|
|
130
|
+
source: z.object({
|
|
131
|
+
routingKey: z.string(),
|
|
132
|
+
name: z.string().nullable(),
|
|
133
|
+
subtype: z.string(),
|
|
134
|
+
provider: z.string()
|
|
135
|
+
}).optional()
|
|
136
|
+
});
|
|
137
|
+
/** Request a page of run summaries from the orchestrator. */
|
|
138
|
+
const dashboardRunsListRequestSchema = z.object({
|
|
139
|
+
type: z.literal("dashboard.runs.list"),
|
|
140
|
+
requestId: z.string(),
|
|
141
|
+
actor: actorPrincipalSchema,
|
|
142
|
+
/** Page size (1-200). Bounds protect the orchestrator from unbounded reads. */
|
|
143
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
144
|
+
cursor: z.string().optional()
|
|
145
|
+
});
|
|
146
|
+
/** Response with the page of run summaries + next-page cursor. */
|
|
147
|
+
const dashboardRunsListResponseSchema = z.object({
|
|
148
|
+
type: z.literal("dashboard.runs.list.response"),
|
|
149
|
+
requestId: z.string(),
|
|
150
|
+
runs: z.array(dashboardRunSummarySchema),
|
|
151
|
+
nextCursor: z.string().optional(),
|
|
152
|
+
error: z.string().optional()
|
|
153
|
+
});
|
|
154
|
+
/** Request the distinct filter-option values from the orchestrator. */
|
|
155
|
+
const dashboardRunsFiltersRequestSchema = z.object({
|
|
156
|
+
type: z.literal("dashboard.runs.filters"),
|
|
157
|
+
requestId: z.string(),
|
|
158
|
+
actor: actorPrincipalSchema
|
|
159
|
+
});
|
|
160
|
+
/** Response with the distinct filter-option values. */
|
|
161
|
+
const dashboardRunsFiltersResponseSchema = z.object({
|
|
162
|
+
type: z.literal("dashboard.runs.filters.response"),
|
|
163
|
+
requestId: z.string(),
|
|
164
|
+
statuses: z.array(z.string()),
|
|
165
|
+
workflows: z.array(z.string()),
|
|
166
|
+
branches: z.array(z.string()),
|
|
167
|
+
repositories: z.array(z.string()),
|
|
168
|
+
triggerTypes: z.array(z.string()),
|
|
169
|
+
sources: z.array(z.object({
|
|
170
|
+
routingKey: z.string(),
|
|
171
|
+
name: z.string().nullable()
|
|
172
|
+
})),
|
|
173
|
+
error: z.string().optional()
|
|
174
|
+
});
|
|
175
|
+
/** Minimal source-summary projection from the orchestrator's sources tables. */
|
|
176
|
+
const dashboardSourceSummarySchema = z.object({
|
|
177
|
+
routingKey: z.string(),
|
|
178
|
+
name: z.string().nullable(),
|
|
179
|
+
provider: z.string(),
|
|
180
|
+
subtype: SourceSubtype,
|
|
181
|
+
enabled: z.boolean(),
|
|
182
|
+
createdAt: z.string()
|
|
183
|
+
});
|
|
184
|
+
/** Request a page of source summaries from the orchestrator. */
|
|
185
|
+
const dashboardSourcesListRequestSchema = z.object({
|
|
186
|
+
type: z.literal("dashboard.sources.list"),
|
|
187
|
+
requestId: z.string(),
|
|
188
|
+
actor: actorPrincipalSchema,
|
|
189
|
+
/** Page size (1-200). Bounds protect the orchestrator from unbounded reads. */
|
|
190
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
191
|
+
cursor: z.string().optional()
|
|
192
|
+
});
|
|
193
|
+
/** Response with the page of source summaries + next-page cursor. */
|
|
194
|
+
const dashboardSourcesListResponseSchema = z.object({
|
|
195
|
+
type: z.literal("dashboard.sources.list.response"),
|
|
196
|
+
requestId: z.string(),
|
|
197
|
+
sources: z.array(dashboardSourceSummarySchema),
|
|
198
|
+
nextCursor: z.string().optional(),
|
|
199
|
+
error: z.string().optional()
|
|
200
|
+
});
|
|
98
201
|
/** Request to re-run a completed run. */
|
|
99
202
|
const runRerunRequestSchema = z.object({
|
|
100
203
|
type: z.literal("run.rerun.request"),
|
|
@@ -428,6 +531,7 @@ const envListResponseSchema = z.object({
|
|
|
428
531
|
type: environmentTypeSchema,
|
|
429
532
|
globPattern: z.string().nullable(),
|
|
430
533
|
enabled: z.boolean(),
|
|
534
|
+
allowLocalExecution: z.boolean(),
|
|
431
535
|
createdAt: z.coerce.string(),
|
|
432
536
|
updatedAt: z.coerce.string()
|
|
433
537
|
})).optional(),
|
|
@@ -455,6 +559,7 @@ const envGetResponseSchema = z.object({
|
|
|
455
559
|
waitTimerSeconds: z.number().nullable(),
|
|
456
560
|
holdExpirySeconds: z.number().nullable(),
|
|
457
561
|
enabled: z.boolean(),
|
|
562
|
+
allowLocalExecution: z.boolean(),
|
|
458
563
|
createdAt: z.coerce.string(),
|
|
459
564
|
updatedAt: z.coerce.string()
|
|
460
565
|
}).optional(),
|
|
@@ -506,6 +611,19 @@ const envUpdateResponseSchema = z.object({
|
|
|
506
611
|
requestId: z.string(),
|
|
507
612
|
error: z.string().optional()
|
|
508
613
|
});
|
|
614
|
+
/** Set an environment's test-run access flag (allowLocalExecution). */
|
|
615
|
+
const envTestAccessSetRequestSchema = z.object({
|
|
616
|
+
type: z.literal("dashboard.environments.test_access.set"),
|
|
617
|
+
requestId: z.string(),
|
|
618
|
+
actor: actorPrincipalSchema,
|
|
619
|
+
environmentId: z.string(),
|
|
620
|
+
allowLocalExecution: z.boolean()
|
|
621
|
+
});
|
|
622
|
+
const envTestAccessSetResponseSchema = z.object({
|
|
623
|
+
type: z.literal("dashboard.environments.test_access.set.response"),
|
|
624
|
+
requestId: z.string(),
|
|
625
|
+
error: z.string().optional()
|
|
626
|
+
});
|
|
509
627
|
/** Delete an environment. */
|
|
510
628
|
const envDeleteRequestSchema = z.object({
|
|
511
629
|
type: z.literal("dashboard.environments.delete"),
|
|
@@ -513,10 +631,22 @@ const envDeleteRequestSchema = z.object({
|
|
|
513
631
|
actor: actorPrincipalSchema,
|
|
514
632
|
environmentId: z.string()
|
|
515
633
|
});
|
|
634
|
+
/**
|
|
635
|
+
* Machine-readable codes for environment-delete rejections.
|
|
636
|
+
*
|
|
637
|
+
* Three-category response taxonomy on dashboard responses, each mapped to a
|
|
638
|
+
* distinct HTTP status by the Platform proxy: a bare free-text `error` is the
|
|
639
|
+
* human message and maps to 400; a missing result (e.g. environment not found)
|
|
640
|
+
* maps to 404; an `errorCode` flags a specific business rejection mapped to a
|
|
641
|
+
* non-400/404 status — here `pending_held_runs` → 409. The sibling precedent is
|
|
642
|
+
* the rerun response's `errorCode` (`runArchivedNotRerunnable` → 410) above.
|
|
643
|
+
*/
|
|
644
|
+
const EnvDeleteErrorCode = z.enum(["pending_held_runs"]);
|
|
516
645
|
const envDeleteResponseSchema = z.object({
|
|
517
646
|
type: z.literal("dashboard.environments.delete.response"),
|
|
518
647
|
requestId: z.string(),
|
|
519
|
-
error: z.string().optional()
|
|
648
|
+
error: z.string().optional(),
|
|
649
|
+
errorCode: EnvDeleteErrorCode.optional()
|
|
520
650
|
});
|
|
521
651
|
/** List variables for an environment. */
|
|
522
652
|
const envVarsListRequestSchema = z.object({
|
|
@@ -765,8 +895,8 @@ const heldRunsListResponseSchema = z.object({
|
|
|
765
895
|
heldRuns: z.array(z.object({
|
|
766
896
|
id: z.string(),
|
|
767
897
|
runId: z.string(),
|
|
768
|
-
environmentId: z.string(),
|
|
769
|
-
environmentName: z.string(),
|
|
898
|
+
environmentId: z.string().nullable(),
|
|
899
|
+
environmentName: z.string().nullable(),
|
|
770
900
|
holdType: z.string(),
|
|
771
901
|
queueType: HeldRunQueueType,
|
|
772
902
|
status: HeldRunStatus,
|
|
@@ -840,11 +970,19 @@ const diagnosticsAgentSchema = z.object({
|
|
|
840
970
|
/** Single scaler backend within the diagnostics response. */
|
|
841
971
|
const diagnosticsScalerSchema = z.object({
|
|
842
972
|
name: z.string(),
|
|
843
|
-
type:
|
|
973
|
+
type: ScalerBackendType,
|
|
844
974
|
maxAgents: z.number(),
|
|
845
975
|
activeAgents: z.number(),
|
|
846
976
|
labelSets: z.array(z.array(z.string())),
|
|
847
|
-
config: z.record(z.string(), z.unknown()).optional()
|
|
977
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
978
|
+
/**
|
|
979
|
+
* The spawning host of this scaler, declared statically by its backend.
|
|
980
|
+
* Populated (with the owning orchestrator instance's hostname) for backends
|
|
981
|
+
* that spawn agents on the host itself — bare-metal, Firecracker, container
|
|
982
|
+
* on a local runtime socket. Omitted for backends that provision elsewhere
|
|
983
|
+
* (remote container runtime, future cloud backends).
|
|
984
|
+
*/
|
|
985
|
+
hosts: z.array(z.string()).optional()
|
|
848
986
|
});
|
|
849
987
|
/** Agent info within a peer diagnostics entry (subset of full agent schema). */
|
|
850
988
|
const diagnosticsPeerAgentSchema = z.object({
|
|
@@ -853,7 +991,9 @@ const diagnosticsPeerAgentSchema = z.object({
|
|
|
853
991
|
platform: z.string(),
|
|
854
992
|
arch: z.string(),
|
|
855
993
|
activeJobs: z.number(),
|
|
856
|
-
maxConcurrency: z.number()
|
|
994
|
+
maxConcurrency: z.number(),
|
|
995
|
+
/** Scaler backend that spawned the agent, or null for static (stateful) agents. */
|
|
996
|
+
scalerName: z.string().nullable().optional()
|
|
857
997
|
});
|
|
858
998
|
/** Peer orchestrator reported by coordinator in diagnostics. */
|
|
859
999
|
const diagnosticsPeerSchema = z.object({
|
|
@@ -879,7 +1019,8 @@ const diagnosticsPeerSchema = z.object({
|
|
|
879
1019
|
type: z.string().optional(),
|
|
880
1020
|
activeCount: z.number(),
|
|
881
1021
|
maxAgents: z.number(),
|
|
882
|
-
labelSets: z.array(z.array(z.string()))
|
|
1022
|
+
labelSets: z.array(z.array(z.string())),
|
|
1023
|
+
spawnsOnLocalHost: z.boolean().optional()
|
|
883
1024
|
})).optional(),
|
|
884
1025
|
dependencyHealth: z.array(z.object({
|
|
885
1026
|
name: z.string(),
|
|
@@ -933,7 +1074,13 @@ const dashboardDiagnosticsResponseSchema = z.object({
|
|
|
933
1074
|
/** Total number of registered agents (always populated regardless of includeAgents). */
|
|
934
1075
|
agentCount: z.number().nullable().optional(),
|
|
935
1076
|
/** Number of agents not bound to any scaler. */
|
|
936
|
-
statefulAgentCount: z.number().nullable().optional()
|
|
1077
|
+
statefulAgentCount: z.number().nullable().optional(),
|
|
1078
|
+
/**
|
|
1079
|
+
* Distinct host names of stateful (unbound) agents, derived from their
|
|
1080
|
+
* self-reported kici:host: labels. Lets the dashboard surface the hosts of
|
|
1081
|
+
* long-lived standalone agents on the collapsed "Stateful agents" header.
|
|
1082
|
+
*/
|
|
1083
|
+
statefulHosts: z.array(z.string()).optional()
|
|
937
1084
|
}),
|
|
938
1085
|
agents: z.array(diagnosticsAgentSchema),
|
|
939
1086
|
scalers: z.array(diagnosticsScalerSchema).optional(),
|
|
@@ -1155,6 +1302,9 @@ const backendTestResponseSchema = z.object({
|
|
|
1155
1302
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1156
1303
|
dashboardRunDetailRequestSchema,
|
|
1157
1304
|
dashboardStepLogsRequestSchema,
|
|
1305
|
+
dashboardRunsListRequestSchema,
|
|
1306
|
+
dashboardRunsFiltersRequestSchema,
|
|
1307
|
+
dashboardSourcesListRequestSchema,
|
|
1158
1308
|
runRerunRequestSchema,
|
|
1159
1309
|
manualScheduleRequestSchema,
|
|
1160
1310
|
runCancelRequestSchema,
|
|
@@ -1164,6 +1314,7 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1164
1314
|
envGetRequestSchema,
|
|
1165
1315
|
envCreateRequestSchema,
|
|
1166
1316
|
envUpdateRequestSchema,
|
|
1317
|
+
envTestAccessSetRequestSchema,
|
|
1167
1318
|
envDeleteRequestSchema,
|
|
1168
1319
|
envVarsListRequestSchema,
|
|
1169
1320
|
envVarSetRequestSchema,
|
|
@@ -1209,6 +1360,9 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1209
1360
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1210
1361
|
dashboardRunDetailResponseSchema,
|
|
1211
1362
|
dashboardStepLogsResponseSchema,
|
|
1363
|
+
dashboardRunsListResponseSchema,
|
|
1364
|
+
dashboardRunsFiltersResponseSchema,
|
|
1365
|
+
dashboardSourcesListResponseSchema,
|
|
1212
1366
|
runRerunResponseSchema,
|
|
1213
1367
|
manualScheduleResponseSchema,
|
|
1214
1368
|
runCancelResponseSchema,
|
|
@@ -1218,6 +1372,7 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
|
1218
1372
|
envGetResponseSchema,
|
|
1219
1373
|
envCreateResponseSchema,
|
|
1220
1374
|
envUpdateResponseSchema,
|
|
1375
|
+
envTestAccessSetResponseSchema,
|
|
1221
1376
|
envDeleteResponseSchema,
|
|
1222
1377
|
envVarsListResponseSchema,
|
|
1223
1378
|
envVarSetResponseSchema,
|
|
@@ -1334,6 +1489,6 @@ const orgMemberSchema = z.object({
|
|
|
1334
1489
|
/** Response for org members list endpoint. */
|
|
1335
1490
|
const memberListResponseSchema = z.object({ members: z.array(orgMemberSchema) });
|
|
1336
1491
|
//#endregion
|
|
1337
|
-
export { EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runRerunRequestSchema, trustPolicyResponseSchema };
|
|
1492
|
+
export { EnvDeleteErrorCode, EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runRerunRequestSchema, trustPolicyResponseSchema };
|
|
1338
1493
|
|
|
1339
1494
|
//# sourceMappingURL=dashboard.js.map
|
|
@@ -9,6 +9,9 @@ import { z } from 'zod';
|
|
|
9
9
|
* - `duplicate` — dedup cache rejected the delivery.
|
|
10
10
|
* - `lockfile_missing` — repo lookup succeeded but no lock file was found
|
|
11
11
|
* (and no global workflows matched either).
|
|
12
|
+
* - `lockfile_corrupt` — a lock file was present at the repo ref but could not
|
|
13
|
+
* be parsed or validated; the orchestrator records a `lock_resolution`
|
|
14
|
+
* init-failure run for the delivery.
|
|
12
15
|
* - `failed` — pipeline threw an unhandled error. `error_message` carries
|
|
13
16
|
* the message.
|
|
14
17
|
*/
|
|
@@ -18,6 +21,7 @@ export declare const EventLogStatus: z.ZodEnum<{
|
|
|
18
21
|
processed: "processed";
|
|
19
22
|
duplicate: "duplicate";
|
|
20
23
|
lockfile_missing: "lockfile_missing";
|
|
24
|
+
lockfile_corrupt: "lockfile_corrupt";
|
|
21
25
|
}>;
|
|
22
26
|
export type EventLogStatus = z.infer<typeof EventLogStatus>;
|
|
23
27
|
/**
|
|
@@ -11,6 +11,9 @@ import { z } from "zod";
|
|
|
11
11
|
* - `duplicate` — dedup cache rejected the delivery.
|
|
12
12
|
* - `lockfile_missing` — repo lookup succeeded but no lock file was found
|
|
13
13
|
* (and no global workflows matched either).
|
|
14
|
+
* - `lockfile_corrupt` — a lock file was present at the repo ref but could not
|
|
15
|
+
* be parsed or validated; the orchestrator records a `lock_resolution`
|
|
16
|
+
* init-failure run for the delivery.
|
|
14
17
|
* - `failed` — pipeline threw an unhandled error. `error_message` carries
|
|
15
18
|
* the message.
|
|
16
19
|
*/
|
|
@@ -19,6 +22,7 @@ const EventLogStatus = z.enum([
|
|
|
19
22
|
"processed",
|
|
20
23
|
"duplicate",
|
|
21
24
|
"lockfile_missing",
|
|
25
|
+
"lockfile_corrupt",
|
|
22
26
|
"failed"
|
|
23
27
|
]);
|
|
24
28
|
/**
|
|
@@ -32,18 +32,36 @@ export declare const ExecutionStepStatus: z.ZodEnum<{
|
|
|
32
32
|
skipped: "skipped";
|
|
33
33
|
}>;
|
|
34
34
|
export type ExecutionStepStatus = z.infer<typeof ExecutionStepStatus>;
|
|
35
|
+
/**
|
|
36
|
+
* Distinct reasons a run/job ended because a configured wall-clock timeout
|
|
37
|
+
* was exceeded. Surfaced in the failure/cancel reason so the dashboard can
|
|
38
|
+
* label "timed out" instead of a generic failure.
|
|
39
|
+
*
|
|
40
|
+
* - `job_timeout` — a job exceeded its `timeout` (total job wall-clock,
|
|
41
|
+
* agent-enforced in the forked workflow-runner).
|
|
42
|
+
* - `workflow_timeout` — a run exceeded the workflow `timeout` (whole-run
|
|
43
|
+
* wall-clock, orchestrator-enforced run deadline).
|
|
44
|
+
*
|
|
45
|
+
* Step-level timeouts are reported inline in the step error message and do
|
|
46
|
+
* NOT use this enum (they predate it and stay as-is).
|
|
47
|
+
*/
|
|
48
|
+
export declare const TimeoutReason: z.ZodEnum<{
|
|
49
|
+
job_timeout: "job_timeout";
|
|
50
|
+
workflow_timeout: "workflow_timeout";
|
|
51
|
+
}>;
|
|
52
|
+
export type TimeoutReason = z.infer<typeof TimeoutReason>;
|
|
35
53
|
/**
|
|
36
54
|
* Categories of init failure — i.e. failures that prevent a run from ever
|
|
37
|
-
* executing a step. Set
|
|
55
|
+
* executing a step. Set at the detection site (orchestrator or agent) and
|
|
38
56
|
* persisted alongside the run/job row so the dashboard can render an
|
|
39
57
|
* explanatory banner even when the orchestrator is offline.
|
|
40
58
|
*
|
|
41
59
|
* Scope is carried separately on `initFailureSchema.scope`:
|
|
42
60
|
* - `run`-scoped categories fail the whole run before any job runs
|
|
43
61
|
* (secret_resolution, install_secrets, lock_resolution,
|
|
44
|
-
* build_coordination
|
|
62
|
+
* build_coordination).
|
|
45
63
|
* - `job`-scoped categories fail one job and leave siblings alone
|
|
46
|
-
* (environment_rules, dynamic_eval, no_agent).
|
|
64
|
+
* (environment_rules, dynamic_eval, no_agent, matrix_expansion).
|
|
47
65
|
*/
|
|
48
66
|
export declare const InitFailureCategory: z.ZodEnum<{
|
|
49
67
|
secret_resolution: "secret_resolution";
|
|
@@ -56,6 +74,41 @@ export declare const InitFailureCategory: z.ZodEnum<{
|
|
|
56
74
|
matrix_expansion: "matrix_expansion";
|
|
57
75
|
}>;
|
|
58
76
|
export type InitFailureCategory = z.infer<typeof InitFailureCategory>;
|
|
77
|
+
/**
|
|
78
|
+
* `step_type` values for the user-facing cache pseudo-steps that appear in the
|
|
79
|
+
* run timeline. Mirrors the `hook:*` pseudo-step `step_type` convention: each
|
|
80
|
+
* declarative job/step cache restore or save surfaces as one pseudo-step so the
|
|
81
|
+
* dashboard can render it inline alongside the real steps.
|
|
82
|
+
*/
|
|
83
|
+
export declare const CacheStepType: z.ZodEnum<{
|
|
84
|
+
"cache:restore": "cache:restore";
|
|
85
|
+
"cache:save": "cache:save";
|
|
86
|
+
}>;
|
|
87
|
+
export type CacheStepType = z.infer<typeof CacheStepType>;
|
|
88
|
+
/** `run.event` types emitted for user-facing cache operations. */
|
|
89
|
+
export declare const CacheRunEventType: z.ZodEnum<{
|
|
90
|
+
"cache.restore": "cache.restore";
|
|
91
|
+
"cache.save": "cache.save";
|
|
92
|
+
}>;
|
|
93
|
+
export type CacheRunEventType = z.infer<typeof CacheRunEventType>;
|
|
94
|
+
/**
|
|
95
|
+
* Outcome recorded on a cache pseudo-step (drives the pseudo-step status + the
|
|
96
|
+
* `run.event` metadata).
|
|
97
|
+
*
|
|
98
|
+
* - `hit` — restore found an entry (exact key or restoreKeys prefix).
|
|
99
|
+
* - `miss` — restore found nothing.
|
|
100
|
+
* - `saved` — save uploaded a new entry under the immutable key.
|
|
101
|
+
* - `skipped` — save was a no-op (the immutable exact key already existed).
|
|
102
|
+
* - `error` — the restore/save failed (pack/extract/transport error).
|
|
103
|
+
*/
|
|
104
|
+
export declare const CacheOutcome: z.ZodEnum<{
|
|
105
|
+
error: "error";
|
|
106
|
+
skipped: "skipped";
|
|
107
|
+
hit: "hit";
|
|
108
|
+
miss: "miss";
|
|
109
|
+
saved: "saved";
|
|
110
|
+
}>;
|
|
111
|
+
export type CacheOutcome = z.infer<typeof CacheOutcome>;
|
|
59
112
|
/** Structured init-failure signal. Presence on a run/job means "never started". */
|
|
60
113
|
export declare const initFailureSchema: z.ZodObject<{
|
|
61
114
|
scope: z.ZodEnum<{
|
|
@@ -32,17 +32,31 @@ const ExecutionStepStatus = z.enum([
|
|
|
32
32
|
"skipped"
|
|
33
33
|
]);
|
|
34
34
|
/**
|
|
35
|
+
* Distinct reasons a run/job ended because a configured wall-clock timeout
|
|
36
|
+
* was exceeded. Surfaced in the failure/cancel reason so the dashboard can
|
|
37
|
+
* label "timed out" instead of a generic failure.
|
|
38
|
+
*
|
|
39
|
+
* - `job_timeout` — a job exceeded its `timeout` (total job wall-clock,
|
|
40
|
+
* agent-enforced in the forked workflow-runner).
|
|
41
|
+
* - `workflow_timeout` — a run exceeded the workflow `timeout` (whole-run
|
|
42
|
+
* wall-clock, orchestrator-enforced run deadline).
|
|
43
|
+
*
|
|
44
|
+
* Step-level timeouts are reported inline in the step error message and do
|
|
45
|
+
* NOT use this enum (they predate it and stay as-is).
|
|
46
|
+
*/
|
|
47
|
+
const TimeoutReason = z.enum(["job_timeout", "workflow_timeout"]);
|
|
48
|
+
/**
|
|
35
49
|
* Categories of init failure — i.e. failures that prevent a run from ever
|
|
36
|
-
* executing a step. Set
|
|
50
|
+
* executing a step. Set at the detection site (orchestrator or agent) and
|
|
37
51
|
* persisted alongside the run/job row so the dashboard can render an
|
|
38
52
|
* explanatory banner even when the orchestrator is offline.
|
|
39
53
|
*
|
|
40
54
|
* Scope is carried separately on `initFailureSchema.scope`:
|
|
41
55
|
* - `run`-scoped categories fail the whole run before any job runs
|
|
42
56
|
* (secret_resolution, install_secrets, lock_resolution,
|
|
43
|
-
* build_coordination
|
|
57
|
+
* build_coordination).
|
|
44
58
|
* - `job`-scoped categories fail one job and leave siblings alone
|
|
45
|
-
* (environment_rules, dynamic_eval, no_agent).
|
|
59
|
+
* (environment_rules, dynamic_eval, no_agent, matrix_expansion).
|
|
46
60
|
*/
|
|
47
61
|
const InitFailureCategory = z.enum([
|
|
48
62
|
"secret_resolution",
|
|
@@ -54,6 +68,32 @@ const InitFailureCategory = z.enum([
|
|
|
54
68
|
"no_agent",
|
|
55
69
|
"matrix_expansion"
|
|
56
70
|
]);
|
|
71
|
+
/**
|
|
72
|
+
* `step_type` values for the user-facing cache pseudo-steps that appear in the
|
|
73
|
+
* run timeline. Mirrors the `hook:*` pseudo-step `step_type` convention: each
|
|
74
|
+
* declarative job/step cache restore or save surfaces as one pseudo-step so the
|
|
75
|
+
* dashboard can render it inline alongside the real steps.
|
|
76
|
+
*/
|
|
77
|
+
const CacheStepType = z.enum(["cache:restore", "cache:save"]);
|
|
78
|
+
/** `run.event` types emitted for user-facing cache operations. */
|
|
79
|
+
const CacheRunEventType = z.enum(["cache.restore", "cache.save"]);
|
|
80
|
+
/**
|
|
81
|
+
* Outcome recorded on a cache pseudo-step (drives the pseudo-step status + the
|
|
82
|
+
* `run.event` metadata).
|
|
83
|
+
*
|
|
84
|
+
* - `hit` — restore found an entry (exact key or restoreKeys prefix).
|
|
85
|
+
* - `miss` — restore found nothing.
|
|
86
|
+
* - `saved` — save uploaded a new entry under the immutable key.
|
|
87
|
+
* - `skipped` — save was a no-op (the immutable exact key already existed).
|
|
88
|
+
* - `error` — the restore/save failed (pack/extract/transport error).
|
|
89
|
+
*/
|
|
90
|
+
const CacheOutcome = z.enum([
|
|
91
|
+
"hit",
|
|
92
|
+
"miss",
|
|
93
|
+
"saved",
|
|
94
|
+
"skipped",
|
|
95
|
+
"error"
|
|
96
|
+
]);
|
|
57
97
|
/** Structured init-failure signal. Presence on a run/job means "never started". */
|
|
58
98
|
const initFailureSchema = z.object({
|
|
59
99
|
scope: z.enum(["run", "job"]),
|
|
@@ -201,6 +241,6 @@ const stateReplaySchema = z.object({
|
|
|
201
241
|
timestamp: z.number()
|
|
202
242
|
});
|
|
203
243
|
//#endregion
|
|
204
|
-
export { ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
|
|
244
|
+
export { CacheOutcome, CacheRunEventType, CacheStepType, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
|
|
205
245
|
|
|
206
246
|
//# sourceMappingURL=execution-status.js.map
|