@kitman-sh/cli 0.12.13 → 0.12.14

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-cxqaccxr.js → chunk-0300vp5q.js} +6 -6
  2. package/dist/{chunk-20qmtmt2.js → chunk-0h49y8gf.js} +17 -17
  3. package/dist/{chunk-4hdk4bje.js → chunk-51ye0af0.js} +7 -7
  4. package/dist/{chunk-dmbcgwea.js → chunk-5wnjn5r0.js} +5 -5
  5. package/dist/{chunk-vp2xdw4r.js → chunk-5zhh41gb.js} +4 -4
  6. package/dist/{chunk-73fqehr2.js → chunk-5zth85pj.js} +2 -2
  7. package/dist/{chunk-ntxzkz25.js → chunk-br7t2pre.js} +23 -23
  8. package/dist/{chunk-853g269m.js → chunk-bzq3bz0d.js} +22 -22
  9. package/dist/{chunk-qpfb12g1.js → chunk-cbpb2rww.js} +7 -7
  10. package/dist/{chunk-n1mzvqt2.js → chunk-f0h8f3kw.js} +4 -4
  11. package/dist/{chunk-vnfshhpk.js → chunk-gnxa022f.js} +1 -1
  12. package/dist/{chunk-24h0y27w.js → chunk-gq7y5v3e.js} +1 -1
  13. package/dist/{chunk-mmd7mjv0.js → chunk-gy9rf14f.js} +3 -3
  14. package/dist/{chunk-mr95mxxv.js → chunk-hh7rg13h.js} +21 -21
  15. package/dist/{chunk-rjxkcjb2.js → chunk-hhnx6314.js} +7 -7
  16. package/dist/{chunk-5f8whb7j.js → chunk-mtkstrh3.js} +60 -14
  17. package/dist/{chunk-1msvjdrq.js → chunk-mxq6zpkw.js} +4 -4
  18. package/dist/{chunk-hb71prd2.js → chunk-q44g4vf7.js} +4 -4
  19. package/dist/{chunk-pxvd8w2v.js → chunk-q5w3v4k1.js} +1 -1
  20. package/dist/{chunk-axh2mt1y.js → chunk-tfd4pnnt.js} +1 -1
  21. package/dist/{chunk-vm5s72rr.js → chunk-wx3cx43j.js} +107 -107
  22. package/dist/{chunk-fsmh52xq.js → chunk-x7574rns.js} +18 -18
  23. package/dist/{chunk-vmhpnqss.js → chunk-xgdyj09a.js} +3 -3
  24. package/dist/{chunk-ggmwpwhf.js → chunk-y1krmnbv.js} +2 -2
  25. package/dist/{chunk-zgraq2y3.js → chunk-zw3gf6r5.js} +28 -70
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -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-20qmtmt2.js";
119
+ } from "./chunk-0h49y8gf.js";
120
120
  import {
121
121
  currentTimeMillis,
122
122
  SecureRandom,
@@ -166,7 +166,7 @@ import {
166
166
  digestSha256,
167
167
  sha256Hasher,
168
168
  raw,
169
- make4,
169
+ make5,
170
170
  get,
171
171
  put,
172
172
  HttpClient,
@@ -228,14 +228,14 @@ import {
228
228
  harnessNames,
229
229
  herdrRunnerCapabilities2,
230
230
  declaredChecks
231
- } from "./chunk-vm5s72rr.js";
231
+ } from "./chunk-wx3cx43j.js";
232
232
  import {
233
233
  Id
234
- } from "./chunk-pxvd8w2v.js";
234
+ } from "./chunk-q5w3v4k1.js";
235
235
  import {
236
236
  ChildProcessSpawner,
237
- make2
238
- } from "./chunk-5f8whb7j.js";
237
+ make3
238
+ } from "./chunk-mtkstrh3.js";
239
239
 
240
240
  // apps/cli/src/cli-error.ts
241
241
  function cliErrorCode(error, status) {
@@ -989,10 +989,10 @@ var sandboxMissing = (sandbox, missing) => ({
989
989
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
990
990
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
991
991
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
992
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-1msvjdrq.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
992
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-mxq6zpkw.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
993
993
  });
994
994
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
995
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-1msvjdrq.js")), (module) => module.updateHerdrCore(options))
995
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-mxq6zpkw.js")), (module) => module.updateHerdrCore(options))
996
996
  });
997
997
  var herdrCoreMissing = (error) => {
998
998
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1412,7 +1412,7 @@ var syncTargets = (harness) => gen(function* () {
1412
1412
  });
1413
1413
  var syncKits = (input) => gen(function* () {
1414
1414
  const fs = yield* FileSystem;
1415
- const { syncKitSetup } = yield* promise(() => import("./chunk-rjxkcjb2.js"));
1415
+ const { syncKitSetup } = yield* promise(() => import("./chunk-hhnx6314.js"));
1416
1416
  const harnesses = yield* syncTargets(input.harness);
1417
1417
  const chain = yield* input.client.getKitChain(input.workspaceId);
1418
1418
  for (const { name, problem } of chain.skipped)
@@ -1929,7 +1929,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1929
1929
  run: (command, args) => runCommand2(command, args),
1930
1930
  attach: (command, args) => gen(function* () {
1931
1931
  const spawner = yield* ChildProcessSpawner;
1932
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1932
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1933
1933
  const exitCode = yield* handle.exitCode;
1934
1934
  if (exitCode !== 0)
1935
1935
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -2331,7 +2331,7 @@ var package_default = {
2331
2331
  };
2332
2332
 
2333
2333
  // apps/cli/src/scaffold.ts
2334
- var cliVersion = "0.12.13";
2334
+ var cliVersion = "0.12.14";
2335
2335
  var packageJson = (name, scaffold) => `${JSON.stringify({
2336
2336
  name,
2337
2337
  private: true,
@@ -2483,7 +2483,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2483
2483
 
2484
2484
  // apps/cli/src/commands.ts
2485
2485
  var ClientId = "kitman-cli";
2486
- var agentRuntime = promise(() => import("./chunk-853g269m.js"));
2486
+ var agentRuntime = promise(() => import("./chunk-bzq3bz0d.js"));
2487
2487
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2488
2488
  defaultValue: () => gen(function* () {
2489
2489
  const tui = yield* tryPromise({
@@ -3507,7 +3507,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3507
3507
  });
3508
3508
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3509
3509
  defaultValue: () => (options) => gen(function* () {
3510
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-cxqaccxr.js"));
3510
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-0300vp5q.js"));
3511
3511
  return yield* makeRunnerRpcClient({
3512
3512
  runnerId: options.runnerId,
3513
3513
  bearer: options.bearer,
@@ -3787,7 +3787,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3787
3787
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3788
3788
  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);
3789
3789
  const platform = yield* context();
3790
- const updated = yield* make15();
3790
+ const updated = yield* make16();
3791
3791
  const scope = yield* scope2;
3792
3792
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
3793
3793
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -4039,7 +4039,7 @@ function mcpCommand(args) {
4039
4039
  if (command.action === "run") {
4040
4040
  if (command.args.length > 0)
4041
4041
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4042
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-ntxzkz25.js"));
4042
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-br7t2pre.js"));
4043
4043
  return yield* runMcpServerCommand({ flags: command.flags });
4044
4044
  }
4045
4045
  if (command.action !== "setup")
@@ -4527,7 +4527,7 @@ function programLoopCommand(command) {
4527
4527
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4528
4528
  });
4529
4529
  }
4530
- var docsModule = promise(() => import("./chunk-axh2mt1y.js"));
4530
+ var docsModule = promise(() => import("./chunk-tfd4pnnt.js"));
4531
4531
  function docsCommand(args) {
4532
4532
  return gen(function* () {
4533
4533
  const command = parseCommand(args);
@@ -5361,9 +5361,9 @@ function changeRequestCommand(args) {
5361
5361
  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}`);
5362
5362
  });
5363
5363
  }
5364
- var KitWriter = map8(promise(() => import("./chunk-fsmh52xq.js")), (build) => build.writeKit);
5364
+ var KitWriter = map8(promise(() => import("./chunk-x7574rns.js")), (build) => build.writeKit);
5365
5365
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5366
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-fsmh52xq.js")), (build) => build.buildKit(directory))
5366
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-x7574rns.js")), (build) => build.buildKit(directory))
5367
5367
  });
5368
5368
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5369
5369
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -6140,7 +6140,7 @@ function downloadPresignedAsset(download, outputPath) {
6140
6140
  return gen(function* () {
6141
6141
  const fs = yield* FileSystem;
6142
6142
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6143
- const response = yield* send(make4(download.method)(download.url), failed);
6143
+ const response = yield* send(make5(download.method)(download.url), failed);
6144
6144
  if (response.status < 200 || response.status >= 300)
6145
6145
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6146
6146
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -13,27 +13,27 @@ import {
13
13
  isJsonObject,
14
14
  decodeJsonString,
15
15
  encodePrettyJsonString
16
- } from "./chunk-zgraq2y3.js";
17
- import"./chunk-pxvd8w2v.js";
16
+ } from "./chunk-zw3gf6r5.js";
17
+ import"./chunk-q5w3v4k1.js";
18
18
  import {
19
19
  FileSystem,
20
20
  Path
21
- } from "./chunk-20qmtmt2.js";
21
+ } from "./chunk-0h49y8gf.js";
22
22
  import {
23
23
  tomlTableHeader2,
24
24
  tomlKeyPath2,
25
25
  kitmanSkillEntry,
26
26
  isPathWithin2
27
- } from "./chunk-n1mzvqt2.js";
27
+ } from "./chunk-f0h8f3kw.js";
28
28
  import {
29
29
  instructionsStart,
30
30
  instructionsEnd,
31
31
  renderMcpServer,
32
32
  materializeKitSetup,
33
33
  tomlInline
34
- } from "./chunk-vm5s72rr.js";
35
- import"./chunk-vmhpnqss.js";
36
- import"./chunk-5f8whb7j.js";
34
+ } from "./chunk-wx3cx43j.js";
35
+ import"./chunk-xgdyj09a.js";
36
+ import"./chunk-mtkstrh3.js";
37
37
 
38
38
  // packages/agent-runtime/src/kit-setup-sync.ts
39
39
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -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-20qmtmt2.js";
34
+ } from "./chunk-0h49y8gf.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 };
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-5f8whb7j.js";
2
+ import"./chunk-mtkstrh3.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,9 +12,9 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-vm5s72rr.js";
16
- import"./chunk-20qmtmt2.js";
17
- import"./chunk-zgraq2y3.js";
15
+ } from "./chunk-wx3cx43j.js";
16
+ import"./chunk-0h49y8gf.js";
17
+ import"./chunk-zw3gf6r5.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
@@ -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-vm5s72rr.js";
108
+ } from "./chunk-wx3cx43j.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-20qmtmt2.js";
112
+ } from "./chunk-0h49y8gf.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");
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-zgraq2y3.js";
21
+ } from "./chunk-zw3gf6r5.js";
22
22
 
23
23
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/JsonSchema.js
24
24
  var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-vnfshhpk.js";
7
+ } from "./chunk-gnxa022f.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,