@kici-dev/engine 0.1.22 → 0.1.23

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.
Files changed (44) hide show
  1. package/dist/audit/access-log-policy.js +2 -0
  2. package/dist/audit/activity.d.ts +3 -1
  3. package/dist/audit/activity.js +8 -16
  4. package/dist/audit/retention-policy.js +4 -0
  5. package/dist/environment/host-match.d.ts +25 -0
  6. package/dist/environment/host-match.js +67 -0
  7. package/dist/environment/index.d.ts +1 -0
  8. package/dist/environment/scope-resolver.d.ts +15 -4
  9. package/dist/environment/scope-resolver.js +55 -15
  10. package/dist/environment/scope-template.d.ts +18 -0
  11. package/dist/environment/scope-template.js +43 -0
  12. package/dist/environment/types.d.ts +7 -0
  13. package/dist/fanout/materialize.d.ts +34 -0
  14. package/dist/fanout/materialize.js +72 -45
  15. package/dist/index.d.ts +2 -1
  16. package/dist/index.js +10 -5
  17. package/dist/inputs/build.d.ts +9 -0
  18. package/dist/inputs/build.js +44 -0
  19. package/dist/inputs/coerce.d.ts +25 -0
  20. package/dist/inputs/coerce.js +51 -0
  21. package/dist/inputs/descriptor.d.ts +53 -0
  22. package/dist/inputs/descriptor.js +42 -0
  23. package/dist/inputs/extract.d.ts +15 -0
  24. package/dist/inputs/extract.js +117 -0
  25. package/dist/inputs/index.d.ts +5 -0
  26. package/dist/inputs/index.js +6 -0
  27. package/dist/labels/compile.d.ts +9 -0
  28. package/dist/labels/compile.js +10 -1
  29. package/dist/labels.d.ts +29 -0
  30. package/dist/labels.js +32 -1
  31. package/dist/metrics/catalog-policy.d.ts +7 -0
  32. package/dist/metrics/catalog-policy.js +11 -12
  33. package/dist/metrics/metric-catalog.generated.d.ts +2 -2
  34. package/dist/metrics/metric-catalog.generated.js +10 -2
  35. package/dist/protocol/messages/access-log.d.ts +15 -0
  36. package/dist/protocol/messages/access-log.js +4 -1
  37. package/dist/protocol/messages/dashboard.d.ts +146 -6
  38. package/dist/protocol/messages/dashboard.js +50 -10
  39. package/dist/protocol/messages/platform-orchestrator.d.ts +33 -3
  40. package/dist/protocol/messages/run-events.d.ts +1 -1
  41. package/dist/trigger/types.d.ts +41 -1
  42. package/dist/trigger/types.js +14 -2
  43. package/package.json +9 -1
  44. package/sbom.spdx.json +5 -5
@@ -1,4 +1,5 @@
1
1
  import "../chunk-BTugEXQM.js";
2
+ import { ExecutionRunStatus } from "../protocol/messages/execution-status.js";
2
3
  import { MetricNames, MetricService } from "./metric-catalog.generated.js";
3
4
  //#region src/metrics/catalog-policy.ts
4
5
  /**
@@ -48,9 +49,10 @@ const AGENT_SCALER_VALUES = [
48
49
  "bare-metal"
49
50
  ];
50
51
  /**
51
- * Closed enum of scaler values the orchestrator's own resource-usage
52
- * gauges emit. `__global__` is the orchestrator-wide rollup row; the
53
- * other four match `AGENT_SCALER_VALUES`.
52
+ * Closed enum of scaler-backend TYPE values the orchestrator's own
53
+ * resource-usage gauges carry on their `scalerType` rollup label.
54
+ * `__global__` is the orchestrator-wide rollup row; the other four match
55
+ * `AGENT_SCALER_VALUES`. Exported so the policy tests can assert against it.
54
56
  */
55
57
  const ORCH_SCALER_VALUES = ["__global__", ...AGENT_SCALER_VALUES];
56
58
  /** Closed enum of the five scheduled jobs the orchestrator runs (mirrors `OrchestratorScheduledJobName`). */
@@ -94,12 +96,7 @@ const METRIC_LABEL_POLICY = {
94
96
  "handled",
95
97
  "dispatched"
96
98
  ] } },
97
- kici_orch_executions_total: { status: { values: [
98
- "running",
99
- "success",
100
- "failed",
101
- "cancelled"
102
- ] } },
99
+ kici_orch_executions_total: { status: { values: ExecutionRunStatus.options } },
103
100
  kici_orch_steps_total: { status: { values: [
104
101
  "running",
105
102
  "success",
@@ -130,11 +127,13 @@ const METRIC_LABEL_POLICY = {
130
127
  ] }
131
128
  },
132
129
  kici_orch_scaler_cpus_used: {
133
- scaler: { values: ORCH_SCALER_VALUES },
130
+ scaler: { maxUniqueValues: 50 },
131
+ scalerType: { values: ORCH_SCALER_VALUES },
134
132
  machinePool: { maxUniqueValues: 50 }
135
133
  },
136
134
  kici_orch_scaler_memory_bytes_used: {
137
- scaler: { values: ORCH_SCALER_VALUES },
135
+ scaler: { maxUniqueValues: 50 },
136
+ scalerType: { values: ORCH_SCALER_VALUES },
138
137
  machinePool: { maxUniqueValues: 50 }
139
138
  },
140
139
  kici_orch_install_secrets_decisions_total: {
@@ -278,6 +277,6 @@ const METRIC_LABEL_POLICY = {
278
277
  }
279
278
  };
280
279
  //#endregion
281
- export { METRIC_LABEL_POLICY, ORCH_PUSHED_METRIC_NAMES, OVERFLOW_LABEL_VALUE };
280
+ export { METRIC_LABEL_POLICY, ORCH_PUSHED_METRIC_NAMES, ORCH_SCALER_VALUES, OVERFLOW_LABEL_VALUE };
282
281
 
283
282
  //# sourceMappingURL=catalog-policy.js.map
@@ -183,8 +183,8 @@ export declare const MetricLabels: {
183
183
  readonly KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: readonly [];
184
184
  readonly KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: readonly ["source"];
185
185
  readonly KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: readonly ["result"];
186
- readonly KICI_ORCH_SCALER_CPUS_USED: readonly ["scaler", "machinePool"];
187
- readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: readonly ["scaler", "machinePool"];
186
+ readonly KICI_ORCH_SCALER_CPUS_USED: readonly ["scaler", "scalerType", "machinePool"];
187
+ readonly KICI_ORCH_SCALER_MEMORY_BYTES_USED: readonly ["scaler", "scalerType", "machinePool"];
188
188
  readonly KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: readonly ["backend", "bound"];
189
189
  readonly KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: readonly [];
190
190
  readonly KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: readonly [];
@@ -188,8 +188,16 @@ const MetricLabels = {
188
188
  KICI_ORCH_LOG_CHUNKS_RECEIVED_TOTAL: [],
189
189
  KICI_ORCH_PG_POOL_CLIENT_ERRORS_TOTAL: ["source"],
190
190
  KICI_ORCH_SCALER_CONFIG_RELOADS_TOTAL: ["result"],
191
- KICI_ORCH_SCALER_CPUS_USED: ["scaler", "machinePool"],
192
- KICI_ORCH_SCALER_MEMORY_BYTES_USED: ["scaler", "machinePool"],
191
+ KICI_ORCH_SCALER_CPUS_USED: [
192
+ "scaler",
193
+ "scalerType",
194
+ "machinePool"
195
+ ],
196
+ KICI_ORCH_SCALER_MEMORY_BYTES_USED: [
197
+ "scaler",
198
+ "scalerType",
199
+ "machinePool"
200
+ ],
193
201
  KICI_ORCH_SCALER_SPAWN_FAILURES_TOTAL: ["backend", "bound"],
194
202
  KICI_ORCH_SCALER_SPAWN_REFUSALS_TOTAL: [],
195
203
  KICI_ORCH_SOURCE_CACHE_HITS_TOTAL: [],
@@ -16,6 +16,7 @@ export declare const AccessLogSource: z.ZodEnum<{
16
16
  platform_proxy: "platform_proxy";
17
17
  admin_http: "admin_http";
18
18
  admin_cli: "admin_cli";
19
+ agent: "agent";
19
20
  }>;
20
21
  export type AccessLogSource = z.infer<typeof AccessLogSource>;
21
22
  /** Outcome of the attempted action. */
@@ -107,6 +108,8 @@ export declare const AccessLogAction: z.ZodEnum<{
107
108
  "scaler.capacity.read": "scaler.capacity.read";
108
109
  "scaler.agents.read": "scaler.agents.read";
109
110
  "fleet.read": "fleet.read";
111
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
112
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
110
113
  "backend.list.read": "backend.list.read";
111
114
  "backend.get.read": "backend.get.read";
112
115
  "backend.sync": "backend.sync";
@@ -199,6 +202,8 @@ export declare const accessLogItemSchema: z.ZodObject<{
199
202
  "scaler.capacity.read": "scaler.capacity.read";
200
203
  "scaler.agents.read": "scaler.agents.read";
201
204
  "fleet.read": "fleet.read";
205
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
206
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
202
207
  "backend.list.read": "backend.list.read";
203
208
  "backend.get.read": "backend.get.read";
204
209
  "backend.sync": "backend.sync";
@@ -238,6 +243,7 @@ export declare const accessLogItemSchema: z.ZodObject<{
238
243
  platform_proxy: "platform_proxy";
239
244
  admin_http: "admin_http";
240
245
  admin_cli: "admin_cli";
246
+ agent: "agent";
241
247
  }>;
242
248
  outcome: z.ZodEnum<{
243
249
  error: "error";
@@ -314,6 +320,8 @@ export declare const accessLogFilterSchema: z.ZodObject<{
314
320
  "scaler.capacity.read": "scaler.capacity.read";
315
321
  "scaler.agents.read": "scaler.agents.read";
316
322
  "fleet.read": "fleet.read";
323
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
324
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
317
325
  "backend.list.read": "backend.list.read";
318
326
  "backend.get.read": "backend.get.read";
319
327
  "backend.sync": "backend.sync";
@@ -331,6 +339,7 @@ export declare const accessLogFilterSchema: z.ZodObject<{
331
339
  platform_proxy: "platform_proxy";
332
340
  admin_http: "admin_http";
333
341
  admin_cli: "admin_cli";
342
+ agent: "agent";
334
343
  }>>;
335
344
  outcome: z.ZodOptional<z.ZodEnum<{
336
345
  error: "error";
@@ -451,6 +460,8 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
451
460
  "scaler.capacity.read": "scaler.capacity.read";
452
461
  "scaler.agents.read": "scaler.agents.read";
453
462
  "fleet.read": "fleet.read";
463
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
464
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
454
465
  "backend.list.read": "backend.list.read";
455
466
  "backend.get.read": "backend.get.read";
456
467
  "backend.sync": "backend.sync";
@@ -468,6 +479,7 @@ export declare const dashboardAccessLogListRequestSchema: z.ZodObject<{
468
479
  platform_proxy: "platform_proxy";
469
480
  admin_http: "admin_http";
470
481
  admin_cli: "admin_cli";
482
+ agent: "agent";
471
483
  }>>;
472
484
  outcome: z.ZodOptional<z.ZodEnum<{
473
485
  error: "error";
@@ -576,6 +588,8 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
576
588
  "scaler.capacity.read": "scaler.capacity.read";
577
589
  "scaler.agents.read": "scaler.agents.read";
578
590
  "fleet.read": "fleet.read";
591
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
592
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
579
593
  "backend.list.read": "backend.list.read";
580
594
  "backend.get.read": "backend.get.read";
581
595
  "backend.sync": "backend.sync";
@@ -615,6 +629,7 @@ export declare const dashboardAccessLogListResponseSchema: z.ZodObject<{
615
629
  platform_proxy: "platform_proxy";
616
630
  admin_http: "admin_http";
617
631
  admin_cli: "admin_cli";
632
+ agent: "agent";
618
633
  }>;
619
634
  outcome: z.ZodEnum<{
620
635
  error: "error";
@@ -18,7 +18,8 @@ import { z } from "zod";
18
18
  const AccessLogSource = z.enum([
19
19
  "platform_proxy",
20
20
  "admin_http",
21
- "admin_cli"
21
+ "admin_cli",
22
+ "agent"
22
23
  ]);
23
24
  /** Outcome of the attempted action. */
24
25
  const AccessLogOutcome = z.enum([
@@ -104,6 +105,8 @@ const AccessLogAction = z.enum([
104
105
  "fleet.read",
105
106
  "fleet.host.declare",
106
107
  "fleet.host.remove",
108
+ "fleet.init_runner.bringup",
109
+ "fleet.pre_boot.send",
107
110
  "backend.list.read",
108
111
  "backend.get.read",
109
112
  "backend.sync",
@@ -1511,6 +1511,16 @@ export declare const envSourceOverrideDeleteRequestSchema: z.ZodObject<{
1511
1511
  routingKey: z.ZodString;
1512
1512
  key: z.ZodString;
1513
1513
  }, z.core.$strip>;
1514
+ /**
1515
+ * A scope→environment binding with its host selector. `hostPattern` is the host
1516
+ * the binding applies to (`'**'` = all hosts); exact / glob / regex over a
1517
+ * fan-out child's agentId / hostname / labels.
1518
+ */
1519
+ export declare const envBindingEntrySchema: z.ZodObject<{
1520
+ scopePattern: z.ZodString;
1521
+ hostPattern: z.ZodString;
1522
+ }, z.core.$strip>;
1523
+ export type EnvBindingEntry = z.infer<typeof envBindingEntrySchema>;
1514
1524
  /** List bindings for an environment. */
1515
1525
  export declare const envBindingsListRequestSchema: z.ZodObject<{
1516
1526
  type: z.ZodLiteral<"dashboard.environments.bindings.list">;
@@ -1536,7 +1546,7 @@ export declare const envBindingsListRequestSchema: z.ZodObject<{
1536
1546
  }, z.core.$strip>], "type">;
1537
1547
  environmentId: z.ZodString;
1538
1548
  }, z.core.$strip>;
1539
- /** Set bindings (scope patterns) for an environment. */
1549
+ /** Set bindings (scope + host patterns) for an environment. */
1540
1550
  export declare const envBindingsSetRequestSchema: z.ZodObject<{
1541
1551
  type: z.ZodLiteral<"dashboard.environments.bindings.set">;
1542
1552
  requestId: z.ZodString;
@@ -1560,7 +1570,10 @@ export declare const envBindingsSetRequestSchema: z.ZodObject<{
1560
1570
  component: z.ZodString;
1561
1571
  }, z.core.$strip>], "type">;
1562
1572
  environmentId: z.ZodString;
1563
- scopePatterns: z.ZodArray<z.ZodString>;
1573
+ bindings: z.ZodArray<z.ZodObject<{
1574
+ scopePattern: z.ZodString;
1575
+ hostPattern: z.ZodString;
1576
+ }, z.core.$strip>>;
1564
1577
  }, z.core.$strip>;
1565
1578
  /** List all scoped secrets for the org. */
1566
1579
  export declare const envSecretsListRequestSchema: z.ZodObject<{
@@ -1937,6 +1950,13 @@ export declare const fleetPinnedRunSchema: z.ZodObject<{
1937
1950
  createdAt: z.ZodString;
1938
1951
  }, z.core.$strip>;
1939
1952
  export type FleetPinnedRun = z.infer<typeof fleetPinnedRunSchema>;
1953
+ /** How a runsOnAll fan-out would treat one host, given its current reachability. */
1954
+ export declare const FleetHostDisposition: z.ZodEnum<{
1955
+ target: "target";
1956
+ "unreachable-durable": "unreachable-durable";
1957
+ "skipped-ephemeral": "skipped-ephemeral";
1958
+ }>;
1959
+ export type FleetHostDisposition = z.infer<typeof FleetHostDisposition>;
1940
1960
  /** A host matched by a runsOnAll preview, plus how the fan-out would treat it. */
1941
1961
  export declare const fleetPreviewHostSchema: z.ZodObject<{
1942
1962
  entry: z.ZodObject<{
@@ -2126,6 +2146,69 @@ export type DashboardFleetPreviewRequest = z.infer<typeof dashboardFleetPreviewR
2126
2146
  export type DashboardFleetHostsResponse = z.infer<typeof dashboardFleetHostsResponseSchema>;
2127
2147
  export type DashboardFleetHostResponse = z.infer<typeof dashboardFleetHostResponseSchema>;
2128
2148
  export type DashboardFleetPreviewResponse = z.infer<typeof dashboardFleetPreviewResponseSchema>;
2149
+ /** Request: which registered runsOnAll fan-outs target this host? */
2150
+ export declare const dashboardFleetWorkflowsForHostRequestSchema: z.ZodObject<{
2151
+ type: z.ZodLiteral<"dashboard.fleet.workflows-for-host">;
2152
+ requestId: z.ZodString;
2153
+ actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
2154
+ type: z.ZodLiteral<"user">;
2155
+ sub: z.ZodString;
2156
+ }, z.core.$strip>, z.ZodObject<{
2157
+ type: z.ZodLiteral<"api_key">;
2158
+ keyId: z.ZodString;
2159
+ ownerSub: z.ZodString;
2160
+ }, z.core.$strip>, z.ZodObject<{
2161
+ type: z.ZodLiteral<"service_account">;
2162
+ id: z.ZodString;
2163
+ }, z.core.$strip>, z.ZodObject<{
2164
+ type: z.ZodLiteral<"platform_operator">;
2165
+ sub: z.ZodString;
2166
+ reason: z.ZodString;
2167
+ sessionId: z.ZodOptional<z.ZodString>;
2168
+ }, z.core.$strip>, z.ZodObject<{
2169
+ type: z.ZodLiteral<"system">;
2170
+ component: z.ZodString;
2171
+ }, z.core.$strip>], "type">;
2172
+ agentId: z.ZodString;
2173
+ }, z.core.$strip>;
2174
+ /** One registered runsOnAll workflow whose selector matches the host. */
2175
+ export declare const fleetHostWorkflowSchema: z.ZodObject<{
2176
+ workflowName: z.ZodString;
2177
+ repoIdentifier: z.ZodString;
2178
+ sourceFile: z.ZodNullable<z.ZodString>;
2179
+ onUnreachable: z.ZodEnum<{
2180
+ skip: "skip";
2181
+ fail: "fail";
2182
+ hold: "hold";
2183
+ }>;
2184
+ disposition: z.ZodEnum<{
2185
+ target: "target";
2186
+ "unreachable-durable": "unreachable-durable";
2187
+ "skipped-ephemeral": "skipped-ephemeral";
2188
+ }>;
2189
+ }, z.core.$strip>;
2190
+ export type FleetHostWorkflow = z.infer<typeof fleetHostWorkflowSchema>;
2191
+ export declare const dashboardFleetWorkflowsForHostResponseSchema: z.ZodObject<{
2192
+ type: z.ZodLiteral<"dashboard.fleet.workflows-for-host.response">;
2193
+ requestId: z.ZodString;
2194
+ workflows: z.ZodArray<z.ZodObject<{
2195
+ workflowName: z.ZodString;
2196
+ repoIdentifier: z.ZodString;
2197
+ sourceFile: z.ZodNullable<z.ZodString>;
2198
+ onUnreachable: z.ZodEnum<{
2199
+ skip: "skip";
2200
+ fail: "fail";
2201
+ hold: "hold";
2202
+ }>;
2203
+ disposition: z.ZodEnum<{
2204
+ target: "target";
2205
+ "unreachable-durable": "unreachable-durable";
2206
+ "skipped-ephemeral": "skipped-ephemeral";
2207
+ }>;
2208
+ }, z.core.$strip>>;
2209
+ }, z.core.$strip>;
2210
+ export type DashboardFleetWorkflowsForHostRequest = z.infer<typeof dashboardFleetWorkflowsForHostRequestSchema>;
2211
+ export type DashboardFleetWorkflowsForHostResponse = z.infer<typeof dashboardFleetWorkflowsForHostResponseSchema>;
2129
2212
  /** Declare a static host into the roster (wraps HostRosterStore.declareStatic). */
2130
2213
  export declare const fleetHostDeclareRequestSchema: z.ZodObject<{
2131
2214
  type: z.ZodLiteral<"dashboard.fleet.host.declare">;
@@ -2150,7 +2233,7 @@ export declare const fleetHostDeclareRequestSchema: z.ZodObject<{
2150
2233
  component: z.ZodString;
2151
2234
  }, z.core.$strip>], "type">;
2152
2235
  agentId: z.ZodString;
2153
- labels: z.ZodArray<z.ZodString>;
2236
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
2154
2237
  hostname: z.ZodOptional<z.ZodString>;
2155
2238
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
2156
2239
  }, z.core.$strip>;
@@ -2158,6 +2241,7 @@ export declare const fleetHostDeclareResponseSchema: z.ZodObject<{
2158
2241
  type: z.ZodLiteral<"dashboard.fleet.host.declare.response">;
2159
2242
  requestId: z.ZodString;
2160
2243
  declared: z.ZodOptional<z.ZodBoolean>;
2244
+ created: z.ZodOptional<z.ZodBoolean>;
2161
2245
  error: z.ZodOptional<z.ZodString>;
2162
2246
  }, z.core.$strip>;
2163
2247
  /** Remove a host from the roster by agent id (HostRosterStore.removeStatic). */
@@ -2946,6 +3030,7 @@ export declare const testRelayTriggerRequestSchema: z.ZodObject<{
2946
3030
  }, z.core.$strip>>;
2947
3031
  allowEmpty: z.ZodBoolean;
2948
3032
  }, z.core.$strip>>;
3033
+ dispatchInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2949
3034
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2950
3035
  encryptedSecrets: z.ZodOptional<z.ZodString>;
2951
3036
  encryptedSecretsKey: z.ZodOptional<z.ZodString>;
@@ -3709,7 +3794,10 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
3709
3794
  component: z.ZodString;
3710
3795
  }, z.core.$strip>], "type">;
3711
3796
  environmentId: z.ZodString;
3712
- scopePatterns: z.ZodArray<z.ZodString>;
3797
+ bindings: z.ZodArray<z.ZodObject<{
3798
+ scopePattern: z.ZodString;
3799
+ hostPattern: z.ZodString;
3800
+ }, z.core.$strip>>;
3713
3801
  }, z.core.$strip>, z.ZodObject<{
3714
3802
  type: z.ZodLiteral<"dashboard.environments.secrets.list">;
3715
3803
  requestId: z.ZodString;
@@ -4120,6 +4208,29 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
4120
4208
  component: z.ZodString;
4121
4209
  }, z.core.$strip>], "type">;
4122
4210
  workflowName: z.ZodString;
4211
+ }, z.core.$strip>, z.ZodObject<{
4212
+ type: z.ZodLiteral<"dashboard.fleet.workflows-for-host">;
4213
+ requestId: z.ZodString;
4214
+ actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
4215
+ type: z.ZodLiteral<"user">;
4216
+ sub: z.ZodString;
4217
+ }, z.core.$strip>, z.ZodObject<{
4218
+ type: z.ZodLiteral<"api_key">;
4219
+ keyId: z.ZodString;
4220
+ ownerSub: z.ZodString;
4221
+ }, z.core.$strip>, z.ZodObject<{
4222
+ type: z.ZodLiteral<"service_account">;
4223
+ id: z.ZodString;
4224
+ }, z.core.$strip>, z.ZodObject<{
4225
+ type: z.ZodLiteral<"platform_operator">;
4226
+ sub: z.ZodString;
4227
+ reason: z.ZodString;
4228
+ sessionId: z.ZodOptional<z.ZodString>;
4229
+ }, z.core.$strip>, z.ZodObject<{
4230
+ type: z.ZodLiteral<"system">;
4231
+ component: z.ZodString;
4232
+ }, z.core.$strip>], "type">;
4233
+ agentId: z.ZodString;
4123
4234
  }, z.core.$strip>, z.ZodObject<{
4124
4235
  type: z.ZodLiteral<"dashboard.fleet.host.declare">;
4125
4236
  requestId: z.ZodString;
@@ -4143,7 +4254,7 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
4143
4254
  component: z.ZodString;
4144
4255
  }, z.core.$strip>], "type">;
4145
4256
  agentId: z.ZodString;
4146
- labels: z.ZodArray<z.ZodString>;
4257
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
4147
4258
  hostname: z.ZodOptional<z.ZodString>;
4148
4259
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
4149
4260
  }, z.core.$strip>, z.ZodObject<{
@@ -4655,6 +4766,8 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
4655
4766
  "scaler.capacity.read": "scaler.capacity.read";
4656
4767
  "scaler.agents.read": "scaler.agents.read";
4657
4768
  "fleet.read": "fleet.read";
4769
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
4770
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
4658
4771
  "backend.list.read": "backend.list.read";
4659
4772
  "backend.get.read": "backend.get.read";
4660
4773
  "backend.sync": "backend.sync";
@@ -4672,6 +4785,7 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
4672
4785
  platform_proxy: "platform_proxy";
4673
4786
  admin_http: "admin_http";
4674
4787
  admin_cli: "admin_cli";
4788
+ agent: "agent";
4675
4789
  }>>;
4676
4790
  outcome: z.ZodOptional<z.ZodEnum<{
4677
4791
  error: "error";
@@ -4793,6 +4907,7 @@ export declare const dashboardPlatformToOrchSchema: z.ZodDiscriminatedUnion<[z.Z
4793
4907
  }, z.core.$strip>>;
4794
4908
  allowEmpty: z.ZodBoolean;
4795
4909
  }, z.core.$strip>>;
4910
+ dispatchInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4796
4911
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4797
4912
  encryptedSecrets: z.ZodOptional<z.ZodString>;
4798
4913
  encryptedSecretsKey: z.ZodOptional<z.ZodString>;
@@ -5204,7 +5319,10 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
5204
5319
  }, z.core.$strip>, z.ZodObject<{
5205
5320
  type: z.ZodLiteral<"dashboard.environments.bindings.list.response">;
5206
5321
  requestId: z.ZodString;
5207
- scopePatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
5322
+ bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
5323
+ scopePattern: z.ZodString;
5324
+ hostPattern: z.ZodString;
5325
+ }, z.core.$strip>>>;
5208
5326
  error: z.ZodOptional<z.ZodString>;
5209
5327
  }, z.core.$strip>, z.ZodObject<{
5210
5328
  type: z.ZodLiteral<"dashboard.environments.bindings.set.response">;
@@ -5572,10 +5690,29 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
5572
5690
  hold: "hold";
5573
5691
  }>;
5574
5692
  estimatedChildCount: z.ZodNumber;
5693
+ }, z.core.$strip>, z.ZodObject<{
5694
+ type: z.ZodLiteral<"dashboard.fleet.workflows-for-host.response">;
5695
+ requestId: z.ZodString;
5696
+ workflows: z.ZodArray<z.ZodObject<{
5697
+ workflowName: z.ZodString;
5698
+ repoIdentifier: z.ZodString;
5699
+ sourceFile: z.ZodNullable<z.ZodString>;
5700
+ onUnreachable: z.ZodEnum<{
5701
+ skip: "skip";
5702
+ fail: "fail";
5703
+ hold: "hold";
5704
+ }>;
5705
+ disposition: z.ZodEnum<{
5706
+ target: "target";
5707
+ "unreachable-durable": "unreachable-durable";
5708
+ "skipped-ephemeral": "skipped-ephemeral";
5709
+ }>;
5710
+ }, z.core.$strip>>;
5575
5711
  }, z.core.$strip>, z.ZodObject<{
5576
5712
  type: z.ZodLiteral<"dashboard.fleet.host.declare.response">;
5577
5713
  requestId: z.ZodString;
5578
5714
  declared: z.ZodOptional<z.ZodBoolean>;
5715
+ created: z.ZodOptional<z.ZodBoolean>;
5579
5716
  error: z.ZodOptional<z.ZodString>;
5580
5717
  }, z.core.$strip>, z.ZodObject<{
5581
5718
  type: z.ZodLiteral<"dashboard.fleet.host.remove.response">;
@@ -5933,6 +6070,8 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
5933
6070
  "scaler.capacity.read": "scaler.capacity.read";
5934
6071
  "scaler.agents.read": "scaler.agents.read";
5935
6072
  "fleet.read": "fleet.read";
6073
+ "fleet.init_runner.bringup": "fleet.init_runner.bringup";
6074
+ "fleet.pre_boot.send": "fleet.pre_boot.send";
5936
6075
  "backend.list.read": "backend.list.read";
5937
6076
  "backend.get.read": "backend.get.read";
5938
6077
  "backend.sync": "backend.sync";
@@ -5972,6 +6111,7 @@ export declare const dashboardOrchToPlatformSchema: z.ZodDiscriminatedUnion<[z.Z
5972
6111
  platform_proxy: "platform_proxy";
5973
6112
  admin_http: "admin_http";
5974
6113
  admin_cli: "admin_cli";
6114
+ agent: "agent";
5975
6115
  }>;
5976
6116
  outcome: z.ZodEnum<{
5977
6117
  error: "error";
@@ -819,6 +819,15 @@ const envSourceOverrideDeleteResponseSchema = z.object({
819
819
  requestId: z.string(),
820
820
  error: z.string().optional()
821
821
  });
822
+ /**
823
+ * A scope→environment binding with its host selector. `hostPattern` is the host
824
+ * the binding applies to (`'**'` = all hosts); exact / glob / regex over a
825
+ * fan-out child's agentId / hostname / labels.
826
+ */
827
+ const envBindingEntrySchema = z.object({
828
+ scopePattern: z.string(),
829
+ hostPattern: z.string()
830
+ });
822
831
  /** List bindings for an environment. */
823
832
  const envBindingsListRequestSchema = z.object({
824
833
  type: z.literal("dashboard.environments.bindings.list"),
@@ -829,16 +838,16 @@ const envBindingsListRequestSchema = z.object({
829
838
  const envBindingsListResponseSchema = z.object({
830
839
  type: z.literal("dashboard.environments.bindings.list.response"),
831
840
  requestId: z.string(),
832
- scopePatterns: z.array(z.string()).optional(),
841
+ bindings: z.array(envBindingEntrySchema).optional(),
833
842
  error: z.string().optional()
834
843
  });
835
- /** Set bindings (scope patterns) for an environment. */
844
+ /** Set bindings (scope + host patterns) for an environment. */
836
845
  const envBindingsSetRequestSchema = z.object({
837
846
  type: z.literal("dashboard.environments.bindings.set"),
838
847
  requestId: z.string(),
839
848
  actor: actorPrincipalSchema,
840
849
  environmentId: z.string(),
841
- scopePatterns: z.array(z.string())
850
+ bindings: z.array(envBindingEntrySchema)
842
851
  });
843
852
  const envBindingsSetResponseSchema = z.object({
844
853
  type: z.literal("dashboard.environments.bindings.set.response"),
@@ -1054,14 +1063,16 @@ const fleetPinnedRunSchema = z.object({
1054
1063
  status: z.string(),
1055
1064
  createdAt: z.string()
1056
1065
  });
1066
+ /** How a runsOnAll fan-out would treat one host, given its current reachability. */
1067
+ const FleetHostDisposition = z.enum([
1068
+ "target",
1069
+ "unreachable-durable",
1070
+ "skipped-ephemeral"
1071
+ ]);
1057
1072
  /** A host matched by a runsOnAll preview, plus how the fan-out would treat it. */
1058
1073
  const fleetPreviewHostSchema = z.object({
1059
1074
  entry: HostInventoryEntry,
1060
- disposition: z.enum([
1061
- "target",
1062
- "unreachable-durable",
1063
- "skipped-ephemeral"
1064
- ])
1075
+ disposition: FleetHostDisposition
1065
1076
  });
1066
1077
  const dashboardFleetHostsRequestSchema = z.object({
1067
1078
  type: z.literal("dashboard.fleet.hosts"),
@@ -1098,13 +1109,33 @@ const dashboardFleetPreviewResponseSchema = z.object({
1098
1109
  onUnreachable: OnUnreachableMode,
1099
1110
  estimatedChildCount: z.number()
1100
1111
  });
1112
+ /** Request: which registered runsOnAll fan-outs target this host? */
1113
+ const dashboardFleetWorkflowsForHostRequestSchema = z.object({
1114
+ type: z.literal("dashboard.fleet.workflows-for-host"),
1115
+ requestId: z.string(),
1116
+ actor: actorPrincipalSchema,
1117
+ agentId: z.string()
1118
+ });
1119
+ /** One registered runsOnAll workflow whose selector matches the host. */
1120
+ const fleetHostWorkflowSchema = z.object({
1121
+ workflowName: z.string(),
1122
+ repoIdentifier: z.string(),
1123
+ sourceFile: z.string().nullable(),
1124
+ onUnreachable: OnUnreachableMode,
1125
+ disposition: FleetHostDisposition
1126
+ });
1127
+ const dashboardFleetWorkflowsForHostResponseSchema = z.object({
1128
+ type: z.literal("dashboard.fleet.workflows-for-host.response"),
1129
+ requestId: z.string(),
1130
+ workflows: z.array(fleetHostWorkflowSchema)
1131
+ });
1101
1132
  /** Declare a static host into the roster (wraps HostRosterStore.declareStatic). */
1102
1133
  const fleetHostDeclareRequestSchema = z.object({
1103
1134
  type: z.literal("dashboard.fleet.host.declare"),
1104
1135
  requestId: z.string(),
1105
1136
  actor: actorPrincipalSchema,
1106
1137
  agentId: z.string(),
1107
- labels: z.array(z.string()),
1138
+ labels: z.array(z.string()).optional(),
1108
1139
  hostname: z.string().optional(),
1109
1140
  properties: z.record(z.string(), z.union([
1110
1141
  z.string(),
@@ -1116,6 +1147,7 @@ const fleetHostDeclareResponseSchema = z.object({
1116
1147
  type: z.literal("dashboard.fleet.host.declare.response"),
1117
1148
  requestId: z.string(),
1118
1149
  declared: z.boolean().optional(),
1150
+ created: z.boolean().optional(),
1119
1151
  error: z.string().optional()
1120
1152
  });
1121
1153
  /** Remove a host from the roster by agent id (HostRosterStore.removeStatic). */
@@ -1535,6 +1567,12 @@ const testRelayTriggerRequestSchema = z.object({
1535
1567
  * job's matched roster with this selector. Omitted for webhook runs.
1536
1568
  */
1537
1569
  target: HostTargetSelector.optional(),
1570
+ /**
1571
+ * Raw operator-supplied `kici run --input KEY=VALUE` pairs (not coerced /
1572
+ * defaulted), relayed verbatim. The orchestrator validates + coerces + applies
1573
+ * defaults authoritatively against the matched workflow's lock descriptor.
1574
+ */
1575
+ dispatchInputs: z.record(z.string(), z.string()).optional(),
1538
1576
  secrets: z.record(z.string(), z.string()).optional(),
1539
1577
  encryptedSecrets: z.string().optional(),
1540
1578
  encryptedSecretsKey: z.string().optional()
@@ -1648,6 +1686,7 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
1648
1686
  dashboardFleetHostsRequestSchema,
1649
1687
  dashboardFleetHostRequestSchema,
1650
1688
  dashboardFleetPreviewRequestSchema,
1689
+ dashboardFleetWorkflowsForHostRequestSchema,
1651
1690
  fleetHostDeclareRequestSchema,
1652
1691
  fleetHostRemoveRequestSchema,
1653
1692
  dashboardScalerCapacityRequestSchema,
@@ -1717,6 +1756,7 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
1717
1756
  dashboardFleetHostsResponseSchema,
1718
1757
  dashboardFleetHostResponseSchema,
1719
1758
  dashboardFleetPreviewResponseSchema,
1759
+ dashboardFleetWorkflowsForHostResponseSchema,
1720
1760
  fleetHostDeclareResponseSchema,
1721
1761
  fleetHostRemoveResponseSchema,
1722
1762
  dashboardScalerCapacityResponseSchema,
@@ -1991,6 +2031,6 @@ const orgMemberSchema = z.object({
1991
2031
  /** Response for org members list endpoint. */
1992
2032
  const memberListResponseSchema = z.object({ members: z.array(orgMemberSchema) });
1993
2033
  //#endregion
1994
- export { EnvDeleteErrorCode, EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListItemSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema };
2034
+ export { EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListItemSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema };
1995
2035
 
1996
2036
  //# sourceMappingURL=dashboard.js.map