Skip to content

Route CLI Adapter operations exclusively through the Runtime #22

Description

@ethan-huo

Objective

Make the CLI Adapter exclusively consume the Runtime protocol for discovery, Calls, registry mutations, refresh, status, and stop.

Scope

  • Build the argc router from registrySnapshot rather than direct config reads.
  • Route tool Calls and all command-driven registry/schema/credential mutations through Runtime intents.
  • Render Runtime events and the single terminal frame without owning MCP transports or OAuth resources.
  • Close the Runtime socket and remove CLI signal/output listeners on every terminal path.
  • Delete superseded CLI-side reauth retry, direct store mutation, daemon bypass, and dual ownership paths.

Non-goals

  • Changing existing tool command names or output rendering semantics unrelated to Runtime frames.
  • Backward-compatible V2 code paths.

TDD acceptance

  • Start with failing CLI-adapter tests against the in-memory Runtime caller/transport adapters.
  • CLI source has no command-driven Registry Store, Credential Store, or Schema Cache write path.
  • Ordinary unauthenticated Calls render stable reauth-required without browser activity.
  • @add, @remove, and @refresh preserve their accepted user-visible results through Runtime operations.
  • Broken pipe, error, cancellation, and normal result paths all exit cleanly.

Verification

  • Focused router/adapter tests.
  • Local process-level CLI integration suite.
  • Full test suite, typecheck, formatter check, and git diff --check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions