Commit a6d45ea
authored
fix(local-mcp): match the sandbox's null-id notification check, reuse sanitizeHeaders
The desktop relay executor only treated payload.id === undefined as a
fire-and-forget notification, but the sandbox's McpRelayServer treats
undefined or null as a notification. An id: null message ran as a real
request against the user's local server and its response was rejected as
an orphaned mcp_response. Aligned both checks.
Also dropped sanitizeStringRecord, a byte-for-byte copy of mcp-config.ts's
sanitizeHeaders that this file already imports from — exported and reused it
instead of maintaining two copies of the same header/env sanitizer.1 parent c90fcca commit a6d45ea
3 files changed
Lines changed: 24 additions & 15 deletions
File tree
- packages
- agent/src/adapters/claude/session
- workspace-server/src/services/mcp-relay
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | 201 | | |
| |||
Lines changed: 6 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 43 | | |
53 | 44 | | |
54 | 45 | | |
| |||
120 | 111 | | |
121 | 112 | | |
122 | 113 | | |
123 | | - | |
| 114 | + | |
124 | 115 | | |
| 116 | + | |
125 | 117 | | |
126 | 118 | | |
127 | 119 | | |
| |||
161 | 153 | | |
162 | 154 | | |
163 | 155 | | |
164 | | - | |
| 156 | + | |
165 | 157 | | |
166 | 158 | | |
167 | 159 | | |
| |||
170 | 162 | | |
171 | 163 | | |
172 | 164 | | |
173 | | - | |
| 165 | + | |
174 | 166 | | |
175 | 167 | | |
176 | 168 | | |
| |||
293 | 285 | | |
294 | 286 | | |
295 | 287 | | |
296 | | - | |
| 288 | + | |
297 | 289 | | |
298 | 290 | | |
299 | 291 | | |
| |||
0 commit comments