feat: replace node-sdk with ky-based HTTP transport - #19
Merged
Conversation
Remove the upstream SDK entirely and replace it with a per-instance ky-based HTTP transport. Each createAssemblyKit() call now creates a fully independent ky client with its own rate limiter, retry config, and auth headers — no shared singletons. Key changes: - Add src/transport/ — ky + p-throttle transport with error mapping - Add src/constants/kit-mode.ts — KitMode enum (local | marketplace) - Add src/version.ts — SDK version constant - Rewrite all 28 resource modules to use transport directly - Remove BaseResource, sdk-init.ts, and @assembly-js/node-sdk dependency - Replace isMarketplaceApp with kitMode option - Simplify AssemblyKit class (token is single source of truth) - Local mode: only apiKey required, workspaceId and token optional - Marketplace mode: either token or workspaceId required - Dependencies: +ky +p-throttle, -p-retry -@assembly-js/node-sdk Co-Authored-By: Claude Opus 4.6 (1M context) <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
@assembly-js/node-sdkentirely — no more singletonOpenAPIobjectcreateAssemblyKit()creates a fully independentkyclient with its own rate limiter, retry, and auth headersKitModeenum (local|marketplace) replacingisMarketplaceAppbooleanTransportdirectly (no moreBaseResource)AssemblyKitclass —token: AssemblyToken | undefinedis the single source of truthBreaking changes
isMarketplaceAppoption →kitMode: KitMode.Marketplaceretryoption →retryCount(number, default 2)kit.currentToken→kit.token?.currentTokenkit.payload→kit.token?.payloadworkspaceId— onlyapiKeyis needed@assembly-js/node-sdkremovedky,p-throttleNew files
src/transport/— ky HTTP client, error mapping, rate limiting, search params, response parsingsrc/constants/kit-mode.ts—KitModeenum-like constsrc/version.ts— SDK version constantTest plan
pnpm run build— 268 files, no errorspnpm run check— 0 lint/type errors across 131 filespnpm test— 171 tests pass (5 files)grep @assembly-js/node-sdk dist/— zero hitskyandp-throttleremain external in dist (not bundled)🤖 Generated with Claude Code