@kici-dev/engine 0.1.17 → 0.1.19
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/env/environment-allowlist.d.ts +1 -1
- package/dist/env/environment-allowlist.js +12 -1
- package/dist/fanout/materialize.d.ts +60 -4
- package/dist/fanout/materialize.js +58 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -4
- package/dist/labels/compile.d.ts +40 -0
- package/dist/labels/compile.js +91 -0
- package/dist/labels-match.d.ts +32 -0
- package/dist/labels-match.js +55 -0
- package/dist/matrix/expand.d.ts +6 -1
- package/dist/matrix/expand.js +10 -4
- package/dist/matrix/format.js +3 -2
- package/dist/metrics/metric-catalog.generated.d.ts +10 -0
- package/dist/metrics/metric-catalog.generated.js +12 -0
- package/dist/protocol/messages/dashboard.d.ts +17 -9
- package/dist/protocol/messages/dashboard.js +7 -8
- package/dist/protocol/messages/orchestrator-agent.d.ts +15 -0
- package/dist/protocol/messages/orchestrator-agent.js +15 -1
- package/dist/protocol/messages/peer.d.ts +48 -0
- package/dist/protocol/messages/peer.js +11 -0
- package/dist/trigger/types.d.ts +64 -3
- package/dist/trigger/types.js +22 -2
- package/package.json +9 -4
- package/sbom.spdx.json +59 -34
|
@@ -19,6 +19,7 @@ export declare const MetricNames: {
|
|
|
19
19
|
readonly KICI_ORCH_BUILD_DURATION_SECONDS: "kici_orch_build_duration_seconds";
|
|
20
20
|
readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "kici_orch_config_reload_total";
|
|
21
21
|
readonly KICI_ORCH_CONFIG_VERSION: "kici_orch_config_version";
|
|
22
|
+
readonly KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "kici_orch_declared_hosts_unreachable";
|
|
22
23
|
readonly KICI_ORCH_DEDUP_HITS_TOTAL: "kici_orch_dedup_hits_total";
|
|
23
24
|
readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "kici_orch_dep_cache_hits_total";
|
|
24
25
|
readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "kici_orch_dep_cache_misses_total";
|
|
@@ -128,6 +129,7 @@ export declare const MetricNames: {
|
|
|
128
129
|
readonly V8JS_MEMORY_HEAP_LIMIT: "v8js.memory.heap.limit";
|
|
129
130
|
readonly V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "v8js.memory.heap.space.available_size";
|
|
130
131
|
readonly V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "v8js.memory.heap.space.physical_size";
|
|
132
|
+
readonly V8JS_MEMORY_HEAP_SPACE_SIZE: "v8js.memory.heap.space.size";
|
|
131
133
|
readonly V8JS_MEMORY_HEAP_USED: "v8js.memory.heap.used";
|
|
132
134
|
};
|
|
133
135
|
export type MetricName = (typeof MetricNames)[keyof typeof MetricNames];
|
|
@@ -152,6 +154,7 @@ export declare const MetricLabels: {
|
|
|
152
154
|
readonly KICI_ORCH_BUILD_DURATION_SECONDS: readonly [];
|
|
153
155
|
readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: readonly ["result", "source"];
|
|
154
156
|
readonly KICI_ORCH_CONFIG_VERSION: readonly [];
|
|
157
|
+
readonly KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: readonly [];
|
|
155
158
|
readonly KICI_ORCH_DEDUP_HITS_TOTAL: readonly [];
|
|
156
159
|
readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: readonly [];
|
|
157
160
|
readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: readonly [];
|
|
@@ -261,6 +264,7 @@ export declare const MetricLabels: {
|
|
|
261
264
|
readonly V8JS_MEMORY_HEAP_LIMIT: readonly ["v8js.heap.space.name", "scaler"];
|
|
262
265
|
readonly V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: readonly ["v8js.heap.space.name", "scaler"];
|
|
263
266
|
readonly V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: readonly ["v8js.heap.space.name", "scaler"];
|
|
267
|
+
readonly V8JS_MEMORY_HEAP_SPACE_SIZE: readonly ["v8js.heap.space.name", "scaler"];
|
|
264
268
|
readonly V8JS_MEMORY_HEAP_USED: readonly ["v8js.heap.space.name", "scaler"];
|
|
265
269
|
};
|
|
266
270
|
export declare const MetricKind: {
|
|
@@ -284,6 +288,7 @@ export declare const MetricKind: {
|
|
|
284
288
|
readonly KICI_ORCH_BUILD_DURATION_SECONDS: "histogram";
|
|
285
289
|
readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "counter";
|
|
286
290
|
readonly KICI_ORCH_CONFIG_VERSION: "observableGauge";
|
|
291
|
+
readonly KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "observableGauge";
|
|
287
292
|
readonly KICI_ORCH_DEDUP_HITS_TOTAL: "counter";
|
|
288
293
|
readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "counter";
|
|
289
294
|
readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "counter";
|
|
@@ -393,6 +398,7 @@ export declare const MetricKind: {
|
|
|
393
398
|
readonly V8JS_MEMORY_HEAP_LIMIT: "gauge";
|
|
394
399
|
readonly V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "gauge";
|
|
395
400
|
readonly V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "gauge";
|
|
401
|
+
readonly V8JS_MEMORY_HEAP_SPACE_SIZE: "gauge";
|
|
396
402
|
readonly V8JS_MEMORY_HEAP_USED: "gauge";
|
|
397
403
|
};
|
|
398
404
|
export declare const MetricDescription: {
|
|
@@ -416,6 +422,7 @@ export declare const MetricDescription: {
|
|
|
416
422
|
readonly KICI_ORCH_BUILD_DURATION_SECONDS: "Duration of build agent operations in seconds";
|
|
417
423
|
readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "Total number of config reload operations";
|
|
418
424
|
readonly KICI_ORCH_CONFIG_VERSION: "Current shared config version number";
|
|
425
|
+
readonly KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "Number of declared (static) roster hosts currently unreachable";
|
|
419
426
|
readonly KICI_ORCH_DEDUP_HITS_TOTAL: "Total number of deduplication cache hits";
|
|
420
427
|
readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "Total number of dep cache hits";
|
|
421
428
|
readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "Total number of dep cache misses";
|
|
@@ -525,6 +532,7 @@ export declare const MetricDescription: {
|
|
|
525
532
|
readonly V8JS_MEMORY_HEAP_LIMIT: "V8 heap size limit by heap space";
|
|
526
533
|
readonly V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "V8 available heap size by heap space";
|
|
527
534
|
readonly V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "V8 physical heap size by heap space";
|
|
535
|
+
readonly V8JS_MEMORY_HEAP_SPACE_SIZE: "V8 total heap size by heap space";
|
|
528
536
|
readonly V8JS_MEMORY_HEAP_USED: "V8 used heap size by heap space";
|
|
529
537
|
};
|
|
530
538
|
/**
|
|
@@ -555,6 +563,7 @@ export declare const MetricService: {
|
|
|
555
563
|
readonly KICI_ORCH_BUILD_DURATION_SECONDS: "orchestrator";
|
|
556
564
|
readonly KICI_ORCH_CONFIG_RELOAD_TOTAL: "orchestrator";
|
|
557
565
|
readonly KICI_ORCH_CONFIG_VERSION: "orchestrator";
|
|
566
|
+
readonly KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "orchestrator";
|
|
558
567
|
readonly KICI_ORCH_DEDUP_HITS_TOTAL: "orchestrator";
|
|
559
568
|
readonly KICI_ORCH_DEP_CACHE_HITS_TOTAL: "orchestrator";
|
|
560
569
|
readonly KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "orchestrator";
|
|
@@ -664,6 +673,7 @@ export declare const MetricService: {
|
|
|
664
673
|
readonly V8JS_MEMORY_HEAP_LIMIT: "runtime";
|
|
665
674
|
readonly V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "runtime";
|
|
666
675
|
readonly V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "runtime";
|
|
676
|
+
readonly V8JS_MEMORY_HEAP_SPACE_SIZE: "runtime";
|
|
667
677
|
readonly V8JS_MEMORY_HEAP_USED: "runtime";
|
|
668
678
|
};
|
|
669
679
|
export type MetricService = (typeof MetricService)[keyof typeof MetricService];
|
|
@@ -21,6 +21,7 @@ const MetricNames = {
|
|
|
21
21
|
KICI_ORCH_BUILD_DURATION_SECONDS: "kici_orch_build_duration_seconds",
|
|
22
22
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "kici_orch_config_reload_total",
|
|
23
23
|
KICI_ORCH_CONFIG_VERSION: "kici_orch_config_version",
|
|
24
|
+
KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "kici_orch_declared_hosts_unreachable",
|
|
24
25
|
KICI_ORCH_DEDUP_HITS_TOTAL: "kici_orch_dedup_hits_total",
|
|
25
26
|
KICI_ORCH_DEP_CACHE_HITS_TOTAL: "kici_orch_dep_cache_hits_total",
|
|
26
27
|
KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "kici_orch_dep_cache_misses_total",
|
|
@@ -130,6 +131,7 @@ const MetricNames = {
|
|
|
130
131
|
V8JS_MEMORY_HEAP_LIMIT: "v8js.memory.heap.limit",
|
|
131
132
|
V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "v8js.memory.heap.space.available_size",
|
|
132
133
|
V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "v8js.memory.heap.space.physical_size",
|
|
134
|
+
V8JS_MEMORY_HEAP_SPACE_SIZE: "v8js.memory.heap.space.size",
|
|
133
135
|
V8JS_MEMORY_HEAP_USED: "v8js.memory.heap.used"
|
|
134
136
|
};
|
|
135
137
|
const MetricLabels = {
|
|
@@ -153,6 +155,7 @@ const MetricLabels = {
|
|
|
153
155
|
KICI_ORCH_BUILD_DURATION_SECONDS: [],
|
|
154
156
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: ["result", "source"],
|
|
155
157
|
KICI_ORCH_CONFIG_VERSION: [],
|
|
158
|
+
KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: [],
|
|
156
159
|
KICI_ORCH_DEDUP_HITS_TOTAL: [],
|
|
157
160
|
KICI_ORCH_DEP_CACHE_HITS_TOTAL: [],
|
|
158
161
|
KICI_ORCH_DEP_CACHE_MISSES_TOTAL: [],
|
|
@@ -270,6 +273,7 @@ const MetricLabels = {
|
|
|
270
273
|
V8JS_MEMORY_HEAP_LIMIT: ["v8js.heap.space.name", "scaler"],
|
|
271
274
|
V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: ["v8js.heap.space.name", "scaler"],
|
|
272
275
|
V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: ["v8js.heap.space.name", "scaler"],
|
|
276
|
+
V8JS_MEMORY_HEAP_SPACE_SIZE: ["v8js.heap.space.name", "scaler"],
|
|
273
277
|
V8JS_MEMORY_HEAP_USED: ["v8js.heap.space.name", "scaler"]
|
|
274
278
|
};
|
|
275
279
|
const MetricKind = {
|
|
@@ -293,6 +297,7 @@ const MetricKind = {
|
|
|
293
297
|
KICI_ORCH_BUILD_DURATION_SECONDS: "histogram",
|
|
294
298
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "counter",
|
|
295
299
|
KICI_ORCH_CONFIG_VERSION: "observableGauge",
|
|
300
|
+
KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "observableGauge",
|
|
296
301
|
KICI_ORCH_DEDUP_HITS_TOTAL: "counter",
|
|
297
302
|
KICI_ORCH_DEP_CACHE_HITS_TOTAL: "counter",
|
|
298
303
|
KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "counter",
|
|
@@ -402,6 +407,7 @@ const MetricKind = {
|
|
|
402
407
|
V8JS_MEMORY_HEAP_LIMIT: "gauge",
|
|
403
408
|
V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "gauge",
|
|
404
409
|
V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "gauge",
|
|
410
|
+
V8JS_MEMORY_HEAP_SPACE_SIZE: "gauge",
|
|
405
411
|
V8JS_MEMORY_HEAP_USED: "gauge"
|
|
406
412
|
};
|
|
407
413
|
const MetricDescription = {
|
|
@@ -425,6 +431,7 @@ const MetricDescription = {
|
|
|
425
431
|
KICI_ORCH_BUILD_DURATION_SECONDS: "Duration of build agent operations in seconds",
|
|
426
432
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "Total number of config reload operations",
|
|
427
433
|
KICI_ORCH_CONFIG_VERSION: "Current shared config version number",
|
|
434
|
+
KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "Number of declared (static) roster hosts currently unreachable",
|
|
428
435
|
KICI_ORCH_DEDUP_HITS_TOTAL: "Total number of deduplication cache hits",
|
|
429
436
|
KICI_ORCH_DEP_CACHE_HITS_TOTAL: "Total number of dep cache hits",
|
|
430
437
|
KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "Total number of dep cache misses",
|
|
@@ -534,6 +541,7 @@ const MetricDescription = {
|
|
|
534
541
|
V8JS_MEMORY_HEAP_LIMIT: "V8 heap size limit by heap space",
|
|
535
542
|
V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "V8 available heap size by heap space",
|
|
536
543
|
V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "V8 physical heap size by heap space",
|
|
544
|
+
V8JS_MEMORY_HEAP_SPACE_SIZE: "V8 total heap size by heap space",
|
|
537
545
|
V8JS_MEMORY_HEAP_USED: "V8 used heap size by heap space"
|
|
538
546
|
};
|
|
539
547
|
/**
|
|
@@ -564,6 +572,7 @@ const MetricService = {
|
|
|
564
572
|
KICI_ORCH_BUILD_DURATION_SECONDS: "orchestrator",
|
|
565
573
|
KICI_ORCH_CONFIG_RELOAD_TOTAL: "orchestrator",
|
|
566
574
|
KICI_ORCH_CONFIG_VERSION: "orchestrator",
|
|
575
|
+
KICI_ORCH_DECLARED_HOSTS_UNREACHABLE: "orchestrator",
|
|
567
576
|
KICI_ORCH_DEDUP_HITS_TOTAL: "orchestrator",
|
|
568
577
|
KICI_ORCH_DEP_CACHE_HITS_TOTAL: "orchestrator",
|
|
569
578
|
KICI_ORCH_DEP_CACHE_MISSES_TOTAL: "orchestrator",
|
|
@@ -673,6 +682,7 @@ const MetricService = {
|
|
|
673
682
|
V8JS_MEMORY_HEAP_LIMIT: "runtime",
|
|
674
683
|
V8JS_MEMORY_HEAP_SPACE_AVAILABLE_SIZE: "runtime",
|
|
675
684
|
V8JS_MEMORY_HEAP_SPACE_PHYSICAL_SIZE: "runtime",
|
|
685
|
+
V8JS_MEMORY_HEAP_SPACE_SIZE: "runtime",
|
|
676
686
|
V8JS_MEMORY_HEAP_USED: "runtime"
|
|
677
687
|
};
|
|
678
688
|
/** Set of every catalog metric name — O(1) membership for lint / filter UI. */
|
|
@@ -697,6 +707,7 @@ const ALL_METRIC_NAMES = [
|
|
|
697
707
|
"kici_orch_build_duration_seconds",
|
|
698
708
|
"kici_orch_config_reload_total",
|
|
699
709
|
"kici_orch_config_version",
|
|
710
|
+
"kici_orch_declared_hosts_unreachable",
|
|
700
711
|
"kici_orch_dedup_hits_total",
|
|
701
712
|
"kici_orch_dep_cache_hits_total",
|
|
702
713
|
"kici_orch_dep_cache_misses_total",
|
|
@@ -806,6 +817,7 @@ const ALL_METRIC_NAMES = [
|
|
|
806
817
|
"v8js.memory.heap.limit",
|
|
807
818
|
"v8js.memory.heap.space.available_size",
|
|
808
819
|
"v8js.memory.heap.space.physical_size",
|
|
820
|
+
"v8js.memory.heap.space.size",
|
|
809
821
|
"v8js.memory.heap.used"
|
|
810
822
|
];
|
|
811
823
|
//#endregion
|
|
@@ -57,6 +57,9 @@ export declare const dashboardJobDetailSchema: z.ZodObject<{
|
|
|
57
57
|
jobName: z.ZodString;
|
|
58
58
|
status: z.ZodString;
|
|
59
59
|
matrixValues: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
+
baseJobName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
variantKind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
variantLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
63
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
61
64
|
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
62
65
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
@@ -113,6 +116,9 @@ export declare const dashboardRunDetailResponseSchema: z.ZodObject<{
|
|
|
113
116
|
jobName: z.ZodString;
|
|
114
117
|
status: z.ZodString;
|
|
115
118
|
matrixValues: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
119
|
+
baseJobName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
variantKind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
variantLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
122
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
117
123
|
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
118
124
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1925,9 +1931,9 @@ declare const diagnosticsPeerSchema: z.ZodObject<{
|
|
|
1925
1931
|
dependencyHealth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1926
1932
|
name: z.ZodString;
|
|
1927
1933
|
status: z.ZodEnum<{
|
|
1934
|
+
fail: "fail";
|
|
1928
1935
|
pass: "pass";
|
|
1929
1936
|
warn: "warn";
|
|
1930
|
-
fail: "fail";
|
|
1931
1937
|
}>;
|
|
1932
1938
|
message: z.ZodNullable<z.ZodString>;
|
|
1933
1939
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1972,7 +1978,6 @@ export declare const dashboardDiagnosticsResponseSchema: z.ZodObject<{
|
|
|
1972
1978
|
raftLeaderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1973
1979
|
agentCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1974
1980
|
statefulAgentCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1975
|
-
statefulHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1976
1981
|
}, z.core.$strip>;
|
|
1977
1982
|
agents: z.ZodArray<z.ZodObject<{
|
|
1978
1983
|
agentId: z.ZodString;
|
|
@@ -2051,9 +2056,9 @@ export declare const dashboardDiagnosticsResponseSchema: z.ZodObject<{
|
|
|
2051
2056
|
dependencyHealth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2052
2057
|
name: z.ZodString;
|
|
2053
2058
|
status: z.ZodEnum<{
|
|
2059
|
+
fail: "fail";
|
|
2054
2060
|
pass: "pass";
|
|
2055
2061
|
warn: "warn";
|
|
2056
|
-
fail: "fail";
|
|
2057
2062
|
}>;
|
|
2058
2063
|
message: z.ZodNullable<z.ZodString>;
|
|
2059
2064
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -4392,6 +4397,9 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
4392
4397
|
jobName: z.ZodString;
|
|
4393
4398
|
status: z.ZodString;
|
|
4394
4399
|
matrixValues: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4400
|
+
baseJobName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4401
|
+
variantKind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4402
|
+
variantLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4395
4403
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
4396
4404
|
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
4397
4405
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4891,7 +4899,6 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
4891
4899
|
raftLeaderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4892
4900
|
agentCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4893
4901
|
statefulAgentCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4894
|
-
statefulHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4895
4902
|
}, z.core.$strip>;
|
|
4896
4903
|
agents: z.ZodArray<z.ZodObject<{
|
|
4897
4904
|
agentId: z.ZodString;
|
|
@@ -4970,9 +4977,9 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
4970
4977
|
dependencyHealth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4971
4978
|
name: z.ZodString;
|
|
4972
4979
|
status: z.ZodEnum<{
|
|
4980
|
+
fail: "fail";
|
|
4973
4981
|
pass: "pass";
|
|
4974
4982
|
warn: "warn";
|
|
4975
|
-
fail: "fail";
|
|
4976
4983
|
}>;
|
|
4977
4984
|
message: z.ZodNullable<z.ZodString>;
|
|
4978
4985
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -5497,6 +5504,9 @@ export declare const dashboardRunDetailApiResponseSchema: z.ZodObject<{
|
|
|
5497
5504
|
jobName: z.ZodString;
|
|
5498
5505
|
status: z.ZodString;
|
|
5499
5506
|
matrixValues: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5507
|
+
baseJobName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5508
|
+
variantKind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5509
|
+
variantLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5500
5510
|
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
5501
5511
|
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
5502
5512
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
@@ -5791,7 +5801,6 @@ declare const diagnosticsInfraOrchestratorSchema: z.ZodObject<{
|
|
|
5791
5801
|
runningAsUser: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5792
5802
|
runningAsUid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5793
5803
|
statefulAgentCount: z.ZodNumber;
|
|
5794
|
-
statefulHosts: z.ZodArray<z.ZodString>;
|
|
5795
5804
|
scalers: z.ZodArray<z.ZodObject<{
|
|
5796
5805
|
name: z.ZodString;
|
|
5797
5806
|
type: z.ZodString;
|
|
@@ -5804,9 +5813,9 @@ declare const diagnosticsInfraOrchestratorSchema: z.ZodObject<{
|
|
|
5804
5813
|
dependencyHealth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5805
5814
|
name: z.ZodString;
|
|
5806
5815
|
status: z.ZodEnum<{
|
|
5816
|
+
fail: "fail";
|
|
5807
5817
|
pass: "pass";
|
|
5808
5818
|
warn: "warn";
|
|
5809
|
-
fail: "fail";
|
|
5810
5819
|
}>;
|
|
5811
5820
|
message: z.ZodNullable<z.ZodString>;
|
|
5812
5821
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -5870,7 +5879,6 @@ export declare const diagnosticsInfrastructureResponseSchema: z.ZodObject<{
|
|
|
5870
5879
|
runningAsUser: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5871
5880
|
runningAsUid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5872
5881
|
statefulAgentCount: z.ZodNumber;
|
|
5873
|
-
statefulHosts: z.ZodArray<z.ZodString>;
|
|
5874
5882
|
scalers: z.ZodArray<z.ZodObject<{
|
|
5875
5883
|
name: z.ZodString;
|
|
5876
5884
|
type: z.ZodString;
|
|
@@ -5883,9 +5891,9 @@ export declare const diagnosticsInfrastructureResponseSchema: z.ZodObject<{
|
|
|
5883
5891
|
dependencyHealth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5884
5892
|
name: z.ZodString;
|
|
5885
5893
|
status: z.ZodEnum<{
|
|
5894
|
+
fail: "fail";
|
|
5886
5895
|
pass: "pass";
|
|
5887
5896
|
warn: "warn";
|
|
5888
|
-
fail: "fail";
|
|
5889
5897
|
}>;
|
|
5890
5898
|
message: z.ZodNullable<z.ZodString>;
|
|
5891
5899
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -49,6 +49,12 @@ const dashboardJobDetailSchema = z.object({
|
|
|
49
49
|
jobName: z.string(),
|
|
50
50
|
status: z.string(),
|
|
51
51
|
matrixValues: z.record(z.string(), z.unknown()).nullable(),
|
|
52
|
+
/** Base (logical) job name for a fan-out child; null for non-fanned jobs. */
|
|
53
|
+
baseJobName: z.string().nullable().optional(),
|
|
54
|
+
/** Fan-out kind for a child: 'matrix' | 'host'; null for non-fanned jobs. */
|
|
55
|
+
variantKind: z.string().nullable().optional(),
|
|
56
|
+
/** Fan-out label for a child: matrix suffix or hostname; null for non-fanned jobs. */
|
|
57
|
+
variantLabel: z.string().nullable().optional(),
|
|
52
58
|
startedAt: z.number().nullable(),
|
|
53
59
|
completedAt: z.number().nullable(),
|
|
54
60
|
durationMs: z.number().nullable(),
|
|
@@ -1152,13 +1158,7 @@ const dashboardDiagnosticsResponseSchema = z.object({
|
|
|
1152
1158
|
/** Total number of registered agents (always populated regardless of includeAgents). */
|
|
1153
1159
|
agentCount: z.number().nullable().optional(),
|
|
1154
1160
|
/** Number of agents not bound to any scaler. */
|
|
1155
|
-
statefulAgentCount: z.number().nullable().optional()
|
|
1156
|
-
/**
|
|
1157
|
-
* Distinct host names of stateful (unbound) agents, derived from their
|
|
1158
|
-
* self-reported kici:host: labels. Lets the dashboard surface the hosts of
|
|
1159
|
-
* long-lived standalone agents on the collapsed "Stateful agents" header.
|
|
1160
|
-
*/
|
|
1161
|
-
statefulHosts: z.array(z.string()).optional()
|
|
1161
|
+
statefulAgentCount: z.number().nullable().optional()
|
|
1162
1162
|
}),
|
|
1163
1163
|
agents: z.array(diagnosticsAgentSchema),
|
|
1164
1164
|
scalers: z.array(diagnosticsScalerSchema).optional(),
|
|
@@ -1764,7 +1764,6 @@ const diagnosticsInfraOrchestratorSchema = z.object({
|
|
|
1764
1764
|
runningAsUser: z.string().nullable().optional(),
|
|
1765
1765
|
runningAsUid: z.number().nullable().optional(),
|
|
1766
1766
|
statefulAgentCount: z.number(),
|
|
1767
|
-
statefulHosts: z.array(z.string()),
|
|
1768
1767
|
scalers: z.array(diagnosticsInfraScalerSchema),
|
|
1769
1768
|
dependencyHealth: z.array(z.object({
|
|
1770
1769
|
name: z.string(),
|
|
@@ -13,6 +13,21 @@ export declare const CacheRefScope: z.ZodEnum<{
|
|
|
13
13
|
isolated: "isolated";
|
|
14
14
|
}>;
|
|
15
15
|
export type CacheRefScope = z.infer<typeof CacheRefScope>;
|
|
16
|
+
/**
|
|
17
|
+
* Frozen snapshot of upstream job outputs for a result-aware dynamic generator.
|
|
18
|
+
*
|
|
19
|
+
* Captured once when the deferred eval job is dispatched (its upstreams are
|
|
20
|
+
* terminal at that point) and replayed unchanged on agent-side re-eval, so the
|
|
21
|
+
* generator sees the same `ctx.needs` data on both passes.
|
|
22
|
+
*
|
|
23
|
+
* - `jobs` maps an upstream job name to its outputs record.
|
|
24
|
+
* - `groups` maps a dynamic group name to its ordered member job names.
|
|
25
|
+
*/
|
|
26
|
+
export declare const upstreamSnapshotSchema: z.ZodObject<{
|
|
27
|
+
jobs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
groups: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type UpstreamSnapshot = z.infer<typeof upstreamSnapshotSchema>;
|
|
16
31
|
/**
|
|
17
32
|
* Structured git-clone auth material. Carries everything the agent needs to
|
|
18
33
|
* authenticate a single `git clone`:
|
|
@@ -14,6 +14,20 @@ import { z } from "zod";
|
|
|
14
14
|
*/
|
|
15
15
|
const CacheRefScope = z.enum(["shared", "isolated"]);
|
|
16
16
|
/**
|
|
17
|
+
* Frozen snapshot of upstream job outputs for a result-aware dynamic generator.
|
|
18
|
+
*
|
|
19
|
+
* Captured once when the deferred eval job is dispatched (its upstreams are
|
|
20
|
+
* terminal at that point) and replayed unchanged on agent-side re-eval, so the
|
|
21
|
+
* generator sees the same `ctx.needs` data on both passes.
|
|
22
|
+
*
|
|
23
|
+
* - `jobs` maps an upstream job name to its outputs record.
|
|
24
|
+
* - `groups` maps a dynamic group name to its ordered member job names.
|
|
25
|
+
*/
|
|
26
|
+
const upstreamSnapshotSchema = z.object({
|
|
27
|
+
jobs: z.record(z.string(), z.record(z.string(), z.unknown())),
|
|
28
|
+
groups: z.record(z.string(), z.array(z.string()))
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
17
31
|
* Structured git-clone auth material. Carries everything the agent needs to
|
|
18
32
|
* authenticate a single `git clone`:
|
|
19
33
|
*
|
|
@@ -705,6 +719,6 @@ const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
|
705
719
|
stepApprovalRequestSchema
|
|
706
720
|
]);
|
|
707
721
|
//#endregion
|
|
708
|
-
export { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema };
|
|
722
|
+
export { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema };
|
|
709
723
|
|
|
710
724
|
//# sourceMappingURL=orchestrator-agent.js.map
|
|
@@ -140,6 +140,22 @@ export declare const jobRerouteSchema: z.ZodObject<{
|
|
|
140
140
|
workflowName: z.ZodString;
|
|
141
141
|
runsOnLabels: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
142
142
|
excludeLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
|
+
runsOnPatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
|
+
kind: z.ZodLiteral<"exact">;
|
|
145
|
+
value: z.ZodString;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"regex">;
|
|
148
|
+
source: z.ZodString;
|
|
149
|
+
flags: z.ZodString;
|
|
150
|
+
}, z.core.$strip>], "kind">>>;
|
|
151
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
152
|
+
kind: z.ZodLiteral<"exact">;
|
|
153
|
+
value: z.ZodString;
|
|
154
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
+
kind: z.ZodLiteral<"regex">;
|
|
156
|
+
source: z.ZodString;
|
|
157
|
+
flags: z.ZodString;
|
|
158
|
+
}, z.core.$strip>], "kind">>>;
|
|
143
159
|
triedConnections: z.ZodArray<z.ZodString>;
|
|
144
160
|
maxHops: z.ZodNumber;
|
|
145
161
|
coordinatorId: z.ZodString;
|
|
@@ -488,6 +504,22 @@ export declare const peerToPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
488
504
|
workflowName: z.ZodString;
|
|
489
505
|
runsOnLabels: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
490
506
|
excludeLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
507
|
+
runsOnPatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
508
|
+
kind: z.ZodLiteral<"exact">;
|
|
509
|
+
value: z.ZodString;
|
|
510
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
511
|
+
kind: z.ZodLiteral<"regex">;
|
|
512
|
+
source: z.ZodString;
|
|
513
|
+
flags: z.ZodString;
|
|
514
|
+
}, z.core.$strip>], "kind">>>;
|
|
515
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
516
|
+
kind: z.ZodLiteral<"exact">;
|
|
517
|
+
value: z.ZodString;
|
|
518
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
519
|
+
kind: z.ZodLiteral<"regex">;
|
|
520
|
+
source: z.ZodString;
|
|
521
|
+
flags: z.ZodString;
|
|
522
|
+
}, z.core.$strip>], "kind">>>;
|
|
491
523
|
triedConnections: z.ZodArray<z.ZodString>;
|
|
492
524
|
maxHops: z.ZodNumber;
|
|
493
525
|
coordinatorId: z.ZodString;
|
|
@@ -756,6 +788,22 @@ export declare const peerFromPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
756
788
|
workflowName: z.ZodString;
|
|
757
789
|
runsOnLabels: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
758
790
|
excludeLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
791
|
+
runsOnPatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
792
|
+
kind: z.ZodLiteral<"exact">;
|
|
793
|
+
value: z.ZodString;
|
|
794
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
795
|
+
kind: z.ZodLiteral<"regex">;
|
|
796
|
+
source: z.ZodString;
|
|
797
|
+
flags: z.ZodString;
|
|
798
|
+
}, z.core.$strip>], "kind">>>;
|
|
799
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
800
|
+
kind: z.ZodLiteral<"exact">;
|
|
801
|
+
value: z.ZodString;
|
|
802
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
803
|
+
kind: z.ZodLiteral<"regex">;
|
|
804
|
+
source: z.ZodString;
|
|
805
|
+
flags: z.ZodString;
|
|
806
|
+
}, z.core.$strip>], "kind">>>;
|
|
759
807
|
triedConnections: z.ZodArray<z.ZodString>;
|
|
760
808
|
maxHops: z.ZodNumber;
|
|
761
809
|
coordinatorId: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { ExecutionJobStatus } from "./execution-status.js";
|
|
3
3
|
import { ScalerEventType } from "./scaler-event.js";
|
|
4
|
+
import { LabelMatcher } from "../../labels-match.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region src/protocol/messages/peer.ts
|
|
6
7
|
/** Agent summary included in peer heartbeat and auth response messages. */
|
|
@@ -160,6 +161,16 @@ const jobRerouteSchema = z.object({
|
|
|
160
161
|
runsOnLabels: z.array(z.array(z.string())),
|
|
161
162
|
/** Labels that the dispatched agent must NOT have (optional for backward compatibility). */
|
|
162
163
|
excludeLabels: z.array(z.string()).optional(),
|
|
164
|
+
/**
|
|
165
|
+
* Glob/regex include matchers the receiving peer's agent labels must
|
|
166
|
+
* satisfy (JS post-filter, applied on top of the exact `runsOnLabels`
|
|
167
|
+
* prefilter — same semantics as the single-orchestrator dispatch path).
|
|
168
|
+
* Absent is treated as `[]`. A pure-pattern job (no exact labels) carries
|
|
169
|
+
* its selector here; dropping it would let the job match any local agent.
|
|
170
|
+
*/
|
|
171
|
+
runsOnPatterns: z.array(LabelMatcher).optional(),
|
|
172
|
+
/** Glob/regex matchers that disqualify a candidate agent (JS post-filter). Absent is `[]`. */
|
|
173
|
+
excludePatterns: z.array(LabelMatcher).optional(),
|
|
163
174
|
triedConnections: z.array(z.string()),
|
|
164
175
|
maxHops: z.number(),
|
|
165
176
|
coordinatorId: z.string(),
|
package/dist/trigger/types.d.ts
CHANGED
|
@@ -12,12 +12,16 @@
|
|
|
12
12
|
* Schema version 15: adds per-job init config(s) to LockJob.
|
|
13
13
|
* Schema version 16: adds normalized approval config to LockWorkflow/LockJob/LockStep.
|
|
14
14
|
* Schema version 17: widens LockJob.init to typed presets ('mise' / { mise }) and 'auto' detection.
|
|
15
|
+
* Schema version 18: adds LockJob.runsOnAll host fan-out predicate + onUnreachable policy.
|
|
16
|
+
* Schema version 19: adds LockJob.maxParallel/failFast fan-out concurrency (rolling waves).
|
|
17
|
+
* Schema version 20: runsOn/runsOnAll/excludeLabels carry LabelMatcher (exact|regex) for glob+regex selectors.
|
|
15
18
|
*/
|
|
16
19
|
import { z } from 'zod';
|
|
17
20
|
import type { ProviderType } from '../provider/types.js';
|
|
18
21
|
import type { ApproverClause } from '../approval/types.js';
|
|
22
|
+
import { LabelMatcher } from '../labels-match.js';
|
|
19
23
|
/** Schema version - increment on breaking changes */
|
|
20
|
-
export declare const SCHEMA_VERSION:
|
|
24
|
+
export declare const SCHEMA_VERSION: 20;
|
|
21
25
|
/**
|
|
22
26
|
* Normalized approval config carried in the lock file. Produced by the compiler
|
|
23
27
|
* from an SDK `requireApproval` at any of the three levels; consumed by the
|
|
@@ -386,11 +390,59 @@ export type NeedsGroupEntry = z.infer<typeof NeedsGroupEntrySchema>;
|
|
|
386
390
|
* Static job in lock file.
|
|
387
391
|
* Contains all orchestrator-readable information for scheduling.
|
|
388
392
|
*/
|
|
393
|
+
/** Normalized runsOnAll predicate: OR of AND-groups (include), minus exclude matchers. */
|
|
394
|
+
export interface RunsOnAllPredicate {
|
|
395
|
+
/** OR across groups; AND within a group. */
|
|
396
|
+
readonly include: readonly (readonly LabelMatcher[])[];
|
|
397
|
+
/** Matchers that disqualify a host (AND-NOT, applied to the union). */
|
|
398
|
+
readonly exclude: readonly LabelMatcher[];
|
|
399
|
+
}
|
|
400
|
+
/** Author-facing input forms for runsOnAll (string | RegExp | array-with-! | structured). */
|
|
401
|
+
export type RunsOnAllInput = string | RegExp | readonly (string | RegExp)[] | {
|
|
402
|
+
readonly include: readonly {
|
|
403
|
+
readonly all: readonly (string | RegExp)[];
|
|
404
|
+
}[];
|
|
405
|
+
readonly exclude?: readonly (string | RegExp)[];
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Failure policy for a host fan-out (`runsOnAll`) when an expected durable host
|
|
409
|
+
* is in the declared roster but not currently reachable.
|
|
410
|
+
*
|
|
411
|
+
* - `skip`: omit the unreachable durable host (fan out to reachable hosts only).
|
|
412
|
+
* - `fail`: fail the run init if any expected durable host is unreachable.
|
|
413
|
+
* - `hold`: queue a pinned child for each unreachable durable host and wait for
|
|
414
|
+
* it to (re)connect (the durable default).
|
|
415
|
+
*
|
|
416
|
+
* Ephemeral hosts that are not live are always skipped (a scaled-down node may
|
|
417
|
+
* never return), independent of this policy.
|
|
418
|
+
*/
|
|
419
|
+
export declare const OnUnreachableMode: z.ZodEnum<{
|
|
420
|
+
skip: "skip";
|
|
421
|
+
fail: "fail";
|
|
422
|
+
hold: "hold";
|
|
423
|
+
}>;
|
|
424
|
+
export type OnUnreachableMode = z.infer<typeof OnUnreachableMode>;
|
|
389
425
|
export interface LockJob {
|
|
390
426
|
readonly _type: 'static';
|
|
391
427
|
readonly name: string;
|
|
392
|
-
|
|
393
|
-
readonly
|
|
428
|
+
/** Single-agent targeting matchers. Absent when the job uses `runsOnAll` instead. */
|
|
429
|
+
readonly runsOn?: readonly LabelMatcher[];
|
|
430
|
+
readonly excludeLabels?: readonly LabelMatcher[];
|
|
431
|
+
/**
|
|
432
|
+
* Host fan-out predicate (mutually exclusive with `runsOn`). When set, the job
|
|
433
|
+
* fans out to every roster host matching the predicate, one pinned child per host.
|
|
434
|
+
*/
|
|
435
|
+
readonly runsOnAll?: RunsOnAllPredicate;
|
|
436
|
+
/** Failure policy for unreachable durable hosts in a `runsOnAll` fan-out. */
|
|
437
|
+
readonly onUnreachable?: OnUnreachableMode;
|
|
438
|
+
/**
|
|
439
|
+
* Fan-out concurrency width (sliding window; `1` = serial). When set on a
|
|
440
|
+
* fan-out job (matrix or `runsOnAll`), only the first `maxParallel` children
|
|
441
|
+
* dispatch; the rest are held `wave_gated` and released one-per-terminal.
|
|
442
|
+
*/
|
|
443
|
+
readonly maxParallel?: number;
|
|
444
|
+
/** Halt the fan-out on first child failure, skipping the held remainder. Default `false`. */
|
|
445
|
+
readonly failFast?: boolean;
|
|
394
446
|
readonly needs: readonly (string | NeedsEntry | NeedsGroupEntry)[];
|
|
395
447
|
/** Group names this job depends on (populated by compiler from dynamicGroup refs). */
|
|
396
448
|
readonly dependsOnGroups?: readonly string[];
|
|
@@ -435,6 +487,15 @@ export interface LockDynamicJobFn {
|
|
|
435
487
|
};
|
|
436
488
|
/** Group name for cross-domain needs (set when dynamicJob('name', fn) is used). */
|
|
437
489
|
readonly group?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Declared upstream needs for a result-aware generator. When present the
|
|
492
|
+
* generator's eval job is deferred until these upstreams complete, then run
|
|
493
|
+
* with their frozen outputs available as ctx.needs. Same normalized shape as
|
|
494
|
+
* a static job's `needs`.
|
|
495
|
+
*/
|
|
496
|
+
readonly needs?: readonly (string | NeedsEntry | NeedsGroupEntry)[];
|
|
497
|
+
/** True when this dynamic entry was authored as dynamicJob(group, { needs, generate }). */
|
|
498
|
+
readonly resultAware?: boolean;
|
|
438
499
|
}
|
|
439
500
|
/** Job or dynamic job generator */
|
|
440
501
|
export type LockJobOrFactory = LockJob | LockDynamicJobFn;
|
package/dist/trigger/types.js
CHANGED
|
@@ -15,9 +15,12 @@ import { z } from "zod";
|
|
|
15
15
|
* Schema version 15: adds per-job init config(s) to LockJob.
|
|
16
16
|
* Schema version 16: adds normalized approval config to LockWorkflow/LockJob/LockStep.
|
|
17
17
|
* Schema version 17: widens LockJob.init to typed presets ('mise' / { mise }) and 'auto' detection.
|
|
18
|
+
* Schema version 18: adds LockJob.runsOnAll host fan-out predicate + onUnreachable policy.
|
|
19
|
+
* Schema version 19: adds LockJob.maxParallel/failFast fan-out concurrency (rolling waves).
|
|
20
|
+
* Schema version 20: runsOn/runsOnAll/excludeLabels carry LabelMatcher (exact|regex) for glob+regex selectors.
|
|
18
21
|
*/
|
|
19
22
|
/** Schema version - increment on breaking changes */
|
|
20
|
-
const SCHEMA_VERSION =
|
|
23
|
+
const SCHEMA_VERSION = 20;
|
|
21
24
|
/** Type guard for inline expression values */
|
|
22
25
|
function isLockInlineValue(value) {
|
|
23
26
|
return typeof value === "object" && value !== null && value._type === "inline";
|
|
@@ -45,6 +48,23 @@ const NeedsGroupEntrySchema = z.object({
|
|
|
45
48
|
group: z.string(),
|
|
46
49
|
ifFailed: IfFailedPolicy.default(IfFailedPolicy.enum.skip)
|
|
47
50
|
});
|
|
51
|
+
/**
|
|
52
|
+
* Failure policy for a host fan-out (`runsOnAll`) when an expected durable host
|
|
53
|
+
* is in the declared roster but not currently reachable.
|
|
54
|
+
*
|
|
55
|
+
* - `skip`: omit the unreachable durable host (fan out to reachable hosts only).
|
|
56
|
+
* - `fail`: fail the run init if any expected durable host is unreachable.
|
|
57
|
+
* - `hold`: queue a pinned child for each unreachable durable host and wait for
|
|
58
|
+
* it to (re)connect (the durable default).
|
|
59
|
+
*
|
|
60
|
+
* Ephemeral hosts that are not live are always skipped (a scaled-down node may
|
|
61
|
+
* never return), independent of this policy.
|
|
62
|
+
*/
|
|
63
|
+
const OnUnreachableMode = z.enum([
|
|
64
|
+
"skip",
|
|
65
|
+
"fail",
|
|
66
|
+
"hold"
|
|
67
|
+
]);
|
|
48
68
|
/** Type guard for static jobs */
|
|
49
69
|
function isLockStaticJob(job) {
|
|
50
70
|
return job._type === "static";
|
|
@@ -54,6 +74,6 @@ function isLockDynamicJobFn(job) {
|
|
|
54
74
|
return job._type === "dynamic";
|
|
55
75
|
}
|
|
56
76
|
//#endregion
|
|
57
|
-
export { IfFailedPolicy, NeedsEntrySchema, NeedsGroupEntrySchema, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob };
|
|
77
|
+
export { IfFailedPolicy, NeedsEntrySchema, NeedsGroupEntrySchema, OnUnreachableMode, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob };
|
|
58
78
|
|
|
59
79
|
//# sourceMappingURL=types.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kici-dev/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"import": "./dist/webhook/signature.js",
|
|
50
50
|
"types": "./dist/webhook/signature.d.ts"
|
|
51
51
|
},
|
|
52
|
+
"./labels/compile": {
|
|
53
|
+
"import": "./dist/labels/compile.js",
|
|
54
|
+
"types": "./dist/labels/compile.d.ts"
|
|
55
|
+
},
|
|
52
56
|
"./protocol/dashboard-global-workflows": {
|
|
53
57
|
"import": "./dist/protocol/dashboard-global-workflows.js",
|
|
54
58
|
"types": "./dist/protocol/dashboard-global-workflows.d.ts"
|
|
@@ -95,14 +99,15 @@
|
|
|
95
99
|
}
|
|
96
100
|
},
|
|
97
101
|
"dependencies": {
|
|
98
|
-
"fast-cartesian": "^9.0.1",
|
|
99
102
|
"jose": "^6.1.0",
|
|
100
103
|
"jsonpath-plus": "^10.4.0",
|
|
101
104
|
"picomatch": "^4.0.4",
|
|
102
|
-
"
|
|
105
|
+
"safe-regex": "^2.1.1",
|
|
106
|
+
"zod": "^4.4.3"
|
|
103
107
|
},
|
|
104
108
|
"devDependencies": {
|
|
105
|
-
"@types/node": "^24.12.0"
|
|
109
|
+
"@types/node": "^24.12.0",
|
|
110
|
+
"@types/safe-regex": "^1.1.6"
|
|
106
111
|
},
|
|
107
112
|
"scripts": {
|
|
108
113
|
"build": "node ../../scripts/build-ts.mjs && tsc --emitDeclarationOnly",
|