Repository navigation
Conversation
Contributor
|
@PXY000 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
PXY000
force-pushed
the
feat/mcp-compact-mode-and-sandbox-fallback
branch
2 times, most recently
from
November 28, 2026 02:21
4c945d0 to
7eb6f13
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Standard MCP clients that enforce total tool limits, lazy-load tool schemas, or prompt for confirmation per tool name (such as Antigravity and Cursor) face high friction with the 75-tool default surface. In addition, coding agents running inside OS sandboxes (such as macOS Seatbelt or read-only
$HOMEcontainers) fail on state-root lock creation whenAGENT_DESKTOP_HOMEis unset.This PR adds four platform-agnostic opt-in and fallback improvements across macOS, Windows, and Linux while leaving default CLI and
agent-desktop mcpbehavior unchanged:Compact 4-tool MCP surface (
agent-desktop mcp --compact)--compactis enabled:desktop_observe(readOnlyHint: true): Strictly read-only introspection (snapshot,find,get,is,screenshot,list-*,status,permissions,version,skills *), stripping and rejecting mutating options (output_path,request,guide,headed)desktop_act: Interaction execution (element, keyboard, mouse, clipboard, and notification actions)desktop_window: Environment lifecycle (app launch/close, window management, shell surfaces,wait, andsession *)desktop_batch: Sequential multi-command executionargsschemas (additionalProperties: false) and rejects duplicate keys passed at both top level and insideargs.Per-call
--headedand post-action wait opt-in (agent-desktop mcp --allow-headed)"headed": truewhen physical delivery is needed as well as"wait_for","wait_for_gone", and"wait_timeout"on commands that support post-action waits.Private operator-configured screenshot directory (
agent-desktop mcp --screenshot-dir <DIR>)DIRat server startup as an absolute, private (0700), user-owned, non-symlink directory (with no implicit/tmpfallback) and writes omitted-path screenshots with randomized 64-bit nonce filenames (screenshot-<ms>-<nonce>.png).Sandbox-resilient private state root fallback (
crates/core/src/storage/state_root.rs)AGENT_DESKTOP_HOMEis unset and~/.agent-desktopfails due to a kernelPermissionDeniedorReadOnlyFilesystemOS sandbox restriction (failing closed on existing unsafe paths, ancestor symlinks, or parent traversal), falls back only to an existing private (0700) user-owned runtime directory (XDG_RUNTIME_DIR/TMPDIRon Unix,LOCALAPPDATAvalidated viaPrivateFileOpson Windows), never shared world-writable/tmp. ExplicitAGENT_DESKTOP_HOMEvalues never fall back.Verification
bash scripts/check-rust-file-size.shbash scripts/check-no-phase-references.shbash scripts/check-architecture.shcargo fmt --all -- --checkcargo clippy --locked -p agent-desktop-core -p agent-desktop-macos -p agent-desktop -p agent-desktop-ffi --all-targets -- -D warningsscripts/cargo-test-isolated-home.sh test --locked -p agent-desktop-core --lib storage::state_rootscripts/cargo-test-isolated-home.sh test --locked -p agent-desktop mcp