@kitman-sh/cli 0.13.17 → 0.13.19

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-80f0p6s7.js → chunk-0n46rkk9.js} +307 -276
  2. package/dist/{chunk-g7ysb6ca.js → chunk-12afnp8q.js} +18 -18
  3. package/dist/{chunk-8nzsyz74.js → chunk-2bds7yc8.js} +1 -1
  4. package/dist/{chunk-b5edh1jq.js → chunk-40ee20qs.js} +28 -28
  5. package/dist/{chunk-efyrm6bv.js → chunk-4yg6da62.js} +1 -1
  6. package/dist/{chunk-67xn3yer.js → chunk-590h6emd.js} +7 -7
  7. package/dist/{chunk-pbmadbfm.js → chunk-5f80t96q.js} +11 -5
  8. package/dist/{chunk-cbf0q15q.js → chunk-82w8rmkc.js} +60 -14
  9. package/dist/{chunk-0vv8cbye.js → chunk-9964wmp9.js} +21 -21
  10. package/dist/{chunk-q4ra17vf.js → chunk-9krvh1na.js} +3 -3
  11. package/dist/{chunk-4yca7e7x.js → chunk-d917m1ak.js} +198 -59
  12. package/dist/{chunk-1cr225aq.js → chunk-f86q3a6s.js} +5 -5
  13. package/dist/{chunk-ahvpwkyk.js → chunk-fc2bhh5v.js} +2 -2
  14. package/dist/{chunk-24h0y27w.js → chunk-gq7y5v3e.js} +1 -1
  15. package/dist/{chunk-mmd7mjv0.js → chunk-gy9rf14f.js} +3 -3
  16. package/dist/{chunk-x20t7xy8.js → chunk-nf9gdnsf.js} +17 -17
  17. package/dist/{chunk-pxvd8w2v.js → chunk-q5w3v4k1.js} +1 -1
  18. package/dist/{chunk-gasqek3p.js → chunk-s4pejxc8.js} +6 -6
  19. package/dist/{chunk-zcpnmgwb.js → chunk-xjmfnqh9.js} +7 -7
  20. package/dist/{chunk-syhs23yk.js → chunk-xt6db7sf.js} +7 -7
  21. package/dist/{chunk-ggmwpwhf.js → chunk-y1krmnbv.js} +2 -2
  22. package/dist/{chunk-pvsg1ppc.js → chunk-yh7twvn9.js} +4 -4
  23. package/dist/{chunk-pjq9bf3w.js → chunk-ysz1v2cq.js} +4 -4
  24. package/dist/{chunk-643pxp2k.js → chunk-zfqn6dc1.js} +4 -4
  25. package/dist/{chunk-zgraq2y3.js → chunk-zw3gf6r5.js} +28 -70
  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
- make13,
41
+ make14,
42
42
  strictEqual,
43
43
  Tuple,
44
44
  Number2,
@@ -58,7 +58,7 @@ import {
58
58
  Service2,
59
59
  makeUnsafe4,
60
60
  empty3,
61
- make14,
61
+ make15,
62
62
  add,
63
63
  getOrUndefined2,
64
64
  getOrUndefinedUnsafe,
@@ -91,7 +91,7 @@ import {
91
91
  fail4,
92
92
  isSuccess2,
93
93
  makeUnsafe5,
94
- make15,
94
+ make16,
95
95
  _await,
96
96
  fail5,
97
97
  isDone,
@@ -194,9 +194,6 @@ import {
194
194
  logError,
195
195
  effectify,
196
196
  decode,
197
- isRedacted,
198
- make16,
199
- value,
200
197
  defaultParseOptions,
201
198
  omit,
202
199
  map9,
@@ -265,7 +262,7 @@ import {
265
262
  decodeJsonStringOption,
266
263
  encodeJsonStringSync,
267
264
  encodePrettyJsonString
268
- } from "./chunk-zgraq2y3.js";
265
+ } from "./chunk-zw3gf6r5.js";
269
266
  import {
270
267
  map,
271
268
  makeEquivalence,
@@ -274,8 +271,8 @@ import {
274
271
  systemError,
275
272
  badArgument,
276
273
  makeUnsafe2,
277
- make7,
278
274
  make8,
275
+ make9,
279
276
  sliding,
280
277
  unbounded2,
281
278
  offer,
@@ -291,13 +288,13 @@ import {
291
288
  isSink,
292
289
  fromChannel,
293
290
  drain,
294
- make9,
291
+ make10,
295
292
  get3,
296
293
  isStream,
297
294
  fromChannel2,
298
295
  callback,
299
296
  empty2,
300
- make10,
297
+ make11,
301
298
  suspend,
302
299
  fail2,
303
300
  fromQueue,
@@ -323,16 +320,16 @@ import {
323
320
  mkArrayBuffer,
324
321
  toReadableStreamEffect,
325
322
  FileSystem,
326
- make11,
323
+ make12,
327
324
  FileTypeId,
328
325
  WatchBackend,
329
326
  Path,
330
- make12,
327
+ make13,
331
328
  option,
332
329
  String2,
333
330
  optionalEnv,
334
331
  harnessesUnsupportedInSrt2
335
- } from "./chunk-x20t7xy8.js";
332
+ } from "./chunk-nf9gdnsf.js";
336
333
  import {
337
334
  isDateTime,
338
335
  Numeric,
@@ -345,19 +342,21 @@ import {
345
342
  SecretScope,
346
343
  SecretHosts,
347
344
  isSecretReference
348
- } from "./chunk-pxvd8w2v.js";
345
+ } from "./chunk-q5w3v4k1.js";
349
346
  import {
347
+ isRedacted,
348
+ make,
349
+ value,
350
350
  ExitCode,
351
351
  ProcessId,
352
352
  makeHandle,
353
- make,
353
+ make2,
354
354
  ChildProcessSpawner,
355
355
  display,
356
- make2,
356
+ make3,
357
357
  parseFdName,
358
358
  fdName
359
- } from "./chunk-cbf0q15q.js";
360
-
359
+ } from "./chunk-82w8rmkc.js";
361
360
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
362
361
  var makeEquivalence3 = Tuple;
363
362
 
@@ -519,7 +518,7 @@ var makeUnsafe6 = (input) => {
519
518
  var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
520
519
  var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
521
520
  var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
522
- var make3 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
521
+ var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
523
522
  var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
524
523
  var nowUnsafe = () => makeUtc(Date.now());
525
524
  var toDateUtc = (self) => new Date(self.epochMilliseconds);
@@ -909,7 +908,7 @@ var toNumber = (b) => {
909
908
 
910
909
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
911
910
  var makeUnsafe = makeUnsafe6;
912
- var make18 = make3;
911
+ var make18 = make4;
913
912
  var now2 = now;
914
913
  var nowUnsafe2 = nowUnsafe;
915
914
  var toDateUtc2 = toDateUtc;
@@ -1124,7 +1123,7 @@ var readableToPullUnsafe = (options) => {
1124
1123
  const readable = options.readable;
1125
1124
  const chunkSize = options.chunkSize ?? 4096;
1126
1125
  const closeOnDone = options.closeOnDone ?? true;
1127
- const exit = options.exit ?? make7(undefined);
1126
+ const exit = options.exit ?? make8(undefined);
1128
1127
  const latch = options.latch ?? makeUnsafe2(false);
1129
1128
  function onReadable() {
1130
1129
  latch.openUnsafe();
@@ -1688,7 +1687,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1688
1687
  const sourceStream = unwrap(succeed6(getSourceStream(handles[handles.length - 1], options.from)));
1689
1688
  const toOption = options.to ?? "stdin";
1690
1689
  if (toOption === "stdin") {
1691
- handles.push(yield* spawnCommand(make2(command.command, command.args, {
1690
+ handles.push(yield* spawnCommand(make3(command.command, command.args, {
1692
1691
  ...command.options,
1693
1692
  stdin: {
1694
1693
  ...stdinConfig,
@@ -1708,7 +1707,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1708
1707
  type: "input",
1709
1708
  stream: sourceStream
1710
1709
  };
1711
- handles.push(yield* spawnCommand(make2(command.command, command.args, {
1710
+ handles.push(yield* spawnCommand(make3(command.command, command.args, {
1712
1711
  ...command.options,
1713
1712
  additionalFds: {
1714
1713
  ...existingFds,
@@ -1716,7 +1715,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1716
1715
  }
1717
1716
  })));
1718
1717
  } else {
1719
- handles.push(yield* spawnCommand(make2(command.command, command.args, {
1718
+ handles.push(yield* spawnCommand(make3(command.command, command.args, {
1720
1719
  ...command.options,
1721
1720
  stdin: {
1722
1721
  ...stdinConfig,
@@ -1755,7 +1754,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
1755
1754
  }
1756
1755
  }
1757
1756
  });
1758
- return make(spawnCommand);
1757
+ return make2(spawnCommand);
1759
1758
  });
1760
1759
  var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make19);
1761
1760
  var flattenCommand = (command) => {
@@ -2241,7 +2240,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
2241
2240
  resume(fail7(handleBadArgument("writeFile")(err)));
2242
2241
  }
2243
2242
  });
2244
- var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
2243
+ var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make12({
2245
2244
  access: access2,
2246
2245
  chmod: chmod2,
2247
2246
  chown: chown2,
@@ -2301,15 +2300,15 @@ var fileUrlOps = (windows) => ({
2301
2300
  })
2302
2301
  })
2303
2302
  });
2304
- var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2303
+ var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2305
2304
  ...NodePath.posix,
2306
2305
  .../* @__PURE__ */ fileUrlOps(false)
2307
2306
  }));
2308
- var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2307
+ var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2309
2308
  ...NodePath.win32,
2310
2309
  .../* @__PURE__ */ fileUrlOps(true)
2311
2310
  }));
2312
- var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
2311
+ var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
2313
2312
  ...NodePath,
2314
2313
  .../* @__PURE__ */ fileUrlOps(undefined)
2315
2314
  }));
@@ -2831,12 +2830,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
2831
2830
  if (typeof key === "string") {
2832
2831
  const k = key.toLowerCase();
2833
2832
  if (k in self) {
2834
- out[k] = make16(self[k]);
2833
+ out[k] = make(self[k]);
2835
2834
  }
2836
2835
  } else {
2837
2836
  for (const name in self) {
2838
2837
  if (name.search(key) !== -1) {
2839
- out[name] = make16(self[name]);
2838
+ out[name] = make(self[name]);
2840
2839
  }
2841
2840
  }
2842
2841
  }
@@ -2943,7 +2942,7 @@ var fromInputNested = (input) => {
2943
2942
  return out;
2944
2943
  };
2945
2944
  var coerce = (value) => isRedacted(value) ? value : String(value);
2946
- var Equivalence3 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
2945
+ var Equivalence3 = /* @__PURE__ */ make14((a, b) => arrayEquivalence(a.params, b.params));
2947
2946
  var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
2948
2947
  var empty4 = /* @__PURE__ */ make23([]);
2949
2948
  var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
@@ -2962,7 +2961,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
2962
2961
  var toString = (input) => new URLSearchParams(fromInput2(input).params.map(([key, value]) => [key, unwrap3(value)])).toString();
2963
2962
  var redact3 = /* @__PURE__ */ dual(2, (self, key) => {
2964
2963
  const patterns = Array.isArray(key) ? key : [key];
2965
- return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make16(value) : value]);
2964
+ return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make(value) : value]);
2966
2965
  });
2967
2966
  var isRedactedName2 = isRedactedName;
2968
2967
  var redactUrl = (url, redactedNames = currentRedactedNames()) => {
@@ -3038,7 +3037,7 @@ import * as readline from "readline";
3038
3037
  var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
3039
3038
  const stdin = process.stdin;
3040
3039
  const stdout = process.stdout;
3041
- const lines = yield* make8();
3040
+ const lines = yield* make9();
3042
3041
  let inputEnded = stdin.readableEnded;
3043
3042
  let readlineActive = false;
3044
3043
  const onStdinEnd = () => {
@@ -3049,7 +3048,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3049
3048
  };
3050
3049
  stdin.once("end", onStdinEnd);
3051
3050
  yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
3052
- const rlRef = yield* make9({
3051
+ const rlRef = yield* make10({
3053
3052
  acquire: acquireRelease(sync2(() => {
3054
3053
  const rl = readline.createInterface({
3055
3054
  input: stdin,
@@ -3088,7 +3087,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3088
3087
  if (stdin.isTTY)
3089
3088
  stdin.setRawMode(enabled);
3090
3089
  });
3091
- const rawModeRef = yield* make9({
3090
+ const rawModeRef = yield* make10({
3092
3091
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
3093
3092
  idleTimeToLive: "10 millis"
3094
3093
  });
@@ -3109,7 +3108,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
3109
3108
  return queue;
3110
3109
  });
3111
3110
  const readInput = gen(function* () {
3112
- const queue = yield* make8();
3111
+ const queue = yield* make9();
3113
3112
  const handleKeypress = (s, k) => {
3114
3113
  const userInput = {
3115
3114
  input: fromUndefinedOr(s),
@@ -5638,6 +5637,188 @@ var TokenTotalCount = String4.check(isPattern(/^(?:0|[1-9][0-9]*)$/));
5638
5637
  var TokenTotal = Struct({ input: TokenTotalCount, output: TokenTotalCount, cached: TokenTotalCount });
5639
5638
  var tokenCountWords = (count) => BigInt(count).toLocaleString("en-US");
5640
5639
 
5640
+ // packages/core/src/test-report.ts
5641
+ var isTestReportName = (name) => /junit.*\.xml$/iu.test(name);
5642
+ var maxSkippedTests = 1e4;
5643
+ var maxRanDigests = 1e5;
5644
+ var TestId = String4.check(isMinLength(1), isMaxLength(1000));
5645
+ var maxFailedTests = 50;
5646
+ var maxFailedTestLength = 300;
5647
+ var FailedTests = ArraySchema(String4.check(isMinLength(1), isMaxLength(maxFailedTestLength))).check(isMaxLength(maxFailedTests));
5648
+ var EnvironmentFailure = Struct({
5649
+ failedTests: optionalKey(FailedTests),
5650
+ exitCode: optionalKey(Int),
5651
+ outputTail: optionalKey(String4.check(isMaxLength(8000))),
5652
+ retryFailedTests: optionalKey(FailedTests)
5653
+ });
5654
+ var CheckTests = Struct({
5655
+ reports: Int.check(isGreaterThanOrEqualTo(0)),
5656
+ passed: Int.check(isGreaterThanOrEqualTo(0)),
5657
+ failed: Int.check(isGreaterThanOrEqualTo(0)),
5658
+ skipped: Int.check(isGreaterThanOrEqualTo(0)),
5659
+ skippedTests: ArraySchema(TestId).check(isMaxLength(maxSkippedTests)),
5660
+ ranDigests: ArraySchema(String4.check(isMaxLength(16))).check(isMaxLength(maxRanDigests)),
5661
+ failedTests: optionalKey(FailedTests),
5662
+ environmentFailure: optionalKey(EnvironmentFailure),
5663
+ environmentJudged: optionalKey(Boolean2)
5664
+ });
5665
+ var entities = new Map([
5666
+ ["amp", "&"],
5667
+ ["lt", "<"],
5668
+ ["gt", ">"],
5669
+ ["quot", '"'],
5670
+ ["apos", "'"]
5671
+ ]);
5672
+ var codePoint = (whole, value) => value <= 1114111 ? String.fromCodePoint(value) : whole;
5673
+ var decoded = (text) => text.replaceAll(/&(#x[\da-f]+|#\d+|\w+);/giu, (whole, entity) => {
5674
+ if (entity.startsWith("#x") || entity.startsWith("#X"))
5675
+ return codePoint(whole, Number.parseInt(entity.slice(2), 16));
5676
+ if (entity.startsWith("#"))
5677
+ return codePoint(whole, Number(entity.slice(1)));
5678
+ return entities.get(entity) ?? whole;
5679
+ });
5680
+ var attribute = (attributes, name) => {
5681
+ const found = new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "u").exec(attributes);
5682
+ return found === null ? undefined : decoded(found[1] ?? found[2] ?? "");
5683
+ };
5684
+ var junitTestCases = (xml) => [...xml.matchAll(/<testcase\b([^>]*?)(?:\/>|>([\s\S]*?)<\/testcase>)/gu)].map(([, attributes = "", body = ""]) => {
5685
+ const id = [attribute(attributes, "file"), attribute(attributes, "classname"), attribute(attributes, "name")].filter((part) => part !== undefined && part !== "").join(" > ");
5686
+ return {
5687
+ id: id.slice(0, 1000) || "(unnamed test)",
5688
+ status: /<(?:failure|error)\b/u.test(body) ? "failed" : /<skipped\b/u.test(body) ? "skipped" : "passed"
5689
+ };
5690
+ });
5691
+ var fnv1a = (text, seed) => {
5692
+ let hash = seed;
5693
+ for (let index = 0;index < text.length; index++) {
5694
+ hash ^= text.charCodeAt(index);
5695
+ hash = Math.imul(hash, 16777619) >>> 0;
5696
+ }
5697
+ return hash.toString(16).padStart(8, "0");
5698
+ };
5699
+ var testDigest = (id) => `${fnv1a(id, 2166136261)}${fnv1a(id, 84696351)}`;
5700
+ var scriptPrefix = /^(?:[^|]{1,300} \| |\S+ [\w:.-]+: )/u;
5701
+ var failedTestLines = [
5702
+ /^\(fail\) (.+?)(?: \[[\d.]+ ?m?s\])?$/su,
5703
+ /^\u25CF (?=.+? \u203A .)(.+)$/su,
5704
+ /^FAILED (\S+?::(?:[^[]+?(?:\[.*?\])?|.+?))(?: - .*)?$/su,
5705
+ /^--- FAIL: (\S+)/u,
5706
+ /^test (.+) \.\.\. FAILED$/su,
5707
+ /^not ok \d+ (?:- )?(?!.*# (?:TODO|SKIP)\b)(.+)$/isu
5708
+ ];
5709
+ var failedFileStart = String.raw`FAIL +(?:\|[^|]+\| *)?(?! )(?!\S*:\/\/)`;
5710
+ var afterPath = String.raw` > | \[ `;
5711
+ var failedFilePaths = [
5712
+ String.raw`\S*\.[A-Za-z]\w*(?=[\s:]|$)`,
5713
+ String.raw`(?=\S*[A-Za-z])(?=\S*\/)\S+(?=${afterPath}|$)`,
5714
+ String.raw`(?:(?!${afterPath}).)*\.[A-Za-z]\w*(?=${afterPath})`,
5715
+ String.raw`(?=\S*\/)(?:(?!${afterPath}).)*\.[A-Za-z]\w*$`,
5716
+ String.raw`(?=.*(?:\.(?:test|spec)\.|\b__tests__\/))(?:(?!${afterPath}).)*\.[cm]?[jt]sx?$`
5717
+ ];
5718
+ var failedFileLine = new RegExp(`^${failedFileStart}((?:${failedFilePaths.join("|")}).*)$`, "su");
5719
+ var jestFileStats = /^((?:(?! > ).)*) \((?:[\d.]+ m?s(?:, \d+ MB heap size)?|\d+ MB heap size)\)$/su;
5720
+ var isPathOf = (file, path) => `/${file}`.endsWith(`/${path.replace(/^(?:\.\.\/)+/u, "")}`);
5721
+ var withoutRepeatedPath = (name) => (name.endsWith(" ]") ? [...name.matchAll(/ \[ /gu)] : []).map(({ index }) => name.slice(0, index)).find((path) => isPathOf(name.slice(path.length + 3, -2), path)) ?? name;
5722
+ var paddedLabels = /^FAIL {2}(?:\|[^|]+\| )?(?: \S+(?: \S+)* {2})+/u;
5723
+ var failedFileTest = (text) => {
5724
+ const name = failedFileLine.exec(text.replace(paddedLabels, "FAIL ").replace(jestFileStats, "$1"))?.[1];
5725
+ return name === undefined ? undefined : withoutRepeatedPath(name);
5726
+ };
5727
+ var maxLineLength = 1000;
5728
+ var ansiColours = /\u001B\[[\d;]*m/gu;
5729
+ var failedTestOfLine = (line) => {
5730
+ const printed = line.slice(0, maxLineLength).replaceAll(ansiColours, "");
5731
+ const unprefixed = printed.replace(scriptPrefix, "");
5732
+ return [printed, unprefixed, unprefixed.replace(scriptPrefix, "")].map((text) => text.trim()).flatMap((text) => [failedFileTest(text), ...failedTestLines.map((pattern) => pattern.exec(text)?.[1]?.trim())]).find((name) => name !== undefined && name !== "");
5733
+ };
5734
+ var namedTest = (name) => {
5735
+ const at = name.indexOf(" > ");
5736
+ return at === -1 ? { name, file: name, path: "" } : { name, file: name.slice(0, at), path: name.slice(at + 3) };
5737
+ };
5738
+ var reportedTest = (name) => {
5739
+ const test = namedTest(name);
5740
+ return test.path !== "" && isPathOf(test.file, test.path) ? namedTest(test.file) : test;
5741
+ };
5742
+ var byPath = (tests) => {
5743
+ const grouped = new Map;
5744
+ for (const test of tests) {
5745
+ const found = grouped.get(test.path);
5746
+ if (found === undefined)
5747
+ grouped.set(test.path, [test]);
5748
+ else
5749
+ found.push(test);
5750
+ }
5751
+ return grouped;
5752
+ };
5753
+ var holds = (tests, test) => (tests.get(test.path) ?? []).some(({ file }) => isPathOf(file, test.file) || isPathOf(test.file, file));
5754
+ var attempt = String.raw`(?:\d+ times in )?(?:initial run|\d+[a-z]{2} (?:retry(?: of \d+[a-z]{2} repeat)?|repeat))`;
5755
+ var vitestAttempts = new RegExp(String.raw` \(${attempt}(?:, ${attempt})*\)$`, "u");
5756
+ var vitestTimes = / \(\d+ times\)$/u;
5757
+ var printedTest = (reports) => (name) => {
5758
+ const whole = namedTest(name);
5759
+ const attempted = /[./]/u.test(whole.file) ? namedTest(name.replace(vitestAttempts, "")) : whole;
5760
+ return [whole, attempted, namedTest(name.replace(vitestTimes, ""))].find((test) => holds(reports, test)) ?? attempted;
5761
+ };
5762
+ var namesWithoutFile = ({ path }) => {
5763
+ const parts = path.split(" > ");
5764
+ return [path, [...parts.slice(0, -1).reverse(), ...parts.slice(-1)].join(" > ")];
5765
+ };
5766
+ var spaced = (name) => name.replaceAll(/ [>\u203A] /gu, " ");
5767
+ var reportedForms = ({ name, path }) => [name, path].map((text) => [text, namedTest(text)]).map(([text, test]) => test.file === test.path ? test.file : text).flatMap((text) => [spaced(text), text.replace(" > ", ".")]);
5768
+ var printedForm = (name) => {
5769
+ if (name.includes(" \u203A "))
5770
+ return spaced(name);
5771
+ const [, file, names, rest] = /^(\S+?)\.py::([^[]*)(.*)$/su.exec(name) ?? [];
5772
+ return file === undefined || names === undefined ? undefined : `${file.replaceAll("/", ".")}.${names.replaceAll("::", ".")}${rest ?? ""}`;
5773
+ };
5774
+ var unreportedPrints = (reported, printed) => {
5775
+ const reports = [...new Set(reported)].map(reportedTest);
5776
+ const reportsByPath = byPath(reports);
5777
+ const prints = [...new Set(printed)].map(printedTest(reportsByPath));
5778
+ const printsByPath = byPath(prints);
5779
+ const unprinted = reports.filter((test) => !holds(printsByPath, test));
5780
+ const namedWithoutFile = new Set(unprinted.flatMap(namesWithoutFile));
5781
+ const namedInForm = new Set(unprinted.flatMap(reportedForms));
5782
+ const unreported = prints.filter((test) => !holds(reportsByPath, test) && !namedWithoutFile.has(test.name) && !namedInForm.has(printedForm(test.name)));
5783
+ return { reports, unreported };
5784
+ };
5785
+ var printedNotReported = (reported, printed) => unreportedPrints(reported, printed).unreported.map((test) => test.name);
5786
+ var failedTestsOf = (reported, printed) => {
5787
+ const { reports, unreported } = unreportedPrints(reported, printed);
5788
+ const named = new Set;
5789
+ for (const { name } of [...reports, ...unreported]) {
5790
+ if (named.size === maxFailedTests)
5791
+ break;
5792
+ named.add(redactCredentials(name).slice(0, maxFailedTestLength));
5793
+ }
5794
+ return [...named];
5795
+ };
5796
+ var testOutcomes = (reports) => {
5797
+ const rank = { passed: 0, skipped: 1, failed: 2 };
5798
+ const tests = new Map;
5799
+ for (const found of reports.flatMap(junitTestCases)) {
5800
+ const before = tests.get(found.id);
5801
+ if (before === undefined || rank[found.status] > rank[before])
5802
+ tests.set(found.id, found.status);
5803
+ }
5804
+ return tests;
5805
+ };
5806
+ var checkTests = (reports, printed = []) => {
5807
+ const tests = testOutcomes(reports);
5808
+ const of = (status) => [...tests].flatMap(([id, is]) => is === status ? [id] : []);
5809
+ const skipped = of("skipped").sort();
5810
+ const failedTests = failedTestsOf(of("failed"), printed);
5811
+ return {
5812
+ reports: reports.length,
5813
+ passed: of("passed").length,
5814
+ failed: of("failed").length,
5815
+ skipped: skipped.length,
5816
+ skippedTests: skipped.slice(0, maxSkippedTests),
5817
+ ranDigests: [...of("passed"), ...of("failed")].map(testDigest).sort().slice(0, maxRanDigests),
5818
+ ...failedTests.length === 0 ? undefined : { failedTests }
5819
+ };
5820
+ };
5821
+
5641
5822
  // packages/core/src/loop.ts
5642
5823
  var LoopStatuses = ["draft", "active", "disabled", "archived"];
5643
5824
  var LoopStepImplementationKinds = [
@@ -6208,6 +6389,7 @@ var RunEvidence = Struct({
6208
6389
  failedTests: optionalKey(ArraySchema(String4)),
6209
6390
  skippedSinceBaseline: optionalKey(ArraySchema(String4)),
6210
6391
  newNotRun: optionalKey(ArraySchema(String4)),
6392
+ environmentFailure: optionalKey(EnvironmentFailure),
6211
6393
  recordedAt: Timestamp
6212
6394
  });
6213
6395
  var ApprovedVerification = Struct({
@@ -6777,170 +6959,6 @@ var RunActionSummary = Struct({
6777
6959
  var RunActionList = Struct({ items: ArraySchema(RunActionSummary) });
6778
6960
  var RunActionTaken = Struct({ action: String4, run: Run });
6779
6961
 
6780
- // packages/core/src/test-report.ts
6781
- var isTestReportName = (name) => /junit.*\.xml$/iu.test(name);
6782
- var maxSkippedTests = 1e4;
6783
- var maxRanDigests = 1e5;
6784
- var TestId = String4.check(isMinLength(1), isMaxLength(1000));
6785
- var maxFailedTests = 50;
6786
- var maxFailedTestLength = 300;
6787
- var CheckTests = Struct({
6788
- reports: Int.check(isGreaterThanOrEqualTo(0)),
6789
- passed: Int.check(isGreaterThanOrEqualTo(0)),
6790
- failed: Int.check(isGreaterThanOrEqualTo(0)),
6791
- skipped: Int.check(isGreaterThanOrEqualTo(0)),
6792
- skippedTests: ArraySchema(TestId).check(isMaxLength(maxSkippedTests)),
6793
- ranDigests: ArraySchema(String4.check(isMaxLength(16))).check(isMaxLength(maxRanDigests)),
6794
- failedTests: optionalKey(ArraySchema(String4.check(isMinLength(1), isMaxLength(maxFailedTestLength))).check(isMaxLength(maxFailedTests)))
6795
- });
6796
- var entities = new Map([
6797
- ["amp", "&"],
6798
- ["lt", "<"],
6799
- ["gt", ">"],
6800
- ["quot", '"'],
6801
- ["apos", "'"]
6802
- ]);
6803
- var codePoint = (whole, value) => value <= 1114111 ? String.fromCodePoint(value) : whole;
6804
- var decoded = (text) => text.replaceAll(/&(#x[\da-f]+|#\d+|\w+);/giu, (whole, entity) => {
6805
- if (entity.startsWith("#x") || entity.startsWith("#X"))
6806
- return codePoint(whole, Number.parseInt(entity.slice(2), 16));
6807
- if (entity.startsWith("#"))
6808
- return codePoint(whole, Number(entity.slice(1)));
6809
- return entities.get(entity) ?? whole;
6810
- });
6811
- var attribute = (attributes, name) => {
6812
- const found = new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "u").exec(attributes);
6813
- return found === null ? undefined : decoded(found[1] ?? found[2] ?? "");
6814
- };
6815
- var junitTestCases = (xml) => [...xml.matchAll(/<testcase\b([^>]*?)(?:\/>|>([\s\S]*?)<\/testcase>)/gu)].map(([, attributes = "", body = ""]) => {
6816
- const id = [attribute(attributes, "file"), attribute(attributes, "classname"), attribute(attributes, "name")].filter((part) => part !== undefined && part !== "").join(" > ");
6817
- return {
6818
- id: id.slice(0, 1000) || "(unnamed test)",
6819
- status: /<(?:failure|error)\b/u.test(body) ? "failed" : /<skipped\b/u.test(body) ? "skipped" : "passed"
6820
- };
6821
- });
6822
- var fnv1a = (text, seed) => {
6823
- let hash = seed;
6824
- for (let index = 0;index < text.length; index++) {
6825
- hash ^= text.charCodeAt(index);
6826
- hash = Math.imul(hash, 16777619) >>> 0;
6827
- }
6828
- return hash.toString(16).padStart(8, "0");
6829
- };
6830
- var testDigest = (id) => `${fnv1a(id, 2166136261)}${fnv1a(id, 84696351)}`;
6831
- var scriptPrefix = /^(?:[^|]{1,300} \| |\S+ [\w:.-]+: )/u;
6832
- var failedTestLines = [
6833
- /^\(fail\) (.+?)(?: \[[\d.]+ ?m?s\])?$/su,
6834
- /^\u25CF (?=.+? \u203A .)(.+)$/su,
6835
- /^FAILED (\S+?::(?:[^[]+?(?:\[.*?\])?|.+?))(?: - .*)?$/su,
6836
- /^--- FAIL: (\S+)/u,
6837
- /^test (.+) \.\.\. FAILED$/su,
6838
- /^not ok \d+ (?:- )?(?!.*# (?:TODO|SKIP)\b)(.+)$/isu
6839
- ];
6840
- var failedFileStart = String.raw`FAIL +(?:\|[^|]+\| *)?(?! )(?!\S*:\/\/)`;
6841
- var afterPath = String.raw` > | \[ `;
6842
- var failedFilePaths = [
6843
- String.raw`\S*\.[A-Za-z]\w*(?=[\s:]|$)`,
6844
- String.raw`(?=\S*[A-Za-z])(?=\S*\/)\S+(?=${afterPath}|$)`,
6845
- String.raw`(?:(?!${afterPath}).)*\.[A-Za-z]\w*(?=${afterPath})`,
6846
- String.raw`(?=\S*\/)(?:(?!${afterPath}).)*\.[A-Za-z]\w*$`,
6847
- String.raw`(?=.*(?:\.(?:test|spec)\.|\b__tests__\/))(?:(?!${afterPath}).)*\.[cm]?[jt]sx?$`
6848
- ];
6849
- var failedFileLine = new RegExp(`^${failedFileStart}((?:${failedFilePaths.join("|")}).*)$`, "su");
6850
- var jestFileStats = /^((?:(?! > ).)*) \((?:[\d.]+ m?s(?:, \d+ MB heap size)?|\d+ MB heap size)\)$/su;
6851
- var isPathOf = (file, path) => `/${file}`.endsWith(`/${path.replace(/^(?:\.\.\/)+/u, "")}`);
6852
- var withoutRepeatedPath = (name) => (name.endsWith(" ]") ? [...name.matchAll(/ \[ /gu)] : []).map(({ index }) => name.slice(0, index)).find((path) => isPathOf(name.slice(path.length + 3, -2), path)) ?? name;
6853
- var paddedLabels = /^FAIL {2}(?:\|[^|]+\| )?(?: \S+(?: \S+)* {2})+/u;
6854
- var failedFileTest = (text) => {
6855
- const name = failedFileLine.exec(text.replace(paddedLabels, "FAIL ").replace(jestFileStats, "$1"))?.[1];
6856
- return name === undefined ? undefined : withoutRepeatedPath(name);
6857
- };
6858
- var maxLineLength = 1000;
6859
- var ansiColours = /\u001B\[[\d;]*m/gu;
6860
- var failedTestOfLine = (line) => {
6861
- const printed = line.slice(0, maxLineLength).replaceAll(ansiColours, "");
6862
- const unprefixed = printed.replace(scriptPrefix, "");
6863
- return [printed, unprefixed, unprefixed.replace(scriptPrefix, "")].map((text) => text.trim()).flatMap((text) => [failedFileTest(text), ...failedTestLines.map((pattern) => pattern.exec(text)?.[1]?.trim())]).find((name) => name !== undefined && name !== "");
6864
- };
6865
- var namedTest = (name) => {
6866
- const at = name.indexOf(" > ");
6867
- return at === -1 ? { name, file: name, path: "" } : { name, file: name.slice(0, at), path: name.slice(at + 3) };
6868
- };
6869
- var reportedTest = (name) => {
6870
- const test = namedTest(name);
6871
- return test.path !== "" && isPathOf(test.file, test.path) ? namedTest(test.file) : test;
6872
- };
6873
- var byPath = (tests) => {
6874
- const grouped = new Map;
6875
- for (const test of tests) {
6876
- const found = grouped.get(test.path);
6877
- if (found === undefined)
6878
- grouped.set(test.path, [test]);
6879
- else
6880
- found.push(test);
6881
- }
6882
- return grouped;
6883
- };
6884
- var holds = (tests, test) => (tests.get(test.path) ?? []).some(({ file }) => isPathOf(file, test.file) || isPathOf(test.file, file));
6885
- var attempt = String.raw`(?:\d+ times in )?(?:initial run|\d+[a-z]{2} (?:retry(?: of \d+[a-z]{2} repeat)?|repeat))`;
6886
- var vitestAttempts = new RegExp(String.raw` \(${attempt}(?:, ${attempt})*\)$`, "u");
6887
- var vitestTimes = / \(\d+ times\)$/u;
6888
- var printedTest = (reports) => (name) => {
6889
- const whole = namedTest(name);
6890
- const attempted = /[./]/u.test(whole.file) ? namedTest(name.replace(vitestAttempts, "")) : whole;
6891
- return [whole, attempted, namedTest(name.replace(vitestTimes, ""))].find((test) => holds(reports, test)) ?? attempted;
6892
- };
6893
- var namesWithoutFile = ({ path }) => {
6894
- const parts = path.split(" > ");
6895
- return [path, [...parts.slice(0, -1).reverse(), ...parts.slice(-1)].join(" > ")];
6896
- };
6897
- var spaced = (name) => name.replaceAll(/ [>\u203A] /gu, " ");
6898
- var reportedForms = ({ name, path }) => [name, path].map((text) => [text, namedTest(text)]).map(([text, test]) => test.file === test.path ? test.file : text).flatMap((text) => [spaced(text), text.replace(" > ", ".")]);
6899
- var printedForm = (name) => {
6900
- if (name.includes(" \u203A "))
6901
- return spaced(name);
6902
- const [, file, names, rest] = /^(\S+?)\.py::([^[]*)(.*)$/su.exec(name) ?? [];
6903
- return file === undefined || names === undefined ? undefined : `${file.replaceAll("/", ".")}.${names.replaceAll("::", ".")}${rest ?? ""}`;
6904
- };
6905
- var failedTestsOf = (reported, printed) => {
6906
- const reports = [...new Set(reported)].map(reportedTest);
6907
- const reportsByPath = byPath(reports);
6908
- const prints = [...new Set(printed)].map(printedTest(reportsByPath));
6909
- const printsByPath = byPath(prints);
6910
- const unprinted = reports.filter((test) => !holds(printsByPath, test));
6911
- const namedWithoutFile = new Set(unprinted.flatMap(namesWithoutFile));
6912
- const namedInForm = new Set(unprinted.flatMap(reportedForms));
6913
- const unreported = prints.filter((test) => !holds(reportsByPath, test) && !namedWithoutFile.has(test.name) && !namedInForm.has(printedForm(test.name)));
6914
- const named = new Set;
6915
- for (const { name } of [...reports, ...unreported]) {
6916
- if (named.size === maxFailedTests)
6917
- break;
6918
- named.add(redactCredentials(name).slice(0, maxFailedTestLength));
6919
- }
6920
- return [...named];
6921
- };
6922
- var checkTests = (reports, printed = []) => {
6923
- const rank = { passed: 0, skipped: 1, failed: 2 };
6924
- const tests = new Map;
6925
- for (const found of reports.flatMap(junitTestCases)) {
6926
- const before = tests.get(found.id);
6927
- if (before === undefined || rank[found.status] > rank[before])
6928
- tests.set(found.id, found.status);
6929
- }
6930
- const of = (status) => [...tests].flatMap(([id, is]) => is === status ? [id] : []);
6931
- const skipped = of("skipped").sort();
6932
- const failedTests = failedTestsOf(of("failed"), printed);
6933
- return {
6934
- reports: reports.length,
6935
- passed: of("passed").length,
6936
- failed: of("failed").length,
6937
- skipped: skipped.length,
6938
- skippedTests: skipped.slice(0, maxSkippedTests),
6939
- ranDigests: [...of("passed"), ...of("failed")].map(testDigest).sort().slice(0, maxRanDigests),
6940
- ...failedTests.length === 0 ? undefined : { failedTests }
6941
- };
6942
- };
6943
-
6944
6962
  // packages/core/src/work-unit.ts
6945
6963
  var WorkUnitLease = Struct({
6946
6964
  leaseOwnerId: Id,
@@ -10104,14 +10122,14 @@ function makeWith(method, url, urlParams, hash, headers, body) {
10104
10122
  return self;
10105
10123
  }
10106
10124
  var empty6 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty, empty5);
10107
- var make4 = (method) => (url, options) => modify(empty6, {
10125
+ var make5 = (method) => (url, options) => modify(empty6, {
10108
10126
  method,
10109
10127
  url,
10110
10128
  ...options ?? undefined
10111
10129
  });
10112
- var get = /* @__PURE__ */ make4("GET");
10113
- var post = /* @__PURE__ */ make4("POST");
10114
- var put = /* @__PURE__ */ make4("PUT");
10130
+ var get = /* @__PURE__ */ make5("GET");
10131
+ var post = /* @__PURE__ */ make5("POST");
10132
+ var put = /* @__PURE__ */ make5("PUT");
10115
10133
  var modify = /* @__PURE__ */ dual(2, (self, options) => {
10116
10134
  let result = self;
10117
10135
  if (options.method) {
@@ -10412,7 +10430,7 @@ var Proto7 = {
10412
10430
  };
10413
10431
  },
10414
10432
  .../* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ allShort.map(([fullMethod, method]) => [method, function(url, options) {
10415
- return this.execute(make4(fullMethod)(url, options));
10433
+ return this.execute(make5(fullMethod)(url, options));
10416
10434
  }]))
10417
10435
  };
10418
10436
  var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFiber2((fiber) => {
@@ -14136,7 +14154,7 @@ var makeProto = (options) => {
14136
14154
  Rpc.key = `effect/rpc/Rpc/${options._tag}`;
14137
14155
  return Rpc;
14138
14156
  };
14139
- var make5 = (tag, options) => {
14157
+ var make6 = (tag, options) => {
14140
14158
  const successSchema = options?.success ?? Void;
14141
14159
  const errorSchema = options?.error ?? Never;
14142
14160
  const defectSchema = options?.defect ?? Defect();
@@ -14347,7 +14365,7 @@ var RpcGroupProto = {
14347
14365
  });
14348
14366
  },
14349
14367
  annotateRpcs(service, value) {
14350
- return this.annotateRpcsMerge(make14(service, value));
14368
+ return this.annotateRpcsMerge(make15(service, value));
14351
14369
  },
14352
14370
  annotateMerge(context) {
14353
14371
  return makeProto2({
@@ -14370,7 +14388,7 @@ var makeProto2 = (options) => Object.assign(function() {}, RpcGroupProto, {
14370
14388
  requests: options.requests,
14371
14389
  annotations: options.annotations
14372
14390
  });
14373
- var make6 = (...rpcs) => makeProto2({
14391
+ var make7 = (...rpcs) => makeProto2({
14374
14392
  requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
14375
14393
  annotations: empty3()
14376
14394
  });
@@ -14476,96 +14494,101 @@ var ProgramOutcome = Union([
14476
14494
  Struct({ status: Literal("failed"), failureSummary: String4 })
14477
14495
  ]);
14478
14496
 
14479
- class RunnerReplicaRpcs extends make6(make5("Claim", {
14497
+ class RunnerReplicaRpcs extends make7(make6("Claim", {
14480
14498
  payload: WorkUnitClaimInput,
14481
14499
  success: WorkUnitClaimResult,
14482
14500
  error: RunnerRpcError
14483
- }), make5("Heartbeat", {
14501
+ }), make6("Heartbeat", {
14484
14502
  payload: WorkUnitHeartbeatInput,
14485
14503
  success: WorkUnitHeartbeatResult,
14486
14504
  error: RunnerRpcError
14487
- }), make5("Complete", {
14505
+ }), make6("Complete", {
14488
14506
  payload: WorkUnitCompletion,
14489
14507
  error: RunnerRpcError
14490
- }), make5("Release", {
14508
+ }), make6("Release", {
14491
14509
  payload: WorkUnitReleaseInput,
14492
14510
  error: RunnerRpcError
14493
- }), make5("Signals", {
14511
+ }), make6("Signals", {
14494
14512
  payload: { runnerReplicaId: String4 },
14495
14513
  success: RunnerSignal,
14496
14514
  error: RunnerRpcError,
14497
14515
  stream: true
14498
- }), make5("ReportSteer", {
14516
+ }), make6("ReportSteer", {
14499
14517
  payload: { workUnitId: String4, messageId: String4, delivered: Boolean2 },
14500
14518
  success: Void,
14501
14519
  error: RunnerRpcError
14502
- }), make5("AppendTranscript", {
14520
+ }), make6("AppendTranscript", {
14503
14521
  payload: { workUnitId: String4, entries: ArraySchema(TranscriptAppendEntry).check(isMaxLength(100)) },
14504
14522
  success: Void,
14505
14523
  error: RunnerRpcError
14506
- }), make5("CreateCheckpointFile", {
14524
+ }), make6("CreateCheckpointFile", {
14507
14525
  payload: { lease: ProgramLease, byteSize: Int, sha256: String4 },
14508
14526
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
14509
14527
  error: Union([RunnerRpcError, RunFileRefused])
14510
- }), make5("CheckpointFileParts", {
14528
+ }), make6("CheckpointFileParts", {
14511
14529
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
14512
14530
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
14513
14531
  error: RunnerRpcError
14514
- }), make5("CompleteCheckpointFile", {
14532
+ }), make6("CompleteCheckpointFile", {
14515
14533
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
14516
14534
  success: RunFileRecord,
14517
14535
  error: RunnerRpcError
14518
- }), make5("SaveCheckpoint", {
14536
+ }), make6("SaveCheckpoint", {
14519
14537
  payload: { lease: ProgramLease, checkpoint: StepCheckpoint },
14520
14538
  success: Void,
14521
14539
  error: RunnerRpcError
14522
- }), make5("ResumeCheckpoint", {
14540
+ }), make6("ResumeCheckpoint", {
14523
14541
  payload: { lease: ProgramLease },
14524
14542
  success: UndefinedOr(ResumedCheckpoint),
14525
14543
  error: RunnerRpcError
14526
- }), make5("SettledCheckpoints", {
14544
+ }), make6("SettledCheckpoints", {
14527
14545
  success: ArraySchema(Struct({
14528
14546
  stepAttemptId: String4,
14529
14547
  ref: optionalKey(String4),
14530
14548
  repoBinding: optionalKey(WorkUnitRepoBinding)
14531
14549
  })),
14532
14550
  error: RunnerRpcError
14533
- }), make5("ForgetCheckpoints", {
14551
+ }), make6("ForgetCheckpoints", {
14534
14552
  payload: { stepAttemptIds: ArraySchema(String4) },
14535
14553
  success: Void,
14536
14554
  error: RunnerRpcError
14537
- }), make5("GitCredential", {
14555
+ }), make6("GitCredential", {
14538
14556
  payload: { repoBindingId: String4 },
14539
14557
  success: UndefinedOr(Struct({ username: String4, password: String4 })),
14540
14558
  error: RunnerRpcError
14541
- }), make5("Bundle", {
14559
+ }), make6("Bundle", {
14542
14560
  payload: { digest: String4 },
14543
14561
  success: Struct({ bundle: String4 }),
14544
14562
  error: RunnerRpcError
14545
- }), make5("SettledRuns", {
14563
+ }), make6("SettledRuns", {
14546
14564
  payload: { runIds: ArraySchema(String4) },
14547
14565
  success: ArraySchema(String4),
14548
14566
  error: RunnerRpcError
14549
- }), make5("KnownEvidence", {
14567
+ }), make6("KnownEvidence", {
14550
14568
  payload: { lease: ProgramLease, trees: ArraySchema(String4) },
14551
- success: ArraySchema(Struct({ tree: String4, name: String4, command: String4 })),
14569
+ success: ArraySchema(Struct({
14570
+ tree: String4,
14571
+ name: String4,
14572
+ command: String4,
14573
+ unjudgedFailure: optionalKey(Boolean2)
14574
+ })),
14552
14575
  error: RunnerRpcError
14553
14576
  })).middleware(RunnerAuthentication) {
14554
14577
  }
14555
14578
 
14556
- class RunnerJournalRpcs extends make6(make5("RecordActivity", {
14579
+ class RunnerJournalRpcs extends make7(make6("RecordActivity", {
14557
14580
  payload: { lease: ProgramLease, name: String4, attempt: Int, exit: Json },
14558
14581
  error: RunnerRpcError
14559
- }), make5("DeferredDone", {
14582
+ }), make6("DeferredDone", {
14560
14583
  payload: { lease: ProgramLease, name: String4, exit: Json },
14561
14584
  error: RunnerRpcError
14562
- }), make5("ScheduleClock", {
14585
+ }), make6("ScheduleClock", {
14563
14586
  payload: { lease: ProgramLease, name: String4, deferredName: String4, durationMillis: Int },
14564
14587
  error: RunnerRpcError
14565
- }), make5("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make5("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14588
+ }), make6("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make6("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
14566
14589
  }
14567
14590
 
14568
- class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14591
+ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14569
14592
  payload: {
14570
14593
  lease: ProgramLease,
14571
14594
  step: String4,
@@ -14585,7 +14608,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14585
14608
  },
14586
14609
  success: Struct({ questionId: String4 }),
14587
14610
  error: RunnerRpcError
14588
- }), make5("StartAgentStep", {
14611
+ }), make6("StartAgentStep", {
14589
14612
  payload: {
14590
14613
  lease: ProgramLease,
14591
14614
  step: String4,
@@ -14601,7 +14624,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14601
14624
  },
14602
14625
  success: Struct({ stepAttemptId: String4 }),
14603
14626
  error: RunnerRpcError
14604
- }), make5("StartVerification", {
14627
+ }), make6("StartVerification", {
14605
14628
  payload: {
14606
14629
  lease: ProgramLease,
14607
14630
  step: String4,
@@ -14622,7 +14645,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14622
14645
  },
14623
14646
  success: Struct({ verificationId: String4 }),
14624
14647
  error: RunnerRpcError
14625
- }), make5("AwaitEvent", {
14648
+ }), make6("AwaitEvent", {
14626
14649
  payload: {
14627
14650
  lease: ProgramLease,
14628
14651
  step: String4,
@@ -14638,7 +14661,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14638
14661
  })))
14639
14662
  },
14640
14663
  error: RunnerRpcError
14641
- }), make5("ClaimResource", {
14664
+ }), make6("ClaimResource", {
14642
14665
  payload: {
14643
14666
  lease: ProgramLease,
14644
14667
  step: String4,
@@ -14647,7 +14670,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14647
14670
  action: Literals(["claim", "take_over", "let_go"])
14648
14671
  },
14649
14672
  error: RunnerRpcError
14650
- }), make5("AdmitChild", {
14673
+ }), make6("AdmitChild", {
14651
14674
  payload: {
14652
14675
  lease: ProgramLease,
14653
14676
  step: String4,
@@ -14658,7 +14681,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14658
14681
  },
14659
14682
  success: Struct({ runId: String4 }),
14660
14683
  error: RunnerRpcError
14661
- }), make5("StoreArtifact", {
14684
+ }), make6("StoreArtifact", {
14662
14685
  payload: {
14663
14686
  lease: ProgramLease,
14664
14687
  step: String4,
@@ -14670,7 +14693,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14670
14693
  },
14671
14694
  success: Struct({ artifactId: String4 }),
14672
14695
  error: RunnerRpcError
14673
- }), make5("RecordNote", {
14696
+ }), make6("RecordNote", {
14674
14697
  payload: {
14675
14698
  lease: ProgramLease,
14676
14699
  step: String4,
@@ -14679,7 +14702,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14679
14702
  kind: optional(Literals(["note", "blocker"]))
14680
14703
  },
14681
14704
  error: RunnerRpcError
14682
- }), make5("PerformHostEffect", {
14705
+ }), make6("PerformHostEffect", {
14683
14706
  payload: {
14684
14707
  lease: ProgramLease,
14685
14708
  step: String4,
@@ -14708,7 +14731,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14708
14731
  },
14709
14732
  success: UndefinedOr(Struct({ id: String4, number: String4, url: String4 })),
14710
14733
  error: RunnerRpcError
14711
- }), make5("AlertTask", {
14734
+ }), make6("AlertTask", {
14712
14735
  payload: {
14713
14736
  lease: ProgramLease,
14714
14737
  step: String4,
@@ -14725,7 +14748,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14725
14748
  joined: optionalKey(Struct({ kind: Literals(["run", "recent"]), runId: String4 }))
14726
14749
  }),
14727
14750
  error: RunnerRpcError
14728
- }), make5("ReadTranscripts", {
14751
+ }), make6("ReadTranscripts", {
14729
14752
  payload: {
14730
14753
  lease: ProgramLease,
14731
14754
  step: String4,
@@ -14760,7 +14783,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14760
14783
  })))
14761
14784
  }),
14762
14785
  error: RunnerRpcError
14763
- }), make5("PipelineStatus", {
14786
+ }), make6("PipelineStatus", {
14764
14787
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14765
14788
  success: Struct({
14766
14789
  head: String4,
@@ -14794,11 +14817,11 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14794
14817
  }))
14795
14818
  }),
14796
14819
  error: RunnerRpcError
14797
- }), make5("ReportPipeline", {
14820
+ }), make6("ReportPipeline", {
14798
14821
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4, verification: String4 },
14799
14822
  success: Struct({ head: String4, status: Literals(["success", "failed"]) }),
14800
14823
  error: RunnerRpcError
14801
- }), make5("ReviewThreads", {
14824
+ }), make6("ReviewThreads", {
14802
14825
  payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
14803
14826
  success: Struct({
14804
14827
  threads: ArraySchema(Struct({
@@ -14810,7 +14833,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14810
14833
  }))
14811
14834
  }),
14812
14835
  error: RunnerRpcError
14813
- }), make5("OpenChangeRequests", {
14836
+ }), make6("OpenChangeRequests", {
14814
14837
  payload: { lease: ProgramLease, step: String4, authors: NonEmptyArray(String4) },
14815
14838
  success: Struct({
14816
14839
  changeRequests: ArraySchema(Struct({
@@ -14824,7 +14847,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14824
14847
  }))
14825
14848
  }),
14826
14849
  error: RunnerRpcError
14827
- }), make5("OwnChangeRequests", {
14850
+ }), make6("OwnChangeRequests", {
14828
14851
  payload: { lease: ProgramLease, step: String4 },
14829
14852
  success: Struct({
14830
14853
  changeRequests: ArraySchema(Struct({
@@ -14837,7 +14860,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14837
14860
  }))
14838
14861
  }),
14839
14862
  error: RunnerRpcError
14840
- }), make5("Propose", {
14863
+ }), make6("Propose", {
14841
14864
  payload: {
14842
14865
  lease: ProgramLease,
14843
14866
  step: String4,
@@ -14866,7 +14889,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14866
14889
  task: optionalKey(Struct({ id: String4, active: Boolean2 }))
14867
14890
  }),
14868
14891
  error: RunnerRpcError
14869
- }), make5("ReadProject", {
14892
+ }), make6("ReadProject", {
14870
14893
  payload: { lease: ProgramLease, step: String4, projectId: String4 },
14871
14894
  success: Struct({
14872
14895
  project: Struct({ id: String4, name: String4 }),
@@ -14889,7 +14912,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14889
14912
  taskChanges: ArraySchema(Struct({ taskKey: String4, title: String4, change: String4, at: String4 }))
14890
14913
  }),
14891
14914
  error: RunnerRpcError
14892
- }), make5("DraftUpdate", {
14915
+ }), make6("DraftUpdate", {
14893
14916
  payload: {
14894
14917
  lease: ProgramLease,
14895
14918
  step: String4,
@@ -14904,7 +14927,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14904
14927
  },
14905
14928
  success: Struct({ id: String4 }),
14906
14929
  error: RunnerRpcError
14907
- }), make5("CreatePlanTasks", {
14930
+ }), make6("CreatePlanTasks", {
14908
14931
  payload: {
14909
14932
  lease: ProgramLease,
14910
14933
  projectId: optionalKey(String4),
@@ -14925,15 +14948,15 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14925
14948
  },
14926
14949
  success: ArraySchema(Struct({ key: String4, taskId: String4 })),
14927
14950
  error: RunnerRpcError
14928
- }), make5("IntegrationBranch", {
14951
+ }), make6("IntegrationBranch", {
14929
14952
  payload: { lease: ProgramLease, repoBindingId: optionalKey(String4) },
14930
14953
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14931
14954
  error: RunnerRpcError
14932
- }), make5("DeliveryBase", {
14955
+ }), make6("DeliveryBase", {
14933
14956
  payload: { lease: ProgramLease },
14934
14957
  success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
14935
14958
  error: RunnerRpcError
14936
- }), make5("MergeChangeRequest", {
14959
+ }), make6("MergeChangeRequest", {
14937
14960
  payload: {
14938
14961
  lease: ProgramLease,
14939
14962
  step: String4,
@@ -14951,7 +14974,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14951
14974
  Struct({ status: Literal("moved"), head: String4 })
14952
14975
  ]),
14953
14976
  error: RunnerRpcError
14954
- }), make5("ApproveChangeRequest", {
14977
+ }), make6("ApproveChangeRequest", {
14955
14978
  payload: {
14956
14979
  lease: ProgramLease,
14957
14980
  step: String4,
@@ -14967,7 +14990,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14967
14990
  Struct({ approved: Literal(false), reason: String4 })
14968
14991
  ]),
14969
14992
  error: RunnerRpcError
14970
- }), make5("CloseChangeRequest", {
14993
+ }), make6("CloseChangeRequest", {
14971
14994
  payload: {
14972
14995
  lease: ProgramLease,
14973
14996
  step: String4,
@@ -14977,7 +15000,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14977
15000
  },
14978
15001
  success: Struct({ closed: Boolean2, head: optionalKey(String4) }),
14979
15002
  error: RunnerRpcError
14980
- }), make5("RerunPipeline", {
15003
+ }), make6("RerunPipeline", {
14981
15004
  payload: {
14982
15005
  lease: ProgramLease,
14983
15006
  step: String4,
@@ -14987,7 +15010,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14987
15010
  },
14988
15011
  success: Struct({ head: String4, pipelines: Int }),
14989
15012
  error: RunnerRpcError
14990
- }), make5("PublishRelease", {
15013
+ }), make6("PublishRelease", {
14991
15014
  payload: {
14992
15015
  lease: ProgramLease,
14993
15016
  step: String4,
@@ -14999,14 +15022,14 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14999
15022
  },
15000
15023
  success: Struct({ tag: String4, revision: String4, url: String4 }),
15001
15024
  error: RunnerRpcError
15002
- }), make5("ProgramSecrets", {
15025
+ }), make6("ProgramSecrets", {
15003
15026
  payload: { lease: ProgramLease },
15004
15027
  success: Record(String4, String4),
15005
15028
  error: RunnerRpcError
15006
15029
  })).middleware(RunnerAuthentication) {
15007
15030
  }
15008
15031
 
15009
- class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
15032
+ class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
15010
15033
  payload: {
15011
15034
  lease: ProgramLease,
15012
15035
  step: String4,
@@ -15018,11 +15041,11 @@ class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
15018
15041
  },
15019
15042
  success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
15020
15043
  error: Union([RunnerRpcError, RunFileRefused])
15021
- }), make5("RunFileParts", {
15044
+ }), make6("RunFileParts", {
15022
15045
  payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
15023
15046
  success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
15024
15047
  error: RunnerRpcError
15025
- }), make5("CompleteRunFile", {
15048
+ }), make6("CompleteRunFile", {
15026
15049
  payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
15027
15050
  success: RunFileRecord,
15028
15051
  error: RunnerRpcError
@@ -15111,7 +15134,7 @@ function toStoredSession(token, existingRefreshToken) {
15111
15134
  }
15112
15135
  function startLoopbackServer(input) {
15113
15136
  return gen(function* () {
15114
- const code = yield* make15();
15137
+ const code = yield* make16();
15115
15138
  const context2 = yield* context();
15116
15139
  const runSyncExit = runSyncExitWith(context2);
15117
15140
  const server = yield* acquireRelease(sync2(() => Bun.serve({
@@ -15659,7 +15682,7 @@ var openConnection = (transport) => gen(function* () {
15659
15682
  let lastId = 0;
15660
15683
  let lost = false;
15661
15684
  const notifications = yield* unbounded2();
15662
- const ended = yield* make15();
15685
+ const ended = yield* make16();
15663
15686
  const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
15664
15687
  onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
15665
15688
  onNone: () => void_3,
@@ -15686,7 +15709,7 @@ var openConnection = (transport) => gen(function* () {
15686
15709
  if (lost)
15687
15710
  return yield* new HerdrCoreConnectionLost2({ method });
15688
15711
  const id = ++lastId;
15689
- const deferred = yield* make15();
15712
+ const deferred = yield* make16();
15690
15713
  pending.set(id, { method, deferred });
15691
15714
  yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
15692
15715
  return yield* _await(deferred);
@@ -15760,14 +15783,14 @@ var herdrCoreOver = (transport) => ({
15760
15783
  return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
15761
15784
  };
15762
15785
  const snapshot = { type: "snapshot", terminals: subscribed.terminals };
15763
- return concat(make10(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15786
+ return concat(make11(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
15764
15787
  }))
15765
15788
  });
15766
15789
  var spawnedTransport = (env) => gen(function* () {
15767
15790
  const spawner = yield* ChildProcessSpawner;
15768
15791
  const input = yield* unbounded2();
15769
15792
  const encoder = new TextEncoder;
15770
- const handle = yield* spawner.spawn(make2("herdr-core", ["connect"], {
15793
+ const handle = yield* spawner.spawn(make3("herdr-core", ["connect"], {
15771
15794
  extendEnv: false,
15772
15795
  env,
15773
15796
  stdin: fromQueue(input),
@@ -15798,7 +15821,7 @@ var updateHerdrCore2 = (options) => gen(function* () {
15798
15821
  const spawner = yield* ChildProcessSpawner;
15799
15822
  const env = coreEnv(options);
15800
15823
  const run = (args) => gen(function* () {
15801
- const handle = yield* spawner.spawn(make2("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15824
+ const handle = yield* spawner.spawn(make3("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
15802
15825
  const [stdout, stderr, exitCode] = yield* all3([
15803
15826
  mkString(decodeText(handle.stdout)),
15804
15827
  mkString(decodeText(handle.stderr)),
@@ -15824,7 +15847,7 @@ class CommandFailed2 extends TaggedError("CommandFailed") {
15824
15847
  }
15825
15848
  var runCommand2 = (command, args, options = {}) => gen(function* () {
15826
15849
  const spawner = yield* ChildProcessSpawner;
15827
- const handle = yield* spawner.spawn(make2(command, args, {
15850
+ const handle = yield* spawner.spawn(make3(command, args, {
15828
15851
  stdin: "ignore",
15829
15852
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15830
15853
  ...options.env === undefined ? undefined : { extendEnv: true, env: options.env }
@@ -15850,8 +15873,8 @@ var shellOutputTailChars2 = 64 * 1024;
15850
15873
  var runProcess2 = (argv, options) => gen(function* () {
15851
15874
  const spawner = yield* ChildProcessSpawner;
15852
15875
  const [command, ...args] = argv;
15853
- const handle = yield* spawner.spawn(make2(command, args, {
15854
- stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
15876
+ const handle = yield* spawner.spawn(make3(command, args, {
15877
+ stdin: options.stdin === undefined ? "ignore" : make11(new TextEncoder().encode(options.stdin)),
15855
15878
  ...options.cwd === undefined ? undefined : { cwd: options.cwd },
15856
15879
  env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
15857
15880
  }));
@@ -16275,12 +16298,20 @@ function installCommand(rootFiles) {
16275
16298
  return has("package.json") ? "npm install" : undefined;
16276
16299
  }
16277
16300
  var checkServicesFile = ".kitman/checks.json";
16278
- var CheckServices = Struct({ services: ArraySchema(Literal("postgres")) });
16301
+ var CheckServices = Struct({
16302
+ services: ArraySchema(Literal("postgres")),
16303
+ checks: optionalKey(ArraySchema(String4))
16304
+ });
16305
+ var decodeCheckServices = (declaration) => getOrUndefined(decodeOption(fromJsonString(CheckServices))(declaration));
16279
16306
  function checkServices(declaration) {
16280
16307
  if (declaration === undefined)
16281
16308
  return [];
16282
- const decoded = decodeOption(fromJsonString(CheckServices))(declaration);
16283
- return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16309
+ const decoded = decodeCheckServices(declaration);
16310
+ return decoded === undefined ? undefined : [...new Set(decoded.services)];
16311
+ }
16312
+ function serviceChecks(declaration) {
16313
+ const decoded = declaration === undefined ? undefined : decodeCheckServices(declaration);
16314
+ return decoded === undefined || decoded.services.length === 0 ? [] : [...new Set(decoded.checks ?? [])];
16284
16315
  }
16285
16316
 
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 };
16317
+ 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, isTestReportName, testDigest, failedTestOfLine, printedNotReported, failedTestsOf, testOutcomes, checkTests, reportedModelName, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, 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, 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, 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, serviceChecks };