Skip to content

Connect: show native and additional client routes - #2849

Merged
mickdarling merged 14 commits into
betafrom
codex/connect-catalog-integration-preview
Sep 26, 2026
Merged

mickdarling merged 14 commits into
betafrom
codex/connect-catalog-integration-preview

Conversation

@mickdarling

@mickdarling mickdarling commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

The native and additional client catalogs now appear in the Connect page's searchable selector. Users can browse 40 client surfaces and choose each documented route. Availability limits stay visible for clients whose OAuth or native import flow still needs qualification, and unsupported personal Copilot and Google AI Studio surfaces show guidance without a setup action.

This change wires the two catalog modules into the existing validated connection profile, allows only their official documentation hosts and supported native links, and shows the generic OAuth note only on core routes. Kiro IDE and LM Studio import links receive the same action styling as the existing VS Code and Cursor links.

The UI test selects all 40 clients and every route, checks rendered links, verifies native payload regeneration after a name change, and confirms unsupported surfaces have no copyable setup payload. Validation: 62 focused Connect tests, targeted ESLint, and the production build pass locally. The resulting full Git tree exactly matches the already reviewed combined catalog snapshot (59de2f6bfdda9823217a48880d1b99e7587a0fe5).

Client-specific OAuth and tool-call qualification remains open where noted in the catalog. Part of #2809.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T21:21:54.341231Z 8061a52 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mickdarling's task —— View job


Reviewed commit: f244c2b0cbca5041aa3f3e0b674d574536ab3446

Note: The git rev-parse HEAD command requires approval in this environment. Based on the PR metadata, the branch tip is f244c2b0 (the most recent commit listed: "docs(connect): link Cowork connector setup guide"). The review below covers all files at that SHA.

Tasks

  • Verify HEAD commit SHA
  • Read catalog data files
  • Review connect.js changes
  • Review CSS changes
  • Review test files
  • Post final review

Code Review

Overall this is a well-structured, carefully defensive addition. The validation layering, allowlist approach, and test coverage are solid. A few observations below, ranging from substantive to minor.


Security

Input validation – strong. The chain validateHostedMcpEndpoint → hostedConnectionProfile → connectionArtifacts / nativeLinkArtifacts validates endpoint and name before any link or config is generated. The quote/backslash/control-character check in unsafeEndpointText (connect-config.js:50) closes the obvious shell-injection vectors in generated CLI commands. Tests exercise rejected forms explicitly (ConnectNativeClients.test.ts:52-62).

URL allowlist – good but relies on correct string-prefix matching for native schemes.
safeSetupHref (connect.js:257-265) uses .startsWith() for the three native schemes. This is safe today because each prefix is very long and highly specific (e.g. cursor://anysphere.cursor-deeplink/mcp/install?). Worth a comment noting that truncated values like cursor://anysphere.cursor-deeplink/mcp/install (no trailing ?) would be silently accepted or rejected—currently they would be accepted since .startsWith('cursor://anysphere.cursor-deeplink/mcp/install?') would be false for a link missing the ?, but the string check is tight enough to be correct. One minor concern: the lmstudio://add_mcp? prefix would accept lmstudio://add_mcp?arbitrary=payload constructed outside nativeLinkArtifacts. Since links only come from nativeLinkArtifacts and the result is frozen, this is a safe assumption, but it's implicit. A comment like // links are produced by nativeLinkArtifacts; the prefix check guards against stray hrefs would surface this.

base64Json in connect-native-config.js:6-8. The comment "hostedConnectionProfile limits the dynamic values to canonical URL ASCII and an ASCII name" is accurate and the constraint is enforced before this function is reached. Good.

gooseLink and cherryStudioLink are generated but not exposed as native install links in the UI (Goose and Cherry Studio only have manual routes at present). These links are encoded but unused in the current UI, which is the correct conservative stance per the qualification docs. The native config test (ConnectNativeClients.test.ts:22-49) still round-trips them.


Correctness / Potential Bugs

renderSetup re-renders the client list only on the first call after endpoint discovery (connect.js:157-160). The guard if (!catalogReady) { renderClientList(clients); catalogReady = true; } means a name change after catalogReady is set will not re-render the list. The list buttons are only labels/route switchers and don't contain endpoint-dependent data, so this is intentional and correct. The pattern is subtle enough to trip up a future editor—a brief comment would help.

additionalConnectionClients revalidates by extracting origin from the profile endpoint (connect-extra-clients.js:13-16). This means the origin used for hostedConnectionProfile inside the function is derived from the endpoint URL itself, not from globalThis.location.origin. This is safe because hostedConnectionProfile requires the endpoint's origin to match the supplied pageOrigin. Since the function passes origin derived from the endpoint, the canonical check safe.endpoint !== profile.endpoint catches any non-canonical form. However, this differs from how nativeConnectionClients works (which accepts an explicit pageOrigin parameter). The two paths are logically equivalent given the validation, but the inconsistency is a minor readability concern.

Search filter (connect.js:193-194) uses button.textContent which concatenates strong + span (client label + summary). This means a search for "code" matches both "Claude Code" and any summary containing "code". This is probably desirable, but it's worth noting since summary text is user-facing.


Architecture / Code Quality

Descriptor helper factories (connect-extra-common.js). The s/r/c one-letter helpers reduce repetition well, but the single-letter names make the catalog files harder to scan. The JSDoc at the top of each file helps, but inline IDE hover won't be informative. Consider whether step/route/client (or named-export aliases) are feasible without meaningful size cost.

renderClientList is called twice on the happy path: once in bindStaticActions with empty/placeholder artifacts (line 83-88), and again inside renderSetup when catalogReady is false (line 157-160). The first call renders 7 core clients (from coreConnectionClients with empty artifacts). After endpoint load, renderSetup replaces with the full 40-client list. This two-phase approach keeps the picker interactive while the endpoint fetches, which is good UX. The slight wrinkle is that the placeholder coreConnectionClients call in bindStaticActions uses hardcoded link prefixes (vscode:mcp/install?, cursor://anysphere.cursor-deeplink/mcp/install?) to satisfy the renderer without a real endpoint. These will briefly render as non-functional links before being replaced, which is acceptable but worth documenting.

connect-extra-developer.js:18 – OpenClaw command string.

`openclaw mcp set ${name} '${JSON.stringify({ url, transport: 'streamable-http', auth: 'oauth' })}'`

This embeds a JSON object with single quotes around it in a shell command. Since name and url are validated (no single quotes allowed by unsafeEndpointText), this is safe. But the JSON value itself from JSON.stringify could contain characters like " (fine in single-quoted shells) but also, pathologically, ' if any key or value were to contain one. Since all keys are static strings and the URL is validated, this is not currently exploitable—but it's worth a comment.

connect-extra-developer.js:12 – Hermes YAML string.

`mcp_servers:\n  ${name}:\n    url: ${JSON.stringify(url)}\n    auth: oauth`

JSON.stringify(url) produces a JSON string (double-quoted), which is valid YAML scalar syntax. This is fine, though slightly unconventional for YAML copy-paste. A user editing this by hand might not expect JSON quoting, but it is unambiguous and safe.


Test Coverage

Coverage is thorough:

  • ConnectUi.test.ts:316-335 iterates all 40 clients and every route, checking that all rendered links pass safeSetupHref. This is an excellent integration guard.
  • ConnectUi.test.ts:337-346 verifies that unsupported clients show no copyable value or connection note.
  • ConnectNativeClients.test.ts:52-62 exercises rejection of malformed inputs before any link is produced.
  • ConnectExtraClients.test.ts:70-81 tests forged profile rejection.

One gap: connect-extra-developer.js and connect-extra-apps.js are tested primarily through the end-to-end ConnectUi test and the structural ConnectExtraClients test. The schema-specific assertions in ConnectExtraClients.test.ts:39-51 cover Hermes, OpenCode, Junie, Antigravity, and OpenClaw well. The app clients (Cline, Roo Code, JetBrains AI Assistant, etc.) have no schema-specific assertions beyond the structural loop—this is acceptable given the simpler payload shape (just endpoint copies), but noting it for completeness.


Minor / Nits

  • connect-extra-apps.js:19 – The Windsurf note "The original Windsurf guide now redirects to Devin documentation" may become stale if the redirect changes. A static note is fine, but it will need future maintenance.
  • connect-extra-platforms.js:39 – www.antigravity.google is in OFFICIAL_SETUP_HOSTS. If Google's Antigravity product doesn't publicly ship, this entry may need removal. Low risk since the allowlist only enables rendering, but worth tracking.
  • connect.css – The new .connect-client-panel a.btn-primary color rules (connect.css:49-52) are repeated across :visited, :hover, :focus to override browser defaults. This is correct; no issues.
  • The kiro.dev docs URL in connect-native-clients.js:28 (https://kiro.dev/docs/mcp/servers/) differs from the docs link in hosted-native-client-qualification.md (same URL), which is consistent.

Summary

This is a carefully implemented catalog expansion with layered endpoint and name validation, an explicit URL allowlist enforced at render time, well-considered availability limits for unsupported surfaces, and a comprehensive test suite. The main areas to consider before merge:

  1. Add a comment on the !catalogReady guard in renderSetup to prevent accidental removal.
  2. Add a comment on the native-scheme prefix logic in safeSetupHref noting that links are only produced by nativeLinkArtifacts.
  3. Consider renaming s/r/c helpers or adding inline aliases for readability in larger catalog files.

None of these are blockers. The security controls are sound, the test coverage is thorough, and the availability qualification language is appropriately conservative.

@mickdarling

Copy link
Copy Markdown
Member Author

@codex review

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T20:37:26.160Z
Duration: 7469ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@mickdarling

Copy link
Copy Markdown
Member Author

@codex review

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T20:40:05.498Z
Duration: 7317ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


Reviewed commit: 80b04cd7ca8608805508ce37192b555d885c23e3

Tasks

  • Verify HEAD commit SHA
  • Read CLAUDE.md for repo guidelines
  • Read all changed files
  • Post final review

Working on review...

View job

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T20:40:54.428Z
Duration: 6318ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 80b04cd7ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mickdarling's task —— View job


Reviewed commit: 0ebc805b032017cede2b68688cc1db7950533fcc

Tasks

  • Verify HEAD commit SHA
  • Read CLAUDE.md for repo guidelines
  • Read all changed files
  • Post final review

Code Review

This PR is a well-executed catalog expansion. The security layering is sound, the test coverage is thorough, and the conservative availability labeling for unverified OAuth surfaces is appropriate. Below are findings from most- to least-critical.


Correctness / Potential Bugs

catalogReady guard prevents late re-renders (connect.js:157-160)

if (!catalogReady) {
  renderClientList(clients);
  catalogReady = true;
}

Once the endpoint resolves and the full 40-client list is rendered, a subsequent name change will re-run renderSetup and update the panel for the selected client, but will not re-render the client list buttons. That's intentional — the list buttons contain no endpoint-dependent data — but it's an easy pattern to misread as a bug. A brief comment noting the intent would prevent accidental removal by a future editor.

additionalConnectionClients derives origin from the supplied profile (connect-extra-clients.js:14)

const safe = hostedConnectionProfile(profile.endpoint, pageOrigin, profile.connectionName);
if (safe.endpoint !== profile.endpoint) throw new Error('A canonical hosted MCP endpoint is required.');

This revalidates correctly, and the canonical check catches non-normalized forms. However, the approach differs from nativeConnectionClients, which takes an explicit pageOrigin parameter and passes it directly to hostedConnectionProfile. The two paths are logically equivalent given the validation, but the inconsistency is a minor readability concern — a caller skimming either function might not immediately see that both perform equivalent origin checks.

init resets catalogReady on each call (connect.js:41)

catalogReady = false;

This is correct — re-initializing the panel (e.g. on navigation) needs a fresh render. Worth noting because it pairs with the guard above: the module-level catalogReady is shared state and is only meaningful within a single init lifecycle.


Security

URL allowlist is correct, but the native-scheme prefix relies on implicit assumptions (connect.js:258-260)

if (href.startsWith('cursor://anysphere.cursor-deeplink/mcp/install?')
  || href.startsWith('vscode:mcp/install?')
  || href.startsWith('lmstudio://add_mcp?')) return true;

This is safe in practice because href values only enter safeSetupHref through safeLink, which is called with data produced by nativeLinkArtifacts (a frozen object) or catalog docsUrl fields (static strings). However, the function signature accepts any string, so the safety guarantee is implicit. A comment like // Links come only from nativeLinkArtifacts (frozen) or static catalog fields; prefix check guards stray hrefs would make this explicit.

base64Json and shell-embedded strings are correctly constrained (connect-native-config.js:5-7, connect-extra-developer.js:12,18)

The hostedConnectionProfile validation rejects quotes, backslashes, control characters, and non-ASCII before these code paths are reached. The YAML and shell-embedded JSON in connect-extra-developer.js are safe for the same reason. Confirmed by ConnectNativeClients.test.ts:52-62 which exercises rejection of malformed inputs.

connect-extra-apps.js:19 — Windsurf note may become stale

s('Qualify current client', 'The original Windsurf guide now redirects to Devin documentation...')

Static availability text is fine, but this note describes a current redirect that may change. Low maintenance risk; noting for awareness.


Architecture / Code Quality

connect-extra-common.js single-letter helpers (s/r/c)

export const s = (title, text, extras = {}) => ({ title, text, ...extras });
export const r = (id, label, steps) => ({ id, label, steps });
export const c = (id, label, group, summary, docsUrl, routes, availability) => ...

These reduce repetition in the catalog files effectively. The JSDoc comment at the top of each catalog file helps, but a reader jumping directly to a call site (e.g. c('hermes', 'Hermes Agent', 'Agents & editors', ...)) must know that c is a client descriptor factory. Renaming to step/route/client or adding named-export aliases would make call sites self-documenting, though the current approach is consistent across the catalog.

Two-phase renderClientList approach is sound UX but subtly couples bindStaticActions with placeholder artifacts

bindStaticActions (line 83-88) calls renderClientList with hardcoded link prefixes to give users a responsive picker before the endpoint loads. After endpoint discovery, renderSetup replaces the list with real artifacts. The placeholder vscodeLink/cursorLink values will produce non-functional links briefly, which is acceptable. This behavior and its intentionality are not documented in the code, making the bindStaticActions call look like a premature full render.

connect-extra-apps.js uses a specs array with spread into c()

return specs.map(spec => c(...spec));

This works but loses parameter names at the call site and type-checks only at the c function signature. If a future catalog entry omits or reorders arguments, the error would surface at runtime rather than from a linter or type checker. The connect-extra-developer.js approach of calling c(...) directly is no different in this regard, but is more readable.


Test Coverage

Test coverage is strong:

  • ConnectUi.test.ts:316-335 — iterates all 40 clients and every route, asserts every rendered href passes safeSetupHref. This is the right integration guard.
  • ConnectUi.test.ts:337-346 — verifies unsupported clients show no copyable value or connection note.
  • ConnectNativeClients.test.ts:52-62 — rejects malformed inputs before link production.
  • ConnectExtraClients.test.ts:71-84 — forged profile rejection covers the full threat surface.

One gap: the connect-extra-apps.js app clients (Cline, Roo Code, Continue, Windsurf, LibreChat, Open WebUI, Perplexity, JetBrains AI Assistant) are validated only through the structural loop in ConnectExtraClients.test.ts:17-38 and the end-to-end UI test. None have schema-specific assertions equivalent to the Hermes/OpenCode/Junie/Antigravity/OpenClaw checks in ConnectExtraClients.test.ts:40-52. Given that all eight app clients currently emit only an endpoint copy (no bespoke schema), the gap is low-risk — but if any are later updated to emit a client-specific format, tests won't catch a schema regression.


Minor / Nits

  • connect-extra-platforms.js:39 — www.antigravity.google is in OFFICIAL_SETUP_HOSTS (connect.js:273). If the product doesn't publicly ship, this entry may need removal. The allowlist only enables rendering, so the risk is bounded, but worth tracking.
  • connect-native-clients.js:75 — Cherry Studio docsUrl points to a source file in the repo (...mcpProtocolInstall.ts), not a docs page. This is the best available reference, but users clicking the docs link will land on raw TypeScript source rather than user documentation.
  • connect.css:49-52 — The btn-primary color overrides for :visited/:hover/:focus are correct and necessary to override browser defaults for anchor-styled buttons.
  • The kiro.dev docs URL in connect-native-clients.js:28 is consistent with the qualification docs. No issues.

Summary

This is a well-structured, defensive expansion. The key areas to address before merge:

  1. Comment the !catalogReady guard (connect.js:157) to prevent accidental future removal.
  2. Comment the native-scheme prefix logic in safeSetupHref (connect.js:258) noting that links are produced by nativeLinkArtifacts or static catalog fields.
  3. Consider schema-specific tests for app clients in ConnectExtraClients.test.ts to catch format regressions if any app entry is later updated.

None of these are blockers. Security controls are sound, the 57-test suite exercises the full client catalog end-to-end, and the availability qualification language is appropriately conservative.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T20:42:37.862Z
Duration: 7574ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mickdarling's task —— View job


Reviewed commit: 7576a81cdfeca94c38bdbbadb640b50b3f591573

Tasks

  • Verify HEAD commit SHA
  • Read CLAUDE.md for repo guidelines
  • Read changed files
  • Post final review

Code Review

This is a well-executed catalog expansion with layered validation, conservative availability labeling, and solid test coverage. Findings below from most to least important.


Correctness / Potential Bugs

catalogReady guard is correct but fragile for future editors (connect.js:157-160)

if (!catalogReady) {
  renderClientList(clients);
  catalogReady = true;
}

After the first endpoint resolution, name-change calls to renderSetup will update the client panel but not re-render the client list. This is intentional—list buttons contain no endpoint-dependent data—but no comment indicates the intent. A future editor could read this as a latent bug and "fix" it into a real bug (excessive re-renders resetting button state). One line of comment would prevent this.

additionalConnectionClients validates via profile re-derivation; nativeConnectionClients takes an explicit pageOrigin (connect-extra-clients.js:14, connect-native-clients.js:15-16)

Both paths are logically equivalent given the canonical-form check, but the two validation styles are inconsistent. additionalConnectionClients derives the canonical form from the profile's own endpoint (hostedConnectionProfile(profile.endpoint, pageOrigin, …)) then compares safe.endpoint !== profile.endpoint. This is sound. The inconsistency is a minor readability concern for callers skimming both functions.

kiroLink is generated as an https:// URL but is also accepted by the native-scheme prefix block (connect.js:258-265, connect-native-config.js:20)

kiroLink goes through the HTTPS host-allowlist path (kiro.dev is in OFFICIAL_SETUP_HOSTS), not the native-scheme prefix path. This is correct, but it means the three native-scheme prefixes only guard lmstudio://add_mcp?, cursor://…, and vscode:mcp/install?. The gooseLink and cherryStudioLink values are generated but never used as rendered href values, so safeSetupHref will never be called on them—which is the right conservative stance. Worth a comment noting that unused native links are intentionally withheld.


Security

safeSetupHref native-scheme prefix relies on implicit link provenance (connect.js:258-260)

The function accepts any string, but the safety guarantee rests on links only arriving from nativeLinkArtifacts (a frozen object) or static catalog fields. There is no per-call check preventing a stray href value from elsewhere in a future refactor from bypassing the host-allowlist and entering via a native-scheme prefix. A brief comment noting that href values are produced exclusively by nativeLinkArtifacts or static catalog properties would make this explicit.

Shell-embedded JSON in developer client commands is safe, but subtly (connect-extra-developer.js:18, 29)

`openclaw mcp set ${name} '${JSON.stringify({ url, transport: 'streamable-http', auth: 'oauth' })}'`
`copilot mcp add --transport http ${name} '${url}'`

Single-quote shell injection is prevented because hostedConnectionProfile rejects single quotes before this point. However, the constraint is enforced earlier in the call chain, not at the template literal itself. A reader auditing this file in isolation could miss the upstream guard. A comment like // name and url are validated by hostedConnectionProfile; no single quotes permitted at the template literal would make the safety invariant visible.

base64Json comment is accurate and sufficient (connect-native-config.js:5-7)

The existing comment "hostedConnectionProfile limits the dynamic values to canonical URL ASCII and an ASCII name" correctly documents the invariant.


Architecture / Code Quality

connect-extra-common.js single-letter helpers work but obscure call sites

s/r/c reduce catalog verbosity well. However, a reader jumping directly to c('openclaw', 'OpenClaw', …) must know that c is a client descriptor factory with a specific positional signature. oneRouteClient is clearer. Consider whether exporting named aliases (step, route, client) alongside the short forms—or replacing them—is worth the small size cost for the larger catalog files.

connect-extra-apps.js uses specs.map(spec => c(...spec)) (connect-extra-apps.js:32)

This is idiomatic but loses parameter names at the call site. An out-of-order argument in a future entry would only fail at runtime, not at lint time. The connect-extra-developer.js pattern of calling c(...) directly with named arguments is marginally more readable and produces the same output.

sonar.cpd.exclusions is the right fix for the SonarCloud duplication gate (.sonarcloud.properties)

Excluding connect-extra-apps.js and connect-extra-platforms.js from CPD is appropriate: the field repetition is the descriptor schema, not copy-pasted logic. Bug and security analysis remain enabled for both files per the comment. This correctly closes the Quality Gate failure without suppressing meaningful analysis.

Two-phase renderClientList is correct UX but the placeholder behavior is undocumented (connect.js:83-88)

bindStaticActions renders 7 core clients with hardcoded stub link prefixes (vscode:mcp/install?, cursor://anysphere.cursor-deeplink/mcp/install?). These produce briefly non-functional links before endpoint resolution replaces them. The behavior is acceptable but is not documented in the code, making the bindStaticActions call look like a premature full render to a reader unfamiliar with the two-phase design.


Test Coverage

Coverage is strong:

  • ConnectUi.test.ts:316-335 iterates all 40 clients and every route, asserting every rendered href passes safeSetupHref. This is the right integration guard.
  • ConnectUi.test.ts:337-346 verifies unsupported clients show no copyable value or connection note.
  • ConnectNativeClients.test.ts:52-62 rejects malformed inputs before any link is produced.
  • ConnectExtraClients.test.ts:71-84 covers forged profile rejection including cross-origin, query-param, credential, and transport variants.

One gap: connect-extra-apps.js app clients (Cline, Roo Code, Continue, Windsurf, LibreChat, Open WebUI, Perplexity, JetBrains AI Assistant) are validated only through the structural loop (ConnectExtraClients.test.ts:17-38) and the end-to-end ConnectUi test. None have schema-specific assertions equivalent to the Hermes/OpenCode/Junie/Antigravity/OpenClaw checks (ConnectExtraClients.test.ts:40-52). This is low-risk today—all eight emit only endpoint copies—but if any is later updated to use a client-specific payload format, a schema regression would not be caught by the named-schema test.


Minor / Nits

  • connect-native-clients.js:75 — Cherry Studio docsUrl points to a TypeScript source file in the upstream repo, not a user docs page. This is noted correctly in hosted-native-client-qualification.md as "source-confirmed." The availability text adequately qualifies this, but users who click the docs link will land on raw TypeScript rather than documentation.
  • connect-extra-apps.js:19 — The Windsurf step text "The original Windsurf guide now redirects to Devin documentation" is a time-sensitive fact. Static guide text is fine, but it will need maintenance if the redirect or product situation changes.
  • connect-extra-platforms.js:39 — www.antigravity.google is in OFFICIAL_SETUP_HOSTS. If the product does not publicly ship, this entry may need removal. The allowlist only enables rendering; risk is bounded.
  • connect.css:49-52 — The :visited/:hover/:focus color overrides for .btn-primary anchor elements are correct and necessary to override browser defaults.
  • docs/guides/hosted-additional-client-guides.md and hosted-native-client-qualification.md are accurate and appropriately conservative. The explicit "none has yet completed a Dollhouse OAuth and real tool-call acceptance run" is the right qualification signal.

Summary

Three items to consider before merge:

  1. Comment the !catalogReady guard (connect.js:157) to prevent accidental removal.
  2. Comment the native-scheme prefix block (connect.js:258) to note that href values are exclusively from nativeLinkArtifacts or static catalog fields.
  3. Comment or annotate the shell-template literals (connect-extra-developer.js:18, 29) noting the upstream validation that makes single-quote injection impossible.

None are blockers. The security controls are sound, the SonarCloud fix is appropriate, and the test suite provides thorough end-to-end coverage of all 40 clients and every route.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T20:49:08.647Z
Duration: 5515ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mickdarling's task —— View job


Reviewed commit: 9772e61ac1dbceef9b17adbeabf637bf179a2418

Tasks

  • Verify HEAD commit SHA
  • Read CLAUDE.md for repo guidelines
  • Read changed files
  • Post final review

Code Review

This PR integrates 40 client surfaces into the Connect selector. The latest commit (9772e61) fixes a specific YAML injection risk in the Hermes config output. The overall implementation is well-structured with layered validation and solid test coverage.


Latest Commit Assessment

9772e61 — Quote Hermes YAML connection names — This is a correct and necessary fix.

The previous code produced mcp_servers:\n ${name}:\n url: ... which would emit unquoted YAML keys. Connection names like true, false, null, or 123 are YAML non-string literals when unquoted — a YAML parser would interpret true: as a boolean key rather than a string. The fix wraps the key in JSON.stringify(name) (producing double-quoted strings), which is valid YAML scalar syntax and correctly forces string type for all names.

The accompanying test parametrized with ['false', 'null', 'true', '123'] round-trips each name through js-yaml to confirm the key parses as a string — this is the right verification approach.

One minor note: the Authorize instruction still contains the unquoted name in a shell command: Run hermes mcp login ${name} in a fresh terminal. This is correct since shell commands don't need YAML quoting, but worth noting the asymmetry is intentional (connect-extra-developer.js:12).


Security

Validation chain is sound. validateHostedMcpEndpoint → hostedConnectionProfile → connectionArtifacts / nativeLinkArtifacts rejects single quotes, backslashes, control characters, and non-ASCII before any shell command or config snippet is generated. The Hermes YAML fix reinforces this for the YAML parsing layer.

safeSetupHref native-scheme prefixes are correct but rely on implicit link provenance (connect.js:258-260). The function accepts any string, but is only ever called with data from nativeLinkArtifacts (frozen) or static catalog fields. A stray href from a future refactor could bypass the HTTPS host-allowlist via the native-scheme prefix block. A comment noting // href values come only from nativeLinkArtifacts or static catalog fields would surface this assumption.

Shell-embedded JSON and YAML are safe because hostedConnectionProfile blocks all characters that would break single-quoted shell contexts or YAML structure — the validation is upstream, not at the template literals themselves (connect-extra-developer.js:12,18,29).

gooseLink and cherryStudioLink are generated but not used in the UI — this conservative stance is correct for unqualified native schemes.


Correctness

catalogReady guard (connect.js:157-160): After the first endpoint resolution, subsequent renderSetup calls (e.g. from name changes) update the panel but do not re-render the client list. This is intentional since list buttons have no endpoint-dependent data, but it's easy to misread as a latent bug. A comment would prevent accidental removal.

Two-phase renderClientList: bindStaticActions renders 7 core clients with stub link prefixes (non-functional until endpoint loads), then renderSetup replaces with the full 40-client list. The brief window of non-functional stub links is acceptable but undocumented.

Hermes s('Connection name', ...) step: The in-app route surfaces the connection name as a copy-value, but the config route uses JSON.stringify for the YAML key while leaving the raw name in the hermes mcp login ${name} command text. This is correct by context (shell vs. YAML), but a reader seeing ${name} and ${JSON.stringify(name)} side-by-side in the same template might wonder if one is a mistake.


Architecture / Code Quality

connect-extra-common.js one-letter helpers (s/r/c): The oneRouteClient export is a welcome addition for readability at call sites. However s, r, and c remain in use across the larger files. Call sites like c('hermes', 'Hermes Agent', ...) require knowing the positional signature. The JSDoc at file tops helps; inline IDE hover will not.

connect-extra-apps.js uses specs.map(spec => c(...spec)): This approach is concise but loses parameter names and type visibility at call sites. A misplaced argument in a future catalog entry would surface at runtime. The connect-extra-developer.js direct-call pattern is more readable.

additionalConnectionClients re-derives origin from the profile (connect-extra-clients.js:14) while nativeConnectionClients takes an explicit pageOrigin parameter. Both are logically equivalent given the canonical check, but the inconsistency is a minor readability concern for callers reviewing both functions.


Test Coverage

Coverage is strong:

  • ConnectUi.test.ts:316-335 — iterates all 40 clients and every route, asserting every rendered href passes safeSetupHref. This is the correct integration guard.
  • ConnectUi.test.ts:337-346 — verifies unsupported clients (microsoft-copilot-personal, google-ai-studio) show no copyable value or connection note.
  • ConnectNativeClients.test.ts:52-62 — rejects malformed inputs before any link is produced.
  • ConnectExtraClients.test.ts:72-84 — forged profile rejection covers cross-origin, query-param, credential, transport, and shell-injection variants.
  • ConnectExtraClients.test.ts:96-104 (new in this commit) — parametrized YAML key test correctly verifies the quoting fix round-trips through js-yaml.

One gap: connect-extra-apps.js app clients (Cline, Roo Code, Continue, Windsurf, LibreChat, Open WebUI, Perplexity, JetBrains AI Assistant) have no schema-specific assertions beyond the structural loop. This is low-risk today since all emit only endpoint copies, but a future schema change would not be caught by named-schema tests.


Minor / Nits

  • connect-native-clients.js:75 — Cherry Studio docsUrl points to a TypeScript source file (mcpProtocolInstall.ts), not a user docs page. Users clicking the link land on raw TypeScript. Availability text qualifies this appropriately.
  • connect-extra-apps.js:19 — The Windsurf step note "The original Windsurf guide now redirects to Devin documentation" is a time-sensitive fact that may need future maintenance.
  • connect-extra-platforms.js:39 — www.antigravity.google in OFFICIAL_SETUP_HOSTS (connect.js:273). If the product doesn't publicly ship, this entry may need cleanup. Risk is bounded since the allowlist only enables rendering.
  • connect.css :visited/:hover/:focus color overrides for .btn-primary are correct.

Summary

The latest commit correctly addresses the Hermes YAML key type-safety issue with proper JSON.stringify quoting and a well-designed parametrized test. The overall PR is a carefully defensive catalog expansion. Three non-blocking items to consider:

  1. Comment the !catalogReady guard (connect.js:157) to prevent accidental removal by future editors.
  2. Comment the native-scheme prefix block (connect.js:258) to make the link provenance assumption explicit.
  3. Consider schema-specific tests for app clients in ConnectExtraClients.test.ts to catch payload regressions if any app entry gains a custom format.

Security controls are sound, the SonarCloud Quality Gate passes, and the 62-test suite provides thorough end-to-end coverage of all 40 clients.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T21:00:56.515Z
Duration: 7447ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@mickdarling

Copy link
Copy Markdown
Member Author

Review follow-up for combined head 9772e61ac1dbceef9b17adbeabf637bf179a2418:

  • The Hermes YAML key fix is covered by parser-backed tests for false, null, true, and 123. The shell instruction uses the validated plain connection name intentionally.
  • additionalConnectionClients now receives the page origin explicitly from connect.js; the origin re-derivation note describes an earlier head. The initial seven choices render before endpoint discovery, while setup actions remain hidden until endpoint validation succeeds.
  • The app entries currently copy the endpoint only, so format-specific schema tests would duplicate the structural and rendered-route checks. If an entry gains a custom payload, it should gain a matching schema test.
  • Catalog helper readability and future maintenance are tracked in [Beta Connect follow-up] Simplify catalog descriptors and rendering #2852. The remaining comments are nonblocking and do not require a change to this reviewed head.

@mickdarling mickdarling changed the title Connect: integrate full client catalog into selector Connect: show native and additional client routes Sep 26, 2026
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mickdarling's task —— View job


Reviewed commit: 8061a52b7b070dfe846c537d391b9cf026f984be

Tasks

  • Verify HEAD commit SHA
  • Read CLAUDE.md for repo guidelines
  • Read changed files
  • Post final review

Code Review

This merge commit (8061a52b) brings in the completed catalog expansion. The three changed files at this SHA are clean, focused, and consistent with the work described in the PR. Findings below.


Summary of Changes

connect-catalog.js (+4/-1)

  • Fixes the Claude Cowork docsUrl to point to the remote MCP connectors guide instead of the older plugins article — correct and important for discoverability.
  • Adds .map(client => ({ ...client, connectionNote: '…' })) to all core clients — moves the OAuth note from a hardcoded function call to a per-client property, which is the right abstraction to support clients that should not show the generic note (native and additional catalog entries that carry their own connectionNote or none at all).

connect.js (+38/-8)

  • Imports nativeConnectionClients and additionalConnectionClients and merges them into the clients array in renderSetup.
  • Introduces the catalogReady guard to render the full 40-client list exactly once after endpoint discovery.
  • Replaces the item.href.startsWith('cursor:') || item.href.startsWith('vscode:') heuristic with activeRoute.id === 'native' for btn-primary styling — more semantically correct and generalizes cleanly to Kiro and LM Studio install routes.
  • Refactors safeSetupHref from a single-regex approach to an explicit OFFICIAL_SETUP_HOSTS Set with a URL-parsed HTTPS check and explicit native-scheme prefix guards — substantially more maintainable and easier to audit than the previous regex.
  • Renames oauthNote() → connectionNote(text) to make the note text dynamic per-client.

ConnectUi.test.ts (+57/-0)

  • Three new integration tests covering: all 40 clients × all routes (link safety), unsupported clients (no copyable payload, no OAuth note), and agent/platform search + native payload regeneration.

Correctness

catalogReady guard is sound but worth a comment (connect.js:157-160)

if (!catalogReady) {
  renderClientList(clients);
  catalogReady = true;
}

After the first endpoint resolution, subsequent renderSetup calls (on name changes or route clicks) update the panel for the selected client but do not re-render the client list. This is intentional — the list buttons contain no endpoint-dependent data — but the guard looks like a latent optimization bug without context. A one-line comment would protect it.

btn-primary route condition change is a clear improvement (connect.js:240)

activeRoute.id === 'native' is unambiguous. The previous .startsWith('cursor:') || .startsWith('vscode:') check would have silently failed for Kiro's https:// install link, which is in a native route. The new approach correctly handles all native-route entries regardless of scheme.

docsUrl fix for Claude Cowork (connect-catalog.js:55)

The previous URL pointed to 11175166-use-plugins-in-claude (a plugins article). The fix correctly targets 11175166-get-started-with-custom-connectors-using-remote-mcp. The article slug is now consistent with the claude.ai connector instructions shown in the route steps.

connectionNote moved from hardcoded function to per-client property (connect.js:252, connect-catalog.js:105-108)

Core clients receive the generic OAuth note via the .map() in connect-catalog.js. Non-core catalog clients (native, additional) can supply their own note or omit it. The guard if (client.connectionNote) at the render site correctly suppresses the note for clients that don't carry one — this cleanly handles unsupported surfaces like microsoft-copilot-personal and google-ai-studio that intentionally show no setup actions.


Security

safeSetupHref refactor is a strict improvement (connect.js:256-265)

The old regex — ^https:\/\/(?:code\.claude\.com|claude\.ai|…)\/ — required a trailing slash and only matched a hardcoded set of six hosts. The new implementation:

  • Parses via new URL() to normalize the href before comparing hostname
  • Blocks credentials (!url.username && !url.password)
  • Enforces https: at the protocol level
  • Uses a Set lookup, which is easier to maintain and audit than a regex alternation

The explicit native-scheme prefixes (cursor://anysphere.cursor-deeplink/mcp/install?, vscode:mcp/install?, lmstudio://add_mcp?) are long and specific enough to be safe. The lmstudio://add_mcp? prefix requires the trailing ?, so lmstudio://add_mcp alone would not pass — this is correct since all LM Studio links produced by nativeLinkArtifacts include query parameters. One implicit assumption worth noting: the function accepts any string, so its safety rests on callers only passing hrefs from nativeLinkArtifacts (frozen) or static catalog fields. A future refactor pulling hrefs from elsewhere would not be caught at this boundary.

Credential blocking is now explicit — the old regex did not check for user:pass@host forms. The new !url.username && !url.password check closes that gap.

OFFICIAL_SETUP_HOSTS contains www.antigravity.google — if Google's Antigravity product does not publicly ship, this entry may need future cleanup. The allowlist only affects link rendering, so the impact is bounded.


Test Coverage

The three new tests are well-designed:

renders every catalog client and each route with approved links (line 316-335) — iterates all 40 clients × all routes and asserts every rendered href passes safeSetupHref. This is the correct integration guard and would catch any catalog entry adding an unapproved URL.

shows qualification limits instead of setup payloads for unsupported clients (line 337-346) — asserts microsoft-copilot-personal and google-ai-studio show no .connect-value, no .connect-oauth-note, and display qualification text. This directly verifies the connectionNote conditional and the availability-only route design.

finds agent and platform clients and regenerates native payloads with the connection name (line 348-371) — verifies search works for Hermes, Copilot, Gemini; confirms Kiro's btn-primary styling on a https:// native link; confirms LM Studio's native link regenerates on name change and disappears on invalid input. This is a precise end-to-end test of the activeRoute.id === 'native' change.

One minor observation: the Kiro assertion at line 360 checks for href^="https://kiro.dev/launch/mcp/add". If the Kiro install URL ever changes, this test would correctly fail — but the URL is encoded in connect-native-clients.js, not in this test, so the test is coupled to the implementation rather than the spec. This is acceptable for an integration test; noting for awareness.


Minor / Nits

  • connect-catalog.js:105-108 — the .map() on the array return is clear and idiomatic. A future reader adding a core client does not need to do anything special to get the connectionNote; it's applied uniformly.
  • connect.js:283-284 — link.target = '_blank'; link.rel = 'noopener noreferrer' correctly guards external links. Native-scheme links correctly get no target (line 289), matching browser expectations.
  • The connect.js:267-277 OFFICIAL_SETUP_HOSTS constant is placed after safeSetupHref — this is a const in module scope, so hoisting isn't relevant, but placing it before the function that references it would be slightly more conventional. Non-blocking.

Summary

This is a clean, well-scoped set of changes. The three substantive improvements — the Cowork docs URL fix, the btn-primary route condition generalization, and the safeSetupHref refactor — are all strictly correct. The 57 new test lines provide strong end-to-end coverage. No blockers.

One item to consider before merge: add a comment on the !catalogReady guard (connect.js:157) to prevent accidental removal, as noted across prior reviews. All other prior review items have been resolved in earlier commits.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Security Audit Passed

🔒 Security Audit Results

Security Audit Report

Generated: 2026-09-26T21:20:29.125Z
Duration: 7435ms

Summary

  • Total Findings: 0
  • Files Scanned: 176

Findings by Severity

  • 🔴 Critical: 0
  • 🟠 High: 0
  • 🟡 Medium: 0
  • 🟢 Low: 0
  • ℹ️ Info: 0

Recommendations

  1. Address all critical and high severity issues immediately
  2. Review medium severity issues and plan remediation
  3. Consider adding suppressions for false positives
  4. Run security audit regularly (e.g., in CI/CD pipeline)

@sonarqubecloud

Copy link
Copy Markdown

@mickdarling

Copy link
Copy Markdown
Member Author

The one new SonarCloud issue on final head 8061a52b is javascript:S3776 in renderClientPanel (src/web-console/ui/connect.js): cognitive complexity 17 versus the configured maximum 15. Sonar labels it a CRITICAL code smell, not a security finding; the Quality Gate passes. The 40-client route and link-safety tests pass, and latest-head Codex and Claude reviews found no blockers.

This bounded rendering cleanup is tracked in #2852 alongside the catalog descriptor maintainability work. It is not a reason to change the reviewed integration head or restart the full CI matrix.

@mickdarling
mickdarling merged commit 72c8768 into beta Sep 26, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant