Skip to content

feat(proxy): unify proxy connect into one command with target flags - #479

Open
vadimvlasenko wants to merge 7 commits into
mainfrom
feature/vscode-claude-noauth-desktop-connect
Open

feat(proxy): unify proxy connect into one command with target flags#479
vadimvlasenko wants to merge 7 commits into
mainfrom
feature/vscode-claude-noauth-desktop-connect

Conversation

@vadimvlasenko

@vadimvlasenko vadimvlasenko commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Unifies codemie proxy connect into a single command that takes orthogonal target flags, replacing the separate connect desktop and connect vscode subcommands. One invocation can configure any combination of the Claude Desktop app, VS Code Copilot BYOK models, and the VS Code Claude Code extension over a single daemon lifecycle. The earlier opt-in --vscode-claude-code flag (previously a connect desktop sub-flag) is reworked into a standalone target on the unified command.

Changes

  • New codemie proxy connect with composable flags: --claude-desktop, --vscode, --vscode-claude-code — the union is written over one daemon lifecycle.
  • Per-target success/failure summary; process.exitCode = 1 on any partial failure; the daemon is kept if ≥1 target succeeds and rolled back only if all fail and it was started this run.
  • Bare connect prints a friendly target list and exits 0 (writes nothing).
  • connect desktop / connect vscode kept as deprecated aliases with a highlighted chalk.bold.yellow notice pointing to the new flag form.
  • --insiders with no VS Code target warns and continues.
  • Telemetry: primary-by-priority mapping collapses onto the two existing identities (claude-desktop / vscode-byok) — no new telemetry value, single-target runs spawn a byte-identical daemon.
  • One strict daemonMatchesRequest path for every caller (the loose desktop gate removed).
  • Extracted a testable connect-orchestrator.ts; config writers unchanged. enablePositionalOptions() added on proxy/connect so aliases can reuse --profile.

Testing

  • Tests added — 24 new unit/wiring tests (identity mapping, daemon lifecycle, per-target dispatch, summary, partial-failure/rollback, alias wiring)
  • Full unit suite green (2969 passed); lint / typecheck / build clean; qa-gates (incl. integration, secrets, commitlint) all pass
  • 3-lens code review: 2 findings raised (fall-through guard, unconditional §3.4 summary) and fixed; check round approved

Checklist

  • Code follows project standards
  • CI is green (npm run ci)
  • No breaking changes for released surface — deprecated aliases preserve connect vscode + vscode-byok; the reworked --vscode-claude-code flag was unreleased

vadimvlasenko and others added 5 commits August 11, 2026 13:48
New connectors/vscode-claude-code.ts connector writes claudeCode.disableLoginPrompt
and claudeCode.environmentVariables (ANTHROPIC_BASE_URL/ANTHROPIC_AUTH_TOKEN) into
the VS Code Claude Code extension's settings.json, upserting only the CodeMie-managed
env var entries and preserving everything else. Exports getVsCodeProductDir and
writeAtomically from vscode.ts for reuse instead of duplicating per-OS path/atomic-write
logic.

Part of vscode-claude-noauth-desktop-connect (Tasks 1-2).

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
Adds an opt-in --vscode-claude-code flag (plus --insiders) to
'codemie proxy connect desktop'. When passed, after Claude Desktop's
own config is written, it calls writeVsCodeClaudeCodeConfig with the
same local gateway URL/key, non-fatally (its own try/catch, no rollback
of the already-succeeded Desktop config on failure).

Part of vscode-claude-noauth-desktop-connect (Task 3).

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
….CR-005)

- CR-001: getVsCodeClaudeCodeSettingsPath now throws ConfigurationError when
  the target VS Code/Insiders product directory doesn't exist, mirroring
  vscode.ts's getVsCodeLanguageModelsPath, instead of silently writing into
  a directory tree nothing will ever read.
- CR-002: a malformed (non-array) existing claudeCode.environmentVariables
  value is now logged and replaced instead of silently discarded.
- CR-003: upsertManagedEnvVars no longer crashes on null/non-object array
  entries — they are dropped with a warning instead of throwing a raw
  TypeError.
- CR-004: pre-existing duplicate-named managed entries are now de-duplicated
  (keeping the freshly-written value) instead of leaving stale duplicates.
- CR-005: removed index.ts's duplicate, untested secret-bearing log call —
  the connector already logs the same event internally with sanitized
  values, so the redundant/untested call site is gone rather than needing
  its own test.

Adds Vitest coverage for all four connector-level fixes and the new
install-presence check (getVsCodeClaudeCodeSettingsPath).

Part of vscode-claude-noauth-desktop-connect (code-review.final fix-up).

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
…connect

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
Replace the connect desktop / connect vscode subcommands with a single
`codemie proxy connect` taking orthogonal target flags (--claude-desktop,
--vscode, --vscode-claude-code) over one daemon lifecycle. Adds a per-target
summary and a non-zero exit on partial failure; deprecated aliases are
retained with highlighted notices; bare connect prints a target list.
Config writers unchanged. Adds connect-orchestrator.ts and 24 unit/wiring
tests. Refs PR #479.

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
@vadimvlasenko vadimvlasenko changed the title feat(proxy): add opt-in VS Code Claude Code extension config to connect desktop feat(proxy): unify proxy connect into one command with target flags Aug 12, 2026
vadimvlasenko and others added 2 commits August 12, 2026 17:12
Reconcile #481 (managed-MCP oauth-shape logging + Claude Desktop
managed-settings override warning) into the unified connect orchestrator's
runClaudeDesktop; index.ts resolved to the unified command structure.

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
…ommands

Add a "Connect clients via CodeMie Proxy" section covering the unified
command with composable target flags (--claude-desktop, --vscode,
--vscode-claude-code), and mark the connect desktop / connect vscode
subcommands as deprecated aliases. Swap the primary command examples in the
VS Code BYOK and Claude Desktop sections to the new flags.

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants