@agentstep/agent-sdk 0.4.28 → 0.4.29
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 +3 -1
- package/dist/backends/registry.js +3 -3
- package/dist/{chunk-B7L5XD24.js → chunk-2NAUMCWE.js} +1 -1
- package/dist/{chunk-YY3NF45U.js → chunk-4DTL7OKD.js} +1 -1
- package/dist/chunk-4FDEJHH7.js +128 -0
- package/dist/{chunk-VHZML3D5.js → chunk-4GC7D5GD.js} +1 -1
- package/dist/{chunk-JLZO6TQL.js → chunk-AE5JQORN.js} +2 -2
- package/dist/{chunk-CCE6MVB3.js → chunk-BFXQ3IOS.js} +2 -2
- package/dist/{chunk-DWAA3F5Y.js → chunk-DT57EZQB.js} +4 -4
- package/dist/{chunk-34BN2SJC.js → chunk-EGCAA6KI.js} +1 -1
- package/dist/{chunk-3QIIJADA.js → chunk-ESXH27JB.js} +1 -1
- package/dist/{chunk-NWFYV2VI.js → chunk-FJAWIVSD.js} +1 -1
- package/dist/{chunk-AU2DTTBR.js → chunk-GQFC44YI.js} +1 -1
- package/dist/{chunk-SVYLMMBI.js → chunk-HGZ6R6ST.js} +1 -1
- package/dist/{chunk-4IFVESQO.js → chunk-HMBJOI5F.js} +2 -2
- package/dist/{chunk-ND7BRD6B.js → chunk-JURAGCGR.js} +1 -1
- package/dist/{chunk-P525BPB2.js → chunk-KOGG7CSN.js} +1 -1
- package/dist/{chunk-AYNYP3G3.js → chunk-KZ4AECAK.js} +8 -4
- package/dist/{chunk-JNHADPQ3.js → chunk-LLYP77OL.js} +1 -1
- package/dist/{chunk-4TF2EKVQ.js → chunk-LMHXLYUV.js} +1 -1
- package/dist/{chunk-ES5VD2ML.js → chunk-LYTHR3HC.js} +1 -1
- package/dist/{chunk-WJUWZKRP.js → chunk-NX6SIEN6.js} +1 -1
- package/dist/{chunk-UO2N4Q3V.js → chunk-O3Z7JWR7.js} +1 -1
- package/dist/{chunk-CGPTH3JC.js → chunk-OA3CLTYY.js} +1 -1
- package/dist/{chunk-PF6W4L5F.js → chunk-OC2RYYTW.js} +2 -2
- package/dist/{chunk-FEHDZT7I.js → chunk-OONL25NZ.js} +1 -1
- package/dist/{chunk-AWHHLOWE.js → chunk-OTLXV4RO.js} +1 -1
- package/dist/{chunk-HDSLSNN5.js → chunk-RK3QBYXO.js} +1 -1
- package/dist/{chunk-HQACDTN4.js → chunk-RZKUB4JQ.js} +3 -3
- package/dist/{chunk-ATGDKD4W.js → chunk-UIVEK3MD.js} +1 -1
- package/dist/{chunk-Y2J7CAME.js → chunk-W26HCKWX.js} +1 -1
- package/dist/{chunk-UZJI64HR.js → chunk-WHASPTF3.js} +1 -1
- package/dist/{chunk-F3M4HKEJ.js → chunk-XGUSWFDD.js} +1 -1
- package/dist/{chunk-36VCC3BY.js → chunk-XZOBOKL6.js} +1 -1
- package/dist/{chunk-FRDJNX6Z.js → chunk-YIVJ3JTW.js} +1 -1
- package/dist/{chunk-P6NCA7G5.js → chunk-ZNQD65DN.js} +1 -1
- 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/package.json +1 -1
- package/dist/chunk-ALVC7G6R.js +0 -187
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
claudeBackend,
|
|
3
3
|
installPermissionHook,
|
|
4
4
|
installToolBridge
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-RZKUB4JQ.js";
|
|
6
6
|
import {
|
|
7
7
|
buildClaudeArgs,
|
|
8
8
|
buildClaudeAuthEnv
|
|
9
9
|
} from "../../chunk-WFIMX3HG.js";
|
|
10
10
|
import "../../chunk-FVBDEOTZ.js";
|
|
11
11
|
import "../../chunk-CY6AWCC6.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-4FDEJHH7.js";
|
|
13
13
|
import {
|
|
14
14
|
createClaudeTranslator
|
|
15
15
|
} from "../../chunk-JFYE5BFI.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TOOL_BRIDGE_DIR,
|
|
3
|
+
TOOL_BRIDGE_MCP_CONFIG_PATH,
|
|
3
4
|
TOOL_BRIDGE_PENDING_PATH,
|
|
4
5
|
TOOL_BRIDGE_REQUEST_PATH,
|
|
5
6
|
TOOL_BRIDGE_RESPONSE_PATH,
|
|
@@ -8,10 +9,11 @@ import {
|
|
|
8
9
|
buildBridgeMcpConfig,
|
|
9
10
|
generateBridgeScript,
|
|
10
11
|
toolsToJson
|
|
11
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-4FDEJHH7.js";
|
|
12
13
|
import "../../chunk-2ESYSVXG.js";
|
|
13
14
|
export {
|
|
14
15
|
TOOL_BRIDGE_DIR,
|
|
16
|
+
TOOL_BRIDGE_MCP_CONFIG_PATH,
|
|
15
17
|
TOOL_BRIDGE_PENDING_PATH,
|
|
16
18
|
TOOL_BRIDGE_REQUEST_PATH,
|
|
17
19
|
TOOL_BRIDGE_RESPONSE_PATH,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listBackends,
|
|
3
3
|
resolveBackend
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-KOGG7CSN.js";
|
|
5
5
|
import "../chunk-I44FSUBC.js";
|
|
6
6
|
import "../chunk-T5VRE77P.js";
|
|
7
7
|
import "../chunk-TY3HD5I5.js";
|
|
@@ -32,11 +32,11 @@ import "../chunk-7TSTCMII.js";
|
|
|
32
32
|
import "../chunk-QQDSHL27.js";
|
|
33
33
|
import "../chunk-IAF6VMPO.js";
|
|
34
34
|
import "../chunk-OWP537VU.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-RZKUB4JQ.js";
|
|
36
36
|
import "../chunk-WFIMX3HG.js";
|
|
37
37
|
import "../chunk-FVBDEOTZ.js";
|
|
38
38
|
import "../chunk-CY6AWCC6.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-4FDEJHH7.js";
|
|
40
40
|
import "../chunk-JFYE5BFI.js";
|
|
41
41
|
import "../chunk-NQX7WBA4.js";
|
|
42
42
|
import "../chunk-XBHDQK4Z.js";
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// src/backends/claude/tool-bridge.ts
|
|
2
|
+
var TOOL_BRIDGE_DIR = "/tmp/tool-bridge";
|
|
3
|
+
var TOOL_BRIDGE_SCRIPT_PATH = `${TOOL_BRIDGE_DIR}/bridge.sh`;
|
|
4
|
+
var TOOL_BRIDGE_TOOLS_PATH = `${TOOL_BRIDGE_DIR}/tools.json`;
|
|
5
|
+
var TOOL_BRIDGE_REQUEST_PATH = `${TOOL_BRIDGE_DIR}/request.json`;
|
|
6
|
+
var TOOL_BRIDGE_RESPONSE_PATH = `${TOOL_BRIDGE_DIR}/response.json`;
|
|
7
|
+
var TOOL_BRIDGE_MCP_CONFIG_PATH = `${TOOL_BRIDGE_DIR}/mcp.json`;
|
|
8
|
+
var TOOL_BRIDGE_PENDING_PATH = `${TOOL_BRIDGE_DIR}/pending`;
|
|
9
|
+
function generateBridgeScript() {
|
|
10
|
+
return `#!/bin/bash
|
|
11
|
+
# Auto-generated MCP stdio server for custom tool bridge.
|
|
12
|
+
# Pure bash \u2014 no Node.js dependency. Instant startup on Firecracker VMs.
|
|
13
|
+
|
|
14
|
+
TOOLS_PATH="${TOOL_BRIDGE_TOOLS_PATH}"
|
|
15
|
+
REQUEST_PATH="${TOOL_BRIDGE_REQUEST_PATH}"
|
|
16
|
+
RESPONSE_PATH="${TOOL_BRIDGE_RESPONSE_PATH}"
|
|
17
|
+
PENDING_PATH="${TOOL_BRIDGE_PENDING_PATH}"
|
|
18
|
+
|
|
19
|
+
send_response() {
|
|
20
|
+
printf '%s\\n' "$1"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
TOOLS_LIST_JSON=""
|
|
24
|
+
if [ -f "$TOOLS_PATH" ]; then
|
|
25
|
+
TOOLS_LIST_JSON=$(sed 's/input_schema/inputSchema/g' "$TOOLS_PATH")
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
handle_request() {
|
|
29
|
+
local body="$1"
|
|
30
|
+
local method id
|
|
31
|
+
method=$(echo "$body" | grep -o '"method":"[^"]*"' | head -1 | cut -d'"' -f4)
|
|
32
|
+
id=$(echo "$body" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
|
33
|
+
|
|
34
|
+
case "$method" in
|
|
35
|
+
initialize)
|
|
36
|
+
send_response '{"jsonrpc":"2.0","id":'"$id"',"result":{"protocolVersion":"2025-11-25","capabilities":{"tools":{"listChanged":false}},"serverInfo":{"name":"tool-bridge","version":"1.0.0"}}}'
|
|
37
|
+
;;
|
|
38
|
+
notifications/initialized) ;;
|
|
39
|
+
tools/list)
|
|
40
|
+
send_response '{"jsonrpc":"2.0","id":'"$id"',"result":{"tools":'"$TOOLS_LIST_JSON"'}}'
|
|
41
|
+
;;
|
|
42
|
+
tools/call)
|
|
43
|
+
local tool_name tool_args
|
|
44
|
+
tool_name=$(echo "$body" | grep -o '"name":"[^"]*"' | tail -1 | cut -d'"' -f4)
|
|
45
|
+
tool_args=$(echo "$body" | grep -o '"arguments":{[^}]*}' | head -1 | sed 's/^"arguments"://')
|
|
46
|
+
[ -z "$tool_args" ] && tool_args="{}"
|
|
47
|
+
|
|
48
|
+
# Replay case: response.json already exists (--resume re-entry)
|
|
49
|
+
if [ -f "$RESPONSE_PATH" ]; then
|
|
50
|
+
local rdata
|
|
51
|
+
rdata=$(cat "$RESPONSE_PATH" | tr -d '\\n' | sed 's/\\\\/\\\\\\\\/g; s/"/\\\\"/g')
|
|
52
|
+
rm -f "$RESPONSE_PATH"
|
|
53
|
+
send_response '{"jsonrpc":"2.0","id":'"$id"',"result":{"content":[{"type":"text","text":"'"$rdata"'"}],"isError":false}}'
|
|
54
|
+
return
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# Write request and create pending sentinel
|
|
58
|
+
printf '{"tool_use_id":%s,"name":"%s","input":%s}' "$id" "$tool_name" "$tool_args" > "$REQUEST_PATH"
|
|
59
|
+
touch "$PENDING_PATH"
|
|
60
|
+
|
|
61
|
+
# Poll for response.json (200ms interval, 5min timeout)
|
|
62
|
+
local elapsed=0
|
|
63
|
+
while [ $elapsed -lt 1500 ]; do
|
|
64
|
+
if [ -f "$RESPONSE_PATH" ]; then
|
|
65
|
+
local rdata
|
|
66
|
+
rdata=$(cat "$RESPONSE_PATH" | tr -d '\\n' | sed 's/\\\\/\\\\\\\\/g; s/"/\\\\"/g')
|
|
67
|
+
rm -f "$RESPONSE_PATH" "$PENDING_PATH"
|
|
68
|
+
send_response '{"jsonrpc":"2.0","id":'"$id"',"result":{"content":[{"type":"text","text":"'"$rdata"'"}],"isError":false}}'
|
|
69
|
+
return
|
|
70
|
+
fi
|
|
71
|
+
sleep 0.2
|
|
72
|
+
elapsed=$((elapsed + 1))
|
|
73
|
+
done
|
|
74
|
+
# Timeout
|
|
75
|
+
rm -f "$PENDING_PATH"
|
|
76
|
+
send_response '{"jsonrpc":"2.0","id":'"$id"',"error":{"code":-32603,"message":"Timeout waiting for tool response"}}'
|
|
77
|
+
;;
|
|
78
|
+
*)
|
|
79
|
+
[ -n "$id" ] && send_response '{"jsonrpc":"2.0","id":'"$id"',"error":{"code":-32601,"message":"Method not found"}}'
|
|
80
|
+
;;
|
|
81
|
+
esac
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
# Main loop: handle both raw JSON lines and Content-Length framed messages
|
|
85
|
+
while IFS= read -r line; do
|
|
86
|
+
line=\${line%$'\\r'}
|
|
87
|
+
[ -z "$line" ] && continue
|
|
88
|
+
case "$line" in
|
|
89
|
+
Content-Length:*)
|
|
90
|
+
while IFS= read -r hdr; do hdr=\${hdr%$'\\r'}; [ -z "$hdr" ] && break; done
|
|
91
|
+
body=$(head -c "\${line#Content-Length: }")
|
|
92
|
+
handle_request "$body" ;;
|
|
93
|
+
"{"*) handle_request "$line" ;;
|
|
94
|
+
esac
|
|
95
|
+
done
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
function buildBridgeMcpConfig(existingServers) {
|
|
99
|
+
return {
|
|
100
|
+
...existingServers,
|
|
101
|
+
"tool-bridge": {
|
|
102
|
+
command: "bash",
|
|
103
|
+
args: [TOOL_BRIDGE_SCRIPT_PATH]
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function toolsToJson(tools) {
|
|
108
|
+
return JSON.stringify(
|
|
109
|
+
tools.map((t) => ({
|
|
110
|
+
name: t.name,
|
|
111
|
+
description: t.description,
|
|
112
|
+
input_schema: t.input_schema
|
|
113
|
+
}))
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export {
|
|
118
|
+
TOOL_BRIDGE_DIR,
|
|
119
|
+
TOOL_BRIDGE_SCRIPT_PATH,
|
|
120
|
+
TOOL_BRIDGE_TOOLS_PATH,
|
|
121
|
+
TOOL_BRIDGE_REQUEST_PATH,
|
|
122
|
+
TOOL_BRIDGE_RESPONSE_PATH,
|
|
123
|
+
TOOL_BRIDGE_MCP_CONFIG_PATH,
|
|
124
|
+
TOOL_BRIDGE_PENDING_PATH,
|
|
125
|
+
generateBridgeScript,
|
|
126
|
+
buildBridgeMcpConfig,
|
|
127
|
+
toolsToJson
|
|
128
|
+
};
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
jsonOk,
|
|
26
26
|
routeWrap
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ESXH27JB.js";
|
|
28
28
|
import {
|
|
29
29
|
forwardToAnthropic
|
|
30
30
|
} from "./chunk-T45NOW43.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
runTurn,
|
|
36
36
|
writePermissionResponse
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KZ4AECAK.js";
|
|
38
38
|
import {
|
|
39
39
|
getProxiedTenantId,
|
|
40
40
|
isProxied
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-AQXCXWAZ.js";
|
|
4
4
|
import {
|
|
5
5
|
runTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KZ4AECAK.js";
|
|
7
7
|
import {
|
|
8
8
|
installOtlpExporter
|
|
9
9
|
} from "./chunk-Y2KDIPCT.js";
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
} from "./chunk-3MQ2FWXS.js";
|
|
20
20
|
import {
|
|
21
21
|
installShutdownHandlers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NX6SIEN6.js";
|
|
23
23
|
import {
|
|
24
24
|
runSweep
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FJAWIVSD.js";
|
|
26
26
|
import {
|
|
27
27
|
reconcileDockerOrphanSandboxes,
|
|
28
28
|
reconcileOrphanSandboxes
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XGUSWFDD.js";
|
|
30
30
|
import {
|
|
31
31
|
appendEvent,
|
|
32
32
|
installPayloadRedactor
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
jsonOk,
|
|
20
20
|
routeWrap
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ESXH27JB.js";
|
|
22
22
|
import {
|
|
23
23
|
forwardToAnthropic
|
|
24
24
|
} from "./chunk-T45NOW43.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "./chunk-LAWTTG2E.js";
|
|
39
39
|
import {
|
|
40
40
|
releaseSession
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XGUSWFDD.js";
|
|
42
42
|
import {
|
|
43
43
|
appendEvent,
|
|
44
44
|
dropEmitter
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
installSkills,
|
|
31
31
|
provisionResources,
|
|
32
32
|
wrapProviderWithSecrets
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XGUSWFDD.js";
|
|
34
34
|
import {
|
|
35
35
|
BLOCKED_ENV_KEYS,
|
|
36
36
|
resolveVaultSecrets
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
} from "./chunk-JEI7I3EH.js";
|
|
69
69
|
import {
|
|
70
70
|
resolveBackend
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KOGG7CSN.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-4FDEJHH7.js";
|
|
82
82
|
import {
|
|
83
83
|
resolveToolset
|
|
84
84
|
} from "./chunk-XBHDQK4Z.js";
|
|
@@ -277,6 +277,9 @@ async function runTurn(sessionId, inputs, _depth = 0, parentTrace) {
|
|
|
277
277
|
if (freshSession?.resources && freshSession.resources.length > 0) {
|
|
278
278
|
turnBuild.env.RESOURCES_DIR = "/tmp/resources";
|
|
279
279
|
}
|
|
280
|
+
if (agent.engine === "claude" && !turnBuild.env.MCP_TIMEOUT) {
|
|
281
|
+
turnBuild.env.MCP_TIMEOUT = "30000";
|
|
282
|
+
}
|
|
280
283
|
const MCP_KEY_RE = /^MCP_(AUTH|HEADER)_/i;
|
|
281
284
|
for (const entry of vaultEntries) {
|
|
282
285
|
if (!BLOCKED_ENV_KEYS.has(entry.key) && !MCP_KEY_RE.test(entry.key)) {
|
|
@@ -813,7 +816,8 @@ async function checkToolBridgeSentinel(sessionId, sandboxName, provider, secrets
|
|
|
813
816
|
["cat", TOOL_BRIDGE_REQUEST_PATH],
|
|
814
817
|
{ secrets }
|
|
815
818
|
);
|
|
816
|
-
|
|
819
|
+
const clean = result.stdout.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, "");
|
|
820
|
+
request = JSON.parse(clean);
|
|
817
821
|
} catch (err) {
|
|
818
822
|
console.warn(`[driver] failed to read tool bridge request for ${sessionId}:`, err);
|
|
819
823
|
return;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
jsonOk,
|
|
8
8
|
routeWrap
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ESXH27JB.js";
|
|
10
10
|
import {
|
|
11
11
|
forwardToAnthropic,
|
|
12
12
|
validateAnthropicProxy
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-JEI7I3EH.js";
|
|
27
27
|
import {
|
|
28
28
|
resolveBackend
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KOGG7CSN.js";
|
|
30
30
|
import {
|
|
31
31
|
getDb,
|
|
32
32
|
init_client
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
buildBridgeMcpConfig,
|
|
16
16
|
generateBridgeScript,
|
|
17
17
|
toolsToJson
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4FDEJHH7.js";
|
|
19
19
|
import {
|
|
20
20
|
createClaudeTranslator
|
|
21
21
|
} from "./chunk-JFYE5BFI.js";
|
|
@@ -38,7 +38,7 @@ function buildTurn(input) {
|
|
|
38
38
|
const env = buildClaudeAuthEnv();
|
|
39
39
|
const customTools = agent.tools.filter((t) => t.type === "custom");
|
|
40
40
|
const hasBridgeTools = customTools.length > 0 || agent.threads_enabled;
|
|
41
|
-
if (hasBridgeTools) {
|
|
41
|
+
if (hasBridgeTools || agent.mcp_servers && Object.keys(agent.mcp_servers).length > 0) {
|
|
42
42
|
const mcpIdx = argsBase.indexOf("--mcp-config");
|
|
43
43
|
let existingServers = {};
|
|
44
44
|
if (mcpIdx >= 0 && mcpIdx + 1 < argsBase.length) {
|
|
@@ -49,7 +49,7 @@ function buildTurn(input) {
|
|
|
49
49
|
}
|
|
50
50
|
argsBase.splice(mcpIdx, 2);
|
|
51
51
|
}
|
|
52
|
-
const merged = buildBridgeMcpConfig(existingServers);
|
|
52
|
+
const merged = hasBridgeTools ? buildBridgeMcpConfig(existingServers) : existingServers;
|
|
53
53
|
argsBase.push("--mcp-config", JSON.stringify({ mcpServers: merged }));
|
|
54
54
|
}
|
|
55
55
|
if (toolResults.length > 0) {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
reconcileOrphanSandboxes,
|
|
7
7
|
releaseSession,
|
|
8
8
|
wrapProviderWithSecrets
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-XGUSWFDD.js";
|
|
10
10
|
import "../chunk-DO4WVWW7.js";
|
|
11
11
|
import "../chunk-RMZRSYIJ.js";
|
|
12
12
|
import "../chunk-5ZFOKZGR.js";
|
|
@@ -23,7 +23,7 @@ import "../chunk-QUJNG4RA.js";
|
|
|
23
23
|
import "../chunk-NUO56TF7.js";
|
|
24
24
|
import "../chunk-JEI7I3EH.js";
|
|
25
25
|
import "../chunk-JDELTTHV.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-KOGG7CSN.js";
|
|
27
27
|
import "../chunk-I44FSUBC.js";
|
|
28
28
|
import "../chunk-T5VRE77P.js";
|
|
29
29
|
import "../chunk-TY3HD5I5.js";
|
|
@@ -54,11 +54,11 @@ import "../chunk-7TSTCMII.js";
|
|
|
54
54
|
import "../chunk-QQDSHL27.js";
|
|
55
55
|
import "../chunk-IAF6VMPO.js";
|
|
56
56
|
import "../chunk-OWP537VU.js";
|
|
57
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-RZKUB4JQ.js";
|
|
58
58
|
import "../chunk-WFIMX3HG.js";
|
|
59
59
|
import "../chunk-FVBDEOTZ.js";
|
|
60
60
|
import "../chunk-CY6AWCC6.js";
|
|
61
|
-
import "../chunk-
|
|
61
|
+
import "../chunk-4FDEJHH7.js";
|
|
62
62
|
import "../chunk-JFYE5BFI.js";
|
|
63
63
|
import "../chunk-NQX7WBA4.js";
|
|
64
64
|
import "../chunk-XBHDQK4Z.js";
|