@kici-dev/engine 0.1.27 → 0.2.0

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 (148) hide show
  1. package/dist/approval/types.d.ts +8 -1
  2. package/dist/approval/types.js +8 -1
  3. package/dist/artifacts/name.d.ts +60 -0
  4. package/dist/artifacts/name.js +71 -0
  5. package/dist/audit/access-log-policy.d.ts +1 -1
  6. package/dist/audit/access-log-policy.js +8 -0
  7. package/dist/audit/activity.d.ts +12 -12
  8. package/dist/audit/retention-policy.js +16 -0
  9. package/dist/billing/plan-type.d.ts +53 -0
  10. package/dist/billing/plan-type.js +70 -0
  11. package/dist/bundler/rolldown-config.d.ts +3 -3
  12. package/dist/check-mode.d.ts +1 -1
  13. package/dist/context/concurrency-strategy.d.ts +34 -0
  14. package/dist/context/concurrency-strategy.js +35 -0
  15. package/dist/context/held-run-job-id.d.ts +45 -0
  16. package/dist/context/held-run-job-id.js +56 -0
  17. package/dist/context/held-run-status.d.ts +33 -0
  18. package/dist/context/held-run-status.js +37 -0
  19. package/dist/context/hold-expiry.d.ts +20 -0
  20. package/dist/context/hold-expiry.js +25 -0
  21. package/dist/context/hold-reason.d.ts +33 -0
  22. package/dist/context/hold-reason.js +23 -0
  23. package/dist/context/hold-type.d.ts +40 -0
  24. package/dist/context/hold-type.js +61 -0
  25. package/dist/context/index.d.ts +9 -1
  26. package/dist/context/index.js +9 -2
  27. package/dist/context/multi-context.d.ts +3 -3
  28. package/dist/context/scope-name.d.ts +29 -0
  29. package/dist/context/scope-name.js +49 -0
  30. package/dist/context/scope-resolver.d.ts +33 -0
  31. package/dist/context/scope-resolver.js +45 -15
  32. package/dist/context/types.d.ts +8 -5
  33. package/dist/dev-ops/operations.d.ts +8 -0
  34. package/dist/dev-ops/operations.js +36 -19
  35. package/dist/diagnostics/infra-alert.d.ts +71 -0
  36. package/dist/diagnostics/infra-alert.js +60 -0
  37. package/dist/env/environment-allowlist.d.ts +4 -4
  38. package/dist/fanout/materialize.d.ts +16 -0
  39. package/dist/fanout/materialize.js +32 -3
  40. package/dist/index.d.ts +15 -6
  41. package/dist/index.js +34 -19
  42. package/dist/inputs/descriptor.d.ts +9 -9
  43. package/dist/inventory.d.ts +4 -4
  44. package/dist/labels.d.ts +82 -2
  45. package/dist/labels.js +119 -1
  46. package/dist/matrix/expand.d.ts +49 -2
  47. package/dist/matrix/expand.js +102 -13
  48. package/dist/matrix/format.d.ts +6 -1
  49. package/dist/matrix/format.js +6 -1
  50. package/dist/mcp/held-run-resolve.d.ts +7 -10
  51. package/dist/mcp/held-run-resolve.js +33 -7
  52. package/dist/metrics/catalog-policy.js +4 -4
  53. package/dist/metrics/metric-catalog.generated.d.ts +954 -739
  54. package/dist/metrics/metric-catalog.generated.js +278 -20
  55. package/dist/metrics/metric-kind-compat.d.ts +26 -0
  56. package/dist/metrics/metric-kind-compat.js +33 -0
  57. package/dist/protocol/analytics-events.d.ts +6 -6
  58. package/dist/protocol/dashboard-api-errors.d.ts +1 -0
  59. package/dist/protocol/dashboard-api-errors.js +5 -1
  60. package/dist/protocol/dashboard-write-operations.d.ts +143 -86
  61. package/dist/protocol/dashboard-write-operations.js +91 -17
  62. package/dist/protocol/messages/access-log.d.ts +437 -392
  63. package/dist/protocol/messages/access-log.js +11 -2
  64. package/dist/protocol/messages/actor.d.ts +2 -2
  65. package/dist/protocol/messages/agent-dev-ops.d.ts +4 -2
  66. package/dist/protocol/messages/agent-dev-ops.js +2 -5
  67. package/dist/protocol/messages/agent-run-result.d.ts +72 -62
  68. package/dist/protocol/messages/auth.d.ts +35 -23
  69. package/dist/protocol/messages/browser.d.ts +81 -5
  70. package/dist/protocol/messages/browser.js +53 -2
  71. package/dist/protocol/messages/capabilities.d.ts +106 -31
  72. package/dist/protocol/messages/capabilities.js +94 -10
  73. package/dist/protocol/messages/common.d.ts +45 -2
  74. package/dist/protocol/messages/common.js +64 -3
  75. package/dist/protocol/messages/dashboard-sealed-write.d.ts +52 -0
  76. package/dist/protocol/messages/dashboard-sealed-write.js +57 -0
  77. package/dist/protocol/messages/dashboard.d.ts +1022 -498
  78. package/dist/protocol/messages/dashboard.js +198 -31
  79. package/dist/protocol/messages/deployment-identity.d.ts +37 -10
  80. package/dist/protocol/messages/deployment-identity.js +30 -3
  81. package/dist/protocol/messages/event-log.d.ts +5 -5
  82. package/dist/protocol/messages/execution-status.d.ts +189 -53
  83. package/dist/protocol/messages/execution-status.js +108 -40
  84. package/dist/protocol/messages/heartbeat-health.d.ts +83 -0
  85. package/dist/protocol/messages/heartbeat-health.js +87 -0
  86. package/dist/protocol/messages/log-stream.d.ts +18 -0
  87. package/dist/protocol/messages/log-stream.js +19 -0
  88. package/dist/protocol/messages/oidc-mint.d.ts +7 -0
  89. package/dist/protocol/messages/oidc-mint.js +7 -0
  90. package/dist/protocol/messages/orchestrator-agent.d.ts +264 -67
  91. package/dist/protocol/messages/orchestrator-agent.js +170 -5
  92. package/dist/protocol/messages/pat-kind.d.ts +1 -1
  93. package/dist/protocol/messages/peer.d.ts +122 -58
  94. package/dist/protocol/messages/peer.js +37 -2
  95. package/dist/protocol/messages/platform-orchestrator.d.ts +561 -217
  96. package/dist/protocol/messages/platform-orchestrator.js +131 -21
  97. package/dist/protocol/messages/run-events.d.ts +5 -5
  98. package/dist/protocol/messages/scaler-event.d.ts +3 -3
  99. package/dist/protocol/messages/source-registration.d.ts +56 -13
  100. package/dist/protocol/messages/source-registration.js +49 -6
  101. package/dist/protocol/source-origin.d.ts +1 -1
  102. package/dist/provenance/attestation-origin.d.ts +1 -1
  103. package/dist/provenance/schema.d.ts +11 -11
  104. package/dist/provenance/verify.js +2 -1
  105. package/dist/provider/changed-files-fetcher.d.ts +21 -2
  106. package/dist/provider/check-run-conclusion.d.ts +2 -2
  107. package/dist/provider/check-status-poster.d.ts +23 -0
  108. package/dist/provider/index.d.ts +2 -2
  109. package/dist/registration/registerable-trigger-type.d.ts +14 -13
  110. package/dist/registration/registerable-trigger-type.js +1 -0
  111. package/dist/sandbox/capabilities.d.ts +6 -0
  112. package/dist/sandbox/capabilities.js +57 -0
  113. package/dist/scaler/scaler-backend-type.d.ts +1 -1
  114. package/dist/status/presentation.d.ts +89 -0
  115. package/dist/status/presentation.js +163 -0
  116. package/dist/trigger/compiled-matchers.d.ts +13 -0
  117. package/dist/trigger/compiled-matchers.js +44 -0
  118. package/dist/trigger/event-buckets.d.ts +44 -0
  119. package/dist/trigger/event-buckets.js +93 -0
  120. package/dist/trigger/matcher.d.ts +7 -3
  121. package/dist/trigger/matcher.js +53 -15
  122. package/dist/trigger/schedule-key.d.ts +14 -0
  123. package/dist/trigger/schedule-key.js +21 -0
  124. package/dist/trigger/trigger-event-type.d.ts +1 -1
  125. package/dist/trigger/trigger-event-type.js +2 -0
  126. package/dist/trigger/types.d.ts +173 -43
  127. package/dist/trigger/types.js +82 -25
  128. package/dist/webhook/event-types.d.ts +56 -0
  129. package/dist/webhook/event-types.js +59 -0
  130. package/dist/ws/ws-like.d.ts +13 -0
  131. package/package.json +12 -4
  132. package/sbom.spdx.json +10 -10
  133. package/dist/environment/host-match.d.ts +0 -25
  134. package/dist/environment/index.d.ts +0 -6
  135. package/dist/environment/multi-env.d.ts +0 -30
  136. package/dist/environment/scope-resolver.d.ts +0 -46
  137. package/dist/environment/scope-template.d.ts +0 -18
  138. package/dist/environment/types.d.ts +0 -119
  139. package/dist/package-manager.d.ts +0 -20
  140. package/dist/protocol/messages/observe.d.ts +0 -76
  141. package/dist/protocol/messages/saas-orchestrator.d.ts +0 -2179
  142. package/dist/protocol/messages/test-run.d.ts +0 -59
  143. package/dist/state-machine/index.d.ts +0 -2
  144. package/dist/state-machine/index.js +0 -3
  145. package/dist/state-machine/machine.d.ts +0 -34
  146. package/dist/state-machine/machine.js +0 -103
  147. package/dist/state-machine/types.d.ts +0 -34
  148. package/dist/state-machine/types.js +0 -15
@@ -9,8 +9,8 @@ import { z } from 'zod';
9
9
  * so an untrusted ref can never poison the shared cache (GitHub Actions model).
10
10
  */
11
11
  export declare const CacheRefScope: z.ZodEnum<{
12
- shared: "shared";
13
12
  isolated: "isolated";
13
+ shared: "shared";
14
14
  }>;
15
15
  export type CacheRefScope = z.infer<typeof CacheRefScope>;
16
16
  /**
@@ -29,17 +29,18 @@ export declare const upstreamSnapshotSchema: z.ZodObject<{
29
29
  jobs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
30
  groups: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
31
31
  statuses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
32
- skipped: "skipped";
33
- success: "success";
34
- pending: "pending";
35
- running: "running";
36
- failed: "failed";
37
32
  cancelled: "cancelled";
38
33
  cancelling: "cancelling";
34
+ drift_dropped: "drift_dropped";
35
+ failed: "failed";
36
+ pending: "pending";
39
37
  queued: "queued";
40
38
  recovering: "recovering";
39
+ running: "running";
40
+ skipped: "skipped";
41
+ success: "success";
41
42
  timed_out_stale: "timed_out_stale";
42
- drift_dropped: "drift_dropped";
43
+ unroutable: "unroutable";
43
44
  }>>>;
44
45
  }, z.core.$strip>;
45
46
  export type UpstreamSnapshot = z.infer<typeof upstreamSnapshotSchema>;
@@ -87,6 +88,7 @@ export declare const jobDispatchSchema: z.ZodObject<{
87
88
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
88
89
  namespacedSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
89
90
  maxLogSizeBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
91
+ concurrencyWaitTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
90
92
  sourceTarUrl: z.ZodOptional<z.ZodString>;
91
93
  sourceTarHash: z.ZodOptional<z.ZodString>;
92
94
  depsUrl: z.ZodOptional<z.ZodString>;
@@ -95,17 +97,18 @@ export declare const jobDispatchSchema: z.ZodObject<{
95
97
  runPublicKey: z.ZodOptional<z.ZodString>;
96
98
  upstreamJobOutputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
97
99
  upstreamJobStatuses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
98
- skipped: "skipped";
99
- success: "success";
100
- pending: "pending";
101
- running: "running";
102
- failed: "failed";
103
100
  cancelled: "cancelled";
104
101
  cancelling: "cancelling";
102
+ drift_dropped: "drift_dropped";
103
+ failed: "failed";
104
+ pending: "pending";
105
105
  queued: "queued";
106
106
  recovering: "recovering";
107
+ running: "running";
108
+ skipped: "skipped";
109
+ success: "success";
107
110
  timed_out_stale: "timed_out_stale";
108
- drift_dropped: "drift_dropped";
111
+ unroutable: "unroutable";
109
112
  }>>>;
110
113
  sourceAuth: z.ZodOptional<z.ZodObject<{
111
114
  kind: z.ZodEnum<{
@@ -143,8 +146,8 @@ export declare const jobDispatchSchema: z.ZodObject<{
143
146
  orgId: z.ZodOptional<z.ZodString>;
144
147
  repoId: z.ZodOptional<z.ZodString>;
145
148
  cacheRefScope: z.ZodOptional<z.ZodEnum<{
146
- shared: "shared";
147
149
  isolated: "isolated";
150
+ shared: "shared";
148
151
  }>>;
149
152
  }, z.core.$strip>;
150
153
  /** Cancel a running or queued job. */
@@ -163,6 +166,9 @@ export declare const registerAckSchema: z.ZodObject<{
163
166
  labels: z.ZodArray<z.ZodString>;
164
167
  scalerManaged: z.ZodDefault<z.ZodBoolean>;
165
168
  pendingDispatch: z.ZodOptional<z.ZodBoolean>;
169
+ capabilities: z.ZodOptional<z.ZodObject<{
170
+ artifactCompleteAck: z.ZodOptional<z.ZodBoolean>;
171
+ }, z.core.$loose>>;
166
172
  }, z.core.$strip>;
167
173
  /** Agent registration with capabilities and capacity. */
168
174
  export declare const agentRegisterSchema: z.ZodObject<{
@@ -205,17 +211,18 @@ export declare const jobStatusSchema: z.ZodObject<{
205
211
  runId: z.ZodString;
206
212
  jobId: z.ZodString;
207
213
  state: z.ZodEnum<{
208
- skipped: "skipped";
209
- success: "success";
210
- pending: "pending";
211
- running: "running";
212
- failed: "failed";
213
214
  cancelled: "cancelled";
214
215
  cancelling: "cancelling";
216
+ drift_dropped: "drift_dropped";
217
+ failed: "failed";
218
+ pending: "pending";
215
219
  queued: "queued";
216
220
  recovering: "recovering";
221
+ running: "running";
222
+ skipped: "skipped";
223
+ success: "success";
217
224
  timed_out_stale: "timed_out_stale";
218
- drift_dropped: "drift_dropped";
225
+ unroutable: "unroutable";
219
226
  }>;
220
227
  timestamp: z.ZodNumber;
221
228
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -227,8 +234,8 @@ export declare const jobStatusSchema: z.ZodObject<{
227
234
  }, z.core.$strip>;
228
235
  /** Reasons an agent can refuse a job.dispatch. */
229
236
  export declare const JobRejectReason: z.ZodEnum<{
230
- draining: "draining";
231
237
  busy: "busy";
238
+ draining: "draining";
232
239
  }>;
233
240
  export type JobRejectReason = z.infer<typeof JobRejectReason>;
234
241
  /**
@@ -248,8 +255,8 @@ export declare const jobRejectSchema: z.ZodObject<{
248
255
  runId: z.ZodString;
249
256
  jobId: z.ZodString;
250
257
  reason: z.ZodEnum<{
251
- draining: "draining";
252
258
  busy: "busy";
259
+ draining: "draining";
253
260
  }>;
254
261
  timestamp: z.ZodNumber;
255
262
  }, z.core.$strip>;
@@ -286,6 +293,10 @@ export declare const agentLogChunkSchema: z.ZodObject<{
286
293
  stepIndex: z.ZodNumber;
287
294
  lines: z.ZodArray<z.ZodString>;
288
295
  timestamp: z.ZodNumber;
296
+ stream: z.ZodOptional<z.ZodEnum<{
297
+ stderr: "stderr";
298
+ stdout: "stdout";
299
+ }>>;
289
300
  }, z.core.$strip>;
290
301
  /** Step-level execution state report (agent -> orchestrator). */
291
302
  export declare const agentStepStatusSchema: z.ZodObject<{
@@ -296,29 +307,29 @@ export declare const agentStepStatusSchema: z.ZodObject<{
296
307
  stepIndex: z.ZodNumber;
297
308
  stepName: z.ZodString;
298
309
  state: z.ZodEnum<{
299
- skipped: "skipped";
300
- success: "success";
310
+ cancelled: "cancelled";
311
+ failed: "failed";
301
312
  pending: "pending";
302
313
  running: "running";
303
- failed: "failed";
304
- cancelled: "cancelled";
314
+ skipped: "skipped";
315
+ success: "success";
305
316
  }>;
306
317
  timestamp: z.ZodNumber;
307
318
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
308
319
  step_type: z.ZodOptional<z.ZodEnum<{
309
- step: "step";
310
- "hook:onCancel": "hook:onCancel";
320
+ "hook:afterStep": "hook:afterStep";
321
+ "hook:beforeStep": "hook:beforeStep";
311
322
  "hook:cleanup": "hook:cleanup";
312
- "hook:onSuccess": "hook:onSuccess";
323
+ "hook:onCancel": "hook:onCancel";
313
324
  "hook:onFailure": "hook:onFailure";
314
- "hook:beforeStep": "hook:beforeStep";
315
- "hook:afterStep": "hook:afterStep";
325
+ "hook:onSuccess": "hook:onSuccess";
326
+ step: "step";
316
327
  }>>;
317
328
  secretsAccessed: z.ZodOptional<z.ZodArray<z.ZodString>>;
318
329
  concurrencyKind: z.ZodOptional<z.ZodEnum<{
319
- sequential: "sequential";
320
330
  "parallel-child": "parallel-child";
321
331
  "parallel-group": "parallel-group";
332
+ sequential: "sequential";
322
333
  }>>;
323
334
  groupId: z.ZodOptional<z.ZodString>;
324
335
  logBytesStreamed: z.ZodOptional<z.ZodNumber>;
@@ -350,9 +361,9 @@ export declare const jobConcurrencyAckSchema: z.ZodObject<{
350
361
  type: z.ZodLiteral<"job.concurrency.ack">;
351
362
  requestId: z.ZodString;
352
363
  action: z.ZodEnum<{
353
- wait: "wait";
354
- proceed: "proceed";
355
364
  cancel: "cancel";
365
+ proceed: "proceed";
366
+ wait: "wait";
356
367
  }>;
357
368
  reason: z.ZodOptional<z.ZodString>;
358
369
  runId: z.ZodOptional<z.ZodString>;
@@ -452,6 +463,122 @@ export declare const provenanceUploadDeferSchema: z.ZodObject<{
452
463
  }, z.core.$strip>;
453
464
  publicKey: z.ZodRecord<z.ZodString, z.ZodUnknown>;
454
465
  }, z.core.$strip>;
466
+ /**
467
+ * Outcome of an artifact upload grant: the orchestrator either mints a
468
+ * presigned PUT (`granted`) or refuses with a named reason (`rejected`).
469
+ */
470
+ export declare const ArtifactUploadOutcome: z.ZodEnum<{
471
+ granted: "granted";
472
+ rejected: "rejected";
473
+ }>;
474
+ export type ArtifactUploadOutcome = z.infer<typeof ArtifactUploadOutcome>;
475
+ /**
476
+ * Why an artifact upload was refused. Each value maps to an enforcement gate
477
+ * checked BEFORE a presigned PUT is minted; the agent surfaces the reason
478
+ * verbatim in the step error.
479
+ */
480
+ export declare const ArtifactRejectReason: z.ZodEnum<{
481
+ duplicate_name: "duplicate_name";
482
+ org_quota: "org_quota";
483
+ run_cap: "run_cap";
484
+ size_cap: "size_cap";
485
+ }>;
486
+ export type ArtifactRejectReason = z.infer<typeof ArtifactRejectReason>;
487
+ /** Outcome of an artifact download lookup: the named artifact exists or not. */
488
+ export declare const ArtifactDownloadOutcome: z.ZodEnum<{
489
+ found: "found";
490
+ not_found: "not_found";
491
+ }>;
492
+ export type ArtifactDownloadOutcome = z.infer<typeof ArtifactDownloadOutcome>;
493
+ /** Agent -> Orchestrator: request a presigned PUT for a named artifact upload. */
494
+ export declare const artifactsUploadRequestSchema: z.ZodObject<{
495
+ type: z.ZodLiteral<"artifacts.upload.request">;
496
+ messageId: z.ZodString;
497
+ jobId: z.ZodString;
498
+ name: z.ZodString;
499
+ declaredSizeBytes: z.ZodNumber;
500
+ }, z.core.$strip>;
501
+ /**
502
+ * Orchestrator -> Agent: a presigned PUT (`granted`) or a named refusal
503
+ * (`rejected`). All enforcement (duplicate name, per-artifact/per-run cap, org
504
+ * quota) happens before minting, so a `granted` URL is safe to upload to.
505
+ */
506
+ export declare const artifactsUploadResponseSchema: z.ZodObject<{
507
+ type: z.ZodLiteral<"artifacts.upload.response">;
508
+ requestId: z.ZodString;
509
+ outcome: z.ZodEnum<{
510
+ granted: "granted";
511
+ rejected: "rejected";
512
+ }>;
513
+ uploadUrl: z.ZodOptional<z.ZodString>;
514
+ storageKey: z.ZodOptional<z.ZodString>;
515
+ reason: z.ZodOptional<z.ZodEnum<{
516
+ duplicate_name: "duplicate_name";
517
+ org_quota: "org_quota";
518
+ run_cap: "run_cap";
519
+ size_cap: "size_cap";
520
+ }>>;
521
+ error: z.ZodOptional<z.ZodString>;
522
+ }, z.core.$strip>;
523
+ /** Agent -> Orchestrator: confirm an artifact upload finished; records the DB row. */
524
+ export declare const artifactsUploadCompleteSchema: z.ZodObject<{
525
+ type: z.ZodLiteral<"artifacts.upload.complete">;
526
+ messageId: z.ZodString;
527
+ jobId: z.ZodString;
528
+ name: z.ZodString;
529
+ sizeBytes: z.ZodNumber;
530
+ sha256: z.ZodString;
531
+ storageKey: z.ZodString;
532
+ }, z.core.$strip>;
533
+ /**
534
+ * Outcome the orchestrator reports for an artifact commit: the DB row was
535
+ * written (`committed`) or the commit could not be completed (`failed`).
536
+ */
537
+ export declare const ArtifactCompleteAckOutcome: z.ZodEnum<{
538
+ committed: "committed";
539
+ failed: "failed";
540
+ }>;
541
+ export type ArtifactCompleteAckOutcome = z.infer<typeof ArtifactCompleteAckOutcome>;
542
+ /**
543
+ * Orchestrator -> Agent: the outcome of committing an
544
+ * `artifacts.upload.complete`. Sent by orchestrators that advertise the
545
+ * `artifactCompleteAck` capability on `register.ack`; the agent awaits it and
546
+ * fails the workflow step on `failed`/timeout, so a lost commit surfaces as a
547
+ * failed step instead of a green run with a missing artifact. `requestId`
548
+ * echoes the complete message's `messageId`.
549
+ */
550
+ export declare const artifactsUploadCompleteAckSchema: z.ZodObject<{
551
+ type: z.ZodLiteral<"artifacts.upload.complete.ack">;
552
+ requestId: z.ZodString;
553
+ outcome: z.ZodEnum<{
554
+ committed: "committed";
555
+ failed: "failed";
556
+ }>;
557
+ reason: z.ZodOptional<z.ZodString>;
558
+ }, z.core.$strip>;
559
+ /** Agent -> Orchestrator: request a presigned GET for a named artifact of this run. */
560
+ export declare const artifactsDownloadRequestSchema: z.ZodObject<{
561
+ type: z.ZodLiteral<"artifacts.download.request">;
562
+ messageId: z.ZodString;
563
+ jobId: z.ZodString;
564
+ name: z.ZodString;
565
+ }, z.core.$strip>;
566
+ /**
567
+ * Orchestrator -> Agent: presigned GET + size/sha256 for the named artifact, or
568
+ * `not_found` when the run never uploaded an artifact by that name.
569
+ */
570
+ export declare const artifactsDownloadResponseSchema: z.ZodObject<{
571
+ type: z.ZodLiteral<"artifacts.download.response">;
572
+ requestId: z.ZodString;
573
+ outcome: z.ZodEnum<{
574
+ found: "found";
575
+ not_found: "not_found";
576
+ }>;
577
+ downloadUrl: z.ZodOptional<z.ZodString>;
578
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
579
+ sha256: z.ZodOptional<z.ZodString>;
580
+ error: z.ZodOptional<z.ZodString>;
581
+ }, z.core.$strip>;
455
582
  /** Agent -> Orchestrator: emit a custom event from a running workflow step. */
456
583
  export declare const eventEmitSchema: z.ZodObject<{
457
584
  type: z.ZodLiteral<"event.emit">;
@@ -479,8 +606,8 @@ export declare const agentMetricsSchema: z.ZodObject<{
479
606
  name: z.ZodString;
480
607
  type: z.ZodEnum<{
481
608
  counter: "counter";
482
- histogram: "histogram";
483
609
  gauge: "gauge";
610
+ histogram: "histogram";
484
611
  upDownCounter: "upDownCounter";
485
612
  }>;
486
613
  value: z.ZodOptional<z.ZodNumber>;
@@ -548,8 +675,8 @@ export declare const fleetBundleErrorSchema: z.ZodObject<{
548
675
  /** Outcome of a step-level approval hold, sent back to the waiting agent. */
549
676
  export declare const StepApprovalOutcome: z.ZodEnum<{
550
677
  approved: "approved";
551
- rejected: "rejected";
552
678
  expired: "expired";
679
+ rejected: "rejected";
553
680
  }>;
554
681
  export type StepApprovalOutcome = z.infer<typeof StepApprovalOutcome>;
555
682
  /**
@@ -610,8 +737,8 @@ export declare const stepApprovalResolvedSchema: z.ZodObject<{
610
737
  stepIndex: z.ZodNumber;
611
738
  outcome: z.ZodEnum<{
612
739
  approved: "approved";
613
- rejected: "rejected";
614
740
  expired: "expired";
741
+ rejected: "rejected";
615
742
  }>;
616
743
  reason: z.ZodOptional<z.ZodString>;
617
744
  }, z.core.$strip>;
@@ -632,6 +759,7 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
632
759
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
633
760
  namespacedSecrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
634
761
  maxLogSizeBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
762
+ concurrencyWaitTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
635
763
  sourceTarUrl: z.ZodOptional<z.ZodString>;
636
764
  sourceTarHash: z.ZodOptional<z.ZodString>;
637
765
  depsUrl: z.ZodOptional<z.ZodString>;
@@ -640,17 +768,18 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
640
768
  runPublicKey: z.ZodOptional<z.ZodString>;
641
769
  upstreamJobOutputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
642
770
  upstreamJobStatuses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
643
- skipped: "skipped";
644
- success: "success";
645
- pending: "pending";
646
- running: "running";
647
- failed: "failed";
648
771
  cancelled: "cancelled";
649
772
  cancelling: "cancelling";
773
+ drift_dropped: "drift_dropped";
774
+ failed: "failed";
775
+ pending: "pending";
650
776
  queued: "queued";
651
777
  recovering: "recovering";
778
+ running: "running";
779
+ skipped: "skipped";
780
+ success: "success";
652
781
  timed_out_stale: "timed_out_stale";
653
- drift_dropped: "drift_dropped";
782
+ unroutable: "unroutable";
654
783
  }>>>;
655
784
  sourceAuth: z.ZodOptional<z.ZodObject<{
656
785
  kind: z.ZodEnum<{
@@ -688,8 +817,8 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
688
817
  orgId: z.ZodOptional<z.ZodString>;
689
818
  repoId: z.ZodOptional<z.ZodString>;
690
819
  cacheRefScope: z.ZodOptional<z.ZodEnum<{
691
- shared: "shared";
692
820
  isolated: "isolated";
821
+ shared: "shared";
693
822
  }>>;
694
823
  }, z.core.$strip>, z.ZodObject<{
695
824
  type: z.ZodLiteral<"job.cancel">;
@@ -704,13 +833,16 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
704
833
  labels: z.ZodArray<z.ZodString>;
705
834
  scalerManaged: z.ZodDefault<z.ZodBoolean>;
706
835
  pendingDispatch: z.ZodOptional<z.ZodBoolean>;
836
+ capabilities: z.ZodOptional<z.ZodObject<{
837
+ artifactCompleteAck: z.ZodOptional<z.ZodBoolean>;
838
+ }, z.core.$loose>>;
707
839
  }, z.core.$strip>, z.ZodObject<{
708
840
  type: z.ZodLiteral<"job.concurrency.ack">;
709
841
  requestId: z.ZodString;
710
842
  action: z.ZodEnum<{
711
- wait: "wait";
712
- proceed: "proceed";
713
843
  cancel: "cancel";
844
+ proceed: "proceed";
845
+ wait: "wait";
714
846
  }>;
715
847
  reason: z.ZodOptional<z.ZodString>;
716
848
  runId: z.ZodOptional<z.ZodString>;
@@ -735,6 +867,41 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
735
867
  type: z.ZodLiteral<"provenance.upload.response">;
736
868
  requestId: z.ZodString;
737
869
  uploadUrl: z.ZodString;
870
+ }, z.core.$strip>, z.ZodObject<{
871
+ type: z.ZodLiteral<"artifacts.upload.response">;
872
+ requestId: z.ZodString;
873
+ outcome: z.ZodEnum<{
874
+ granted: "granted";
875
+ rejected: "rejected";
876
+ }>;
877
+ uploadUrl: z.ZodOptional<z.ZodString>;
878
+ storageKey: z.ZodOptional<z.ZodString>;
879
+ reason: z.ZodOptional<z.ZodEnum<{
880
+ duplicate_name: "duplicate_name";
881
+ org_quota: "org_quota";
882
+ run_cap: "run_cap";
883
+ size_cap: "size_cap";
884
+ }>>;
885
+ error: z.ZodOptional<z.ZodString>;
886
+ }, z.core.$strip>, z.ZodObject<{
887
+ type: z.ZodLiteral<"artifacts.upload.complete.ack">;
888
+ requestId: z.ZodString;
889
+ outcome: z.ZodEnum<{
890
+ committed: "committed";
891
+ failed: "failed";
892
+ }>;
893
+ reason: z.ZodOptional<z.ZodString>;
894
+ }, z.core.$strip>, z.ZodObject<{
895
+ type: z.ZodLiteral<"artifacts.download.response">;
896
+ requestId: z.ZodString;
897
+ outcome: z.ZodEnum<{
898
+ found: "found";
899
+ not_found: "not_found";
900
+ }>;
901
+ downloadUrl: z.ZodOptional<z.ZodString>;
902
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
903
+ sha256: z.ZodOptional<z.ZodString>;
904
+ error: z.ZodOptional<z.ZodString>;
738
905
  }, z.core.$strip>, z.ZodObject<{
739
906
  type: z.ZodLiteral<"event.emit.response">;
740
907
  requestId: z.ZodString;
@@ -764,8 +931,8 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
764
931
  stepIndex: z.ZodNumber;
765
932
  outcome: z.ZodEnum<{
766
933
  approved: "approved";
767
- rejected: "rejected";
768
934
  expired: "expired";
935
+ rejected: "rejected";
769
936
  }>;
770
937
  reason: z.ZodOptional<z.ZodString>;
771
938
  }, z.core.$strip>], "type">;
@@ -806,17 +973,18 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
806
973
  runId: z.ZodString;
807
974
  jobId: z.ZodString;
808
975
  state: z.ZodEnum<{
809
- skipped: "skipped";
810
- success: "success";
811
- pending: "pending";
812
- running: "running";
813
- failed: "failed";
814
976
  cancelled: "cancelled";
815
977
  cancelling: "cancelling";
978
+ drift_dropped: "drift_dropped";
979
+ failed: "failed";
980
+ pending: "pending";
816
981
  queued: "queued";
817
982
  recovering: "recovering";
983
+ running: "running";
984
+ skipped: "skipped";
985
+ success: "success";
818
986
  timed_out_stale: "timed_out_stale";
819
- drift_dropped: "drift_dropped";
987
+ unroutable: "unroutable";
820
988
  }>;
821
989
  timestamp: z.ZodNumber;
822
990
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -831,8 +999,8 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
831
999
  runId: z.ZodString;
832
1000
  jobId: z.ZodString;
833
1001
  reason: z.ZodEnum<{
834
- draining: "draining";
835
1002
  busy: "busy";
1003
+ draining: "draining";
836
1004
  }>;
837
1005
  timestamp: z.ZodNumber;
838
1006
  }, z.core.$strip>, z.ZodObject<{
@@ -849,6 +1017,10 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
849
1017
  stepIndex: z.ZodNumber;
850
1018
  lines: z.ZodArray<z.ZodString>;
851
1019
  timestamp: z.ZodNumber;
1020
+ stream: z.ZodOptional<z.ZodEnum<{
1021
+ stderr: "stderr";
1022
+ stdout: "stdout";
1023
+ }>>;
852
1024
  }, z.core.$strip>, z.ZodObject<{
853
1025
  type: z.ZodLiteral<"step.status">;
854
1026
  messageId: z.ZodString;
@@ -857,29 +1029,29 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
857
1029
  stepIndex: z.ZodNumber;
858
1030
  stepName: z.ZodString;
859
1031
  state: z.ZodEnum<{
860
- skipped: "skipped";
861
- success: "success";
1032
+ cancelled: "cancelled";
1033
+ failed: "failed";
862
1034
  pending: "pending";
863
1035
  running: "running";
864
- failed: "failed";
865
- cancelled: "cancelled";
1036
+ skipped: "skipped";
1037
+ success: "success";
866
1038
  }>;
867
1039
  timestamp: z.ZodNumber;
868
1040
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
869
1041
  step_type: z.ZodOptional<z.ZodEnum<{
870
- step: "step";
871
- "hook:onCancel": "hook:onCancel";
1042
+ "hook:afterStep": "hook:afterStep";
1043
+ "hook:beforeStep": "hook:beforeStep";
872
1044
  "hook:cleanup": "hook:cleanup";
873
- "hook:onSuccess": "hook:onSuccess";
1045
+ "hook:onCancel": "hook:onCancel";
874
1046
  "hook:onFailure": "hook:onFailure";
875
- "hook:beforeStep": "hook:beforeStep";
876
- "hook:afterStep": "hook:afterStep";
1047
+ "hook:onSuccess": "hook:onSuccess";
1048
+ step: "step";
877
1049
  }>>;
878
1050
  secretsAccessed: z.ZodOptional<z.ZodArray<z.ZodString>>;
879
1051
  concurrencyKind: z.ZodOptional<z.ZodEnum<{
880
- sequential: "sequential";
881
1052
  "parallel-child": "parallel-child";
882
1053
  "parallel-group": "parallel-group";
1054
+ sequential: "sequential";
883
1055
  }>>;
884
1056
  groupId: z.ZodOptional<z.ZodString>;
885
1057
  logBytesStreamed: z.ZodOptional<z.ZodNumber>;
@@ -909,8 +1081,8 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
909
1081
  messageId: z.ZodString;
910
1082
  jobId: z.ZodString;
911
1083
  cacheType: z.ZodEnum<{
912
- source: "source";
913
1084
  deps: "deps";
1085
+ source: "source";
914
1086
  }>;
915
1087
  contentHash: z.ZodOptional<z.ZodString>;
916
1088
  lockfileHash: z.ZodOptional<z.ZodString>;
@@ -921,8 +1093,8 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
921
1093
  messageId: z.ZodString;
922
1094
  jobId: z.ZodString;
923
1095
  cacheType: z.ZodEnum<{
924
- source: "source";
925
1096
  deps: "deps";
1097
+ source: "source";
926
1098
  }>;
927
1099
  contentHash: z.ZodOptional<z.ZodString>;
928
1100
  lockfileHash: z.ZodOptional<z.ZodString>;
@@ -977,6 +1149,25 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
977
1149
  }, z.core.$strip>>;
978
1150
  }, z.core.$strip>;
979
1151
  publicKey: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1152
+ }, z.core.$strip>, z.ZodObject<{
1153
+ type: z.ZodLiteral<"artifacts.upload.request">;
1154
+ messageId: z.ZodString;
1155
+ jobId: z.ZodString;
1156
+ name: z.ZodString;
1157
+ declaredSizeBytes: z.ZodNumber;
1158
+ }, z.core.$strip>, z.ZodObject<{
1159
+ type: z.ZodLiteral<"artifacts.upload.complete">;
1160
+ messageId: z.ZodString;
1161
+ jobId: z.ZodString;
1162
+ name: z.ZodString;
1163
+ sizeBytes: z.ZodNumber;
1164
+ sha256: z.ZodString;
1165
+ storageKey: z.ZodString;
1166
+ }, z.core.$strip>, z.ZodObject<{
1167
+ type: z.ZodLiteral<"artifacts.download.request">;
1168
+ messageId: z.ZodString;
1169
+ jobId: z.ZodString;
1170
+ name: z.ZodString;
980
1171
  }, z.core.$strip>, z.ZodObject<{
981
1172
  type: z.ZodLiteral<"event.emit">;
982
1173
  jobId: z.ZodString;
@@ -999,8 +1190,8 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
999
1190
  name: z.ZodString;
1000
1191
  type: z.ZodEnum<{
1001
1192
  counter: "counter";
1002
- histogram: "histogram";
1003
1193
  gauge: "gauge";
1194
+ histogram: "histogram";
1004
1195
  upDownCounter: "upDownCounter";
1005
1196
  }>;
1006
1197
  value: z.ZodOptional<z.ZodNumber>;
@@ -1063,6 +1254,12 @@ export type ProvenanceUploadRequest = z.infer<typeof provenanceUploadRequestSche
1063
1254
  export type ProvenanceUploadResponse = z.infer<typeof provenanceUploadResponseSchema>;
1064
1255
  export type ProvenanceUploadComplete = z.infer<typeof provenanceUploadCompleteSchema>;
1065
1256
  export type ProvenanceUploadDefer = z.infer<typeof provenanceUploadDeferSchema>;
1257
+ export type ArtifactsUploadRequest = z.infer<typeof artifactsUploadRequestSchema>;
1258
+ export type ArtifactsUploadResponse = z.infer<typeof artifactsUploadResponseSchema>;
1259
+ export type ArtifactsUploadComplete = z.infer<typeof artifactsUploadCompleteSchema>;
1260
+ export type ArtifactsUploadCompleteAck = z.infer<typeof artifactsUploadCompleteAckSchema>;
1261
+ export type ArtifactsDownloadRequest = z.infer<typeof artifactsDownloadRequestSchema>;
1262
+ export type ArtifactsDownloadResponse = z.infer<typeof artifactsDownloadResponseSchema>;
1066
1263
  export type FleetLogsRequest = z.infer<typeof fleetLogsRequestSchema>;
1067
1264
  export type FleetBundleChunk = z.infer<typeof fleetBundleChunkSchema>;
1068
1265
  export type FleetBundleError = z.infer<typeof fleetBundleErrorSchema>;