Repository navigation
Conversation
Default managed Claude Desktop registrations to compact input schemas so structured parameter types are advertised without local references. Apply the profile after existing settings so it remains enabled while preserving other environment entries. Refs morluto#3408
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryClaude Desktop setup now defaults
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Saved environment] --> C[Merge environment]
B[Explicit setup values] --> C
C --> D[Validate values]
D --> E{Profile absent?}
E -->|Claude Desktop or Kimi| F[Add compact profile]
E -->|Profile already selected| G[Keep selected profile]
F --> H[Inspect or write registration]
G --> H
Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
|
@morluto Could you approve the pending workflows for this PR? |
# Conflicts: # src/application/SetupClientConfiguration.ts
|
Merged latest |
|
Compared this PR with main The updated docs now record native Claude Desktop 2.37337.1 verification with an array-valued allowed_origins call; this is stronger evidence than the earlier source-only mitigation. This audit did not independently reproduce that session. One contract issue remains in the current diff: registrationEnvironment applies Claude Desktop's compact profile after the validated environment, overriding an explicitly selected full profile, and the new tests expect that overwrite. Preserve a stored or caller-selected profile; use compact as the default only when no choice exists, as the current Kimi path does. Any deliberate migration of an existing explicit choice should be separately presented and approved by the caller. Update the plan text and tests to match that ownership rule, then verify the affected native client alongside canonical MCP validation. PR head reviewed: |
Retain the browser schema type assertions in main's reorganized test. Apply the repository formatter to the upstream AdbProvider expression required by the static gate.
…op-input-schemas # Conflicts: # src/adb/AdbProvider.ts
|
@morluto I've addressed your feedback and updated the PR. Could you please take another look? |
| const registrationEnvironment = | ||
| client.name === "kimi" && | ||
| (client.name === "claude_desktop" || client.name === "kimi") && | ||
| environment.value.REA_MCP_INPUT_SCHEMA_PROFILE === undefined |
There was a problem hiding this comment.
[P2] Preserve explicit Windows profile keys before adding the Desktop default
This raw uppercase lookup treats a stored Windows rea_mcp_input_schema_profile: 'full' as absent. Reproduced through configureClientConfiguration at this head: an existing Claude Desktop env containing only that setting is rewritten as {rea_mcp_input_schema_profile:'full', REA_MCP_INPUT_SCHEMA_PROFILE:'compact'}. The backup succeeds, but the saved registration now has competing aliases.
Before this change, the Windows snapshotEnvironment path (src/main.ts:43 and src/process/snapshotEnvironment.ts) canonicalizes the lowercase key and honors full. For a Node-based Windows host, child_process lexicographically chooses the first case-insensitive env key, so the newly added uppercase compact is the only variant passed to REA (Node contract); later canonicalization cannot recover full. Writer output was reproduced on macOS; native Windows/Claude execution was not run, so that launch consequence is source-derived.
Please resolve effective environment identity and explicit precedence at the shared registration-environment owner before choosing a default, and avoid emitting conflicting case aliases. Add a Windows mixed-case full/compact regression alongside the uppercase explicit-profile tests.
Summary
Fixes #3408.
fullorcompactprofiles; explicit setup values retain precedence over stored values.Problem and expected behavior
Issue #3408 reports that Windows Claude Desktop rejects array/object tool parameters with shared-reference schemas. The owner-reported native Desktop repeat on 2026-10-16 accepted the structured browser parameter calls. Setup now selects that compatible default when no profile is configured. A stored or caller-selected
fullprofile remainsfull, including during registration refresh.Change and scope
clientRegistrationEnvironmentowns validation and merges stored values with explicit setup values.clientConfigurationDesiredaddsREA_MCP_INPUT_SCHEMA_PROFILE=compactfor Claude Desktop or Kimi only when the validated value isundefined. No schema representation, canonical validation, or provider capability changes. The merge from main preserves its reorganized MCP tests and our browser parameter assertions. It also includes a formatter-only change to an upstreamAdbProviderexpression so the repository format gate passes.Contract and boundary impact
SetupClientConfiguration.Expected effects:
Evidence and regression coverage
list_browser_targetsreturned one allowed example.com page target;inspect_web_pageaccepted the same array-valuedallowed_originsand returnedExample Domain.Validation performed
npm run check— passed (typecheck, format, lint, knip, metadata, module boundaries, architecture guards).npm run test:focused -- src/application/Setup.configuration.test.ts src/application/Setup.planning.test.ts tests/boundary/filesystem/claudeDesktopClientConfiguration.test.ts tests/boundary/filesystem/kimiClientConfiguration.test.ts tests/boundary/filesystem/clientConfigurationEnvironment.test.ts tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts— 124 passed, 10 failed. All six Desktop profile cases and all eleven compact MCP tests passed. The same ten failures were reproduced with production files restored to pre-fix5e745d4dc: nine existing Windows path/launcher expectations and one temporary-symlinkEPERM.npm pack --dry-run --json --silent— passed, 1713 packaged entries.npm run verify:package— after syncing main, repository skill verification passed; package archive checking stopped becausepython3resolves to an unavailable Microsoft Store alias (exit 9009). Package functional verification did not complete.npm run verify:package:windows— the last attempt stopped at its prerequisite check: this checkout lacks the builtnative/windows/build/manifest.json.http://127.0.0.1:9222; both calls usedallowed_origins: ["https://example.com"].list_browser_targetsreturned target762A812D03AB96A5A592A00CED8F1912athttps://example.com/(two non-page targets excluded).inspect_web_pagereturned titleExample Domain, 35 DOM nodes and 38 accessibility nodes, with an observation window of 2026-10-16T00:26:28.495Z to 00:26:29.026Z. Policy-filtered details remained omitted (not_approved/disallowed_origin), and activity before attach was outside the observation. This evidence was supplied by the human owner; it was not independently reproduced by this editing agent.check:fast— passed.Compatibility, safety, and release
rea setup --client claude_desktopto add the default when unset. Existing explicit full profiles require an intentional edit to compact and a client restart.Author readiness
Human owner: @YongxinFu
Before merge
type(scope): outcome.