@kitman-sh/cli 0.13.15 → 0.13.17

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 (27) hide show
  1. package/dist/{chunk-6z499mrc.js → chunk-0vv8cbye.js} +40 -28
  2. package/dist/{chunk-3syr8kyv.js → chunk-1cr225aq.js} +5 -5
  3. package/dist/{chunk-gq7y5v3e.js → chunk-24h0y27w.js} +1 -1
  4. package/dist/{chunk-ydz5ctsj.js → chunk-4yca7e7x.js} +74 -29
  5. package/dist/{chunk-6kz6qa2h.js → chunk-643pxp2k.js} +4 -4
  6. package/dist/{chunk-ga76znz9.js → chunk-67xn3yer.js} +12 -7
  7. package/dist/{chunk-b07c43pg.js → chunk-80f0p6s7.js} +145 -110
  8. package/dist/{chunk-5qeqhjxy.js → chunk-8nzsyz74.js} +4 -4
  9. package/dist/{chunk-fc2bhh5v.js → chunk-ahvpwkyk.js} +2 -2
  10. package/dist/{chunk-jattyebv.js → chunk-b5edh1jq.js} +31 -31
  11. package/dist/{chunk-82w8rmkc.js → chunk-cbf0q15q.js} +14 -60
  12. package/dist/{chunk-h0jf48ew.js → chunk-efyrm6bv.js} +1 -1
  13. package/dist/{chunk-zem7mg1b.js → chunk-g7ysb6ca.js} +11 -11
  14. package/dist/{chunk-6qdhhk6r.js → chunk-gasqek3p.js} +6 -6
  15. package/dist/{chunk-y1krmnbv.js → chunk-ggmwpwhf.js} +2 -2
  16. package/dist/{chunk-gy9rf14f.js → chunk-mmd7mjv0.js} +3 -3
  17. package/dist/{chunk-7cx4t4em.js → chunk-pbmadbfm.js} +4 -4
  18. package/dist/{chunk-rqrtf7sb.js → chunk-pjq9bf3w.js} +4 -4
  19. package/dist/{chunk-npnbac9a.js → chunk-pvsg1ppc.js} +4 -4
  20. package/dist/{chunk-q5w3v4k1.js → chunk-pxvd8w2v.js} +1 -1
  21. package/dist/{chunk-hn9x2jjs.js → chunk-q4ra17vf.js} +3 -3
  22. package/dist/{chunk-z4x9m2bv.js → chunk-syhs23yk.js} +7 -7
  23. package/dist/{chunk-nf9gdnsf.js → chunk-x20t7xy8.js} +17 -17
  24. package/dist/{chunk-my63gy4t.js → chunk-zcpnmgwb.js} +7 -7
  25. package/dist/{chunk-zw3gf6r5.js → chunk-zgraq2y3.js} +70 -28
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -38,7 +38,7 @@ import {
38
38
  assignProperty,
39
39
  PipeInspectableProto,
40
40
  withFiber,
41
- make14,
41
+ make13,
42
42
  strictEqual,
43
43
  Tuple,
44
44
  Number2,
@@ -58,7 +58,7 @@ import {
58
58
  Service2,
59
59
  makeUnsafe4,
60
60
  empty3,
61
- make15,
61
+ make14,
62
62
  add,
63
63
  getOrUndefined2,
64
64
  getOrUndefinedUnsafe,
@@ -91,7 +91,7 @@ import {
91
91
  fail4,
92
92
  isSuccess2,
93
93
  makeUnsafe5,
94
- make16,
94
+ make15,
95
95
  _await,
96
96
  fail5,
97
97
  isDone,
@@ -194,10 +194,14 @@ import {
194
194
  logError,
195
195
  effectify,
196
196
  decode,
197
+ isRedacted,
198
+ make16,
199
+ value,
197
200
  defaultParseOptions,
198
201
  omit,
199
202
  map9,
200
203
  declare,
204
+ is,
201
205
  decodeUnknownEffect2,
202
206
  decodeEffect,
203
207
  decodeUnknownOption,
@@ -261,7 +265,7 @@ import {
261
265
  decodeJsonStringOption,
262
266
  encodeJsonStringSync,
263
267
  encodePrettyJsonString
264
- } from "./chunk-zw3gf6r5.js";
268
+ } from "./chunk-zgraq2y3.js";
265
269
  import {
266
270
  map,
267
271
  makeEquivalence,
@@ -270,8 +274,8 @@ import {
270
274
  systemError,
271
275
  badArgument,
272
276
  makeUnsafe2,
277
+ make7,
273
278
  make8,
274
- make9,
275
279
  sliding,
276
280
  unbounded2,
277
281
  offer,
@@ -287,13 +291,13 @@ import {
287
291
  isSink,
288
292
  fromChannel,
289
293
  drain,
290
- make10,
294
+ make9,
291
295
  get3,
292
296
  isStream,
293
297
  fromChannel2,
294
298
  callback,
295
299
  empty2,
296
- make11,
300
+ make10,
297
301
  suspend,
298
302
  fail2,
299
303
  fromQueue,
@@ -319,16 +323,16 @@ import {
319
323
  mkArrayBuffer,
320
324
  toReadableStreamEffect,
321
325
  FileSystem,
322
- make12,
326
+ make11,
323
327
  FileTypeId,
324
328
  WatchBackend,
325
329
  Path,
326
- make13,
330
+ make12,
327
331
  option,
328
332
  String2,
329
333
  optionalEnv,
330
334
  harnessesUnsupportedInSrt2
331
- } from "./chunk-nf9gdnsf.js";
335
+ } from "./chunk-x20t7xy8.js";
332
336
  import {
333
337
  isDateTime,
334
338
  Numeric,
@@ -341,21 +345,18 @@ import {
341
345
  SecretScope,
342
346
  SecretHosts,
343
347
  isSecretReference
344
- } from "./chunk-q5w3v4k1.js";
348
+ } from "./chunk-pxvd8w2v.js";
345
349
  import {
346
- isRedacted,
347
- make,
348
- value,
349
350
  ExitCode,
350
351
  ProcessId,
351
352
  makeHandle,
352
- make2,
353
+ make,
353
354
  ChildProcessSpawner,
354
355
  display,
355
- make3,
356
+ make2,
356
357
  parseFdName,
357
358
  fdName
358
- } from "./chunk-82w8rmkc.js";
359
+ } from "./chunk-cbf0q15q.js";
359
360
 
360
361
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
361
362
  var makeEquivalence3 = Tuple;
@@ -518,7 +519,7 @@ var makeUnsafe6 = (input) => {
518
519
  var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
519
520
  var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
520
521
  var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
521
- var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
522
+ var make3 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
522
523
  var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
523
524
  var nowUnsafe = () => makeUtc(Date.now());
524
525
  var toDateUtc = (self) => new Date(self.epochMilliseconds);
@@ -908,7 +909,7 @@ var toNumber = (b) => {
908
909
 
909
910
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
910
911
  var makeUnsafe = makeUnsafe6;
911
- var make18 = make4;
912
+ var make18 = make3;
912
913
  var now2 = now;
913
914
  var nowUnsafe2 = nowUnsafe;
914
915
  var toDateUtc2 = toDateUtc;
@@ -1123,7 +1124,7 @@ var readableToPullUnsafe = (options) => {
1123
1124
  const readable = options.readable;
1124
1125
  const chunkSize = options.chunkSize ?? 4096;
1125
1126
  const closeOnDone = options.closeOnDone ?? true;
1126
- const exit = options.exit ?? make8(undefined);
1127
+ const exit = options.exit ?? make7(undefined);
1127
1128
  const latch = options.latch ?? makeUnsafe2(false);
1128
1129
  function onReadable() {
1129
1130
  latch.openUnsafe();
@@ -1687,7 +1688,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1687
1688
  const sourceStream = unwrap(succeed6(getSourceStream(handles[handles.length - 1], options.from)));
1688
1689
  const toOption = options.to ?? "stdin";
1689
1690
  if (toOption === "stdin") {
1690
- handles.push(yield* spawnCommand(make3(command.command, command.args, {
1691
+ handles.push(yield* spawnCommand(make2(command.command, command.args, {
1691
1692
  ...command.options,
1692
1693
  stdin: {
1693
1694
  ...stdinConfig,
@@ -1707,7 +1708,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1707
1708
  type: "input",
1708
1709
  stream: sourceStream
1709
1710
  };
1710
- handles.push(yield* spawnCommand(make3(command.command, command.args, {
1711
+ handles.push(yield* spawnCommand(make2(command.command, command.args, {
1711
1712
  ...command.options,
1712
1713
  additionalFds: {
1713
1714
  ...existingFds,
@@ -1715,7 +1716,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1715
1716
  }
1716
1717
  })));
1717
1718
  } else {
1718
- handles.push(yield* spawnCommand(make3(command.command, command.args, {
1719
+ handles.push(yield* spawnCommand(make2(command.command, command.args, {
1719
1720
  ...command.options,
1720
1721
  stdin: {
1721
1722
  ...stdinConfig,
@@ -1754,7 +1755,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1754
1755
  }
1755
1756
  }
1756
1757
  });
1757
- return make2(spawnCommand);
1758
+ return make(spawnCommand);
1758
1759
  });
1759
1760
  var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make19);
1760
1761
  var flattenCommand = (command) => {
@@ -2240,7 +2241,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2240
2241
  resume(fail7(handleBadArgument("writeFile")(err)));
2241
2242
  }
2242
2243
  });
2243
- var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make12({
2244
+ var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2244
2245
  access: access2,
2245
2246
  chmod: chmod2,
2246
2247
  chown: chown2,
@@ -2300,15 +2301,15 @@ var fileUrlOps = (windows) => ({
2300
2301
  })
2301
2302
  })
2302
2303
  });
2303
- var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2304
+ var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2304
2305
  ...NodePath.posix,
2305
2306
  .../* @__PURE__ */ fileUrlOps(false)
2306
2307
  }));
2307
- var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2308
+ var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2308
2309
  ...NodePath.win32,
2309
2310
  .../* @__PURE__ */ fileUrlOps(true)
2310
2311
  }));
2311
- var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2312
+ var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2312
2313
  ...NodePath,
2313
2314
  .../* @__PURE__ */ fileUrlOps(undefined)
2314
2315
  }));
@@ -2830,12 +2831,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
2830
2831
  if (typeof key === "string") {
2831
2832
  const k = key.toLowerCase();
2832
2833
  if (k in self) {
2833
- out[k] = make(self[k]);
2834
+ out[k] = make16(self[k]);
2834
2835
  }
2835
2836
  } else {
2836
2837
  for (const name in self) {
2837
2838
  if (name.search(key) !== -1) {
2838
- out[name] = make(self[name]);
2839
+ out[name] = make16(self[name]);
2839
2840
  }
2840
2841
  }
2841
2842
  }
@@ -2942,7 +2943,7 @@ var fromInputNested = (input) => {
2942
2943
  return out;
2943
2944
  };
2944
2945
  var coerce = (value) => isRedacted(value) ? value : String(value);
2945
- var Equivalence3 = /* @__PURE__ */ make14((a, b) => arrayEquivalence(a.params, b.params));
2946
+ var Equivalence3 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2946
2947
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
2947
2948
  var empty4 = /* @__PURE__ */ make23([]);
2948
2949
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -2961,7 +2962,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
2961
2962
  var toString = (input) => new URLSearchParams(fromInput2(input).params.map(([key, value]) => [key, unwrap3(value)])).toString();
2962
2963
  var redact3 = /* @__PURE__ */ dual(2, (self, key) => {
2963
2964
  const patterns = Array.isArray(key) ? key : [key];
2964
- return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make(value) : value]);
2965
+ return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make16(value) : value]);
2965
2966
  });
2966
2967
  var isRedactedName2 = isRedactedName;
2967
2968
  var redactUrl = (url, redactedNames = currentRedactedNames()) => {
@@ -3037,7 +3038,7 @@ import * as readline from "readline";
3037
3038
  var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
3038
3039
  const stdin = process.stdin;
3039
3040
  const stdout = process.stdout;
3040
- const lines = yield* make9();
3041
+ const lines = yield* make8();
3041
3042
  let inputEnded = stdin.readableEnded;
3042
3043
  let readlineActive = false;
3043
3044
  const onStdinEnd = () => {
@@ -3048,7 +3049,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3048
3049
  };
3049
3050
  stdin.once("end", onStdinEnd);
3050
3051
  yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
3051
- const rlRef = yield* make10({
3052
+ const rlRef = yield* make9({
3052
3053
  acquire: acquireRelease(sync2(() => {
3053
3054
  const rl = readline.createInterface({
3054
3055
  input: stdin,
@@ -3087,7 +3088,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3087
3088
  if (stdin.isTTY)
3088
3089
  stdin.setRawMode(enabled);
3089
3090
  });
3090
- const rawModeRef = yield* make10({
3091
+ const rawModeRef = yield* make9({
3091
3092
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
3092
3093
  idleTimeToLive: "10 millis"
3093
3094
  });
@@ -3108,7 +3109,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3108
3109
  return queue;
3109
3110
  });
3110
3111
  const readInput = gen(function* () {
3111
- const queue = yield* make9();
3112
+ const queue = yield* make8();
3112
3113
  const handleKeypress = (s, k) => {
3113
3114
  const userInput = {
3114
3115
  input: fromUndefinedOr(s),
@@ -3822,6 +3823,9 @@ function redactResponseValue(value, key, depth) {
3822
3823
  function redactCredentials(output) {
3823
3824
  return CREDENTIAL_RULES.reduce(redactedBy, output);
3824
3825
  }
3826
+ function redactCredentialText(text) {
3827
+ return RESPONSE_RULES.reduce(redactedBy, text);
3828
+ }
3825
3829
  function redactedOutputTail(output, maxChars = 4000) {
3826
3830
  const redacted = redactCredentials(output);
3827
3831
  return redacted.length <= maxChars ? redacted : redacted.slice(-maxChars);
@@ -5630,6 +5634,9 @@ var sum = (usages) => usages.length === 0 ? undefined : usages.reduce((total, us
5630
5634
  cached: total.cached + usage.cached
5631
5635
  }));
5632
5636
  var tokensSpent = (attempts) => sum(attempts.filter((tokens) => tokens !== undefined && tokens !== "none"));
5637
+ var TokenTotalCount = String4.check(isPattern(/^(?:0|[1-9][0-9]*)$/));
5638
+ var TokenTotal = Struct({ input: TokenTotalCount, output: TokenTotalCount, cached: TokenTotalCount });
5639
+ var tokenCountWords = (count) => BigInt(count).toLocaleString("en-US");
5633
5640
 
5634
5641
  // packages/core/src/loop.ts
5635
5642
  var LoopStatuses = ["draft", "active", "disabled", "archived"];
@@ -5856,6 +5863,7 @@ var LoopSafeReferenceString = String4.check(isMinLength(1), isMaxLength(240), is
5856
5863
  var LoopSafeInternalReferenceString = String4.check(isMinLength(1), isMaxLength(240), isPattern(new RegExp(LoopSafeInternalReferencePattern, "u")));
5857
5864
  var loopSafeTextMaxLength = 4000;
5858
5865
  var LoopSafeText = String4.check(isMaxLength(loopSafeTextMaxLength), isPattern(new RegExp(`^(?![\\s\\S]*(?:${LoopCredentialContentPattern}|[A-Za-z][A-Za-z0-9+.-]*://(?:[^\\s/?#]*@|[^\\s?#]*\\?)))[\\s\\S]*$`, "u")));
5866
+ var reportedModelName = (named) => /^[A-Za-z0-9][\w.:/@+[\]-]{0,199}$/u.test(named) && is(LoopSafeText)(named) && redactCredentialText(named) === named ? named : undefined;
5859
5867
  var QuestionText = String4;
5860
5868
  var LoopSafeOutputDataString = String4.check(isMaxLength(4000), isPattern(new RegExp(LoopSafeInternalReferencePattern, "u")));
5861
5869
  var LoopSafePackageName = String4.check(isMinLength(1), isMaxLength(200), isPattern(new RegExp(LoopSafeReferencePattern, "u")));
@@ -6392,6 +6400,12 @@ var SkippedChoice = Struct({
6392
6400
  reason: Literals(SkippedChoiceReasons),
6393
6401
  until: optionalKey(Timestamp)
6394
6402
  });
6403
+ var StepFallback = Struct({
6404
+ harness: String4,
6405
+ model: optionalKey(String4),
6406
+ effort: optionalKey(Literals(AgentEfforts)),
6407
+ firstChoice: SkippedChoice
6408
+ });
6395
6409
  var StepAttempt = Struct({
6396
6410
  id: Id,
6397
6411
  workspaceId: Id,
@@ -6532,7 +6546,8 @@ var RunStepSummary = Struct({
6532
6546
  model: optionalKey(String4),
6533
6547
  tokens: optionalKey(AttemptTokens)
6534
6548
  })),
6535
- tokens: optionalKey(TokenUsage)
6549
+ tokens: optionalKey(TokenUsage),
6550
+ fallback: optionalKey(StepFallback)
6536
6551
  });
6537
6552
  var RunSteerDeliveries = ["queued", "delivered", "failed"];
6538
6553
  var RunSteer = Struct({
@@ -6595,6 +6610,7 @@ var RunGraphNode = Struct({
6595
6610
  model: optionalKey(String4),
6596
6611
  runner: optionalKey(Struct({ id: Id, name: String4 }))
6597
6612
  })),
6613
+ fallback: optionalKey(StepFallback),
6598
6614
  child: optionalKey(Struct({
6599
6615
  runId: Id,
6600
6616
  loopTitle: String4,
@@ -6627,6 +6643,7 @@ var RunShow = Struct({
6627
6643
  steps: ArraySchema(RunStepSummary),
6628
6644
  questions: ArraySchema(Question),
6629
6645
  questionsBelow: optionalKey(ArraySchema(QuestionBelow)),
6646
+ runsBelow: optionalKey(ArraySchema(Struct({ runId: Id, parentRunId: Id }))),
6630
6647
  children: ArraySchema(Struct({
6631
6648
  runId: Id,
6632
6649
  name: String4,
@@ -6647,7 +6664,8 @@ var RunShow = Struct({
6647
6664
  steers: ArraySchema(RunSteer),
6648
6665
  waiting: ArraySchema(RunWaiting),
6649
6666
  closures: ArraySchema(RunClosure),
6650
- tokens: optionalKey(TokenUsage)
6667
+ tokens: optionalKey(TokenUsage),
6668
+ tokensWithChildRuns: optionalKey(TokenTotal)
6651
6669
  });
6652
6670
  var RunStartPreview = Struct({
6653
6671
  loop: Struct({ id: String4, title: String4, outcome: optionalKey(String4) }),
@@ -7109,6 +7127,7 @@ var WorkUnitHeartbeatInput = Struct({
7109
7127
  workUnitId: Id,
7110
7128
  lease: WorkUnitLeaseInput,
7111
7129
  leaseDurationSeconds: optionalKey(Int.check(isGreaterThanOrEqualTo(1), isLessThanOrEqualTo(3600))),
7130
+ harnessStarted: optionalKey(Literal(true)),
7112
7131
  secrets: optionalKey(ArraySchema(Struct({ name: SecretName, version: String4.check(isMinLength(1), isMaxLength(128)) })).check(isMaxLength(256)))
7113
7132
  });
7114
7133
  var WorkUnitHeartbeatResult = Struct({
@@ -7122,7 +7141,8 @@ var WorkUnitReleaseInput = Struct({
7122
7141
  workUnitId: Id,
7123
7142
  lease: WorkUnitLeaseInput,
7124
7143
  crashed: optionalKey(Struct({ reason: String4.check(isMinLength(1), isMaxLength(500)) })),
7125
- tokens: optionalKey(AttemptTokens)
7144
+ tokens: optionalKey(AttemptTokens),
7145
+ ranModel: optionalKey(String4.check(isMinLength(1), isMaxLength(200)))
7126
7146
  });
7127
7147
  var CheckEvidence = Struct({
7128
7148
  name: String4.check(isMinLength(1), isMaxLength(120)),
@@ -7193,6 +7213,7 @@ var WorkUnitOutcome = Struct({
7193
7213
  harnessHold: optionalKey(HarnessHold),
7194
7214
  restart: optionalKey(StepRestart),
7195
7215
  tokens: optionalKey(AttemptTokens),
7216
+ ranModel: optionalKey(String4.check(isMinLength(1), isMaxLength(200))),
7196
7217
  failureSummary: optionalKey(String4.check(isMinLength(1), isMaxLength(4000)))
7197
7218
  });
7198
7219
  var WorkUnitCompletion = Struct({
@@ -10083,14 +10104,14 @@ function makeWith(method, url, urlParams, hash, headers, body) {
10083
10104
  return self;
10084
10105
  }
10085
10106
  var empty6 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty, empty5);
10086
- var make5 = (method) => (url, options) => modify(empty6, {
10107
+ var make4 = (method) => (url, options) => modify(empty6, {
10087
10108
  method,
10088
10109
  url,
10089
10110
  ...options ?? undefined
10090
10111
  });
10091
- var get = /* @__PURE__ */ make5("GET");
10092
- var post = /* @__PURE__ */ make5("POST");
10093
- var put = /* @__PURE__ */ make5("PUT");
10112
+ var get = /* @__PURE__ */ make4("GET");
10113
+ var post = /* @__PURE__ */ make4("POST");
10114
+ var put = /* @__PURE__ */ make4("PUT");
10094
10115
  var modify = /* @__PURE__ */ dual(2, (self, options) => {
10095
10116
  let result = self;
10096
10117
  if (options.method) {
@@ -10391,7 +10412,7 @@ var Proto7 = {
10391
10412
  };
10392
10413
  },
10393
10414
  .../* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ allShort.map(([fullMethod, method]) => [method, function(url, options) {
10394
- return this.execute(make5(fullMethod)(url, options));
10415
+ return this.execute(make4(fullMethod)(url, options));
10395
10416
  }]))
10396
10417
  };
10397
10418
  var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFiber2((fiber) => {
@@ -11480,6 +11501,20 @@ var listedSummary = (summary) => {
11480
11501
  const line = summary.replace(/\s+/g, " ").trim();
11481
11502
  return line.length <= summaryLimit ? line : `${Array.from(line).slice(0, summaryLimit).join("").trimEnd()}\u2026`;
11482
11503
  };
11504
+ // packages/core/src/step-fallback.ts
11505
+ var skippedReasonWords = {
11506
+ not_on_runner: "not on this Runner",
11507
+ out_of_quota: "out of quota",
11508
+ rate_limited: "rate limited",
11509
+ login_refused: "login refused",
11510
+ failed_to_start: "failed to start"
11511
+ };
11512
+ var choiceWords = (choice, unnamedModel) => [
11513
+ choice.harness ?? "the Runner\u2019s default Harness",
11514
+ choice.model ?? unnamedModel,
11515
+ ...choice.effort === undefined ? [] : [`${choice.effort} effort`]
11516
+ ].join(" \xB7 ");
11517
+ var stepFallbackWords = (fallback) => `Fallback: ${choiceWords(fallback, "model not reported")}. First choice ${choiceWords(fallback.firstChoice, "its Harness\u2019s default model")}: ${skippedReasonWords[fallback.firstChoice.reason]}`;
11483
11518
  // packages/core/src/kit.ts
11484
11519
  var KitName = String4.check(isMinLength(1), isMaxLength(214), isPattern(new RegExp("^(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$", "u")));
11485
11520
  var KitDigest = String4.check(isPattern(new RegExp("^[a-f0-9]{64}$", "u")));
@@ -14101,7 +14136,7 @@ var makeProto = (options) => {
14101
14136
  Rpc.key = `effect/rpc/Rpc/${options._tag}`;
14102
14137
  return Rpc;
14103
14138
  };
14104
- var make6 = (tag, options) => {
14139
+ var make5 = (tag, options) => {
14105
14140
  const successSchema = options?.success ?? Void;
14106
14141
  const errorSchema = options?.error ?? Never;
14107
14142
  const defectSchema = options?.defect ?? Defect();
@@ -14312,7 +14347,7 @@ var RpcGroupProto = {
14312
14347
  });
14313
14348
  },
14314
14349
  annotateRpcs(service, value) {
14315
- return this.annotateRpcsMerge(make15(service, value));
14350
+ return this.annotateRpcsMerge(make14(service, value));
14316
14351
  },
14317
14352
  annotateMerge(context) {
14318
14353
  return makeProto2({
@@ -14335,7 +14370,7 @@ var makeProto2 = (options) => Object.assign(function() {}, RpcGroupProto, {
14335
14370
  requests: options.requests,
14336
14371
  annotations: options.annotations
14337
14372
  });
14338
- var make7 = (...rpcs) => makeProto2({
14373
+ var make6 = (...rpcs) => makeProto2({
14339
14374
  requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
14340
14375
  annotations: empty3()
14341
14376
  });
@@ -14441,96 +14476,96 @@ var ProgramOutcome = Union([
14441
14476
  Struct({ status: Literal("failed"), failureSummary: String4 })
14442
14477
  ]);
14443
14478
 
14444
- class RunnerReplicaRpcs extends make7(make6("Claim", {
14479
+ class RunnerReplicaRpcs extends make6(make5("Claim", {
14445
14480
  payload: WorkUnitClaimInput,
14446
14481
  success: WorkUnitClaimResult,
14447
14482
  error: RunnerRpcError
14448
- }), make6("Heartbeat", {
14483
+ }), make5("Heartbeat", {
14449
14484
  payload: WorkUnitHeartbeatInput,
14450
14485
  success: WorkUnitHeartbeatResult,
14451
14486
  error: RunnerRpcError
14452
- }), make6("Complete", {
14487
+ }), make5("Complete", {
14453
14488
  payload: WorkUnitCompletion,
14454
14489
  error: RunnerRpcError
14455
- }), make6("Release", {
14490
+ }), make5("Release", {
14456
14491
  payload: WorkUnitReleaseInput,
14457
14492
  error: RunnerRpcError
14458
- }), make6("Signals", {
14493
+ }), make5("Signals", {
14459
14494
  payload: { runnerReplicaId: String4 },
14460
14495
  success: RunnerSignal,
14461
14496
  error: RunnerRpcError,
14462
14497
  stream: true
14463
- }), make6("ReportSteer", {
14498
+ }), make5("ReportSteer", {
14464
14499
  payload: { workUnitId: String4, messageId: String4, delivered: Boolean2 },
14465
14500
  success: Void,
14466
14501
  error: RunnerRpcError
14467
- }), make6("AppendTranscript", {
14502
+ }), make5("AppendTranscript", {
14468
14503
  payload: { workUnitId: String4, entries: ArraySchema(TranscriptAppendEntry).check(isMaxLength(100)) },
14469
14504
  success: Void,
14470
14505
  error: RunnerRpcError
14471
- }), make6("CreateCheckpointFile", {
14506
+ }), make5("CreateCheckpointFile", {
14472
14507
  payload: { lease: ProgramLease, byteSize: Int, sha256: String4 },
14473
14508
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14474
14509
  error: Union([RunnerRpcError, RunFileRefused])
14475
- }), make6("CheckpointFileParts", {
14510
+ }), make5("CheckpointFileParts", {
14476
14511
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14477
14512
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14478
14513
  error: RunnerRpcError
14479
- }), make6("CompleteCheckpointFile", {
14514
+ }), make5("CompleteCheckpointFile", {
14480
14515
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14481
14516
  success: RunFileRecord,
14482
14517
  error: RunnerRpcError
14483
- }), make6("SaveCheckpoint", {
14518
+ }), make5("SaveCheckpoint", {
14484
14519
  payload: { lease: ProgramLease, checkpoint: StepCheckpoint },
14485
14520
  success: Void,
14486
14521
  error: RunnerRpcError
14487
- }), make6("ResumeCheckpoint", {
14522
+ }), make5("ResumeCheckpoint", {
14488
14523
  payload: { lease: ProgramLease },
14489
14524
  success: UndefinedOr(ResumedCheckpoint),
14490
14525
  error: RunnerRpcError
14491
- }), make6("SettledCheckpoints", {
14526
+ }), make5("SettledCheckpoints", {
14492
14527
  success: ArraySchema(Struct({
14493
14528
  stepAttemptId: String4,
14494
14529
  ref: optionalKey(String4),
14495
14530
  repoBinding: optionalKey(WorkUnitRepoBinding)
14496
14531
  })),
14497
14532
  error: RunnerRpcError
14498
- }), make6("ForgetCheckpoints", {
14533
+ }), make5("ForgetCheckpoints", {
14499
14534
  payload: { stepAttemptIds: ArraySchema(String4) },
14500
14535
  success: Void,
14501
14536
  error: RunnerRpcError
14502
- }), make6("GitCredential", {
14537
+ }), make5("GitCredential", {
14503
14538
  payload: { repoBindingId: String4 },
14504
14539
  success: UndefinedOr(Struct({ username: String4, password: String4 })),
14505
14540
  error: RunnerRpcError
14506
- }), make6("Bundle", {
14541
+ }), make5("Bundle", {
14507
14542
  payload: { digest: String4 },
14508
14543
  success: Struct({ bundle: String4 }),
14509
14544
  error: RunnerRpcError
14510
- }), make6("SettledRuns", {
14545
+ }), make5("SettledRuns", {
14511
14546
  payload: { runIds: ArraySchema(String4) },
14512
14547
  success: ArraySchema(String4),
14513
14548
  error: RunnerRpcError
14514
- }), make6("KnownEvidence", {
14549
+ }), make5("KnownEvidence", {
14515
14550
  payload: { lease: ProgramLease, trees: ArraySchema(String4) },
14516
14551
  success: ArraySchema(Struct({ tree: String4, name: String4, command: String4 })),
14517
14552
  error: RunnerRpcError
14518
14553
  })).middleware(RunnerAuthentication) {
14519
14554
  }
14520
14555
 
14521
- class RunnerJournalRpcs extends make7(make6("RecordActivity", {
14556
+ class RunnerJournalRpcs extends make6(make5("RecordActivity", {
14522
14557
  payload: { lease: ProgramLease, name: String4, attempt: Int, exit: Json },
14523
14558
  error: RunnerRpcError
14524
- }), make6("DeferredDone", {
14559
+ }), make5("DeferredDone", {
14525
14560
  payload: { lease: ProgramLease, name: String4, exit: Json },
14526
14561
  error: RunnerRpcError
14527
- }), make6("ScheduleClock", {
14562
+ }), make5("ScheduleClock", {
14528
14563
  payload: { lease: ProgramLease, name: String4, deferredName: String4, durationMillis: Int },
14529
14564
  error: RunnerRpcError
14530
- }), make6("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make6("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14565
+ }), make5("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make5("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14531
14566
  }
14532
14567
 
14533
- class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14568
+ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14534
14569
  payload: {
14535
14570
  lease: ProgramLease,
14536
14571
  step: String4,
@@ -14550,7 +14585,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14550
14585
  },
14551
14586
  success: Struct({ questionId: String4 }),
14552
14587
  error: RunnerRpcError
14553
- }), make6("StartAgentStep", {
14588
+ }), make5("StartAgentStep", {
14554
14589
  payload: {
14555
14590
  lease: ProgramLease,
14556
14591
  step: String4,
@@ -14566,7 +14601,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14566
14601
  },
14567
14602
  success: Struct({ stepAttemptId: String4 }),
14568
14603
  error: RunnerRpcError
14569
- }), make6("StartVerification", {
14604
+ }), make5("StartVerification", {
14570
14605
  payload: {
14571
14606
  lease: ProgramLease,
14572
14607
  step: String4,
@@ -14587,7 +14622,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14587
14622
  },
14588
14623
  success: Struct({ verificationId: String4 }),
14589
14624
  error: RunnerRpcError
14590
- }), make6("AwaitEvent", {
14625
+ }), make5("AwaitEvent", {
14591
14626
  payload: {
14592
14627
  lease: ProgramLease,
14593
14628
  step: String4,
@@ -14603,7 +14638,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14603
14638
  })))
14604
14639
  },
14605
14640
  error: RunnerRpcError
14606
- }), make6("ClaimResource", {
14641
+ }), make5("ClaimResource", {
14607
14642
  payload: {
14608
14643
  lease: ProgramLease,
14609
14644
  step: String4,
@@ -14612,7 +14647,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14612
14647
  action: Literals(["claim", "take_over", "let_go"])
14613
14648
  },
14614
14649
  error: RunnerRpcError
14615
- }), make6("AdmitChild", {
14650
+ }), make5("AdmitChild", {
14616
14651
  payload: {
14617
14652
  lease: ProgramLease,
14618
14653
  step: String4,
@@ -14623,7 +14658,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14623
14658
  },
14624
14659
  success: Struct({ runId: String4 }),
14625
14660
  error: RunnerRpcError
14626
- }), make6("StoreArtifact", {
14661
+ }), make5("StoreArtifact", {
14627
14662
  payload: {
14628
14663
  lease: ProgramLease,
14629
14664
  step: String4,
@@ -14635,7 +14670,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14635
14670
  },
14636
14671
  success: Struct({ artifactId: String4 }),
14637
14672
  error: RunnerRpcError
14638
- }), make6("RecordNote", {
14673
+ }), make5("RecordNote", {
14639
14674
  payload: {
14640
14675
  lease: ProgramLease,
14641
14676
  step: String4,
@@ -14644,7 +14679,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14644
14679
  kind: optional(Literals(["note", "blocker"]))
14645
14680
  },
14646
14681
  error: RunnerRpcError
14647
- }), make6("PerformHostEffect", {
14682
+ }), make5("PerformHostEffect", {
14648
14683
  payload: {
14649
14684
  lease: ProgramLease,
14650
14685
  step: String4,
@@ -14673,7 +14708,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14673
14708
  },
14674
14709
  success: UndefinedOr(Struct({ id: String4, number: String4, url: String4 })),
14675
14710
  error: RunnerRpcError
14676
- }), make6("AlertTask", {
14711
+ }), make5("AlertTask", {
14677
14712
  payload: {
14678
14713
  lease: ProgramLease,
14679
14714
  step: String4,
@@ -14690,7 +14725,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14690
14725
  joined: optionalKey(Struct({ kind: Literals(["run", "recent"]), runId: String4 }))
14691
14726
  }),
14692
14727
  error: RunnerRpcError
14693
- }), make6("ReadTranscripts", {
14728
+ }), make5("ReadTranscripts", {
14694
14729
  payload: {
14695
14730
  lease: ProgramLease,
14696
14731
  step: String4,
@@ -14725,7 +14760,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14725
14760
  })))
14726
14761
  }),
14727
14762
  error: RunnerRpcError
14728
- }), make6("PipelineStatus", {
14763
+ }), make5("PipelineStatus", {
14729
14764
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14730
14765
  success: Struct({
14731
14766
  head: String4,
@@ -14759,11 +14794,11 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14759
14794
  }))
14760
14795
  }),
14761
14796
  error: RunnerRpcError
14762
- }), make6("ReportPipeline", {
14797
+ }), make5("ReportPipeline", {
14763
14798
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4, verification: String4 },
14764
14799
  success: Struct({ head: String4, status: Literals(["success", "failed"]) }),
14765
14800
  error: RunnerRpcError
14766
- }), make6("ReviewThreads", {
14801
+ }), make5("ReviewThreads", {
14767
14802
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14768
14803
  success: Struct({
14769
14804
  threads: ArraySchema(Struct({
@@ -14775,7 +14810,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14775
14810
  }))
14776
14811
  }),
14777
14812
  error: RunnerRpcError
14778
- }), make6("OpenChangeRequests", {
14813
+ }), make5("OpenChangeRequests", {
14779
14814
  payload: { lease: ProgramLease, step: String4, authors: NonEmptyArray(String4) },
14780
14815
  success: Struct({
14781
14816
  changeRequests: ArraySchema(Struct({
@@ -14789,7 +14824,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14789
14824
  }))
14790
14825
  }),
14791
14826
  error: RunnerRpcError
14792
- }), make6("OwnChangeRequests", {
14827
+ }), make5("OwnChangeRequests", {
14793
14828
  payload: { lease: ProgramLease, step: String4 },
14794
14829
  success: Struct({
14795
14830
  changeRequests: ArraySchema(Struct({
@@ -14802,7 +14837,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14802
14837
  }))
14803
14838
  }),
14804
14839
  error: RunnerRpcError
14805
- }), make6("Propose", {
14840
+ }), make5("Propose", {
14806
14841
  payload: {
14807
14842
  lease: ProgramLease,
14808
14843
  step: String4,
@@ -14831,7 +14866,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14831
14866
  task: optionalKey(Struct({ id: String4, active: Boolean2 }))
14832
14867
  }),
14833
14868
  error: RunnerRpcError
14834
- }), make6("ReadProject", {
14869
+ }), make5("ReadProject", {
14835
14870
  payload: { lease: ProgramLease, step: String4, projectId: String4 },
14836
14871
  success: Struct({
14837
14872
  project: Struct({ id: String4, name: String4 }),
@@ -14854,7 +14889,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14854
14889
  taskChanges: ArraySchema(Struct({ taskKey: String4, title: String4, change: String4, at: String4 }))
14855
14890
  }),
14856
14891
  error: RunnerRpcError
14857
- }), make6("DraftUpdate", {
14892
+ }), make5("DraftUpdate", {
14858
14893
  payload: {
14859
14894
  lease: ProgramLease,
14860
14895
  step: String4,
@@ -14869,7 +14904,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14869
14904
  },
14870
14905
  success: Struct({ id: String4 }),
14871
14906
  error: RunnerRpcError
14872
- }), make6("CreatePlanTasks", {
14907
+ }), make5("CreatePlanTasks", {
14873
14908
  payload: {
14874
14909
  lease: ProgramLease,
14875
14910
  projectId: optionalKey(String4),
@@ -14890,15 +14925,15 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14890
14925
  },
14891
14926
  success: ArraySchema(Struct({ key: String4, taskId: String4 })),
14892
14927
  error: RunnerRpcError
14893
- }), make6("IntegrationBranch", {
14928
+ }), make5("IntegrationBranch", {
14894
14929
  payload: { lease: ProgramLease, repoBindingId: optionalKey(String4) },
14895
14930
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14896
14931
  error: RunnerRpcError
14897
- }), make6("DeliveryBase", {
14932
+ }), make5("DeliveryBase", {
14898
14933
  payload: { lease: ProgramLease },
14899
14934
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14900
14935
  error: RunnerRpcError
14901
- }), make6("MergeChangeRequest", {
14936
+ }), make5("MergeChangeRequest", {
14902
14937
  payload: {
14903
14938
  lease: ProgramLease,
14904
14939
  step: String4,
@@ -14916,7 +14951,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14916
14951
  Struct({ status: Literal("moved"), head: String4 })
14917
14952
  ]),
14918
14953
  error: RunnerRpcError
14919
- }), make6("ApproveChangeRequest", {
14954
+ }), make5("ApproveChangeRequest", {
14920
14955
  payload: {
14921
14956
  lease: ProgramLease,
14922
14957
  step: String4,
@@ -14932,7 +14967,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14932
14967
  Struct({ approved: Literal(false), reason: String4 })
14933
14968
  ]),
14934
14969
  error: RunnerRpcError
14935
- }), make6("CloseChangeRequest", {
14970
+ }), make5("CloseChangeRequest", {
14936
14971
  payload: {
14937
14972
  lease: ProgramLease,
14938
14973
  step: String4,
@@ -14942,7 +14977,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14942
14977
  },
14943
14978
  success: Struct({ closed: Boolean2, head: optionalKey(String4) }),
14944
14979
  error: RunnerRpcError
14945
- }), make6("RerunPipeline", {
14980
+ }), make5("RerunPipeline", {
14946
14981
  payload: {
14947
14982
  lease: ProgramLease,
14948
14983
  step: String4,
@@ -14952,7 +14987,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14952
14987
  },
14953
14988
  success: Struct({ head: String4, pipelines: Int }),
14954
14989
  error: RunnerRpcError
14955
- }), make6("PublishRelease", {
14990
+ }), make5("PublishRelease", {
14956
14991
  payload: {
14957
14992
  lease: ProgramLease,
14958
14993
  step: String4,
@@ -14964,14 +14999,14 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14964
14999
  },
14965
15000
  success: Struct({ tag: String4, revision: String4, url: String4 }),
14966
15001
  error: RunnerRpcError
14967
- }), make6("ProgramSecrets", {
15002
+ }), make5("ProgramSecrets", {
14968
15003
  payload: { lease: ProgramLease },
14969
15004
  success: Record(String4, String4),
14970
15005
  error: RunnerRpcError
14971
15006
  })).middleware(RunnerAuthentication) {
14972
15007
  }
14973
15008
 
14974
- class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
15009
+ class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
14975
15010
  payload: {
14976
15011
  lease: ProgramLease,
14977
15012
  step: String4,
@@ -14983,11 +15018,11 @@ class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
14983
15018
  },
14984
15019
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14985
15020
  error: Union([RunnerRpcError, RunFileRefused])
14986
- }), make6("RunFileParts", {
15021
+ }), make5("RunFileParts", {
14987
15022
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14988
15023
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14989
15024
  error: RunnerRpcError
14990
- }), make6("CompleteRunFile", {
15025
+ }), make5("CompleteRunFile", {
14991
15026
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14992
15027
  success: RunFileRecord,
14993
15028
  error: RunnerRpcError
@@ -15076,7 +15111,7 @@ function toStoredSession(token, existingRefreshToken) {
15076
15111
  }
15077
15112
  function startLoopbackServer(input) {
15078
15113
  return gen(function* () {
15079
- const code = yield* make16();
15114
+ const code = yield* make15();
15080
15115
  const context2 = yield* context();
15081
15116
  const runSyncExit = runSyncExitWith(context2);
15082
15117
  const server = yield* acquireRelease(sync2(() => Bun.serve({
@@ -15624,7 +15659,7 @@ var openConnection = (transport) => gen(function* () {
15624
15659
  let lastId = 0;
15625
15660
  let lost = false;
15626
15661
  const notifications = yield* unbounded2();
15627
- const ended = yield* make16();
15662
+ const ended = yield* make15();
15628
15663
  const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
15629
15664
  onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
15630
15665
  onNone: () => void_3,
@@ -15651,7 +15686,7 @@ var openConnection = (transport) => gen(function* () {
15651
15686
  if (lost)
15652
15687
  return yield* new HerdrCoreConnectionLost2({ method });
15653
15688
  const id = ++lastId;
15654
- const deferred = yield* make16();
15689
+ const deferred = yield* make15();
15655
15690
  pending.set(id, { method, deferred });
15656
15691
  yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
15657
15692
  return yield* _await(deferred);
@@ -15725,14 +15760,14 @@ var herdrCoreOver = (transport) => ({
15725
15760
  return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
15726
15761
  };
15727
15762
  const snapshot = { type: "snapshot", terminals: subscribed.terminals };
15728
- return concat(make11(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15763
+ return concat(make10(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15729
15764
  }))
15730
15765
  });
15731
15766
  var spawnedTransport = (env) => gen(function* () {
15732
15767
  const spawner = yield* ChildProcessSpawner;
15733
15768
  const input = yield* unbounded2();
15734
15769
  const encoder = new TextEncoder;
15735
- const handle = yield* spawner.spawn(make3("herdr-core", ["connect"], {
15770
+ const handle = yield* spawner.spawn(make2("herdr-core", ["connect"], {
15736
15771
  extendEnv: false,
15737
15772
  env,
15738
15773
  stdin: fromQueue(input),
@@ -15763,7 +15798,7 @@ var updateHerdrCore2 = (options) => gen(function* () {
15763
15798
  const spawner = yield* ChildProcessSpawner;
15764
15799
  const env = coreEnv(options);
15765
15800
  const run = (args) => gen(function* () {
15766
- const handle = yield* spawner.spawn(make3("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15801
+ const handle = yield* spawner.spawn(make2("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15767
15802
  const [stdout, stderr, exitCode] = yield* all3([
15768
15803
  mkString(decodeText(handle.stdout)),
15769
15804
  mkString(decodeText(handle.stderr)),
@@ -15789,7 +15824,7 @@ class CommandFailed2 extends TaggedError("CommandFailed") {
15789
15824
  }
15790
15825
  var runCommand2 = (command, args, options = {}) => gen(function* () {
15791
15826
  const spawner = yield* ChildProcessSpawner;
15792
- const handle = yield* spawner.spawn(make3(command, args, {
15827
+ const handle = yield* spawner.spawn(make2(command, args, {
15793
15828
  stdin: "ignore",
15794
15829
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15795
15830
  ...options.env === undefined ? undefined : { extendEnv: true, env: options.env }
@@ -15815,8 +15850,8 @@ var shellOutputTailChars2 = 64 * 1024;
15815
15850
  var runProcess2 = (argv, options) => gen(function* () {
15816
15851
  const spawner = yield* ChildProcessSpawner;
15817
15852
  const [command, ...args] = argv;
15818
- const handle = yield* spawner.spawn(make3(command, args, {
15819
- stdin: options.stdin === undefined ? "ignore" : make11(new TextEncoder().encode(options.stdin)),
15853
+ const handle = yield* spawner.spawn(make2(command, args, {
15854
+ stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
15820
15855
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15821
15856
  env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
15822
15857
  }));
@@ -16248,4 +16283,4 @@ function checkServices(declaration) {
16248
16283
  return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16249
16284
  }
16250
16285
 
16251
- export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, failedTestOfLine, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make5, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make6, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make7, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };
16286
+ export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, tokenCountWords, reportedModelName, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, failedTestOfLine, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make4, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, stepFallbackWords, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };