@kitman-sh/cli 0.14.0 → 0.14.2

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-bmkc5r0p.js → chunk-0r9tp5pz.js} +4 -4
  2. package/dist/{chunk-zpp4jg4a.js → chunk-1jabs81x.js} +101 -59
  3. package/dist/{chunk-9j4cnz4j.js → chunk-24j1cmsm.js} +38 -32
  4. package/dist/{chunk-5129s1vg.js → chunk-39pdxhcv.js} +3 -3
  5. package/dist/{chunk-vth8h56e.js → chunk-3csj1ve1.js} +4 -4
  6. package/dist/{chunk-c4mf5mgt.js → chunk-4xez238w.js} +2 -2
  7. package/dist/{chunk-w8vxzc7w.js → chunk-80vwvv5x.js} +45 -45
  8. package/dist/{chunk-h7zb6d3z.js → chunk-avhqm9p0.js} +183 -40
  9. package/dist/{chunk-y0y2gg8d.js → chunk-e024f8af.js} +2 -2
  10. package/dist/{chunk-w34sq09e.js → chunk-ffq8vvvx.js} +5 -5
  11. package/dist/{chunk-5d2sdzbz.js → chunk-ge9qjp6s.js} +7 -7
  12. package/dist/{chunk-84fcym2g.js → chunk-gwz39037.js} +1 -1
  13. package/dist/{chunk-9avbsbvk.js → chunk-h6kd80nr.js} +6 -1
  14. package/dist/{chunk-t2zzamex.js → chunk-hza25m2e.js} +34 -34
  15. package/dist/{chunk-hq2xzj6f.js → chunk-jzfy127y.js} +4 -4
  16. package/dist/{chunk-wb3wsm86.js → chunk-m9x7feh0.js} +7 -7
  17. package/dist/{chunk-gbr4s7nk.js → chunk-q4ch3t9q.js} +6 -6
  18. package/dist/{chunk-r9tzwrnb.js → chunk-qqmxhk9w.js} +14 -60
  19. package/dist/{chunk-f2ycw5bp.js → chunk-ryxff0xk.js} +189 -340
  20. package/dist/{chunk-bbf0jzsc.js → chunk-scdr623z.js} +1 -1
  21. package/dist/{chunk-gmdd1a74.js → chunk-t9chwen8.js} +3 -3
  22. package/dist/{chunk-bscvbpa1.js → chunk-v86jpzpr.js} +9 -9
  23. package/dist/{chunk-ctpgfdzf.js → chunk-vfw3xn1e.js} +3 -3
  24. package/dist/{chunk-099ybrqz.js → chunk-yfag1eey.js} +20 -20
  25. package/dist/{chunk-4c6w8sb7.js → chunk-z7c2ndfg.js} +11 -11
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -104,8 +104,21 @@ import {
104
104
  decodeJsonString,
105
105
  encodeJsonStringSync,
106
106
  encodePrettyJsonString
107
- } from "./chunk-zpp4jg4a.js";
107
+ } from "./chunk-1jabs81x.js";
108
108
  import {
109
+ tap,
110
+ mapError,
111
+ decodeText,
112
+ run,
113
+ mkString,
114
+ FileSystem,
115
+ Path,
116
+ withDefault,
117
+ option,
118
+ String2
119
+ } from "./chunk-avhqm9p0.js";
120
+ import {
121
+ currentTimeMillis,
109
122
  SecureRandom,
110
123
  layerWebCrypto,
111
124
  runMain,
@@ -155,7 +168,7 @@ import {
155
168
  digestSha256,
156
169
  sha256Hasher,
157
170
  raw,
158
- make5,
171
+ make4,
159
172
  get,
160
173
  put,
161
174
  HttpClient,
@@ -219,27 +232,14 @@ import {
219
232
  harnessNames,
220
233
  herdrRunnerCapabilities2,
221
234
  declaredChecks
222
- } from "./chunk-f2ycw5bp.js";
235
+ } from "./chunk-ryxff0xk.js";
223
236
  import {
224
- currentTimeMillis,
225
- tap,
226
- mapError,
227
- decodeText,
228
- run,
229
- mkString,
230
- FileSystem,
231
- Path,
232
- withDefault,
233
- option,
234
- String2
235
- } from "./chunk-h7zb6d3z.js";
237
+ Id
238
+ } from "./chunk-h6kd80nr.js";
236
239
  import {
237
240
  ChildProcessSpawner,
238
- make3
239
- } from "./chunk-r9tzwrnb.js";
240
- import {
241
- Id
242
- } from "./chunk-9avbsbvk.js";
241
+ make2
242
+ } from "./chunk-qqmxhk9w.js";
243
243
 
244
244
  // apps/cli/src/cli-error.ts
245
245
  function cliErrorCode(error, status) {
@@ -439,7 +439,7 @@ var Usage = [
439
439
  " kitman pair [<pairing code>] [--api-url <url>] (what the command the web shows runs; no code finishes or re-keys with your session)",
440
440
  " kitman pair <runner pairing code> --credential-file <path> (writes a shared Runner's credential for a container or its replicas to mount)",
441
441
  " kitman runner start --credential-file <path> (or KITMAN_RUNNER_CREDENTIAL_FILE; starts the Runner the file holds)",
442
- " kitman runner settings <runner> [--concurrency <1-4>] [--sandbox srt|docker|host] [--docker-image <image@sha256:\u2026>|none]",
442
+ " kitman runner settings <runner> [--concurrency <1-32>] [--sandbox srt|docker|host] [--docker-image <image@sha256:\u2026>|none]",
443
443
  " [--check-hosts <host,\u2026>|none] [--check-docker-image <image@sha256:\u2026>|none] [--check-registry-image <image@sha256:\u2026>|none]",
444
444
  " kitman runner settings history <runner> (each change: who, when, old and new value)",
445
445
  "",
@@ -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-vth8h56e.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1023
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-3csj1ve1.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-vth8h56e.js")), (module) => module.updateHerdrCore(options))
1026
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-3csj1ve1.js")), (module) => module.updateHerdrCore(options))
1027
1027
  });
1028
1028
  var herdrCoreMissing = (error) => {
1029
1029
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1172,7 +1172,7 @@ var settingFromFlag = (flag, value) => {
1172
1172
  return update;
1173
1173
  };
1174
1174
  var settingFlagRefused = {
1175
- concurrency: "--concurrency takes a whole number from 1 to 4",
1175
+ concurrency: `--concurrency takes a whole number from 1 to ${MaxRunnerConcurrency}`,
1176
1176
  sandbox: "--sandbox takes srt, docker or host",
1177
1177
  dockerImage: "--docker-image takes an image pinned by digest (name@sha256:...), or none",
1178
1178
  checkHosts: "--check-hosts takes comma-separated hosts, such as registry.npmjs.org,*.example.com, or none",
@@ -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-wb3wsm86.js"));
1452
+ const { syncKitSetup } = yield* promise(() => import("./chunk-m9x7feh0.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(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1969
+ const handle = yield* spawner.spawn(make2(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.14.0";
2371
+ var cliVersion = "0.14.2";
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-9j4cnz4j.js"));
2523
+ var agentRuntime = promise(() => import("./chunk-24j1cmsm.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-gbr4s7nk.js"));
3559
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-q4ch3t9q.js"));
3560
3560
  return yield* makeRunnerRpcClient({
3561
3561
  runnerId: options.runnerId,
3562
3562
  bearer: options.bearer,
@@ -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-w8vxzc7w.js"));
4126
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-80vwvv5x.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-84fcym2g.js"));
4614
+ var docsModule = promise(() => import("./chunk-gwz39037.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-4c6w8sb7.js")), (build) => build.writeKit);
5456
+ var KitWriter = map8(promise(() => import("./chunk-z7c2ndfg.js")), (build) => build.writeKit);
5457
5457
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5458
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-4c6w8sb7.js")), (build) => build.buildKit(directory))
5458
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-z7c2ndfg.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(make5(download.method)(download.url), failed);
6235
+ const response = yield* send(make4(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)));
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-w34sq09e.js";
11
- import"./chunk-r9tzwrnb.js";
12
- import"./chunk-h7zb6d3z.js";
13
- import"./chunk-zpp4jg4a.js";
10
+ } from "./chunk-ffq8vvvx.js";
11
+ import"./chunk-qqmxhk9w.js";
12
+ import"./chunk-avhqm9p0.js";
13
+ import"./chunk-1jabs81x.js";
14
14
  export {
15
15
  decoded2 as decoded,
16
16
  decodedOption2 as decodedOption,
@@ -13,27 +13,27 @@ import {
13
13
  isJsonObject,
14
14
  decodeJsonString,
15
15
  encodePrettyJsonString
16
- } from "./chunk-zpp4jg4a.js";
16
+ } from "./chunk-1jabs81x.js";
17
+ import"./chunk-h6kd80nr.js";
17
18
  import {
18
19
  FileSystem,
19
20
  Path
20
- } from "./chunk-h7zb6d3z.js";
21
+ } from "./chunk-avhqm9p0.js";
21
22
  import {
22
23
  tomlTableHeader2,
23
24
  tomlKeyPath2,
24
25
  kitmanSkillEntry,
25
26
  isPathWithin2
26
- } from "./chunk-bmkc5r0p.js";
27
+ } from "./chunk-0r9tp5pz.js";
27
28
  import {
28
29
  instructionsStart,
29
30
  instructionsEnd,
30
31
  renderMcpServer,
31
32
  materializeKitSetup,
32
33
  tomlInline
33
- } from "./chunk-f2ycw5bp.js";
34
- import"./chunk-5129s1vg.js";
35
- import"./chunk-r9tzwrnb.js";
36
- import"./chunk-9avbsbvk.js";
34
+ } from "./chunk-ryxff0xk.js";
35
+ import"./chunk-39pdxhcv.js";
36
+ import"./chunk-qqmxhk9w.js";
37
37
 
38
38
  // packages/agent-runtime/src/kit-setup-sync.ts
39
39
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-bscvbpa1.js";
8
- import"./chunk-099ybrqz.js";
9
- import"./chunk-f2ycw5bp.js";
10
- import"./chunk-9avbsbvk.js";
11
- import"./chunk-h7zb6d3z.js";
12
- import"./chunk-zpp4jg4a.js";
7
+ } from "./chunk-v86jpzpr.js";
8
+ import"./chunk-yfag1eey.js";
9
+ import"./chunk-ryxff0xk.js";
10
+ import"./chunk-h6kd80nr.js";
11
+ import"./chunk-avhqm9p0.js";
12
+ import"./chunk-1jabs81x.js";
13
13
  export {
14
14
  makeProgramRpcClient2 as makeProgramRpcClient,
15
15
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -1,13 +1,6 @@
1
1
  // @bun
2
2
  import {
3
- isString,
4
- hasProperty,
5
- symbol,
6
- hash,
7
- symbol2,
8
- equals,
9
3
  BaseProto,
10
- PipeInspectableProto,
11
4
  Prototype,
12
5
  some,
13
6
  Service2,
@@ -21,8 +14,11 @@ import {
21
14
  andThen2,
22
15
  map8,
23
16
  raceFirst,
24
- scoped
25
- } from "./chunk-zpp4jg4a.js";
17
+ scoped,
18
+ isRedacted,
19
+ make16,
20
+ value
21
+ } from "./chunk-1jabs81x.js";
26
22
  import {
27
23
  unwrap,
28
24
  drainFork,
@@ -31,49 +27,7 @@ import {
31
27
  runCollect,
32
28
  runDrain,
33
29
  mkString
34
- } from "./chunk-h7zb6d3z.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;
30
+ } from "./chunk-avhqm9p0.js";
77
31
 
78
32
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Brand.js
79
33
  function nominal() {
@@ -101,7 +55,7 @@ var HandleProto = {
101
55
  var makeHandle = (params) => Object.setPrototypeOf({
102
56
  ...params
103
57
  }, HandleProto);
104
- var make2 = (spawn) => {
58
+ var make = (spawn) => {
105
59
  const streamString = (command, options) => spawn(command).pipe(map8((handle) => decodeText(options?.includeStderr === true ? handle.all : drainFork(handle.stdout, handle.stderr))), unwrap);
106
60
  const streamLines = (command, options) => splitLines(streamString(command, options));
107
61
  return ChildProcessSpawner.of({
@@ -222,7 +176,7 @@ var parseTemplate = (texts, values) => {
222
176
  if (word.length === 0)
223
177
  return;
224
178
  const value = word.map(unwrap2).join("");
225
- words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make(value) : value);
179
+ words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make16(value) : value);
226
180
  word = [];
227
181
  plain = true;
228
182
  braceDepth = 0;
@@ -312,23 +266,23 @@ var parseTemplate = (texts, values) => {
312
266
  };
313
267
 
314
268
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/process/ChildProcess.js
315
- var TypeId2 = "~effect/process/ChildProcess";
316
- var Proto2 = {
269
+ var TypeId = "~effect/process/ChildProcess";
270
+ var Proto = {
317
271
  .../* @__PURE__ */ Prototype({
318
272
  label: "Command",
319
273
  evaluate(fiber) {
320
274
  return getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);
321
275
  }
322
276
  }),
323
- [TypeId2]: TypeId2
277
+ [TypeId]: TypeId
324
278
  };
325
- var makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto2), {
279
+ var makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto), {
326
280
  _tag: "StandardCommand",
327
281
  command,
328
282
  args,
329
283
  options
330
284
  });
331
- var make3 = function make(...args) {
285
+ var make2 = function make(...args) {
332
286
  if (isTemplateString(args[0])) {
333
287
  const [templates, ...expressions] = args;
334
288
  const [command, cmdArgs] = parseTemplate2(templates, expressions);
@@ -386,4 +340,4 @@ var shellScript = (templates, expressions) => {
386
340
  }
387
341
  return script;
388
342
  };
389
- export { isRedacted, make, value, ExitCode, ProcessId, makeHandle, make2, ChildProcessSpawner, display, make3, parseFdName, fdName };
343
+ export { ExitCode, ProcessId, makeHandle, make, ChildProcessSpawner, display, make2, parseFdName, fdName };