@kitman-sh/cli 0.10.71 → 0.10.72

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 (29) hide show
  1. package/dist/{chunk-9e452fhe.js → chunk-030xsst1.js} +266 -111
  2. package/dist/{chunk-hr9vd6dj.js → chunk-290se4bt.js} +3 -3
  3. package/dist/{chunk-h89p59p6.js → chunk-2es1djpn.js} +8 -8
  4. package/dist/{chunk-y7p921rs.js → chunk-61by5f18.js} +17 -17
  5. package/dist/{chunk-dk0ftqwg.js → chunk-7672g0fj.js} +28 -177
  6. package/dist/{chunk-g4xsa9ks.js → chunk-7g4e5fsj.js} +177 -52
  7. package/dist/{chunk-csbf77zs.js → chunk-7sm45hhc.js} +6 -6
  8. package/dist/{chunk-x1zqfxve.js → chunk-7wenq6ew.js} +4 -4
  9. package/dist/{chunk-q3c7vmby.js → chunk-b63rssdn.js} +1 -1
  10. package/dist/{chunk-5n121vsj.js → chunk-cefprsjj.js} +4 -4
  11. package/dist/{chunk-cmatdpfy.js → chunk-cj3ef3pv.js} +6 -6
  12. package/dist/{chunk-zwec6t49.js → chunk-d2fxfv0j.js} +7 -7
  13. package/dist/{chunk-tkmp48ha.js → chunk-g8b2z9jn.js} +4 -4
  14. package/dist/chunk-gngg8j56.js +202 -0
  15. package/dist/{chunk-4wqjxfbv.js → chunk-hxm3bvpn.js} +5 -5
  16. package/dist/{chunk-v01c0k6j.js → chunk-nhd7dh79.js} +1 -1
  17. package/dist/{chunk-gxnpdpjz.js → chunk-pnsqttt3.js} +7 -7
  18. package/dist/{chunk-1rry0tsn.js → chunk-pyt2zrwc.js} +2 -2
  19. package/dist/{chunk-rrnee9mk.js → chunk-se79jbha.js} +1 -1
  20. package/dist/{chunk-60333x3q.js → chunk-tv94e132.js} +5 -5
  21. package/dist/{chunk-vs10kwdr.js → chunk-vd8f9brg.js} +10 -10
  22. package/dist/{chunk-d3ksv8y1.js → chunk-vrt08dk9.js} +60 -60
  23. package/dist/{chunk-rm83dbpv.js → chunk-w6qjh6q5.js} +2 -2
  24. package/dist/chunk-wssfts9s.js +16 -0
  25. package/dist/egress-proxy.ts +51 -4
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
  28. package/dist/chunk-1w81w56v.js +0 -109
  29. package/dist/chunk-wtpwkjws.js +0 -100
@@ -5,7 +5,7 @@ import {
5
5
  isObject,
6
6
  isJsonObject,
7
7
  isString
8
- } from "./chunk-v01c0k6j.js";
8
+ } from "./chunk-nhd7dh79.js";
9
9
  import {
10
10
  pipeArguments,
11
11
  dual,
@@ -42,7 +42,7 @@ import {
42
42
  isFailure2,
43
43
  hasInterrupts,
44
44
  makeUnsafe5,
45
- make16,
45
+ make15,
46
46
  _await,
47
47
  fail5,
48
48
  isDoneUnsafe,
@@ -156,11 +156,11 @@ import {
156
156
  encodePrettyJsonString,
157
157
  decodeJsonStringSync,
158
158
  encodeUnknownJsonStringSync
159
- } from "./chunk-d3ksv8y1.js";
159
+ } from "./chunk-vrt08dk9.js";
160
160
  import {
161
161
  Id,
162
162
  secretReference
163
- } from "./chunk-rrnee9mk.js";
163
+ } from "./chunk-se79jbha.js";
164
164
  import {
165
165
  currentTimeMillis,
166
166
  SecureRandom,
@@ -227,7 +227,7 @@ import {
227
227
  installCommand,
228
228
  checkServicesFile,
229
229
  checkServices
230
- } from "./chunk-9e452fhe.js";
230
+ } from "./chunk-030xsst1.js";
231
231
  import {
232
232
  join,
233
233
  interrupt,
@@ -236,7 +236,7 @@ import {
236
236
  unbounded2,
237
237
  offer,
238
238
  makeUnsafe3,
239
- make11,
239
+ make10,
240
240
  fromQueue,
241
241
  fromPubSub,
242
242
  map2,
@@ -267,7 +267,7 @@ import {
267
267
  writeSrtSettings2,
268
268
  srtStepArgv2,
269
269
  srtArgv2
270
- } from "./chunk-dk0ftqwg.js";
270
+ } from "./chunk-7672g0fj.js";
271
271
  import {
272
272
  writeAgentEnvironmentConfigFile2,
273
273
  readManifestSkillPaths2,
@@ -283,8 +283,18 @@ import {
283
283
  applyAgentEnvironmentMaterialization2,
284
284
  isPathWithin2,
285
285
  skillIdentity2
286
- } from "./chunk-4wqjxfbv.js";
287
- import"./chunk-hr9vd6dj.js";
286
+ } from "./chunk-hxm3bvpn.js";
287
+ import"./chunk-290se4bt.js";
288
+ import {
289
+ egressAllowed,
290
+ writeSecretRegistry,
291
+ secretRefusalLog,
292
+ appendSecretRefusals,
293
+ parseSecretRefusals,
294
+ secretFilter2,
295
+ opaqueTunnelRefusal2,
296
+ isOpaqueConnectReason2
297
+ } from "./chunk-gngg8j56.js";
288
298
  import {
289
299
  sliceBytes2,
290
300
  maxLineBytes2,
@@ -292,28 +302,23 @@ import {
292
302
  decodedOption2,
293
303
  decoded2,
294
304
  readOpencode2
295
- } from "./chunk-csbf77zs.js";
296
- import {
297
- writeSecretRegistry,
298
- secretRefusalLog,
299
- parseSecretRefusals
300
- } from "./chunk-1w81w56v.js";
305
+ } from "./chunk-7sm45hhc.js";
301
306
  import {
302
307
  uploadRunFile,
303
308
  programLease,
304
309
  rpcRunFiles,
305
310
  programHostsEnv,
306
311
  undeclaredHostsEnv
307
- } from "./chunk-x1zqfxve.js";
308
- import"./chunk-5n121vsj.js";
312
+ } from "./chunk-7wenq6ew.js";
313
+ import"./chunk-cefprsjj.js";
309
314
  import {
310
315
  nextInt
311
- } from "./chunk-q3c7vmby.js";
316
+ } from "./chunk-b63rssdn.js";
312
317
  import {
313
318
  ChildProcessSpawner,
314
319
  make3
315
- } from "./chunk-1rry0tsn.js";
316
- import"./chunk-cmatdpfy.js";
320
+ } from "./chunk-pyt2zrwc.js";
321
+ import"./chunk-cj3ef3pv.js";
317
322
 
318
323
  // packages/core/src/sync-kit.ts
319
324
  import { createHash } from "crypto";
@@ -2594,6 +2599,82 @@ var prepareDockerHome = (input) => gen(function* () {
2594
2599
  }
2595
2600
  });
2596
2601
 
2602
+ // packages/agent-runtime/src/docker-secret-proxy.ts
2603
+ import { createHttpProxyServer } from "@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js";
2604
+ import { isLoopbackName } from "@anthropic-ai/sandbox-runtime/dist/sandbox/address.js";
2605
+ import { createMitmCA, disposeMitmCA } from "@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js";
2606
+ import { canonicalizeHost } from "@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js";
2607
+ import {
2608
+ createResolvedAddressGuard
2609
+ } from "@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js";
2610
+ import { chmodSync } from "fs";
2611
+ import { isIP } from "net";
2612
+ import { networkInterfaces } from "os";
2613
+ class SecretProxyUnavailable extends TaggedError("SecretProxyUnavailable") {
2614
+ }
2615
+ var dockerSecretProxySocket = (registryDirectory) => `${registryDirectory}/proxy.sock`;
2616
+ var anyName = "kitman-target.invalid";
2617
+ var dockerBridge = (name) => name === "docker0" || name === "docker_gwbridge" || name.startsWith("br-");
2618
+ var dockerNetworkSubnets = (interfaces = networkInterfaces()) => Object.entries(interfaces).flatMap(([name, addresses]) => dockerBridge(name) ? (addresses ?? []).flatMap(({ cidr }) => cidr === null ? [] : [cidr]) : []);
2619
+ var runnerAddresses = (interfaces) => {
2620
+ let current;
2621
+ try {
2622
+ current = interfaces();
2623
+ } catch {
2624
+ return [];
2625
+ }
2626
+ const own = Object.values(current).flatMap((addresses) => (addresses ?? []).map(({ address }) => address));
2627
+ return [...own, ...dockerNetworkSubnets(current)];
2628
+ };
2629
+ var runnerAddressGuard = (options = {}, interfaces = networkInterfaces) => createResolvedAddressGuard({ ...options, localAddresses: () => runnerAddresses(interfaces) });
2630
+ var namesRunner = (guard, host, port) => {
2631
+ const canonical = canonicalizeHost(host) ?? host;
2632
+ if (isLoopbackName(canonical))
2633
+ return !guard.permits(anyName, "127.0.0.1", port);
2634
+ return isIP(canonical) !== 0 && !guard.permits(anyName, canonical, port);
2635
+ };
2636
+ var startDockerSecretProxy = (input) => gen(function* () {
2637
+ const ca = yield* acquireRelease(try_2({ try: () => createMitmCA({}), catch: (cause) => new SecretProxyUnavailable({ cause }) }), (ca) => ignore(tryPromise(() => disposeMitmCA(ca))));
2638
+ const { network, registryFile } = input;
2639
+ const guard = runnerAddressGuard(input.addressGuard);
2640
+ const server = createHttpProxyServer({
2641
+ filter: (port, host, _socket, _command, explain) => {
2642
+ if (namesRunner(guard, host, port)) {
2643
+ explain?.("the Runner's own address or one of its docker networks");
2644
+ return false;
2645
+ }
2646
+ if (network === "open" || egressAllowed(network.hosts, host, port))
2647
+ return true;
2648
+ explain?.("host not allowed");
2649
+ return false;
2650
+ },
2651
+ lookupFor: (port) => guard.lookupFor(port),
2652
+ mitmCA: ca,
2653
+ filterRequest: secretFilter2(registryFile),
2654
+ refuseOpaqueTunnels: true,
2655
+ onFilterRequestDenied: ({ method, url, reason }) => {
2656
+ if (method !== "CONNECT" || !isOpaqueConnectReason2(reason))
2657
+ return;
2658
+ try {
2659
+ appendSecretRefusals(registryFile, [{ host: url, reason: opaqueTunnelRefusal2 }]);
2660
+ } catch {}
2661
+ },
2662
+ ...input.upstreamCA === undefined ? undefined : { tlsTerminateUpstreamCA: input.upstreamCA }
2663
+ });
2664
+ yield* acquireRelease(callback3((resume) => {
2665
+ server.once("error", (cause) => resume(fail7(new SecretProxyUnavailable({ cause }))));
2666
+ server.listen(input.socket, () => resume(void_3));
2667
+ }), () => sync2(() => server.close()));
2668
+ yield* try_2({
2669
+ try: () => chmodSync(input.socket, 438),
2670
+ catch: (cause) => new SecretProxyUnavailable({ cause })
2671
+ });
2672
+ return { socket: input.socket, trustBundle: ca.trustBundlePath };
2673
+ });
2674
+
2675
+ // packages/agent-runtime/src/docker-sandbox.ts
2676
+ import { CA_TRUST_VARS } from "@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js";
2677
+
2597
2678
  // packages/agent-runtime/src/helper-scripts.ts
2598
2679
  import { fileURLToPath } from "url";
2599
2680
  var helperScriptPath = (name) => gen(function* () {
@@ -2611,9 +2692,14 @@ var RunnerLabel = "kitman.runner";
2611
2692
  var StepAttemptLabel = "kitman.step-attempt";
2612
2693
  var EgressProxyImage = "oven/bun@sha256:4cf82f5686b196504fe119db3fcd9185b191f82ece82c40680e597228ec6070a";
2613
2694
  var egressProxyAddress = "http://kitman-egress:3128";
2695
+ var relayedSocket = "/kitman/proxy.sock";
2696
+ var trustBundle = "/kitman/trust.pem";
2614
2697
 
2615
2698
  class ContainerError extends TaggedError("ContainerError") {
2616
2699
  }
2700
+
2701
+ class SecretProxyUnreachable extends TaggedError("SecretProxyUnreachable") {
2702
+ }
2617
2703
  var imagePull = { timeout: "30 minutes" };
2618
2704
  var dockerContainerRunner = map8(ChildProcessSpawner, (spawner) => {
2619
2705
  const docker = (args, options = {}) => runCommand2("docker", args, options).pipe(mapError2((error) => new ContainerError({ message: error.message })), provideService(ChildProcessSpawner, spawner));
@@ -2629,6 +2715,7 @@ var dockerContainerRunner = map8(ChildProcessSpawner, (spawner) => {
2629
2715
  input.name,
2630
2716
  ...labelArgs(input.labels),
2631
2717
  ...input.network === undefined ? [] : ["--network", input.network],
2718
+ ...input.alias === undefined ? [] : ["--network-alias", input.alias],
2632
2719
  ...input.user === undefined ? [] : ["--user", input.user],
2633
2720
  ...input.mounts.flatMap((mount) => [
2634
2721
  "--volume",
@@ -2678,26 +2765,49 @@ var startDockerSandbox = (input) => gen(function* () {
2678
2765
  [StepAttemptLabel, input.attemptId]
2679
2766
  ];
2680
2767
  const agent = `kitman-agent-${id}`;
2681
- const network = input.policy.network === "open" ? undefined : `kitman-agent-net-${id}`;
2768
+ const { secretProxy } = input;
2769
+ const network = input.policy.network === "open" && secretProxy === undefined ? undefined : `kitman-agent-net-${id}`;
2682
2770
  yield* acquireRelease(void_3, () => containers.removeLabelled([StepAttemptLabel, input.attemptId]));
2683
- if (input.policy.network !== "open" && network !== undefined) {
2771
+ if (network !== undefined) {
2684
2772
  const proxy = `kitman-egress-${id}`;
2773
+ const script = {
2774
+ source: yield* helperScriptPath("egress-proxy.ts"),
2775
+ target: "/kitman/egress-proxy.ts",
2776
+ readOnly: true
2777
+ };
2685
2778
  yield* containers.createInternalNetwork({ name: network, labels });
2686
- yield* containers.run({
2687
- name: proxy,
2688
- image: input.docker.proxyImage ?? EgressProxyImage,
2689
- labels,
2690
- mounts: [
2691
- {
2692
- source: yield* helperScriptPath("egress-proxy.ts"),
2693
- target: "/kitman/egress-proxy.ts",
2694
- readOnly: true
2695
- }
2696
- ],
2697
- env: {},
2698
- command: ["bun", "/kitman/egress-proxy.ts", input.policy.network.hosts.join(",")]
2699
- });
2700
- yield* containers.connect({ network, container: proxy, alias: "kitman-egress" });
2779
+ const image = input.docker.proxyImage ?? EgressProxyImage;
2780
+ if (secretProxy === undefined) {
2781
+ yield* containers.run({
2782
+ name: proxy,
2783
+ image,
2784
+ labels,
2785
+ mounts: [script],
2786
+ env: {},
2787
+ command: ["bun", script.target, input.policy.network === "open" ? "" : input.policy.network.hosts.join(",")]
2788
+ });
2789
+ yield* containers.connect({ network, container: proxy, alias: "kitman-egress" });
2790
+ } else {
2791
+ yield* containers.run({
2792
+ name: proxy,
2793
+ image,
2794
+ labels,
2795
+ network,
2796
+ alias: "kitman-egress",
2797
+ mounts: [script, { source: secretProxy.socket, target: relayedSocket }],
2798
+ env: {},
2799
+ command: ["bun", script.target, "--relay", relayedSocket]
2800
+ });
2801
+ const probe = yield* containers.exec({
2802
+ container: proxy,
2803
+ workdir: "/",
2804
+ env: {},
2805
+ command: ["bun", script.target, "--probe", relayedSocket],
2806
+ timeout: "1 minute"
2807
+ });
2808
+ if (probe.exitCode !== 0)
2809
+ return yield* new SecretProxyUnreachable({ output: probe.output });
2810
+ }
2701
2811
  for (const service of input.services ?? [])
2702
2812
  yield* acquireRelease(containers.connect({ network, ...service }), () => containers.disconnect({ network, container: service.container }));
2703
2813
  }
@@ -2709,7 +2819,8 @@ var startDockerSandbox = (input) => gen(function* () {
2709
2819
  ...input.docker.user === undefined ? undefined : { user: input.docker.user },
2710
2820
  mounts: [
2711
2821
  ...input.policy.writablePaths.map((writable) => ({ source: writable, target: writable })),
2712
- ...(input.readOnlyPaths ?? []).map((readable) => ({ source: readable, target: readable, readOnly: true }))
2822
+ ...(input.readOnlyPaths ?? []).map((readable) => ({ source: readable, target: readable, readOnly: true })),
2823
+ ...secretProxy === undefined ? [] : [{ source: secretProxy.trustBundle, target: trustBundle, readOnly: true }]
2713
2824
  ],
2714
2825
  workdir: input.workspace,
2715
2826
  env: {
@@ -2722,7 +2833,8 @@ var startDockerSandbox = (input) => gen(function* () {
2722
2833
  http_proxy: egressProxyAddress,
2723
2834
  NO_PROXY: "localhost,127.0.0.1",
2724
2835
  no_proxy: "localhost,127.0.0.1"
2725
- }
2836
+ },
2837
+ ...secretProxy === undefined ? undefined : Object.fromEntries(CA_TRUST_VARS.map((name) => [name, trustBundle]))
2726
2838
  },
2727
2839
  command: ["sleep", "infinity"]
2728
2840
  });
@@ -3179,12 +3291,14 @@ var runAttempt = (request, options) => gen(function* () {
3179
3291
  const { attempt } = request.attempt;
3180
3292
  const workspace = request.workspace.path;
3181
3293
  const secrets = request.launch.secrets ?? {};
3182
- if (Object.keys(secrets).length > 0 && request.sandbox.backend === "docker")
3183
- return failed("secrets_need_srt", "A docker Step cannot take Secrets yet: its egress proxy cannot swap their references for values, and Kitman puts no value in a sandbox. Run this Step in srt.");
3184
3294
  const bound = yield* result(requireSecretHosts(request.launch.secrets, request.launch.secretDestinations));
3185
3295
  if (isFailure(bound))
3186
3296
  return failed(bound.failure.reason, bound.failure.summary);
3187
- const referenced = request.sandbox.backend === "srt" ? secretReferences(secrets, request.launch.secretDestinations ?? {}) : undefined;
3297
+ const referenced = request.sandbox.backend === "host" ? undefined : secretReferences(secrets, request.launch.secretDestinations ?? {});
3298
+ const holdSecrets = (initial) => stepSecretRegistry(stepSecretDirectory(options.home, attempt.id), initial, referenced?.references ?? {}).pipe(mapError2(() => new AgentStepFailure({
3299
+ reason: "secret_registry_unwritable",
3300
+ summary: "The Step's Secret references could not be written."
3301
+ })));
3188
3302
  const agent = referenced === undefined || request.launch.secrets === undefined ? request.launch : { ...request.launch, secrets: referenced.references };
3189
3303
  const prepared = yield* result(prepareHarness({
3190
3304
  attempt: request.attempt,
@@ -3225,10 +3339,7 @@ var runAttempt = (request, options) => gen(function* () {
3225
3339
  ]))
3226
3340
  };
3227
3341
  const holdsLogin = holdsLoginByReference(launch);
3228
- const registry = Object.keys(initial).length === 0 && !holdsLogin ? undefined : yield* stepSecretRegistry(stepSecretDirectory(options.home, attempt.id), initial, referenced?.references ?? {}).pipe(mapError2(() => new AgentStepFailure({
3229
- reason: "secret_registry_unwritable",
3230
- summary: "The Step's Secret references could not be written."
3231
- })));
3342
+ const registry = Object.keys(initial).length === 0 && !holdsLogin ? undefined : yield* holdSecrets(initial);
3232
3343
  const withSessions = sessions === undefined ? policy : {
3233
3344
  ...policy,
3234
3345
  writablePaths: [...policy.writablePaths, sessions],
@@ -3254,14 +3365,27 @@ var runAttempt = (request, options) => gen(function* () {
3254
3365
  case "docker": {
3255
3366
  if (options.docker === undefined)
3256
3367
  return yield* new AgentStepFailure({ reason: "sandbox_unavailable", summary: "`docker` is not available." });
3368
+ const registry = referenced === undefined || Object.keys(referenced.registry).length === 0 ? undefined : yield* holdSecrets(referenced.registry);
3369
+ const secretProxy = registry === undefined ? undefined : yield* startDockerSecretProxy({
3370
+ registryFile: registry.file,
3371
+ socket: dockerSecretProxySocket(registry.directory),
3372
+ network: policy.network
3373
+ }).pipe(tapError2((error) => logWarning("secret_proxy_unavailable", error.cause)), mapError2(() => new AgentStepFailure({
3374
+ reason: "secret_proxy_unavailable",
3375
+ summary: "The proxy that swaps the Step's Secret references could not be started."
3376
+ })));
3257
3377
  const { container } = yield* startDockerSandbox({
3258
3378
  docker: options.docker,
3259
3379
  runnerId: request.runnerId,
3260
3380
  attemptId: attempt.id,
3261
3381
  policy,
3262
3382
  workspace,
3263
- configDir
3264
- }).pipe(mapError2(() => new AgentStepFailure({
3383
+ configDir,
3384
+ ...secretProxy === undefined ? undefined : { secretProxy }
3385
+ }).pipe(tapError2((error) => isTagged(error, "SecretProxyUnreachable") ? logWarning("secret_proxy_unavailable", error.output) : void_3), mapError2((error) => isTagged(error, "SecretProxyUnreachable") ? new AgentStepFailure({
3386
+ reason: "secret_proxy_unavailable",
3387
+ summary: "The egress container could not reach the proxy that swaps the Step's Secret references."
3388
+ }) : new AgentStepFailure({
3265
3389
  reason: "sandbox_container_unavailable",
3266
3390
  summary: "The attempt's container could not be started."
3267
3391
  })));
@@ -3285,7 +3409,7 @@ var runAttempt = (request, options) => gen(function* () {
3285
3409
  return {
3286
3410
  argv: dockerExecArgv({ container, workspace, env: policy.environment, argv: harnessArgv }),
3287
3411
  env: policy.environment,
3288
- registry: undefined
3412
+ registry
3289
3413
  };
3290
3414
  }
3291
3415
  default:
@@ -5861,7 +5985,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
5861
5985
  return {
5862
5986
  request: (method, params) => gen(function* () {
5863
5987
  const id = ++lastId;
5864
- const deferred = yield* make16();
5988
+ const deferred = yield* make15();
5865
5989
  pending.set(id, deferred);
5866
5990
  yield* send({ id, method, params });
5867
5991
  return yield* _await(deferred).pipe(mapError2((error) => new CodexAppServerFailed({ reason: `${method}: ${error.message}` })));
@@ -6004,7 +6128,7 @@ var kitmanMcpPreflight = (mcp) => gen(function* () {
6004
6128
  const server = yield* spawner.spawn(make3(mcp.command, [...mcp.args], {
6005
6129
  extendEnv: true,
6006
6130
  env: mcp.env,
6007
- stdin: { stream: make11(new TextEncoder().encode(handshake)), endOnDone: false },
6131
+ stdin: { stream: make10(new TextEncoder().encode(handshake)), endOnDone: false },
6008
6132
  stderr: "ignore"
6009
6133
  }));
6010
6134
  const reply = yield* server.stdout.pipe(decodeText, splitLines, map2((line) => getOrUndefined(decodeJsonStringOption(line))), filter((message) => isJsonObject(message) && message.id === 2), runHead);
@@ -6078,7 +6202,7 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
6078
6202
  const exitCode = sandbox === undefined ? yield* gen(function* () {
6079
6203
  const spawner = yield* ChildProcessSpawner;
6080
6204
  const handle = yield* spawner.spawn(make3(input.bun ?? process.execPath, [file], {
6081
- stdin: make11(new TextEncoder().encode(stdin)),
6205
+ stdin: make10(new TextEncoder().encode(stdin)),
6082
6206
  stdout: "inherit",
6083
6207
  stderr: "inherit",
6084
6208
  extendEnv: false,
@@ -6804,6 +6928,7 @@ export {
6804
6928
  RepoMaterializationError,
6805
6929
  RunnerLabel,
6806
6930
  RunnerReplicaCancellation,
6931
+ SecretProxyUnreachable,
6807
6932
  SkillMaterializationRefused2 as SkillMaterializationRefused,
6808
6933
  StepAttemptLabel,
6809
6934
  agentStepExecutionLimit,
@@ -22,21 +22,21 @@ import {
22
22
  NullOr,
23
23
  Finite,
24
24
  encodeUnknownJsonStringSync
25
- } from "./chunk-d3ksv8y1.js";
25
+ } from "./chunk-vrt08dk9.js";
26
26
  import {
27
27
  isNumber,
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-v01c0k6j.js";
30
+ } from "./chunk-nhd7dh79.js";
31
31
  import {
32
- make11,
32
+ make10,
33
33
  runForEach,
34
34
  compiled2
35
- } from "./chunk-dk0ftqwg.js";
35
+ } from "./chunk-7672g0fj.js";
36
36
  import {
37
37
  ChildProcessSpawner,
38
38
  make3
39
- } from "./chunk-1rry0tsn.js";
39
+ } from "./chunk-pyt2zrwc.js";
40
40
 
41
41
  // packages/agent-runtime/src/opencode-store.ts
42
42
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -170,7 +170,7 @@ var isolatedRead = (store, name, input) => gen(function* () {
170
170
  const spawner = yield* ChildProcessSpawner;
171
171
  const [command, ...args] = opencodeReaderCommand();
172
172
  const handle = yield* spawner.spawn(make3(command, args, {
173
- stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
173
+ stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
174
174
  stderr: "ignore",
175
175
  extendEnv: false,
176
176
  env: {},
@@ -75,10 +75,10 @@ import {
75
75
  toEquivalence,
76
76
  toCodecJson,
77
77
  Json
78
- } from "./chunk-d3ksv8y1.js";
78
+ } from "./chunk-vrt08dk9.js";
79
79
  import {
80
80
  guard
81
- } from "./chunk-rrnee9mk.js";
81
+ } from "./chunk-se79jbha.js";
82
82
  import {
83
83
  currentTimeMillis,
84
84
  WebCrypto,
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-9e452fhe.js";
108
+ } from "./chunk-030xsst1.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-dk0ftqwg.js";
112
+ } from "./chunk-7672g0fj.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");
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-d3ksv8y1.js";
6
+ } from "./chunk-vrt08dk9.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -6,10 +6,10 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-d3ksv8y1.js";
9
+ } from "./chunk-vrt08dk9.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-dk0ftqwg.js";
12
+ } from "./chunk-7672g0fj.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-9e452fhe.js";
22
+ } from "./chunk-030xsst1.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-cmatdpfy.js";
28
+ } from "./chunk-cj3ef3pv.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -12,7 +12,7 @@ import {
12
12
  add,
13
13
  getOrUndefinedUnsafe,
14
14
  getUnsafe,
15
- get4,
15
+ get3,
16
16
  Reference,
17
17
  toMillis,
18
18
  isSuccess,
@@ -96,7 +96,7 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-d3ksv8y1.js";
99
+ } from "./chunk-vrt08dk9.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-dk0ftqwg.js";
111
+ } from "./chunk-7672g0fj.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-9e452fhe.js";
126
+ } from "./chunk-030xsst1.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")) {
@@ -237,7 +237,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
237
237
  const disableTracing = options?.disableTracing ?? false;
238
238
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
239
239
  const services = yield* context();
240
- const scope = get4(services, Scope);
240
+ const scope = get3(services, Scope);
241
241
  const entries = new Map;
242
242
  let isShutdown = false;
243
243
  yield* addFinalizer(scope, withFiber2((parent) => {
@@ -643,7 +643,7 @@ var makeRpcSchemas = (codecFor) => {
643
643
  return entry;
644
644
  }
645
645
  const streamSchemas = getStreamSchemas(rpc.successSchema);
646
- const parseOptions = get4(rpc.annotations, ParseOptions);
646
+ const parseOptions = get3(rpc.annotations, ParseOptions);
647
647
  const exitSchema2 = exitSchema(rpc);
648
648
  let decodeDiscardExit;
649
649
  entry = {
@@ -102,7 +102,7 @@ import {
102
102
  decodeJsonStringOption,
103
103
  encodeJsonStringSync,
104
104
  encodePrettyJsonString
105
- } from "./chunk-d3ksv8y1.js";
105
+ } from "./chunk-vrt08dk9.js";
106
106
  import {
107
107
  currentTimeMillis,
108
108
  SecureRandom,
@@ -153,13 +153,13 @@ import {
153
153
  runMcpEffect,
154
154
  createAgentAuthSignedFetch,
155
155
  setupMcpAgentCredential
156
- } from "./chunk-9e452fhe.js";
156
+ } from "./chunk-030xsst1.js";
157
157
  import {
158
158
  guard,
159
159
  Id,
160
160
  Timestamp,
161
161
  ActorType
162
- } from "./chunk-rrnee9mk.js";
162
+ } from "./chunk-se79jbha.js";
163
163
  import {
164
164
  toJsonValue,
165
165
  isOneOf,
@@ -173,7 +173,7 @@ import {
173
173
  isJsonObject,
174
174
  isString,
175
175
  kindOf
176
- } from "./chunk-v01c0k6j.js";
176
+ } from "./chunk-nhd7dh79.js";
177
177
  import {
178
178
  join,
179
179
  interrupt,
@@ -187,17 +187,17 @@ import {
187
187
  withDefault,
188
188
  option,
189
189
  String2
190
- } from "./chunk-dk0ftqwg.js";
190
+ } from "./chunk-7672g0fj.js";
191
191
  import {
192
192
  nextInt
193
- } from "./chunk-q3c7vmby.js";
193
+ } from "./chunk-b63rssdn.js";
194
194
  import {
195
195
  layerJson,
196
196
  make4,
197
197
  withHeaders,
198
198
  layerProtocolSocket,
199
199
  ConnectionHooks
200
- } from "./chunk-cmatdpfy.js";
200
+ } from "./chunk-cj3ef3pv.js";
201
201
 
202
202
  // apps/cli/src/mcp.ts
203
203
  import { tmpdir } from "os";
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-1rry0tsn.js";
2
+ import"./chunk-pyt2zrwc.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,9 +12,9 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-9e452fhe.js";
16
- import"./chunk-dk0ftqwg.js";
17
- import"./chunk-d3ksv8y1.js";
15
+ } from "./chunk-030xsst1.js";
16
+ import"./chunk-7672g0fj.js";
17
+ import"./chunk-vrt08dk9.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,