feat(cli): expand Cursor host mounts, Sandcat-controlled CLI config, and workspace isolation#71
Draft
wiacekm wants to merge 3 commits into
Draft
Conversation
Expose Cursor commands, hooks, and agents paths in container mounts and align docs/tests with the expanded Cursor host config behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Extend SANDCAT_MOUNT_CURSOR_CONFIG with read-write host mounts for cli-config.json, projects/, chats/, plugins/, and subagents/, plus read-only mcp.json. Pre-create missing bind sources on init with minimal JSON defaults so Docker mounts files instead of root-owned directories, and treat empty cli-config.json as unset during container bootstrap.
Mount only ~/.cursor/projects/workspaces-<project-name>/ instead of the entire host projects/, chats/, plugins/, and subagents/ trees so sandcat agents cannot read other workspaces' Cursor runtime state. chats/, plugins/, and subagents/ persist in agent-home; shared customization mounts stay read-only.
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
Align Sandcat devcontainers with Cursor CLI host configuration: mount shared customization from
~/.cursor/, persist this sandbox's runtime state without leaking other workspaces, and manage Cursor CLI keys through Sandcat settings instead of bind-mountingcli-config.json.SANDCAT_MOUNT_CURSOR_CONFIG=true:commands/,hooks.json,hooks/,agents/, andmcp.json(read-only), alongside existingAGENTS.md,rules/, andskills/sandcat init(directories viamkdir, JSON files with minimal valid defaults) so Docker mounts files instead of root-owned empty directoriescursor.cliin settings: mitmproxy merges settings layers, writes/mitmproxy-config/cursor-cli-config.json, and the agent deep-merges that fragment intocli-config.jsoninagent-homeon startup (Sandcat keys win; Cursor-managed keys persist in the volume). Defaultcursor.cli.network.useHttp1ForAgent: truefor mitmproxy stability~/.cursor/projects/workspaces-<project-name>/read-write; keepchats/,plugins/, andsubagents/inagent-homeso other workspaces' Cursor data is not exposedTest plan
cd cli && bats test/agents/agents.bats test/composefile/composefile.bats test/init/init.bats test/init/regression.bats test/init/user_settings.batscd cli && pytest test/mitmproxy/test_mitmproxy_addon.py -k cursor_clisandcat init --agent cursor --name myprojectand verify compose mounts onlyprojects/workspaces-myproject/~/.cursor/rules/etc. appear read-only in the agentcli-config.jsonin agent-home receivesuseHttp1ForAgentfrom Sandcat settings without a host bind mount~/.cursor/projects/or access hostchats/,plugins/,subagents/