@agentstep/agent-sdk 0.4.35 → 0.4.37

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 (73) hide show
  1. package/dist/backends/claude/index.js +2 -2
  2. package/dist/backends/claude/tool-bridge.js +1 -3
  3. package/dist/backends/registry.js +3 -3
  4. package/dist/{chunk-BKBXVNVR.js → chunk-23UY2MFV.js} +4 -4
  5. package/dist/{chunk-O2A3SMM4.js → chunk-34I6YX5C.js} +1 -1
  6. package/dist/{chunk-5DGYWZS6.js → chunk-357WBREV.js} +1 -1
  7. package/dist/{chunk-LJHIA7JZ.js → chunk-44TEDXNS.js} +1 -1
  8. package/dist/{chunk-3B7RM3M3.js → chunk-4INK5J6G.js} +1 -1
  9. package/dist/{chunk-ERCX52RV.js → chunk-4JUTGYO3.js} +1 -1
  10. package/dist/{chunk-WUA4SR4W.js → chunk-55KYCJKN.js} +2 -2
  11. package/dist/{chunk-X672A67L.js → chunk-6KZYAWWM.js} +1 -1
  12. package/dist/{chunk-VUECON2Y.js → chunk-BRWTFPLQ.js} +1 -1
  13. package/dist/{chunk-THBICEP4.js → chunk-DQ6YEMHQ.js} +1 -1
  14. package/dist/{chunk-YX2TSJKF.js → chunk-DTVP52TJ.js} +1 -1
  15. package/dist/{chunk-JT5QW4ZC.js → chunk-ELHUYR6X.js} +1 -1
  16. package/dist/{chunk-GJ7XWTHD.js → chunk-ESSEO2YM.js} +1 -1
  17. package/dist/{chunk-DSDWHGY5.js → chunk-F6LIUFEF.js} +1 -1
  18. package/dist/{chunk-EUIR2ADY.js → chunk-FDBR634Z.js} +1 -1
  19. package/dist/{chunk-ZUDE3PBV.js → chunk-FUWIQERE.js} +1 -1
  20. package/dist/{chunk-5JYBDVYS.js → chunk-FWMY2LTE.js} +2 -2
  21. package/dist/{chunk-3CAXZ5EJ.js → chunk-GM3ATEBU.js} +1 -1
  22. package/dist/{chunk-YUXYLXDH.js → chunk-IOEDE6TY.js} +13 -12
  23. package/dist/{chunk-MDBZAKVG.js → chunk-KADCPOTC.js} +1 -1
  24. package/dist/{chunk-S6YIUX5D.js → chunk-KJ32UB3K.js} +1 -1
  25. package/dist/{chunk-XEJ4SDE6.js → chunk-NIOX2KED.js} +2 -2
  26. package/dist/{chunk-LRV3BZR3.js → chunk-OSNSJOAA.js} +2 -2
  27. package/dist/{chunk-BQKDLRLF.js → chunk-PLDPJV73.js} +1 -1
  28. package/dist/{chunk-HXHJNOIN.js → chunk-QP3DVGIC.js} +1 -1
  29. package/dist/{chunk-XZCXELYT.js → chunk-RE3DVLEA.js} +1 -1
  30. package/dist/{chunk-4FDEJHH7.js → chunk-SJ7WZEVY.js} +0 -2
  31. package/dist/{chunk-62KI4EKC.js → chunk-W65Y33D5.js} +1 -1
  32. package/dist/{chunk-HRFQYA7B.js → chunk-WOOMYOM5.js} +1 -1
  33. package/dist/{chunk-L3ABBEUO.js → chunk-Y6YLISBC.js} +2 -2
  34. package/dist/{chunk-RMMP42W4.js → chunk-ZCBO6BDF.js} +1 -1
  35. package/dist/{chunk-7CD4QT5R.js → chunk-ZMNQ2YJ6.js} +6 -4
  36. package/dist/{chunk-NOXY423I.js → chunk-ZQ5HR6TZ.js} +1 -1
  37. package/dist/{chunk-AN645X3T.js → chunk-ZQGSZDXD.js} +1 -1
  38. package/dist/containers/lifecycle.js +4 -4
  39. package/dist/handlers/agents.js +10 -10
  40. package/dist/handlers/api_keys.js +10 -10
  41. package/dist/handlers/audit.js +10 -10
  42. package/dist/handlers/batch.js +10 -10
  43. package/dist/handlers/credentials.js +11 -11
  44. package/dist/handlers/environments.js +10 -10
  45. package/dist/handlers/events.js +10 -10
  46. package/dist/handlers/files.js +10 -10
  47. package/dist/handlers/index.js +34 -34
  48. package/dist/handlers/license.js +10 -10
  49. package/dist/handlers/memory.js +10 -10
  50. package/dist/handlers/metrics.js +10 -10
  51. package/dist/handlers/models.js +10 -10
  52. package/dist/handlers/providers.js +10 -10
  53. package/dist/handlers/resources.js +10 -10
  54. package/dist/handlers/sessions.js +10 -10
  55. package/dist/handlers/settings.js +10 -10
  56. package/dist/handlers/skills-write.js +10 -10
  57. package/dist/handlers/skills.js +10 -10
  58. package/dist/handlers/stream.js +9 -9
  59. package/dist/handlers/tenants.js +10 -10
  60. package/dist/handlers/threads.js +10 -10
  61. package/dist/handlers/traces.js +10 -10
  62. package/dist/handlers/upstream_keys.js +10 -10
  63. package/dist/handlers/vaults.js +10 -10
  64. package/dist/handlers/whoami.js +10 -10
  65. package/dist/http.js +9 -9
  66. package/dist/index.js +9 -9
  67. package/dist/init.js +8 -8
  68. package/dist/sessions/driver.js +5 -5
  69. package/dist/sessions/sweeper.js +5 -5
  70. package/dist/sessions/threads.js +5 -5
  71. package/dist/shutdown.js +6 -6
  72. package/dist/sync/container-file-sync.js +64 -28
  73. package/package.json +1 -1
@@ -2,14 +2,14 @@ import {
2
2
  claudeBackend,
3
3
  installPermissionHook,
4
4
  installToolBridge
5
- } from "../../chunk-7CD4QT5R.js";
5
+ } from "../../chunk-ZMNQ2YJ6.js";
6
6
  import {
7
7
  buildClaudeArgs,
8
8
  buildClaudeAuthEnv
9
9
  } from "../../chunk-S7W3KJYH.js";
10
10
  import "../../chunk-FVBDEOTZ.js";
11
11
  import "../../chunk-CY6AWCC6.js";
12
- import "../../chunk-4FDEJHH7.js";
12
+ import "../../chunk-SJ7WZEVY.js";
13
13
  import {
14
14
  createClaudeTranslator
15
15
  } from "../../chunk-JFYE5BFI.js";
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  TOOL_BRIDGE_DIR,
3
- TOOL_BRIDGE_MCP_CONFIG_PATH,
4
3
  TOOL_BRIDGE_PENDING_PATH,
5
4
  TOOL_BRIDGE_REQUEST_PATH,
6
5
  TOOL_BRIDGE_RESPONSE_PATH,
@@ -9,11 +8,10 @@ import {
9
8
  buildBridgeMcpConfig,
10
9
  generateBridgeScript,
11
10
  toolsToJson
12
- } from "../../chunk-4FDEJHH7.js";
11
+ } from "../../chunk-SJ7WZEVY.js";
13
12
  import "../../chunk-2ESYSVXG.js";
14
13
  export {
15
14
  TOOL_BRIDGE_DIR,
16
- TOOL_BRIDGE_MCP_CONFIG_PATH,
17
15
  TOOL_BRIDGE_PENDING_PATH,
18
16
  TOOL_BRIDGE_REQUEST_PATH,
19
17
  TOOL_BRIDGE_RESPONSE_PATH,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  listBackends,
3
3
  resolveBackend
4
- } from "../chunk-EUIR2ADY.js";
4
+ } from "../chunk-FDBR634Z.js";
5
5
  import "../chunk-5EQJOUWM.js";
6
6
  import "../chunk-T5VRE77P.js";
7
7
  import "../chunk-RVR6C22M.js";
@@ -33,11 +33,11 @@ import "../chunk-CULYZ3VA.js";
33
33
  import "../chunk-E4FQRMHV.js";
34
34
  import "../chunk-IAF6VMPO.js";
35
35
  import "../chunk-CREPPDHX.js";
36
- import "../chunk-7CD4QT5R.js";
36
+ import "../chunk-ZMNQ2YJ6.js";
37
37
  import "../chunk-S7W3KJYH.js";
38
38
  import "../chunk-FVBDEOTZ.js";
39
39
  import "../chunk-CY6AWCC6.js";
40
- import "../chunk-4FDEJHH7.js";
40
+ import "../chunk-SJ7WZEVY.js";
41
41
  import "../chunk-JFYE5BFI.js";
42
42
  import "../chunk-XBHDQK4Z.js";
43
43
  import "../chunk-IU457W7Q.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runTurn
3
- } from "./chunk-YUXYLXDH.js";
3
+ } from "./chunk-IOEDE6TY.js";
4
4
  import {
5
5
  enqueueTurn
6
6
  } from "./chunk-2PPB644A.js";
@@ -19,15 +19,15 @@ import {
19
19
  } from "./chunk-3MQ2FWXS.js";
20
20
  import {
21
21
  installShutdownHandlers
22
- } from "./chunk-BQKDLRLF.js";
22
+ } from "./chunk-PLDPJV73.js";
23
23
  import {
24
24
  runSweep
25
- } from "./chunk-GJ7XWTHD.js";
25
+ } from "./chunk-ESSEO2YM.js";
26
26
  import {
27
27
  fillWarmPools,
28
28
  reconcileDockerOrphanSandboxes,
29
29
  reconcileOrphanSandboxes
30
- } from "./chunk-WUA4SR4W.js";
30
+ } from "./chunk-55KYCJKN.js";
31
31
  import {
32
32
  appendEvent,
33
33
  installPayloadRedactor
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-3CAXZ5EJ.js";
4
+ } from "./chunk-GM3ATEBU.js";
5
5
  import {
6
6
  readSetting,
7
7
  writeSetting
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-3CAXZ5EJ.js";
4
+ } from "./chunk-GM3ATEBU.js";
5
5
  import {
6
6
  resolveContainerProvider
7
7
  } from "./chunk-WPK4ZPMG.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-3CAXZ5EJ.js";
4
+ } from "./chunk-GM3ATEBU.js";
5
5
 
6
6
  // src/handlers/whoami.ts
7
7
  function handleWhoami(request) {
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  jsonOk,
23
23
  routeWrap
24
- } from "./chunk-3CAXZ5EJ.js";
24
+ } from "./chunk-GM3ATEBU.js";
25
25
  import {
26
26
  badRequest,
27
27
  notFound
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  jsonOk,
6
6
  routeWrap
7
- } from "./chunk-3CAXZ5EJ.js";
7
+ } from "./chunk-GM3ATEBU.js";
8
8
 
9
9
  // src/handlers/models.ts
10
10
  function handleListModels(request) {
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-ZTH5JRZG.js";
44
44
  import {
45
45
  resolveBackend
46
- } from "./chunk-EUIR2ADY.js";
46
+ } from "./chunk-FDBR634Z.js";
47
47
  import {
48
48
  getConfig
49
49
  } from "./chunk-V7MTIMPB.js";
@@ -365,9 +365,9 @@ async function replenishWarmPool(envId, engine, provider, secrets) {
365
365
  }
366
366
  async function fillWarmPools() {
367
367
  const cfg = getConfig();
368
- if (cfg.warmPoolSize <= 0) return;
369
368
  const envs = listEnvironments({ includeArchived: false, limit: 100 });
370
369
  const readyEnvs = envs.filter((e) => e.state === "ready");
370
+ if (cfg.warmPoolSize <= 0 && !readyEnvs.some((e) => (e.config?.warm_pool_size ?? 0) > 0)) return;
371
371
  if (readyEnvs.length === 0) return;
372
372
  const CONCURRENCY = 3;
373
373
  let active = 0;
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-JCW3ZRES.js";
13
13
  import {
14
14
  ensureInitialized
15
- } from "./chunk-BKBXVNVR.js";
15
+ } from "./chunk-23UY2MFV.js";
16
16
  import {
17
17
  getProxiedTenantId,
18
18
  isProxied
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  jsonOk,
7
7
  routeWrap
8
- } from "./chunk-3CAXZ5EJ.js";
8
+ } from "./chunk-GM3ATEBU.js";
9
9
  import {
10
10
  badRequest
11
11
  } from "./chunk-EZYKRG4W.js";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  jsonOk,
7
7
  routeWrap
8
- } from "./chunk-3CAXZ5EJ.js";
8
+ } from "./chunk-GM3ATEBU.js";
9
9
  import {
10
10
  getSession,
11
11
  listSessions
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  jsonOk,
11
11
  routeWrap
12
- } from "./chunk-3CAXZ5EJ.js";
12
+ } from "./chunk-GM3ATEBU.js";
13
13
  import {
14
14
  forwardToAnthropic
15
15
  } from "./chunk-JCW3ZRES.js";
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  jsonOk,
20
20
  routeWrap
21
- } from "./chunk-3CAXZ5EJ.js";
21
+ } from "./chunk-GM3ATEBU.js";
22
22
  import {
23
23
  getDb,
24
24
  init_client
@@ -6,7 +6,7 @@ import {
6
6
  reconcileDockerOrphanSandboxes,
7
7
  reconcileOrphanSandboxes,
8
8
  releaseSession
9
- } from "./chunk-WUA4SR4W.js";
9
+ } from "./chunk-55KYCJKN.js";
10
10
  import {
11
11
  appendEvent,
12
12
  dropEmitter
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  jsonOk,
6
6
  routeWrap
7
- } from "./chunk-3CAXZ5EJ.js";
7
+ } from "./chunk-GM3ATEBU.js";
8
8
  import {
9
9
  getProxiedTenantId
10
10
  } from "./chunk-E7DD7F7J.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-2I35VGHX.js";
16
16
  import {
17
17
  claudeBackend
18
- } from "./chunk-7CD4QT5R.js";
18
+ } from "./chunk-ZMNQ2YJ6.js";
19
19
 
20
20
  // src/backends/registry.ts
21
21
  var BACKENDS = {
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  jsonOk,
18
18
  routeWrap
19
- } from "./chunk-3CAXZ5EJ.js";
19
+ } from "./chunk-GM3ATEBU.js";
20
20
  import {
21
21
  getDb,
22
22
  init_client
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  loadVaultForCaller
3
- } from "./chunk-NOXY423I.js";
3
+ } from "./chunk-ZQ5HR6TZ.js";
4
4
  import {
5
5
  jsonOk,
6
6
  routeWrap
7
- } from "./chunk-3CAXZ5EJ.js";
7
+ } from "./chunk-GM3ATEBU.js";
8
8
  import {
9
9
  createCredential,
10
10
  deleteCredential,
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-HVUWXUUI.js";
11
11
  import {
12
12
  ensureInitialized
13
- } from "./chunk-BKBXVNVR.js";
13
+ } from "./chunk-23UY2MFV.js";
14
14
  import {
15
15
  captureException
16
16
  } from "./chunk-3MQ2FWXS.js";
@@ -30,7 +30,7 @@ import {
30
30
  installSkills,
31
31
  provisionResources,
32
32
  wrapProviderWithSecrets
33
- } from "./chunk-WUA4SR4W.js";
33
+ } from "./chunk-55KYCJKN.js";
34
34
  import {
35
35
  BLOCKED_ENV_KEYS,
36
36
  resolveVaultSecrets
@@ -68,7 +68,7 @@ import {
68
68
  } from "./chunk-ZTH5JRZG.js";
69
69
  import {
70
70
  resolveBackend
71
- } from "./chunk-EUIR2ADY.js";
71
+ } from "./chunk-FDBR634Z.js";
72
72
  import {
73
73
  PERMISSION_BRIDGE_PENDING_PATH,
74
74
  PERMISSION_BRIDGE_REQUEST_PATH,
@@ -78,7 +78,7 @@ import {
78
78
  TOOL_BRIDGE_PENDING_PATH,
79
79
  TOOL_BRIDGE_REQUEST_PATH,
80
80
  TOOL_BRIDGE_RESPONSE_PATH
81
- } from "./chunk-4FDEJHH7.js";
81
+ } from "./chunk-SJ7WZEVY.js";
82
82
  import {
83
83
  resolveToolset
84
84
  } from "./chunk-XBHDQK4Z.js";
@@ -392,7 +392,7 @@ ${turnBuild.stdin}`;
392
392
  const responseJson = JSON.stringify({ content: r.content });
393
393
  await provider.exec(
394
394
  sandboxName2,
395
- ["bash", "-c", `cat > ${TOOL_BRIDGE_RESPONSE_PATH2}`],
395
+ ["sh", "-c", `cat > ${TOOL_BRIDGE_RESPONSE_PATH2}`],
396
396
  { stdin: responseJson, secrets }
397
397
  ).catch((err) => {
398
398
  console.warn(`[driver] failed to write tool bridge response:`, err);
@@ -444,9 +444,8 @@ ${turnBuild.stdin}`;
444
444
  );
445
445
  }, 2e3);
446
446
  }
447
- const customToolNames = resolveToolset(agent.tools).customToolNames;
448
447
  let toolBridgePollTimer = null;
449
- if (agent.engine === "claude" && customToolNames.size > 0) {
448
+ if (agent.engine === "claude" && tools.customToolNames.size > 0) {
450
449
  toolBridgePollTimer = setInterval(() => {
451
450
  void checkToolBridgeSentinel(sessionId, sandboxName, provider, secrets, trace).catch(
452
451
  (err) => {
@@ -620,7 +619,7 @@ ${turnBuild.stdin}`;
620
619
  const reentrySecrets = getBySession(sessionId)?.vaultSecrets;
621
620
  await providerForReentry.exec(
622
621
  sprName,
623
- ["bash", "-c", `cat > ${TOOL_BRIDGE_RESPONSE_PATH2}`],
622
+ ["sh", "-c", `cat > ${TOOL_BRIDGE_RESPONSE_PATH2}`],
624
623
  { stdin: responseJson, secrets: reentrySecrets }
625
624
  ).catch((err) => {
626
625
  console.warn(`[driver] failed to write spawn_agent response:`, err);
@@ -767,7 +766,8 @@ async function checkPermissionSentinel(sessionId, sandboxName, provider) {
767
766
  try {
768
767
  const result = await provider.exec(
769
768
  sandboxName,
770
- ["test", "-f", PERMISSION_BRIDGE_PENDING_PATH]
769
+ ["test", "-f", PERMISSION_BRIDGE_PENDING_PATH],
770
+ { timeoutMs: 5e3 }
771
771
  );
772
772
  if (result.exit_code !== 0) return;
773
773
  } catch {
@@ -777,7 +777,8 @@ async function checkPermissionSentinel(sessionId, sandboxName, provider) {
777
777
  try {
778
778
  const result = await provider.exec(
779
779
  sandboxName,
780
- ["cat", PERMISSION_BRIDGE_REQUEST_PATH]
780
+ ["cat", PERMISSION_BRIDGE_REQUEST_PATH],
781
+ { timeoutMs: 5e3 }
781
782
  );
782
783
  request = JSON.parse(result.stdout);
783
784
  } catch (err) {
@@ -812,7 +813,7 @@ async function writePermissionResponse(sessionId, result, denyMessage) {
812
813
  try {
813
814
  await provider.exec(
814
815
  row.sandbox_name,
815
- ["bash", "-c", `cat > ${PERMISSION_BRIDGE_RESPONSE_PATH}`],
816
+ ["sh", "-c", `cat > ${PERMISSION_BRIDGE_RESPONSE_PATH}`],
816
817
  { stdin: response, secrets: permSecrets }
817
818
  );
818
819
  } catch (err) {
@@ -830,7 +831,7 @@ async function checkToolBridgeSentinel(sessionId, sandboxName, provider, secrets
830
831
  const result = await provider.exec(
831
832
  sandboxName,
832
833
  ["test", "-f", TOOL_BRIDGE_PENDING_PATH],
833
- { secrets }
834
+ { secrets, timeoutMs: 5e3 }
834
835
  );
835
836
  if (result.exit_code !== 0) return;
836
837
  } catch {
@@ -841,7 +842,7 @@ async function checkToolBridgeSentinel(sessionId, sandboxName, provider, secrets
841
842
  const result = await provider.exec(
842
843
  sandboxName,
843
844
  ["cat", TOOL_BRIDGE_REQUEST_PATH],
844
- { secrets }
845
+ { secrets, timeoutMs: 5e3 }
845
846
  );
846
847
  const clean = result.stdout.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, "");
847
848
  request = JSON.parse(clean);
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  jsonOk,
12
12
  routeWrap
13
- } from "./chunk-3CAXZ5EJ.js";
13
+ } from "./chunk-GM3ATEBU.js";
14
14
  import {
15
15
  archiveTenant,
16
16
  createTenant,
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  jsonOk,
10
10
  routeWrap
11
- } from "./chunk-3CAXZ5EJ.js";
11
+ } from "./chunk-GM3ATEBU.js";
12
12
  import {
13
13
  badRequest
14
14
  } from "./chunk-EZYKRG4W.js";
@@ -24,14 +24,14 @@ import {
24
24
  import {
25
25
  jsonOk,
26
26
  routeWrap
27
- } from "./chunk-3CAXZ5EJ.js";
27
+ } from "./chunk-GM3ATEBU.js";
28
28
  import {
29
29
  forwardToAnthropic
30
30
  } from "./chunk-JCW3ZRES.js";
31
31
  import {
32
32
  runTurn,
33
33
  writePermissionResponse
34
- } from "./chunk-YUXYLXDH.js";
34
+ } from "./chunk-IOEDE6TY.js";
35
35
  import {
36
36
  enqueueTurn
37
37
  } from "./chunk-2PPB644A.js";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  jsonOk,
8
8
  routeWrap
9
- } from "./chunk-3CAXZ5EJ.js";
9
+ } from "./chunk-GM3ATEBU.js";
10
10
  import {
11
11
  forwardToAnthropic,
12
12
  validateAnthropicProxy
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-ZTH5JRZG.js";
27
27
  import {
28
28
  resolveBackend
29
- } from "./chunk-EUIR2ADY.js";
29
+ } from "./chunk-FDBR634Z.js";
30
30
  import {
31
31
  getDb,
32
32
  init_client
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  markStopping
3
- } from "./chunk-GJ7XWTHD.js";
3
+ } from "./chunk-ESSEO2YM.js";
4
4
  import {
5
5
  closeDb,
6
6
  init_client,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  routeWrap
3
- } from "./chunk-3CAXZ5EJ.js";
3
+ } from "./chunk-GM3ATEBU.js";
4
4
  import {
5
5
  ApiError
6
6
  } from "./chunk-EZYKRG4W.js";
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  jsonOk,
10
10
  routeWrap
11
- } from "./chunk-3CAXZ5EJ.js";
11
+ } from "./chunk-GM3ATEBU.js";
12
12
 
13
13
  // src/handlers/skills.ts
14
14
  async function handleGetSkillsCatalog(request) {
@@ -4,7 +4,6 @@ var TOOL_BRIDGE_SCRIPT_PATH = `${TOOL_BRIDGE_DIR}/bridge.sh`;
4
4
  var TOOL_BRIDGE_TOOLS_PATH = `${TOOL_BRIDGE_DIR}/tools.json`;
5
5
  var TOOL_BRIDGE_REQUEST_PATH = `${TOOL_BRIDGE_DIR}/request.json`;
6
6
  var TOOL_BRIDGE_RESPONSE_PATH = `${TOOL_BRIDGE_DIR}/response.json`;
7
- var TOOL_BRIDGE_MCP_CONFIG_PATH = `${TOOL_BRIDGE_DIR}/mcp.json`;
8
7
  var TOOL_BRIDGE_PENDING_PATH = `${TOOL_BRIDGE_DIR}/pending`;
9
8
  function generateBridgeScript() {
10
9
  return `#!/bin/bash
@@ -120,7 +119,6 @@ export {
120
119
  TOOL_BRIDGE_TOOLS_PATH,
121
120
  TOOL_BRIDGE_REQUEST_PATH,
122
121
  TOOL_BRIDGE_RESPONSE_PATH,
123
- TOOL_BRIDGE_MCP_CONFIG_PATH,
124
122
  TOOL_BRIDGE_PENDING_PATH,
125
123
  generateBridgeScript,
126
124
  buildBridgeMcpConfig,
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  jsonOk,
10
10
  routeWrap
11
- } from "./chunk-3CAXZ5EJ.js";
11
+ } from "./chunk-GM3ATEBU.js";
12
12
  import {
13
13
  snapshotApiMetrics
14
14
  } from "./chunk-D2XITRN6.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  jsonOk,
6
6
  routeWrap
7
- } from "./chunk-3CAXZ5EJ.js";
7
+ } from "./chunk-GM3ATEBU.js";
8
8
  import {
9
9
  exportTrace
10
10
  } from "./chunk-GVPJL3XS.js";
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  jsonOk,
20
20
  routeWrap
21
- } from "./chunk-3CAXZ5EJ.js";
21
+ } from "./chunk-GM3ATEBU.js";
22
22
  import {
23
23
  forwardToAnthropic
24
24
  } from "./chunk-JCW3ZRES.js";
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-LAWTTG2E.js";
39
39
  import {
40
40
  releaseSession
41
- } from "./chunk-WUA4SR4W.js";
41
+ } from "./chunk-55KYCJKN.js";
42
42
  import {
43
43
  appendEvent,
44
44
  dropEmitter
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  jsonOk,
17
17
  routeWrap
18
- } from "./chunk-3CAXZ5EJ.js";
18
+ } from "./chunk-GM3ATEBU.js";
19
19
  import {
20
20
  createApiKey,
21
21
  getApiKeyById,
@@ -15,7 +15,7 @@ import {
15
15
  buildBridgeMcpConfig,
16
16
  generateBridgeScript,
17
17
  toolsToJson
18
- } from "./chunk-4FDEJHH7.js";
18
+ } from "./chunk-SJ7WZEVY.js";
19
19
  import {
20
20
  createClaudeTranslator
21
21
  } from "./chunk-JFYE5BFI.js";
@@ -99,12 +99,14 @@ async function installPermissionHook(sandboxName, provider) {
99
99
  await provider.exec(sandboxName, ["mkdir", "-p", PERMISSION_BRIDGE_DIR]);
100
100
  await provider.exec(
101
101
  sandboxName,
102
- ["bash", "-c", `cat > ${PERMISSION_HOOK_SCRIPT_PATH}`],
102
+ ["sh", "-c", `cat > ${PERMISSION_HOOK_SCRIPT_PATH}`],
103
103
  { stdin: generatePermissionHookScript() }
104
104
  );
105
105
  await provider.exec(sandboxName, ["chmod", "+x", PERMISSION_HOOK_SCRIPT_PATH]);
106
106
  const hooksConfig = buildPermissionHooksConfig();
107
- const settingsPath = "/home/sprite/.claude/settings.json";
107
+ const homeResult = await provider.exec(sandboxName, ["sh", "-c", "echo $HOME"]);
108
+ const homeDir = homeResult.stdout.replace(/[\x00-\x1f]/g, "").trim() || "/home/sprite";
109
+ const settingsPath = `${homeDir}/.claude/settings.json`;
108
110
  let existingSettings = {};
109
111
  try {
110
112
  const result = await provider.exec(
@@ -119,7 +121,7 @@ async function installPermissionHook(sandboxName, provider) {
119
121
  const merged = { ...existingSettings, ...hooksConfig };
120
122
  await provider.exec(
121
123
  sandboxName,
122
- ["bash", "-c", `mkdir -p /home/sprite/.claude && cat > ${settingsPath}`],
124
+ ["sh", "-c", `mkdir -p "${homeDir}/.claude" && cat > "${settingsPath}"`],
123
125
  { stdin: JSON.stringify(merged, null, 2) }
124
126
  );
125
127
  }
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  jsonOk,
8
8
  routeWrap
9
- } from "./chunk-3CAXZ5EJ.js";
9
+ } from "./chunk-GM3ATEBU.js";
10
10
  import {
11
11
  createVault,
12
12
  deleteEntry,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  jsonOk,
6
6
  routeWrap
7
- } from "./chunk-3CAXZ5EJ.js";
7
+ } from "./chunk-GM3ATEBU.js";
8
8
 
9
9
  // src/handlers/license.ts
10
10
  function handleGetLicense(request) {
@@ -8,7 +8,7 @@ import {
8
8
  releaseSession,
9
9
  replenishWarmPool,
10
10
  wrapProviderWithSecrets
11
- } from "../chunk-WUA4SR4W.js";
11
+ } from "../chunk-55KYCJKN.js";
12
12
  import "../chunk-4XXQAVKE.js";
13
13
  import "../chunk-5IGBMS2U.js";
14
14
  import "../chunk-5ZFOKZGR.js";
@@ -26,7 +26,7 @@ import "../chunk-X6IQ57SC.js";
26
26
  import "../chunk-G7KUVNDY.js";
27
27
  import "../chunk-ZTH5JRZG.js";
28
28
  import "../chunk-AR2TM7CR.js";
29
- import "../chunk-EUIR2ADY.js";
29
+ import "../chunk-FDBR634Z.js";
30
30
  import "../chunk-5EQJOUWM.js";
31
31
  import "../chunk-T5VRE77P.js";
32
32
  import "../chunk-RVR6C22M.js";
@@ -58,11 +58,11 @@ import "../chunk-CULYZ3VA.js";
58
58
  import "../chunk-E4FQRMHV.js";
59
59
  import "../chunk-IAF6VMPO.js";
60
60
  import "../chunk-CREPPDHX.js";
61
- import "../chunk-7CD4QT5R.js";
61
+ import "../chunk-ZMNQ2YJ6.js";
62
62
  import "../chunk-S7W3KJYH.js";
63
63
  import "../chunk-FVBDEOTZ.js";
64
64
  import "../chunk-CY6AWCC6.js";
65
- import "../chunk-4FDEJHH7.js";
65
+ import "../chunk-SJ7WZEVY.js";
66
66
  import "../chunk-JFYE5BFI.js";
67
67
  import "../chunk-XBHDQK4Z.js";
68
68
  import {