Skip to content

feat: reuse ADT-for-VSC destinations.json connection config (#442)#443

Open
marianfoo wants to merge 1 commit into
mainfrom
claude/nice-grothendieck-4df4b7
Open

feat: reuse ADT-for-VSC destinations.json connection config (#442)#443
marianfoo wants to merge 1 commit into
mainfrom
claude/nice-grothendieck-4df4b7

Conversation

@marianfoo

Copy link
Copy Markdown
Owner

Closes #442.

What

Opt-in SAP_ADTLS_DESTINATION (+ optional SAP_ADTLS_DESTINATIONS_FILE, default ~/.adtls/destinations.json) lets ARC-1 reuse a connection already configured in SAP ADT for VS Code. The named destination seeds SAP_URL / SAP_USER / SAP_CLIENT / SAP_LANGUAGE, sitting below any explicit flag/env value:

CLI > env > .env > adtls destination > defaults

@albertmink filed #442 noting that the plugin's connection config duplicates what ~/.adtls/destinations.json already holds. This dedups the non-secret half.

The one hard limitation (validated, not assumed)

The password is never read — it isn't in the file. ADT keeps it in the OS secret store, not the JSON. Confirmed two ways:

  1. Live: no password key in any destination on disk.
  2. SAP's own adt-ls doesn't persist the create-time password (arc-1-lsp/docs/adt-ls-headless-notes.md:85).

So SAP_PASSWORD is still required separately. reentranceTicket/oauth/sso destinations only carry a systemUrl (ARC-1's MCP server does Basic/cookie/BTP-OAuth, not browser reentrance), so those seed the URL only. The reader is fail-soft (unknown id / missing file → warn + fall through) and read-only — it never mutates the shared store.

Live verification (real ~/.adtls/destinations.json)

Scenario Result
SAP_ADTLS_DESTINATION=A4H (reentranceTicket dest) url=https://a4h.marianzeis.de sourced file …#A4H; client/language → defaults; password empty
+ SAP_URL=http://explicit:8080 url = explicit env value (env wins)

Unit: 7 new tests in config.test.ts (basicAuth fills 4 fields, reentrance fills url only, env-override, unknown id / missing file fail-soft, never reads password). Full gate green: lint, typecheck, test (3848), build, check:sizes, validate:policy.

Files

  • src/server/adtls-destinations.ts — new read-only reader (fail-soft).
  • src/server/config.tsresolveStr gains an env↔default fallback; wires the 4 connection fields.
  • .claude-plugin/plugin.json + mcpb-manifest.json — optional "ADT-for-VSC Destination" field; sap_url/sap_user no longer hard-required (a destination can supply them).
  • Docs: AGENTS.md, docs_page/configuration-reference.md, .env.example.
  • tests/unit/plugin/plugin-manifest.test.ts — updated three-surface guard.

Dossier with the full root-cause analysis: research/issues/442-dedup-adtls-destinations.md.

🤖 Generated with Claude Code

Opt-in SAP_ADTLS_DESTINATION (+ SAP_ADTLS_DESTINATIONS_FILE) reads a named
destination from SAP ADT for VS Code's ~/.adtls/destinations.json and seeds
SAP_URL / SAP_USER / SAP_CLIENT / SAP_LANGUAGE, sitting below any explicit
flag/env value (CLI > env > .env > adtls > defaults).

The password is intentionally never read — ADT keeps it in the OS secret
store, not the JSON (verified live + against adt-ls behavior), so SAP_PASSWORD
is still required. reentranceTicket/oauth/sso destinations only supply the URL.
Reader is fail-soft and read-only — it never mutates the shared file.

Plugin/mcpb dialogs gain an optional "ADT-for-VSC Destination" field; url/user
are no longer hard-required there since a destination can supply them.

Dossier: research/issues/442-dedup-adtls-destinations.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

Dedup connection configurations

1 participant