feat: Cloudflare Workers support and IMS token exchange#16
Draft
feat: Cloudflare Workers support and IMS token exchange#16
Conversation
Remove aem-docs-search and block-collection tools. These capabilities are now provided by adobe/skills (docs-search, block-inventory, and block-collection-and-party skills). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Refactor tools to factory pattern for per-request token threading - Add worker.js and server.js for Cloudflare Workers deployment - Add IMS token exchange for AEM API router integration - Add vitest and initial test coverage for token resolution Co-Authored-By: Claude Opus 4.6 <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.
Summary
worker.js→createServer(token)→registerTools(server, token)→ tool closures)worker.jsandserver.jsfor Cloudflare Workers deployment alongside existing stdio mode/auth/adobe/exchangeToken resolution
resolveHelixToken(token, org, site, ref)inutils.jsauto-detects token type by string inspection:hlxtst_*→ site token, pass throughxxx.yyy.zzz(JWT) → IMS token, exchange via Admin APIResolution happens lazily in each tool handler (not in
helixAdminRequest) because the exchange requiresorg/site/refwhich are only available from tool arguments.Test plan
npm run lintpassesnpm testpasses (10 tests covering token resolution)🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com