@kitman-sh/cli 0.11.3 → 0.11.4

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.
@@ -248,6 +248,15 @@ var makeEquivalence = (equivalence) => {
248
248
  return (self, that) => is(self, that) && is(that, self);
249
249
  };
250
250
 
251
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
252
+ var BigInt2 = globalThis.BigInt;
253
+ var toNumber = (b) => {
254
+ if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
255
+ return none();
256
+ }
257
+ return some(Number(b));
258
+ };
259
+
251
260
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
252
261
  var bigint0 = /* @__PURE__ */ BigInt(0);
253
262
  var bigint1 = /* @__PURE__ */ BigInt(1);
@@ -3552,4 +3561,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3552
3561
  ...argv
3553
3562
  ];
3554
3563
 
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 };
3564
+ export { map, makeEquivalence, toNumber, 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 };
@@ -31,7 +31,7 @@ import {
31
31
  runCollect,
32
32
  runDrain,
33
33
  mkString
34
- } from "./chunk-3d4d52e5.js";
34
+ } from "./chunk-0b93nv6j.js";
35
35
 
36
36
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
37
37
  var redactedRegistry = /* @__PURE__ */ new WeakMap;
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-3d4d52e5.js";
111
+ } from "./chunk-0b93nv6j.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-5scsh754.js";
126
+ } from "./chunk-qh5pwxdk.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")) {
@@ -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-kpfrhex3.js";
11
+ import"./chunk-2qarscbj.js";
12
12
  import"./chunk-c6rbt85q.js";
13
- import"./chunk-3d4d52e5.js";
13
+ import"./chunk-0b93nv6j.js";
14
14
  import"./chunk-vtfwjhzh.js";
15
15
  export {
16
16
  decoded2 as decoded,
@@ -108,7 +108,7 @@ import {
108
108
  withDefault,
109
109
  option,
110
110
  String2
111
- } from "./chunk-3d4d52e5.js";
111
+ } from "./chunk-0b93nv6j.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-5scsh754.js";
221
+ } from "./chunk-qh5pwxdk.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-2qarscbj.js";
239
239
 
240
240
  // apps/cli/src/cli-error.ts
241
241
  function cliErrorCode(error, status) {
@@ -530,10 +530,10 @@ var sandboxMissing = (sandbox, missing) => ({
530
530
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
531
531
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
532
532
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
533
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-6f0sjc6r.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
533
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-n9qm4ypc.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
534
534
  });
535
535
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
536
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-6f0sjc6r.js")), (module) => module.updateHerdrCore(options))
536
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-n9qm4ypc.js")), (module) => module.updateHerdrCore(options))
537
537
  });
538
538
  var herdrCoreMissing = (error) => {
539
539
  if (isTagged(error, "HerdrCoreMissing"))
@@ -953,7 +953,7 @@ var syncTargets = (harness) => gen(function* () {
953
953
  });
954
954
  var syncKits = (input) => gen(function* () {
955
955
  const fs = yield* FileSystem;
956
- const { syncKitSetup } = yield* promise(() => import("./chunk-rrg23eed.js"));
956
+ const { syncKitSetup } = yield* promise(() => import("./chunk-8y6shv5e.js"));
957
957
  const harnesses = yield* syncTargets(input.harness);
958
958
  const chain = yield* input.client.getKitChain(input.workspaceId);
959
959
  for (const { name, problem } of chain.skipped)
@@ -1871,7 +1871,7 @@ var package_default = {
1871
1871
  };
1872
1872
 
1873
1873
  // apps/cli/src/scaffold.ts
1874
- var cliVersion = "0.11.3";
1874
+ var cliVersion = "0.11.4";
1875
1875
  var packageJson = (name, scaffold) => `${JSON.stringify({
1876
1876
  name,
1877
1877
  private: true,
@@ -2137,7 +2137,7 @@ var Usage = [
2137
2137
  "Every run, loop, agent, verify, constraint, secret, claim, deploy, dev and kit command takes --json."
2138
2138
  ].join(`
2139
2139
  `);
2140
- var agentRuntime = promise(() => import("./chunk-0ebt5ek2.js"));
2140
+ var agentRuntime = promise(() => import("./chunk-cfda9gtd.js"));
2141
2141
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2142
2142
  defaultValue: () => gen(function* () {
2143
2143
  const tui = yield* tryPromise({
@@ -3134,7 +3134,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3134
3134
  });
3135
3135
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3136
3136
  defaultValue: () => (options) => gen(function* () {
3137
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-t2eqpjdk.js"));
3137
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-brpngwz8.js"));
3138
3138
  return yield* makeRunnerRpcClient({
3139
3139
  runnerId: options.runnerId,
3140
3140
  bearer: options.bearer,
@@ -3658,7 +3658,7 @@ function mcpCommand(args) {
3658
3658
  if (command.action === "run") {
3659
3659
  if (command.args.length > 0)
3660
3660
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
3661
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-45fy4v4q.js"));
3661
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-gp3ad3ne.js"));
3662
3662
  return yield* runMcpServerCommand({ flags: command.flags });
3663
3663
  }
3664
3664
  if (command.action !== "setup")
@@ -4928,9 +4928,9 @@ function changeRequestCommand(args) {
4928
4928
  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}`);
4929
4929
  });
4930
4930
  }
4931
- var KitWriter = map8(promise(() => import("./chunk-x8tn2md0.js")), (build) => build.writeKit);
4931
+ var KitWriter = map8(promise(() => import("./chunk-wpbc3w4f.js")), (build) => build.writeKit);
4932
4932
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
4933
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-x8tn2md0.js")), (build) => build.buildKit(directory))
4933
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-wpbc3w4f.js")), (build) => build.buildKit(directory))
4934
4934
  });
4935
4935
  var uploadKit = (client, workspaceId, built) => gen(function* () {
4936
4936
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ FileSystem,
4
+ Path
5
+ } from "./chunk-0b93nv6j.js";
2
6
  import {
3
7
  isObject2,
4
8
  isUint8Array,
@@ -17,25 +21,21 @@ import"./chunk-0qz10ek8.js";
17
21
  import {
18
22
  isJsonObject
19
23
  } from "./chunk-c6rbt85q.js";
20
- import {
21
- FileSystem,
22
- Path
23
- } from "./chunk-3d4d52e5.js";
24
24
  import {
25
25
  tomlTableHeader2,
26
26
  tomlKeyPath2,
27
27
  kitmanSkillEntry,
28
28
  isPathWithin2
29
- } from "./chunk-30jqf7ez.js";
29
+ } from "./chunk-kg99fa2c.js";
30
30
  import {
31
31
  instructionsStart,
32
32
  instructionsEnd,
33
33
  renderMcpServer,
34
34
  materializeKitSetup,
35
35
  tomlInline
36
- } from "./chunk-5scsh754.js";
37
- import"./chunk-pxrpwv4z.js";
38
- import"./chunk-sk6ceghr.js";
36
+ } from "./chunk-qh5pwxdk.js";
37
+ import"./chunk-rdx91nvh.js";
38
+ import"./chunk-2qarscbj.js";
39
39
 
40
40
  // packages/agent-runtime/src/kit-setup-sync.ts
41
41
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -14,7 +14,7 @@ import {
14
14
  writeSrtSettings2,
15
15
  srtStepArgv2,
16
16
  srtArgv2
17
- } from "./chunk-3d4d52e5.js";
17
+ } from "./chunk-0b93nv6j.js";
18
18
  import"./chunk-vtfwjhzh.js";
19
19
  export {
20
20
  compiled2 as compiled,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-vtfwjhzh.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-3d4d52e5.js";
12
+ } from "./chunk-0b93nv6j.js";
13
13
  import {
14
14
  WebSocketConstructor,
15
15
  layerWebSocketConstructorGlobal,
@@ -19,13 +19,13 @@ import {
19
19
  RunnerReplicaRpcs,
20
20
  RunnerRunFileRpcs,
21
21
  ProgramRpcs
22
- } from "./chunk-5scsh754.js";
22
+ } from "./chunk-qh5pwxdk.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-r2e1ke17.js";
28
+ } from "./chunk-4e0c4zw0.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-3466x4xq.js";
8
- import"./chunk-r2e1ke17.js";
9
- import"./chunk-5scsh754.js";
7
+ } from "./chunk-av04xyxt.js";
8
+ import"./chunk-4e0c4zw0.js";
9
+ import"./chunk-qh5pwxdk.js";
10
10
  import"./chunk-0qz10ek8.js";
11
11
  import"./chunk-c6rbt85q.js";
12
- import"./chunk-3d4d52e5.js";
12
+ import"./chunk-0b93nv6j.js";
13
13
  import"./chunk-vtfwjhzh.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
@@ -7,6 +7,46 @@ import {
7
7
  isJsonObject,
8
8
  isString
9
9
  } from "./chunk-c6rbt85q.js";
10
+ import {
11
+ join,
12
+ interrupt,
13
+ unbounded,
14
+ publishUnsafe,
15
+ unbounded2,
16
+ offer,
17
+ makeUnsafe3,
18
+ make11,
19
+ fromQueue,
20
+ fromPubSub,
21
+ map2,
22
+ filter,
23
+ decodeText,
24
+ encodeText,
25
+ splitLines,
26
+ run,
27
+ runHead,
28
+ runForEach,
29
+ FileSystem,
30
+ Path,
31
+ embeddedFile,
32
+ extractEmbeddedFile,
33
+ optionalEnv,
34
+ operatorConfigHome,
35
+ harnessesUnsupportedInSrt2,
36
+ compiled2,
37
+ pinnedSrtCommand2,
38
+ pinnedSrtStepCommand2,
39
+ runSrtCli2,
40
+ kitmanCacheDirectory2,
41
+ srtSettings2,
42
+ srtCacheEnvironment2,
43
+ srtInheritedEnv2,
44
+ inheritedEnvironment2,
45
+ withOnlyEnvironment2,
46
+ writeSrtSettings2,
47
+ srtStepArgv2,
48
+ srtArgv2
49
+ } from "./chunk-0b93nv6j.js";
10
50
  import {
11
51
  pipeArguments,
12
52
  dual,
@@ -246,47 +286,7 @@ import {
246
286
  installCommand,
247
287
  checkServicesFile,
248
288
  checkServices
249
- } from "./chunk-5scsh754.js";
250
- import {
251
- join,
252
- interrupt,
253
- unbounded,
254
- publishUnsafe,
255
- unbounded2,
256
- offer,
257
- makeUnsafe3,
258
- make11,
259
- fromQueue,
260
- fromPubSub,
261
- map2,
262
- filter,
263
- decodeText,
264
- encodeText,
265
- splitLines,
266
- run,
267
- runHead,
268
- runForEach,
269
- FileSystem,
270
- Path,
271
- embeddedFile,
272
- extractEmbeddedFile,
273
- optionalEnv,
274
- operatorConfigHome,
275
- harnessesUnsupportedInSrt2,
276
- compiled2,
277
- pinnedSrtCommand2,
278
- pinnedSrtStepCommand2,
279
- runSrtCli2,
280
- kitmanCacheDirectory2,
281
- srtSettings2,
282
- srtCacheEnvironment2,
283
- srtInheritedEnv2,
284
- inheritedEnvironment2,
285
- withOnlyEnvironment2,
286
- writeSrtSettings2,
287
- srtStepArgv2,
288
- srtArgv2
289
- } from "./chunk-3d4d52e5.js";
289
+ } from "./chunk-qh5pwxdk.js";
290
290
  import {
291
291
  writeAgentEnvironmentConfigFile2,
292
292
  readManifestSkillPaths2,
@@ -302,8 +302,8 @@ import {
302
302
  applyAgentEnvironmentMaterialization2,
303
303
  isPathWithin2,
304
304
  skillIdentity2
305
- } from "./chunk-30jqf7ez.js";
306
- import"./chunk-pxrpwv4z.js";
305
+ } from "./chunk-kg99fa2c.js";
306
+ import"./chunk-rdx91nvh.js";
307
307
  import {
308
308
  egressAllowed,
309
309
  writeSecretRegistry,
@@ -321,23 +321,23 @@ import {
321
321
  decodedOption2,
322
322
  decoded2,
323
323
  readOpencode2
324
- } from "./chunk-vmv7gwwr.js";
324
+ } from "./chunk-kpfrhex3.js";
325
325
  import {
326
326
  uploadRunFile,
327
327
  programLease,
328
328
  rpcRunFiles,
329
329
  programHostsEnv,
330
330
  undeclaredHostsEnv
331
- } from "./chunk-2t3beh6a.js";
332
- import"./chunk-3466x4xq.js";
331
+ } from "./chunk-myxv5kpp.js";
332
+ import"./chunk-av04xyxt.js";
333
333
  import {
334
334
  nextInt
335
335
  } from "./chunk-nzjb36ad.js";
336
336
  import {
337
337
  ChildProcessSpawner,
338
338
  make3
339
- } from "./chunk-sk6ceghr.js";
340
- import"./chunk-r2e1ke17.js";
339
+ } from "./chunk-2qarscbj.js";
340
+ import"./chunk-4e0c4zw0.js";
341
341
 
342
342
  // packages/core/src/sync-kit.ts
343
343
  import { createHash } from "crypto";
@@ -3084,7 +3084,13 @@ var update = /* @__PURE__ */ dual(2, (self, update) => self.semaphore.withPermit
3084
3084
 
3085
3085
  // packages/agent-runtime/src/claude-workspace-trust.ts
3086
3086
  var withEntry = (object, key, value) => Object.fromEntries([...Object.entries(object), [key, value]]);
3087
- var trustClaudeWorkspace = (home, workspace) => gen(function* () {
3087
+ var writePermits = new Map;
3088
+ var trustClaudeWorkspace = (home, workspace) => {
3089
+ const permit = writePermits.get(home) ?? makeUnsafe3(1);
3090
+ writePermits.set(home, permit);
3091
+ return permit.withPermits(1)(trust(home, workspace));
3092
+ };
3093
+ var trust = (home, workspace) => gen(function* () {
3088
3094
  const fs = yield* FileSystem;
3089
3095
  const file = `${home}/.claude.json`;
3090
3096
  const text = yield* fs.readFileString(file).pipe(catchReason("PlatformError", "NotFound", () => succeed6("{}")));
@@ -4238,8 +4244,10 @@ var runAttempt = (request, options) => gen(function* () {
4238
4244
  }
4239
4245
  });
4240
4246
  const terminal = yield* result(call(run, (connection) => flatMap3(connection.list({ labels: { "kitman.attempt": attempt.id }, all: true }), ([started]) => started === undefined ? run(connection) : succeed6(started))));
4241
- if (isFailure(terminal))
4247
+ if (isFailure(terminal)) {
4248
+ yield* logWarning("agent_launch_failed", { attempt: attempt.id, error: terminal.failure.message });
4242
4249
  return isTagged(terminal.failure, "HerdrCoreRpcError") ? failed("harness_launch_failed", `herdr-core refused to start the Harness: ${terminal.failure.message}`) : { status: "unreported", reason: "herdr_unavailable" };
4250
+ }
4243
4251
  const { address } = terminal.success;
4244
4252
  const seen = yield* make({ status: null, turn: 0, end: undefined });
4245
4253
  yield* forkScoped(follow(options.core, attempt.id, address, seen));
@@ -4249,6 +4257,7 @@ var runAttempt = (request, options) => gen(function* () {
4249
4257
  yield* stopTerminal(call, address, options.teardownDelayMs);
4250
4258
  });
4251
4259
  const outputSubmitted = request.settled.pipe(orElseSucceed(() => false));
4260
+ const readScreen = map8(option2(call((connection) => connection.read(address))), (screen) => isSome(screen) ? redactCredentials(screen.value).trim() : "");
4252
4261
  const judge = (last) => gen(function* () {
4253
4262
  if (yield* outputSubmitted)
4254
4263
  return { status: "settled" };
@@ -4262,8 +4271,7 @@ var runAttempt = (request, options) => gen(function* () {
4262
4271
  case undefined: {
4263
4272
  if (last.status !== "blocked" && last.status !== "error")
4264
4273
  return failed("output_missing", "The agent finished without submitting its Output.");
4265
- const screen = yield* option2(call((connection) => connection.read(address)));
4266
- const shown = isSome(screen) ? redactCredentials(screen.value).trim() : "";
4274
+ const shown = yield* readScreen;
4267
4275
  if (last.status === "error") {
4268
4276
  yield* logWarning("agent_errored", { attempt: attempt.id, address, screen: shown });
4269
4277
  return failed("harness_error", `The Harness stopped in its error state before it submitted its Output.${shown === "" ? "" : ` Its screen ended: ${shown.slice(-blockedScreenChars)}`}`);
@@ -4280,8 +4288,11 @@ var runAttempt = (request, options) => gen(function* () {
4280
4288
  });
4281
4289
  const drive = gen(function* () {
4282
4290
  const ready = yield* until(seen, (last) => last.end !== undefined || last.status !== null && last.status !== "working").pipe(timeoutOption(launchTimeout));
4283
- if (isNone(ready))
4284
- return failed("harness_launch_timeout", "The Harness reported no status within 120 s of its launch.");
4291
+ if (isNone(ready)) {
4292
+ const shown = yield* readScreen;
4293
+ yield* logWarning("agent_launch_timeout", { attempt: attempt.id, address, screen: shown });
4294
+ return failed("harness_launch_timeout", `The Harness reported no status within 120 s of its launch.${shown === "" ? " Its screen was empty." : ` Its screen ended: ${shown.slice(-blockedScreenChars)}`}`);
4295
+ }
4285
4296
  if (ready.value.end !== undefined)
4286
4297
  return yield* judge(ready.value);
4287
4298
  const brief = firstMessage(request.launch, workspace, launch.systemBrief === true);
@@ -159,7 +159,21 @@ import {
159
159
  runMcpEffect,
160
160
  createAgentAuthSignedFetch,
161
161
  setupMcpAgentCredential
162
- } from "./chunk-5scsh754.js";
162
+ } from "./chunk-qh5pwxdk.js";
163
+ import {
164
+ join,
165
+ interrupt,
166
+ runForEach,
167
+ FileSystem,
168
+ Path,
169
+ embeddedFile,
170
+ extractEmbeddedFile,
171
+ map3,
172
+ all,
173
+ withDefault,
174
+ option,
175
+ String2
176
+ } from "./chunk-0b93nv6j.js";
163
177
  import {
164
178
  guard,
165
179
  Id,
@@ -179,20 +193,6 @@ import {
179
193
  isString,
180
194
  kindOf
181
195
  } from "./chunk-c6rbt85q.js";
182
- import {
183
- join,
184
- interrupt,
185
- runForEach,
186
- FileSystem,
187
- Path,
188
- embeddedFile,
189
- extractEmbeddedFile,
190
- map3,
191
- all,
192
- withDefault,
193
- option,
194
- String2
195
- } from "./chunk-3d4d52e5.js";
196
196
  import {
197
197
  nextInt
198
198
  } from "./chunk-nzjb36ad.js";
@@ -202,7 +202,7 @@ import {
202
202
  withHeaders,
203
203
  layerProtocolSocket,
204
204
  ConnectionHooks
205
- } from "./chunk-r2e1ke17.js";
205
+ } from "./chunk-4e0c4zw0.js";
206
206
 
207
207
  // apps/cli/src/mcp.ts
208
208
  import { tmpdir as tmpdir2 } from "os";
@@ -1,4 +1,9 @@
1
1
  // @bun
2
+ import {
3
+ FileSystem,
4
+ Path,
5
+ optionalEnv
6
+ } from "./chunk-0b93nv6j.js";
2
7
  import {
3
8
  Reference,
4
9
  TaggedError,
@@ -28,19 +33,14 @@ import {
28
33
  isJsonObject,
29
34
  isString
30
35
  } from "./chunk-c6rbt85q.js";
31
- import {
32
- FileSystem,
33
- Path,
34
- optionalEnv
35
- } from "./chunk-3d4d52e5.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-5scsh754.js";
40
+ } from "./chunk-qh5pwxdk.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-pxrpwv4z.js";
43
+ } from "./chunk-rdx91nvh.js";
44
44
 
45
45
  // packages/agent-runtime/src/config-convergence.ts
46
46
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -1,4 +1,9 @@
1
1
  // @bun
2
+ import {
3
+ make11,
4
+ runForEach,
5
+ compiled2
6
+ } from "./chunk-0b93nv6j.js";
2
7
  import {
3
8
  getOrUndefined,
4
9
  liftThrowable,
@@ -28,15 +33,10 @@ import {
28
33
  isJsonObject,
29
34
  isString
30
35
  } from "./chunk-c6rbt85q.js";
31
- import {
32
- make11,
33
- runForEach,
34
- compiled2
35
- } from "./chunk-3d4d52e5.js";
36
36
  import {
37
37
  ChildProcessSpawner,
38
38
  make3
39
- } from "./chunk-sk6ceghr.js";
39
+ } from "./chunk-2qarscbj.js";
40
40
 
41
41
  // packages/agent-runtime/src/opencode-store.ts
42
42
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -76,6 +76,10 @@ import {
76
76
  toCodecJson,
77
77
  Json
78
78
  } from "./chunk-vtfwjhzh.js";
79
+ import {
80
+ runForEach,
81
+ FileSystem
82
+ } from "./chunk-0b93nv6j.js";
79
83
  import {
80
84
  guard
81
85
  } from "./chunk-0qz10ek8.js";
@@ -105,11 +109,7 @@ import {
105
109
  KitDigest,
106
110
  KitSetup,
107
111
  RunnerRpcError
108
- } from "./chunk-5scsh754.js";
109
- import {
110
- runForEach,
111
- FileSystem
112
- } from "./chunk-3d4d52e5.js";
112
+ } from "./chunk-qh5pwxdk.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");
@@ -811,7 +811,9 @@ var TranscriptPoint = Struct({
811
811
  });
812
812
  var TranscriptsRequest = Struct({
813
813
  days: Int.check(isGreaterThanOrEqualTo(1), isLessThanOrEqualTo(31)),
814
- teamId: optionalKey(String4)
814
+ teamId: optionalKey(String4),
815
+ projectId: optionalKey(String4),
816
+ fileIntoProjectId: optionalKey(String4)
815
817
  });
816
818
  var TranscriptsResult = Struct({
817
819
  runs: ArraySchema(Struct({
@@ -846,6 +848,7 @@ var ProposeRequest = Union([
846
848
  title: String4,
847
849
  description: String4,
848
850
  teamId: optional(String4),
851
+ projectId: optionalKey(String4),
849
852
  key: optionalKey(String4.check(isPattern(/^[a-z0-9]+(?:-[a-z0-9]+)*$/), isMaxLength(80))),
850
853
  citations: Citations
851
854
  })
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-sk6ceghr.js";
2
+ import"./chunk-2qarscbj.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-5scsh754.js";
16
- import"./chunk-3d4d52e5.js";
15
+ } from "./chunk-qh5pwxdk.js";
16
+ import"./chunk-0b93nv6j.js";
17
17
  import"./chunk-vtfwjhzh.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
@@ -253,6 +253,7 @@ import {
253
253
  import {
254
254
  map,
255
255
  makeEquivalence,
256
+ toNumber,
256
257
  bytes,
257
258
  BadArgument,
258
259
  systemError,
@@ -316,7 +317,7 @@ import {
316
317
  String2,
317
318
  optionalEnv,
318
319
  harnessesUnsupportedInSrt2
319
- } from "./chunk-3d4d52e5.js";
320
+ } from "./chunk-0b93nv6j.js";
320
321
  import {
321
322
  isDateTime,
322
323
  Numeric,
@@ -357,7 +358,7 @@ import {
357
358
  make3,
358
359
  parseFdName,
359
360
  fdName
360
- } from "./chunk-sk6ceghr.js";
361
+ } from "./chunk-2qarscbj.js";
361
362
 
362
363
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
363
364
  var makeEquivalence3 = Tuple;
@@ -899,15 +900,6 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
899
900
  // node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
900
901
  var runMain = runMain2;
901
902
 
902
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
903
- var BigInt2 = globalThis.BigInt;
904
- var toNumber = (b) => {
905
- if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
906
- return none();
907
- }
908
- return some(Number(b));
909
- };
910
-
911
903
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
912
904
  var makeUnsafe = makeUnsafe6;
913
905
  var make18 = make4;
@@ -14465,7 +14457,14 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14465
14457
  }),
14466
14458
  error: RunnerRpcError
14467
14459
  }), make6("ReadTranscripts", {
14468
- payload: { lease: ProgramLease, step: String4, days: Int, teamId: optionalKey(String4) },
14460
+ payload: {
14461
+ lease: ProgramLease,
14462
+ step: String4,
14463
+ days: Int,
14464
+ teamId: optionalKey(String4),
14465
+ projectId: optionalKey(String4),
14466
+ fileIntoProjectId: optionalKey(String4)
14467
+ },
14469
14468
  success: Struct({
14470
14469
  runs: ArraySchema(Struct({
14471
14470
  runId: String4,
@@ -14584,6 +14583,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
14584
14583
  title: String4,
14585
14584
  description: String4,
14586
14585
  teamId: optionalKey(String4),
14586
+ projectId: optionalKey(String4),
14587
14587
  key: optionalKey(String4),
14588
14588
  citations: NonEmptyArray(Struct({ runId: String4, stepAttemptId: String4, sequence: Int }))
14589
14589
  })
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-3d4d52e5.js";
31
+ } from "./chunk-0b93nv6j.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-5scsh754.js";
41
+ } from "./chunk-qh5pwxdk.js";
42
42
 
43
43
  // packages/core/src/npm-registry.ts
44
44
  var KitManifest = Struct({
@@ -1,4 +1,12 @@
1
1
  // @bun
2
+ import {
3
+ decodeText,
4
+ mkString,
5
+ FileSystem,
6
+ Path,
7
+ withDefault,
8
+ String2
9
+ } from "./chunk-0b93nv6j.js";
2
10
  import {
3
11
  isString2,
4
12
  hasProperty,
@@ -35,14 +43,6 @@ import {
35
43
  } from "./chunk-vtfwjhzh.js";
36
44
  import"./chunk-0qz10ek8.js";
37
45
  import"./chunk-c6rbt85q.js";
38
- import {
39
- decodeText,
40
- mkString,
41
- FileSystem,
42
- Path,
43
- withDefault,
44
- String2
45
- } from "./chunk-3d4d52e5.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-5scsh754.js";
57
+ } from "./chunk-qh5pwxdk.js";
58
58
  import {
59
59
  Packument,
60
60
  tarballMatches
61
- } from "./chunk-pxrpwv4z.js";
62
- import"./chunk-3466x4xq.js";
61
+ } from "./chunk-rdx91nvh.js";
62
+ import"./chunk-av04xyxt.js";
63
63
  import {
64
64
  AgentDeclaration,
65
65
  KitDeclarations,
66
66
  describeFlag,
67
67
  Described
68
- } from "./chunk-2t3beh6a.js";
68
+ } from "./chunk-myxv5kpp.js";
69
69
  import {
70
70
  ChildProcessSpawner,
71
71
  make3
72
- } from "./chunk-sk6ceghr.js";
73
- import"./chunk-r2e1ke17.js";
72
+ } from "./chunk-2qarscbj.js";
73
+ import"./chunk-4e0c4zw0.js";
74
74
 
75
75
  // packages/sdk/src/build/index.ts
76
76
  class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
package/dist/index.js CHANGED
@@ -5,15 +5,15 @@
5
5
  var args = process.argv.slice(2);
6
6
  if (args[0] === "srt") {
7
7
  process.argv.splice(2, 1);
8
- const { runSrtCli } = await import("./chunk-japwbj9n.js");
8
+ const { runSrtCli } = await import("./chunk-ap9y5k9y.js");
9
9
  await runSrtCli();
10
10
  } else if (args[0] === "srt-step") {
11
11
  const { runSrtStep } = await import("./chunk-z450wa10.js");
12
12
  await runSrtStep(args.slice(1));
13
13
  } else if (args[0] === "opencode-read") {
14
- const { runOpencodeReader } = await import("./chunk-d9bv70qb.js");
14
+ const { runOpencodeReader } = await import("./chunk-5vzznkvb.js");
15
15
  runOpencodeReader();
16
16
  } else {
17
- const { runCli } = await import("./chunk-yqarnbky.js");
17
+ const { runCli } = await import("./chunk-89mqzn6e.js");
18
18
  runCli(args);
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/cli",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {