Skip to content

File Browser: Remove ALLOWED_FILE_NAMES whitelist, add scope levels #44108

Description

@pcpilot-dev

Feature Request

The MC file browser currently uses a hardcoded ALLOWED_FILE_NAMES whitelist that only shows standard workspace files (SOUL.md, IDENTITY.md, TOOLS.md, MEMORY.md, etc.). Custom files like elevenlabs-lexicon.pls or skill files cannot be viewed/edited.

Proposed Solution

Replace the whitelist with a scope selector offering 3 levels:

  1. MC Files (default) — Current behavior: SOUL.md, IDENTITY.md, TOOLS.md, MEMORY.md, etc.
  2. All Workspace Files — Everything in the agent workspace directory (recursive), including custom files, skills, configs
  3. System — Full filesystem browser (like Windows Explorer), showing OS-level files

Implementation Notes

  • resolveAgentWorkspaceFileOrRespondError() in src/gateway/server-methods/agents.ts currently blocks any file not in ALLOWED_FILE_NAMES
  • For scope 2: Remove whitelist, allow any file within the workspace boundary (path escape protection already exists via assertNoPathAliasEscape)
  • For scope 3: Allow browsing beyond workspace root (with appropriate auth/safety checks)
  • MC frontend needs a scope toggle (dropdown or tabs) and a directory tree/search component

UX Vision

MC should evolve into an "app for everything" — the file browser is a key building block for that. Users should be able to find, view, and edit any file relevant to their agent setup.

Security Considerations

  • Scope 2 is safe (already sandboxed to workspace)
  • Scope 3 needs careful access control (read-only by default, explicit write permissions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions