@ai-sdk/harness-claude-code 1.0.166 → 1.0.168
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/CHANGELOG.md +19 -0
- package/README.md +4 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -202
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/claude-code-harness.ts +32 -325
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/harness-claude-code
|
|
2
2
|
|
|
3
|
+
## 1.0.168
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a9837eb: feat(harness): provide shared utils for bridge-backed adapters to manage web socket connection and bridge handshake
|
|
8
|
+
- e729d58: chore(docs): update `README.md` for consistent format and to avoid duplication
|
|
9
|
+
- Updated dependencies [5475347]
|
|
10
|
+
- Updated dependencies [a9837eb]
|
|
11
|
+
- Updated dependencies [e729d58]
|
|
12
|
+
- @ai-sdk/provider@4.0.34
|
|
13
|
+
- @ai-sdk/harness@1.0.164
|
|
14
|
+
- @ai-sdk/provider-utils@5.0.68
|
|
15
|
+
|
|
16
|
+
## 1.0.167
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- @ai-sdk/harness@1.0.163
|
|
21
|
+
|
|
3
22
|
## 1.0.166
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
`HarnessV1` adapter backed by [`@anthropic-ai/claude-agent-sdk`](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk), which drives the `claude` CLI. The adapter ships a bridge process that runs inside a sandbox and talks to the host over a WebSocket on a sandbox-proxied loopback port.
|
|
4
4
|
|
|
5
|
+
-> **Note**: This package is experimental.
|
|
6
|
+
|
|
5
7
|
## Setup
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
npm i @ai-sdk/harness-claude-code @ai-sdk/harness @ai-sdk/sandbox-vercel
|
|
10
|
+
npm i ai @ai-sdk/harness-claude-code @ai-sdk/harness @ai-sdk/sandbox-vercel zod
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
The bridge installs `@anthropic-ai/claude-agent-sdk` and `@anthropic-ai/claude-code` inside the sandbox the first time the session starts.
|
|
12
|
-
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```ts
|
|
@@ -63,23 +63,4 @@ try {
|
|
|
63
63
|
}
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
sandbox lifecycle: ending the harness session does not stop the sandbox.
|
|
68
|
-
|
|
69
|
-
## Runtime configuration
|
|
70
|
-
|
|
71
|
-
Use `env` to add environment variables to the Claude Code process. Configured
|
|
72
|
-
values override variables inherited from the sandbox bridge process.
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
const harness = createClaudeCode({
|
|
76
|
-
env: {
|
|
77
|
-
DEPLOYMENT_ENV: 'staging',
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Sub-agent messages and task/background notifications are surfaced as `raw`
|
|
83
|
-
stream parts. `agentProgressSummaries` adds periodic summaries to raw
|
|
84
|
-
`task_progress` messages, while `forwardSubagentText` includes sub-agent text
|
|
85
|
-
and thinking messages in the raw stream.
|
|
66
|
+
See the [Claude Code Harness documentation](https://ai-sdk.dev/providers/ai-sdk-harnesses/claude-code) for more information.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["SandboxSession"],"sources":["../src/claude-code-auth.ts","../src/claude-code-thinking.ts","../src/claude-code-harness.ts","../src/version.ts","../src/index.ts"],"mappings":";;;;;KAwEY,+BAA+B;;;KCxE/B;WAEG;WACA;;WAGA;;;;KCgFH;WACD,OAAO;;;;;;WAMP,uBAAuB;;;;;WA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQgu1D;MAAoC;;;QAAmE;QAAsC;;MAAiE;MAA2C;;;;;;;;MAA4K;;;;;;MAAgJ"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["SandboxSession"],"sources":["../src/claude-code-auth.ts","../src/claude-code-thinking.ts","../src/claude-code-harness.ts","../src/version.ts","../src/index.ts"],"mappings":";;;;;KAwEY,+BAA+B;;;KCxE/B;WAEG;WACA;;WAGA;;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ityUnsupportedError, commonTool, harnessSessionDataDirectoryPath, harnessStateDirectoryPath, harnessV1BridgeInboundCommandSchemas, harnessV1BridgeOutboundMessageSchema, harnessV1BridgeStartBaseSchema, harnessV1DiagnosticFromBridgeFrame } from "@ai-sdk/harness";
|
|
3
|
-
import { SandboxChannel, applyCredentialForwarding, classifyDiskLog, createBridgeErrorHandler, createBridgeStartupError, createBridgeToken, createCredentialRequestTransformation, createReadBridgeAsset, drainBridgeProcessStream, experimental_createBridgeUserMessageSubmitter, extractHarnessPromptContent, forwardBridgeProcessStream, getAiGatewayAuthFromEnv, getRestrictedSandboxSession, harnessPromptContentSchema, isAccessTokenExpiringSoon, isHarnessAuthenticationEnvironment, isMacOS, markBridgeStarting, readMacOSKeychainPassword, refreshOAuthAccessToken, resolveSandboxCredentialEnvironment, resolveSandboxHomeDir, shellQuote, shouldResolveNativeSubscription,
|
|
3
|
+
import { SandboxChannel, applyCredentialForwarding, classifyDiskLog, createBridgeErrorHandler, createBridgeStartupError, createBridgeToken, createBridgeWebSocketConnect, createCredentialRequestTransformation, createReadBridgeAsset, drainBridgeProcessStream, experimental_createBridgeUserMessageSubmitter, extractHarnessPromptContent, forwardBridgeProcessStream, getAiGatewayAuthFromEnv, getRestrictedSandboxSession, harnessPromptContentSchema, isAccessTokenExpiringSoon, isHarnessAuthenticationEnvironment, isMacOS, markBridgeStarting, readMacOSKeychainPassword, refreshOAuthAccessToken, resolveBridgeEndpoint, resolveBridgePort, resolveSandboxCredentialEnvironment, resolveSandboxHomeDir, shellQuote, shouldResolveNativeSubscription, validateBridgeSandboxSettings, waitForBridgeReady, warnCredentialBrokeringUnavailable, writeSkills } from "@ai-sdk/harness/utils";
|
|
4
4
|
import { isRecord, safeParseJSON, tool } from "@ai-sdk/provider-utils";
|
|
5
5
|
import { WebSocket } from "ws";
|
|
6
6
|
import { z } from "zod/v4";
|
|
@@ -308,7 +308,7 @@ const startMessageSchema = harnessV1BridgeStartBaseSchema.extend({
|
|
|
308
308
|
z.discriminatedUnion("type", [startMessageSchema, ...harnessV1BridgeInboundCommandSchemas]);
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/version.ts
|
|
311
|
-
const VERSION = "1.0.
|
|
311
|
+
const VERSION = "1.0.168";
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/claude-code-harness.ts
|
|
314
314
|
/**
|
|
@@ -973,14 +973,12 @@ function createClaudeCode(settings = {}) {
|
|
|
973
973
|
const sandboxSession = startOpts.sandboxSession;
|
|
974
974
|
const toolSafeSandboxSession = getRestrictedSandboxSession(sandboxSession);
|
|
975
975
|
const sandboxId = "id" in sandboxSession ? sandboxSession.id : void 0;
|
|
976
|
-
|
|
976
|
+
validateBridgeSandboxSettings({
|
|
977
977
|
sandboxSession,
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
harnessId: "claude-code",
|
|
983
|
-
message: "The Claude Code harness cannot use `mintBridgeToken` with a sandbox session that does not expose an id."
|
|
978
|
+
sandboxId,
|
|
979
|
+
portOverride: settings.port,
|
|
980
|
+
portEndpointOverride: settings.portEndpoint,
|
|
981
|
+
mintBridgeToken: settings.mintBridgeToken
|
|
984
982
|
});
|
|
985
983
|
const lifecycleState = startOpts.continueFrom ?? startOpts.resumeFrom;
|
|
986
984
|
const isResume = lifecycleState != null;
|
|
@@ -1050,28 +1048,22 @@ function createClaudeCode(settings = {}) {
|
|
|
1050
1048
|
sessionId: startOpts.sessionId
|
|
1051
1049
|
});
|
|
1052
1050
|
let supportsUserMessageResponses = false;
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1055
|
-
endpoint,
|
|
1056
|
-
timeoutMs,
|
|
1057
|
-
abortSignal,
|
|
1058
|
-
onHello: (supportsResponses) => {
|
|
1059
|
-
supportsUserMessageResponses = supportsResponses;
|
|
1060
|
-
}
|
|
1061
|
-
});
|
|
1051
|
+
const onHello = (hello) => {
|
|
1052
|
+
supportsUserMessageResponses = hello.capabilities?.experimental_userMessageResponses === true;
|
|
1062
1053
|
};
|
|
1063
1054
|
if (coords) try {
|
|
1064
|
-
const
|
|
1055
|
+
const attachEndpoint = await resolveBridgeEndpoint({
|
|
1065
1056
|
sandboxSession,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
});
|
|
1069
|
-
const attachEndpoint = withBridgeToken({
|
|
1070
|
-
endpoint,
|
|
1057
|
+
port: coords.port,
|
|
1058
|
+
portEndpointOverride: settings.portEndpoint,
|
|
1071
1059
|
token: coords.token
|
|
1072
1060
|
});
|
|
1073
1061
|
const attachChannel = new SandboxChannel({
|
|
1074
|
-
connect:
|
|
1062
|
+
connect: createBridgeWebSocketConnect({
|
|
1063
|
+
endpoint: attachEndpoint,
|
|
1064
|
+
webSocketConstructor: WebSocket,
|
|
1065
|
+
onHello
|
|
1066
|
+
}),
|
|
1075
1067
|
outboundSchema: outboundMessageSchema,
|
|
1076
1068
|
initialLastSeenEventId: coords.lastSeenEventId,
|
|
1077
1069
|
onDiagnostic,
|
|
@@ -1123,7 +1115,7 @@ function createClaudeCode(settings = {}) {
|
|
|
1123
1115
|
}
|
|
1124
1116
|
const port = resolveBridgePort({
|
|
1125
1117
|
sandboxSession,
|
|
1126
|
-
|
|
1118
|
+
portOverride: settings.port
|
|
1127
1119
|
});
|
|
1128
1120
|
const token = settings.mintBridgeToken == null ? createBridgeToken() : settings.mintBridgeToken(sandboxId);
|
|
1129
1121
|
const env = {
|
|
@@ -1176,17 +1168,20 @@ function createClaudeCode(settings = {}) {
|
|
|
1176
1168
|
})
|
|
1177
1169
|
});
|
|
1178
1170
|
drainBridgeProcessStream(proc.stdout);
|
|
1179
|
-
const
|
|
1171
|
+
const bridgeEndpoint = await resolveBridgeEndpoint({
|
|
1180
1172
|
sandboxSession,
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
});
|
|
1184
|
-
const bridgeEndpoint = withBridgeToken({
|
|
1185
|
-
endpoint,
|
|
1173
|
+
port: boundPort,
|
|
1174
|
+
portEndpointOverride: settings.portEndpoint,
|
|
1186
1175
|
token
|
|
1187
1176
|
});
|
|
1188
1177
|
const channel = new SandboxChannel({
|
|
1189
|
-
connect:
|
|
1178
|
+
connect: createBridgeWebSocketConnect({
|
|
1179
|
+
endpoint: bridgeEndpoint,
|
|
1180
|
+
webSocketConstructor: WebSocket,
|
|
1181
|
+
openRetryTimeoutMs: timeoutMs,
|
|
1182
|
+
startAbortSignal: startOpts.abortSignal,
|
|
1183
|
+
onHello
|
|
1184
|
+
}),
|
|
1190
1185
|
outboundSchema: outboundMessageSchema,
|
|
1191
1186
|
onDiagnostic,
|
|
1192
1187
|
onBridgeError,
|
|
@@ -1230,36 +1225,6 @@ function createClaudeCode(settings = {}) {
|
|
|
1230
1225
|
}
|
|
1231
1226
|
};
|
|
1232
1227
|
}
|
|
1233
|
-
function resolveBridgePort({ sandboxSession, override }) {
|
|
1234
|
-
if (override !== void 0) return override;
|
|
1235
|
-
if ("ports" in sandboxSession && sandboxSession.ports.length > 0) return sandboxSession.ports[0];
|
|
1236
|
-
throw new HarnessCapabilityUnsupportedError({
|
|
1237
|
-
harnessId: "claude-code",
|
|
1238
|
-
message: "The claude-code harness needs a TCP port exposed by the sandbox. Create the sandbox with `ports: [<port>]` or pass `createClaudeCode({ port })`."
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
function validateBasicSandboxSettings({ sandboxSession, port, portEndpoint }) {
|
|
1242
|
-
if ("getPortEndpoint" in sandboxSession) return;
|
|
1243
|
-
if (port == null) throw new HarnessCapabilityUnsupportedError({
|
|
1244
|
-
harnessId: "claude-code",
|
|
1245
|
-
message: "The Claude Code harness requires an explicit `port` when using a basic sandbox session."
|
|
1246
|
-
});
|
|
1247
|
-
if (portEndpoint == null) throw new HarnessCapabilityUnsupportedError({
|
|
1248
|
-
harnessId: "claude-code",
|
|
1249
|
-
message: "The Claude Code harness requires an explicit `portEndpoint` when using a basic sandbox session."
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
async function resolveBridgeEndpoint({ sandboxSession, override, port }) {
|
|
1253
|
-
if (override != null) return override;
|
|
1254
|
-
if ("getPortEndpoint" in sandboxSession) return sandboxSession.getPortEndpoint({
|
|
1255
|
-
port,
|
|
1256
|
-
protocol: "ws"
|
|
1257
|
-
});
|
|
1258
|
-
throw new HarnessCapabilityUnsupportedError({
|
|
1259
|
-
harnessId: "claude-code",
|
|
1260
|
-
message: "The Claude Code harness requires an explicit `portEndpoint` when using a basic sandbox session."
|
|
1261
|
-
});
|
|
1262
|
-
}
|
|
1263
1228
|
/**
|
|
1264
1229
|
* Materialise skill files into
|
|
1265
1230
|
* `$HOME/.claude/skills/<name>/SKILL.md`. The `claude` CLI
|
|
@@ -1267,145 +1232,6 @@ async function resolveBridgeEndpoint({ sandboxSession, override, port }) {
|
|
|
1267
1232
|
* be in place before the bridge is spawned without mutating the session
|
|
1268
1233
|
* workdir. Each file uses the YAML-frontmatter shape the CLI expects.
|
|
1269
1234
|
*/
|
|
1270
|
-
/**
|
|
1271
|
-
* Wait for the bridge's `bridge-hello` message to arrive on the freshly
|
|
1272
|
-
* opened WebSocket before any other host-side code touches it.
|
|
1273
|
-
*
|
|
1274
|
-
* Some sandbox runtimes (Vercel in particular) complete the WS upgrade
|
|
1275
|
-
* with the host long before the connection is actually forwarded to the
|
|
1276
|
-
* sandbox-side bridge. Anything sent in that gap is silently dropped —
|
|
1277
|
-
* including the `start` message we send next. The bridge emits
|
|
1278
|
-
* `bridge-hello` the instant it accepts the connection, so receiving it
|
|
1279
|
-
* is the only reliable evidence that the end-to-end link is live.
|
|
1280
|
-
*/
|
|
1281
|
-
function openWebSocketAndWaitForBridgeHello({ endpoint, openTimeoutMs, getHelloTimeoutMs, abortSignal, onHello }) {
|
|
1282
|
-
return new Promise((resolve, reject) => {
|
|
1283
|
-
const abortReason = () => abortSignal.reason ?? /* @__PURE__ */ new Error("WebSocket connection aborted");
|
|
1284
|
-
if (abortSignal.aborted) {
|
|
1285
|
-
reject(abortReason());
|
|
1286
|
-
return;
|
|
1287
|
-
}
|
|
1288
|
-
const ws = new WebSocket(endpoint.url, { headers: endpoint.headers == null ? void 0 : { ...endpoint.headers } });
|
|
1289
|
-
let opened = false;
|
|
1290
|
-
let sawBridgeHello = false;
|
|
1291
|
-
let settled = false;
|
|
1292
|
-
let openTimer;
|
|
1293
|
-
let helloTimer;
|
|
1294
|
-
let onAbort;
|
|
1295
|
-
const cleanup = ({ keepTerminationListeners = false } = {}) => {
|
|
1296
|
-
if (openTimer) clearTimeout(openTimer);
|
|
1297
|
-
if (helloTimer) clearTimeout(helloTimer);
|
|
1298
|
-
ws.off("open", onOpen);
|
|
1299
|
-
ws.off("message", onMessage);
|
|
1300
|
-
if (onAbort != null) abortSignal.removeEventListener("abort", onAbort);
|
|
1301
|
-
if (!keepTerminationListeners) {
|
|
1302
|
-
ws.off("close", onClose);
|
|
1303
|
-
ws.off("error", onError);
|
|
1304
|
-
}
|
|
1305
|
-
};
|
|
1306
|
-
const settle = (err) => {
|
|
1307
|
-
if (settled) return;
|
|
1308
|
-
settled = true;
|
|
1309
|
-
if (err) {
|
|
1310
|
-
cleanup({ keepTerminationListeners: true });
|
|
1311
|
-
try {
|
|
1312
|
-
ws.terminate();
|
|
1313
|
-
} catch {
|
|
1314
|
-
cleanup();
|
|
1315
|
-
}
|
|
1316
|
-
reject(err);
|
|
1317
|
-
} else {
|
|
1318
|
-
cleanup();
|
|
1319
|
-
resolve(ws);
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
const tryResolve = () => {
|
|
1323
|
-
if (opened && sawBridgeHello) settle();
|
|
1324
|
-
};
|
|
1325
|
-
const startHelloTimer = () => {
|
|
1326
|
-
if (helloTimer) return;
|
|
1327
|
-
const helloTimeoutMs = getHelloTimeoutMs();
|
|
1328
|
-
helloTimer = setTimeout(() => settle(/* @__PURE__ */ new Error(`claude-code bridge did not send bridge-hello within ${helloTimeoutMs}ms`)), helloTimeoutMs);
|
|
1329
|
-
helloTimer.unref?.();
|
|
1330
|
-
};
|
|
1331
|
-
const onOpen = () => {
|
|
1332
|
-
opened = true;
|
|
1333
|
-
if (openTimer) {
|
|
1334
|
-
clearTimeout(openTimer);
|
|
1335
|
-
openTimer = void 0;
|
|
1336
|
-
}
|
|
1337
|
-
startHelloTimer();
|
|
1338
|
-
tryResolve();
|
|
1339
|
-
};
|
|
1340
|
-
const onMessage = (raw) => {
|
|
1341
|
-
(async () => {
|
|
1342
|
-
const parsed = await safeParseJSON({ text: webSocketMessageToString(raw) });
|
|
1343
|
-
if (!parsed.success || settled) return;
|
|
1344
|
-
const value = parsed.value;
|
|
1345
|
-
if (typeof value === "object" && value !== null && !Array.isArray(value) && value.type === "bridge-hello") {
|
|
1346
|
-
const capabilities = value.capabilities;
|
|
1347
|
-
onHello(capabilities?.experimental_userMessageResponses === true);
|
|
1348
|
-
sawBridgeHello = true;
|
|
1349
|
-
tryResolve();
|
|
1350
|
-
}
|
|
1351
|
-
})();
|
|
1352
|
-
};
|
|
1353
|
-
const onClose = () => {
|
|
1354
|
-
settle(/* @__PURE__ */ new Error("claude-code bridge closed before sending bridge-hello"));
|
|
1355
|
-
cleanup();
|
|
1356
|
-
};
|
|
1357
|
-
const onError = (err) => settle(err);
|
|
1358
|
-
onAbort = () => settle(abortReason());
|
|
1359
|
-
openTimer = setTimeout(() => settle(/* @__PURE__ */ new Error(`WebSocket open timed out after ${openTimeoutMs}ms`)), openTimeoutMs);
|
|
1360
|
-
openTimer.unref?.();
|
|
1361
|
-
ws.on("open", onOpen);
|
|
1362
|
-
ws.on("message", onMessage);
|
|
1363
|
-
ws.on("close", onClose);
|
|
1364
|
-
ws.on("error", onError);
|
|
1365
|
-
abortSignal.addEventListener("abort", onAbort, { once: true });
|
|
1366
|
-
});
|
|
1367
|
-
}
|
|
1368
|
-
async function openBridgeWebSocket({ endpoint, timeoutMs, abortSignal, onHello }) {
|
|
1369
|
-
const deadline = Date.now() + timeoutMs;
|
|
1370
|
-
let attempt = 0;
|
|
1371
|
-
let lastError;
|
|
1372
|
-
while (!abortSignal.aborted && Date.now() < deadline) {
|
|
1373
|
-
attempt++;
|
|
1374
|
-
try {
|
|
1375
|
-
const remaining = Math.max(1, deadline - Date.now());
|
|
1376
|
-
return await openWebSocketAndWaitForBridgeHello({
|
|
1377
|
-
endpoint,
|
|
1378
|
-
openTimeoutMs: Math.min(1e4, remaining),
|
|
1379
|
-
getHelloTimeoutMs: () => Math.min(5e3, Math.max(1, deadline - Date.now())),
|
|
1380
|
-
abortSignal,
|
|
1381
|
-
onHello
|
|
1382
|
-
});
|
|
1383
|
-
} catch (err) {
|
|
1384
|
-
if (abortSignal.aborted) throw abortSignal.reason ?? /* @__PURE__ */ new Error("WebSocket connection aborted");
|
|
1385
|
-
lastError = err;
|
|
1386
|
-
const remaining = deadline - Date.now();
|
|
1387
|
-
if (remaining <= 0) break;
|
|
1388
|
-
await sleep({
|
|
1389
|
-
ms: Math.min(250 * attempt, 1e3, remaining),
|
|
1390
|
-
abortSignal
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
if (abortSignal.aborted) throw abortSignal.reason ?? /* @__PURE__ */ new Error("WebSocket connection aborted");
|
|
1395
|
-
throw new Error(`claude-code bridge did not complete WebSocket handshake within ${timeoutMs}ms after ${attempt} attempt(s). Last error: ${formatUnknownError(lastError)}`);
|
|
1396
|
-
}
|
|
1397
|
-
function webSocketMessageToString(raw) {
|
|
1398
|
-
if (typeof raw === "string") return raw;
|
|
1399
|
-
if (Buffer.isBuffer(raw)) return raw.toString("utf8");
|
|
1400
|
-
if (Array.isArray(raw)) return Buffer.concat(raw).toString("utf8");
|
|
1401
|
-
if (raw instanceof ArrayBuffer) return Buffer.from(raw).toString("utf8");
|
|
1402
|
-
if (ArrayBuffer.isView(raw)) return Buffer.from(raw.buffer, raw.byteOffset, raw.byteLength).toString("utf8");
|
|
1403
|
-
return String(raw);
|
|
1404
|
-
}
|
|
1405
|
-
function formatUnknownError(error) {
|
|
1406
|
-
if (error instanceof Error) return error.message;
|
|
1407
|
-
return String(error);
|
|
1408
|
-
}
|
|
1409
1235
|
function createSession({ sessionId, channel, finishListenerAttachment, proc, maxTurns, agentProgressSummaries, forwardSubagentText, env, thinking, effort, isResume, continueOnFirstPrompt, resumeSessionId, rerunContinue, bridgePort, bridgeToken, sandboxId, sandboxCredentialEnvironment, debug, permissionMode, builtinToolFiltering, sandbox, sandboxHomeDir, mcpServers, supportsUserMessageResponses }) {
|
|
1410
1236
|
let stopped = false;
|
|
1411
1237
|
let stopPromise;
|