@kitman-sh/cli 0.10.64 → 0.10.65

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-zej59tf2.js → chunk-1rry0tsn.js} +60 -14
  2. package/dist/{chunk-fm4m4v6j.js → chunk-1v319b82.js} +115 -107
  3. package/dist/{chunk-rzr11xyn.js → chunk-1w81w56v.js} +2 -2
  4. package/dist/{chunk-rv4r0n7d.js → chunk-1zt2rcea.js} +4 -4
  5. package/dist/{chunk-ksx5nt4b.js → chunk-60333x3q.js} +5 -5
  6. package/dist/{chunk-s2d1a2my.js → chunk-7xtst67f.js} +7 -7
  7. package/dist/{chunk-m9v1z0gz.js → chunk-cc4cy79t.js} +21 -21
  8. package/dist/{chunk-x306t6v1.js → chunk-csbf77zs.js} +11 -11
  9. package/dist/{chunk-677etczq.js → chunk-d3ksv8y1.js} +28 -70
  10. package/dist/{chunk-qdn9tnav.js → chunk-dk0ftqwg.js} +18 -26
  11. package/dist/{chunk-3z0p2wtr.js → chunk-gbsqf61e.js} +3 -3
  12. package/dist/{chunk-wjs5fpv0.js → chunk-hmwvsfgq.js} +5 -5
  13. package/dist/{chunk-dzxahdb7.js → chunk-k4vvmwvj.js} +73 -65
  14. package/dist/{chunk-smmgt31x.js → chunk-kebax0r8.js} +9 -9
  15. package/dist/{chunk-b9xcawfx.js → chunk-mvvp19kb.js} +36 -36
  16. package/dist/{chunk-p23kedha.js → chunk-q3c7vmby.js} +1 -1
  17. package/dist/{chunk-t47h82ew.js → chunk-qp07hf3f.js} +11 -11
  18. package/dist/{chunk-byhwksbq.js → chunk-rm83dbpv.js} +2 -2
  19. package/dist/{chunk-wnwyp9qn.js → chunk-rrnee9mk.js} +1 -1
  20. package/dist/{chunk-a31qjdsm.js → chunk-rzxt9mb5.js} +7 -7
  21. package/dist/{chunk-h6360r1c.js → chunk-v01c0k6j.js} +1 -1
  22. package/dist/{chunk-9p6v3jd2.js → chunk-wtpwkjws.js} +4 -4
  23. package/dist/{chunk-fznm6es2.js → chunk-y1328g78.js} +7 -7
  24. package/dist/{chunk-tdp34kqg.js → chunk-ysw716r4.js} +19 -19
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -199,7 +199,7 @@ import {
199
199
  String4,
200
200
  toCodecStringTree,
201
201
  encodeUnknownJsonStringSync
202
- } from "./chunk-677etczq.js";
202
+ } from "./chunk-d3ksv8y1.js";
203
203
 
204
204
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
205
205
  var headUnsafe = (self) => {
@@ -248,15 +248,6 @@ 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
-
260
251
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
261
252
  var bigint0 = /* @__PURE__ */ BigInt(0);
262
253
  var bigint1 = /* @__PURE__ */ BigInt(1);
@@ -1136,7 +1127,7 @@ var MutableRefProto = {
1136
1127
  };
1137
1128
  }
1138
1129
  };
1139
- var make7 = (value) => {
1130
+ var make8 = (value) => {
1140
1131
  const ref = Object.create(MutableRefProto);
1141
1132
  ref.current = value;
1142
1133
  return ref;
@@ -1297,7 +1288,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
1297
1288
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
1298
1289
  var TypeId3 = "~effect/PubSub";
1299
1290
  var SubscriptionTypeId = "~effect/PubSub/Subscription";
1300
- var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make7(false), options.strategy(), make7(none())));
1291
+ var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
1301
1292
  var unbounded = (options) => make5({
1302
1293
  atomicPubSub: () => makeAtomicUnbounded(options),
1303
1294
  strategy: () => new DroppingStrategy
@@ -1392,7 +1383,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
1392
1383
  subscribers.delete(subscription);
1393
1384
  }
1394
1385
  };
1395
- var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make7(false), strategy, pubsub.replayWindow(), ended);
1386
+ var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make8(false), strategy, pubsub.replayWindow(), ended);
1396
1387
  class UnboundedPubSub {
1397
1388
  publisherHead = {
1398
1389
  value: AbsentValue,
@@ -1809,7 +1800,7 @@ var QueueProto = {
1809
1800
  };
1810
1801
  }
1811
1802
  };
1812
- var make8 = (options) => withFiber((fiber) => {
1803
+ var make9 = (options) => withFiber((fiber) => {
1813
1804
  const self = Object.create(QueueProto);
1814
1805
  self.dispatcher = fiber.currentDispatcher;
1815
1806
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
@@ -1824,14 +1815,14 @@ var make8 = (options) => withFiber((fiber) => {
1824
1815
  };
1825
1816
  return succeed2(self);
1826
1817
  });
1827
- var bounded = (capacity) => make8({
1818
+ var bounded = (capacity) => make9({
1828
1819
  capacity
1829
1820
  });
1830
- var sliding = (capacity) => make8({
1821
+ var sliding = (capacity) => make9({
1831
1822
  capacity,
1832
1823
  strategy: "sliding"
1833
1824
  });
1834
- var unbounded2 = () => make8();
1825
+ var unbounded2 = () => make9();
1835
1826
  var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
1836
1827
  var offerUnsafe = (self, message) => {
1837
1828
  if (self.state._tag !== "Open") {
@@ -2257,7 +2248,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
2257
2248
  return onError(pull, onCause);
2258
2249
  }));
2259
2250
  var toTransform = (channel) => channel.transform;
2260
- var asyncQueue = (scope, f, options) => make8({
2251
+ var asyncQueue = (scope, f, options) => make9({
2261
2252
  capacity: options?.bufferSize,
2262
2253
  strategy: options?.strategy
2263
2254
  }).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
@@ -2298,7 +2289,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
2298
2289
  }));
2299
2290
  var readableStreamToPullUnsafe = (options) => {
2300
2291
  const reader = options.readable.getReader();
2301
- const exit = options.exit ?? make7(undefined);
2292
+ const exit = options.exit ?? make8(undefined);
2302
2293
  const pull = suspend3(() => {
2303
2294
  if (exit.current)
2304
2295
  return exit.current;
@@ -2912,7 +2903,7 @@ var release = (self, state) => {
2912
2903
  };
2913
2904
 
2914
2905
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
2915
- var make9 = make6;
2906
+ var make10 = make6;
2916
2907
  var get3 = get2;
2917
2908
 
2918
2909
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
@@ -2924,7 +2915,7 @@ var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatM
2924
2915
  var toChannel2 = (stream) => stream.channel;
2925
2916
  var callback = (f, options) => fromChannel2(callbackArray(f, options));
2926
2917
  var empty2 = /* @__PURE__ */ fromChannel2(empty);
2927
- var make10 = (...values) => fromArray2(values);
2918
+ var make11 = (...values) => fromArray2(values);
2928
2919
  var suspend = (stream) => {
2929
2920
  const suspended = fromChannel2(suspend4(() => stream().channel));
2930
2921
  suspendedStreams.set(suspended, stream);
@@ -3089,7 +3080,7 @@ var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (
3089
3080
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3090
3081
  var TypeId10 = "~effect/FileSystem";
3091
3082
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3092
- var make11 = (impl) => FileSystem.of({
3083
+ var make12 = (impl) => FileSystem.of({
3093
3084
  ...impl,
3094
3085
  [TypeId10]: TypeId10,
3095
3086
  glob: make2(impl),
@@ -3149,7 +3140,7 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3149
3140
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3150
3141
  var TypeId11 = "~effect/Path";
3151
3142
  var Path = /* @__PURE__ */ Service2("effect/Path");
3152
- var make12 = (impl) => Path.of({
3143
+ var make13 = (impl) => Path.of({
3153
3144
  ...impl,
3154
3145
  [TypeId11]: TypeId11,
3155
3146
  resolveWithin(root, input) {
@@ -3224,7 +3215,7 @@ function makeProvider(load, mapInput) {
3224
3215
  function makeSource(get, transform) {
3225
3216
  return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
3226
3217
  }
3227
- function make13(get) {
3218
+ function make7(get) {
3228
3219
  return makeSource(get, identityPath);
3229
3220
  }
3230
3221
  function emptyStringAsMissing(value, preserveEmptyStrings) {
@@ -3233,7 +3224,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
3233
3224
  function fromEnvRecord(env, options) {
3234
3225
  const preserveEmptyStrings = options?.preserveEmptyStrings === true;
3235
3226
  const trie = buildEnvTrie(env);
3236
- return make13((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3227
+ return make7((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3237
3228
  }
3238
3229
  function fromEnv(options) {
3239
3230
  const env = options?.env ?? {
@@ -3472,6 +3463,7 @@ var optionalEnv = (name) => gen(function* () {
3472
3463
  }).pipe(orElseSucceed(() => {
3473
3464
  return;
3474
3465
  }));
3466
+ var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(map8((configHome) => configHome ?? `${home}/.config`));
3475
3467
 
3476
3468
  // packages/agent-runtime/src/srt-sandbox.ts
3477
3469
  var harnessesUnsupportedInSrt2 = ["codex"];
@@ -3560,4 +3552,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3560
3552
  ...argv
3561
3553
  ];
3562
3554
 
3563
- export { map, makeEquivalence, toNumber, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make7, unbounded, publishUnsafe, make8, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make9, get3, isStream, fromChannel2, callback, empty2, make10, 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, make11, FileTypeId, WatchBackend, Path, make12, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, harnessesUnsupportedInSrt2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
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 };
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-677etczq.js";
27
+ } from "./chunk-d3ksv8y1.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-qdn9tnav.js";
31
+ } from "./chunk-dk0ftqwg.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-fm4m4v6j.js";
41
+ } from "./chunk-1v319b82.js";
42
42
 
43
43
  // packages/core/src/npm-registry.ts
44
44
  var KitManifest = Struct({
@@ -96,7 +96,7 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-677etczq.js";
99
+ } from "./chunk-d3ksv8y1.js";
100
100
  import {
101
101
  interrupt,
102
102
  getCurrent,
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-qdn9tnav.js";
111
+ } from "./chunk-dk0ftqwg.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-fm4m4v6j.js";
126
+ } from "./chunk-1v319b82.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")) {
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
483
483
  };
484
484
  });
485
485
  var clientIdCounter = 0;
486
- var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
486
+ var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
487
487
  const clientId = clientIdCounter++;
488
488
  const {
489
489
  codecFor,
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
829
829
  class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
830
830
  }
831
831
 
832
- export { layerJson, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
832
+ export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
@@ -5,46 +5,7 @@ import {
5
5
  isObject,
6
6
  isJsonObject,
7
7
  isString
8
- } from "./chunk-h6360r1c.js";
9
- import {
10
- join,
11
- interrupt,
12
- unbounded,
13
- publishUnsafe,
14
- unbounded2,
15
- offer,
16
- makeUnsafe3,
17
- make10,
18
- fromQueue,
19
- fromPubSub,
20
- map2,
21
- filter,
22
- decodeText,
23
- encodeText,
24
- splitLines,
25
- run,
26
- runHead,
27
- runForEach,
28
- FileSystem,
29
- Path,
30
- embeddedFile,
31
- extractEmbeddedFile,
32
- optionalEnv,
33
- harnessesUnsupportedInSrt2,
34
- compiled2,
35
- pinnedSrtCommand2,
36
- pinnedSrtStepCommand2,
37
- runSrtCli2,
38
- kitmanCacheDirectory2,
39
- srtSettings2,
40
- srtCacheEnvironment2,
41
- srtInheritedEnv2,
42
- inheritedEnvironment2,
43
- withOnlyEnvironment2,
44
- writeSrtSettings2,
45
- srtStepArgv2,
46
- srtArgv2
47
- } from "./chunk-qdn9tnav.js";
8
+ } from "./chunk-v01c0k6j.js";
48
9
  import {
49
10
  pipeArguments,
50
11
  dual,
@@ -81,7 +42,7 @@ import {
81
42
  isFailure2,
82
43
  hasInterrupts,
83
44
  makeUnsafe5,
84
- make15,
45
+ make16,
85
46
  _await,
86
47
  fail5,
87
48
  isDoneUnsafe,
@@ -195,11 +156,11 @@ import {
195
156
  encodePrettyJsonString,
196
157
  decodeJsonStringSync,
197
158
  encodeUnknownJsonStringSync
198
- } from "./chunk-677etczq.js";
159
+ } from "./chunk-d3ksv8y1.js";
199
160
  import {
200
161
  Id,
201
162
  secretReference
202
- } from "./chunk-wnwyp9qn.js";
163
+ } from "./chunk-rrnee9mk.js";
203
164
  import {
204
165
  currentTimeMillis,
205
166
  SecureRandom,
@@ -264,7 +225,47 @@ import {
264
225
  installCommand,
265
226
  checkServicesFile,
266
227
  checkServices
267
- } from "./chunk-fm4m4v6j.js";
228
+ } from "./chunk-1v319b82.js";
229
+ import {
230
+ join,
231
+ interrupt,
232
+ unbounded,
233
+ publishUnsafe,
234
+ unbounded2,
235
+ offer,
236
+ makeUnsafe3,
237
+ make11,
238
+ fromQueue,
239
+ fromPubSub,
240
+ map2,
241
+ filter,
242
+ decodeText,
243
+ encodeText,
244
+ splitLines,
245
+ run,
246
+ runHead,
247
+ runForEach,
248
+ FileSystem,
249
+ Path,
250
+ embeddedFile,
251
+ extractEmbeddedFile,
252
+ optionalEnv,
253
+ operatorConfigHome,
254
+ harnessesUnsupportedInSrt2,
255
+ compiled2,
256
+ pinnedSrtCommand2,
257
+ pinnedSrtStepCommand2,
258
+ runSrtCli2,
259
+ kitmanCacheDirectory2,
260
+ srtSettings2,
261
+ srtCacheEnvironment2,
262
+ srtInheritedEnv2,
263
+ inheritedEnvironment2,
264
+ withOnlyEnvironment2,
265
+ writeSrtSettings2,
266
+ srtStepArgv2,
267
+ srtArgv2
268
+ } from "./chunk-dk0ftqwg.js";
268
269
  import {
269
270
  writeAgentEnvironmentConfigFile2,
270
271
  readManifestSkillPaths2,
@@ -280,8 +281,8 @@ import {
280
281
  applyAgentEnvironmentMaterialization2,
281
282
  isPathWithin2,
282
283
  skillIdentity2
283
- } from "./chunk-smmgt31x.js";
284
- import"./chunk-3z0p2wtr.js";
284
+ } from "./chunk-kebax0r8.js";
285
+ import"./chunk-gbsqf61e.js";
285
286
  import {
286
287
  sliceBytes2,
287
288
  maxLineBytes2,
@@ -289,28 +290,28 @@ import {
289
290
  decodedOption2,
290
291
  decoded2,
291
292
  readOpencode2
292
- } from "./chunk-x306t6v1.js";
293
+ } from "./chunk-csbf77zs.js";
293
294
  import {
294
295
  writeSecretRegistry,
295
296
  secretRefusalLog,
296
297
  parseSecretRefusals
297
- } from "./chunk-rzr11xyn.js";
298
+ } from "./chunk-1w81w56v.js";
298
299
  import {
299
300
  uploadRunFile,
300
301
  programLease,
301
302
  rpcRunFiles,
302
303
  programHostsEnv,
303
304
  undeclaredHostsEnv
304
- } from "./chunk-fznm6es2.js";
305
- import"./chunk-a31qjdsm.js";
305
+ } from "./chunk-y1328g78.js";
306
+ import"./chunk-rzxt9mb5.js";
306
307
  import {
307
308
  nextInt
308
- } from "./chunk-p23kedha.js";
309
+ } from "./chunk-q3c7vmby.js";
309
310
  import {
310
311
  ChildProcessSpawner,
311
- make2
312
- } from "./chunk-zej59tf2.js";
313
- import"./chunk-wjs5fpv0.js";
312
+ make3
313
+ } from "./chunk-1rry0tsn.js";
314
+ import"./chunk-hmwvsfgq.js";
314
315
 
315
316
  // packages/core/src/sync-kit.ts
316
317
  import { createHash } from "crypto";
@@ -1757,7 +1758,7 @@ var HarnessAdapters = [
1757
1758
  directories: { XDG_DATA_HOME: "data", XDG_STATE_HOME: "state", CLAUDE_CODE_TMPDIR: "tmp" },
1758
1759
  sessionDatabase: "data/opencode/opencode.db",
1759
1760
  login: { source: ".local/share/opencode/auth.json", path: "data/opencode/auth.json" },
1760
- homeDirectory: ".config/opencode"
1761
+ configHomeDirectory: "opencode"
1761
1762
  }
1762
1763
  }
1763
1764
  ];
@@ -1797,9 +1798,13 @@ function resolveHarnessLaunch(input) {
1797
1798
  const effortful = effort === undefined || input.adapter.effortArgs === undefined ? launch : { ...launch, args: [...launch.args, ...input.adapter.effortArgs.map((arg) => arg.replace("{effort}", effort))] };
1798
1799
  return flagProbedLaunch(input.adapter, sandboxHomeLaunch(input, effortful));
1799
1800
  }
1800
- var sandboxedLaunch = (launch) => launch.sandboxed === undefined ? launch : {
1801
+ var sandboxedLaunch = (launch, backend) => launch.sandboxed === undefined ? launch : {
1801
1802
  ...launch,
1802
- env: { ...launch.env, ...launch.sandboxed.env },
1803
+ env: {
1804
+ ...launch.env,
1805
+ ...launch.sandboxed.env,
1806
+ ...backend === "srt" ? { XDG_CONFIG_HOME: launch.sandboxed.configHome } : undefined
1807
+ },
1803
1808
  loginCopy: launch.sandboxed.login,
1804
1809
  homeDirectory: launch.sandboxed.homeDirectory
1805
1810
  };
@@ -1808,15 +1813,17 @@ function sandboxHomeLaunch(input, launch) {
1808
1813
  if (sandboxHome === undefined)
1809
1814
  return launch;
1810
1815
  const home = input.home ?? homedir();
1816
+ const configHome = input.configHome ?? `${home}/.config`;
1811
1817
  return {
1812
1818
  ...launch,
1813
1819
  sandboxed: {
1814
1820
  env: Object.fromEntries(Object.entries(sandboxHome.directories).map(([variable, path]) => [variable, `${input.configDir}/${path}`])),
1821
+ configHome,
1815
1822
  login: {
1816
1823
  path: `${input.configDir}/${sandboxHome.login.path}`,
1817
1824
  source: `${home}/${sandboxHome.login.source}`
1818
1825
  },
1819
- homeDirectory: `${home}/${sandboxHome.homeDirectory}`
1826
+ homeDirectory: `${configHome}/${sandboxHome.configHomeDirectory}`
1820
1827
  }
1821
1828
  };
1822
1829
  }
@@ -2237,6 +2244,7 @@ var prepareHarness = (input) => gen(function* () {
2237
2244
 
2238
2245
  `),
2239
2246
  home: input.home,
2247
+ configHome: yield* operatorConfigHome(input.home),
2240
2248
  ...input.agent.session === undefined ? undefined : {
2241
2249
  session: {
2242
2250
  id: input.agent.session.id,
@@ -3186,7 +3194,7 @@ var runAttempt = (request, options) => gen(function* () {
3186
3194
  if (isFailure(prepared))
3187
3195
  return failed(prepared.failure.reason, prepared.failure.summary);
3188
3196
  const { adapter, mcp, configDir, kitSetup } = prepared.success;
3189
- const launch = request.sandbox.backend === "host" ? prepared.success.launch : sandboxedLaunch(prepared.success.launch);
3197
+ const launch = request.sandbox.backend === "host" ? prepared.success.launch : sandboxedLaunch(prepared.success.launch, request.sandbox.backend);
3190
3198
  const policy = stepSandboxPolicy({
3191
3199
  policy: request.sandbox.policy,
3192
3200
  adapter,
@@ -5827,7 +5835,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
5827
5835
  const input = yield* unbounded2();
5828
5836
  const pending = new Map;
5829
5837
  let lastId = 0;
5830
- const handle = yield* spawner.spawn(make2(binary, ["app-server"], {
5838
+ const handle = yield* spawner.spawn(make3(binary, ["app-server"], {
5831
5839
  cwd: env.home,
5832
5840
  extendEnv: true,
5833
5841
  env: { HOME: env.home, CODEX_HOME: env.codexHome },
@@ -5850,7 +5858,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
5850
5858
  return {
5851
5859
  request: (method, params) => gen(function* () {
5852
5860
  const id = ++lastId;
5853
- const deferred = yield* make15();
5861
+ const deferred = yield* make16();
5854
5862
  pending.set(id, deferred);
5855
5863
  yield* send({ id, method, params });
5856
5864
  return yield* _await(deferred).pipe(mapError2((error) => new CodexAppServerFailed({ reason: `${method}: ${error.message}` })));
@@ -5990,10 +5998,10 @@ var handshake = [
5990
5998
  `).join("");
5991
5999
  var kitmanMcpPreflight = (mcp) => gen(function* () {
5992
6000
  const spawner = yield* ChildProcessSpawner;
5993
- const server = yield* spawner.spawn(make2(mcp.command, [...mcp.args], {
6001
+ const server = yield* spawner.spawn(make3(mcp.command, [...mcp.args], {
5994
6002
  extendEnv: true,
5995
6003
  env: mcp.env,
5996
- stdin: { stream: make10(new TextEncoder().encode(handshake)), endOnDone: false },
6004
+ stdin: { stream: make11(new TextEncoder().encode(handshake)), endOnDone: false },
5997
6005
  stderr: "ignore"
5998
6006
  }));
5999
6007
  const reply = yield* server.stdout.pipe(decodeText, splitLines, map2((line) => getOrUndefined(decodeJsonStringOption(line))), filter((message) => isJsonObject(message) && message.id === 2), runHead);
@@ -6066,8 +6074,8 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
6066
6074
  };
6067
6075
  const exitCode = sandbox === undefined ? yield* gen(function* () {
6068
6076
  const spawner = yield* ChildProcessSpawner;
6069
- const handle = yield* spawner.spawn(make2(input.bun ?? process.execPath, [file], {
6070
- stdin: make10(new TextEncoder().encode(stdin)),
6077
+ const handle = yield* spawner.spawn(make3(input.bun ?? process.execPath, [file], {
6078
+ stdin: make11(new TextEncoder().encode(stdin)),
6071
6079
  stdout: "inherit",
6072
6080
  stderr: "inherit",
6073
6081
  extendEnv: false,
@@ -1,9 +1,4 @@
1
1
  // @bun
2
- import {
3
- FileSystem,
4
- Path,
5
- optionalEnv
6
- } from "./chunk-qdn9tnav.js";
7
2
  import {
8
3
  Reference,
9
4
  TaggedError,
@@ -28,19 +23,24 @@ import {
28
23
  fnUntraced,
29
24
  encodePrettyJsonString,
30
25
  decodeJsonStringSync
31
- } from "./chunk-677etczq.js";
26
+ } from "./chunk-d3ksv8y1.js";
32
27
  import {
33
28
  isJsonObject,
34
29
  isString
35
- } from "./chunk-h6360r1c.js";
30
+ } from "./chunk-v01c0k6j.js";
31
+ import {
32
+ FileSystem,
33
+ Path,
34
+ optionalEnv
35
+ } from "./chunk-dk0ftqwg.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-fm4m4v6j.js";
40
+ } from "./chunk-1v319b82.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-3z0p2wtr.js";
43
+ } from "./chunk-gbsqf61e.js";
44
44
 
45
45
  // packages/agent-runtime/src/config-convergence.ts
46
46
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {