@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
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-8nzsyz74.js";
7
+ } from "./chunk-2bds7yc8.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,
@@ -25,16 +25,16 @@ import {
25
25
  isJsonObject,
26
26
  isString2,
27
27
  encodeUnknownJsonStringSync
28
- } from "./chunk-zgraq2y3.js";
28
+ } from "./chunk-zw3gf6r5.js";
29
29
  import {
30
- make10,
30
+ make11,
31
31
  runForEach,
32
32
  compiled2
33
- } from "./chunk-x20t7xy8.js";
33
+ } from "./chunk-nf9gdnsf.js";
34
34
  import {
35
35
  ChildProcessSpawner,
36
- make2
37
- } from "./chunk-cbf0q15q.js";
36
+ make3
37
+ } from "./chunk-82w8rmkc.js";
38
38
 
39
39
  // packages/agent-runtime/src/opencode-store.ts
40
40
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -172,8 +172,8 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
172
172
  var isolatedRead = (store, name, input) => gen(function* () {
173
173
  const spawner = yield* ChildProcessSpawner;
174
174
  const [command, ...args] = opencodeReaderCommand();
175
- const handle = yield* spawner.spawn(make2(command, args, {
176
- stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
175
+ const handle = yield* spawner.spawn(make3(command, args, {
176
+ stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
177
177
  stderr: "ignore",
178
178
  extendEnv: false,
179
179
  env: {},
@@ -75,10 +75,10 @@ import {
75
75
  toEquivalence,
76
76
  toCodecJson,
77
77
  Json
78
- } from "./chunk-zgraq2y3.js";
78
+ } from "./chunk-zw3gf6r5.js";
79
79
  import {
80
80
  guard
81
- } from "./chunk-pxvd8w2v.js";
81
+ } from "./chunk-q5w3v4k1.js";
82
82
  import {
83
83
  currentTimeMillis,
84
84
  WebCrypto,
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-80f0p6s7.js";
108
+ } from "./chunk-0n46rkk9.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-x20t7xy8.js";
112
+ } from "./chunk-nf9gdnsf.js";
113
113
 
114
114
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
115
115
  var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");
@@ -500,7 +500,13 @@ var EvidenceCheck = Struct({
500
500
  failedTests: optionalKey(ArraySchema(String4)),
501
501
  suggested: optionalKey(Boolean2),
502
502
  skippedSinceBaseline: optionalKey(ArraySchema(String4)),
503
- newNotRun: optionalKey(ArraySchema(String4))
503
+ newNotRun: optionalKey(ArraySchema(String4)),
504
+ environmentFailure: optionalKey(Struct({
505
+ failedTests: optionalKey(ArraySchema(String4)),
506
+ exitCode: optionalKey(Int),
507
+ outputTail: optionalKey(String4),
508
+ retryFailedTests: optionalKey(ArraySchema(String4))
509
+ }))
504
510
  });
505
511
  var VerifyResult = Struct({
506
512
  revision: String4,
@@ -1,6 +1,13 @@
1
1
  // @bun
2
2
  import {
3
+ isString,
4
+ hasProperty,
5
+ symbol,
6
+ hash,
7
+ symbol2,
8
+ equals,
3
9
  BaseProto,
10
+ PipeInspectableProto,
4
11
  Prototype,
5
12
  some,
6
13
  Service2,
@@ -14,11 +21,8 @@ import {
14
21
  andThen2,
15
22
  map8,
16
23
  raceFirst,
17
- scoped,
18
- isRedacted,
19
- make16,
20
- value
21
- } from "./chunk-zgraq2y3.js";
24
+ scoped
25
+ } from "./chunk-zw3gf6r5.js";
22
26
  import {
23
27
  unwrap,
24
28
  drainFork,
@@ -27,7 +31,49 @@ import {
27
31
  runCollect,
28
32
  runDrain,
29
33
  mkString
30
- } from "./chunk-x20t7xy8.js";
34
+ } from "./chunk-nf9gdnsf.js";
35
+
36
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
37
+ var redactedRegistry = /* @__PURE__ */ new WeakMap;
38
+ var value2 = (self) => {
39
+ if (redactedRegistry.has(self)) {
40
+ return redactedRegistry.get(self);
41
+ } else {
42
+ throw new Error("Unable to get redacted value" + (self.label ? ` with label: "${self.label}"` : ""));
43
+ }
44
+ };
45
+
46
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Redacted.js
47
+ var TypeId = "~effect/Redacted";
48
+ var isRedacted = (u) => hasProperty(u, TypeId);
49
+ var make = (value, options) => {
50
+ const self = Object.create(Proto);
51
+ if (options?.label) {
52
+ self.label = options.label;
53
+ }
54
+ redactedRegistry.set(self, value);
55
+ return self;
56
+ };
57
+ var Proto = {
58
+ [TypeId]: {
59
+ _A: (_) => _
60
+ },
61
+ label: undefined,
62
+ ...PipeInspectableProto,
63
+ toJSON() {
64
+ return this.toString();
65
+ },
66
+ toString() {
67
+ return `<redacted${isString(this.label) ? ":" + this.label : ""}>`;
68
+ },
69
+ [symbol]() {
70
+ return hash(redactedRegistry.get(this));
71
+ },
72
+ [symbol2](that) {
73
+ return isRedacted(that) && equals(redactedRegistry.get(this), redactedRegistry.get(that));
74
+ }
75
+ };
76
+ var value = value2;
31
77
 
32
78
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Brand.js
33
79
  function nominal() {
@@ -55,7 +101,7 @@ var HandleProto = {
55
101
  var makeHandle = (params) => Object.setPrototypeOf({
56
102
  ...params
57
103
  }, HandleProto);
58
- var make = (spawn) => {
104
+ var make2 = (spawn) => {
59
105
  const streamString = (command, options) => spawn(command).pipe(map8((handle) => decodeText(options?.includeStderr === true ? handle.all : drainFork(handle.stdout, handle.stderr))), unwrap);
60
106
  const streamLines = (command, options) => splitLines(streamString(command, options));
61
107
  return ChildProcessSpawner.of({
@@ -176,7 +222,7 @@ var parseTemplate = (texts, values) => {
176
222
  if (word.length === 0)
177
223
  return;
178
224
  const value = word.map(unwrap2).join("");
179
- words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make16(value) : value);
225
+ words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make(value) : value);
180
226
  word = [];
181
227
  plain = true;
182
228
  braceDepth = 0;
@@ -266,23 +312,23 @@ var parseTemplate = (texts, values) => {
266
312
  };
267
313
 
268
314
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/process/ChildProcess.js
269
- var TypeId = "~effect/process/ChildProcess";
270
- var Proto = {
315
+ var TypeId2 = "~effect/process/ChildProcess";
316
+ var Proto2 = {
271
317
  .../* @__PURE__ */ Prototype({
272
318
  label: "Command",
273
319
  evaluate(fiber) {
274
320
  return getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);
275
321
  }
276
322
  }),
277
- [TypeId]: TypeId
323
+ [TypeId2]: TypeId2
278
324
  };
279
- var makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto), {
325
+ var makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto2), {
280
326
  _tag: "StandardCommand",
281
327
  command,
282
328
  args,
283
329
  options
284
330
  });
285
- var make2 = function make(...args) {
331
+ var make3 = function make(...args) {
286
332
  if (isTemplateString(args[0])) {
287
333
  const [templates, ...expressions] = args;
288
334
  const [command, cmdArgs] = parseTemplate2(templates, expressions);
@@ -340,4 +386,4 @@ var shellScript = (templates, expressions) => {
340
386
  }
341
387
  return script;
342
388
  };
343
- export { ExitCode, ProcessId, makeHandle, make, ChildProcessSpawner, display, make2, parseFdName, fdName };
389
+ export { isRedacted, make, value, ExitCode, ProcessId, makeHandle, make2, ChildProcessSpawner, display, make3, parseFdName, fdName };
@@ -12,7 +12,7 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make15,
15
+ make16,
16
16
  _await,
17
17
  fail5,
18
18
  succeed5,
@@ -104,7 +104,7 @@ import {
104
104
  decodeJsonString,
105
105
  encodeJsonStringSync,
106
106
  encodePrettyJsonString
107
- } from "./chunk-zgraq2y3.js";
107
+ } from "./chunk-zw3gf6r5.js";
108
108
  import {
109
109
  tap,
110
110
  mapError,
@@ -116,7 +116,7 @@ import {
116
116
  withDefault,
117
117
  option,
118
118
  String2
119
- } from "./chunk-x20t7xy8.js";
119
+ } from "./chunk-nf9gdnsf.js";
120
120
  import {
121
121
  currentTimeMillis,
122
122
  SecureRandom,
@@ -168,7 +168,7 @@ import {
168
168
  digestSha256,
169
169
  sha256Hasher,
170
170
  raw,
171
- make4,
171
+ make5,
172
172
  get,
173
173
  put,
174
174
  HttpClient,
@@ -232,14 +232,14 @@ import {
232
232
  harnessNames,
233
233
  herdrRunnerCapabilities2,
234
234
  declaredChecks
235
- } from "./chunk-80f0p6s7.js";
235
+ } from "./chunk-0n46rkk9.js";
236
236
  import {
237
237
  Id
238
- } from "./chunk-pxvd8w2v.js";
238
+ } from "./chunk-q5w3v4k1.js";
239
239
  import {
240
240
  ChildProcessSpawner,
241
- make2
242
- } from "./chunk-cbf0q15q.js";
241
+ make3
242
+ } from "./chunk-82w8rmkc.js";
243
243
 
244
244
  // apps/cli/src/cli-error.ts
245
245
  function cliErrorCode(error, status) {
@@ -1020,10 +1020,10 @@ var sandboxMissing = (sandbox, missing) => ({
1020
1020
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1021
1021
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1022
1022
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1023
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-pjq9bf3w.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1023
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-ysz1v2cq.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1024
1024
  });
1025
1025
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1026
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-pjq9bf3w.js")), (module) => module.updateHerdrCore(options))
1026
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-ysz1v2cq.js")), (module) => module.updateHerdrCore(options))
1027
1027
  });
1028
1028
  var herdrCoreMissing = (error) => {
1029
1029
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1449,7 +1449,7 @@ var syncTargets = (harness) => gen(function* () {
1449
1449
  });
1450
1450
  var syncKits = (input) => gen(function* () {
1451
1451
  const fs = yield* FileSystem;
1452
- const { syncKitSetup } = yield* promise(() => import("./chunk-syhs23yk.js"));
1452
+ const { syncKitSetup } = yield* promise(() => import("./chunk-xt6db7sf.js"));
1453
1453
  const harnesses = yield* syncTargets(input.harness);
1454
1454
  const chain = yield* input.client.getKitChain(input.workspaceId);
1455
1455
  for (const { name, problem } of chain.skipped)
@@ -1966,7 +1966,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1966
1966
  run: (command, args) => runCommand2(command, args),
1967
1967
  attach: (command, args) => gen(function* () {
1968
1968
  const spawner = yield* ChildProcessSpawner;
1969
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1969
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1970
1970
  const exitCode = yield* handle.exitCode;
1971
1971
  if (exitCode !== 0)
1972
1972
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -2368,7 +2368,7 @@ var package_default = {
2368
2368
  };
2369
2369
 
2370
2370
  // apps/cli/src/scaffold.ts
2371
- var cliVersion = "0.13.17";
2371
+ var cliVersion = "0.13.19";
2372
2372
  var packageJson = (name, scaffold) => `${JSON.stringify({
2373
2373
  name,
2374
2374
  private: true,
@@ -2520,7 +2520,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2520
2520
 
2521
2521
  // apps/cli/src/commands.ts
2522
2522
  var ClientId = "kitman-cli";
2523
- var agentRuntime = promise(() => import("./chunk-4yca7e7x.js"));
2523
+ var agentRuntime = promise(() => import("./chunk-d917m1ak.js"));
2524
2524
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2525
2525
  defaultValue: () => gen(function* () {
2526
2526
  const tui = yield* tryPromise({
@@ -3556,7 +3556,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3556
3556
  });
3557
3557
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3558
3558
  defaultValue: () => (options) => gen(function* () {
3559
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-gasqek3p.js"));
3559
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-s4pejxc8.js"));
3560
3560
  return yield* makeRunnerRpcClient({
3561
3561
  runnerId: options.runnerId,
3562
3562
  bearer: options.bearer,
@@ -3868,7 +3868,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3868
3868
  yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map8(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
3869
3869
  yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
3870
3870
  const platform = yield* context();
3871
- const updated = yield* make15();
3871
+ const updated = yield* make16();
3872
3872
  const scope = yield* scope2;
3873
3873
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
3874
3874
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -4123,7 +4123,7 @@ function mcpCommand(args) {
4123
4123
  if (command.action === "run") {
4124
4124
  if (command.args.length > 0)
4125
4125
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4126
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-b5edh1jq.js"));
4126
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-40ee20qs.js"));
4127
4127
  return yield* runMcpServerCommand({ flags: command.flags });
4128
4128
  }
4129
4129
  if (command.action !== "setup")
@@ -4611,7 +4611,7 @@ function programLoopCommand(command) {
4611
4611
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4612
4612
  });
4613
4613
  }
4614
- var docsModule = promise(() => import("./chunk-efyrm6bv.js"));
4614
+ var docsModule = promise(() => import("./chunk-4yg6da62.js"));
4615
4615
  function docsCommand(args) {
4616
4616
  return gen(function* () {
4617
4617
  const command = parseCommand(args);
@@ -5453,9 +5453,9 @@ function changeRequestCommand(args) {
5453
5453
  yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
5454
5454
  });
5455
5455
  }
5456
- var KitWriter = map8(promise(() => import("./chunk-g7ysb6ca.js")), (build) => build.writeKit);
5456
+ var KitWriter = map8(promise(() => import("./chunk-12afnp8q.js")), (build) => build.writeKit);
5457
5457
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5458
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-g7ysb6ca.js")), (build) => build.buildKit(directory))
5458
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-12afnp8q.js")), (build) => build.buildKit(directory))
5459
5459
  });
5460
5460
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5461
5461
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -6232,7 +6232,7 @@ function downloadPresignedAsset(download, outputPath) {
6232
6232
  return gen(function* () {
6233
6233
  const fs = yield* FileSystem;
6234
6234
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6235
- const response = yield* send(make4(download.method)(download.url), failed);
6235
+ const response = yield* send(make5(download.method)(download.url), failed);
6236
6236
  if (response.status < 200 || response.status >= 300)
6237
6237
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6238
6238
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-zgraq2y3.js";
27
+ } from "./chunk-zw3gf6r5.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-x20t7xy8.js";
31
+ } from "./chunk-nf9gdnsf.js";
32
32
  import {
33
33
  newerKitmanVersion,
34
34
  digestSha256,
@@ -39,7 +39,7 @@ import {
39
39
  get2,
40
40
  layer4,
41
41
  KitDigest
42
- } from "./chunk-80f0p6s7.js";
42
+ } from "./chunk-0n46rkk9.js";
43
43
 
44
44
  // packages/core/src/npm-registry.ts
45
45
  var KitManifest = Struct({