ServerSpec: per-package adapter registry (grow FLAG_ENV_MIGRATIONS into the server-package axis) #90

Closed
opened 2026-08-12 02:33:59 -04:00 by the_og · 0 comments
Owner

Why

BCC models which host reads a config (ClientSpec) but not which server package it's editing. The ssh-mcp field notes (see BCC-ROADMAP-ssh-mcp-notes-COWORK.md) are almost all consequences of that missing axis. We already planted its seed: FLAG_ENV_MIGRATIONS (bcc_core.py, shipped in #89) is a per-package registry keyed by npm name.

What

Promote FLAG_ENV_MIGRATIONS into a richer, orthogonal ServerSpec registry — the foundation the sidecar/version/schema/auth work all hang off:

ServerSpec("ssh-mcp"):
    removed_flags   # already have (FLAG_ENV_MIGRATIONS)
    sidecar_paths   # per-platform TOML location            → #sidecar issue
    schema          # auth/approvalMode/role/port enums      → later
    auth_methods    # agent|key|password|keychain, ranked    → later
    version/spec    # resolved version, pin, drift           → #version issue

Non-reversing constraints:

  • migrate_removed_flags must keep reading the same data through the new struct — behaviour-identical; #89's tests stay green.
  • ServerSpec is a new axis; ClientSpec is untouched. A server has both.

Also fold in the two #4 follow-ups (now unblocked by the field notes)

  • --sudoPassword and --suPassword → SSH_MCP_SUDO_PASSWORD (both; confirmed by the package's own removed-flag table in the notes). Add to the auto-migrate map; the existing no-clobber logic already handles both mapping to one var.
  • --maxChars=none semantic drift: v1 silently turned none into a 5000-char cap (parseInt(x)||5000); flag configs still carrying --maxChars=none as changed-meaning.

Acceptance

Pure bcc_core, fully unit-tested, zero GUI risk. ruff + pytest green. No behaviour change to existing migration.

Part of the ssh-mcp field-notes epic.

## Why BCC models *which host reads a config* (`ClientSpec`) but not *which server package it's editing*. The ssh-mcp field notes (see `BCC-ROADMAP-ssh-mcp-notes-COWORK.md`) are almost all consequences of that missing axis. We already planted its seed: `FLAG_ENV_MIGRATIONS` (`bcc_core.py`, shipped in #89) is a per-package registry keyed by npm name. ## What Promote `FLAG_ENV_MIGRATIONS` into a richer, orthogonal `ServerSpec` registry — the foundation the sidecar/version/schema/auth work all hang off: ``` ServerSpec("ssh-mcp"): removed_flags # already have (FLAG_ENV_MIGRATIONS) sidecar_paths # per-platform TOML location → #sidecar issue schema # auth/approvalMode/role/port enums → later auth_methods # agent|key|password|keychain, ranked → later version/spec # resolved version, pin, drift → #version issue ``` Non-reversing constraints: - `migrate_removed_flags` must keep reading the same data through the new struct — behaviour-identical; #89's tests stay green. - `ServerSpec` is a **new** axis; `ClientSpec` is untouched. A server has both. ## Also fold in the two #4 follow-ups (now unblocked by the field notes) - `--sudoPassword` and `--suPassword` → **`SSH_MCP_SUDO_PASSWORD`** (both; confirmed by the package's own removed-flag table in the notes). Add to the auto-migrate map; the existing no-clobber logic already handles both mapping to one var. - `--maxChars=none` semantic drift: v1 silently turned `none` into a 5000-char cap (`parseInt(x)||5000`); flag configs still carrying `--maxChars=none` as changed-meaning. ## Acceptance Pure `bcc_core`, fully unit-tested, zero GUI risk. `ruff` + `pytest` green. No behaviour change to existing migration. Part of the ssh-mcp field-notes epic.
the_og added the P1 label 2026-08-12 02:33:59 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: the_og/better-claude-config#90