Conversation
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.
Purpose
Give headless product clients (including GTM's existing hosted business-trial recorder) a safe way to use an already-issued operator key without exporting a browser session. This belongs at the shared application boundary, not in a GTM-specific auth wrapper.
Implementation
createApiKeyFetchthrough the existing/websubpath; no new package, subpath, peer, workflow engine, auth issuer, or scheduler.docs/api-key-client.mdexplains ownership, adoption, and security/release boundaries. Existing Hub and assistant clients remain unchanged: they target different protocols.Verification actually executed
26/26 focused checks passed against the candidate source, including actual Node HTTP servers for authenticated POST/read and a redirect to another listener. Tests use the real fetch implementation for those two cases. A subsequent local recheck again passed 26/26, and the local source blob matches pushed blob
2c965d742f5587ef67ae74b233d76d5cfbd084ff.Mutation control: changing
redirect: 'manual'tofollowfails 2/26 checks, including the redirect destination being reached. The destination assertion counts requests; it does not establish that the Authorization header was forwarded. Restoring the source passes 26/26.Local environment has Node 22.16.0 and TypeScript but cannot resolve registry.npmjs.org. The test source was transpiled with TypeScript and its
itimport changed only in the temporary executable copy from Vitest to node:test; assertions and production module were unchanged. Full installed-dependency typecheck, build, package signoff, and live authenticated GTM/provider tests were not run. This is source review readiness, not production certification.Consumer / scope
GTM #1093 consumes this addition in its hosted recorder, with a release-prerequisite check rather than an application-local copy. The consumer still needs the normally published package and generated dependency lock. Its server owns scope/expiry/workspace authorization and billing. API keys currently inherit account access, so live trials require a dedicated test identity, not the founder's account-wide key. Keep live Stripe and production outreach credentials out of that test identity.