Skip to content

chore(mcpdo): replace the temporary @inspector/cli source alias with a real shared surface #2461

Description

@BobDickinson

Problem

clients/mcpi (#1783) bundles modules straight out of clients/cli/src via a temporary build-time alias:

// clients/mcpi/tsup.config.ts
"@inspector/cli": path.resolve(dirname, "../cli/src"),

What it reaches for today:

  • error-handler.js — CliExitCodeError, EXIT_CODES (used across the daemon, clients, and bin)
  • handlers/ — method-types.js, run-method.js, servers-list.js, format-output.js, connect-timeout.js
  • cliOAuth.js + cli-oauth-navigation.js — connect-time OAuth flow and navigation
  • style.js, utils/awaitable-log.js — output styling / logging helpers

This was flagged in review on #1783 (item 2g): clients/cli/src is not a published or internal library surface, so mcpi's compile depends on cli internals that can change under it, and the "which client owns which file" rules in AGENTS.md blur.

Proposed fix

Promote the genuinely shared, node-only CLI surface out of clients/cli/src into a shared area (e.g. core/ subdirectories, or a dedicated shared client-support area) and consume it from both clients/cli and clients/mcpi:

  1. error-handler (exit codes + CliExitCodeError)
  2. The method handlers and their option/format types
  3. The interactive OAuth connect flow (cliOAuth, cli-oauth-navigation) — already thin wrappers over core/auth
  4. style / awaitable-log output helpers

Then delete the @inspector/cli alias from clients/mcpi/tsup.config.ts and clients/mcpi/vitest.config.ts, and drop the layout note from clients/mcpi/README.md.

Notes

  • Until this lands, the alias is documented as intentional and temporary in clients/mcpi/README.md and AGENTS.md.
  • The TUI has its own copy of some of this logic; worth checking whether it can consume the same shared surface in the same pass.

Activity

  1. added this to the v2.9.0 milestone on Sep 23, 2026
  2. added
    v2Issues and PRs for v2
    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior change
    on Sep 23, 2026
  3. added a commit that references this issue on Sep 23, 2026
  4. cliffhall commented on Sep 24, 2026

    @cliffhall
    Member

    Triage: Priority Medium (total 6)

    • Severity 2 — internal layering debt (mcpi compiles against clients/cli/src through a temporary alias); no user-facing breakage
    • Urgency 3 — already scheduled for this milestone
    • Bonuses: +1 milestone (v2.9.0)

    Board: #28, Status Todo — the issue already carried a milestone, so it was approved and only the card was missing.

  5. modified the milestones: v2.9.0, v2.10.0, on Sep 30, 2026
  6. changed the title [-]chore(mcpi): replace the temporary @inspector/cli source alias with a real shared surface[/-] [+]chore(mcpdo): replace the temporary @inspector/cli source alias with a real shared surface[/+] on Oct 5, 2026
  7. modified the milestones: , v2.10.0 on Oct 5, 2026
  8. self-assigned this
    on Oct 7, 2026
  9. added 2 commits that reference this issue on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions