fix: duplicate any listed resource URI, not only a registered one
Copilot on #2281: the option's contract said an unregistered URI is ignored, but `withDuplicateResources` runs on the assembled list, which also carries whatever a resource template's `list` callback contributed — so a template-listed URI was duplicated in contradiction of its own doc. Broadened rather than restricted, because scoping it to `registeredResources` would leave half the surface unreproducible: both kinds of entry land in the same Resources sidebar list and collide on the same React key. The contract now says so on `ServerConfig.duplicateResourceUris` and on the config-file mirror, and an integration case covers a template-listed URI — it fails if the override is narrowed to `state.registeredResources`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yVgAJz4wpkS4mkGk7DQnp Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
3153f0305a
commit
339c5f4e27
1 changed files with 40 additions and 7 deletions
|
|
@ -93,8 +93,9 @@ export interface ConfigFile {
|
|||
*/
|
||||
duplicateToolNames?: string[];
|
||||
/**
|
||||
* URIs of registered resources to emit **twice** in `resources/list` (same
|
||||
* `uri`, the second's title marked "(duplicate)"). See
|
||||
* URIs to emit **twice** in `resources/list` (same `uri`, the second's title
|
||||
* marked "(duplicate)") — matched against the assembled list, so a
|
||||
* template-listed URI counts as well as a statically-registered one. See
|
||||
* {@link ServerConfig.duplicateResourceUris} (#2206).
|
||||
*/
|
||||
duplicateResourceUris?: string[];
|
||||
|
|
|
|||
Loading…
Reference in a new issue