Skip to content

feat(mcp): add roots-aware workspace detection #274

Description

@JSONbored

Parent roadmap: #127
Parent phase: #234

Goal

Use MCP roots where clients expose them so local branch analysis can understand the intended workspace boundary without guessing or leaking paths.

Requirements

  • Detect MCP client roots when available.
  • Validate that local git/workspace analysis stays inside the selected root.
  • Preserve current CLI behavior when roots are unavailable.
  • Redact local absolute paths from API payloads, logs, and public output.
  • Keep GITTENSORY_UPLOAD_SOURCE=true unsupported and fail-closed.

Acceptance criteria

  • Roots-aware clients get safer workspace selection.
  • Non-roots clients keep working through existing cwd/config behavior.
  • Source contents are never uploaded.
  • Local absolute paths are not included in public-safe output or API payloads.

Validation expected

  • MCP roots fixtures.
  • CLI fallback fixtures.
  • Local path redaction tests.
  • Source-upload fail-closed tests.
  • npm run test:ci.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions