@kitman-sh/cli 0.34.0 → 0.35.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-haq904fk.js → chunk-1hgsf81a.js} +1 -1
  2. package/dist/{chunk-6hxtg6eb.js → chunk-4qrb09w4.js} +3 -3
  3. package/dist/{chunk-g5b61tek.js → chunk-56gs4z53.js} +5 -5
  4. package/dist/{chunk-a230abnk.js → chunk-5e1ndtnp.js} +2 -2
  5. package/dist/{chunk-ew07nt2d.js → chunk-61dmxexa.js} +102 -60
  6. package/dist/{chunk-r90j80q5.js → chunk-64arqv10.js} +9 -9
  7. package/dist/{chunk-fr0qseam.js → chunk-c8eg05nh.js} +4 -4
  8. package/dist/{chunk-swc0ctf2.js → chunk-ee7ss0df.js} +3 -3
  9. package/dist/{chunk-gy7nygep.js → chunk-er0e8d8v.js} +14 -60
  10. package/dist/{chunk-djzfaqaq.js → chunk-ke4rajdh.js} +38 -22
  11. package/dist/{chunk-phx3zffc.js → chunk-n01c55f9.js} +8 -8
  12. package/dist/{chunk-2a40hhfz.js → chunk-n0bp958m.js} +4 -4
  13. package/dist/{chunk-w8hf2etp.js → chunk-nna9pwp0.js} +34 -32
  14. package/dist/{chunk-6387vj9z.js → chunk-q8e58p57.js} +2 -2
  15. package/dist/{chunk-hwjp28rh.js → chunk-qqb6djs7.js} +2 -2
  16. package/dist/{chunk-wkbsbxp8.js → chunk-r9x4ehsy.js} +6 -6
  17. package/dist/{chunk-qvpkwnky.js → chunk-rbpn35g5.js} +1 -1
  18. package/dist/{chunk-3jxdtkwd.js → chunk-t205gnzc.js} +20 -20
  19. package/dist/{chunk-9da9b7ys.js → chunk-t9dmwy8x.js} +12 -12
  20. package/dist/{chunk-2gz59jcx.js → chunk-tsefrrxz.js} +1 -1
  21. package/dist/{chunk-89ygm64f.js → chunk-wkkjyzpx.js} +4 -4
  22. package/dist/{chunk-8p5csa63.js → chunk-xc7kg57m.js} +26 -26
  23. package/dist/{chunk-d64j8v9n.js → chunk-y3c9pxez.js} +7 -7
  24. package/dist/{chunk-0m8ktgmz.js → chunk-yhat3rhw.js} +184 -338
  25. package/dist/{chunk-337drcr7.js → chunk-z0gqrc8c.js} +184 -35
  26. package/dist/{chunk-y7bth30s.js → chunk-znhjs0t6.js} +1 -1
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -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
  map9,
23
16
  raceFirst,
24
- scoped
25
- } from "./chunk-ew07nt2d.js";
17
+ scoped,
18
+ isRedacted,
19
+ make16,
20
+ value
21
+ } from "./chunk-61dmxexa.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-337drcr7.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-z0gqrc8c.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(map9((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 };
@@ -174,7 +174,7 @@ import {
174
174
  decodeJsonStringSync,
175
175
  encodeUnknownJsonStringSync,
176
176
  storable
177
- } from "./chunk-ew07nt2d.js";
177
+ } from "./chunk-61dmxexa.js";
178
178
  import {
179
179
  SecureRandom,
180
180
  layerWebCrypto,
@@ -262,7 +262,7 @@ import {
262
262
  checkServicesFile,
263
263
  checkServices,
264
264
  serviceChecks
265
- } from "./chunk-0m8ktgmz.js";
265
+ } from "./chunk-yhat3rhw.js";
266
266
  import {
267
267
  currentTimeMillis,
268
268
  join,
@@ -311,7 +311,7 @@ import {
311
311
  writeSrtSettings2,
312
312
  srtStepArgv2,
313
313
  srtArgv2
314
- } from "./chunk-337drcr7.js";
314
+ } from "./chunk-z0gqrc8c.js";
315
315
  import {
316
316
  writeAgentEnvironmentConfigFile2,
317
317
  readManifestSkillPaths2,
@@ -327,8 +327,8 @@ import {
327
327
  applyAgentEnvironmentMaterialization2,
328
328
  isPathWithin2,
329
329
  skillIdentity2
330
- } from "./chunk-2a40hhfz.js";
331
- import"./chunk-swc0ctf2.js";
330
+ } from "./chunk-n0bp958m.js";
331
+ import"./chunk-ee7ss0df.js";
332
332
  import {
333
333
  egressAllowed,
334
334
  writeSecretRegistry,
@@ -338,7 +338,7 @@ import {
338
338
  secretFilter2,
339
339
  opaqueTunnelRefusal2,
340
340
  isOpaqueConnectReason2
341
- } from "./chunk-6387vj9z.js";
341
+ } from "./chunk-q8e58p57.js";
342
342
  import {
343
343
  sliceBytes2,
344
344
  maxLineBytes2,
@@ -348,29 +348,29 @@ import {
348
348
  lookAtOpencode2,
349
349
  readOpencode2,
350
350
  databaseStamp2
351
- } from "./chunk-g5b61tek.js";
351
+ } from "./chunk-56gs4z53.js";
352
352
  import {
353
353
  uploadRunFile,
354
354
  programLease,
355
355
  rpcRunFiles,
356
356
  programHostsEnv,
357
357
  undeclaredHostsEnv
358
- } from "./chunk-phx3zffc.js";
359
- import"./chunk-r90j80q5.js";
358
+ } from "./chunk-n01c55f9.js";
359
+ import"./chunk-64arqv10.js";
360
360
  import {
361
361
  nextInt
362
- } from "./chunk-y7bth30s.js";
363
- import"./chunk-haq904fk.js";
362
+ } from "./chunk-znhjs0t6.js";
363
+ import"./chunk-1hgsf81a.js";
364
364
  import {
365
365
  ChildProcessSpawner,
366
- make3
367
- } from "./chunk-gy7nygep.js";
368
- import"./chunk-3jxdtkwd.js";
366
+ make2
367
+ } from "./chunk-er0e8d8v.js";
368
+ import"./chunk-t205gnzc.js";
369
369
  import {
370
370
  Id,
371
371
  secretReference,
372
372
  secretPlaceholder
373
- } from "./chunk-qvpkwnky.js";
373
+ } from "./chunk-rbpn35g5.js";
374
374
 
375
375
  // packages/core/src/sync-kit.ts
376
376
  import { createHash } from "crypto";
@@ -1786,7 +1786,8 @@ var HarnessAdapters = [
1786
1786
  CLAUDE_CODE_DISABLE_ADVISOR_TOOL: "1",
1787
1787
  CLAUDE_CODE_DISABLE_FEATURE_FLAGS: "1",
1788
1788
  ENABLE_TOOL_SEARCH: "false",
1789
- CLAUDE_CODE_EXPERIMENTAL_CODE_MODE: "1"
1789
+ CLAUDE_CODE_EXPERIMENTAL_CODE_MODE: "1",
1790
+ CLAUDE_CODE_SANDBOXED: "1"
1790
1791
  },
1791
1792
  mcpToolTimeout: { kind: "env", variables: ["MCP_TOOL_TIMEOUT", "CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT"], unit: "ms" },
1792
1793
  tempDirectoryVariable: "CLAUDE_CODE_TMPDIR",
@@ -4661,8 +4662,18 @@ var aborted = (signal) => signal === undefined ? never : callback3((resume) => {
4661
4662
  });
4662
4663
  var canceled = { status: "canceled", reason: "canceled" };
4663
4664
  var loginRefusedError = /(OAuth token revoked|OAuth access token is invalid|Login expired)\W{0,12}Please run \/login/;
4664
- var loginRefused = (screen) => loginRefusedError.test(screen.split(`
4665
- `).slice(-12).join(" "));
4665
+ var screenTail = (screen) => screen.split(`
4666
+ `).slice(-12);
4667
+ var loginRefused = (screen) => loginRefusedError.test(screenTail(screen).join(" "));
4668
+ var setupPrompts = [
4669
+ { confirm: /^Yes, I trust this folder$/, cancel: /^No, (exit|continue without these permissions)$/ },
4670
+ { confirm: /^Yes, turn on Code Mode$/, cancel: /^No, start without it$/ }
4671
+ ];
4672
+ var menuOption = (line) => line.replace(/^[\s\u276F\u203A>]*(\d+\.\s*)?/, "").trim();
4673
+ var atSetupPrompt = (screen) => {
4674
+ const options = screenTail(screen).map(menuOption);
4675
+ return setupPrompts.some(({ confirm, cancel }) => options.some((option) => confirm.test(option)) && options.some((option) => cancel.test(option)));
4676
+ };
4666
4677
  var watchSecretRegistry = (registry, request, revocationMs) => gen(function* () {
4667
4678
  const fs = yield* FileSystem;
4668
4679
  const log = secretRefusalLog(registry.file);
@@ -4906,6 +4917,7 @@ var runAttempt = (request, options) => gen(function* () {
4906
4917
  let accepted = false;
4907
4918
  const outputSubmitted = suspend3(() => accepted ? succeed6(true) : request.settled.pipe(orElseSucceed(() => false), tap2((settled) => sync2(() => accepted ||= settled))));
4908
4919
  const readScreen = map9(option2(call((connection) => connection.read(address))), (screen) => isSome(screen) ? redactCredentials(screen.value).trim() : "");
4920
+ const setupPromptFailure = (shown) => failed("harness_setup_prompt", `The agent stopped at a prompt Kitman answers before launch. Its screen ended: ${shown.slice(-blockedScreenChars)}`);
4909
4921
  const judge = (last) => gen(function* () {
4910
4922
  if (yield* outputSubmitted)
4911
4923
  return { status: "settled" };
@@ -4927,6 +4939,8 @@ var runAttempt = (request, options) => gen(function* () {
4927
4939
  yield* logWarning("agent_blocked", { attempt: attempt.id, address, screen: shown });
4928
4940
  if (loginRefused(shown))
4929
4941
  return failed("harness_login_lost", `The Harness's login was refused before it submitted its Output. Its screen ended: ${shown.slice(-blockedScreenChars)}`);
4942
+ if (atSetupPrompt(shown))
4943
+ return setupPromptFailure(shown);
4930
4944
  return {
4931
4945
  status: "blocked",
4932
4946
  summary: `The agent stopped for input before submitting its Output.${shown === "" ? "" : ` Its screen ended: ${shown.slice(-blockedScreenChars)}`}`
@@ -4940,6 +4954,8 @@ var runAttempt = (request, options) => gen(function* () {
4940
4954
  if (isNone(ready)) {
4941
4955
  const shown = yield* readScreen;
4942
4956
  yield* logWarning("agent_launch_timeout", { attempt: attempt.id, address, screen: shown });
4957
+ if (atSetupPrompt(shown))
4958
+ return ended("launch_timeout")(setupPromptFailure(shown));
4943
4959
  return ended("launch_timeout")(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)}`}`));
4944
4960
  }
4945
4961
  if (ready.value.end !== undefined)
@@ -7716,7 +7732,7 @@ ${afterMergeFailed}`];
7716
7732
  });
7717
7733
  if (relay !== undefined)
7718
7734
  yield* relay.record([{ kind: "lifecycle", state: transcript === undefined ? "started" : "resumed" }]);
7719
- const relaying = relay === undefined ? undefined : yield* forkScoped(forever(andThen2(sleep("1 second"), relayed)));
7735
+ const relaying = relay === undefined ? undefined : yield* forkScoped(forever(andThen2(sleep("2 seconds"), relayed)));
7720
7736
  const parks = gen(function* () {
7721
7737
  const kept = yield* uninterruptible(takeCheckpoint).pipe(as(true), catch_((error) => as(logWarning("runner_park_checkpoint_failed", error.message), false)));
7722
7738
  if (!kept)
@@ -8477,7 +8493,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
8477
8493
  const input = yield* unbounded2();
8478
8494
  const pending = new Map;
8479
8495
  let lastId = 0;
8480
- const handle = yield* spawner.spawn(make3(binary, ["app-server"], {
8496
+ const handle = yield* spawner.spawn(make2(binary, ["app-server"], {
8481
8497
  cwd: env.home,
8482
8498
  extendEnv: true,
8483
8499
  env: { HOME: env.home, CODEX_HOME: env.codexHome },
@@ -8640,7 +8656,7 @@ var handshake = [
8640
8656
  `).join("");
8641
8657
  var kitmanMcpPreflight = (mcp) => gen(function* () {
8642
8658
  const spawner = yield* ChildProcessSpawner;
8643
- const server = yield* spawner.spawn(make3(mcp.command, [...mcp.args], {
8659
+ const server = yield* spawner.spawn(make2(mcp.command, [...mcp.args], {
8644
8660
  extendEnv: true,
8645
8661
  env: mcp.env,
8646
8662
  stdin: { stream: make10(new TextEncoder().encode(handshake)), endOnDone: false },
@@ -8716,7 +8732,7 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
8716
8732
  };
8717
8733
  const exitCode = sandbox === undefined ? yield* gen(function* () {
8718
8734
  const spawner = yield* ChildProcessSpawner;
8719
- const handle = yield* spawner.spawn(make3(input.bun ?? process.execPath, [file], {
8735
+ const handle = yield* spawner.spawn(make2(input.bun ?? process.execPath, [file], {
8720
8736
  stdin: make10(new TextEncoder().encode(stdin)),
8721
8737
  stdout: "inherit",
8722
8738
  stderr: "inherit",
@@ -12,7 +12,7 @@ import {
12
12
  empty3,
13
13
  add,
14
14
  getOrUndefined2,
15
- get3,
15
+ get4,
16
16
  merge3,
17
17
  Reference,
18
18
  fromInputUnsafe,
@@ -138,7 +138,7 @@ import {
138
138
  toJsonSchemaDocument,
139
139
  toCodecJson,
140
140
  Json
141
- } from "./chunk-ew07nt2d.js";
141
+ } from "./chunk-61dmxexa.js";
142
142
  import {
143
143
  WebCrypto,
144
144
  makeUnsafe,
@@ -175,24 +175,24 @@ import {
175
175
  StepManifest,
176
176
  KitSetup,
177
177
  RunnerRpcError
178
- } from "./chunk-0m8ktgmz.js";
178
+ } from "./chunk-yhat3rhw.js";
179
179
  import {
180
180
  currentTimeMillis,
181
181
  getCurrent,
182
182
  runForEach,
183
183
  FileSystem
184
- } from "./chunk-337drcr7.js";
184
+ } from "./chunk-z0gqrc8c.js";
185
185
  import {
186
186
  splitQuestionOptions,
187
187
  recommendationProblem,
188
188
  questionAdvice
189
- } from "./chunk-haq904fk.js";
189
+ } from "./chunk-1hgsf81a.js";
190
190
  import {
191
191
  guard,
192
192
  Id,
193
193
  Timestamp,
194
194
  ActorType
195
- } from "./chunk-qvpkwnky.js";
195
+ } from "./chunk-rbpn35g5.js";
196
196
  var __defProp = Object.defineProperty;
197
197
  var __returnValue = (v) => v;
198
198
  function __exportSetter(name, newValue) {
@@ -769,7 +769,7 @@ class Suspended extends (/* @__PURE__ */ Class2("effect/workflow/Workflow/Suspen
769
769
  [ResultTypeId] = ResultTypeId;
770
770
  }
771
771
  var wrapActivityResult = (effect, isSuspend) => contextWith((context) => {
772
- const instance = get3(context, InstanceTag);
772
+ const instance = get4(context, InstanceTag);
773
773
  return acquireUseRelease(sync2(() => adoptActivityUnsafe(context, instance) ?? registerActivityUnsafe(instance)), () => effect, (registration, exit) => {
774
774
  releaseActivityUnsafe(registration);
775
775
  const isSuspended = isSuccess2(exit) && isSuspend(exit.value);
@@ -1420,7 +1420,7 @@ var scopingActivities = (engine) => ({
1420
1420
  }),
1421
1421
  activityExecute: (activity, attempt) => gen(function* () {
1422
1422
  const scope = yield* StepScope;
1423
- if (scope === "" || get3(activity.annotations, ActivityNamed))
1423
+ if (scope === "" || get4(activity.annotations, ActivityNamed))
1424
1424
  return yield* engine.activityExecute(activity, attempt);
1425
1425
  return yield* engine.activityExecute(renamed(activity, scopedName(scope, activity.name)), attempt);
1426
1426
  })
@@ -25,21 +25,21 @@ import {
25
25
  isString2,
26
26
  encodePrettyJsonString,
27
27
  decodeJsonStringSync
28
- } from "./chunk-ew07nt2d.js";
28
+ } from "./chunk-61dmxexa.js";
29
29
  import {
30
30
  FileSystem,
31
31
  Path,
32
32
  optionalEnv,
33
33
  tempDirectoryScoped
34
- } from "./chunk-337drcr7.js";
34
+ } from "./chunk-z0gqrc8c.js";
35
35
  import {
36
36
  AgentHarnessIds,
37
37
  sha2562,
38
38
  runCommand2
39
- } from "./chunk-0m8ktgmz.js";
39
+ } from "./chunk-yhat3rhw.js";
40
40
  import {
41
41
  NpmRegistry
42
- } from "./chunk-swc0ctf2.js";
42
+ } from "./chunk-ee7ss0df.js";
43
43
 
44
44
  // packages/agent-runtime/src/config-convergence.ts
45
45
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -109,7 +109,20 @@ import {
109
109
  decodeJsonStringOption,
110
110
  encodeJsonStringSync,
111
111
  encodePrettyJsonString
112
- } from "./chunk-ew07nt2d.js";
112
+ } from "./chunk-61dmxexa.js";
113
+ import {
114
+ currentTimeMillis,
115
+ tap,
116
+ mapError,
117
+ decodeText,
118
+ run,
119
+ mkString,
120
+ FileSystem,
121
+ Path,
122
+ withDefault,
123
+ option,
124
+ String2
125
+ } from "./chunk-z0gqrc8c.js";
113
126
  import {
114
127
  SecureRandom,
115
128
  layerWebCrypto,
@@ -173,7 +186,7 @@ import {
173
186
  digestSha256,
174
187
  sha256Hasher,
175
188
  raw,
176
- make5,
189
+ make4,
177
190
  get,
178
191
  put,
179
192
  HttpClient,
@@ -239,28 +252,15 @@ import {
239
252
  harnessNames,
240
253
  herdrRunnerCapabilities2,
241
254
  declaredChecks
242
- } from "./chunk-0m8ktgmz.js";
243
- import {
244
- currentTimeMillis,
245
- tap,
246
- mapError,
247
- decodeText,
248
- run,
249
- mkString,
250
- FileSystem,
251
- Path,
252
- withDefault,
253
- option,
254
- String2
255
- } from "./chunk-337drcr7.js";
255
+ } from "./chunk-yhat3rhw.js";
256
256
  import {
257
257
  ChildProcessSpawner,
258
- make3
259
- } from "./chunk-gy7nygep.js";
258
+ make2
259
+ } from "./chunk-er0e8d8v.js";
260
260
  import {
261
261
  Id,
262
262
  Timestamp
263
- } from "./chunk-qvpkwnky.js";
263
+ } from "./chunk-rbpn35g5.js";
264
264
 
265
265
  // apps/cli/src/cli-error.ts
266
266
  function cliErrorCode(error, status) {
@@ -1327,10 +1327,10 @@ var sandboxMissing = (sandbox, missing) => ({
1327
1327
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1328
1328
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1329
1329
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1330
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-89ygm64f.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1330
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-wkkjyzpx.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1331
1331
  });
1332
1332
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1333
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-89ygm64f.js")), (module) => module.updateHerdrCore(options))
1333
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-wkkjyzpx.js")), (module) => module.updateHerdrCore(options))
1334
1334
  });
1335
1335
  var herdrCoreMissing = (error) => {
1336
1336
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1790,7 +1790,7 @@ var syncTargets = (harness) => gen(function* () {
1790
1790
  });
1791
1791
  var syncKits = (input) => gen(function* () {
1792
1792
  const fs = yield* FileSystem;
1793
- const { syncKitSetup } = yield* promise(() => import("./chunk-d64j8v9n.js"));
1793
+ const { syncKitSetup } = yield* promise(() => import("./chunk-y3c9pxez.js"));
1794
1794
  const harnesses = yield* syncTargets(input.harness);
1795
1795
  const chain = yield* input.client.getKitChain(input.workspaceId);
1796
1796
  for (const { name, problem } of chain.skipped)
@@ -2307,7 +2307,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
2307
2307
  run: (command, args) => runCommand2(command, args),
2308
2308
  attach: (command, args) => gen(function* () {
2309
2309
  const spawner = yield* ChildProcessSpawner;
2310
- const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
2310
+ const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
2311
2311
  const exitCode = yield* handle.exitCode;
2312
2312
  if (exitCode !== 0)
2313
2313
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -3285,7 +3285,7 @@ var shipped_steps_generated_default = {
3285
3285
  };
3286
3286
 
3287
3287
  // apps/cli/src/scaffold-files.ts
3288
- var cliVersion = "0.34.0";
3288
+ var cliVersion = "0.35.0";
3289
3289
  var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
3290
3290
  var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
3291
3291
  var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
@@ -3550,7 +3550,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
3550
3550
 
3551
3551
  // apps/cli/src/commands.ts
3552
3552
  var ClientId = "kitman-cli";
3553
- var agentRuntime = promise(() => import("./chunk-djzfaqaq.js"));
3553
+ var agentRuntime = promise(() => import("./chunk-ke4rajdh.js"));
3554
3554
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
3555
3555
  defaultValue: () => gen(function* () {
3556
3556
  const tui = yield* tryPromise({
@@ -5089,7 +5089,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
5089
5089
  });
5090
5090
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
5091
5091
  defaultValue: () => (options) => gen(function* () {
5092
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-wkbsbxp8.js"));
5092
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-r9x4ehsy.js"));
5093
5093
  return yield* makeRunnerRpcClient({
5094
5094
  runnerId: options.runnerId,
5095
5095
  bearer: options.bearer,
@@ -5680,7 +5680,7 @@ function mcpCommand(args) {
5680
5680
  if (command.action === "run") {
5681
5681
  if (command.args.length > 0)
5682
5682
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
5683
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-8p5csa63.js"));
5683
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-xc7kg57m.js"));
5684
5684
  return yield* runMcpServerCommand({ flags: command.flags });
5685
5685
  }
5686
5686
  if (command.action !== "setup")
@@ -6180,7 +6180,7 @@ function programLoopCommand(command) {
6180
6180
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
6181
6181
  });
6182
6182
  }
6183
- var docsModule = promise(() => import("./chunk-2gz59jcx.js"));
6183
+ var docsModule = promise(() => import("./chunk-tsefrrxz.js"));
6184
6184
  function docsCommand(args) {
6185
6185
  return gen(function* () {
6186
6186
  const command = parseCommand(args);
@@ -7184,7 +7184,7 @@ function changeRequestCommand(args) {
7184
7184
  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}`);
7185
7185
  });
7186
7186
  }
7187
- var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-9da9b7ys.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7187
+ var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-t9dmwy8x.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7188
7188
  var loopOutline = (command) => gen(function* () {
7189
7189
  const path = yield* Path;
7190
7190
  const loop = requiredArg(command, "a Loop id");
@@ -7204,9 +7204,9 @@ var loopOutline = (command) => gen(function* () {
7204
7204
  `).pipe(mapError2((error) => new CliError({ message: error.message })));
7205
7205
  yield* log(`Wrote the outline of ${loop} to ${out}`);
7206
7206
  });
7207
- var KitWriter = map9(promise(() => import("./chunk-9da9b7ys.js")), (build) => build.writeKit);
7207
+ var KitWriter = map9(promise(() => import("./chunk-t9dmwy8x.js")), (build) => build.writeKit);
7208
7208
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
7209
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-9da9b7ys.js")), (build) => build.buildKit(directory))
7209
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-t9dmwy8x.js")), (build) => build.buildKit(directory))
7210
7210
  });
7211
7211
  var uploadKit = (client, workspaceId, built) => gen(function* () {
7212
7212
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -7985,7 +7985,7 @@ function downloadPresignedAsset(download, outputPath) {
7985
7985
  return gen(function* () {
7986
7986
  const fs = yield* FileSystem;
7987
7987
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
7988
- const response = yield* send(make5(download.method)(download.url), failed);
7988
+ const response = yield* send(make4(download.method)(download.url), failed);
7989
7989
  if (response.status < 200 || response.status >= 300)
7990
7990
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
7991
7991
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -8257,6 +8257,8 @@ function agentStepRunOutcome(outcome, step) {
8257
8257
  return { status: "failed", summary: outcome.summary, restart: { reason: "login_revoked" } };
8258
8258
  if (outcome.reason === "harness_error")
8259
8259
  return { status: "failed", summary: outcome.summary, restart: { reason: "harness_error" } };
8260
+ if (outcome.reason === "harness_setup_prompt")
8261
+ return { status: "failed", summary: outcome.summary, restart: { reason: "setup_prompt" } };
8260
8262
  if (!failedToStart(outcome.reason))
8261
8263
  return { status: "failed", summary: outcome.summary };
8262
8264
  return {
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-ew07nt2d.js";
16
+ } from "./chunk-61dmxexa.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-qvpkwnky.js";
20
+ } from "./chunk-rbpn35g5.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -15,8 +15,8 @@ import {
15
15
  writeSrtSettings2,
16
16
  srtStepArgv2,
17
17
  srtArgv2
18
- } from "./chunk-337drcr7.js";
19
- import"./chunk-ew07nt2d.js";
18
+ } from "./chunk-z0gqrc8c.js";
19
+ import"./chunk-61dmxexa.js";
20
20
  export {
21
21
  compiled2 as compiled,
22
22
  harnessesUnsupportedInDocker2 as harnessesUnsupportedInDocker,
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-r90j80q5.js";
8
- import"./chunk-3jxdtkwd.js";
9
- import"./chunk-0m8ktgmz.js";
10
- import"./chunk-qvpkwnky.js";
11
- import"./chunk-337drcr7.js";
12
- import"./chunk-ew07nt2d.js";
7
+ } from "./chunk-64arqv10.js";
8
+ import"./chunk-t205gnzc.js";
9
+ import"./chunk-yhat3rhw.js";
10
+ import"./chunk-rbpn35g5.js";
11
+ import"./chunk-z0gqrc8c.js";
12
+ import"./chunk-61dmxexa.js";
13
13
  export {
14
14
  makeProgramRpcClient2 as makeProgramRpcClient,
15
15
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-ew07nt2d.js";
21
+ } from "./chunk-61dmxexa.js";
22
22
 
23
23
  // packages/core/src/schema.ts
24
24
  var Days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];