@ai-sdk/harness-claude-code 1.0.121 → 1.0.123
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 +20 -0
- package/dist/bridge/index.mjs +22 -13
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/bridge/package.json +2 -2
- package/dist/bridge/pnpm-lock.yaml +107 -107
- package/dist/bridge/pnpm-workspace.yaml +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +34 -11
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/bridge/create-emit-stream-event.ts +8 -7
- package/src/bridge/index.ts +6 -5
- package/src/bridge/json-schema-to-zod.ts +16 -3
- package/src/bridge/package.json +2 -2
- package/src/bridge/pnpm-lock.yaml +107 -107
- package/src/bridge/pnpm-workspace.yaml +1 -1
- package/src/claude-code-harness.ts +48 -10
package/dist/bridge/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
8
|
-
"@anthropic-ai/claude-code": "2.1.
|
|
7
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.276",
|
|
8
|
+
"@anthropic-ai/claude-code": "2.1.276",
|
|
9
9
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
10
10
|
"ws": "8.21.0",
|
|
11
11
|
"zod": "4.4.3"
|
|
@@ -9,11 +9,11 @@ importers:
|
|
|
9
9
|
.:
|
|
10
10
|
dependencies:
|
|
11
11
|
'@anthropic-ai/claude-agent-sdk':
|
|
12
|
-
specifier: 0.3.
|
|
13
|
-
version: 0.3.
|
|
12
|
+
specifier: 0.3.276
|
|
13
|
+
version: 0.3.276(@anthropic-ai/sdk@0.97.1(zod@4.4.3))(@modelcontextprotocol/sdk@1.30.0(zod@4.4.3))(zod@4.4.3)
|
|
14
14
|
'@anthropic-ai/claude-code':
|
|
15
|
-
specifier: 2.1.
|
|
16
|
-
version: 2.1.
|
|
15
|
+
specifier: 2.1.276
|
|
16
|
+
version: 2.1.276
|
|
17
17
|
'@modelcontextprotocol/sdk':
|
|
18
18
|
specifier: 1.30.0
|
|
19
19
|
version: 1.30.0(zod@4.4.3)
|
|
@@ -26,104 +26,104 @@ importers:
|
|
|
26
26
|
|
|
27
27
|
packages:
|
|
28
28
|
|
|
29
|
-
'@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.
|
|
30
|
-
resolution: {integrity: sha512-
|
|
29
|
+
'@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.276':
|
|
30
|
+
resolution: {integrity: sha512-WdpZ7UXoIDGYeb97OWRFADqkMDLv/bB3YrRxvomqdxfRZC2RLAPLUxsBat9zVL9B5dsiJmZN8h1D0NlMe92Uzw==}
|
|
31
31
|
cpu: [arm64]
|
|
32
32
|
os: [darwin]
|
|
33
33
|
|
|
34
|
-
'@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.
|
|
35
|
-
resolution: {integrity: sha512-
|
|
34
|
+
'@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.276':
|
|
35
|
+
resolution: {integrity: sha512-y5J+K1q7llwYkf85OhjG71R5AqsulHzC+HpgUOrg6klO+jBKsesGGS7tsEGzsM4YJtDntr6Rylw/sH3ZmXvjhg==}
|
|
36
36
|
cpu: [x64]
|
|
37
37
|
os: [darwin]
|
|
38
38
|
|
|
39
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.
|
|
40
|
-
resolution: {integrity: sha512-
|
|
39
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.276':
|
|
40
|
+
resolution: {integrity: sha512-Pb7PVWLktFCgD1cUtF61lx9riT2bh3ZSE6rq94EjaesyCnpzddlQ59/LLwLVUwGunBq9N2WayXaElOsk8+pK/g==}
|
|
41
41
|
cpu: [arm64]
|
|
42
42
|
os: [linux]
|
|
43
43
|
libc: [musl]
|
|
44
44
|
|
|
45
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.
|
|
46
|
-
resolution: {integrity: sha512-
|
|
45
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.276':
|
|
46
|
+
resolution: {integrity: sha512-IaBni1kRiUKEsSRTHocVW8jqzl4KyC6ms6fr6KAJPPcjJTu2Ptpb1ohj/OfDixTc/AErrNVL0ye8ICpZ+88k7w==}
|
|
47
47
|
cpu: [arm64]
|
|
48
48
|
os: [linux]
|
|
49
49
|
libc: [glibc]
|
|
50
50
|
|
|
51
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.
|
|
52
|
-
resolution: {integrity: sha512-
|
|
51
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.276':
|
|
52
|
+
resolution: {integrity: sha512-OaZAlVBhAUFkivWgb5ZsJYCT08qTo9LyomaN/2jNwsvVkpurr8kXEGncsTk8sM5JyIzSSiWuR+Sfxphq071XPA==}
|
|
53
53
|
cpu: [x64]
|
|
54
54
|
os: [linux]
|
|
55
55
|
libc: [musl]
|
|
56
56
|
|
|
57
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64@0.3.
|
|
58
|
-
resolution: {integrity: sha512-
|
|
57
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64@0.3.276':
|
|
58
|
+
resolution: {integrity: sha512-MR/HQn8xi3RGujnzgJhyVolKR7JO+BiPhBBJ0GqbIlM4huso1aIDFhYhetdGIPb4shr7R1OZzSj1QFJoJQQ8/A==}
|
|
59
59
|
cpu: [x64]
|
|
60
60
|
os: [linux]
|
|
61
61
|
libc: [glibc]
|
|
62
62
|
|
|
63
|
-
'@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.
|
|
64
|
-
resolution: {integrity: sha512-
|
|
63
|
+
'@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.276':
|
|
64
|
+
resolution: {integrity: sha512-dk7lxCdvRwXVf5LAh9nQ2/MLLedfT3K1HIQsv5KBgexUE1F7JYYd5/R3eYs/qT9UQOeKrMmKq7GG9RxDDXCgjA==}
|
|
65
65
|
cpu: [arm64]
|
|
66
66
|
os: [win32]
|
|
67
67
|
|
|
68
|
-
'@anthropic-ai/claude-agent-sdk-win32-x64@0.3.
|
|
69
|
-
resolution: {integrity: sha512-
|
|
68
|
+
'@anthropic-ai/claude-agent-sdk-win32-x64@0.3.276':
|
|
69
|
+
resolution: {integrity: sha512-CKPz5K94qpVHdP0hmSugntpiTshHrPFs4RtQYcFvP4PVltZv/wtth090Rff21XJna3Lxt4Lb5ce3tMqTnDRu9Q==}
|
|
70
70
|
cpu: [x64]
|
|
71
71
|
os: [win32]
|
|
72
72
|
|
|
73
|
-
'@anthropic-ai/claude-agent-sdk@0.3.
|
|
74
|
-
resolution: {integrity: sha512-
|
|
73
|
+
'@anthropic-ai/claude-agent-sdk@0.3.276':
|
|
74
|
+
resolution: {integrity: sha512-Dic43v4uuGLhibPAArWy3RSfq3zHdn+4Oh2AI2/18a5tlbNKkvChEpazyp8c+grUJvzxkzt0jETCa1wrADbkyw==}
|
|
75
75
|
engines: {node: '>=18.0.0'}
|
|
76
76
|
peerDependencies:
|
|
77
77
|
'@anthropic-ai/sdk': '>=0.93.0'
|
|
78
78
|
'@modelcontextprotocol/sdk': ^1.29.0
|
|
79
79
|
zod: ^4.0.0
|
|
80
80
|
|
|
81
|
-
'@anthropic-ai/claude-code-darwin-arm64@2.1.
|
|
82
|
-
resolution: {integrity: sha512-
|
|
81
|
+
'@anthropic-ai/claude-code-darwin-arm64@2.1.276':
|
|
82
|
+
resolution: {integrity: sha512-JchRlXfYFrHGjm7fTZpWzlDvaP67SSO2yx2yFQSxt/T57mC6ickpApiuvS5jHCia6qjwzgjuzWSkemfLYaxB7w==}
|
|
83
83
|
cpu: [arm64]
|
|
84
84
|
os: [darwin]
|
|
85
85
|
|
|
86
|
-
'@anthropic-ai/claude-code-darwin-x64@2.1.
|
|
87
|
-
resolution: {integrity: sha512-
|
|
86
|
+
'@anthropic-ai/claude-code-darwin-x64@2.1.276':
|
|
87
|
+
resolution: {integrity: sha512-7LBOcz1A5cqbQ9z363R5YjnsNvZCDAztV8/zOXM3i0PM7nHDrG3blYoZPDal54uPiovGCPVsa+bEuj+kbSZPYA==}
|
|
88
88
|
cpu: [x64]
|
|
89
89
|
os: [darwin]
|
|
90
90
|
|
|
91
|
-
'@anthropic-ai/claude-code-linux-arm64-musl@2.1.
|
|
92
|
-
resolution: {integrity: sha512-
|
|
91
|
+
'@anthropic-ai/claude-code-linux-arm64-musl@2.1.276':
|
|
92
|
+
resolution: {integrity: sha512-eKm/iIwLNdc8VtY00ETzDaLQN8tt1u7cf38b+Y/tCCfZWz8vT5EnQkJatpkm94Yq2m5iRXjcILmN2hHWZ53s0Q==}
|
|
93
93
|
cpu: [arm64]
|
|
94
94
|
os: [linux]
|
|
95
95
|
libc: [musl]
|
|
96
96
|
|
|
97
|
-
'@anthropic-ai/claude-code-linux-arm64@2.1.
|
|
98
|
-
resolution: {integrity: sha512
|
|
97
|
+
'@anthropic-ai/claude-code-linux-arm64@2.1.276':
|
|
98
|
+
resolution: {integrity: sha512-/wzWD8U5mGmSoeiB99gGfvVuj/7/p7nh/zZACTuuPEwvo/CfMMvW/ZxBB6LG8w0nz6B//UOIx3ryKdGCENAPOA==}
|
|
99
99
|
cpu: [arm64]
|
|
100
100
|
os: [linux]
|
|
101
101
|
libc: [glibc]
|
|
102
102
|
|
|
103
|
-
'@anthropic-ai/claude-code-linux-x64-musl@2.1.
|
|
104
|
-
resolution: {integrity: sha512-
|
|
103
|
+
'@anthropic-ai/claude-code-linux-x64-musl@2.1.276':
|
|
104
|
+
resolution: {integrity: sha512-1y66zgPpIWV14fn75veSXCCNpJB92+dlM2jSt5hvlB15LH6wk2JHTD8H7ogRCYPrMtBOkdz3yfH/fxSeD4UP1w==}
|
|
105
105
|
cpu: [x64]
|
|
106
106
|
os: [linux]
|
|
107
107
|
libc: [musl]
|
|
108
108
|
|
|
109
|
-
'@anthropic-ai/claude-code-linux-x64@2.1.
|
|
110
|
-
resolution: {integrity: sha512-
|
|
109
|
+
'@anthropic-ai/claude-code-linux-x64@2.1.276':
|
|
110
|
+
resolution: {integrity: sha512-xFhD9UyIVKWLEQjcFg1ynSmYPpiXSdyN9+9rtrM0aIVnSqFP15Hd5/owEf7N6JrHtAXijfxDC0usXFxAOJQ1vA==}
|
|
111
111
|
cpu: [x64]
|
|
112
112
|
os: [linux]
|
|
113
113
|
libc: [glibc]
|
|
114
114
|
|
|
115
|
-
'@anthropic-ai/claude-code-win32-arm64@2.1.
|
|
116
|
-
resolution: {integrity: sha512-
|
|
115
|
+
'@anthropic-ai/claude-code-win32-arm64@2.1.276':
|
|
116
|
+
resolution: {integrity: sha512-QGbJPUb6uhngwPCKociJUArJfqSV6gW55qcZLiu7RJQIUK4LHApntAIO6NdJ/du4YiuHsty/5Hy2zAzekXk+mQ==}
|
|
117
117
|
cpu: [arm64]
|
|
118
118
|
os: [win32]
|
|
119
119
|
|
|
120
|
-
'@anthropic-ai/claude-code-win32-x64@2.1.
|
|
121
|
-
resolution: {integrity: sha512
|
|
120
|
+
'@anthropic-ai/claude-code-win32-x64@2.1.276':
|
|
121
|
+
resolution: {integrity: sha512-5LtGQOG70zw7svIs7rRN8hutS8vXmn6FrXZk5hmt1Tsr18ycbesxD1YgJydgyzy99HRqOTkFMXQCWZOUsY8xpg==}
|
|
122
122
|
cpu: [x64]
|
|
123
123
|
os: [win32]
|
|
124
124
|
|
|
125
|
-
'@anthropic-ai/claude-code@2.1.
|
|
126
|
-
resolution: {integrity: sha512
|
|
125
|
+
'@anthropic-ai/claude-code@2.1.276':
|
|
126
|
+
resolution: {integrity: sha512-xgVXCbFdqOhSAcMTSC61gjL1jCQuoAA4TNU1I7Dmf/yuYcDxHf796r6LaB3Jswm1floKnP1V+/zfphtDlPdlkg==}
|
|
127
127
|
engines: {node: '>=22.0.0'}
|
|
128
128
|
hasBin: true
|
|
129
129
|
|
|
@@ -269,8 +269,8 @@ packages:
|
|
|
269
269
|
resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==}
|
|
270
270
|
engines: {node: '>=18.0.0'}
|
|
271
271
|
|
|
272
|
-
express-rate-limit@8.
|
|
273
|
-
resolution: {integrity: sha512-
|
|
272
|
+
express-rate-limit@8.7.0:
|
|
273
|
+
resolution: {integrity: sha512-hOwV7WOxXfjRpAM1DSJWZDXx3GhplwD8IfwuwvogD8i1Qnkgosw/H45s4ZnFAUHDAhPjlY9hLBvJhKmGMyY26g==}
|
|
274
274
|
engines: {node: '>= 16'}
|
|
275
275
|
peerDependencies:
|
|
276
276
|
express: '>= 4.11'
|
|
@@ -285,8 +285,8 @@ packages:
|
|
|
285
285
|
fast-sha256@1.3.0:
|
|
286
286
|
resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==}
|
|
287
287
|
|
|
288
|
-
fast-uri@3.1.
|
|
289
|
-
resolution: {integrity: sha512-
|
|
288
|
+
fast-uri@3.1.8:
|
|
289
|
+
resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==}
|
|
290
290
|
|
|
291
291
|
finalhandler@2.1.1:
|
|
292
292
|
resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==}
|
|
@@ -323,8 +323,8 @@ packages:
|
|
|
323
323
|
resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}
|
|
324
324
|
engines: {node: '>= 0.4'}
|
|
325
325
|
|
|
326
|
-
hono@4.13.
|
|
327
|
-
resolution: {integrity: sha512
|
|
326
|
+
hono@4.13.8:
|
|
327
|
+
resolution: {integrity: sha512-/Gng7NfoykZl2pjukW5Z6+8Yxm3BPRf86GTbQnt0SbySkvax4fyL4H3HhY1cCpBGmiW9XDRFzRV+CXK2W8QudQ==}
|
|
328
328
|
engines: {node: '>=16.9.0'}
|
|
329
329
|
|
|
330
330
|
http-errors@2.0.1:
|
|
@@ -338,8 +338,8 @@ packages:
|
|
|
338
338
|
inherits@2.0.4:
|
|
339
339
|
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
|
340
340
|
|
|
341
|
-
ip-address@10.
|
|
342
|
-
resolution: {integrity: sha512-
|
|
341
|
+
ip-address@10.7.2:
|
|
342
|
+
resolution: {integrity: sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==}
|
|
343
343
|
engines: {node: '>= 12'}
|
|
344
344
|
|
|
345
345
|
ipaddr.js@1.9.1:
|
|
@@ -352,8 +352,8 @@ packages:
|
|
|
352
352
|
isexe@2.0.0:
|
|
353
353
|
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
|
354
354
|
|
|
355
|
-
jose@6.2.
|
|
356
|
-
resolution: {integrity: sha512-
|
|
355
|
+
jose@6.2.12:
|
|
356
|
+
resolution: {integrity: sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw==}
|
|
357
357
|
|
|
358
358
|
json-schema-to-ts@3.1.1:
|
|
359
359
|
resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==}
|
|
@@ -422,12 +422,12 @@ packages:
|
|
|
422
422
|
resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==}
|
|
423
423
|
engines: {node: '>=16.20.0'}
|
|
424
424
|
|
|
425
|
-
proxy-addr@2.0.
|
|
426
|
-
resolution: {integrity: sha512-
|
|
425
|
+
proxy-addr@2.0.8:
|
|
426
|
+
resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==}
|
|
427
427
|
engines: {node: '>= 0.10'}
|
|
428
428
|
|
|
429
|
-
qs@6.
|
|
430
|
-
resolution: {integrity: sha512-
|
|
429
|
+
qs@6.16.0:
|
|
430
|
+
resolution: {integrity: sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==}
|
|
431
431
|
engines: {node: '>=0.6'}
|
|
432
432
|
|
|
433
433
|
range-parser@1.3.0:
|
|
@@ -540,79 +540,79 @@ packages:
|
|
|
540
540
|
|
|
541
541
|
snapshots:
|
|
542
542
|
|
|
543
|
-
'@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.
|
|
543
|
+
'@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.276':
|
|
544
544
|
optional: true
|
|
545
545
|
|
|
546
|
-
'@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.
|
|
546
|
+
'@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.276':
|
|
547
547
|
optional: true
|
|
548
548
|
|
|
549
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.
|
|
549
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.276':
|
|
550
550
|
optional: true
|
|
551
551
|
|
|
552
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.
|
|
552
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.276':
|
|
553
553
|
optional: true
|
|
554
554
|
|
|
555
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.
|
|
555
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.276':
|
|
556
556
|
optional: true
|
|
557
557
|
|
|
558
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64@0.3.
|
|
558
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64@0.3.276':
|
|
559
559
|
optional: true
|
|
560
560
|
|
|
561
|
-
'@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.
|
|
561
|
+
'@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.276':
|
|
562
562
|
optional: true
|
|
563
563
|
|
|
564
|
-
'@anthropic-ai/claude-agent-sdk-win32-x64@0.3.
|
|
564
|
+
'@anthropic-ai/claude-agent-sdk-win32-x64@0.3.276':
|
|
565
565
|
optional: true
|
|
566
566
|
|
|
567
|
-
'@anthropic-ai/claude-agent-sdk@0.3.
|
|
567
|
+
'@anthropic-ai/claude-agent-sdk@0.3.276(@anthropic-ai/sdk@0.97.1(zod@4.4.3))(@modelcontextprotocol/sdk@1.30.0(zod@4.4.3))(zod@4.4.3)':
|
|
568
568
|
dependencies:
|
|
569
569
|
'@anthropic-ai/sdk': 0.97.1(zod@4.4.3)
|
|
570
570
|
'@modelcontextprotocol/sdk': 1.30.0(zod@4.4.3)
|
|
571
571
|
zod: 4.4.3
|
|
572
572
|
optionalDependencies:
|
|
573
|
-
'@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.
|
|
574
|
-
'@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.
|
|
575
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.
|
|
576
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.
|
|
577
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.
|
|
578
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.
|
|
579
|
-
'@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.
|
|
580
|
-
'@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.
|
|
581
|
-
|
|
582
|
-
'@anthropic-ai/claude-code-darwin-arm64@2.1.
|
|
573
|
+
'@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.276
|
|
574
|
+
'@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.276
|
|
575
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.276
|
|
576
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.276
|
|
577
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.276
|
|
578
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.276
|
|
579
|
+
'@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.276
|
|
580
|
+
'@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.276
|
|
581
|
+
|
|
582
|
+
'@anthropic-ai/claude-code-darwin-arm64@2.1.276':
|
|
583
583
|
optional: true
|
|
584
584
|
|
|
585
|
-
'@anthropic-ai/claude-code-darwin-x64@2.1.
|
|
585
|
+
'@anthropic-ai/claude-code-darwin-x64@2.1.276':
|
|
586
586
|
optional: true
|
|
587
587
|
|
|
588
|
-
'@anthropic-ai/claude-code-linux-arm64-musl@2.1.
|
|
588
|
+
'@anthropic-ai/claude-code-linux-arm64-musl@2.1.276':
|
|
589
589
|
optional: true
|
|
590
590
|
|
|
591
|
-
'@anthropic-ai/claude-code-linux-arm64@2.1.
|
|
591
|
+
'@anthropic-ai/claude-code-linux-arm64@2.1.276':
|
|
592
592
|
optional: true
|
|
593
593
|
|
|
594
|
-
'@anthropic-ai/claude-code-linux-x64-musl@2.1.
|
|
594
|
+
'@anthropic-ai/claude-code-linux-x64-musl@2.1.276':
|
|
595
595
|
optional: true
|
|
596
596
|
|
|
597
|
-
'@anthropic-ai/claude-code-linux-x64@2.1.
|
|
597
|
+
'@anthropic-ai/claude-code-linux-x64@2.1.276':
|
|
598
598
|
optional: true
|
|
599
599
|
|
|
600
|
-
'@anthropic-ai/claude-code-win32-arm64@2.1.
|
|
600
|
+
'@anthropic-ai/claude-code-win32-arm64@2.1.276':
|
|
601
601
|
optional: true
|
|
602
602
|
|
|
603
|
-
'@anthropic-ai/claude-code-win32-x64@2.1.
|
|
603
|
+
'@anthropic-ai/claude-code-win32-x64@2.1.276':
|
|
604
604
|
optional: true
|
|
605
605
|
|
|
606
|
-
'@anthropic-ai/claude-code@2.1.
|
|
606
|
+
'@anthropic-ai/claude-code@2.1.276':
|
|
607
607
|
optionalDependencies:
|
|
608
|
-
'@anthropic-ai/claude-code-darwin-arm64': 2.1.
|
|
609
|
-
'@anthropic-ai/claude-code-darwin-x64': 2.1.
|
|
610
|
-
'@anthropic-ai/claude-code-linux-arm64': 2.1.
|
|
611
|
-
'@anthropic-ai/claude-code-linux-arm64-musl': 2.1.
|
|
612
|
-
'@anthropic-ai/claude-code-linux-x64': 2.1.
|
|
613
|
-
'@anthropic-ai/claude-code-linux-x64-musl': 2.1.
|
|
614
|
-
'@anthropic-ai/claude-code-win32-arm64': 2.1.
|
|
615
|
-
'@anthropic-ai/claude-code-win32-x64': 2.1.
|
|
608
|
+
'@anthropic-ai/claude-code-darwin-arm64': 2.1.276
|
|
609
|
+
'@anthropic-ai/claude-code-darwin-x64': 2.1.276
|
|
610
|
+
'@anthropic-ai/claude-code-linux-arm64': 2.1.276
|
|
611
|
+
'@anthropic-ai/claude-code-linux-arm64-musl': 2.1.276
|
|
612
|
+
'@anthropic-ai/claude-code-linux-x64': 2.1.276
|
|
613
|
+
'@anthropic-ai/claude-code-linux-x64-musl': 2.1.276
|
|
614
|
+
'@anthropic-ai/claude-code-win32-arm64': 2.1.276
|
|
615
|
+
'@anthropic-ai/claude-code-win32-x64': 2.1.276
|
|
616
616
|
|
|
617
617
|
'@anthropic-ai/sdk@0.97.1(zod@4.4.3)':
|
|
618
618
|
dependencies:
|
|
@@ -623,13 +623,13 @@ snapshots:
|
|
|
623
623
|
|
|
624
624
|
'@babel/runtime@7.29.7': {}
|
|
625
625
|
|
|
626
|
-
'@hono/node-server@2.1.1(hono@4.13.
|
|
626
|
+
'@hono/node-server@2.1.1(hono@4.13.8)':
|
|
627
627
|
dependencies:
|
|
628
|
-
hono: 4.13.
|
|
628
|
+
hono: 4.13.8
|
|
629
629
|
|
|
630
630
|
'@modelcontextprotocol/sdk@1.30.0(zod@4.4.3)':
|
|
631
631
|
dependencies:
|
|
632
|
-
'@hono/node-server': 2.1.1(hono@4.13.
|
|
632
|
+
'@hono/node-server': 2.1.1(hono@4.13.8)
|
|
633
633
|
ajv: 8.20.0
|
|
634
634
|
ajv-formats: 3.0.1(ajv@8.20.0)
|
|
635
635
|
content-type: 1.0.5
|
|
@@ -638,9 +638,9 @@ snapshots:
|
|
|
638
638
|
eventsource: 3.0.7
|
|
639
639
|
eventsource-parser: 3.1.1
|
|
640
640
|
express: 5.2.1
|
|
641
|
-
express-rate-limit: 8.
|
|
642
|
-
hono: 4.13.
|
|
643
|
-
jose: 6.2.
|
|
641
|
+
express-rate-limit: 8.7.0(express@5.2.1)
|
|
642
|
+
hono: 4.13.8
|
|
643
|
+
jose: 6.2.12
|
|
644
644
|
json-schema-typed: 8.0.2
|
|
645
645
|
pkce-challenge: 5.0.1
|
|
646
646
|
raw-body: 3.0.2
|
|
@@ -663,7 +663,7 @@ snapshots:
|
|
|
663
663
|
ajv@8.20.0:
|
|
664
664
|
dependencies:
|
|
665
665
|
fast-deep-equal: 3.1.3
|
|
666
|
-
fast-uri: 3.1.
|
|
666
|
+
fast-uri: 3.1.8
|
|
667
667
|
json-schema-traverse: 1.0.0
|
|
668
668
|
require-from-string: 2.0.2
|
|
669
669
|
|
|
@@ -675,7 +675,7 @@ snapshots:
|
|
|
675
675
|
http-errors: 2.0.1
|
|
676
676
|
iconv-lite: 0.7.3
|
|
677
677
|
on-finished: 2.4.1
|
|
678
|
-
qs: 6.
|
|
678
|
+
qs: 6.16.0
|
|
679
679
|
raw-body: 3.0.2
|
|
680
680
|
type-is: 2.1.0
|
|
681
681
|
transitivePeerDependencies:
|
|
@@ -748,11 +748,11 @@ snapshots:
|
|
|
748
748
|
dependencies:
|
|
749
749
|
eventsource-parser: 3.1.1
|
|
750
750
|
|
|
751
|
-
express-rate-limit@8.
|
|
751
|
+
express-rate-limit@8.7.0(express@5.2.1):
|
|
752
752
|
dependencies:
|
|
753
753
|
debug: 4.4.3
|
|
754
754
|
express: 5.2.1
|
|
755
|
-
ip-address: 10.
|
|
755
|
+
ip-address: 10.7.2
|
|
756
756
|
transitivePeerDependencies:
|
|
757
757
|
- supports-color
|
|
758
758
|
|
|
@@ -777,8 +777,8 @@ snapshots:
|
|
|
777
777
|
on-finished: 2.4.1
|
|
778
778
|
once: 1.4.0
|
|
779
779
|
parseurl: 1.3.3
|
|
780
|
-
proxy-addr: 2.0.
|
|
781
|
-
qs: 6.
|
|
780
|
+
proxy-addr: 2.0.8
|
|
781
|
+
qs: 6.16.0
|
|
782
782
|
range-parser: 1.3.0
|
|
783
783
|
router: 2.2.0
|
|
784
784
|
send: 1.2.1
|
|
@@ -793,7 +793,7 @@ snapshots:
|
|
|
793
793
|
|
|
794
794
|
fast-sha256@1.3.0: {}
|
|
795
795
|
|
|
796
|
-
fast-uri@3.1.
|
|
796
|
+
fast-uri@3.1.8: {}
|
|
797
797
|
|
|
798
798
|
finalhandler@2.1.1:
|
|
799
799
|
dependencies:
|
|
@@ -838,7 +838,7 @@ snapshots:
|
|
|
838
838
|
dependencies:
|
|
839
839
|
function-bind: 1.1.2
|
|
840
840
|
|
|
841
|
-
hono@4.13.
|
|
841
|
+
hono@4.13.8: {}
|
|
842
842
|
|
|
843
843
|
http-errors@2.0.1:
|
|
844
844
|
dependencies:
|
|
@@ -854,7 +854,7 @@ snapshots:
|
|
|
854
854
|
|
|
855
855
|
inherits@2.0.4: {}
|
|
856
856
|
|
|
857
|
-
ip-address@10.
|
|
857
|
+
ip-address@10.7.2: {}
|
|
858
858
|
|
|
859
859
|
ipaddr.js@1.9.1: {}
|
|
860
860
|
|
|
@@ -862,7 +862,7 @@ snapshots:
|
|
|
862
862
|
|
|
863
863
|
isexe@2.0.0: {}
|
|
864
864
|
|
|
865
|
-
jose@6.2.
|
|
865
|
+
jose@6.2.12: {}
|
|
866
866
|
|
|
867
867
|
json-schema-to-ts@3.1.1:
|
|
868
868
|
dependencies:
|
|
@@ -911,12 +911,12 @@ snapshots:
|
|
|
911
911
|
|
|
912
912
|
pkce-challenge@5.0.1: {}
|
|
913
913
|
|
|
914
|
-
proxy-addr@2.0.
|
|
914
|
+
proxy-addr@2.0.8:
|
|
915
915
|
dependencies:
|
|
916
916
|
forwarded: 0.2.0
|
|
917
917
|
ipaddr.js: 1.9.1
|
|
918
918
|
|
|
919
|
-
qs@6.
|
|
919
|
+
qs@6.16.0:
|
|
920
920
|
dependencies:
|
|
921
921
|
es-define-property: 1.0.1
|
|
922
922
|
side-channel: 1.1.1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
allowBuilds:
|
|
2
|
-
'@anthropic-ai/claude-code@2.1.
|
|
2
|
+
'@anthropic-ai/claude-code@2.1.276': true
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
|
3
3
|
import { Experimental_SandboxSession } from '@ai-sdk/provider-utils';
|
|
4
4
|
import * as _ai_sdk_harness from '@ai-sdk/harness';
|
|
5
5
|
import { HarnessV1Authentication, HarnessV1CredentialForwarding, HarnessV1PortEndpoint, HarnessV1MintBridgeTokenCallback, HarnessV1, HarnessV1BuiltinTool, HARNESS_V1_BUILTIN_TOOLS } from '@ai-sdk/harness';
|
|
6
|
+
import { SandboxChannelReconnectOptions } from '@ai-sdk/harness/utils';
|
|
6
7
|
|
|
7
8
|
type ClaudeCodeAuthenticationMode = HarnessV1Authentication;
|
|
8
9
|
|
|
@@ -60,6 +61,13 @@ type ClaudeCodeHarnessSettings = {
|
|
|
60
61
|
readonly portEndpoint?: HarnessV1PortEndpoint;
|
|
61
62
|
/** Maximum milliseconds to wait for the bridge to advertise its port. Defaults to 120000. */
|
|
62
63
|
readonly startupTimeoutMs?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Configures reconnection attempts after an established bridge connection
|
|
66
|
+
* drops. The reconnect window includes connection establishment and
|
|
67
|
+
* backoff delays. Defaults to 30 seconds with exponential backoff from 50
|
|
68
|
+
* milliseconds up to 2 seconds.
|
|
69
|
+
*/
|
|
70
|
+
readonly reconnect?: SandboxChannelReconnectOptions;
|
|
63
71
|
/**
|
|
64
72
|
* Creates the authentication token used by the sandbox bridge. Defaults to
|
|
65
73
|
* a random 32-byte hexadecimal token.
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
resolveSandboxHomeDir,
|
|
23
23
|
SandboxChannel,
|
|
24
24
|
shellQuote,
|
|
25
|
+
sleep,
|
|
25
26
|
warnCredentialBrokeringUnavailable,
|
|
26
27
|
waitForBridgeReady,
|
|
27
28
|
withBridgeToken,
|
|
@@ -442,7 +443,7 @@ var inboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
442
443
|
]);
|
|
443
444
|
|
|
444
445
|
// src/version.ts
|
|
445
|
-
var VERSION = true ? "1.0.
|
|
446
|
+
var VERSION = true ? "1.0.123" : "0.0.0-test";
|
|
446
447
|
|
|
447
448
|
// src/claude-code-harness.ts
|
|
448
449
|
var CLAUDE_CODE_CLIENT_APP = `ai-sdk/harness-claude-code/${VERSION}`;
|
|
@@ -1164,10 +1165,13 @@ function createClaudeCode(settings = {}) {
|
|
|
1164
1165
|
sessionId: startOpts.sessionId
|
|
1165
1166
|
});
|
|
1166
1167
|
let supportsUserMessageResponses = false;
|
|
1167
|
-
const buildConnect = (endpoint2) => async (
|
|
1168
|
+
const buildConnect = (endpoint2) => async ({
|
|
1169
|
+
abortSignal
|
|
1170
|
+
}) => {
|
|
1168
1171
|
return openBridgeWebSocket({
|
|
1169
1172
|
endpoint: endpoint2,
|
|
1170
1173
|
timeoutMs,
|
|
1174
|
+
abortSignal,
|
|
1171
1175
|
onHello: (supportsResponses) => {
|
|
1172
1176
|
supportsUserMessageResponses = supportsResponses;
|
|
1173
1177
|
}
|
|
@@ -1189,7 +1193,8 @@ function createClaudeCode(settings = {}) {
|
|
|
1189
1193
|
outboundSchema: outboundMessageSchema,
|
|
1190
1194
|
initialLastSeenEventId: coords.lastSeenEventId,
|
|
1191
1195
|
onDiagnostic,
|
|
1192
|
-
onBridgeError
|
|
1196
|
+
onBridgeError,
|
|
1197
|
+
reconnect: settings.reconnect
|
|
1193
1198
|
});
|
|
1194
1199
|
await attachChannel.open(isContinue ? { resume: true } : void 0);
|
|
1195
1200
|
return createSession({
|
|
@@ -1303,6 +1308,7 @@ function createClaudeCode(settings = {}) {
|
|
|
1303
1308
|
outboundSchema: outboundMessageSchema,
|
|
1304
1309
|
onDiagnostic,
|
|
1305
1310
|
onBridgeError,
|
|
1311
|
+
reconnect: settings.reconnect,
|
|
1306
1312
|
// In replay mode the respawned bridge reloaded the finished turn from
|
|
1307
1313
|
// disk; seed the cursor and resume so it streams the tail (incl.
|
|
1308
1314
|
// `finish`) rather than starting empty.
|
|
@@ -1388,9 +1394,15 @@ function openWebSocketAndWaitForBridgeHello({
|
|
|
1388
1394
|
endpoint,
|
|
1389
1395
|
openTimeoutMs,
|
|
1390
1396
|
getHelloTimeoutMs,
|
|
1397
|
+
abortSignal,
|
|
1391
1398
|
onHello
|
|
1392
1399
|
}) {
|
|
1393
1400
|
return new Promise((resolve2, reject) => {
|
|
1401
|
+
const abortReason = () => abortSignal.reason ?? new Error("WebSocket connection aborted");
|
|
1402
|
+
if (abortSignal.aborted) {
|
|
1403
|
+
reject(abortReason());
|
|
1404
|
+
return;
|
|
1405
|
+
}
|
|
1394
1406
|
const ws = new WebSocket(endpoint.url, {
|
|
1395
1407
|
headers: endpoint.headers == null ? void 0 : { ...endpoint.headers }
|
|
1396
1408
|
});
|
|
@@ -1399,6 +1411,7 @@ function openWebSocketAndWaitForBridgeHello({
|
|
|
1399
1411
|
let settled = false;
|
|
1400
1412
|
let openTimer;
|
|
1401
1413
|
let helloTimer;
|
|
1414
|
+
let onAbort;
|
|
1402
1415
|
const cleanup = ({
|
|
1403
1416
|
keepTerminationListeners = false
|
|
1404
1417
|
} = {}) => {
|
|
@@ -1406,6 +1419,9 @@ function openWebSocketAndWaitForBridgeHello({
|
|
|
1406
1419
|
if (helloTimer) clearTimeout(helloTimer);
|
|
1407
1420
|
ws.off("open", onOpen);
|
|
1408
1421
|
ws.off("message", onMessage);
|
|
1422
|
+
if (onAbort != null) {
|
|
1423
|
+
abortSignal.removeEventListener("abort", onAbort);
|
|
1424
|
+
}
|
|
1409
1425
|
if (!keepTerminationListeners) {
|
|
1410
1426
|
ws.off("close", onClose);
|
|
1411
1427
|
ws.off("error", onError);
|
|
@@ -1474,6 +1490,7 @@ function openWebSocketAndWaitForBridgeHello({
|
|
|
1474
1490
|
cleanup();
|
|
1475
1491
|
};
|
|
1476
1492
|
const onError = (err) => settle(err);
|
|
1493
|
+
onAbort = () => settle(abortReason());
|
|
1477
1494
|
openTimer = setTimeout(
|
|
1478
1495
|
() => settle(new Error(`WebSocket open timed out after ${openTimeoutMs}ms`)),
|
|
1479
1496
|
openTimeoutMs
|
|
@@ -1483,17 +1500,19 @@ function openWebSocketAndWaitForBridgeHello({
|
|
|
1483
1500
|
ws.on("message", onMessage);
|
|
1484
1501
|
ws.on("close", onClose);
|
|
1485
1502
|
ws.on("error", onError);
|
|
1503
|
+
abortSignal.addEventListener("abort", onAbort, { once: true });
|
|
1486
1504
|
});
|
|
1487
1505
|
}
|
|
1488
1506
|
async function openBridgeWebSocket({
|
|
1489
1507
|
endpoint,
|
|
1490
1508
|
timeoutMs,
|
|
1509
|
+
abortSignal,
|
|
1491
1510
|
onHello
|
|
1492
1511
|
}) {
|
|
1493
1512
|
const deadline = Date.now() + timeoutMs;
|
|
1494
1513
|
let attempt = 0;
|
|
1495
1514
|
let lastError;
|
|
1496
|
-
while (Date.now() < deadline) {
|
|
1515
|
+
while (!abortSignal.aborted && Date.now() < deadline) {
|
|
1497
1516
|
attempt++;
|
|
1498
1517
|
try {
|
|
1499
1518
|
const remaining = Math.max(1, deadline - Date.now());
|
|
@@ -1501,15 +1520,25 @@ async function openBridgeWebSocket({
|
|
|
1501
1520
|
endpoint,
|
|
1502
1521
|
openTimeoutMs: Math.min(1e4, remaining),
|
|
1503
1522
|
getHelloTimeoutMs: () => Math.min(5e3, Math.max(1, deadline - Date.now())),
|
|
1523
|
+
abortSignal,
|
|
1504
1524
|
onHello
|
|
1505
1525
|
});
|
|
1506
1526
|
} catch (err) {
|
|
1527
|
+
if (abortSignal.aborted) {
|
|
1528
|
+
throw abortSignal.reason ?? new Error("WebSocket connection aborted");
|
|
1529
|
+
}
|
|
1507
1530
|
lastError = err;
|
|
1508
1531
|
const remaining = deadline - Date.now();
|
|
1509
1532
|
if (remaining <= 0) break;
|
|
1510
|
-
await sleep(
|
|
1533
|
+
await sleep({
|
|
1534
|
+
ms: Math.min(250 * attempt, 1e3, remaining),
|
|
1535
|
+
abortSignal
|
|
1536
|
+
});
|
|
1511
1537
|
}
|
|
1512
1538
|
}
|
|
1539
|
+
if (abortSignal.aborted) {
|
|
1540
|
+
throw abortSignal.reason ?? new Error("WebSocket connection aborted");
|
|
1541
|
+
}
|
|
1513
1542
|
throw new Error(
|
|
1514
1543
|
`claude-code bridge did not complete WebSocket handshake within ${timeoutMs}ms after ${attempt} attempt(s). Last error: ${formatUnknownError(lastError)}`
|
|
1515
1544
|
);
|
|
@@ -1526,12 +1555,6 @@ function webSocketMessageToString(raw) {
|
|
|
1526
1555
|
}
|
|
1527
1556
|
return String(raw);
|
|
1528
1557
|
}
|
|
1529
|
-
function sleep(ms) {
|
|
1530
|
-
return new Promise((resolve2) => {
|
|
1531
|
-
const timer = setTimeout(resolve2, ms);
|
|
1532
|
-
timer.unref?.();
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
1558
|
function formatUnknownError(error) {
|
|
1536
1559
|
if (error instanceof Error) return error.message;
|
|
1537
1560
|
return String(error);
|