@agentstep/agent-sdk 0.4.36 → 0.4.38
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.
- package/dist/backends/claude/index.js +2 -2
- package/dist/backends/claude/tool-bridge.js +1 -3
- package/dist/backends/registry.js +3 -3
- package/dist/{chunk-R2RI5S3Q.js → chunk-3AR7QH2V.js} +1 -1
- package/dist/{chunk-2PNZELEJ.js → chunk-3LNIJ5FE.js} +1 -1
- package/dist/{chunk-XNDCK2A7.js → chunk-4YRPGJRY.js} +1 -1
- package/dist/{chunk-WUA4SR4W.js → chunk-55KYCJKN.js} +2 -2
- package/dist/{chunk-CZZP4UTX.js → chunk-5FNWMFBA.js} +1 -1
- package/dist/{chunk-Y35PFFL2.js → chunk-5KIHH7PU.js} +1 -1
- package/dist/{chunk-7QLYJIKK.js → chunk-65EDEMJI.js} +2 -2
- package/dist/{chunk-RONZU5AQ.js → chunk-7MXFGIBW.js} +2 -2
- package/dist/{chunk-CD7SK6XL.js → chunk-E44QEJR6.js} +1 -1
- package/dist/{chunk-GJ7XWTHD.js → chunk-ESSEO2YM.js} +1 -1
- package/dist/{chunk-PCJTXF5I.js → chunk-EUPHOI5T.js} +1 -1
- package/dist/{chunk-EUIR2ADY.js → chunk-FDBR634Z.js} +1 -1
- package/dist/{chunk-6LLDT3F3.js → chunk-GGJNANXK.js} +2 -2
- package/dist/{chunk-NDIBNZ5J.js → chunk-HD3PWZ4U.js} +1 -1
- package/dist/{chunk-P6RXTR4X.js → chunk-K54O4SIY.js} +1 -1
- package/dist/{chunk-M24MZZDW.js → chunk-LZ2INBPL.js} +1 -1
- package/dist/{chunk-JID2FSDR.js → chunk-MBO2IKUJ.js} +1 -1
- package/dist/{chunk-O3IPK2YQ.js → chunk-O42KIXYO.js} +1 -1
- package/dist/{chunk-HZNJ5U2B.js → chunk-OANFCHIX.js} +2 -2
- package/dist/{chunk-H6HEGKCW.js → chunk-OE6FNM5F.js} +4 -4
- package/dist/{chunk-BQKDLRLF.js → chunk-PLDPJV73.js} +1 -1
- package/dist/{chunk-WOWJPX7E.js → chunk-QKJOF7JD.js} +1 -1
- package/dist/{chunk-I5X7ERAU.js → chunk-R4Y34JIR.js} +1 -1
- package/dist/{chunk-2RQCMWUR.js → chunk-RAJOCFU5.js} +1 -1
- package/dist/{chunk-MKATGKGM.js → chunk-RTGJJN7P.js} +1 -1
- package/dist/{chunk-QB23B7L5.js → chunk-SG2PUHZG.js} +24 -12
- package/dist/{chunk-4FDEJHH7.js → chunk-SJ7WZEVY.js} +0 -2
- package/dist/{chunk-W5QHJGLU.js → chunk-UCXLRDPI.js} +1 -1
- package/dist/{chunk-PIZGJG3H.js → chunk-USVG6VUU.js} +1 -1
- package/dist/{chunk-4ODMO275.js → chunk-XGASOCQ7.js} +1 -1
- package/dist/{chunk-TGTPTLBM.js → chunk-XMVAVJJJ.js} +1 -1
- package/dist/{chunk-LVDYHS7N.js → chunk-XTRX5FTF.js} +1 -1
- package/dist/{chunk-D4ONR4AQ.js → chunk-ZJ6GX6LK.js} +1 -1
- package/dist/{chunk-7CD4QT5R.js → chunk-ZMNQ2YJ6.js} +6 -4
- package/dist/containers/lifecycle.js +4 -4
- package/dist/handlers/agents.js +10 -10
- package/dist/handlers/api_keys.js +10 -10
- package/dist/handlers/audit.js +10 -10
- package/dist/handlers/batch.js +10 -10
- package/dist/handlers/credentials.js +11 -11
- package/dist/handlers/environments.js +10 -10
- package/dist/handlers/events.js +10 -10
- package/dist/handlers/files.js +10 -10
- package/dist/handlers/index.js +34 -34
- package/dist/handlers/license.js +10 -10
- package/dist/handlers/memory.js +10 -10
- package/dist/handlers/metrics.js +10 -10
- package/dist/handlers/models.js +10 -10
- package/dist/handlers/providers.js +10 -10
- package/dist/handlers/resources.js +10 -10
- package/dist/handlers/sessions.js +10 -10
- package/dist/handlers/settings.js +10 -10
- package/dist/handlers/skills-write.js +10 -10
- package/dist/handlers/skills.js +10 -10
- package/dist/handlers/stream.js +9 -9
- package/dist/handlers/tenants.js +10 -10
- package/dist/handlers/threads.js +10 -10
- package/dist/handlers/traces.js +10 -10
- package/dist/handlers/upstream_keys.js +10 -10
- package/dist/handlers/vaults.js +10 -10
- package/dist/handlers/whoami.js +10 -10
- package/dist/http.js +9 -9
- package/dist/index.js +9 -9
- package/dist/init.js +8 -8
- package/dist/sessions/driver.js +5 -5
- package/dist/sessions/sweeper.js +5 -5
- package/dist/sessions/threads.js +5 -5
- package/dist/shutdown.js +6 -6
- package/dist/sync/container-file-sync.js +17 -3
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
claudeBackend,
|
|
3
3
|
installPermissionHook,
|
|
4
4
|
installToolBridge
|
|
5
|
-
} from "../../chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
40
|
+
import "../chunk-SJ7WZEVY.js";
|
|
41
41
|
import "../chunk-JFYE5BFI.js";
|
|
42
42
|
import "../chunk-XBHDQK4Z.js";
|
|
43
43
|
import "../chunk-IU457W7Q.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "./chunk-ZTH5JRZG.js";
|
|
44
44
|
import {
|
|
45
45
|
resolveBackend
|
|
46
|
-
} from "./chunk-
|
|
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;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
jsonOk,
|
|
8
8
|
routeWrap
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HD3PWZ4U.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-
|
|
29
|
+
} from "./chunk-FDBR634Z.js";
|
|
30
30
|
import {
|
|
31
31
|
getDb,
|
|
32
32
|
init_client
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
jsonOk,
|
|
20
20
|
routeWrap
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HD3PWZ4U.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-
|
|
41
|
+
} from "./chunk-55KYCJKN.js";
|
|
42
42
|
import {
|
|
43
43
|
appendEvent,
|
|
44
44
|
dropEmitter
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
jsonOk,
|
|
26
26
|
routeWrap
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HD3PWZ4U.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-
|
|
34
|
+
} from "./chunk-SG2PUHZG.js";
|
|
35
35
|
import {
|
|
36
36
|
enqueueTurn
|
|
37
37
|
} from "./chunk-2PPB644A.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runTurn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SG2PUHZG.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-
|
|
22
|
+
} from "./chunk-PLDPJV73.js";
|
|
23
23
|
import {
|
|
24
24
|
runSweep
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ESSEO2YM.js";
|
|
26
26
|
import {
|
|
27
27
|
fillWarmPools,
|
|
28
28
|
reconcileDockerOrphanSandboxes,
|
|
29
29
|
reconcileOrphanSandboxes
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-55KYCJKN.js";
|
|
31
31
|
import {
|
|
32
32
|
appendEvent,
|
|
33
33
|
installPayloadRedactor
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
installSkills,
|
|
31
31
|
provisionResources,
|
|
32
32
|
wrapProviderWithSecrets
|
|
33
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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
|
-
["
|
|
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) => {
|
|
@@ -593,6 +592,17 @@ ${turnBuild.stdin}`;
|
|
|
593
592
|
});
|
|
594
593
|
if (syncResult.synced > 0) {
|
|
595
594
|
console.log(`[driver] synced ${syncResult.synced} files from container (${syncResult.skipped} skipped)`);
|
|
595
|
+
for (const f of syncResult.files) {
|
|
596
|
+
emit("session.file_synced", {
|
|
597
|
+
file: {
|
|
598
|
+
id: f.id,
|
|
599
|
+
filename: f.filename,
|
|
600
|
+
size_bytes: f.size_bytes,
|
|
601
|
+
mime_type: f.mime_type,
|
|
602
|
+
container_path: f.container_path
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
}
|
|
596
606
|
}
|
|
597
607
|
} catch (err) {
|
|
598
608
|
console.warn("[driver] container file sync failed:", err?.stack ?? err);
|
|
@@ -620,7 +630,7 @@ ${turnBuild.stdin}`;
|
|
|
620
630
|
const reentrySecrets = getBySession(sessionId)?.vaultSecrets;
|
|
621
631
|
await providerForReentry.exec(
|
|
622
632
|
sprName,
|
|
623
|
-
["
|
|
633
|
+
["sh", "-c", `cat > ${TOOL_BRIDGE_RESPONSE_PATH2}`],
|
|
624
634
|
{ stdin: responseJson, secrets: reentrySecrets }
|
|
625
635
|
).catch((err) => {
|
|
626
636
|
console.warn(`[driver] failed to write spawn_agent response:`, err);
|
|
@@ -767,7 +777,8 @@ async function checkPermissionSentinel(sessionId, sandboxName, provider) {
|
|
|
767
777
|
try {
|
|
768
778
|
const result = await provider.exec(
|
|
769
779
|
sandboxName,
|
|
770
|
-
["test", "-f", PERMISSION_BRIDGE_PENDING_PATH]
|
|
780
|
+
["test", "-f", PERMISSION_BRIDGE_PENDING_PATH],
|
|
781
|
+
{ timeoutMs: 5e3 }
|
|
771
782
|
);
|
|
772
783
|
if (result.exit_code !== 0) return;
|
|
773
784
|
} catch {
|
|
@@ -777,7 +788,8 @@ async function checkPermissionSentinel(sessionId, sandboxName, provider) {
|
|
|
777
788
|
try {
|
|
778
789
|
const result = await provider.exec(
|
|
779
790
|
sandboxName,
|
|
780
|
-
["cat", PERMISSION_BRIDGE_REQUEST_PATH]
|
|
791
|
+
["cat", PERMISSION_BRIDGE_REQUEST_PATH],
|
|
792
|
+
{ timeoutMs: 5e3 }
|
|
781
793
|
);
|
|
782
794
|
request = JSON.parse(result.stdout);
|
|
783
795
|
} catch (err) {
|
|
@@ -812,7 +824,7 @@ async function writePermissionResponse(sessionId, result, denyMessage) {
|
|
|
812
824
|
try {
|
|
813
825
|
await provider.exec(
|
|
814
826
|
row.sandbox_name,
|
|
815
|
-
["
|
|
827
|
+
["sh", "-c", `cat > ${PERMISSION_BRIDGE_RESPONSE_PATH}`],
|
|
816
828
|
{ stdin: response, secrets: permSecrets }
|
|
817
829
|
);
|
|
818
830
|
} catch (err) {
|
|
@@ -830,7 +842,7 @@ async function checkToolBridgeSentinel(sessionId, sandboxName, provider, secrets
|
|
|
830
842
|
const result = await provider.exec(
|
|
831
843
|
sandboxName,
|
|
832
844
|
["test", "-f", TOOL_BRIDGE_PENDING_PATH],
|
|
833
|
-
{ secrets }
|
|
845
|
+
{ secrets, timeoutMs: 5e3 }
|
|
834
846
|
);
|
|
835
847
|
if (result.exit_code !== 0) return;
|
|
836
848
|
} catch {
|
|
@@ -841,7 +853,7 @@ async function checkToolBridgeSentinel(sessionId, sandboxName, provider, secrets
|
|
|
841
853
|
const result = await provider.exec(
|
|
842
854
|
sandboxName,
|
|
843
855
|
["cat", TOOL_BRIDGE_REQUEST_PATH],
|
|
844
|
-
{ secrets }
|
|
856
|
+
{ secrets, timeoutMs: 5e3 }
|
|
845
857
|
);
|
|
846
858
|
const clean = result.stdout.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, "");
|
|
847
859
|
request = JSON.parse(clean);
|
|
@@ -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,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
buildBridgeMcpConfig,
|
|
16
16
|
generateBridgeScript,
|
|
17
17
|
toolsToJson
|
|
18
|
-
} from "./chunk-
|
|
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
|
-
["
|
|
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
|
|
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
|
-
["
|
|
124
|
+
["sh", "-c", `mkdir -p "${homeDir}/.claude" && cat > "${settingsPath}"`],
|
|
123
125
|
{ stdin: JSON.stringify(merged, null, 2) }
|
|
124
126
|
);
|
|
125
127
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
releaseSession,
|
|
9
9
|
replenishWarmPool,
|
|
10
10
|
wrapProviderWithSecrets
|
|
11
|
-
} from "../chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
65
|
+
import "../chunk-SJ7WZEVY.js";
|
|
66
66
|
import "../chunk-JFYE5BFI.js";
|
|
67
67
|
import "../chunk-XBHDQK4Z.js";
|
|
68
68
|
import {
|