@kici-dev/engine 0.1.14 → 0.1.16
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/approval/types.d.ts +56 -0
- package/dist/approval/types.js +42 -0
- package/dist/audit/access-log-policy.js +14 -0
- package/dist/audit/retention-policy.js +10 -0
- package/dist/environment/types.d.ts +8 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +10 -8
- 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 +26 -0
- package/dist/protocol/messages/access-log.js +5 -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 +619 -6
- package/dist/protocol/messages/dashboard.js +179 -10
- 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 +284 -0
- package/dist/protocol/messages/orchestrator-agent.js +202 -4
- package/dist/protocol/messages/peer.d.ts +89 -0
- package/dist/protocol/messages/peer.js +50 -2
- package/dist/protocol/messages/platform-orchestrator.d.ts +168 -6
- package/dist/protocol/messages/platform-orchestrator.js +15 -56
- package/dist/protocol/messages/run-events.d.ts +1 -0
- package/dist/provenance/schema.d.ts +407 -0
- package/dist/provenance/schema.js +143 -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 +29 -1
- package/dist/trigger/types.js +4 -1
- package/dist/ws/close-codes.d.ts +7 -0
- package/dist/ws/close-codes.js +8 -1
- package/package.json +19 -8
- package/sbom.spdx.json +5 -5
|
@@ -5,6 +5,8 @@ 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";
|
|
9
|
+
import { ApprovalDecision, HoldScope, approverClauseSchema } from "../../approval/types.js";
|
|
8
10
|
import { globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema } from "./dashboard-global-workflows.js";
|
|
9
11
|
import { z } from "zod";
|
|
10
12
|
//#region src/protocol/messages/dashboard.ts
|
|
@@ -95,6 +97,108 @@ const dashboardStepLogsResponseSchema = z.object({
|
|
|
95
97
|
totalLines: z.number(),
|
|
96
98
|
error: z.string().optional()
|
|
97
99
|
});
|
|
100
|
+
/**
|
|
101
|
+
* Run-summary projection from the orchestrator's execution_runs table.
|
|
102
|
+
*
|
|
103
|
+
* The required fields (`runId` / `routingKey` / `status`) are always present.
|
|
104
|
+
* Every other field is optional: the orchestrator omits what it cannot
|
|
105
|
+
* supply, and the customer runs page degrades a missing field to '—'.
|
|
106
|
+
*/
|
|
107
|
+
const dashboardRunSummarySchema = z.object({
|
|
108
|
+
runId: z.string(),
|
|
109
|
+
routingKey: z.string(),
|
|
110
|
+
status: z.string(),
|
|
111
|
+
repoIdentifier: z.string().nullable().optional(),
|
|
112
|
+
createdAt: z.string(),
|
|
113
|
+
updatedAt: z.string().optional(),
|
|
114
|
+
trigger: z.string().optional(),
|
|
115
|
+
workflowName: z.string().optional(),
|
|
116
|
+
sha: z.string().optional(),
|
|
117
|
+
ref: z.string().optional(),
|
|
118
|
+
triggerEvent: z.string().optional(),
|
|
119
|
+
commitMessage: z.string().optional(),
|
|
120
|
+
jobCount: z.number().optional(),
|
|
121
|
+
startedAt: z.string().optional(),
|
|
122
|
+
completedAt: z.string().optional(),
|
|
123
|
+
durationMs: z.number().optional(),
|
|
124
|
+
parentRunId: z.string().optional(),
|
|
125
|
+
originalRunId: z.string().optional(),
|
|
126
|
+
triggeredBy: z.string().optional(),
|
|
127
|
+
cancelledBy: z.string().optional(),
|
|
128
|
+
failureReason: z.string().optional(),
|
|
129
|
+
hadCompileJob: z.boolean().optional(),
|
|
130
|
+
compileJobId: z.string().optional(),
|
|
131
|
+
source: z.object({
|
|
132
|
+
routingKey: z.string(),
|
|
133
|
+
name: z.string().nullable(),
|
|
134
|
+
subtype: z.string(),
|
|
135
|
+
provider: z.string()
|
|
136
|
+
}).optional()
|
|
137
|
+
});
|
|
138
|
+
/** Request a page of run summaries from the orchestrator. */
|
|
139
|
+
const dashboardRunsListRequestSchema = z.object({
|
|
140
|
+
type: z.literal("dashboard.runs.list"),
|
|
141
|
+
requestId: z.string(),
|
|
142
|
+
actor: actorPrincipalSchema,
|
|
143
|
+
/** Page size (1-200). Bounds protect the orchestrator from unbounded reads. */
|
|
144
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
145
|
+
cursor: z.string().optional()
|
|
146
|
+
});
|
|
147
|
+
/** Response with the page of run summaries + next-page cursor. */
|
|
148
|
+
const dashboardRunsListResponseSchema = z.object({
|
|
149
|
+
type: z.literal("dashboard.runs.list.response"),
|
|
150
|
+
requestId: z.string(),
|
|
151
|
+
runs: z.array(dashboardRunSummarySchema),
|
|
152
|
+
nextCursor: z.string().optional(),
|
|
153
|
+
error: z.string().optional()
|
|
154
|
+
});
|
|
155
|
+
/** Request the distinct filter-option values from the orchestrator. */
|
|
156
|
+
const dashboardRunsFiltersRequestSchema = z.object({
|
|
157
|
+
type: z.literal("dashboard.runs.filters"),
|
|
158
|
+
requestId: z.string(),
|
|
159
|
+
actor: actorPrincipalSchema
|
|
160
|
+
});
|
|
161
|
+
/** Response with the distinct filter-option values. */
|
|
162
|
+
const dashboardRunsFiltersResponseSchema = z.object({
|
|
163
|
+
type: z.literal("dashboard.runs.filters.response"),
|
|
164
|
+
requestId: z.string(),
|
|
165
|
+
statuses: z.array(z.string()),
|
|
166
|
+
workflows: z.array(z.string()),
|
|
167
|
+
branches: z.array(z.string()),
|
|
168
|
+
repositories: z.array(z.string()),
|
|
169
|
+
triggerTypes: z.array(z.string()),
|
|
170
|
+
sources: z.array(z.object({
|
|
171
|
+
routingKey: z.string(),
|
|
172
|
+
name: z.string().nullable()
|
|
173
|
+
})),
|
|
174
|
+
error: z.string().optional()
|
|
175
|
+
});
|
|
176
|
+
/** Minimal source-summary projection from the orchestrator's sources tables. */
|
|
177
|
+
const dashboardSourceSummarySchema = z.object({
|
|
178
|
+
routingKey: z.string(),
|
|
179
|
+
name: z.string().nullable(),
|
|
180
|
+
provider: z.string(),
|
|
181
|
+
subtype: SourceSubtype,
|
|
182
|
+
enabled: z.boolean(),
|
|
183
|
+
createdAt: z.string()
|
|
184
|
+
});
|
|
185
|
+
/** Request a page of source summaries from the orchestrator. */
|
|
186
|
+
const dashboardSourcesListRequestSchema = z.object({
|
|
187
|
+
type: z.literal("dashboard.sources.list"),
|
|
188
|
+
requestId: z.string(),
|
|
189
|
+
actor: actorPrincipalSchema,
|
|
190
|
+
/** Page size (1-200). Bounds protect the orchestrator from unbounded reads. */
|
|
191
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
192
|
+
cursor: z.string().optional()
|
|
193
|
+
});
|
|
194
|
+
/** Response with the page of source summaries + next-page cursor. */
|
|
195
|
+
const dashboardSourcesListResponseSchema = z.object({
|
|
196
|
+
type: z.literal("dashboard.sources.list.response"),
|
|
197
|
+
requestId: z.string(),
|
|
198
|
+
sources: z.array(dashboardSourceSummarySchema),
|
|
199
|
+
nextCursor: z.string().optional(),
|
|
200
|
+
error: z.string().optional()
|
|
201
|
+
});
|
|
98
202
|
/** Request to re-run a completed run. */
|
|
99
203
|
const runRerunRequestSchema = z.object({
|
|
100
204
|
type: z.literal("run.rerun.request"),
|
|
@@ -428,6 +532,7 @@ const envListResponseSchema = z.object({
|
|
|
428
532
|
type: environmentTypeSchema,
|
|
429
533
|
globPattern: z.string().nullable(),
|
|
430
534
|
enabled: z.boolean(),
|
|
535
|
+
allowLocalExecution: z.boolean(),
|
|
431
536
|
createdAt: z.coerce.string(),
|
|
432
537
|
updatedAt: z.coerce.string()
|
|
433
538
|
})).optional(),
|
|
@@ -455,6 +560,7 @@ const envGetResponseSchema = z.object({
|
|
|
455
560
|
waitTimerSeconds: z.number().nullable(),
|
|
456
561
|
holdExpirySeconds: z.number().nullable(),
|
|
457
562
|
enabled: z.boolean(),
|
|
563
|
+
allowLocalExecution: z.boolean(),
|
|
458
564
|
createdAt: z.coerce.string(),
|
|
459
565
|
updatedAt: z.coerce.string()
|
|
460
566
|
}).optional(),
|
|
@@ -506,6 +612,19 @@ const envUpdateResponseSchema = z.object({
|
|
|
506
612
|
requestId: z.string(),
|
|
507
613
|
error: z.string().optional()
|
|
508
614
|
});
|
|
615
|
+
/** Set an environment's test-run access flag (allowLocalExecution). */
|
|
616
|
+
const envTestAccessSetRequestSchema = z.object({
|
|
617
|
+
type: z.literal("dashboard.environments.test_access.set"),
|
|
618
|
+
requestId: z.string(),
|
|
619
|
+
actor: actorPrincipalSchema,
|
|
620
|
+
environmentId: z.string(),
|
|
621
|
+
allowLocalExecution: z.boolean()
|
|
622
|
+
});
|
|
623
|
+
const envTestAccessSetResponseSchema = z.object({
|
|
624
|
+
type: z.literal("dashboard.environments.test_access.set.response"),
|
|
625
|
+
requestId: z.string(),
|
|
626
|
+
error: z.string().optional()
|
|
627
|
+
});
|
|
509
628
|
/** Delete an environment. */
|
|
510
629
|
const envDeleteRequestSchema = z.object({
|
|
511
630
|
type: z.literal("dashboard.environments.delete"),
|
|
@@ -513,10 +632,22 @@ const envDeleteRequestSchema = z.object({
|
|
|
513
632
|
actor: actorPrincipalSchema,
|
|
514
633
|
environmentId: z.string()
|
|
515
634
|
});
|
|
635
|
+
/**
|
|
636
|
+
* Machine-readable codes for environment-delete rejections.
|
|
637
|
+
*
|
|
638
|
+
* Three-category response taxonomy on dashboard responses, each mapped to a
|
|
639
|
+
* distinct HTTP status by the Platform proxy: a bare free-text `error` is the
|
|
640
|
+
* human message and maps to 400; a missing result (e.g. environment not found)
|
|
641
|
+
* maps to 404; an `errorCode` flags a specific business rejection mapped to a
|
|
642
|
+
* non-400/404 status — here `pending_held_runs` → 409. The sibling precedent is
|
|
643
|
+
* the rerun response's `errorCode` (`runArchivedNotRerunnable` → 410) above.
|
|
644
|
+
*/
|
|
645
|
+
const EnvDeleteErrorCode = z.enum(["pending_held_runs"]);
|
|
516
646
|
const envDeleteResponseSchema = z.object({
|
|
517
647
|
type: z.literal("dashboard.environments.delete.response"),
|
|
518
648
|
requestId: z.string(),
|
|
519
|
-
error: z.string().optional()
|
|
649
|
+
error: z.string().optional(),
|
|
650
|
+
errorCode: EnvDeleteErrorCode.optional()
|
|
520
651
|
});
|
|
521
652
|
/** List variables for an environment. */
|
|
522
653
|
const envVarsListRequestSchema = z.object({
|
|
@@ -765,8 +896,8 @@ const heldRunsListResponseSchema = z.object({
|
|
|
765
896
|
heldRuns: z.array(z.object({
|
|
766
897
|
id: z.string(),
|
|
767
898
|
runId: z.string(),
|
|
768
|
-
environmentId: z.string(),
|
|
769
|
-
environmentName: z.string(),
|
|
899
|
+
environmentId: z.string().nullable(),
|
|
900
|
+
environmentName: z.string().nullable(),
|
|
770
901
|
holdType: z.string(),
|
|
771
902
|
queueType: HeldRunQueueType,
|
|
772
903
|
status: HeldRunStatus,
|
|
@@ -776,7 +907,20 @@ const heldRunsListResponseSchema = z.object({
|
|
|
776
907
|
reason: z.string().nullable(),
|
|
777
908
|
expiresAt: z.coerce.string().nullable(),
|
|
778
909
|
contributorUsername: z.string().nullable().optional(),
|
|
779
|
-
trustTier: z.string().nullable().optional()
|
|
910
|
+
trustTier: z.string().nullable().optional(),
|
|
911
|
+
jobId: z.string().optional(),
|
|
912
|
+
holdScope: HoldScope.optional(),
|
|
913
|
+
stepIndex: z.number().nullable().optional(),
|
|
914
|
+
requirement: z.object({
|
|
915
|
+
clauses: z.array(approverClauseSchema),
|
|
916
|
+
reason: z.string().nullable().optional()
|
|
917
|
+
}).nullable().optional(),
|
|
918
|
+
decisions: z.array(z.object({
|
|
919
|
+
approverUserId: z.string(),
|
|
920
|
+
decision: ApprovalDecision,
|
|
921
|
+
clausesSatisfied: z.array(approverClauseSchema).nullable().optional(),
|
|
922
|
+
createdAt: z.coerce.string()
|
|
923
|
+
})).optional()
|
|
780
924
|
})).optional(),
|
|
781
925
|
error: z.string().optional()
|
|
782
926
|
});
|
|
@@ -840,11 +984,19 @@ const diagnosticsAgentSchema = z.object({
|
|
|
840
984
|
/** Single scaler backend within the diagnostics response. */
|
|
841
985
|
const diagnosticsScalerSchema = z.object({
|
|
842
986
|
name: z.string(),
|
|
843
|
-
type:
|
|
987
|
+
type: ScalerBackendType,
|
|
844
988
|
maxAgents: z.number(),
|
|
845
989
|
activeAgents: z.number(),
|
|
846
990
|
labelSets: z.array(z.array(z.string())),
|
|
847
|
-
config: z.record(z.string(), z.unknown()).optional()
|
|
991
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
992
|
+
/**
|
|
993
|
+
* The spawning host of this scaler, declared statically by its backend.
|
|
994
|
+
* Populated (with the owning orchestrator instance's hostname) for backends
|
|
995
|
+
* that spawn agents on the host itself — bare-metal, Firecracker, container
|
|
996
|
+
* on a local runtime socket. Omitted for backends that provision elsewhere
|
|
997
|
+
* (remote container runtime, future cloud backends).
|
|
998
|
+
*/
|
|
999
|
+
hosts: z.array(z.string()).optional()
|
|
848
1000
|
});
|
|
849
1001
|
/** Agent info within a peer diagnostics entry (subset of full agent schema). */
|
|
850
1002
|
const diagnosticsPeerAgentSchema = z.object({
|
|
@@ -853,7 +1005,9 @@ const diagnosticsPeerAgentSchema = z.object({
|
|
|
853
1005
|
platform: z.string(),
|
|
854
1006
|
arch: z.string(),
|
|
855
1007
|
activeJobs: z.number(),
|
|
856
|
-
maxConcurrency: z.number()
|
|
1008
|
+
maxConcurrency: z.number(),
|
|
1009
|
+
/** Scaler backend that spawned the agent, or null for static (stateful) agents. */
|
|
1010
|
+
scalerName: z.string().nullable().optional()
|
|
857
1011
|
});
|
|
858
1012
|
/** Peer orchestrator reported by coordinator in diagnostics. */
|
|
859
1013
|
const diagnosticsPeerSchema = z.object({
|
|
@@ -879,7 +1033,8 @@ const diagnosticsPeerSchema = z.object({
|
|
|
879
1033
|
type: z.string().optional(),
|
|
880
1034
|
activeCount: z.number(),
|
|
881
1035
|
maxAgents: z.number(),
|
|
882
|
-
labelSets: z.array(z.array(z.string()))
|
|
1036
|
+
labelSets: z.array(z.array(z.string())),
|
|
1037
|
+
spawnsOnLocalHost: z.boolean().optional()
|
|
883
1038
|
})).optional(),
|
|
884
1039
|
dependencyHealth: z.array(z.object({
|
|
885
1040
|
name: z.string(),
|
|
@@ -933,7 +1088,13 @@ const dashboardDiagnosticsResponseSchema = z.object({
|
|
|
933
1088
|
/** Total number of registered agents (always populated regardless of includeAgents). */
|
|
934
1089
|
agentCount: z.number().nullable().optional(),
|
|
935
1090
|
/** Number of agents not bound to any scaler. */
|
|
936
|
-
statefulAgentCount: z.number().nullable().optional()
|
|
1091
|
+
statefulAgentCount: z.number().nullable().optional(),
|
|
1092
|
+
/**
|
|
1093
|
+
* Distinct host names of stateful (unbound) agents, derived from their
|
|
1094
|
+
* self-reported kici:host: labels. Lets the dashboard surface the hosts of
|
|
1095
|
+
* long-lived standalone agents on the collapsed "Stateful agents" header.
|
|
1096
|
+
*/
|
|
1097
|
+
statefulHosts: z.array(z.string()).optional()
|
|
937
1098
|
}),
|
|
938
1099
|
agents: z.array(diagnosticsAgentSchema),
|
|
939
1100
|
scalers: z.array(diagnosticsScalerSchema).optional(),
|
|
@@ -1155,6 +1316,9 @@ const backendTestResponseSchema = z.object({
|
|
|
1155
1316
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1156
1317
|
dashboardRunDetailRequestSchema,
|
|
1157
1318
|
dashboardStepLogsRequestSchema,
|
|
1319
|
+
dashboardRunsListRequestSchema,
|
|
1320
|
+
dashboardRunsFiltersRequestSchema,
|
|
1321
|
+
dashboardSourcesListRequestSchema,
|
|
1158
1322
|
runRerunRequestSchema,
|
|
1159
1323
|
manualScheduleRequestSchema,
|
|
1160
1324
|
runCancelRequestSchema,
|
|
@@ -1164,6 +1328,7 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1164
1328
|
envGetRequestSchema,
|
|
1165
1329
|
envCreateRequestSchema,
|
|
1166
1330
|
envUpdateRequestSchema,
|
|
1331
|
+
envTestAccessSetRequestSchema,
|
|
1167
1332
|
envDeleteRequestSchema,
|
|
1168
1333
|
envVarsListRequestSchema,
|
|
1169
1334
|
envVarSetRequestSchema,
|
|
@@ -1209,6 +1374,9 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1209
1374
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1210
1375
|
dashboardRunDetailResponseSchema,
|
|
1211
1376
|
dashboardStepLogsResponseSchema,
|
|
1377
|
+
dashboardRunsListResponseSchema,
|
|
1378
|
+
dashboardRunsFiltersResponseSchema,
|
|
1379
|
+
dashboardSourcesListResponseSchema,
|
|
1212
1380
|
runRerunResponseSchema,
|
|
1213
1381
|
manualScheduleResponseSchema,
|
|
1214
1382
|
runCancelResponseSchema,
|
|
@@ -1218,6 +1386,7 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
|
1218
1386
|
envGetResponseSchema,
|
|
1219
1387
|
envCreateResponseSchema,
|
|
1220
1388
|
envUpdateResponseSchema,
|
|
1389
|
+
envTestAccessSetResponseSchema,
|
|
1221
1390
|
envDeleteResponseSchema,
|
|
1222
1391
|
envVarsListResponseSchema,
|
|
1223
1392
|
envVarSetResponseSchema,
|
|
@@ -1334,6 +1503,6 @@ const orgMemberSchema = z.object({
|
|
|
1334
1503
|
/** Response for org members list endpoint. */
|
|
1335
1504
|
const memberListResponseSchema = z.object({ members: z.array(orgMemberSchema) });
|
|
1336
1505
|
//#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 };
|
|
1506
|
+
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
1507
|
|
|
1339
1508
|
//# 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
|