@kitman-sh/sdk 0.9.0 → 0.10.53

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 (63) hide show
  1. package/dist/build/index.js +531 -116
  2. package/dist/{chunk-36jhc745.js → chunk-tcbgb4wm.js} +1841 -1574
  3. package/dist/{chunk-e1tqypyy.js → chunk-zvzw3zs4.js} +824 -419
  4. package/dist/loop/index.js +117 -3
  5. package/dist/program/index.js +8 -4
  6. package/package.json +6 -6
  7. package/types/packages/core/src/agent-capabilities.d.ts +6 -0
  8. package/types/packages/core/src/agent-environment.d.ts +32 -216
  9. package/types/packages/core/src/agent-sandbox-policy.d.ts +17 -3
  10. package/types/packages/core/src/change-request-review.d.ts +20 -5
  11. package/types/packages/core/src/change-request.d.ts +33 -208
  12. package/types/packages/core/src/crypto.d.ts +2 -0
  13. package/types/packages/core/src/index.d.ts +8 -4
  14. package/types/packages/core/src/{package-declarations.d.ts → kit-declarations.d.ts} +84 -180
  15. package/types/packages/core/src/kit-install.d.ts +130 -0
  16. package/types/packages/core/src/kit-setup.d.ts +316 -0
  17. package/types/packages/core/src/kit.d.ts +302 -1444
  18. package/types/packages/core/src/loop-layers.d.ts +33 -4
  19. package/types/packages/core/src/loop.d.ts +325 -55
  20. package/types/packages/core/src/marketplace.d.ts +51 -10
  21. package/types/packages/core/src/my-teams.d.ts +135 -20
  22. package/types/packages/core/src/network-host.d.ts +41 -0
  23. package/types/packages/core/src/notification.d.ts +8 -0
  24. package/types/packages/core/src/npm-registry.d.ts +65 -0
  25. package/types/packages/core/src/proposal.d.ts +0 -76
  26. package/types/packages/core/src/push.d.ts +68 -0
  27. package/types/packages/core/src/question-recommendation.d.ts +28 -0
  28. package/types/packages/core/src/redaction.d.ts +15 -3
  29. package/types/packages/core/src/resource-claim.d.ts +79 -0
  30. package/types/packages/core/src/run-display.d.ts +7 -1
  31. package/types/packages/core/src/run-graph.d.ts +1 -1
  32. package/types/packages/core/src/run-launch.d.ts +15 -2
  33. package/types/packages/core/src/run-queue.d.ts +28 -0
  34. package/types/packages/core/src/runner-eligibility.d.ts +21 -2
  35. package/types/packages/core/src/runner.d.ts +46 -15
  36. package/types/packages/core/src/secret.d.ts +18 -1
  37. package/types/packages/core/src/step-brief.d.ts +21 -7
  38. package/types/packages/core/src/sync-kit.d.ts +8 -0
  39. package/types/packages/core/src/task-detail.d.ts +15 -2
  40. package/types/packages/core/src/task.d.ts +9 -0
  41. package/types/packages/core/src/transcript.d.ts +24 -4
  42. package/types/packages/core/src/trust-panel.d.ts +1 -1
  43. package/types/packages/core/src/waiting-on.d.ts +14 -0
  44. package/types/packages/core/src/work-unit.d.ts +339 -8
  45. package/types/packages/live/src/rpc/runner-client.d.ts +505 -10
  46. package/types/packages/live/src/rpc/runner-group.d.ts +958 -28
  47. package/types/packages/sdk/src/build/index.d.ts +45 -9
  48. package/types/packages/sdk/src/loop/activities.d.ts +382 -2
  49. package/types/packages/sdk/src/loop/claims.d.ts +57 -0
  50. package/types/packages/sdk/src/loop/config.d.ts +38 -31
  51. package/types/packages/sdk/src/loop/continuing.d.ts +22 -0
  52. package/types/packages/sdk/src/loop/define.d.ts +30 -5
  53. package/types/packages/sdk/src/loop/evidence.d.ts +18 -3
  54. package/types/packages/sdk/src/loop/index.d.ts +4 -0
  55. package/types/packages/sdk/src/loop/measure.d.ts +132 -0
  56. package/types/packages/sdk/src/loop/plan.d.ts +2 -2
  57. package/types/packages/sdk/src/loop/steps.d.ts +127 -17
  58. package/types/packages/sdk/src/loop/sync.d.ts +53 -0
  59. package/types/packages/sdk/src/loop/test-loop.d.ts +25 -5
  60. package/types/packages/sdk/src/program/engine.d.ts +95 -3
  61. package/types/packages/sdk/src/program/host.d.ts +198 -36
  62. package/types/packages/core/src/engineering-resources.d.ts +0 -24
  63. package/types/packages/core/src/package.d.ts +0 -369
@@ -33,6 +33,16 @@ export declare const WorkUnitLeaseInput: Schema.Struct<{
33
33
  readonly capacitySlot: Schema.String;
34
34
  }>;
35
35
  export declare const LoopCheckout: Schema.Union<readonly [Schema.Literal<"none">, Schema.Literal<"read">, Schema.Literal<"write">]>;
36
+ /**
37
+ * Whose a Step's Secret is, which names its reference, the hosts that reference may be swapped for its value at, and
38
+ * which value it is, so replacing the Secret revokes it.
39
+ */
40
+ export declare const SecretDestination: Schema.Struct<{
41
+ readonly scope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
42
+ readonly hosts: Schema.$Array<Schema.String>;
43
+ readonly version: Schema.String;
44
+ }>;
45
+ export type SecretDestination = (typeof SecretDestination)['Type'];
36
46
  /** A program's agent Step: one StepAttempt, which any eligible Runner may run from the Step's base revision. */
37
47
  export declare const AgentStepWorkUnit: Schema.Struct<{
38
48
  readonly kind: Schema.Literal<"agent_step">;
@@ -51,6 +61,8 @@ export declare const AgentStepWorkUnit: Schema.Struct<{
51
61
  readonly leaseExpiresAt: Schema.String;
52
62
  readonly lastHeartbeatAt: Schema.String;
53
63
  }>;
64
+ /** When the Step's `timeout` runs out, across its attempts; absent when it declares none. */
65
+ readonly deadlineAt: Schema.optionalKey<Schema.String>;
54
66
  readonly brief: Schema.Struct<{
55
67
  readonly stepAttemptId: Schema.String;
56
68
  readonly harness: Schema.String;
@@ -63,11 +75,14 @@ export declare const AgentStepWorkUnit: Schema.Struct<{
63
75
  readonly contentMarkdown: Schema.String;
64
76
  }>>;
65
77
  readonly outputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
66
- readonly skills: Schema.optionalKey<Schema.$Array<Schema.Struct<{
78
+ readonly kits: Schema.optionalKey<Schema.$Array<Schema.Struct<{
67
79
  readonly name: Schema.String;
68
- readonly files: Schema.$Record<Schema.String, Schema.String>;
80
+ readonly version: Schema.String;
81
+ readonly setupDigest: Schema.String;
69
82
  }>>>;
70
83
  readonly toolless: Schema.optionalKey<Schema.Literal<true>>;
84
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["web", "subagents", "artifacts", "browser"]>>>;
85
+ readonly listedSkills: Schema.optionalKey<Schema.$Array<Schema.String>>;
71
86
  }>;
72
87
  readonly stepCredential: Schema.String;
73
88
  readonly checkout: Schema.Union<readonly [Schema.Literal<"none">, Schema.Literal<"read">, Schema.Literal<"write">]>;
@@ -91,12 +106,26 @@ export declare const AgentStepWorkUnit: Schema.Struct<{
91
106
  readonly network: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
92
107
  readonly hosts: Schema.$Array<Schema.String>;
93
108
  }>, Schema.Literal<"open">]>>;
109
+ /** Hosts the Run's Team and RepoBinding allow; the Runner adds them unless the Agent opens the network. */
110
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
94
111
  /** The SandboxBackend the Agent requires. */
95
112
  readonly sandbox: Schema.optionalKey<Schema.Literal<"docker">>;
96
113
  /** The values of the Secrets the Step names, for its sandbox's environment. */
97
114
  readonly secrets: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
115
+ /** For each of `secrets`, whose it is and where its reference may be swapped for its value. */
116
+ readonly secretDestinations: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
117
+ readonly scope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
118
+ readonly hosts: Schema.$Array<Schema.String>;
119
+ readonly version: Schema.String;
120
+ }>>>;
98
121
  /** Where the Run's first Step started; a boundary's change is the Run's whole change from there. */
99
122
  readonly runBaseRevision: Schema.optionalKey<Schema.String>;
123
+ /** A write checkout's target branch, whose head the Runner merges in before the agent starts. */
124
+ readonly mergeTarget: Schema.optionalKey<Schema.String>;
125
+ /** What a Step that ran before is told when it carries on: its Question's answer and steers sent while it was away. */
126
+ readonly resumeNotes: Schema.optionalKey<Schema.$Array<Schema.String>>;
127
+ /** The last Transcript entry the attempt holds; a Step that ran before writes after it. */
128
+ readonly transcriptSequence: Schema.optionalKey<Schema.Int>;
100
129
  readonly storageOrigin: Schema.optionalKey<Schema.String>;
101
130
  }>;
102
131
  /** Encoded Exits by Activity `name/attempt` and by deferred name. */
@@ -139,7 +168,7 @@ export declare const OrchestrationWorkUnit: Schema.Struct<{
139
168
  readonly credential: Schema.String;
140
169
  }>;
141
170
  }>;
142
- /** What a Package's process reads on stdin; its Loop id and credential come in its environment instead. */
171
+ /** What a Kit's process reads on stdin; its Loop id and credential come in its environment instead. */
143
172
  export declare const ProgramWorkUnit: Schema.Struct<{
144
173
  readonly kind: Schema.Literal<"orchestration">;
145
174
  readonly id: Schema.String;
@@ -169,12 +198,76 @@ export declare const ProgramWorkUnit: Schema.Struct<{
169
198
  }>;
170
199
  export type ProgramWorkUnit = (typeof ProgramWorkUnit)['Type'];
171
200
  /** An approved verification as Kitman holds it for a RepoBinding; never read from the branch. */
201
+ /** What a verification is called, wherever one is named: approved, or suggested by an agent's Output. */
202
+ export declare const CheckName: Schema.String;
172
203
  export declare const ApprovedCheck: Schema.Struct<{
173
204
  readonly name: Schema.String;
174
205
  readonly command: Schema.String;
175
206
  readonly workingDirectory: Schema.optionalKey<Schema.String>;
207
+ /** An agent suggested it for a repository with none approved; a Run sets it, never an approval. */
208
+ readonly suggested: Schema.optionalKey<Schema.Boolean>;
209
+ }>;
210
+ /** A check as a repository approves it and a verification runs it. */
211
+ export declare const RepositoryCheck: Schema.Struct<{
212
+ readonly name: Schema.String;
213
+ readonly command: Schema.String;
214
+ readonly workingDirectory: Schema.optionalKey<Schema.String>;
215
+ /** An agent suggested it for a repository with none approved; a Run sets it, never an approval. */
216
+ readonly suggested: Schema.optionalKey<Schema.Boolean>;
217
+ /**
218
+ * The repository's pipeline, for a forge that runs none: Shepherd runs it on a ChangeRequest's head and reports the
219
+ * result. A `verify` that names no checks leaves it out.
220
+ */
221
+ readonly pipeline: Schema.optionalKey<Schema.Boolean>;
222
+ }>;
223
+ /**
224
+ * How to benchmark a revision: `command` is one sample, run after `prepare` and `warmup` discarded samples. Each
225
+ * sample reports `wall_ms` and `cpu_ms`, and the numbers in a JSON object its last output line prints. One metric is
226
+ * primary; the others are guardrails. A `lowVariance` metric (instructions, allocations, queries) is what a noisy
227
+ * machine should be judged on instead.
228
+ */
229
+ export declare const MeasurePlan: Schema.Struct<{
230
+ readonly command: Schema.String;
231
+ readonly prepare: Schema.optionalKey<Schema.String>;
232
+ readonly workingDirectory: Schema.optionalKey<Schema.String>;
233
+ readonly warmup: Schema.optionalKey<Schema.Int>;
234
+ readonly metrics: Schema.$Array<Schema.Struct<{
235
+ readonly name: Schema.String;
236
+ readonly direction: Schema.Literals<readonly ["lower", "higher"]>;
237
+ readonly role: Schema.Literals<readonly ["primary", "guardrail"]>;
238
+ readonly lowVariance: Schema.optionalKey<Schema.Boolean>;
239
+ }>>;
240
+ }>;
241
+ /** A benchmark of the verification's revision against `base`, with `base` against itself first when `calibrate`. */
242
+ export declare const MeasureSpec: Schema.Struct<{
243
+ readonly base: Schema.String;
244
+ readonly plan: Schema.Struct<{
245
+ readonly command: Schema.String;
246
+ readonly prepare: Schema.optionalKey<Schema.String>;
247
+ readonly workingDirectory: Schema.optionalKey<Schema.String>;
248
+ readonly warmup: Schema.optionalKey<Schema.Int>;
249
+ readonly metrics: Schema.$Array<Schema.Struct<{
250
+ readonly name: Schema.String;
251
+ readonly direction: Schema.Literals<readonly ["lower", "higher"]>;
252
+ readonly role: Schema.Literals<readonly ["primary", "guardrail"]>;
253
+ readonly lowVariance: Schema.optionalKey<Schema.Boolean>;
254
+ }>>;
255
+ }>;
256
+ readonly samples: Schema.Int;
257
+ readonly calibrate: Schema.Boolean;
258
+ }>;
259
+ /** One sample's numbers by metric name. */
260
+ export declare const MeasureSample: Schema.$Record<Schema.String, Schema.Finite>;
261
+ /** The samples of a measurement, taken interleaved; `baseAgain` is the base measured against itself. */
262
+ export declare const MeasureEvidence: Schema.Struct<{
263
+ readonly base: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
264
+ readonly head: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
265
+ readonly baseAgain: Schema.optionalKey<Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>>;
176
266
  }>;
177
- /** Runs approved checks at a revision with no agent, and at the default branch's head as the baseline. */
267
+ /**
268
+ * Runs approved checks at a revision with no agent, and at `baseline`, the default branch's head when left out; or,
269
+ * with `measure`, benchmarks the revision against a base.
270
+ */
178
271
  export declare const VerificationWorkUnit: Schema.Struct<{
179
272
  readonly kind: Schema.Literal<"verification">;
180
273
  readonly id: Schema.String;
@@ -204,11 +297,38 @@ export declare const VerificationWorkUnit: Schema.Struct<{
204
297
  readonly expectedCommitSha: Schema.optionalKey<Schema.String>;
205
298
  }>;
206
299
  readonly revision: Schema.String;
300
+ readonly baseline: Schema.optionalKey<Schema.String>;
207
301
  readonly checks: Schema.$Array<Schema.Struct<{
208
302
  readonly name: Schema.String;
209
303
  readonly command: Schema.String;
210
304
  readonly workingDirectory: Schema.optionalKey<Schema.String>;
305
+ /** An agent suggested it for a repository with none approved; a Run sets it, never an approval. */
306
+ readonly suggested: Schema.optionalKey<Schema.Boolean>;
307
+ /**
308
+ * The repository's pipeline, for a forge that runs none: Shepherd runs it on a ChangeRequest's head and reports the
309
+ * result. A `verify` that names no checks leaves it out.
310
+ */
311
+ readonly pipeline: Schema.optionalKey<Schema.Boolean>;
312
+ }>>;
313
+ readonly measure: Schema.optionalKey<Schema.Struct<{
314
+ readonly base: Schema.String;
315
+ readonly plan: Schema.Struct<{
316
+ readonly command: Schema.String;
317
+ readonly prepare: Schema.optionalKey<Schema.String>;
318
+ readonly workingDirectory: Schema.optionalKey<Schema.String>;
319
+ readonly warmup: Schema.optionalKey<Schema.Int>;
320
+ readonly metrics: Schema.$Array<Schema.Struct<{
321
+ readonly name: Schema.String;
322
+ readonly direction: Schema.Literals<readonly ["lower", "higher"]>;
323
+ readonly role: Schema.Literals<readonly ["primary", "guardrail"]>;
324
+ readonly lowVariance: Schema.optionalKey<Schema.Boolean>;
325
+ }>>;
326
+ }>;
327
+ readonly samples: Schema.Int;
328
+ readonly calibrate: Schema.Boolean;
211
329
  }>>;
330
+ /** Hosts the Run's Team and RepoBinding allow, which the check's sandbox adds. */
331
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
212
332
  readonly storageOrigin: Schema.optionalKey<Schema.String>;
213
333
  }>;
214
334
  export declare const WorkUnit: Schema.Union<readonly [Schema.Struct<{
@@ -261,6 +381,8 @@ export declare const WorkUnit: Schema.Union<readonly [Schema.Struct<{
261
381
  readonly leaseExpiresAt: Schema.String;
262
382
  readonly lastHeartbeatAt: Schema.String;
263
383
  }>;
384
+ /** When the Step's `timeout` runs out, across its attempts; absent when it declares none. */
385
+ readonly deadlineAt: Schema.optionalKey<Schema.String>;
264
386
  readonly brief: Schema.Struct<{
265
387
  readonly stepAttemptId: Schema.String;
266
388
  readonly harness: Schema.String;
@@ -273,11 +395,14 @@ export declare const WorkUnit: Schema.Union<readonly [Schema.Struct<{
273
395
  readonly contentMarkdown: Schema.String;
274
396
  }>>;
275
397
  readonly outputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
276
- readonly skills: Schema.optionalKey<Schema.$Array<Schema.Struct<{
398
+ readonly kits: Schema.optionalKey<Schema.$Array<Schema.Struct<{
277
399
  readonly name: Schema.String;
278
- readonly files: Schema.$Record<Schema.String, Schema.String>;
400
+ readonly version: Schema.String;
401
+ readonly setupDigest: Schema.String;
279
402
  }>>>;
280
403
  readonly toolless: Schema.optionalKey<Schema.Literal<true>>;
404
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["web", "subagents", "artifacts", "browser"]>>>;
405
+ readonly listedSkills: Schema.optionalKey<Schema.$Array<Schema.String>>;
281
406
  }>;
282
407
  readonly stepCredential: Schema.String;
283
408
  readonly checkout: Schema.Union<readonly [Schema.Literal<"none">, Schema.Literal<"read">, Schema.Literal<"write">]>;
@@ -301,12 +426,26 @@ export declare const WorkUnit: Schema.Union<readonly [Schema.Struct<{
301
426
  readonly network: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
302
427
  readonly hosts: Schema.$Array<Schema.String>;
303
428
  }>, Schema.Literal<"open">]>>;
429
+ /** Hosts the Run's Team and RepoBinding allow; the Runner adds them unless the Agent opens the network. */
430
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
304
431
  /** The SandboxBackend the Agent requires. */
305
432
  readonly sandbox: Schema.optionalKey<Schema.Literal<"docker">>;
306
433
  /** The values of the Secrets the Step names, for its sandbox's environment. */
307
434
  readonly secrets: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
435
+ /** For each of `secrets`, whose it is and where its reference may be swapped for its value. */
436
+ readonly secretDestinations: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
437
+ readonly scope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
438
+ readonly hosts: Schema.$Array<Schema.String>;
439
+ readonly version: Schema.String;
440
+ }>>>;
308
441
  /** Where the Run's first Step started; a boundary's change is the Run's whole change from there. */
309
442
  readonly runBaseRevision: Schema.optionalKey<Schema.String>;
443
+ /** A write checkout's target branch, whose head the Runner merges in before the agent starts. */
444
+ readonly mergeTarget: Schema.optionalKey<Schema.String>;
445
+ /** What a Step that ran before is told when it carries on: its Question's answer and steers sent while it was away. */
446
+ readonly resumeNotes: Schema.optionalKey<Schema.$Array<Schema.String>>;
447
+ /** The last Transcript entry the attempt holds; a Step that ran before writes after it. */
448
+ readonly transcriptSequence: Schema.optionalKey<Schema.Int>;
310
449
  readonly storageOrigin: Schema.optionalKey<Schema.String>;
311
450
  }>, Schema.Struct<{
312
451
  readonly kind: Schema.Literal<"verification">;
@@ -337,11 +476,38 @@ export declare const WorkUnit: Schema.Union<readonly [Schema.Struct<{
337
476
  readonly expectedCommitSha: Schema.optionalKey<Schema.String>;
338
477
  }>;
339
478
  readonly revision: Schema.String;
479
+ readonly baseline: Schema.optionalKey<Schema.String>;
340
480
  readonly checks: Schema.$Array<Schema.Struct<{
341
481
  readonly name: Schema.String;
342
482
  readonly command: Schema.String;
343
483
  readonly workingDirectory: Schema.optionalKey<Schema.String>;
484
+ /** An agent suggested it for a repository with none approved; a Run sets it, never an approval. */
485
+ readonly suggested: Schema.optionalKey<Schema.Boolean>;
486
+ /**
487
+ * The repository's pipeline, for a forge that runs none: Shepherd runs it on a ChangeRequest's head and reports the
488
+ * result. A `verify` that names no checks leaves it out.
489
+ */
490
+ readonly pipeline: Schema.optionalKey<Schema.Boolean>;
344
491
  }>>;
492
+ readonly measure: Schema.optionalKey<Schema.Struct<{
493
+ readonly base: Schema.String;
494
+ readonly plan: Schema.Struct<{
495
+ readonly command: Schema.String;
496
+ readonly prepare: Schema.optionalKey<Schema.String>;
497
+ readonly workingDirectory: Schema.optionalKey<Schema.String>;
498
+ readonly warmup: Schema.optionalKey<Schema.Int>;
499
+ readonly metrics: Schema.$Array<Schema.Struct<{
500
+ readonly name: Schema.String;
501
+ readonly direction: Schema.Literals<readonly ["lower", "higher"]>;
502
+ readonly role: Schema.Literals<readonly ["primary", "guardrail"]>;
503
+ readonly lowVariance: Schema.optionalKey<Schema.Boolean>;
504
+ }>>;
505
+ }>;
506
+ readonly samples: Schema.Int;
507
+ readonly calibrate: Schema.Boolean;
508
+ }>>;
509
+ /** Hosts the Run's Team and RepoBinding allow, which the check's sandbox adds. */
510
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
345
511
  readonly storageOrigin: Schema.optionalKey<Schema.String>;
346
512
  }>]>;
347
513
  export declare const WorkUnitClaimResult: Schema.Struct<{
@@ -395,6 +561,8 @@ export declare const WorkUnitClaimResult: Schema.Struct<{
395
561
  readonly leaseExpiresAt: Schema.String;
396
562
  readonly lastHeartbeatAt: Schema.String;
397
563
  }>;
564
+ /** When the Step's `timeout` runs out, across its attempts; absent when it declares none. */
565
+ readonly deadlineAt: Schema.optionalKey<Schema.String>;
398
566
  readonly brief: Schema.Struct<{
399
567
  readonly stepAttemptId: Schema.String;
400
568
  readonly harness: Schema.String;
@@ -407,11 +575,14 @@ export declare const WorkUnitClaimResult: Schema.Struct<{
407
575
  readonly contentMarkdown: Schema.String;
408
576
  }>>;
409
577
  readonly outputSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
410
- readonly skills: Schema.optionalKey<Schema.$Array<Schema.Struct<{
578
+ readonly kits: Schema.optionalKey<Schema.$Array<Schema.Struct<{
411
579
  readonly name: Schema.String;
412
- readonly files: Schema.$Record<Schema.String, Schema.String>;
580
+ readonly version: Schema.String;
581
+ readonly setupDigest: Schema.String;
413
582
  }>>>;
414
583
  readonly toolless: Schema.optionalKey<Schema.Literal<true>>;
584
+ readonly tools: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["web", "subagents", "artifacts", "browser"]>>>;
585
+ readonly listedSkills: Schema.optionalKey<Schema.$Array<Schema.String>>;
415
586
  }>;
416
587
  readonly stepCredential: Schema.String;
417
588
  readonly checkout: Schema.Union<readonly [Schema.Literal<"none">, Schema.Literal<"read">, Schema.Literal<"write">]>;
@@ -435,12 +606,26 @@ export declare const WorkUnitClaimResult: Schema.Struct<{
435
606
  readonly network: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
436
607
  readonly hosts: Schema.$Array<Schema.String>;
437
608
  }>, Schema.Literal<"open">]>>;
609
+ /** Hosts the Run's Team and RepoBinding allow; the Runner adds them unless the Agent opens the network. */
610
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
438
611
  /** The SandboxBackend the Agent requires. */
439
612
  readonly sandbox: Schema.optionalKey<Schema.Literal<"docker">>;
440
613
  /** The values of the Secrets the Step names, for its sandbox's environment. */
441
614
  readonly secrets: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
615
+ /** For each of `secrets`, whose it is and where its reference may be swapped for its value. */
616
+ readonly secretDestinations: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
617
+ readonly scope: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"team">]>;
618
+ readonly hosts: Schema.$Array<Schema.String>;
619
+ readonly version: Schema.String;
620
+ }>>>;
442
621
  /** Where the Run's first Step started; a boundary's change is the Run's whole change from there. */
443
622
  readonly runBaseRevision: Schema.optionalKey<Schema.String>;
623
+ /** A write checkout's target branch, whose head the Runner merges in before the agent starts. */
624
+ readonly mergeTarget: Schema.optionalKey<Schema.String>;
625
+ /** What a Step that ran before is told when it carries on: its Question's answer and steers sent while it was away. */
626
+ readonly resumeNotes: Schema.optionalKey<Schema.$Array<Schema.String>>;
627
+ /** The last Transcript entry the attempt holds; a Step that ran before writes after it. */
628
+ readonly transcriptSequence: Schema.optionalKey<Schema.Int>;
444
629
  readonly storageOrigin: Schema.optionalKey<Schema.String>;
445
630
  }>, Schema.Struct<{
446
631
  readonly kind: Schema.Literal<"verification">;
@@ -471,11 +656,38 @@ export declare const WorkUnitClaimResult: Schema.Struct<{
471
656
  readonly expectedCommitSha: Schema.optionalKey<Schema.String>;
472
657
  }>;
473
658
  readonly revision: Schema.String;
659
+ readonly baseline: Schema.optionalKey<Schema.String>;
474
660
  readonly checks: Schema.$Array<Schema.Struct<{
475
661
  readonly name: Schema.String;
476
662
  readonly command: Schema.String;
477
663
  readonly workingDirectory: Schema.optionalKey<Schema.String>;
664
+ /** An agent suggested it for a repository with none approved; a Run sets it, never an approval. */
665
+ readonly suggested: Schema.optionalKey<Schema.Boolean>;
666
+ /**
667
+ * The repository's pipeline, for a forge that runs none: Shepherd runs it on a ChangeRequest's head and reports the
668
+ * result. A `verify` that names no checks leaves it out.
669
+ */
670
+ readonly pipeline: Schema.optionalKey<Schema.Boolean>;
671
+ }>>;
672
+ readonly measure: Schema.optionalKey<Schema.Struct<{
673
+ readonly base: Schema.String;
674
+ readonly plan: Schema.Struct<{
675
+ readonly command: Schema.String;
676
+ readonly prepare: Schema.optionalKey<Schema.String>;
677
+ readonly workingDirectory: Schema.optionalKey<Schema.String>;
678
+ readonly warmup: Schema.optionalKey<Schema.Int>;
679
+ readonly metrics: Schema.$Array<Schema.Struct<{
680
+ readonly name: Schema.String;
681
+ readonly direction: Schema.Literals<readonly ["lower", "higher"]>;
682
+ readonly role: Schema.Literals<readonly ["primary", "guardrail"]>;
683
+ readonly lowVariance: Schema.optionalKey<Schema.Boolean>;
684
+ }>>;
685
+ }>;
686
+ readonly samples: Schema.Int;
687
+ readonly calibrate: Schema.Boolean;
478
688
  }>>;
689
+ /** Hosts the Run's Team and RepoBinding allow, which the check's sandbox adds. */
690
+ readonly hosts: Schema.optionalKey<Schema.$Array<Schema.String>>;
479
691
  readonly storageOrigin: Schema.optionalKey<Schema.String>;
480
692
  }>]>>;
481
693
  }>;
@@ -500,12 +712,23 @@ export declare const WorkUnitHeartbeatInput: Schema.Struct<{
500
712
  readonly capacitySlot: Schema.String;
501
713
  }>;
502
714
  readonly leaseDurationSeconds: Schema.optionalKey<Schema.Int>;
715
+ /** The Secrets an agent Step holds references to, and their versions, for Kitman to say which are revoked. */
716
+ readonly secrets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
717
+ readonly name: Schema.String;
718
+ readonly version: Schema.String;
719
+ }>>>;
503
720
  }>;
504
721
  /** `settled` means the control plane already recorded this Work Unit's outcome; the Runner stops and reports nothing. */
505
722
  export declare const WorkUnitHeartbeatResult: Schema.Struct<{
506
723
  readonly settled: Schema.Boolean;
507
724
  /** An agent Step's Output was accepted; the Runner pushes its work and completes the Step. */
508
725
  readonly outputSubmitted: Schema.optionalKey<Schema.Boolean>;
726
+ /** The Output answers `merged`: the Runner commits the merge it opened for a merge Step, and otherwise aborts it. */
727
+ readonly outputMerged: Schema.optionalKey<Schema.Boolean>;
728
+ /** An agent Step's agent waits on a Question: the Runner parks the Step rather than hold its slot. */
729
+ readonly questionOpen: Schema.optionalKey<Schema.Boolean>;
730
+ /** Those of the heartbeat's `secrets` deleted or replaced since they were delivered: their references stop working. */
731
+ readonly revokedSecrets: Schema.optionalKey<Schema.$Array<Schema.String>>;
509
732
  }>;
510
733
  /** Releases an uncompleted WorkUnit after verifying the complete lease tuple. */
511
734
  export declare const WorkUnitReleaseInput: Schema.Struct<{
@@ -518,6 +741,10 @@ export declare const WorkUnitReleaseInput: Schema.Struct<{
518
741
  readonly fencingToken: Schema.String;
519
742
  readonly capacitySlot: Schema.String;
520
743
  }>;
744
+ /** The Runner gives it back because it could not run it: a program crashed, or an executor failed. */
745
+ readonly crashed: Schema.optionalKey<Schema.Struct<{
746
+ readonly reason: Schema.String;
747
+ }>>;
521
748
  }>;
522
749
  /** One check's run at a tree: what an EvidenceRef records. */
523
750
  export declare const CheckEvidence: Schema.Struct<{
@@ -578,6 +805,11 @@ export declare const VerificationEvidence: Schema.Struct<{
578
805
  readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
579
806
  }>>;
580
807
  }>>;
808
+ readonly measurement: Schema.optionalKey<Schema.Struct<{
809
+ readonly base: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
810
+ readonly head: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
811
+ readonly baseAgain: Schema.optionalKey<Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>>;
812
+ }>>;
581
813
  }>;
582
814
  /** A write checkout's change since the Run began, bounded and redacted by the Runner; Kitman bounds it again. */
583
815
  export declare const BoundaryChange: Schema.Struct<{
@@ -593,6 +825,41 @@ export declare const BoundaryChange: Schema.Struct<{
593
825
  readonly truncated: Schema.Boolean;
594
826
  }>;
595
827
  export type BoundaryChange = (typeof BoundaryChange)['Type'];
828
+ /** The most paths a catch-up report lists in each of its lists. */
829
+ export declare const catchUpPathLimit = 200;
830
+ /**
831
+ * What a base sync's merge did to the branch's own change, as the Runner found it in git: the branch's own diff is
832
+ * `git diff <merge-base with the target>..<head>`, compared file by file without line numbers.
833
+ */
834
+ export declare const CatchUp: Schema.Struct<{
835
+ /** The branch's head before the merge. */
836
+ readonly from: Schema.String;
837
+ /** The head the Step pushed. */
838
+ readonly head: Schema.String;
839
+ /** The files the merge conflicted on, settled by the agent. */
840
+ readonly conflicted: Schema.$Array<Schema.String>;
841
+ /** The files changed besides the merge, while it was open or after it, such as migrations `db:rebase` regenerated. */
842
+ readonly rewritten: Schema.$Array<Schema.String>;
843
+ /** The files whose own diff at `head` differs from theirs at `from`. */
844
+ readonly changed: Schema.$Array<Schema.String>;
845
+ /** A list was longer than `catchUpPathLimit` and was cut. */
846
+ readonly truncated: Schema.Boolean;
847
+ }>;
848
+ export type CatchUp = (typeof CatchUp)['Type'];
849
+ /** An agent Step's Harness cannot run on this Runner: Kitman holds it and starts the Step again on the next choice. */
850
+ export declare const HarnessHold: Schema.Struct<{
851
+ readonly reason: Schema.Literals<readonly ["out_of_quota", "failed_to_start"]>;
852
+ /** When the Harness can run again, as it reported; Kitman holds it for a while when this is missing or implausible. */
853
+ readonly until: Schema.optionalKey<Schema.String>;
854
+ /** The cause is this Step's own, such as a missing login Secret: only this Step passes the choice over, on any Runner. */
855
+ readonly scope: Schema.optionalKey<Schema.Literal<"step">>;
856
+ }>;
857
+ export type HarnessHold = (typeof HarnessHold)['Type'];
858
+ /** The Harness lost its login while it ran, such as to a revoked token: Kitman starts the Step again, signed in afresh. */
859
+ export declare const StepRestart: Schema.Struct<{
860
+ readonly reason: Schema.Literal<"login_revoked">;
861
+ }>;
862
+ export type StepRestart = (typeof StepRestart)['Type'];
596
863
  export declare const WorkUnitOutcome: Schema.Struct<{
597
864
  readonly status: Schema.Union<readonly [Schema.Literal<"completed">, Schema.Literal<"failed">, Schema.Literal<"blocked">, Schema.Literal<"canceled">]>;
598
865
  readonly result: Schema.optionalKey<Schema.Struct<{
@@ -648,6 +915,11 @@ export declare const WorkUnitOutcome: Schema.Struct<{
648
915
  readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
649
916
  }>>;
650
917
  }>>;
918
+ readonly measurement: Schema.optionalKey<Schema.Struct<{
919
+ readonly base: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
920
+ readonly head: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
921
+ readonly baseAgain: Schema.optionalKey<Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>>;
922
+ }>>;
651
923
  }>>;
652
924
  readonly boundary: Schema.optionalKey<Schema.Struct<{
653
925
  readonly kind: Schema.Literal<"change">;
@@ -661,6 +933,31 @@ export declare const WorkUnitOutcome: Schema.Struct<{
661
933
  }>>;
662
934
  readonly truncated: Schema.Boolean;
663
935
  }>>;
936
+ /** What a base sync that merged did to the branch's own change. */
937
+ readonly catchUp: Schema.optionalKey<Schema.Struct<{
938
+ /** The branch's head before the merge. */
939
+ readonly from: Schema.String;
940
+ /** The head the Step pushed. */
941
+ readonly head: Schema.String;
942
+ /** The files the merge conflicted on, settled by the agent. */
943
+ readonly conflicted: Schema.$Array<Schema.String>;
944
+ /** The files changed besides the merge, while it was open or after it, such as migrations `db:rebase` regenerated. */
945
+ readonly rewritten: Schema.$Array<Schema.String>;
946
+ /** The files whose own diff at `head` differs from theirs at `from`. */
947
+ readonly changed: Schema.$Array<Schema.String>;
948
+ /** A list was longer than `catchUpPathLimit` and was cut. */
949
+ readonly truncated: Schema.Boolean;
950
+ }>>;
951
+ readonly harnessHold: Schema.optionalKey<Schema.Struct<{
952
+ readonly reason: Schema.Literals<readonly ["out_of_quota", "failed_to_start"]>;
953
+ /** When the Harness can run again, as it reported; Kitman holds it for a while when this is missing or implausible. */
954
+ readonly until: Schema.optionalKey<Schema.String>;
955
+ /** The cause is this Step's own, such as a missing login Secret: only this Step passes the choice over, on any Runner. */
956
+ readonly scope: Schema.optionalKey<Schema.Literal<"step">>;
957
+ }>>;
958
+ readonly restart: Schema.optionalKey<Schema.Struct<{
959
+ readonly reason: Schema.Literal<"login_revoked">;
960
+ }>>;
664
961
  readonly failureSummary: Schema.optionalKey<Schema.String>;
665
962
  }>;
666
963
  export declare const WorkUnitCompletion: Schema.Struct<{
@@ -729,6 +1026,11 @@ export declare const WorkUnitCompletion: Schema.Struct<{
729
1026
  readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
730
1027
  }>>;
731
1028
  }>>;
1029
+ readonly measurement: Schema.optionalKey<Schema.Struct<{
1030
+ readonly base: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
1031
+ readonly head: Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>;
1032
+ readonly baseAgain: Schema.optionalKey<Schema.$Array<Schema.$Record<Schema.String, Schema.Finite>>>;
1033
+ }>>;
732
1034
  }>>;
733
1035
  readonly boundary: Schema.optionalKey<Schema.Struct<{
734
1036
  readonly kind: Schema.Literal<"change">;
@@ -742,6 +1044,31 @@ export declare const WorkUnitCompletion: Schema.Struct<{
742
1044
  }>>;
743
1045
  readonly truncated: Schema.Boolean;
744
1046
  }>>;
1047
+ /** What a base sync that merged did to the branch's own change. */
1048
+ readonly catchUp: Schema.optionalKey<Schema.Struct<{
1049
+ /** The branch's head before the merge. */
1050
+ readonly from: Schema.String;
1051
+ /** The head the Step pushed. */
1052
+ readonly head: Schema.String;
1053
+ /** The files the merge conflicted on, settled by the agent. */
1054
+ readonly conflicted: Schema.$Array<Schema.String>;
1055
+ /** The files changed besides the merge, while it was open or after it, such as migrations `db:rebase` regenerated. */
1056
+ readonly rewritten: Schema.$Array<Schema.String>;
1057
+ /** The files whose own diff at `head` differs from theirs at `from`. */
1058
+ readonly changed: Schema.$Array<Schema.String>;
1059
+ /** A list was longer than `catchUpPathLimit` and was cut. */
1060
+ readonly truncated: Schema.Boolean;
1061
+ }>>;
1062
+ readonly harnessHold: Schema.optionalKey<Schema.Struct<{
1063
+ readonly reason: Schema.Literals<readonly ["out_of_quota", "failed_to_start"]>;
1064
+ /** When the Harness can run again, as it reported; Kitman holds it for a while when this is missing or implausible. */
1065
+ readonly until: Schema.optionalKey<Schema.String>;
1066
+ /** The cause is this Step's own, such as a missing login Secret: only this Step passes the choice over, on any Runner. */
1067
+ readonly scope: Schema.optionalKey<Schema.Literal<"step">>;
1068
+ }>>;
1069
+ readonly restart: Schema.optionalKey<Schema.Struct<{
1070
+ readonly reason: Schema.Literal<"login_revoked">;
1071
+ }>>;
745
1072
  readonly failureSummary: Schema.optionalKey<Schema.String>;
746
1073
  }>;
747
1074
  }>;
@@ -751,10 +1078,14 @@ export type WorkUnit = (typeof WorkUnit)['Type'];
751
1078
  export type OrchestrationWorkUnit = (typeof OrchestrationWorkUnit)['Type'];
752
1079
  export type AgentStepWorkUnit = (typeof AgentStepWorkUnit)['Type'];
753
1080
  export type ApprovedCheck = (typeof ApprovedCheck)['Type'];
1081
+ export type RepositoryCheck = (typeof RepositoryCheck)['Type'];
754
1082
  export type VerificationWorkUnit = (typeof VerificationWorkUnit)['Type'];
755
1083
  export type CheckEvidence = (typeof CheckEvidence)['Type'];
756
1084
  export type TreeEvidence = (typeof TreeEvidence)['Type'];
757
1085
  export type VerificationEvidence = (typeof VerificationEvidence)['Type'];
1086
+ export type MeasurePlan = (typeof MeasurePlan)['Type'];
1087
+ export type MeasureSpec = (typeof MeasureSpec)['Type'];
1088
+ export type MeasureEvidence = (typeof MeasureEvidence)['Type'];
758
1089
  export type LoopCheckout = (typeof LoopCheckout)['Type'];
759
1090
  export type RunJournal = (typeof RunJournal)['Type'];
760
1091
  export type WorkUnitClaimResult = (typeof WorkUnitClaimResult)['Type'];