Skip to content

feat(agent): connect catalog apps that run on this computer - #1455

Merged
AnthonyRonning merged 2 commits into
masterfrom
codex-local-apps
Nov 5, 2026
Merged

AnthonyRonning merged 2 commits into
masterfrom
codex-local-apps

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Integrations can now connect apps that run on this computer. Playwright (macOS, Windows, Linux) and Xcode (macOS) appear in the same catalog, with the same card and Connect button as the remote apps.

This is the generic shape for local apps, so a new one is a catalog entry and a logo, with no Rust. Two different kinds ship together to keep it generic: a pinned package and a command another app provides.

What changed

Each catalog entry now answers three questions:

  • How do we reach it? connect is a remote URL, a pinned package or a command.
  • What must be here first? requires is an ordered list of checks. Each runs a command, optionally compares a version, and links to where to get the thing.
  • How do we sign in? auth gains none.

Entries can also set platforms, connectSeconds and a help line.

Connect takes the catalog id, never a command, so a caller can only start what ships in the catalog. It then:

  1. Runs the checks in order.
  2. Starts the app and lists its tools.
  3. Saves it through a new single-row add_mcp_definition, on for new tasks, as an ordinary stdio server.

Nothing is saved until the app actually answers.

The card reuses the sign-in states: spinner with Cancel, and an inline line on failure. A missing requirement shows "Needs Node.js 18 or newer." and the button becomes "Get Node.js". An app that will not start shows its help line, and the button stays Connect.

Behavior to review

  • Node.js comes from the login shell, and uv would too. Bundling them is the next stacked PR. Until then most non-developers see "Needs Node.js".
  • Playwright runs with --isolated, because Maple runs one server per task and a persistent profile allows one browser. Logins do not persist between tasks.
  • Playwright's files go to ~/.cache/maple/playwright. Without --output-dir it writes a .playwright-mcp folder into the person's project.
  • Playwright adds about 5,300 tokens of tool descriptions to any task that has it, and new connections start on.
  • A missing browser shows up on first use, not at Connect. Playwright lists its tools without one, then the tool error gives the install command, which the model can run.
  • Xcode needs external agents allowed. Its setting offers Always, While Xcode is Open and Never. When access is refused the bridge fails, and Connect shows the setting's location from help.
  • Always runs a background Xcode service, so tools work with the Xcode app closed.
  • Xcode approves each agent itself. The first time a task opens a project, Xcode asks the person to approve the agent and the folder. Maple adds no UI for this. Xcode stops waiting after about a minute and tells the model to ask the person, then retry.
  • Xcode's approval can be time-limited, so people may see the prompt again. The run below used 24 hours.
  • The first tool call can fail by design. Until a project is opened, other Xcode tools return an error that tells the model to open one first.
  • Any MCP server that exits now reconnects on the next call, HTTP included. is_closed only reports a close from our side, so the existing reopen path never ran. A call in flight when a server exits still fails and is not resent.
  • The Xcode check uses xcode-select -p first, because xcrun can open Apple's tools installer on a Mac without them.
  • A saved app keeps the version it was connected with. Moving saved entries to a newer pin is left for a later change.
  • Paired computers are refused for now, as browser sign-in is.
  • Logos: Playwright's is from playwright.dev and Xcode's from the app. Vendor brand terms were not reviewed.

Validation

Run on macOS on the final code.

Check Result
just ci-lint Passed
cargo test --locked -p maple-agent 847 passed, 5 ignored
cargo test --locked -p maple-agent-app --bin maple-agent 1,213 passed, 2 ignored
  • a_server_that_went_away_starts_again_for_the_next_call failed with Transport closed before the fix and passed 5 of 5 after it.
  • closing_settings_ends_a_sign_in_in_progress failed once under load earlier. Its timing assumption came from feat(agent): add an app catalog with browser sign-in to Integrations #1447, and it now waits for the release.
  • reads_native_release_tar_format_and_preserves_bundle_modes is the known bsdtar failure in untouched updater code, which is why the commits used MAPLE_HOOK_SKIP=1. A full workspace run was not repeated after the last changes.

Real app, debug build, Playwright:

  • With no Node on the machine, the card showed "Needs Node.js 18 or newer." and "Get Node.js".
  • With Node v24.22.2 (checksum verified, on the login path for that run), Connect showed the spinner and saved Playwright as enabled. It left no process behind, and the existing Notion entry was untouched.
  • A new task showed the added integration, and the real model opened a page in real Chrome and reported its title.
  • On the final build, the page snapshot landed in ~/.cache/maple/playwright and no .playwright-mcp folder appeared in the project. A screenshot the model named itself still lands in the task folder.

Real app, debug build, Xcode 27.2 (27B52) set to Always:

  • On Xcode 27.1 with Xcode closed and access off, the card showed its help line and saved nothing.
  • With the Xcode app closed and its service stopped, Connect showed the spinner and saved Xcode as enabled, with no bridge left running.
  • A new task opened a Swift package and built it through BuildProject with the Xcode app closed.
  • After the bridge was killed mid-task, a follow-up in the same task reconnected and built. On the build before the fix, every later call failed with Transport closed.

The app was pointed at 27.2 with DEVELOPER_DIR, since the Mac's selected Xcode is 27.1. A Mac with two copies uses the one xcode-select picks.

Not proven

  • Xcode set to While Xcode is Open or Never.
  • A signed release build with Xcode's approval. Debug builds are approved per binary, so each rebuild asks again. Whether a signed app keeps its approval across updates is unknown.
  • Playwright on Windows and Linux at runtime. CI covers build and tests only.
  • Playwright on a machine with no browser, beyond the tool error text.

🤖 Generated with Claude Code

AnthonyRonning and others added 2 commits November 4, 2026 19:52
A catalog entry now says how to reach an app, what must be installed
first and which platforms it runs on. Remote apps were one case of that.
This adds pinned packages and commands that another app provides, with
no code per app.

Connect checks the requirements, starts the app, lists its tools and
only then saves it, as an ordinary stdio server that is on for new
tasks. A missing requirement shows on the card with a link to get it.
An app that will not start shows the entry's help line. Both use the
button states browser sign-in already has.

The first two are Playwright on macOS, Windows and Linux, and Xcode on
macOS through `xcrun mcpbridge`. Node.js comes from the login shell.

The settings release test waits for the screen to be released, because
loads started with the screen can hold it past one idle pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server that exited stayed dead for the rest of the task. Every later
call failed with "Transport closed", because `is_closed` only sees a
close from this side. Check the transport too, so the next call starts
the server again as the code already intended. This covers any app that
quits or updates while a task is open.

Testing Xcode 27.2 also showed that tools run through its background
service, so a project does not need to be open first. Update its summary
and point its help line at the setting's current name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning marked this pull request as ready for review November 5, 2026 08:18
@AnthonyRonning
AnthonyRonning merged commit 5b1467c into master Nov 5, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-local-apps branch November 5, 2026 08:19
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