@ai-sdk/harness-claude-code 1.0.149 → 1.0.151
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 +18 -0
- package/dist/bridge/index.mjs +64 -5
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/bridge/package.json +3 -3
- package/dist/bridge/pnpm-lock.yaml +84 -89
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/src/bridge/create-emit-stream-event.ts +96 -9
- package/src/bridge/index.ts +18 -1
- package/src/bridge/package.json +3 -3
- package/src/bridge/pnpm-lock.yaml +84 -89
package/dist/bridge/package.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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.
|
|
9
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
7
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.290",
|
|
8
|
+
"@anthropic-ai/claude-code": "2.1.290",
|
|
9
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
10
10
|
"ws": "8.21.0",
|
|
11
11
|
"zod": "4.4.3"
|
|
12
12
|
}
|
|
@@ -9,14 +9,14 @@ 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.290
|
|
13
|
+
version: 0.3.290(@anthropic-ai/sdk@0.97.1(zod@4.4.3))(@modelcontextprotocol/sdk@1.32.1(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.290
|
|
16
|
+
version: 2.1.290
|
|
17
17
|
'@modelcontextprotocol/sdk':
|
|
18
|
-
specifier: 1.32.
|
|
19
|
-
version: 1.32.
|
|
18
|
+
specifier: 1.32.1
|
|
19
|
+
version: 1.32.1(zod@4.4.3)
|
|
20
20
|
ws:
|
|
21
21
|
specifier: 8.21.0
|
|
22
22
|
version: 8.21.0
|
|
@@ -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.290':
|
|
30
|
+
resolution: {integrity: sha512-Xy1MPSSgCAzbCzT+3w+5+jHo9OIQf90QROyO8UcZNIOyaJ0qKQNRji0SztulGfo3uQsfj07t+qJcvXU+8gWcTw==}
|
|
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.290':
|
|
35
|
+
resolution: {integrity: sha512-ezuHy4rUdC0wmiXWROi2g+6mj2oVXFW0a5JwUNSrgjT5yglEOvoHXSkGXzk7n64vOxQJ/JnKOqUCfO85htchZA==}
|
|
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.290':
|
|
40
|
+
resolution: {integrity: sha512-3sIYs6vhwBoJsiCQBb+3lXIcIeGq8aDOhiyYtSQwOhvMTwAjwuZN6mHjZGeSnGH3hn4CAXi3n3NEK49SSoFilg==}
|
|
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.290':
|
|
46
|
+
resolution: {integrity: sha512-HR3HuBSzYtyhh6AbILvWofuqrnn91bzgEovwDfS+pS99Dp4OpvaAopCEXpirc99dcSJ11Dj1OkEBq7r/4aR2xw==}
|
|
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.290':
|
|
52
|
+
resolution: {integrity: sha512-JRmW03yRKHKZ41T+e4eYzY3lA0pbaJG4PF1GO1cG09Pu8MBPsuWhZZMtP/fsIJ+4vv5dFhdaPmdBPhWgHSMqyw==}
|
|
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.290':
|
|
58
|
+
resolution: {integrity: sha512-q9YflZoDtz/vK9vo28KvnUPvZWqPpXVD8j8RCHepi6zAiOxxJV/3s2URtA3ZQKYSo4zThJ48yrZJnGm8mkGWyA==}
|
|
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.290':
|
|
64
|
+
resolution: {integrity: sha512-oLHI6y0uEkGK31KNEBqNyZGbXqbEFNyWopg/5iB1hW//aQ6OBtuawGiORzTnFAqYUxIU/oHgKx5w6ZMVgrKMnQ==}
|
|
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.290':
|
|
69
|
+
resolution: {integrity: sha512-mXgdB/OaZRAlt4E+cculWgEgmn5wAspzHO63ZfaSOVSuGJVDLBLBnwRDKkjI0cWCwAc17cetmu3TdNap/f0hxA==}
|
|
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.290':
|
|
74
|
+
resolution: {integrity: sha512-Rf2zz1kU3nyK9UCWhlZGYrCUi+0FuNmZFmzflZFKJKajuU+fsQrNht+jeUb2jyTszF/yMGobHhe3HfY4gB41Xg==}
|
|
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.290':
|
|
82
|
+
resolution: {integrity: sha512-Gwf07acohw9mGTBIXeac1PTZKRMRsGoBFtm7OA3TMoLoF/3M2kPojkqdjxEzTVw15lJjA0N1lgZEa8jLWt4odQ==}
|
|
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.290':
|
|
87
|
+
resolution: {integrity: sha512-T7VTeuPrIfK7fjzn37izXxKfru9ZNYiiHSx+8jCZJK5TLCCDPaJAFPjQRhdLtk7adHOJe5PeAK8Rm0d8mcNRFg==}
|
|
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.290':
|
|
92
|
+
resolution: {integrity: sha512-MxA+W79eTB9084PMbRHW1cApY2OXJVBLRZLg+os030mPvOSsO9x300bftgwAk1LqzoJP7zQo4aiDG1xXDfE8jw==}
|
|
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.290':
|
|
98
|
+
resolution: {integrity: sha512-xUcpprHxzKHAfYQeOSWLBEX58FHIpueVWUUSRbYmQQkPSm2C+RzwPYfwvAbdleyV5Bncmor9FmRUCyiq1DwDww==}
|
|
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.290':
|
|
104
|
+
resolution: {integrity: sha512-wUlWlEmpJ0QKBUBNA0139dhChhMg5HLPi/78sZ2dJEJ6ff89qJF5s4LEXP0tLIsUfX/CggX4J4/2prcgueUyYw==}
|
|
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.290':
|
|
110
|
+
resolution: {integrity: sha512-1FQDIO4tXPFyw9wR1icEedIhEmLzOiQBAGR0NgETrXK8M2YbHEDXoE5Gg/LIuIee7giUuX5F2RzLw2N2i++ofQ==}
|
|
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.290':
|
|
116
|
+
resolution: {integrity: sha512-QL2yNLFbj1Jx0nfNI+gKrta7RWNzYHD3OYKChieHmU1V2EJRyTUaYWeOZRHUkHc/tlK7Z/o9v43BQPEwHQmqkQ==}
|
|
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.290':
|
|
121
|
+
resolution: {integrity: sha512-wkjNwUSqEJ0d7TLkxYAjBHGqpVRTKuars/60VzcrTMkaY5iTaMJvNRjagVYx8SKWP+Zd3f5Gh+jAyRPZAl0U+A==}
|
|
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.290':
|
|
126
|
+
resolution: {integrity: sha512-N1VOjg+2Bc0unJztexfNYMTi+XkghzLe1m7Z2vswj6geJAto7mib7FeRbhuSAYHz6lmtWz1XZhLqwT+ugUaxhQ==}
|
|
127
127
|
engines: {node: '>=22.0.0'}
|
|
128
128
|
hasBin: true
|
|
129
129
|
|
|
@@ -146,8 +146,8 @@ packages:
|
|
|
146
146
|
peerDependencies:
|
|
147
147
|
hono: ^4
|
|
148
148
|
|
|
149
|
-
'@modelcontextprotocol/sdk@1.32.
|
|
150
|
-
resolution: {integrity: sha512-
|
|
149
|
+
'@modelcontextprotocol/sdk@1.32.1':
|
|
150
|
+
resolution: {integrity: sha512-2DdE+SJDtzLEEWzY1ZjY7Q+VcPhcV1KisD3zI4u0XZyktsjHum1mwbMI+JaulUBi2OZk+KJAi2uPXzxichPkdw==}
|
|
151
151
|
engines: {node: '>=18'}
|
|
152
152
|
peerDependencies:
|
|
153
153
|
'@cfworker/json-schema': ^4.1.1
|
|
@@ -165,11 +165,6 @@ packages:
|
|
|
165
165
|
|
|
166
166
|
ajv-formats@3.0.1:
|
|
167
167
|
resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}
|
|
168
|
-
peerDependencies:
|
|
169
|
-
ajv: ^8.0.0
|
|
170
|
-
peerDependenciesMeta:
|
|
171
|
-
ajv:
|
|
172
|
-
optional: true
|
|
173
168
|
|
|
174
169
|
ajv@8.20.0:
|
|
175
170
|
resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}
|
|
@@ -540,79 +535,79 @@ packages:
|
|
|
540
535
|
|
|
541
536
|
snapshots:
|
|
542
537
|
|
|
543
|
-
'@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.
|
|
538
|
+
'@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.290':
|
|
544
539
|
optional: true
|
|
545
540
|
|
|
546
|
-
'@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.
|
|
541
|
+
'@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.290':
|
|
547
542
|
optional: true
|
|
548
543
|
|
|
549
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.
|
|
544
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.290':
|
|
550
545
|
optional: true
|
|
551
546
|
|
|
552
|
-
'@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.
|
|
547
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.290':
|
|
553
548
|
optional: true
|
|
554
549
|
|
|
555
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.
|
|
550
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.290':
|
|
556
551
|
optional: true
|
|
557
552
|
|
|
558
|
-
'@anthropic-ai/claude-agent-sdk-linux-x64@0.3.
|
|
553
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64@0.3.290':
|
|
559
554
|
optional: true
|
|
560
555
|
|
|
561
|
-
'@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.
|
|
556
|
+
'@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.290':
|
|
562
557
|
optional: true
|
|
563
558
|
|
|
564
|
-
'@anthropic-ai/claude-agent-sdk-win32-x64@0.3.
|
|
559
|
+
'@anthropic-ai/claude-agent-sdk-win32-x64@0.3.290':
|
|
565
560
|
optional: true
|
|
566
561
|
|
|
567
|
-
'@anthropic-ai/claude-agent-sdk@0.3.
|
|
562
|
+
'@anthropic-ai/claude-agent-sdk@0.3.290(@anthropic-ai/sdk@0.97.1(zod@4.4.3))(@modelcontextprotocol/sdk@1.32.1(zod@4.4.3))(zod@4.4.3)':
|
|
568
563
|
dependencies:
|
|
569
564
|
'@anthropic-ai/sdk': 0.97.1(zod@4.4.3)
|
|
570
|
-
'@modelcontextprotocol/sdk': 1.32.
|
|
565
|
+
'@modelcontextprotocol/sdk': 1.32.1(zod@4.4.3)
|
|
571
566
|
zod: 4.4.3
|
|
572
567
|
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.
|
|
568
|
+
'@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.290
|
|
569
|
+
'@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.290
|
|
570
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.290
|
|
571
|
+
'@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.290
|
|
572
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.290
|
|
573
|
+
'@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.290
|
|
574
|
+
'@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.290
|
|
575
|
+
'@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.290
|
|
576
|
+
|
|
577
|
+
'@anthropic-ai/claude-code-darwin-arm64@2.1.290':
|
|
583
578
|
optional: true
|
|
584
579
|
|
|
585
|
-
'@anthropic-ai/claude-code-darwin-x64@2.1.
|
|
580
|
+
'@anthropic-ai/claude-code-darwin-x64@2.1.290':
|
|
586
581
|
optional: true
|
|
587
582
|
|
|
588
|
-
'@anthropic-ai/claude-code-linux-arm64-musl@2.1.
|
|
583
|
+
'@anthropic-ai/claude-code-linux-arm64-musl@2.1.290':
|
|
589
584
|
optional: true
|
|
590
585
|
|
|
591
|
-
'@anthropic-ai/claude-code-linux-arm64@2.1.
|
|
586
|
+
'@anthropic-ai/claude-code-linux-arm64@2.1.290':
|
|
592
587
|
optional: true
|
|
593
588
|
|
|
594
|
-
'@anthropic-ai/claude-code-linux-x64-musl@2.1.
|
|
589
|
+
'@anthropic-ai/claude-code-linux-x64-musl@2.1.290':
|
|
595
590
|
optional: true
|
|
596
591
|
|
|
597
|
-
'@anthropic-ai/claude-code-linux-x64@2.1.
|
|
592
|
+
'@anthropic-ai/claude-code-linux-x64@2.1.290':
|
|
598
593
|
optional: true
|
|
599
594
|
|
|
600
|
-
'@anthropic-ai/claude-code-win32-arm64@2.1.
|
|
595
|
+
'@anthropic-ai/claude-code-win32-arm64@2.1.290':
|
|
601
596
|
optional: true
|
|
602
597
|
|
|
603
|
-
'@anthropic-ai/claude-code-win32-x64@2.1.
|
|
598
|
+
'@anthropic-ai/claude-code-win32-x64@2.1.290':
|
|
604
599
|
optional: true
|
|
605
600
|
|
|
606
|
-
'@anthropic-ai/claude-code@2.1.
|
|
601
|
+
'@anthropic-ai/claude-code@2.1.290':
|
|
607
602
|
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.
|
|
603
|
+
'@anthropic-ai/claude-code-darwin-arm64': 2.1.290
|
|
604
|
+
'@anthropic-ai/claude-code-darwin-x64': 2.1.290
|
|
605
|
+
'@anthropic-ai/claude-code-linux-arm64': 2.1.290
|
|
606
|
+
'@anthropic-ai/claude-code-linux-arm64-musl': 2.1.290
|
|
607
|
+
'@anthropic-ai/claude-code-linux-x64': 2.1.290
|
|
608
|
+
'@anthropic-ai/claude-code-linux-x64-musl': 2.1.290
|
|
609
|
+
'@anthropic-ai/claude-code-win32-arm64': 2.1.290
|
|
610
|
+
'@anthropic-ai/claude-code-win32-x64': 2.1.290
|
|
616
611
|
|
|
617
612
|
'@anthropic-ai/sdk@0.97.1(zod@4.4.3)':
|
|
618
613
|
dependencies:
|
|
@@ -627,11 +622,11 @@ snapshots:
|
|
|
627
622
|
dependencies:
|
|
628
623
|
hono: 4.13.8
|
|
629
624
|
|
|
630
|
-
'@modelcontextprotocol/sdk@1.32.
|
|
625
|
+
'@modelcontextprotocol/sdk@1.32.1(zod@4.4.3)':
|
|
631
626
|
dependencies:
|
|
632
627
|
'@hono/node-server': 2.1.1(hono@4.13.8)
|
|
633
628
|
ajv: 8.20.0
|
|
634
|
-
ajv-formats: 3.0.1
|
|
629
|
+
ajv-formats: 3.0.1
|
|
635
630
|
content-type: 1.0.5
|
|
636
631
|
cors: 2.8.6
|
|
637
632
|
cross-spawn: 7.0.6
|
|
@@ -656,8 +651,8 @@ snapshots:
|
|
|
656
651
|
mime-types: 3.0.2
|
|
657
652
|
negotiator: 1.1.0
|
|
658
653
|
|
|
659
|
-
ajv-formats@3.0.1
|
|
660
|
-
|
|
654
|
+
ajv-formats@3.0.1:
|
|
655
|
+
dependencies:
|
|
661
656
|
ajv: 8.20.0
|
|
662
657
|
|
|
663
658
|
ajv@8.20.0:
|
package/dist/index.js
CHANGED
|
@@ -307,7 +307,7 @@ const startMessageSchema = harnessV1BridgeStartBaseSchema.extend({
|
|
|
307
307
|
z.discriminatedUnion("type", [startMessageSchema, ...harnessV1BridgeInboundCommandSchemas]);
|
|
308
308
|
//#endregion
|
|
309
309
|
//#region src/version.ts
|
|
310
|
-
const VERSION = "1.0.
|
|
310
|
+
const VERSION = "1.0.151";
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region src/claude-code-harness.ts
|
|
313
313
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/harness-claude-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.151",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ai-sdk/harness": "1.0.
|
|
30
|
-
"@ai-sdk/provider": "4.0.
|
|
31
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
29
|
+
"@ai-sdk/harness": "1.0.147",
|
|
30
|
+
"@ai-sdk/provider": "4.0.26",
|
|
31
|
+
"@ai-sdk/provider-utils": "5.0.58",
|
|
32
32
|
"ws": "^8.21.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"zod": "^3.25.76 || ^4.1.8"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
39
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
38
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.290",
|
|
39
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
40
40
|
"@types/node": "22.19.19",
|
|
41
41
|
"@types/ws": "^8.5.13",
|
|
42
42
|
"@vercel/ai-tsconfig": "0.0.0",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
3
|
|
|
3
4
|
type Emit = (message: Record<string, unknown>) => void;
|
|
4
5
|
|
|
@@ -82,12 +83,18 @@ export type ClaudeStreamEventState = {
|
|
|
82
83
|
pendingResponseUsage: Record<string, unknown> | undefined;
|
|
83
84
|
stepOpen: boolean;
|
|
84
85
|
/*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
86
|
+
* Host-tool calls reported by Claude. The MCP handler normally emits its own
|
|
87
|
+
* `tool-call`/`tool-result` pair, but MCP input validation can reject a call
|
|
88
|
+
* before that handler runs. Retaining the call lets the mapper report that
|
|
89
|
+
* rejected attempt when the corresponding SDK result arrives.
|
|
89
90
|
*/
|
|
90
|
-
|
|
91
|
+
mcpToolCalls: Map<string, { toolName: string; input: unknown }>;
|
|
92
|
+
/*
|
|
93
|
+
* Host-tool calls that reached the MCP handler. These records let the SDK
|
|
94
|
+
* result mapper suppress the duplicate native result. Input-based matching
|
|
95
|
+
* preserves deduplication when Claude omits or changes the tool-use metadata.
|
|
96
|
+
*/
|
|
97
|
+
mcpHandlerCalls: Map<string, { toolName: string; input: unknown }>;
|
|
91
98
|
externalMcpToolUseIds: Set<string>;
|
|
92
99
|
structuredOutputToolUseIds: Set<string>;
|
|
93
100
|
observedTerminalError: string | undefined;
|
|
@@ -109,7 +116,8 @@ export function createClaudeStreamEventState(): ClaudeStreamEventState {
|
|
|
109
116
|
pendingStepUsage: undefined,
|
|
110
117
|
pendingResponseUsage: undefined,
|
|
111
118
|
stepOpen: false,
|
|
112
|
-
|
|
119
|
+
mcpToolCalls: new Map(),
|
|
120
|
+
mcpHandlerCalls: new Map(),
|
|
113
121
|
externalMcpToolUseIds: new Set(),
|
|
114
122
|
structuredOutputToolUseIds: new Set(),
|
|
115
123
|
observedTerminalError: undefined,
|
|
@@ -275,7 +283,10 @@ export function createEmitStreamEvent({
|
|
|
275
283
|
}
|
|
276
284
|
if (block.name.startsWith(HOST_TOOL_PREFIX)) {
|
|
277
285
|
state.pendingStepToolUseIds.add(block.id);
|
|
278
|
-
state.
|
|
286
|
+
state.mcpToolCalls.set(block.id, {
|
|
287
|
+
toolName: block.name.slice(HOST_TOOL_PREFIX.length),
|
|
288
|
+
input: block.input ?? {},
|
|
289
|
+
});
|
|
279
290
|
opensStep = true;
|
|
280
291
|
continue;
|
|
281
292
|
}
|
|
@@ -328,9 +339,44 @@ export function createEmitStreamEvent({
|
|
|
328
339
|
if (state.structuredOutputToolUseIds.delete(block.tool_use_id)) {
|
|
329
340
|
continue;
|
|
330
341
|
}
|
|
331
|
-
|
|
332
|
-
|
|
342
|
+
const mcpToolCall = state.mcpToolCalls.get(block.tool_use_id);
|
|
343
|
+
if (mcpToolCall != null) {
|
|
344
|
+
const handlerReportedCall = takeMcpHandlerCall({
|
|
345
|
+
state,
|
|
346
|
+
toolCallId: block.tool_use_id,
|
|
347
|
+
toolCall: mcpToolCall,
|
|
348
|
+
});
|
|
349
|
+
state.mcpToolCalls.delete(block.tool_use_id);
|
|
333
350
|
state.pendingStepToolUseIds.delete(block.tool_use_id);
|
|
351
|
+
if (handlerReportedCall) {
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const isError = !!block.is_error;
|
|
356
|
+
const result =
|
|
357
|
+
toolUseResult !== undefined
|
|
358
|
+
? toolUseResult
|
|
359
|
+
: resolveToolResult({
|
|
360
|
+
toolName: mcpToolCall.toolName,
|
|
361
|
+
dynamic: false,
|
|
362
|
+
isError,
|
|
363
|
+
rawContent: block.content,
|
|
364
|
+
});
|
|
365
|
+
emit({
|
|
366
|
+
type: 'tool-call',
|
|
367
|
+
toolCallId: block.tool_use_id,
|
|
368
|
+
toolName: mcpToolCall.toolName,
|
|
369
|
+
input: JSON.stringify(mcpToolCall.input),
|
|
370
|
+
// MCP rejected this call before asking the host to execute it.
|
|
371
|
+
providerExecuted: true,
|
|
372
|
+
});
|
|
373
|
+
emit({
|
|
374
|
+
type: 'tool-result',
|
|
375
|
+
toolCallId: block.tool_use_id,
|
|
376
|
+
toolName: mcpToolCall.toolName,
|
|
377
|
+
result,
|
|
378
|
+
isError,
|
|
379
|
+
});
|
|
334
380
|
continue;
|
|
335
381
|
}
|
|
336
382
|
state.approvalRequestedToolUseIds.delete(block.tool_use_id);
|
|
@@ -365,6 +411,47 @@ export function createEmitStreamEvent({
|
|
|
365
411
|
};
|
|
366
412
|
}
|
|
367
413
|
|
|
414
|
+
function takeMcpHandlerCall({
|
|
415
|
+
state,
|
|
416
|
+
toolCallId,
|
|
417
|
+
toolCall,
|
|
418
|
+
}: {
|
|
419
|
+
state: ClaudeStreamEventState;
|
|
420
|
+
toolCallId: string;
|
|
421
|
+
toolCall: { toolName: string; input: unknown };
|
|
422
|
+
}): boolean {
|
|
423
|
+
if (state.mcpHandlerCalls.delete(toolCallId)) {
|
|
424
|
+
return true;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
for (const [handlerCallId, handlerCall] of state.mcpHandlerCalls) {
|
|
428
|
+
if (
|
|
429
|
+
handlerCall.toolName === toolCall.toolName &&
|
|
430
|
+
isDeepStrictEqual(handlerCall.input, toolCall.input)
|
|
431
|
+
) {
|
|
432
|
+
state.mcpHandlerCalls.delete(handlerCallId);
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const matchingHandlerCallIds = Array.from(state.mcpHandlerCalls)
|
|
438
|
+
.filter(([, handlerCall]) => handlerCall.toolName === toolCall.toolName)
|
|
439
|
+
.map(([handlerCallId]) => handlerCallId);
|
|
440
|
+
const matchingToolCallCount = Array.from(state.mcpToolCalls.values()).filter(
|
|
441
|
+
pendingCall => pendingCall.toolName === toolCall.toolName,
|
|
442
|
+
).length;
|
|
443
|
+
|
|
444
|
+
if (
|
|
445
|
+
matchingHandlerCallIds.length > 0 &&
|
|
446
|
+
matchingHandlerCallIds.length === matchingToolCallCount
|
|
447
|
+
) {
|
|
448
|
+
state.mcpHandlerCalls.delete(matchingHandlerCallIds[0]);
|
|
449
|
+
return true;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
|
|
368
455
|
export function finishApprovalStep({
|
|
369
456
|
state,
|
|
370
457
|
emit,
|
package/src/bridge/index.ts
CHANGED
|
@@ -415,6 +415,10 @@ async function runTurn(start: StartMessage, turn: BridgeTurn): Promise<void> {
|
|
|
415
415
|
typeof metadataToolCallId === 'string'
|
|
416
416
|
? metadataToolCallId
|
|
417
417
|
: randomUUID();
|
|
418
|
+
streamEventState.mcpHandlerCalls.set(toolCallId, {
|
|
419
|
+
toolName: tool.name,
|
|
420
|
+
input,
|
|
421
|
+
});
|
|
418
422
|
emit({
|
|
419
423
|
type: 'tool-call',
|
|
420
424
|
toolCallId,
|
|
@@ -447,7 +451,20 @@ async function runTurn(start: StartMessage, turn: BridgeTurn): Promise<void> {
|
|
|
447
451
|
// Compaction observation: merge Claude's `compact_boundary` message and
|
|
448
452
|
// `PostCompact` hook (which arrive in either order) into one `compaction`
|
|
449
453
|
// event. See `createCompactionLatch`.
|
|
450
|
-
const compaction = createCompactionLatch(event =>
|
|
454
|
+
const compaction = createCompactionLatch(event => {
|
|
455
|
+
const hasOpenStep = streamEventState.stepOpen;
|
|
456
|
+
emit(event);
|
|
457
|
+
// The harness translates compaction into synthetic step content. When
|
|
458
|
+
// Claude reports it outside a model step, close that synthetic step here;
|
|
459
|
+
// otherwise the existing model step will close it with its own usage.
|
|
460
|
+
if (!hasOpenStep) {
|
|
461
|
+
emitFinishStep({
|
|
462
|
+
state: streamEventState,
|
|
463
|
+
emit,
|
|
464
|
+
usage: undefined,
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
});
|
|
451
468
|
|
|
452
469
|
// `stream-start` is emitted lazily on the first SDK message (below) so it can
|
|
453
470
|
// carry the model the CLI resolved to, reported on the `system`/`init` message.
|
package/src/bridge/package.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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.
|
|
9
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
7
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.290",
|
|
8
|
+
"@anthropic-ai/claude-code": "2.1.290",
|
|
9
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
10
10
|
"ws": "8.21.0",
|
|
11
11
|
"zod": "4.4.3"
|
|
12
12
|
}
|