lsp-custom-requests
Installation
SKILL.md
LSP Custom Requests — URI Wire Format
Why it breaks
Connection.sendRequest(method, params)runsJSON.stringify(params).vscode-uriUri.toJSON()returnsUriComponents(plain data). See microsoft/vscode-uri src/uri.ts.- Receiver gets a plain object — no prototype, no
toString/fsPath. uri.toString()→"[object Object]"→fs.stat/readFilefails withEntryNotFound.
Rules
- Never call
.toString()/.fsPathon a URI received over the wire without rehydrating first. - Type URI params as
UriComponents(derived); revive on receive.
Pattern — UriComponents + revive
Params type derived from URI.toJSON: