@kitman-sh/cli 0.10.91 → 0.10.93

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 (26) hide show
  1. package/dist/{chunk-d82t42vr.js → chunk-15w92pn6.js} +16 -16
  2. package/dist/{chunk-5fxxg02f.js → chunk-2kr43ps6.js} +144 -337
  3. package/dist/{chunk-w0sehmpd.js → chunk-3r7ahnwy.js} +60 -14
  4. package/dist/{chunk-fgnfx5mw.js → chunk-4psvc86s.js} +212 -7
  5. package/dist/{chunk-6h0rz0zk.js → chunk-6aa8y66v.js} +4 -4
  6. package/dist/{chunk-sb8c2sgy.js → chunk-8tq7n7wc.js} +16 -16
  7. package/dist/{chunk-c3k32vw4.js → chunk-a244myqw.js} +1 -1
  8. package/dist/{chunk-cmtvcbxr.js → chunk-abf4m4b2.js} +5 -5
  9. package/dist/{chunk-dstm8aen.js → chunk-ampzxrqe.js} +28 -70
  10. package/dist/{chunk-k4fvnphp.js → chunk-bk3dpjxq.js} +1 -1
  11. package/dist/{chunk-tmbhak7y.js → chunk-c9wzakrx.js} +8 -8
  12. package/dist/{chunk-d9wjvvbc.js → chunk-dh3108wk.js} +5 -5
  13. package/dist/{chunk-mbqeakm1.js → chunk-et6qa95h.js} +1 -1
  14. package/dist/{chunk-hsf2sj69.js → chunk-fv6kgtze.js} +2 -2
  15. package/dist/{chunk-9m9cv82t.js → chunk-g3r5xp0t.js} +2 -2
  16. package/dist/{chunk-947btdv6.js → chunk-mcpesyz2.js} +3 -3
  17. package/dist/{chunk-2wsyg2g7.js → chunk-mjn42bxn.js} +32 -32
  18. package/dist/{chunk-gykt7zjx.js → chunk-q3nygncv.js} +7 -7
  19. package/dist/{chunk-gncygm43.js → chunk-qacvrg7j.js} +9 -9
  20. package/dist/{chunk-rmsm8vnc.js → chunk-rdv42ygn.js} +4 -4
  21. package/dist/{chunk-r6d67qqa.js → chunk-s3qgchay.js} +41 -33
  22. package/dist/{chunk-5tqy48a3.js → chunk-t7ncjd6s.js} +10 -10
  23. package/dist/{chunk-y1tnxz9f.js → chunk-tpdcq44c.js} +25 -25
  24. package/dist/{chunk-25q7mg6g.js → chunk-vjcn82g3.js} +17 -17
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -4,10 +4,10 @@ import {
4
4
  opaqueTunnelRefusal2,
5
5
  isOpaqueConnectReason2,
6
6
  runSrtStep2
7
- } from "./chunk-hsf2sj69.js";
8
- import"./chunk-mbqeakm1.js";
9
- import"./chunk-k4fvnphp.js";
10
- import"./chunk-dstm8aen.js";
7
+ } from "./chunk-fv6kgtze.js";
8
+ import"./chunk-et6qa95h.js";
9
+ import"./chunk-bk3dpjxq.js";
10
+ import"./chunk-ampzxrqe.js";
11
11
  export {
12
12
  isOpaqueConnectReason2 as isOpaqueConnectReason,
13
13
  opaqueTunnelRefusal2 as opaqueTunnelRefusal,
@@ -6,7 +6,7 @@ import {
6
6
  isObject,
7
7
  isJsonObject,
8
8
  isString
9
- } from "./chunk-k4fvnphp.js";
9
+ } from "./chunk-bk3dpjxq.js";
10
10
  import {
11
11
  pipeArguments,
12
12
  dual,
@@ -47,7 +47,7 @@ import {
47
47
  isFailure2,
48
48
  hasInterrupts,
49
49
  makeUnsafe5,
50
- make15,
50
+ make16,
51
51
  _await,
52
52
  fail5,
53
53
  isDoneUnsafe,
@@ -167,12 +167,12 @@ import {
167
167
  encodePrettyJsonString,
168
168
  decodeJsonStringSync,
169
169
  encodeUnknownJsonStringSync
170
- } from "./chunk-dstm8aen.js";
170
+ } from "./chunk-ampzxrqe.js";
171
171
  import {
172
172
  Id,
173
173
  secretReference,
174
174
  secretPlaceholder
175
- } from "./chunk-mbqeakm1.js";
175
+ } from "./chunk-et6qa95h.js";
176
176
  import {
177
177
  currentTimeMillis,
178
178
  SecureRandom,
@@ -245,7 +245,7 @@ import {
245
245
  installCommand,
246
246
  checkServicesFile,
247
247
  checkServices
248
- } from "./chunk-5fxxg02f.js";
248
+ } from "./chunk-2kr43ps6.js";
249
249
  import {
250
250
  join,
251
251
  interrupt,
@@ -254,7 +254,7 @@ import {
254
254
  unbounded2,
255
255
  offer,
256
256
  makeUnsafe3,
257
- make10,
257
+ make11,
258
258
  fromQueue,
259
259
  fromPubSub,
260
260
  map2,
@@ -285,7 +285,7 @@ import {
285
285
  writeSrtSettings2,
286
286
  srtStepArgv2,
287
287
  srtArgv2
288
- } from "./chunk-25q7mg6g.js";
288
+ } from "./chunk-vjcn82g3.js";
289
289
  import {
290
290
  writeAgentEnvironmentConfigFile2,
291
291
  readManifestSkillPaths2,
@@ -301,12 +301,8 @@ import {
301
301
  applyAgentEnvironmentMaterialization2,
302
302
  isPathWithin2,
303
303
  skillIdentity2
304
- } from "./chunk-d9wjvvbc.js";
305
- import"./chunk-947btdv6.js";
306
- import {
307
- ChildProcessSpawner,
308
- make2
309
- } from "./chunk-w0sehmpd.js";
304
+ } from "./chunk-dh3108wk.js";
305
+ import"./chunk-mcpesyz2.js";
310
306
  import {
311
307
  egressAllowed,
312
308
  writeSecretRegistry,
@@ -316,7 +312,7 @@ import {
316
312
  secretFilter2,
317
313
  opaqueTunnelRefusal2,
318
314
  isOpaqueConnectReason2
319
- } from "./chunk-hsf2sj69.js";
315
+ } from "./chunk-fv6kgtze.js";
320
316
  import {
321
317
  sliceBytes2,
322
318
  maxLineBytes2,
@@ -324,19 +320,23 @@ import {
324
320
  decodedOption2,
325
321
  decoded2,
326
322
  readOpencode2
327
- } from "./chunk-5tqy48a3.js";
323
+ } from "./chunk-t7ncjd6s.js";
328
324
  import {
329
325
  uploadRunFile,
330
326
  programLease,
331
327
  rpcRunFiles,
332
328
  programHostsEnv,
333
329
  undeclaredHostsEnv
334
- } from "./chunk-fgnfx5mw.js";
335
- import"./chunk-gncygm43.js";
330
+ } from "./chunk-4psvc86s.js";
331
+ import"./chunk-qacvrg7j.js";
336
332
  import {
337
333
  nextInt
338
- } from "./chunk-c3k32vw4.js";
339
- import"./chunk-sb8c2sgy.js";
334
+ } from "./chunk-a244myqw.js";
335
+ import {
336
+ ChildProcessSpawner,
337
+ make3
338
+ } from "./chunk-3r7ahnwy.js";
339
+ import"./chunk-8tq7n7wc.js";
340
340
 
341
341
  // packages/core/src/sync-kit.ts
342
342
  import { createHash } from "crypto";
@@ -4896,6 +4896,7 @@ function runReplica(control, executor, signals) {
4896
4896
  })), ensuring2(suspend3(() => completed || leaseLost ? void_3 : call("release", () => control.release(work.id, lease, crashed)).pipe(timeout(releaseTimeout), catch_((error) => logWarning("runner_release_failed", error.message))))), ensuring2(control.finished?.() ?? void_3));
4897
4897
  }));
4898
4898
  }
4899
+ var IdleRecheck = seconds(60);
4899
4900
  var idleBackoff = (idleIterations) => millis(Math.min(1000 * 2 ** idleIterations, 30000));
4900
4901
  function superviseReplica(input) {
4901
4902
  const { signals } = input;
@@ -4931,8 +4932,7 @@ function superviseReplica(input) {
4931
4932
  continue;
4932
4933
  }
4933
4934
  if (isSuccess2(exit2) && signals !== undefined) {
4934
- yield* signals.workSignalledAfter(seen);
4935
- woken = true;
4935
+ woken = isSome(yield* signals.workSignalledAfter(seen).pipe(timeoutOption(IdleRecheck)));
4936
4936
  continue;
4937
4937
  }
4938
4938
  if (isFailure2(exit2)) {
@@ -5894,13 +5894,16 @@ var mergeTarget = (worktree, target) => gen(function* () {
5894
5894
  const targetCommit = (yield* git("rev-parse", "--verify", `origin/${target}^{commit}`)).trim();
5895
5895
  const merged = yield* exit(git("merge", "--no-edit", "-m", `Merge remote-tracking branch 'origin/${target}'`, targetCommit));
5896
5896
  const subject = `Kitman's merge of \`origin/${target}\``;
5897
- if (isSuccess2(merged))
5897
+ if (isSuccess2(merged)) {
5898
+ const clean = (yield* git("rev-parse", "HEAD")) === before ? "up_to_date" : "merged";
5898
5899
  return {
5899
5900
  from: before.trim(),
5900
5901
  target: targetCommit,
5901
5902
  conflicted: [],
5902
- note: (yield* git("rev-parse", "HEAD")) === before ? `${subject}: already up to date.` : `${subject}: merged cleanly and committed.`
5903
+ clean,
5904
+ note: clean === "up_to_date" ? `${subject}: already up to date.` : `${subject}: merged cleanly and committed.`
5903
5905
  };
5906
+ }
5904
5907
  const conflicted = (yield* git("diff", "--name-only", "-z", "--diff-filter=U")).split("\x00").filter(Boolean);
5905
5908
  if (conflicted.length === 0)
5906
5909
  return yield* failCause3(merged.cause);
@@ -6194,10 +6197,15 @@ var stepAttempt = (input, resending) => (work) => gen(function* () {
6194
6197
  conflicted: merge.conflicted,
6195
6198
  ...merge.automerged === undefined ? undefined : { automerged: merge.automerged }
6196
6199
  }).pipe(catch_((error) => as(logWarning("runner_catch_up_unread", error.message), undefined)));
6197
- const syncedTarget = merge?.target;
6198
- if (catchUp !== undefined)
6199
- return boundary === undefined ? syncedTarget === undefined ? { status: "completed", revision, catchUp } : { status: "completed", revision, catchUp, syncedTarget } : syncedTarget === undefined ? { status: "completed", revision, boundary, catchUp } : { status: "completed", revision, boundary, catchUp, syncedTarget };
6200
- return boundary === undefined ? syncedTarget === undefined ? { status: "completed", revision } : { status: "completed", revision, syncedTarget } : syncedTarget === undefined ? { status: "completed", revision, boundary } : { status: "completed", revision, boundary, syncedTarget };
6200
+ const completed = {
6201
+ status: "completed",
6202
+ revision,
6203
+ ...boundary === undefined ? undefined : { boundary },
6204
+ ...catchUp === undefined ? undefined : { catchUp },
6205
+ ...merge === undefined ? undefined : { syncedTarget: merge.target },
6206
+ ...merge?.clean === undefined ? undefined : { cleanSync: merge.clean }
6207
+ };
6208
+ return completed;
6201
6209
  }).pipe(scoped);
6202
6210
  var agentStepExecutor = (input) => stepAttempt(input, new Map);
6203
6211
  var checkpointRef = (work) => `refs/kitman/checkpoints/${work.runId}/${work.id}`;
@@ -6767,7 +6775,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
6767
6775
  const input = yield* unbounded2();
6768
6776
  const pending = new Map;
6769
6777
  let lastId = 0;
6770
- const handle = yield* spawner.spawn(make2(binary, ["app-server"], {
6778
+ const handle = yield* spawner.spawn(make3(binary, ["app-server"], {
6771
6779
  cwd: env.home,
6772
6780
  extendEnv: true,
6773
6781
  env: { HOME: env.home, CODEX_HOME: env.codexHome },
@@ -6790,7 +6798,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
6790
6798
  return {
6791
6799
  request: (method, params) => gen(function* () {
6792
6800
  const id = ++lastId;
6793
- const deferred = yield* make15();
6801
+ const deferred = yield* make16();
6794
6802
  pending.set(id, deferred);
6795
6803
  yield* send({ id, method, params });
6796
6804
  return yield* _await(deferred).pipe(mapError2((error) => new CodexAppServerFailed({ reason: `${method}: ${error.message}` })));
@@ -6930,10 +6938,10 @@ var handshake = [
6930
6938
  `).join("");
6931
6939
  var kitmanMcpPreflight = (mcp) => gen(function* () {
6932
6940
  const spawner = yield* ChildProcessSpawner;
6933
- const server = yield* spawner.spawn(make2(mcp.command, [...mcp.args], {
6941
+ const server = yield* spawner.spawn(make3(mcp.command, [...mcp.args], {
6934
6942
  extendEnv: true,
6935
6943
  env: mcp.env,
6936
- stdin: { stream: make10(new TextEncoder().encode(handshake)), endOnDone: false },
6944
+ stdin: { stream: make11(new TextEncoder().encode(handshake)), endOnDone: false },
6937
6945
  stderr: "ignore"
6938
6946
  }));
6939
6947
  const reply = yield* server.stdout.pipe(decodeText, splitLines, map2((line) => getOrUndefined(decodeJsonStringOption(line))), filter((message) => isJsonObject(message) && message.id === 2), runHead);
@@ -7006,8 +7014,8 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
7006
7014
  };
7007
7015
  const exitCode = sandbox === undefined ? yield* gen(function* () {
7008
7016
  const spawner = yield* ChildProcessSpawner;
7009
- const handle = yield* spawner.spawn(make2(input.bun ?? process.execPath, [file], {
7010
- stdin: make10(new TextEncoder().encode(stdin)),
7017
+ const handle = yield* spawner.spawn(make3(input.bun ?? process.execPath, [file], {
7018
+ stdin: make11(new TextEncoder().encode(stdin)),
7011
7019
  stdout: "inherit",
7012
7020
  stderr: "inherit",
7013
7021
  extendEnv: false,
@@ -22,21 +22,21 @@ import {
22
22
  NullOr,
23
23
  Finite,
24
24
  encodeUnknownJsonStringSync
25
- } from "./chunk-dstm8aen.js";
25
+ } from "./chunk-ampzxrqe.js";
26
26
  import {
27
27
  isNumber,
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-k4fvnphp.js";
30
+ } from "./chunk-bk3dpjxq.js";
31
31
  import {
32
- ChildProcessSpawner,
33
- make2
34
- } from "./chunk-w0sehmpd.js";
35
- import {
36
- make10,
32
+ make11,
37
33
  runForEach,
38
34
  compiled2
39
- } from "./chunk-25q7mg6g.js";
35
+ } from "./chunk-vjcn82g3.js";
36
+ import {
37
+ ChildProcessSpawner,
38
+ make3
39
+ } from "./chunk-3r7ahnwy.js";
40
40
 
41
41
  // packages/agent-runtime/src/opencode-store.ts
42
42
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -169,8 +169,8 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
169
169
  var isolatedRead = (store, name, input) => gen(function* () {
170
170
  const spawner = yield* ChildProcessSpawner;
171
171
  const [command, ...args] = opencodeReaderCommand();
172
- const handle = yield* spawner.spawn(make2(command, args, {
173
- stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
172
+ const handle = yield* spawner.spawn(make3(command, args, {
173
+ stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
174
174
  stderr: "ignore",
175
175
  extendEnv: false,
176
176
  env: {},