@kitman-sh/cli 0.12.0-rc.2 → 0.12.0-rc.3

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.
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-vmv7gwwr.js";
11
- import"./chunk-sk6ceghr.js";
10
+ } from "./chunk-56knbdt6.js";
11
+ import"./chunk-xwya1er0.js";
12
12
  import"./chunk-c6rbt85q.js";
13
- import"./chunk-3d4d52e5.js";
13
+ import"./chunk-gspfm7qh.js";
14
14
  import"./chunk-vtfwjhzh.js";
15
15
  export {
16
16
  decoded2 as decoded,
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-myqf27w2.js";
8
- import"./chunk-db9q9y8h.js";
9
- import"./chunk-fhyn2b38.js";
7
+ } from "./chunk-y8sscyvt.js";
8
+ import"./chunk-794hjysw.js";
9
+ import"./chunk-dymepetx.js";
10
10
  import"./chunk-0qz10ek8.js";
11
11
  import"./chunk-c6rbt85q.js";
12
- import"./chunk-3d4d52e5.js";
12
+ import"./chunk-gspfm7qh.js";
13
13
  import"./chunk-vtfwjhzh.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
@@ -32,11 +32,11 @@ import {
32
32
  make11,
33
33
  runForEach,
34
34
  compiled2
35
- } from "./chunk-3d4d52e5.js";
35
+ } from "./chunk-gspfm7qh.js";
36
36
  import {
37
37
  ChildProcessSpawner,
38
38
  make3
39
- } from "./chunk-sk6ceghr.js";
39
+ } from "./chunk-xwya1er0.js";
40
40
 
41
41
  // packages/agent-runtime/src/opencode-store.ts
42
42
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -42,7 +42,7 @@ import {
42
42
  Path,
43
43
  withDefault,
44
44
  String2
45
- } from "./chunk-3d4d52e5.js";
45
+ } from "./chunk-gspfm7qh.js";
46
46
  import {
47
47
  SecureRandom,
48
48
  layerWebCrypto,
@@ -54,23 +54,23 @@ import {
54
54
  layer4,
55
55
  kitmanMcpServer,
56
56
  RunnerRpcProtocolVersion
57
- } from "./chunk-fhyn2b38.js";
57
+ } from "./chunk-dymepetx.js";
58
58
  import {
59
59
  Packument,
60
60
  tarballMatches
61
- } from "./chunk-n6hxwdm6.js";
62
- import"./chunk-myqf27w2.js";
61
+ } from "./chunk-e7e120qw.js";
62
+ import"./chunk-y8sscyvt.js";
63
63
  import {
64
64
  AgentDeclaration,
65
65
  KitDeclarations,
66
66
  describeFlag,
67
67
  Described
68
- } from "./chunk-2ptxq9cq.js";
68
+ } from "./chunk-8ez1s9cr.js";
69
69
  import {
70
70
  ChildProcessSpawner,
71
71
  make3
72
- } from "./chunk-sk6ceghr.js";
73
- import"./chunk-db9q9y8h.js";
72
+ } from "./chunk-xwya1er0.js";
73
+ import"./chunk-794hjysw.js";
74
74
 
75
75
  // packages/sdk/src/build/index.ts
76
76
  class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-3d4d52e5.js";
111
+ } from "./chunk-gspfm7qh.js";
112
112
  import {
113
113
  Clock,
114
114
  empty,
@@ -123,7 +123,7 @@ import {
123
123
  ParseOptions,
124
124
  RpcClientDefect,
125
125
  RpcClientError
126
- } from "./chunk-fhyn2b38.js";
126
+ } from "./chunk-dymepetx.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")) {
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-fhyn2b38.js";
108
+ } from "./chunk-dymepetx.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-3d4d52e5.js";
112
+ } from "./chunk-gspfm7qh.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");
@@ -664,7 +664,9 @@ var NoteRequest = Struct({
664
664
  });
665
665
  var CreateTasksRequest = Struct({
666
666
  tickets: ArraySchema(PlanTicket),
667
- projectId: optionalKey(String4)
667
+ projectId: optionalKey(String4),
668
+ builds: optionalKey(Boolean2),
669
+ releases: optionalKey(Boolean2)
668
670
  });
669
671
  var CreateTasksResult = Struct({
670
672
  tasks: ArraySchema(Struct({ key: String4, taskId: String4 }))
@@ -709,7 +711,8 @@ var ApproveChangeRequestRequest = Struct({
709
711
  head: String4,
710
712
  summary: String4,
711
713
  review: optionalKey(String4),
712
- carries: optionalKey(String4)
714
+ carries: optionalKey(String4),
715
+ reuses: optionalKey(String4)
713
716
  });
714
717
  var ApproveChangeRequestResult = Union([
715
718
  Struct({ approved: Literal(true), reviewId: String4 }),
@@ -768,6 +771,7 @@ var PipelineStatus = Struct({
768
771
  runnerChecks: optionalKey(ArraySchema(String4)),
769
772
  targetChecks: optionalKey(ArraySchema(String4)),
770
773
  approved: optionalKey(String4),
774
+ reviewed: optionalKey(Struct({ review: String4, notRun: optionalKey(ArraySchema(String4)) })),
771
775
  repository: optionalKey(String4),
772
776
  sourceBranch: optionalKey(String4),
773
777
  targetBranch: optionalKey(String4),
@@ -316,7 +316,7 @@ import {
316
316
  String2,
317
317
  optionalEnv,
318
318
  harnessesUnsupportedInSrt2
319
- } from "./chunk-3d4d52e5.js";
319
+ } from "./chunk-gspfm7qh.js";
320
320
  import {
321
321
  isDateTime,
322
322
  Numeric,
@@ -357,7 +357,7 @@ import {
357
357
  make3,
358
358
  parseFdName,
359
359
  fdName
360
- } from "./chunk-sk6ceghr.js";
360
+ } from "./chunk-xwya1er0.js";
361
361
 
362
362
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
363
363
  var makeEquivalence3 = Tuple;
@@ -14553,6 +14553,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14553
14553
  runnerChecks: optionalKey(ArraySchema(String4)),
14554
14554
  targetChecks: optionalKey(ArraySchema(String4)),
14555
14555
  approved: optionalKey(String4),
14556
+ reviewed: optionalKey(Struct({ review: String4, notRun: optionalKey(ArraySchema(String4)) })),
14556
14557
  repository: optionalKey(String4),
14557
14558
  sourceBranch: optionalKey(String4),
14558
14559
  targetBranch: optionalKey(String4),
@@ -14684,13 +14685,16 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14684
14685
  payload: {
14685
14686
  lease: ProgramLease,
14686
14687
  projectId: optionalKey(String4),
14688
+ builds: optionalKey(Boolean2),
14689
+ releases: optionalKey(Boolean2),
14687
14690
  tickets: ArraySchema(Struct({
14688
14691
  key: String4,
14689
14692
  title: String4,
14690
14693
  body: String4,
14691
14694
  acceptanceCriteria: ArraySchema(String4),
14692
14695
  blockedBy: ArraySchema(String4),
14693
- outcome: optionalKey(Literals(["feature", "bug", "refactor", "investigation", "docs", "migration", "performance"]))
14696
+ outcome: optionalKey(Literals(["feature", "bug", "refactor", "investigation", "docs", "migration", "performance"])),
14697
+ repoBindingId: optionalKey(String4)
14694
14698
  }))
14695
14699
  },
14696
14700
  success: ArraySchema(Struct({ key: String4, taskId: String4 })),
@@ -14729,7 +14733,8 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14729
14733
  head: String4,
14730
14734
  summary: String4,
14731
14735
  review: optionalKey(String4),
14732
- carries: optionalKey(String4)
14736
+ carries: optionalKey(String4),
14737
+ reuses: optionalKey(String4)
14733
14738
  },
14734
14739
  success: Union([
14735
14740
  Struct({ approved: Literal(true), reviewId: String4 }),
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-3d4d52e5.js";
31
+ } from "./chunk-gspfm7qh.js";
32
32
  import {
33
33
  digestSha256,
34
34
  digestSha512,
@@ -38,7 +38,7 @@ import {
38
38
  get2,
39
39
  layer4,
40
40
  KitDigest
41
- } from "./chunk-fhyn2b38.js";
41
+ } from "./chunk-dymepetx.js";
42
42
 
43
43
  // packages/core/src/npm-registry.ts
44
44
  var KitManifest = Struct({
@@ -14,7 +14,7 @@ import {
14
14
  writeSrtSettings2,
15
15
  srtStepArgv2,
16
16
  srtArgv2
17
- } from "./chunk-3d4d52e5.js";
17
+ } from "./chunk-gspfm7qh.js";
18
18
  import"./chunk-vtfwjhzh.js";
19
19
  export {
20
20
  compiled2 as compiled,
@@ -166,6 +166,7 @@ import {
166
166
  scope2,
167
167
  scoped,
168
168
  scopedWith,
169
+ acquireRelease,
169
170
  ensuring2,
170
171
  onError,
171
172
  onExitPrimitive2,
@@ -181,6 +182,7 @@ import {
181
182
  runForkWith,
182
183
  runPromise,
183
184
  fnUntraced,
185
+ logWarning,
184
186
  mapEager,
185
187
  flatMapEager,
186
188
  catchEager,
@@ -3465,6 +3467,9 @@ var optionalEnv = (name) => gen(function* () {
3465
3467
  }));
3466
3468
  var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(map8((configHome) => configHome ?? `${home}/.config`));
3467
3469
 
3470
+ // packages/agent-runtime/src/temp-directory.ts
3471
+ var tempDirectoryScoped = (fs, options) => acquireRelease(fs.makeTempDirectory(options), (directory) => fs.remove(directory, { recursive: true, force: true }).pipe(catch_((error) => logWarning("temp_directory_not_removed", { directory, error: error.message }))));
3472
+
3468
3473
  // packages/agent-runtime/src/srt-sandbox.ts
3469
3474
  var harnessesUnsupportedInSrt2 = ["codex"];
3470
3475
  var compiled2 = import.meta.url.startsWith("file:///$bunfs/");
@@ -3538,7 +3543,7 @@ var writeSrtSettings2 = (policy, unixSockets) => gen(function* () {
3538
3543
  const settings = srtSettings2({ ...policy, readAllowedPaths }, seccomp === undefined ? [] : [seccomp], unixSockets);
3539
3544
  if (settings === undefined)
3540
3545
  return yield* die3(new Error("srt cannot run a Step with an open network"));
3541
- const dir = yield* fs.makeTempDirectoryScoped({ prefix: "kitman-srt-" });
3546
+ const dir = yield* tempDirectoryScoped(fs, { prefix: "kitman-srt-" });
3542
3547
  const settingsFile = path.join(dir, "srt-settings.json");
3543
3548
  yield* fs.writeFileString(settingsFile, encodeUnknownJsonStringSync(applyPath === undefined ? settings : { ...settings, seccomp: { applyPath } }));
3544
3549
  return { dir, settingsFile };
@@ -3552,4 +3557,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3552
3557
  ...argv
3553
3558
  ];
3554
3559
 
3555
- export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make10, get3, isStream, fromChannel2, callback, empty2, make11, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make12, FileTypeId, WatchBackend, Path, make13, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, harnessesUnsupportedInSrt2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
3560
+ export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make10, get3, isStream, fromChannel2, callback, empty2, make11, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make12, FileTypeId, WatchBackend, Path, make13, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
@@ -108,7 +108,7 @@ import {
108
108
  withDefault,
109
109
  option,
110
110
  String2
111
- } from "./chunk-3d4d52e5.js";
111
+ } from "./chunk-gspfm7qh.js";
112
112
  import {
113
113
  currentTimeMillis,
114
114
  SecureRandom,
@@ -218,7 +218,7 @@ import {
218
218
  harnessNames,
219
219
  herdrRunnerCapabilities2,
220
220
  declaredChecks
221
- } from "./chunk-fhyn2b38.js";
221
+ } from "./chunk-dymepetx.js";
222
222
  import {
223
223
  Id
224
224
  } from "./chunk-0qz10ek8.js";
@@ -235,7 +235,7 @@ import {
235
235
  import {
236
236
  ChildProcessSpawner,
237
237
  make3
238
- } from "./chunk-sk6ceghr.js";
238
+ } from "./chunk-xwya1er0.js";
239
239
 
240
240
  // apps/cli/src/cli-error.ts
241
241
  function cliErrorCode(error, status) {
@@ -987,10 +987,10 @@ var sandboxMissing = (sandbox, missing) => ({
987
987
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
988
988
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
989
989
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
990
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-rzzd7zv3.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
990
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-jef2vdr6.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
991
991
  });
992
992
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
993
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-rzzd7zv3.js")), (module) => module.updateHerdrCore(options))
993
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-jef2vdr6.js")), (module) => module.updateHerdrCore(options))
994
994
  });
995
995
  var herdrCoreMissing = (error) => {
996
996
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1410,7 +1410,7 @@ var syncTargets = (harness) => gen(function* () {
1410
1410
  });
1411
1411
  var syncKits = (input) => gen(function* () {
1412
1412
  const fs = yield* FileSystem;
1413
- const { syncKitSetup } = yield* promise(() => import("./chunk-2k08hw5q.js"));
1413
+ const { syncKitSetup } = yield* promise(() => import("./chunk-y73z1kkz.js"));
1414
1414
  const harnesses = yield* syncTargets(input.harness);
1415
1415
  const chain = yield* input.client.getKitChain(input.workspaceId);
1416
1416
  for (const { name, problem } of chain.skipped)
@@ -2328,7 +2328,7 @@ var package_default = {
2328
2328
  };
2329
2329
 
2330
2330
  // apps/cli/src/scaffold.ts
2331
- var cliVersion = "0.12.0-rc.2";
2331
+ var cliVersion = "0.12.0-rc.3";
2332
2332
  var packageJson = (name, scaffold) => `${JSON.stringify({
2333
2333
  name,
2334
2334
  private: true,
@@ -2480,7 +2480,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2480
2480
 
2481
2481
  // apps/cli/src/commands.ts
2482
2482
  var ClientId = "kitman-cli";
2483
- var agentRuntime = promise(() => import("./chunk-6pz3nsn5.js"));
2483
+ var agentRuntime = promise(() => import("./chunk-x55v5kyg.js"));
2484
2484
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2485
2485
  defaultValue: () => gen(function* () {
2486
2486
  const tui = yield* tryPromise({
@@ -3482,7 +3482,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3482
3482
  });
3483
3483
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3484
3484
  defaultValue: () => (options) => gen(function* () {
3485
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-emh8zw7k.js"));
3485
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-2gg3ccte.js"));
3486
3486
  return yield* makeRunnerRpcClient({
3487
3487
  runnerId: options.runnerId,
3488
3488
  bearer: options.bearer,
@@ -4014,7 +4014,7 @@ function mcpCommand(args) {
4014
4014
  if (command.action === "run") {
4015
4015
  if (command.args.length > 0)
4016
4016
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4017
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-7gnrnv4a.js"));
4017
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-ks3p7yha.js"));
4018
4018
  return yield* runMcpServerCommand({ flags: command.flags });
4019
4019
  }
4020
4020
  if (command.action !== "setup")
@@ -4502,7 +4502,7 @@ function programLoopCommand(command) {
4502
4502
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4503
4503
  });
4504
4504
  }
4505
- var docsModule = promise(() => import("./chunk-yfamq8xw.js"));
4505
+ var docsModule = promise(() => import("./chunk-yatva7be.js"));
4506
4506
  function docsCommand(args) {
4507
4507
  return gen(function* () {
4508
4508
  const command = parseCommand(args);
@@ -5322,9 +5322,9 @@ function changeRequestCommand(args) {
5322
5322
  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}`);
5323
5323
  });
5324
5324
  }
5325
- var KitWriter = map8(promise(() => import("./chunk-4f72nbw2.js")), (build) => build.writeKit);
5325
+ var KitWriter = map8(promise(() => import("./chunk-6akwhwyp.js")), (build) => build.writeKit);
5326
5326
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5327
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-4f72nbw2.js")), (build) => build.buildKit(directory))
5327
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-6akwhwyp.js")), (build) => build.buildKit(directory))
5328
5328
  });
5329
5329
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5330
5330
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-sk6ceghr.js";
2
+ import"./chunk-xwya1er0.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,8 +12,8 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-fhyn2b38.js";
16
- import"./chunk-3d4d52e5.js";
15
+ } from "./chunk-dymepetx.js";
16
+ import"./chunk-gspfm7qh.js";
17
17
  import"./chunk-vtfwjhzh.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,