feat: reuse ADT-for-VSC destinations.json connection config (#442)#443
Open
marianfoo wants to merge 1 commit into
Open
feat: reuse ADT-for-VSC destinations.json connection config (#442)#443marianfoo wants to merge 1 commit into
marianfoo wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #442.
What
Opt-in
SAP_ADTLS_DESTINATION(+ optionalSAP_ADTLS_DESTINATIONS_FILE, default~/.adtls/destinations.json) lets ARC-1 reuse a connection already configured in SAP ADT for VS Code. The named destination seedsSAP_URL/SAP_USER/SAP_CLIENT/SAP_LANGUAGE, sitting below any explicit flag/env value:@albertmink filed #442 noting that the plugin's connection config duplicates what
~/.adtls/destinations.jsonalready 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:
passwordkey in any destination on disk.adt-lsdoesn't persist the create-time password (arc-1-lsp/docs/adt-ls-headless-notes.md:85).So
SAP_PASSWORDis still required separately.reentranceTicket/oauth/ssodestinations only carry asystemUrl(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)SAP_ADTLS_DESTINATION=A4H(reentranceTicket dest)url=https://a4h.marianzeis.desourcedfile …#A4H; client/language → defaults; password empty+ SAP_URL=http://explicit:8080Unit: 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.ts—resolveStrgains 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_userno longer hard-required (a destination can supply them).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