Skip to content

feat(mcp): add multi-account profile support #99

Description

@JSONbored

Parent roadmap: #82

Background

Some users maintain multiple GitHub identities. Gittensory must not mix sessions, evidence, or local config across identities.

Goal

Support named local MCP profiles for multiple GitHub/Gittensory sessions.

Current Behavior

Local config supports auth, but multi-account profile handling is not a first-class workflow.

Desired Behavior

Users can create, list, switch, and remove profiles without token leakage or evidence mixing.

Implementation Requirements

  • Add profile-aware config storage.
  • Update login/logout/whoami/status/doctor.
  • Keep default profile simple for normal users.
  • Avoid printing token paths or secrets.
  • Make API requests include the selected session only.

Public/Private Output Boundaries

MCP may return private scoreability and risk context to authenticated users. It must never upload source contents by default, and public-safe packet output must exclude private score/reward/trust/reviewability details.

Acceptance Criteria

  • whoami reflects active profile.
  • Switching profiles changes session safely.
  • Logout only affects selected profile unless requested.
  • Doctor reports profile state without leaking secrets.

Testing Requirements

  • npm run test:ci must pass.
  • Global coverage must remain at or above 97% for lines, statements, functions, and branches.
  • Aim for 98%+ branch coverage locally to avoid CI variance.
  • Add tests for every new branch, fallback path, sanitizer rule, and regression.
  • Add invariant/property-style tests when behavior depends on sorting, gating, scoring, queue pressure, source-upload safety, public/private boundaries, or upstream drift.
  • Public GitHub output must be tested against forbidden language: wallet, hotkey, raw trust score, payout, reward estimate, farming, private reviewability, and public score estimate.
  • MCP/local tooling must prove source contents are not uploaded.

Additional Test Scenarios

  • Two-profile fixture.
  • Logout selected profile.
  • Missing profile fallback.
  • Token redaction regression.

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