Skip to content

refactor(config): migrate MCP transport aliases before runtime - #162256

Merged
steipete merged 4 commits into
mainfrom
refactor/lg-config-mcp
Oct 1, 2026
Merged

steipete merged 4 commits into
mainfrom
refactor/lg-config-mcp

Conversation

@steipete

@steipete steipete commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

MCP transport selection differed between embedded and CLI execution when canonical transport coexisted with a stale type. Node-host server aliases also lacked the matching Doctor migration.

User Impact

Doctor migrates supported aliases in both mcp.servers and nodeHost.mcp.servers, preserving explicit canonical transport and the original config backup. Runtime reads canonical transport. External bundle ingestion still accepts its native format, and CLI serialization supplies the backend's required type field after connection and OAuth preparation.

Unknown imported HTTP types are rejected by native execution, including after requester overrides. Without an overriding canonical transport, their original type remains available for downstream CLI validation. Supported stdio-to-HTTP overrides remain intact.

Why This Change Was Made

Doctor owns persisted-key normalization; bundle ingestion and CLI output own their external formats. This removes the competing runtime interpretation and the unused merge callback. Doctor-lane dependency: retain the root and node-host transform in the shared early runner.

The SDK transport convenience export and loader parameter exposure were introduced by #160931 (b4ae783fbfd) and are absent from the latest stable v2026.9.7, reverified during landing preparation. AgentsAPI now uses the existing public string normalizer. One unshipped export is removed; the API diff also reports the reachable mapper-parameter removal. No published SDK export or budget is removed or raised.

Production (src/** and extensions/**, excluding tests/support/fixtures): +66/-75/net -9.

Evidence

  • Final head 9509431: 12 focused files pass across seven native Vitest shards in 82.52s wall with pnpm test … --maxWorkers=1; core types pass in 44.94s; assertion guard passes in 24.03s; native SDK API diff passes in 134.81s; SDK export and surface checks pass (4,587 public exports).
  • Earlier full changed checks covered all 27 core test graphs, extension/test types, lint, and ownership guards. Extracting the unchanged MCP cases resolved the oversized-test ratchet; the original and extracted suites passed 79 cases in 16.70s, with follow-up changed checks passing in 195.25s.
  • The production package at 22ddcc01dc7 passed build/tarball validation in 504.42s. Published 2026.9.7 drove openclaw update --yes --no-restart --tag=<candidate.tgz> --json in 136.35s (complete cell 146.87s). Installed build identity, canonical config, precedence, URLs/headers/commands, and exact original backup bytes were verified. This uses isolated state and makes no service-restart claim.
  • Rebase adopted refactor(agents): deslop agents core sixth pass #162070's cast cleanup. Across touched production files, the only change from that tested production revision is removal of two erased TypeScript assertions; its package/update proof remains applicable. Main already removed those casts and their baseline entry, so no assertion allowance is added here.
  • Independent Codex reviews have no actionable P0–P2 findings. CLI projection was personally checked against codex-rs/config/src/mcp_types.rs at 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157.

Testbox leases: tbx_01m3t5yxwr3shfwhv1tdgf2pdj (package/update); tbx_01m3temnsn388czbr1cev9ywsv (test extraction); tbx_01m3tp9xknr7r3s85qy06tyqky (final checks).

Significant overlaps: main's #162070 typing cleanup is retained; #154043 adds separate exports in the same SDK barrel and does not rewrite these hunks.

The exact public surface budget is now reconciled on main by 63df802414bca131ce64f2790d580c14777d69ff: 4587 exports / 2693 callable exports. Independent canonical-counter proof reproduced the stale-budget assertion (9.35s), generated the same two shrink-only values, and passed the full original surface-report test file (15.05s) plus the surface guard. Complete cell: 38.35s on Testbox tbx_01m3v582erc4b8yp848hy2q1cg, run. No duplicate budget change or increase was applied.

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: agentsapi size: M labels Oct 1, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 1, 2026, 1:02 AM ET / 05:02 UTC (Revision 4).

ClawSweeper review

What this changes

The branch moves MCP transport alias conversion into Doctor and bundle loading, converts canonical transport into CLI output format later, and removes an unshipped SDK helper.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 4 items remain

The refactor remains useful, but the earlier P1 compatibility finding is unresolved: valid type-only MCP configurations can reach runtime without migration and select the wrong transport.

Priority: P2
Reviewed head: 95094319447a1b1140e74f733bb70ff2fc90c3cf

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused refactor and update evidence are useful, but the unresolved config-admission regression prevents merge readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a member-authored PR, so ordinary external-contributor proof is exempt. The captured published-driver update evidence covers Doctor normalization and backup preservation, but ordinary startup compatibility remains source-disproven; existing-state compatibility is therefore insufficient.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a member-authored PR, so ordinary external-contributor proof is exempt. The captured published-driver update evidence covers Doctor normalization and backup preservation, but ordinary startup compatibility remains source-disproven; existing-state compatibility is therefore insufficient.
Evidence reviewed 9 items Introduced compatibility trigger: The pinned introduced diff removes legacy type interpretation from the shared transport resolver. The verified test merge against its recorded main parent retains this exact removal, so the concern survives the three-way merge.
Valid legacy input reaches consumers: The MCP schema preserves unknown server fields, including type. Successful snapshot reads publish materialized config without MCP alias conversion; normalizeConfiguredMcpServers clones operator definitions. Consequently, a URL server with type http and no transport remains type-only.
Ordinary startup does not complete the cutover: Startup preflight reads and admits configuration, performs recovery and plugin-index preparation, and returns the snapshot without applying the MCP Doctor transform. Its shared snapshot helper can add legacy diagnostics, but those diagnostics do not normalize the server. Config recovery explicitly skips valid snapshots.
Findings 1 actionable finding [P1] Migrate valid legacy MCP config before runtime use
Security None None.

How this fits together

MCP configuration connects OpenClaw agents to external tools. Operator settings and plugin bundles feed shared configuration preparation, which supplies embedded execution, CLI backends, and Agents API sessions.

flowchart TD
  A[Operator configuration] --> C[Config admission]
  B[Plugin bundles] --> D[Bundle normalization]
  E[Doctor repair] --> A
  C --> F[Shared MCP configuration]
  D --> F
  F --> G[Embedded and Agents API execution]
  F --> H[CLI format conversion]
Loading

Before merge

  • Migrate valid legacy MCP config before runtime use (P1) - The earlier P1 remains unresolved. A saved server such as { url: "https://example.com/mcp", type: "http" } passes the open-world schema. Ordinary startup admits that valid snapshot without applying the MCP Doctor transform, and the shared merger only clones it. Removing this fallback therefore changes embedded execution to SSE; the corresponding Agents API change omits the server. Prepare canonical input through the existing migration owner before these consumers run, or defer fallback removal until that cutover exists.
  • Resolve merge risk (P1) - Existing type-only HTTP MCP configurations can stop working on ordinary startup without a preceding Doctor repair; the published-updater capture does not cover that path.
  • Complete next step (P2) - Complete legacy MCP normalization before runtime consumption and verify fresh canonical and existing type-only configurations through ordinary startup.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Migrate valid legacy MCP config before runtime use — src/config/mcp-config-normalize.ts:20
Agent review details

Security

None.

PR surface

Source -9, Tests +68, Docs +3. Total +62 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 8 66 75 -9
Tests 8 204 136 +68
Docs 2 7 4 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 277 215 +62

Review metrics

Metric Value Why it matters
SDK contraction 1 convenience export and 1 reachable mapper parameter removed The PR documents their unshipped status and preserves the existing public string-normalization path.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor/shared/legacy-config-migrations.runtime.mcp.ts, unknown-data-model-change: src/commands/doctor/shared/legacy-config-migrations.runtime.mcp.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete config admission (recommended)
    Invoke the existing MCP migration owner before runtime consumers receive valid legacy configurations and verify ordinary startup.
  2. Defer fallback removal
    Retain the current runtime alias fallback until the shared admission cutover is available and proven.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Complete MCP alias normalization through the existing config migration owner before runtime consumption, preserve explicit canonical transport and config backup behavior, and add a config-admission-to-runtime regression for type-only HTTP servers.

Technical review

Best possible solution:

Complete canonical MCP admission through the existing migration owner before removing runtime compatibility, preserving transport precedence and backed-up operator settings.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: admit a valid URL server with type http and no transport, then pass it through shared MCP configuration into embedded execution or Agents API. The branch selects SSE or omits the server; no target code was executed during this read-only review.

Is this the best way to solve the issue?

No, the cutover is incomplete: Doctor and bundle normalization are appropriate owners, but ordinary configuration admission must prepare canonical input before compatibility readers are removed.

Full review comments:

  • [P1] Migrate valid legacy MCP config before runtime use — src/config/mcp-config-normalize.ts:20
    The earlier P1 remains unresolved. A saved server such as { url: "https://example.com/mcp", type: "http" } passes the open-world schema. Ordinary startup admits that valid snapshot without applying the MCP Doctor transform, and the shared merger only clones it. Removing this fallback therefore changes embedded execution to SSE; the corresponding Agents API change omits the server. Prepare canonical input through the existing migration owner before these consumers run, or defer fallback removal until that cutover exists.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0783e3f28d4e.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded MCP configuration refactor with a merge-blocking compatibility defect, without evidence of an active broad outage.
  • merge-risk: 🚨 compatibility: Removing transport alias interpretation before ordinary admission normalizes legacy inputs can break existing MCP configurations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The supplied repository state identifies a member-authored PR, so ordinary external-contributor proof is exempt. The captured published-driver update evidence covers Doctor normalization and backup preservation, but ordinary startup compatibility remains source-disproven; existing-state compatibility is therefore insufficient.

Evidence

Acceptance criteria:

  • [P1] pnpm test src/commands/doctor/shared/legacy-config-migrations.runtime.mcp.test.ts src/agents/mcp-transport-config.test.ts src/agents/bundle-mcp-config.test.ts --maxWorkers=1.
  • [P1] pnpm test extensions/agentsapi/agentsapi-mcp.test.ts src/agents/cli-runner/bundle-mcp.user-config.test.ts --maxWorkers=1.
  • [P1] Run the new config-admission-to-runtime regression against the original and repaired code.
  • [P1] Verify ordinary startup with fresh canonical config and existing type-only root and nodeHost MCP config in isolated state.
  • [P1] Preserve or refresh the published 2026.9.7 updater-to-candidate compatibility cell if migration inputs change.

What I checked:

  • Introduced compatibility trigger: The pinned introduced diff removes legacy type interpretation from the shared transport resolver. The verified test merge against its recorded main parent retains this exact removal, so the concern survives the three-way merge. (src/config/mcp-config-normalize.ts:20, 95094319447a)
  • Valid legacy input reaches consumers: The MCP schema preserves unknown server fields, including type. Successful snapshot reads publish materialized config without MCP alias conversion; normalizeConfiguredMcpServers clones operator definitions. Consequently, a URL server with type http and no transport remains type-only. (src/config/io.snapshot.ts:441, 95094319447a)
  • Ordinary startup does not complete the cutover: Startup preflight reads and admits configuration, performs recovery and plugin-index preparation, and returns the snapshot without applying the MCP Doctor transform. Its shared snapshot helper can add legacy diagnostics, but those diagnostics do not normalize the server. Config recovery explicitly skips valid snapshots. (src/commands/startup-config-preflight.ts:47, 95094319447a)
  • Observable failure: Embedded transport selection defaults a missing canonical transport to SSE. Agents API likewise defaults to SSE and then omits servers lacking explicit Streamable HTTP. The changed transport test now expects the SSE default for type http instead of exercising config admission. (src/agents/mcp-transport-config.ts:206, 95094319447a)
  • Current main still supplies compatibility: Fetched main retains explicit transport precedence with a legacy type fallback. The merged Agents API feature establishes the shared transport contract; it does not implement this PR's Doctor and CLI cutover. (src/config/mcp-config-normalize.ts:20, 0783e3f28d4e)
  • Upgrade evidence and its boundary: The captured PR body reports a published 2026.9.7 updater driving the candidate package, with canonical configuration, precedence, and original backup bytes verified. It explicitly makes no service-restart claim. That supports Doctor-driven updates but does not establish ordinary startup compatibility. Inspection of the linked job log was blocked by its Azure artifact host; this is a reviewer limitation, not missing contributor proof. (95094319447a)

Likely related people:

  • Sarah Fortune: Raw commit b4ae783 adds extensions/agentsapi/agentsapi-mcp.ts:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b4ae783fbfd2; files: extensions/agentsapi/agentsapi-mcp.ts)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Repair valid legacy MCP admission and add a config-read-to-runtime regression.
  • Verify canonical fresh configurations and existing type-only configurations through ordinary startup while retaining the published-updater evidence.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-01T01:35:12.547Z sha 19ad9364ed93263afce77dab1850dbdc89caad66 :: blocked before merge. :: [P1] Migrate valid legacy MCP config before runtime use
  • reviewed 2026-10-01T03:11:34.645Z sha 9509431 :: blocked before merge. :: [P1] Migrate valid legacy MCP config before runtime use
  • reviewed 2026-10-01T04:18:58.481Z sha 9509431 :: blocked before merge. :: [P1] Migrate valid legacy MCP config before runtime use

@steipete
steipete force-pushed the refactor/lg-config-mcp branch from 19ad936 to 9509431 Compare October 1, 2026 03:04
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 1, 2026
@steipete
steipete marked this pull request as ready for review October 1, 2026 04:54
@steipete
steipete enabled auto-merge (squash) October 1, 2026 04:55
@steipete
steipete merged commit dd72105 into main Oct 1, 2026
273 checks passed
@steipete
steipete deleted the refactor/lg-config-mcp branch October 1, 2026 05:11
steipete added a commit that referenced this pull request Oct 1, 2026
Integrate the exact main base already exercised by CI run 36818914037. The merged tree matches its tested source before lowering the two stale budgets by one, following the upstream removal in #162256.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…law#162256)

* refactor(config): normalize MCP transport aliases before runtime

* refactor(sdk): remove unshipped MCP transport re-export

* test(doctor): extract MCP migration coverage

* test(doctor): include shared MCP migration fixture
steipete added a commit that referenced this pull request Oct 2, 2026
Main migrates MCP transport aliases before runtime (#162256) and retired the SDK re-export of the alias resolver, so the native app catalog reads the canonical server.transport field the same way the agentsapi plugin does.
steipete added a commit that referenced this pull request Oct 2, 2026
…161747)

* feat: use MCP plugin apps across conversations and workspace files

Extend the opt-in MCP Apps host with discovery and entrypoints, settings, rich forms, scoped file editing, multimodal context, deep links, and native Codex session preparation. Preserve existing requester, approval, runtime, and file authority owners.

Co-authored-by: steipete <[email protected]>

* fix: keep app context compact and review large tool payloads

Reuse the canonical bounded plugin approval preview without rejecting otherwise valid large App arguments. Keep the same one-shot approval and live-authority gates. Bound context-strip icons and scrolling so attachments leave the composer usable.

Co-authored-by: steipete <[email protected]>

* fix: reveal pending input above fullscreen MCP apps

Keep App fullscreen rendering in the existing browser top layer and return to inline for same-conversation questions or approvals without replacing the iframe. Consolidate host-context, resource, and input notifications under the existing bridge lifetime.

Co-authored-by: steipete <[email protected]>

* test: preserve full attempt inputs in native assignment fixtures

Co-authored-by: steipete <[email protected]>

* fix: release session access when MCP app launch preparation fails

Preserve the upstream optional ifMatch contract and document unconditional-save semantics explicitly.

Co-authored-by: steipete <[email protected]>

* fix(ui): defer question controls and preserve canonical keyboard values

Co-authored-by: steipete <[email protected]>

* fix(mcp): preserve app authority through startup and user turns

Co-authored-by: steipete <[email protected]>

* fix(codex): share native app startup across concurrent discoveries

Co-authored-by: steipete <[email protected]>

* docs(mcp): explain native app prompting and request limits

Co-authored-by: steipete <[email protected]>

* feat: use MCP plugin apps across conversations and workspace files

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: f2f8d735-c1ac-4a0d-84f3-1576113c1baf

* fix(mcp): keep form contracts and test helpers with their owners

Co-authored-by: steipete <[email protected]>

* feat: use MCP plugin apps across conversations and workspace files

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 2513c3ef-4af8-4722-b802-ffa426df486a

* fix(codex): revalidate MCP App authority before native retries

Co-authored-by: steipete <[email protected]>

* test(ui): provide chat identity fixture context dependencies

Co-authored-by: steipete <[email protected]>

* feat: use MCP plugin apps across conversations and workspace files

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 85c132dc-d926-46ca-b57e-2d9e01f15487

* fix: integrate MCP app owners with current main

* fix(gateway): accept option labels from installed clients for rich forms

* chore(format): anchor the native apps formatter ignore

* perf(ui): load the MCP app link parser on demand

Keep startup click interception parser-free and capture the normalized href before lazy navigation. Preserve ordinary, modified and download links; drop malformed plugin links and cancel pending navigation on disposal. Router/parser proof: 17 tests passed in 4.50s wall. Startup gzip: 374086 -> 373613 B; 159 B still above the unchanged 373454 B limit.

* perf(ui): register MCP app English with lazy consumers

Move the MCP App catalog out of startup English and register it synchronously at every consumer. Keep the shared namespace anchor and host catalog composition so all text and source order remain byte-identical. i18n verification passes without baseline changes. Startup gzip: 373613 -> 373103 B, 351 B below the unchanged 373454 B limit.

* fix(ui): intercept only well-formed MCP app links

Require the plugin/app/tool shape before cancelling browser navigation so ordinary ChatGPT plugin pages keep their default behavior. Preserve lazy strict parsing and accepted native and web app links.

* fix(gateway): watch MCP app files directly so loaded macOS hosts still notify

Watch the bound file to avoid FSEvents directory event drops under load. Re-arm on atomic replacement, retry ENOENT once on the next immediate turn, and retain subscription authority and cleanup. Cover replacement followed by a plain write through the registered resource routes.

* fix(gateway): use the errno guard when rearming MCP app watches

Use the shared filesystem error guard instead of an unchecked type assertion. Keep the single immediate ENOENT retry and all subscription behavior unchanged.

* fix(codex): read the canonical MCP transport field

Main migrates MCP transport aliases before runtime (#162256) and retired the SDK re-export of the alias resolver, so the native app catalog reads the canonical server.transport field the same way the agentsapi plugin does.

* fix(gateway): keep MCP app file subscriptions alive across rename gaps

Keep resource subscriptions alive while editors move the old file aside before installing its replacement. Poll missing paths at 250 ms, return to the inode watcher when the file reappears, and release polling on subscription close. Recheck after polling registration to cover replacement before its first stat; share the rearm guard so late callbacks cannot leak watchers.

* test(codex): type the rooted thread policy support from attempt fixtures

The rooted policy support that main added types its lifecycle input from the raw thread signature, while this branch's binding fixtures carry full attempt params. Derive it from the shared attempt-thread fixture type, as the sibling policy-refresh support already does.

* test(ui): exercise the MCP app link probe through the click boundary

The eager link probe was exported only for its unit test, which the production dead-export scan rejects. Keep it module-private and assert the same accepted and rejected links through real click interception.

* style(lint): clear MCP app lint errors

CI run 36988865432 jobs check-lint-core-1 and check-lint-core-2 rejected shadowed stat callback variables, a returning Promise executor, and reassigned projection parameters. Rename the inner variables and use local projection bindings and an executor block without changing behavior.

* test(agents): align bundle MCP fixture ownership

CI run 36988865432 job checks-node-changed-compact-large-14 failed seven merge cases because the fixture omitted the loader-required pluginIdsByServer map. Type the fixture against the producer contract and verify ownership survives only for unshadowed enabled bundle servers, preserving the migrated transport behavior.

* fix(auto-reply): register turns before MCP context leasing

CI run 36988865432 job checks-node-changed-compact-large-33-2 exposed an asynchronous MCP lease before synchronous run registration. Prepare App context after ownership registration and image admission, revalidate requester authority around the lease, and retain commit and rollback settlement with the execution outcome owner.

* test(gateway): admit MCP shutdown requests through current policy

CI run 36988865432 job checks-node-changed-compact-large-9 timed out because the fixture ignored an admission rejection before its upstream call. Publish matching Gateway and runtime config, create the session through its RPC owner, and observe early request settlement while preserving all shutdown ordering and cleanup assertions.

* refactor(apple): drop the label-only question toggle

Periphery flagged toggleOption(questionID:label:) as dead: production selects by canonical value since the rich-form change, and only tests still called the label overload. Tests now toggle by value; the ambiguous-label case becomes an unknown-value no-op.

---------

Co-authored-by: steipete <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…penclaw#161747)

* feat: use MCP plugin apps across conversations and workspace files

Extend the opt-in MCP Apps host with discovery and entrypoints, settings, rich forms, scoped file editing, multimodal context, deep links, and native Codex session preparation. Preserve existing requester, approval, runtime, and file authority owners.

Co-authored-by: steipete <[email protected]>

* fix: keep app context compact and review large tool payloads

Reuse the canonical bounded plugin approval preview without rejecting otherwise valid large App arguments. Keep the same one-shot approval and live-authority gates. Bound context-strip icons and scrolling so attachments leave the composer usable.

Co-authored-by: steipete <[email protected]>

* fix: reveal pending input above fullscreen MCP apps

Keep App fullscreen rendering in the existing browser top layer and return to inline for same-conversation questions or approvals without replacing the iframe. Consolidate host-context, resource, and input notifications under the existing bridge lifetime.

Co-authored-by: steipete <[email protected]>

* test: preserve full attempt inputs in native assignment fixtures

Co-authored-by: steipete <[email protected]>

* fix: release session access when MCP app launch preparation fails

Preserve the upstream optional ifMatch contract and document unconditional-save semantics explicitly.

Co-authored-by: steipete <[email protected]>

* fix(ui): defer question controls and preserve canonical keyboard values

Co-authored-by: steipete <[email protected]>

* fix(mcp): preserve app authority through startup and user turns

Co-authored-by: steipete <[email protected]>

* fix(codex): share native app startup across concurrent discoveries

Co-authored-by: steipete <[email protected]>

* docs(mcp): explain native app prompting and request limits

Co-authored-by: steipete <[email protected]>

* feat: use MCP plugin apps across conversations and workspace files

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: f2f8d735-c1ac-4a0d-84f3-1576113c1baf

* fix(mcp): keep form contracts and test helpers with their owners

Co-authored-by: steipete <[email protected]>

* feat: use MCP plugin apps across conversations and workspace files

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 2513c3ef-4af8-4722-b802-ffa426df486a

* fix(codex): revalidate MCP App authority before native retries

Co-authored-by: steipete <[email protected]>

* test(ui): provide chat identity fixture context dependencies

Co-authored-by: steipete <[email protected]>

* feat: use MCP plugin apps across conversations and workspace files

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 85c132dc-d926-46ca-b57e-2d9e01f15487

* fix: integrate MCP app owners with current main

* fix(gateway): accept option labels from installed clients for rich forms

* chore(format): anchor the native apps formatter ignore

* perf(ui): load the MCP app link parser on demand

Keep startup click interception parser-free and capture the normalized href before lazy navigation. Preserve ordinary, modified and download links; drop malformed plugin links and cancel pending navigation on disposal. Router/parser proof: 17 tests passed in 4.50s wall. Startup gzip: 374086 -> 373613 B; 159 B still above the unchanged 373454 B limit.

* perf(ui): register MCP app English with lazy consumers

Move the MCP App catalog out of startup English and register it synchronously at every consumer. Keep the shared namespace anchor and host catalog composition so all text and source order remain byte-identical. i18n verification passes without baseline changes. Startup gzip: 373613 -> 373103 B, 351 B below the unchanged 373454 B limit.

* fix(ui): intercept only well-formed MCP app links

Require the plugin/app/tool shape before cancelling browser navigation so ordinary ChatGPT plugin pages keep their default behavior. Preserve lazy strict parsing and accepted native and web app links.

* fix(gateway): watch MCP app files directly so loaded macOS hosts still notify

Watch the bound file to avoid FSEvents directory event drops under load. Re-arm on atomic replacement, retry ENOENT once on the next immediate turn, and retain subscription authority and cleanup. Cover replacement followed by a plain write through the registered resource routes.

* fix(gateway): use the errno guard when rearming MCP app watches

Use the shared filesystem error guard instead of an unchecked type assertion. Keep the single immediate ENOENT retry and all subscription behavior unchanged.

* fix(codex): read the canonical MCP transport field

Main migrates MCP transport aliases before runtime (openclaw#162256) and retired the SDK re-export of the alias resolver, so the native app catalog reads the canonical server.transport field the same way the agentsapi plugin does.

* fix(gateway): keep MCP app file subscriptions alive across rename gaps

Keep resource subscriptions alive while editors move the old file aside before installing its replacement. Poll missing paths at 250 ms, return to the inode watcher when the file reappears, and release polling on subscription close. Recheck after polling registration to cover replacement before its first stat; share the rearm guard so late callbacks cannot leak watchers.

* test(codex): type the rooted thread policy support from attempt fixtures

The rooted policy support that main added types its lifecycle input from the raw thread signature, while this branch's binding fixtures carry full attempt params. Derive it from the shared attempt-thread fixture type, as the sibling policy-refresh support already does.

* test(ui): exercise the MCP app link probe through the click boundary

The eager link probe was exported only for its unit test, which the production dead-export scan rejects. Keep it module-private and assert the same accepted and rejected links through real click interception.

* style(lint): clear MCP app lint errors

CI run 36988865432 jobs check-lint-core-1 and check-lint-core-2 rejected shadowed stat callback variables, a returning Promise executor, and reassigned projection parameters. Rename the inner variables and use local projection bindings and an executor block without changing behavior.

* test(agents): align bundle MCP fixture ownership

CI run 36988865432 job checks-node-changed-compact-large-14 failed seven merge cases because the fixture omitted the loader-required pluginIdsByServer map. Type the fixture against the producer contract and verify ownership survives only for unshadowed enabled bundle servers, preserving the migrated transport behavior.

* fix(auto-reply): register turns before MCP context leasing

CI run 36988865432 job checks-node-changed-compact-large-33-2 exposed an asynchronous MCP lease before synchronous run registration. Prepare App context after ownership registration and image admission, revalidate requester authority around the lease, and retain commit and rollback settlement with the execution outcome owner.

* test(gateway): admit MCP shutdown requests through current policy

CI run 36988865432 job checks-node-changed-compact-large-9 timed out because the fixture ignored an admission rejection before its upstream call. Publish matching Gateway and runtime config, create the session through its RPC owner, and observe early request settlement while preserving all shutdown ordering and cleanup assertions.

* refactor(apple): drop the label-only question toggle

Periphery flagged toggleOption(questionID:label:) as dead: production selects by canonical value since the rich-form change, and only tests still called the label overload. Tests now toggle by value; the ambiguous-label case becomes an unknown-value no-op.

---------

Co-authored-by: steipete <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: agentsapi gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant