You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): reject malformed lws:// percent-sequences + single surface registry
Review fixesJavaScriptSolidServer#4 and JavaScriptSolidServer#11:
- JavaScriptSolidServer#4: parseUri validates decodeURIComponent up front and returns null on a
malformed '%', so resources/read yields invalid-params instead of a raw
URIError surfacing as -32603 INTERNAL_ERROR. Raw path kept (storage decodes).
- JavaScriptSolidServer#11: new src/mcp/surface.js is the single declarative registry; uri.js parse
sets and resources.js advertisement + dispatch derive from it. Guard test
asserts parse/dispatch/advertisement stay in lockstep.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
// --- template + fixed advertisement (derived from the surface registry) ------
21
22
22
23
exportfunctionlistResourceTemplates(){
23
-
return[
24
-
{uriTemplate: 'lws://resource/{+path}',name: 'resource',description: 'A resource body (any content type), enveloped as untrusted data.',mimeType: 'text/plain'},
25
-
{uriTemplate: 'lws://container/{+path}',name: 'container',description: 'A container listing (ldp:contains children).',mimeType: 'application/json'},
0 commit comments