Repository navigation
feat: auth owns the auth: shorthand, extension activation errors, body-schema length cap, MCP tool errors and 2025-11-25 (#710, #714, #713, #716, #719) - #726
Merged
Conversation
… without a pattern (#713) request.body.schema string minLength/maxLength were capped at 8192. They now go up to maxRequestBodyBytes (1048576), the largest request body any route admits (request.body.maxBytes defaults to and cannot exceed it), so the subset stays target-independent. A string with a pattern keeps the 128-character maxPatternInputLength cap that bounds regex cost; item bounds are unchanged. A route's smaller maxBytes is not compared with the schema at load time (existing projects pair a small maxBytes with larger lengths); it still answers 413 before validation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
…sult (#716) A tool handler can throw the exported McpToolError to answer isError: true with its own message (truncated to 4096 characters) instead of the fixed generic failure text. Optional data is returned as structuredContent only when the tool declares an outputSchema and the data conforms to it; otherwise it is dropped and onToolError observes the mismatch. onToolCall reports the new outcome 'tool_error'; onToolError is not called for an McpToolError. Any other thrown error keeps the generic message. The error is recognized by a Symbol.for brand as well as instanceof, so a second copy of the package module still counts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
Add 2025-11-25 as the preferred supported revision: initialize echoes it when requested and offers it for an unrecognized one, and the MCP-Protocol-Version header accepts it. Reviewed against the 2025-11-25 changelog, the tools/transport/lifecycle/ basic/resources/prompts pages and schema.ts. One change touches the implemented surface: SEP-1303 classifies input validation failures as tool execution errors. Under a request whose MCP-Protocol-Version is 2025-11-25, tools/call arguments failing the declared inputSchema now answer an isError: true result listing the failed checks; earlier revisions keep the -32602 protocol error. Unknown tools and malformed arguments stay protocol errors. The other additions (icons, tasks, Implementation description, elicitation and sampling changes, authorization discovery, SSE polling) are optional and not implemented; advertised schemas carry no $schema and are valid under the 2020-12 default dialect. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
) Authors still write `auth: true | {...}` exactly as before. Core now keeps only the mapping to policies.extensions.auth (true -> {}, required: false emits nothing) and no longer knows the auth policy vocabulary: RouteAuthConfig and the schema's routeAuth def are reduced to `required` plus open keys. The auth extension's policySchema validates the value through the shared checkExtensionPolicies path, at startup and now also in validateProject (supplied registrations, else the installed urlcode.json) and the static `urlcode validate`. normalizeRouteAuth records which routes used the short form (LoadedDocument.routeAuth), so errors still name the key the author wrote, e.g. `route /api/items, auth.bearer.quota.requests (minimum)`, with pointer /routes/~1api~1items/auth/bearer/quota/requests. Keys beside required: false are still checked. The guidance-claims closed-key rule reads auth's key set from packages/auth/urlcode.json. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
… dev (#714) An error thrown by an extension's activate(), or by core compiling its registration schemas or credential headers, is now a ConfigError named for the extension (Extension "<name>" failed to activate: <message>), with code extension-activation/extension-registration and an extension detail. The message is collapsed to one line and bounded; no stack. It is wrapped in prepareExtensions, so validate, test, dev and serve startup all print it. Request-time answers (AWS/Vercel lazy activation) stay a fixed 500, and other non-ConfigError failures keep the generic text. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
…uthoring text (#716) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
Five decided issues, one commit each.
auth:shorthand's policy shape. Authors writeauth:exactly as before. Core only mapsauth: Xtopolicies.extensions.auth(truemeans{}). The auth field shapes are gone fromRouteAuthConfig(packages/core/src/types.ts) and fromschemas/urlcode.schema.json, whoserouteAuthnow defines onlyrequired.policySchemavalidates the value, through a sharedcheckExtensionPolicies().Invalid extension policy at route /api/items, auth.bearer.quota.requests (minimum): must be >= 1, with pointer/routes/~1api~1items/auth/bearer/quota/requests([Bug]: invalid route auth short form reports 'must be true' instead of the bad field #702 behaviour kept).validateProject: it now checks declared extensions' route policies, using a passed registration or the installed package'surlcode.json, so badauth:values are still refused at validate time.packages/auth/urlcode.json.validate,test,devandservestartup now printExtension "<name>" failed to activate: <message>(codeextension-activation, with anextensiondetail) instead of "Operation failed".host()hook are filed as [Bug]: validate/test/dev still hide host file load and extension host() errors behind "Operation failed" #724.maxLengthwithoutpatternmay go up tomaxRequestBodyBytes(1 MiB), the largest request body any route accepts. Strings with apatternkeep the 128-character regex-input cap.bodySchemaSubset.limits.lengthpublishes the new cap, and HTTP.md, SPECIFICATION.md and the RIM-HTTP-001 card are updated.McpToolError. A tool handler can throwMcpToolError(message, {data?})to returnisError: truewith its own caller-facing message.databecomesstructuredContentonly when it conforms to the tool'soutputSchema.onToolCallreports the new outcome'tool_error'.MCP-Protocol-Version: 2025-11-25,tools/callarguments that failinputSchemareturn anisErrortool result rather than-32602. Older revisions are unchanged.Verification
Run on Node v26.10.0 on the combined branch:
npm run verify:build-addon-manifest --checkbecausepackages/mcp/urlcode.jsonwas stale. It was regenerated withnpm run build:addons(last commit).verify:workspacessteps were re-run and pass:build-addon-manifest --check,audit:packages, andtest:addons(3/3).npm run test:package: exit 0 (the published schema changed).npm run check: exit 0.createRuntimeandvalidateProject, and that core's types and schema name no auth fields.Compatibility and security
Make route policy shorthand extension-defined rather than auth-specific core schema #710: no YAML change. The error prefix for invalid
auth:values changes fromInvalid configuration attoInvalid extension policy at.validateProjectcan now refuse bad extension policies it previously ignored.[Bug]: validate/test hide extension activation errors behind "Operation failed" #714: extension-authored error text appears on operator consoles (validate, test, dev, serve startup), never in HTTP responses.
[Request]: allow a body-schema string maxLength above 8192 so MCP tools can take document-sized arguments #713: more permissive. Schemas that were refused before may now load. The route's
maxBytes(413) is still checked first.[Request]: support MCP protocol revision 2025-11-25 in @jimhoyd/urlcode-mcp #719: clients on 2025-11-25 see input-validation failures as tool errors.
Changes match the documented portable contract; docs/examples are updated where needed.
Relevant tests and package checks pass, or limitations are explained above.
No credentials, customer data or private project material are included.
Runtime/starter changes remain aligned where applicable.
🤖 Generated with Claude Code
https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
Generated by Claude Code