Commit d492a6c
committed
fix(client): derive auto-open listen filter from configured ∩ server-advertised
`_connectNegotiated` now computes `effective = configured ∩ serverAdvertised`
ONCE after discover and uses that single value for BOTH
`_setupListChangedHandlers` and the auto-open `subscriptions/listen` filter.
A configured-but-not-advertised type (e.g. tools configured but the server
doesn't advertise tools.listChanged) is neither subscribed to nor handled,
so the filter and the registered handlers stay in lockstep. When the
intersection is empty, auto-open is skipped entirely.
(Squash-carried: TS narrow-cast on the synchronous-termination unpark
guard — control-flow narrowing does not track closure mutation.)1 parent 1d9a4c6 commit d492a6c
2 files changed
Lines changed: 46 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | | - | |
866 | 865 | | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
867 | 877 | | |
868 | | - | |
869 | | - | |
870 | | - | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
871 | 881 | | |
872 | 882 | | |
873 | 883 | | |
| |||
1354 | 1364 | | |
1355 | 1365 | | |
1356 | 1366 | | |
1357 | | - | |
1358 | | - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1359 | 1370 | | |
1360 | 1371 | | |
1361 | 1372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
291 | 320 | | |
292 | 321 | | |
293 | 322 | | |
| |||
0 commit comments