@kitman-sh/cli 0.16.1 → 0.18.0

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 (28) hide show
  1. package/dist/{chunk-scwj3w7m.js → chunk-1j38xtvp.js} +2 -2
  2. package/dist/{chunk-9qfyb5r2.js → chunk-2bagaygt.js} +6 -6
  3. package/dist/{chunk-yja59yh8.js → chunk-4p1k3yyc.js} +17 -17
  4. package/dist/{chunk-x83q18w0.js → chunk-4qjfn1sa.js} +1 -1
  5. package/dist/{chunk-gwzzacep.js → chunk-5kqt4bqp.js} +1 -1
  6. package/dist/{chunk-bkteq6b3.js → chunk-63cyj9dh.js} +186 -28
  7. package/dist/{chunk-ft3gnwd1.js → chunk-9jffw2mk.js} +3 -3
  8. package/dist/{chunk-hwqecp0m.js → chunk-bqhfbng3.js} +12 -12
  9. package/dist/{chunk-bcqqrwsk.js → chunk-d3gs4jvd.js} +85 -69
  10. package/dist/{chunk-g1f0cjqe.js → chunk-gap0vmj7.js} +2 -2
  11. package/dist/{chunk-rfnasm3c.js → chunk-h2f26xbd.js} +93 -61
  12. package/dist/{chunk-8f632x21.js → chunk-hj8ex4x6.js} +4 -4
  13. package/dist/{chunk-tx7et9g7.js → chunk-jaa8qjky.js} +9 -9
  14. package/dist/{chunk-eavx040m.js → chunk-js64y97w.js} +4 -4
  15. package/dist/{chunk-tc7td60t.js → chunk-mca2zp8p.js} +4 -4
  16. package/dist/{chunk-1r026thg.js → chunk-mg3mxhxe.js} +6 -6
  17. package/dist/{chunk-4yjcehqr.js → chunk-mqsxwm53.js} +17 -17
  18. package/dist/{chunk-xy3hcdhr.js → chunk-my92qn4x.js} +8 -8
  19. package/dist/{chunk-e42hjb3j.js → chunk-n05bj55h.js} +29 -29
  20. package/dist/{chunk-b0b9v7t9.js → chunk-nfnw3dh1.js} +8 -8
  21. package/dist/{chunk-djdhep8n.js → chunk-samxkpbz.js} +3 -3
  22. package/dist/{chunk-f2y0z04q.js → chunk-tsx0347c.js} +1 -1
  23. package/dist/{chunk-sd8b4k1t.js → chunk-vz38kngm.js} +2 -2
  24. package/dist/{chunk-3b198ntn.js → chunk-wg6xkkcr.js} +1 -1
  25. package/dist/{chunk-5s4sgrak.js → chunk-x8zzax0f.js} +10 -10
  26. package/dist/{chunk-dxfab1aj.js → chunk-zmqm4mrm.js} +110 -274
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -12,7 +12,7 @@ import {
12
12
  add,
13
13
  getOrUndefinedUnsafe,
14
14
  getUnsafe,
15
- get3,
15
+ get4,
16
16
  Reference,
17
17
  toMillis,
18
18
  isSuccess,
@@ -96,7 +96,19 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-rfnasm3c.js";
99
+ } from "./chunk-h2f26xbd.js";
100
+ import {
101
+ interrupt,
102
+ getCurrent,
103
+ makeUnsafe2,
104
+ bounded,
105
+ offerAll,
106
+ failCause,
107
+ end,
108
+ shutdownUnsafe,
109
+ fromQueue,
110
+ unwrap
111
+ } from "./chunk-63cyj9dh.js";
100
112
  import {
101
113
  Clock,
102
114
  empty,
@@ -111,19 +123,7 @@ import {
111
123
  ParseOptions,
112
124
  RpcClientDefect,
113
125
  RpcClientError
114
- } from "./chunk-dxfab1aj.js";
115
- import {
116
- interrupt,
117
- getCurrent,
118
- makeUnsafe2,
119
- bounded,
120
- offerAll,
121
- failCause,
122
- end,
123
- shutdownUnsafe,
124
- fromQueue,
125
- unwrap
126
- } from "./chunk-bkteq6b3.js";
126
+ } from "./chunk-zmqm4mrm.js";
127
127
 
128
128
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
129
129
  class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
@@ -237,7 +237,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
237
237
  const disableTracing = options?.disableTracing ?? false;
238
238
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
239
239
  const services = yield* context();
240
- const scope = get3(services, Scope);
240
+ const scope = get4(services, Scope);
241
241
  const entries = new Map;
242
242
  let isShutdown = false;
243
243
  yield* addFinalizer(scope, withFiber2((parent) => {
@@ -643,7 +643,7 @@ var makeRpcSchemas = (codecFor) => {
643
643
  return entry;
644
644
  }
645
645
  const streamSchemas = getStreamSchemas(rpc.successSchema);
646
- const parseOptions = get3(rpc.annotations, ParseOptions);
646
+ const parseOptions = get4(rpc.annotations, ParseOptions);
647
647
  const exitSchema2 = exitSchema(rpc);
648
648
  let decodeDiscardExit;
649
649
  entry = {
@@ -1,4 +1,9 @@
1
1
  // @bun
2
+ import {
3
+ make11,
4
+ runForEach,
5
+ compiled2
6
+ } from "./chunk-63cyj9dh.js";
2
7
  import {
3
8
  getOrUndefined,
4
9
  liftThrowable,
@@ -25,16 +30,11 @@ import {
25
30
  isJsonObject,
26
31
  isString2,
27
32
  encodeUnknownJsonStringSync
28
- } from "./chunk-rfnasm3c.js";
29
- import {
30
- make10,
31
- runForEach,
32
- compiled2
33
- } from "./chunk-bkteq6b3.js";
33
+ } from "./chunk-h2f26xbd.js";
34
34
  import {
35
35
  ChildProcessSpawner,
36
36
  make3
37
- } from "./chunk-g1f0cjqe.js";
37
+ } from "./chunk-gap0vmj7.js";
38
38
 
39
39
  // packages/agent-runtime/src/opencode-store.ts
40
40
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -173,7 +173,7 @@ var isolatedRead = (store, name, input) => gen(function* () {
173
173
  const spawner = yield* ChildProcessSpawner;
174
174
  const [command, ...args] = opencodeReaderCommand();
175
175
  const handle = yield* spawner.spawn(make3(command, args, {
176
- stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
176
+ stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
177
177
  stderr: "ignore",
178
178
  extendEnv: false,
179
179
  env: {},
@@ -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,
@@ -108,7 +108,19 @@ import {
108
108
  decodeJsonStringOption,
109
109
  encodeJsonStringSync,
110
110
  encodePrettyJsonString
111
- } from "./chunk-rfnasm3c.js";
111
+ } from "./chunk-h2f26xbd.js";
112
+ import {
113
+ tap,
114
+ mapError,
115
+ decodeText,
116
+ run,
117
+ mkString,
118
+ FileSystem,
119
+ Path,
120
+ withDefault,
121
+ option,
122
+ String2
123
+ } from "./chunk-63cyj9dh.js";
112
124
  import {
113
125
  currentTimeMillis,
114
126
  SecureRandom,
@@ -239,27 +251,15 @@ import {
239
251
  harnessNames,
240
252
  herdrRunnerCapabilities2,
241
253
  declaredChecks
242
- } from "./chunk-dxfab1aj.js";
243
- import {
244
- tap,
245
- mapError,
246
- decodeText,
247
- run,
248
- mkString,
249
- FileSystem,
250
- Path,
251
- withDefault,
252
- option,
253
- String2
254
- } from "./chunk-bkteq6b3.js";
254
+ } from "./chunk-zmqm4mrm.js";
255
255
  import {
256
256
  ChildProcessSpawner,
257
257
  make3
258
- } from "./chunk-g1f0cjqe.js";
258
+ } from "./chunk-gap0vmj7.js";
259
259
  import {
260
260
  Id,
261
261
  Timestamp
262
- } from "./chunk-x83q18w0.js";
262
+ } from "./chunk-4qjfn1sa.js";
263
263
 
264
264
  // apps/cli/src/cli-error.ts
265
265
  function cliErrorCode(error, status) {
@@ -1326,10 +1326,10 @@ var sandboxMissing = (sandbox, missing) => ({
1326
1326
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1327
1327
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1328
1328
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1329
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8f632x21.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1329
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-hj8ex4x6.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1330
1330
  });
1331
1331
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1332
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8f632x21.js")), (module) => module.updateHerdrCore(options))
1332
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-hj8ex4x6.js")), (module) => module.updateHerdrCore(options))
1333
1333
  });
1334
1334
  var herdrCoreMissing = (error) => {
1335
1335
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1773,7 +1773,7 @@ var syncTargets = (harness) => gen(function* () {
1773
1773
  });
1774
1774
  var syncKits = (input) => gen(function* () {
1775
1775
  const fs = yield* FileSystem;
1776
- const { syncKitSetup } = yield* promise(() => import("./chunk-5s4sgrak.js"));
1776
+ const { syncKitSetup } = yield* promise(() => import("./chunk-x8zzax0f.js"));
1777
1777
  const harnesses = yield* syncTargets(input.harness);
1778
1778
  const chain = yield* input.client.getKitChain(input.workspaceId);
1779
1779
  for (const { name, problem } of chain.skipped)
@@ -3268,7 +3268,7 @@ var shipped_steps_generated_default = {
3268
3268
  };
3269
3269
 
3270
3270
  // apps/cli/src/scaffold-files.ts
3271
- var cliVersion = "0.16.1";
3271
+ var cliVersion = "0.18.0";
3272
3272
  var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
3273
3273
  var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
3274
3274
  var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
@@ -3533,7 +3533,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
3533
3533
 
3534
3534
  // apps/cli/src/commands.ts
3535
3535
  var ClientId = "kitman-cli";
3536
- var agentRuntime = promise(() => import("./chunk-bcqqrwsk.js"));
3536
+ var agentRuntime = promise(() => import("./chunk-d3gs4jvd.js"));
3537
3537
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
3538
3538
  defaultValue: () => gen(function* () {
3539
3539
  const tui = yield* tryPromise({
@@ -5072,7 +5072,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
5072
5072
  });
5073
5073
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
5074
5074
  defaultValue: () => (options) => gen(function* () {
5075
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-9qfyb5r2.js"));
5075
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-2bagaygt.js"));
5076
5076
  return yield* makeRunnerRpcClient({
5077
5077
  runnerId: options.runnerId,
5078
5078
  bearer: options.bearer,
@@ -5385,7 +5385,7 @@ function startCanonicalHerdrRunnerCommand(input) {
5385
5385
  yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map9(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);
5386
5386
  yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
5387
5387
  const platform = yield* context();
5388
- const updated = yield* make15();
5388
+ const updated = yield* make16();
5389
5389
  const scope = yield* scope2;
5390
5390
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
5391
5391
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -5645,7 +5645,7 @@ function mcpCommand(args) {
5645
5645
  if (command.action === "run") {
5646
5646
  if (command.args.length > 0)
5647
5647
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
5648
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-b0b9v7t9.js"));
5648
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-nfnw3dh1.js"));
5649
5649
  return yield* runMcpServerCommand({ flags: command.flags });
5650
5650
  }
5651
5651
  if (command.action !== "setup")
@@ -6145,7 +6145,7 @@ function programLoopCommand(command) {
6145
6145
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
6146
6146
  });
6147
6147
  }
6148
- var docsModule = promise(() => import("./chunk-3b198ntn.js"));
6148
+ var docsModule = promise(() => import("./chunk-wg6xkkcr.js"));
6149
6149
  function docsCommand(args) {
6150
6150
  return gen(function* () {
6151
6151
  const command = parseCommand(args);
@@ -7149,7 +7149,7 @@ function changeRequestCommand(args) {
7149
7149
  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}`);
7150
7150
  });
7151
7151
  }
7152
- var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-yja59yh8.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7152
+ var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-4p1k3yyc.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7153
7153
  var loopOutline = (command) => gen(function* () {
7154
7154
  const path = yield* Path;
7155
7155
  const loop = requiredArg(command, "a Loop id");
@@ -7169,9 +7169,9 @@ var loopOutline = (command) => gen(function* () {
7169
7169
  `).pipe(mapError2((error) => new CliError({ message: error.message })));
7170
7170
  yield* log(`Wrote the outline of ${loop} to ${out}`);
7171
7171
  });
7172
- var KitWriter = map9(promise(() => import("./chunk-yja59yh8.js")), (build) => build.writeKit);
7172
+ var KitWriter = map9(promise(() => import("./chunk-4p1k3yyc.js")), (build) => build.writeKit);
7173
7173
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
7174
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-yja59yh8.js")), (build) => build.buildKit(directory))
7174
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-4p1k3yyc.js")), (build) => build.buildKit(directory))
7175
7175
  });
7176
7176
  var uploadKit = (client, workspaceId, built) => gen(function* () {
7177
7177
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -118,7 +118,7 @@ import {
118
118
  decodeJsonStringOption,
119
119
  encodeJsonStringSync,
120
120
  encodePrettyJsonString
121
- } from "./chunk-rfnasm3c.js";
121
+ } from "./chunk-h2f26xbd.js";
122
122
  import {
123
123
  currentTimeMillis,
124
124
  SecureRandom,
@@ -170,7 +170,7 @@ import {
170
170
  runMcpEffect,
171
171
  createAgentAuthSignedFetch,
172
172
  setupMcpAgentCredential
173
- } from "./chunk-dxfab1aj.js";
173
+ } from "./chunk-zmqm4mrm.js";
174
174
  import {
175
175
  join,
176
176
  interrupt,
@@ -187,30 +187,30 @@ import {
187
187
  withDefault,
188
188
  option,
189
189
  String2
190
- } from "./chunk-bkteq6b3.js";
190
+ } from "./chunk-63cyj9dh.js";
191
191
  import {
192
192
  searchDocs2,
193
193
  readDoc2
194
- } from "./chunk-tc7td60t.js";
194
+ } from "./chunk-mca2zp8p.js";
195
195
  import {
196
196
  nextInt
197
- } from "./chunk-gwzzacep.js";
197
+ } from "./chunk-5kqt4bqp.js";
198
198
  import {
199
199
  recommendationProblem
200
- } from "./chunk-f2y0z04q.js";
200
+ } from "./chunk-tsx0347c.js";
201
201
  import {
202
202
  layerJson,
203
203
  make4,
204
204
  withHeaders,
205
205
  layerProtocolSocket,
206
206
  ConnectionHooks
207
- } from "./chunk-4yjcehqr.js";
207
+ } from "./chunk-mqsxwm53.js";
208
208
  import {
209
209
  guard,
210
210
  Id,
211
211
  Timestamp,
212
212
  ActorType
213
- } from "./chunk-x83q18w0.js";
213
+ } from "./chunk-4qjfn1sa.js";
214
214
 
215
215
  // apps/cli/src/mcp.ts
216
216
  import { tmpdir as tmpdir2 } from "os";
@@ -4,9 +4,9 @@ import {
4
4
  opaqueTunnelRefusal2,
5
5
  isOpaqueConnectReason2,
6
6
  runSrtStep2
7
- } from "./chunk-sd8b4k1t.js";
8
- import"./chunk-x83q18w0.js";
9
- import"./chunk-rfnasm3c.js";
7
+ } from "./chunk-vz38kngm.js";
8
+ import"./chunk-4qjfn1sa.js";
9
+ import"./chunk-h2f26xbd.js";
10
10
  export {
11
11
  isOpaqueConnectReason2 as isOpaqueConnectReason,
12
12
  opaqueTunnelRefusal2 as opaqueTunnelRefusal,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isString2
4
- } from "./chunk-rfnasm3c.js";
4
+ } from "./chunk-h2f26xbd.js";
5
5
 
6
6
  // packages/core/src/question-recommendation.ts
7
7
  var optionValue = (option) => isString2(option) ? option : option.value;
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-rfnasm3c.js";
16
+ } from "./chunk-h2f26xbd.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-x83q18w0.js";
20
+ } from "./chunk-4qjfn1sa.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-tc7td60t.js";
7
+ } from "./chunk-mca2zp8p.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ FileSystem,
4
+ Path
5
+ } from "./chunk-63cyj9dh.js";
2
6
  import {
3
7
  isObject,
4
8
  isUint8Array,
@@ -13,17 +17,13 @@ import {
13
17
  isJsonObject,
14
18
  decodeJsonString,
15
19
  encodePrettyJsonString
16
- } from "./chunk-rfnasm3c.js";
17
- import {
18
- FileSystem,
19
- Path
20
- } from "./chunk-bkteq6b3.js";
20
+ } from "./chunk-h2f26xbd.js";
21
21
  import {
22
22
  tomlTableHeader2,
23
23
  tomlKeyPath2,
24
24
  kitmanSkillEntry,
25
25
  isPathWithin2
26
- } from "./chunk-tx7et9g7.js";
26
+ } from "./chunk-jaa8qjky.js";
27
27
  import {
28
28
  instructionsStart,
29
29
  instructionsEnd,
@@ -31,10 +31,10 @@ import {
31
31
  antigravityPlugins,
32
32
  materializeKitSetup,
33
33
  tomlInline
34
- } from "./chunk-dxfab1aj.js";
35
- import"./chunk-ft3gnwd1.js";
36
- import"./chunk-g1f0cjqe.js";
37
- import"./chunk-x83q18w0.js";
34
+ } from "./chunk-zmqm4mrm.js";
35
+ import"./chunk-9jffw2mk.js";
36
+ import"./chunk-gap0vmj7.js";
37
+ import"./chunk-4qjfn1sa.js";
38
38
 
39
39
  // packages/agent-runtime/src/kit-setup-sync.ts
40
40
  class KitSyncError extends TaggedError("KitSyncError") {