@kici-dev/engine 0.1.22 → 0.1.24

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 (72) hide show
  1. package/dist/approval/types.d.ts +1 -1
  2. package/dist/audit/access-log-policy.d.ts +4 -1
  3. package/dist/audit/access-log-policy.js +11 -1
  4. package/dist/audit/activity.d.ts +3 -1
  5. package/dist/audit/activity.js +8 -16
  6. package/dist/audit/retention-policy.js +6 -0
  7. package/dist/environment/host-match.d.ts +25 -0
  8. package/dist/environment/host-match.js +67 -0
  9. package/dist/environment/index.d.ts +3 -0
  10. package/dist/environment/index.js +3 -1
  11. package/dist/environment/multi-env.d.ts +30 -0
  12. package/dist/environment/multi-env.js +38 -0
  13. package/dist/environment/scope-resolver.d.ts +15 -4
  14. package/dist/environment/scope-resolver.js +55 -15
  15. package/dist/environment/scope-template.d.ts +18 -0
  16. package/dist/environment/scope-template.js +43 -0
  17. package/dist/environment/types.d.ts +15 -2
  18. package/dist/environment/types.js +18 -1
  19. package/dist/fanout/materialize.d.ts +34 -0
  20. package/dist/fanout/materialize.js +72 -45
  21. package/dist/index.d.ts +5 -1
  22. package/dist/index.js +21 -10
  23. package/dist/inputs/build.d.ts +9 -0
  24. package/dist/inputs/build.js +44 -0
  25. package/dist/inputs/coerce.d.ts +25 -0
  26. package/dist/inputs/coerce.js +51 -0
  27. package/dist/inputs/descriptor.d.ts +53 -0
  28. package/dist/inputs/descriptor.js +42 -0
  29. package/dist/inputs/extract.d.ts +15 -0
  30. package/dist/inputs/extract.js +117 -0
  31. package/dist/inputs/index.d.ts +6 -0
  32. package/dist/inputs/index.js +7 -0
  33. package/dist/inputs/schedule.d.ts +19 -0
  34. package/dist/inputs/schedule.js +33 -0
  35. package/dist/labels/compile.d.ts +9 -0
  36. package/dist/labels/compile.js +10 -1
  37. package/dist/labels.d.ts +29 -0
  38. package/dist/labels.js +32 -1
  39. package/dist/mcp/tool-schemas.d.ts +41 -0
  40. package/dist/mcp/tool-schemas.js +49 -0
  41. package/dist/metrics/catalog-policy.d.ts +7 -0
  42. package/dist/metrics/catalog-policy.js +11 -12
  43. package/dist/metrics/metric-catalog.generated.d.ts +22 -2
  44. package/dist/metrics/metric-catalog.generated.js +34 -2
  45. package/dist/protocol/messages/access-log.d.ts +39 -10
  46. package/dist/protocol/messages/access-log.js +7 -2
  47. package/dist/protocol/messages/actor.d.ts +8 -0
  48. package/dist/protocol/messages/actor.js +17 -3
  49. package/dist/protocol/messages/agent-run-result.d.ts +350 -0
  50. package/dist/protocol/messages/agent-run-result.js +123 -0
  51. package/dist/protocol/messages/auth.d.ts +2 -0
  52. package/dist/protocol/messages/auth.js +10 -1
  53. package/dist/protocol/messages/capabilities.d.ts +2 -0
  54. package/dist/protocol/messages/capabilities.js +15 -2
  55. package/dist/protocol/messages/dashboard-global-workflows.d.ts +8 -0
  56. package/dist/protocol/messages/dashboard.d.ts +1513 -39
  57. package/dist/protocol/messages/dashboard.js +210 -15
  58. package/dist/protocol/messages/execution-status.d.ts +52 -1
  59. package/dist/protocol/messages/execution-status.js +115 -54
  60. package/dist/protocol/messages/orchestrator-agent.d.ts +21 -5
  61. package/dist/protocol/messages/orchestrator-agent.js +5 -1
  62. package/dist/protocol/messages/pat-kind.d.ts +16 -0
  63. package/dist/protocol/messages/pat-kind.js +17 -0
  64. package/dist/protocol/messages/peer.d.ts +7 -7
  65. package/dist/protocol/messages/platform-orchestrator.d.ts +424 -8
  66. package/dist/protocol/messages/platform-orchestrator.js +3 -3
  67. package/dist/protocol/messages/run-events.d.ts +5 -1
  68. package/dist/provider/check-run-conclusion.d.ts +1 -1
  69. package/dist/trigger/types.d.ts +75 -7
  70. package/dist/trigger/types.js +19 -2
  71. package/package.json +9 -1
  72. package/sbom.spdx.json +5 -5
@@ -1,6 +1,20 @@
1
1
  import "../../chunk-BTugEXQM.js";
2
2
  import { z } from "zod";
3
3
  //#region src/protocol/messages/execution-status.ts
4
+ /** Max length for ids and short identifier fields (runId, jobId, sha, ref, …). */
5
+ const STATUS_ID_MAX = 128;
6
+ /** Max length for the repo identifier (`owner/repo` can be long). */
7
+ const REPO_IDENTIFIER_MAX = 256;
8
+ /** Max length for free-text fields (commit message, failure/error reason). */
9
+ const STATUS_FREE_TEXT_MAX = 2e3;
10
+ /** Max number of runs in a single `state.replay` snapshot. */
11
+ const STATE_REPLAY_MAX_RUNS = 500;
12
+ /** Max number of jobs attached to a single run in a `state.replay` snapshot. */
13
+ const MAX_JOBS_PER_RUN = 1e3;
14
+ /** Max number of `runsOn` / `secretsAccessed` label entries on a job/step. */
15
+ const RUNS_ON_LABELS_MAX = 30;
16
+ /** Max number of bound deployment-environment names on a job. */
17
+ const ENVIRONMENTS_MAX = 30;
4
18
  /**
5
19
  * Status values for execution runs (execution_runs table).
6
20
  *
@@ -34,12 +48,33 @@ const ExecutionJobStatus = z.enum([
34
48
  "timed_out_stale",
35
49
  "drift_dropped"
36
50
  ]);
37
- /** Status values for execution steps (execution_steps table + step.status protocol messages). */
51
+ /**
52
+ * Status values for execution steps (execution_steps table + step.status protocol messages).
53
+ *
54
+ * - `pending` — a parallel-group child queued behind `maxParallel`, not yet launched.
55
+ * - `cancelled` — a parallel-group sibling aborted by fail-fast (NOT a failure).
56
+ */
38
57
  const ExecutionStepStatus = z.enum([
39
58
  "running",
40
59
  "success",
41
60
  "failed",
42
- "skipped"
61
+ "skipped",
62
+ "pending",
63
+ "cancelled"
64
+ ]);
65
+ /**
66
+ * How a step participates in a job's step concurrency model.
67
+ *
68
+ * - `sequential` — an ordinary step in the flat step sequence.
69
+ * - `parallel-child` — a child of a `parallel()` group, running concurrently
70
+ * with its siblings, each its own observable step.
71
+ * - `parallel-group` — the structural group wrapper (no flat step index); used
72
+ * only for the dashboard band aggregate, not persisted per step.
73
+ */
74
+ const StepConcurrencyKind = z.enum([
75
+ "sequential",
76
+ "parallel-child",
77
+ "parallel-group"
43
78
  ]);
44
79
  /**
45
80
  * Distinct reasons a run/job ended because a configured wall-clock timeout
@@ -109,9 +144,9 @@ const initFailureSchema = z.object({
109
144
  scope: z.enum(["run", "job"]),
110
145
  category: InitFailureCategory,
111
146
  /** Human-readable failure message (same content surfaced by RunFailureSummary). */
112
- message: z.string(),
147
+ message: z.string().max(STATUS_FREE_TEXT_MAX),
113
148
  /** Set when scope === 'job'. */
114
- jobName: z.string().optional()
149
+ jobName: z.string().max(128).optional()
115
150
  });
116
151
  /** Terminal run states that indicate the run has completed. */
117
152
  const TERMINAL_RUN_STATES = new Set([
@@ -131,31 +166,50 @@ const TERMINAL_JOB_STATES = new Set([
131
166
  /** Structured execution status update for Platform metadata tracking. */
132
167
  const executionStatusSchema = z.object({
133
168
  type: z.literal("execution.status"),
134
- messageId: z.string(),
135
- runId: z.string(),
136
- workflowName: z.string(),
169
+ messageId: z.string().max(128),
170
+ runId: z.string().max(128),
171
+ workflowName: z.string().max(128),
137
172
  status: ExecutionRunStatus,
138
- repoIdentifier: z.string().optional(),
139
- sha: z.string().optional(),
173
+ repoIdentifier: z.string().max(256).optional(),
174
+ /**
175
+ * Run-level repo provider (origin host: `github` / `gitlab` / `bitbucket` /
176
+ * `local`). Distinct from the routing-key-derived source provider; drives the
177
+ * dashboard's provider-aware repo links.
178
+ */
179
+ repoProvider: z.string().max(128).optional(),
180
+ /** True when the run executed a developer's uploaded local working tree (`kici run remote`). */
181
+ localWorkingTree: z.boolean().optional(),
182
+ sha: z.string().max(128).optional(),
140
183
  /** Git branch or tag (e.g. "main", "refs/tags/v1.0"). */
141
- ref: z.string().optional(),
184
+ ref: z.string().max(128).optional(),
142
185
  /** Trigger event type (e.g. "push", "pr:open"). */
143
- triggerEvent: z.string().optional(),
186
+ triggerEvent: z.string().max(128).optional(),
144
187
  /** First line of the commit message. */
145
- commitMessage: z.string().optional(),
188
+ commitMessage: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
146
189
  jobCount: z.number().optional(),
147
190
  startedAt: z.number(),
148
191
  completedAt: z.number().optional(),
149
192
  durationMs: z.number().optional(),
150
193
  timestamp: z.number(),
151
194
  /** Parent run ID for re-run lineage (null/undefined for original runs). */
152
- parentRunId: z.string().nullable().optional(),
195
+ parentRunId: z.string().max(128).nullable().optional(),
153
196
  /** Root ancestor run ID for re-run lineage (null/undefined for original runs). Always points to the first run in the chain. */
154
- originalRunId: z.string().nullable().optional(),
197
+ originalRunId: z.string().max(128).nullable().optional(),
155
198
  /** User identity that triggered this re-run (null/undefined for webhook-triggered). */
156
- triggeredBy: z.string().nullable().optional(),
199
+ triggeredBy: z.string().max(128).nullable().optional(),
200
+ /**
201
+ * Triggering-actor identity captured from the provider event (the pusher / PR
202
+ * author), distinct from `triggeredBy` (the KiCI re-run user). Provider
203
+ * identities only — never tenant attribution (the wire-schema invariant: no
204
+ * `orgId` here). Powers the dashboard "triggered by @x" and actor-scope
205
+ * notifications. `triggerActorUsername` uses the wider repo-identifier bound
206
+ * because provider logins can be long display names.
207
+ */
208
+ triggerActorProvider: z.string().max(128).nullable().optional(),
209
+ triggerActorUsername: z.string().max(256).nullable().optional(),
210
+ triggerActorUserId: z.string().max(128).nullable().optional(),
157
211
  /** Human-readable reason why the run failed (only present for failed runs). */
158
- failureReason: z.string().optional(),
212
+ failureReason: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
159
213
  /**
160
214
  * Total raw log bytes accumulated across all jobs of this run, summed by the
161
215
  * orchestrator from per-step `logBytesStreamed` values reported by the agent.
@@ -173,35 +227,41 @@ const executionStatusSchema = z.object({
173
227
  /** Per-step status forwarded from agent to Platform (real-time). */
174
228
  const stepStatusForwardSchema = z.object({
175
229
  type: z.literal("step.status.forward"),
176
- messageId: z.string(),
177
- runId: z.string(),
178
- jobId: z.string(),
179
- jobName: z.string(),
230
+ messageId: z.string().max(128),
231
+ runId: z.string().max(128),
232
+ jobId: z.string().max(128),
233
+ jobName: z.string().max(128),
180
234
  stepIndex: z.number(),
181
- stepName: z.string(),
235
+ stepName: z.string().max(256),
182
236
  state: ExecutionStepStatus,
183
237
  timestamp: z.number(),
184
- data: z.record(z.string(), z.unknown()).optional(),
238
+ data: z.record(z.string().max(128), z.unknown()).optional(),
185
239
  /** Secret key names accessed by this step. Forwarded from agent for dashboard display. */
186
- secretsAccessed: z.array(z.string()).optional()
240
+ secretsAccessed: z.array(z.string().max(128)).max(30).optional(),
241
+ /** Step concurrency role; absent means an ordinary sequential step. */
242
+ concurrencyKind: StepConcurrencyKind.optional(),
243
+ /** Parallel-group correlation id shared by a group's children (e.g. `g0`). */
244
+ groupId: z.string().max(128).optional()
187
245
  });
188
246
  /** Per-job status forwarded from orchestrator to Platform (real-time). */
189
247
  const jobStatusForwardSchema = z.object({
190
248
  type: z.literal("job.status.forward"),
191
- messageId: z.string(),
192
- runId: z.string(),
193
- jobId: z.string(),
194
- jobName: z.string(),
249
+ messageId: z.string().max(128),
250
+ runId: z.string().max(128),
251
+ jobId: z.string().max(128),
252
+ jobName: z.string().max(128),
195
253
  status: ExecutionJobStatus,
196
- matrixValues: z.record(z.string(), z.unknown()).optional(),
254
+ matrixValues: z.record(z.string().max(128), z.unknown()).optional(),
197
255
  startedAt: z.number().optional(),
198
256
  completedAt: z.number().optional(),
199
257
  durationMs: z.number().optional(),
200
- errorMessage: z.string().nullable().optional(),
201
- agentId: z.string().nullable().optional(),
202
- orchestratorId: z.string().nullable().optional(),
258
+ errorMessage: z.string().max(STATUS_FREE_TEXT_MAX).nullable().optional(),
259
+ agentId: z.string().max(128).nullable().optional(),
260
+ orchestratorId: z.string().max(128).nullable().optional(),
203
261
  /** Labels used for agent routing. */
204
- runsOnLabels: z.array(z.string()).optional(),
262
+ runsOnLabels: z.array(z.string().max(128)).max(30).optional(),
263
+ /** Ordered bound deployment-environment names for this job (multi-env jobs). */
264
+ environments: z.array(z.string().max(128)).max(30).optional(),
205
265
  /**
206
266
  * Total raw log bytes accumulated across all steps of this job, summed by
207
267
  * the orchestrator from per-step `logBytesStreamed` values reported by the
@@ -216,41 +276,42 @@ const jobStatusForwardSchema = z.object({
216
276
  /** State replay sent on orchestrator reconnection -- full snapshot of active runs and jobs. */
217
277
  const stateReplaySchema = z.object({
218
278
  type: z.literal("state.replay"),
219
- messageId: z.string(),
279
+ messageId: z.string().max(128),
220
280
  runs: z.array(z.object({
221
- runId: z.string(),
222
- workflowName: z.string(),
281
+ runId: z.string().max(128),
282
+ workflowName: z.string().max(128),
223
283
  status: ExecutionRunStatus,
224
- routingKey: z.string().optional(),
225
- repoIdentifier: z.string().optional(),
226
- sha: z.string().optional(),
227
- ref: z.string().optional(),
228
- triggerEvent: z.string().optional(),
229
- commitMessage: z.string().optional(),
284
+ routingKey: z.string().max(128).optional(),
285
+ repoIdentifier: z.string().max(256).optional(),
286
+ sha: z.string().max(128).optional(),
287
+ ref: z.string().max(128).optional(),
288
+ triggerEvent: z.string().max(128).optional(),
289
+ commitMessage: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
230
290
  jobCount: z.number(),
231
291
  startedAt: z.number(),
232
292
  completedAt: z.number().optional(),
233
293
  durationMs: z.number().optional(),
234
- parentRunId: z.string().nullable().optional(),
235
- originalRunId: z.string().nullable().optional(),
236
- triggeredBy: z.string().nullable().optional(),
294
+ parentRunId: z.string().max(128).nullable().optional(),
295
+ originalRunId: z.string().max(128).nullable().optional(),
296
+ triggeredBy: z.string().max(128).nullable().optional(),
237
297
  /** Human-readable reason why the run failed (only present for failed runs). */
238
- failureReason: z.string().optional(),
298
+ failureReason: z.string().max(STATUS_FREE_TEXT_MAX).optional(),
239
299
  jobs: z.array(z.object({
240
- jobId: z.string(),
241
- jobName: z.string(),
242
- status: z.string(),
300
+ jobId: z.string().max(128),
301
+ jobName: z.string().max(128),
302
+ status: z.string().max(128),
243
303
  startedAt: z.number().optional(),
244
304
  completedAt: z.number().optional(),
245
305
  durationMs: z.number().optional(),
246
- errorMessage: z.string().nullable().optional(),
247
- agentId: z.string().nullable().optional(),
248
- runsOnLabels: z.array(z.string()).optional()
249
- }))
250
- })),
306
+ errorMessage: z.string().max(STATUS_FREE_TEXT_MAX).nullable().optional(),
307
+ agentId: z.string().max(128).nullable().optional(),
308
+ runsOnLabels: z.array(z.string().max(128)).max(30).optional(),
309
+ environments: z.array(z.string().max(128)).max(30).optional()
310
+ })).max(MAX_JOBS_PER_RUN)
311
+ })).max(500),
251
312
  timestamp: z.number()
252
313
  });
253
314
  //#endregion
254
- export { CacheOutcome, CacheRunEventType, CacheStepType, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
315
+ export { CacheOutcome, CacheRunEventType, CacheStepType, ENVIRONMENTS_MAX, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, MAX_JOBS_PER_RUN, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema };
255
316
 
256
317
  //# sourceMappingURL=execution-status.js.map
@@ -298,8 +298,10 @@ export declare const agentStepStatusSchema: z.ZodObject<{
298
298
  state: z.ZodEnum<{
299
299
  skipped: "skipped";
300
300
  success: "success";
301
+ pending: "pending";
301
302
  running: "running";
302
303
  failed: "failed";
304
+ cancelled: "cancelled";
303
305
  }>;
304
306
  timestamp: z.ZodNumber;
305
307
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -313,6 +315,12 @@ export declare const agentStepStatusSchema: z.ZodObject<{
313
315
  "hook:afterStep": "hook:afterStep";
314
316
  }>>;
315
317
  secretsAccessed: z.ZodOptional<z.ZodArray<z.ZodString>>;
318
+ concurrencyKind: z.ZodOptional<z.ZodEnum<{
319
+ sequential: "sequential";
320
+ "parallel-child": "parallel-child";
321
+ "parallel-group": "parallel-group";
322
+ }>>;
323
+ groupId: z.ZodOptional<z.ZodString>;
316
324
  logBytesStreamed: z.ZodOptional<z.ZodNumber>;
317
325
  }, z.core.$strip>;
318
326
  /** Agent -> Orchestrator: report that a job belongs to a concurrency group. */
@@ -342,8 +350,8 @@ export declare const jobConcurrencyAckSchema: z.ZodObject<{
342
350
  type: z.ZodLiteral<"job.concurrency.ack">;
343
351
  requestId: z.ZodString;
344
352
  action: z.ZodEnum<{
345
- proceed: "proceed";
346
353
  wait: "wait";
354
+ proceed: "proceed";
347
355
  cancel: "cancel";
348
356
  }>;
349
357
  reason: z.ZodOptional<z.ZodString>;
@@ -513,8 +521,8 @@ export declare const fleetBundleErrorSchema: z.ZodObject<{
513
521
  }, z.core.$strip>;
514
522
  /** Outcome of a step-level approval hold, sent back to the waiting agent. */
515
523
  export declare const StepApprovalOutcome: z.ZodEnum<{
516
- rejected: "rejected";
517
524
  approved: "approved";
525
+ rejected: "rejected";
518
526
  expired: "expired";
519
527
  }>;
520
528
  export type StepApprovalOutcome = z.infer<typeof StepApprovalOutcome>;
@@ -575,8 +583,8 @@ export declare const stepApprovalResolvedSchema: z.ZodObject<{
575
583
  jobId: z.ZodString;
576
584
  stepIndex: z.ZodNumber;
577
585
  outcome: z.ZodEnum<{
578
- rejected: "rejected";
579
586
  approved: "approved";
587
+ rejected: "rejected";
580
588
  expired: "expired";
581
589
  }>;
582
590
  reason: z.ZodOptional<z.ZodString>;
@@ -674,8 +682,8 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
674
682
  type: z.ZodLiteral<"job.concurrency.ack">;
675
683
  requestId: z.ZodString;
676
684
  action: z.ZodEnum<{
677
- proceed: "proceed";
678
685
  wait: "wait";
686
+ proceed: "proceed";
679
687
  cancel: "cancel";
680
688
  }>;
681
689
  reason: z.ZodOptional<z.ZodString>;
@@ -729,8 +737,8 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
729
737
  jobId: z.ZodString;
730
738
  stepIndex: z.ZodNumber;
731
739
  outcome: z.ZodEnum<{
732
- rejected: "rejected";
733
740
  approved: "approved";
741
+ rejected: "rejected";
734
742
  expired: "expired";
735
743
  }>;
736
744
  reason: z.ZodOptional<z.ZodString>;
@@ -825,8 +833,10 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
825
833
  state: z.ZodEnum<{
826
834
  skipped: "skipped";
827
835
  success: "success";
836
+ pending: "pending";
828
837
  running: "running";
829
838
  failed: "failed";
839
+ cancelled: "cancelled";
830
840
  }>;
831
841
  timestamp: z.ZodNumber;
832
842
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -840,6 +850,12 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
840
850
  "hook:afterStep": "hook:afterStep";
841
851
  }>>;
842
852
  secretsAccessed: z.ZodOptional<z.ZodArray<z.ZodString>>;
853
+ concurrencyKind: z.ZodOptional<z.ZodEnum<{
854
+ sequential: "sequential";
855
+ "parallel-child": "parallel-child";
856
+ "parallel-group": "parallel-group";
857
+ }>>;
858
+ groupId: z.ZodOptional<z.ZodString>;
843
859
  logBytesStreamed: z.ZodOptional<z.ZodNumber>;
844
860
  }, z.core.$strip>, z.ZodObject<{
845
861
  type: z.ZodLiteral<"job.heartbeat">;
@@ -1,5 +1,5 @@
1
1
  import "../../chunk-BTugEXQM.js";
2
- import { ExecutionJobStatus, ExecutionStepStatus } from "./execution-status.js";
2
+ import { ExecutionJobStatus, ExecutionStepStatus, StepConcurrencyKind } from "./execution-status.js";
3
3
  import { approverClauseSchema } from "../../approval/types.js";
4
4
  import { z } from "zod";
5
5
  //#region src/protocol/messages/orchestrator-agent.ts
@@ -351,6 +351,10 @@ const agentStepStatusSchema = z.object({
351
351
  ]).optional(),
352
352
  /** Secret key names accessed by this step via ctx.secrets.get()/expose(). Never contains values. */
353
353
  secretsAccessed: z.array(z.string()).optional(),
354
+ /** Step concurrency role; absent means an ordinary sequential step. */
355
+ concurrencyKind: StepConcurrencyKind.optional(),
356
+ /** Parallel-group correlation id shared by a group's children (e.g. `g0`). */
357
+ groupId: z.string().optional(),
354
358
  /**
355
359
  * Total raw bytes streamed by this step's LogStreamer at terminal time.
356
360
  * Counts agent-side raw bytes (the same count fed to the transient
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Kind of personal access token.
4
+ *
5
+ * - `user` — an ordinary PAT acting as the human who minted it.
6
+ * - `agent` — a PAT minted for a coding agent. It still runs with the user's
7
+ * permissions (no authority change), but its agent origin is carried into
8
+ * every audit / access-log row via `actor.agent`, and it is the only
9
+ * credential the developer MCP server accepts.
10
+ */
11
+ export declare const PatKind: z.ZodEnum<{
12
+ user: "user";
13
+ agent: "agent";
14
+ }>;
15
+ export type PatKind = z.infer<typeof PatKind>;
16
+ //# sourceMappingURL=pat-kind.d.ts.map
@@ -0,0 +1,17 @@
1
+ import "../../chunk-BTugEXQM.js";
2
+ import { z } from "zod";
3
+ //#region src/protocol/messages/pat-kind.ts
4
+ /**
5
+ * Kind of personal access token.
6
+ *
7
+ * - `user` — an ordinary PAT acting as the human who minted it.
8
+ * - `agent` — a PAT minted for a coding agent. It still runs with the user's
9
+ * permissions (no authority change), but its agent origin is carried into
10
+ * every audit / access-log row via `actor.agent`, and it is the only
11
+ * credential the developer MCP server accepts.
12
+ */
13
+ const PatKind = z.enum(["user", "agent"]);
14
+ //#endregion
15
+ export { PatKind };
16
+
17
+ //# sourceMappingURL=pat-kind.js.map
@@ -3,8 +3,8 @@ import { z } from 'zod';
3
3
  export declare const peerCapabilitiesSchema: z.ZodObject<{
4
4
  s3LogAccess: z.ZodBoolean;
5
5
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
6
- coordinator: "coordinator";
7
6
  direct: "direct";
7
+ coordinator: "coordinator";
8
8
  }>>;
9
9
  }, z.core.$strip>;
10
10
  /** Scaler capacity summary included in peer heartbeat and auth response for routing decisions. */
@@ -72,8 +72,8 @@ export declare const peerAuthResponseSchema: z.ZodObject<{
72
72
  capabilities: z.ZodOptional<z.ZodObject<{
73
73
  s3LogAccess: z.ZodBoolean;
74
74
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
75
- coordinator: "coordinator";
76
75
  direct: "direct";
76
+ coordinator: "coordinator";
77
77
  }>>;
78
78
  }, z.core.$strip>>;
79
79
  }, z.core.$strip>;
@@ -97,8 +97,8 @@ export declare const peerHeartbeatSchema: z.ZodObject<{
97
97
  capabilities: z.ZodObject<{
98
98
  s3LogAccess: z.ZodBoolean;
99
99
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
100
- coordinator: "coordinator";
101
100
  direct: "direct";
101
+ coordinator: "coordinator";
102
102
  }>>;
103
103
  }, z.core.$strip>;
104
104
  scalerCapacity: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -464,8 +464,8 @@ export declare const peerToPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
464
464
  capabilities: z.ZodOptional<z.ZodObject<{
465
465
  s3LogAccess: z.ZodBoolean;
466
466
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
467
- coordinator: "coordinator";
468
467
  direct: "direct";
468
+ coordinator: "coordinator";
469
469
  }>>;
470
470
  }, z.core.$strip>>;
471
471
  }, z.core.$strip>, z.ZodObject<{
@@ -487,8 +487,8 @@ export declare const peerToPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
487
487
  capabilities: z.ZodObject<{
488
488
  s3LogAccess: z.ZodBoolean;
489
489
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
490
- coordinator: "coordinator";
491
490
  direct: "direct";
491
+ coordinator: "coordinator";
492
492
  }>>;
493
493
  }, z.core.$strip>;
494
494
  scalerCapacity: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -765,8 +765,8 @@ export declare const peerFromPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
765
765
  capabilities: z.ZodOptional<z.ZodObject<{
766
766
  s3LogAccess: z.ZodBoolean;
767
767
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
768
- coordinator: "coordinator";
769
768
  direct: "direct";
769
+ coordinator: "coordinator";
770
770
  }>>;
771
771
  }, z.core.$strip>>;
772
772
  }, z.core.$strip>, z.ZodObject<{
@@ -788,8 +788,8 @@ export declare const peerFromPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
788
788
  capabilities: z.ZodObject<{
789
789
  s3LogAccess: z.ZodBoolean;
790
790
  logRoutingOverride: z.ZodOptional<z.ZodEnum<{
791
- coordinator: "coordinator";
792
791
  direct: "direct";
792
+ coordinator: "coordinator";
793
793
  }>>;
794
794
  }, z.core.$strip>;
795
795
  scalerCapacity: z.ZodOptional<z.ZodArray<z.ZodObject<{