Skip to content

feat: replace node-sdk with ky-based HTTP transport - #19

Merged
priosshrsth merged 1 commit into
mainfrom
feat/ky-transport
Mar 29, 2026
Merged

feat: replace node-sdk with ky-based HTTP transport#19
priosshrsth merged 1 commit into
mainfrom
feat/ky-transport

Conversation

@priosshrsth

Copy link
Copy Markdown
Collaborator

Summary

  • Removes @assembly-js/node-sdk entirely — no more singleton OpenAPI object
  • Each createAssemblyKit() creates a fully independent ky client with its own rate limiter, retry, and auth headers
  • Adds KitMode enum (local | marketplace) replacing isMarketplaceApp boolean
  • Rewrites all 28 resource modules to use Transport directly (no more BaseResource)
  • Simplifies AssemblyKit class — token: AssemblyToken | undefined is the single source of truth

Breaking changes

  • isMarketplaceApp option → kitMode: KitMode.Marketplace
  • retry option → retryCount (number, default 2)
  • kit.currentTokenkit.token?.currentToken
  • kit.payloadkit.token?.payload
  • Local mode no longer requires workspaceId — only apiKey is needed
  • Peer dependency on @assembly-js/node-sdk removed
  • New runtime dependencies: ky, p-throttle

New files

  • src/transport/ — ky HTTP client, error mapping, rate limiting, search params, response parsing
  • src/constants/kit-mode.tsKitMode enum-like const
  • src/version.ts — SDK version constant

Test plan

  • pnpm run build — 268 files, no errors
  • pnpm run check — 0 lint/type errors across 131 files
  • pnpm test — 171 tests pass (5 files)
  • grep @assembly-js/node-sdk dist/ — zero hits
  • ky and p-throttle remain external in dist (not bundled)

🤖 Generated with Claude Code

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>
@priosshrsth
priosshrsth merged commit 370d14c into main Mar 29, 2026
6 checks passed
@priosshrsth
priosshrsth deleted the feat/ky-transport branch March 29, 2026 11:37
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.

1 participant