You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use tsup for the dual ESM/CJS build; it Just Works for this kind of SDK
Use strict TypeScript ("strict": true in tsconfig) + no implicit any — the value of a typed SDK is what's typed
For browser-safe builds: avoid Node-specific imports in the core client; keep fs, crypto.randomBytes, etc. behind environment-conditional imports
For SSE in the browser: native EventSource is fine for most browsers; only polyfill if a vendor target is older
Watch for: the SDK is the typed-by-default surface for vendor integrations. If you let any slip into the public API, vendor type-checkers will silently miss bugs.
Use the /agentkeys-issue-create skill for follow-up issues (e.g., React hooks, Deno-specific build)
Context
The TypeScript SDK is the second SDK (Python is #119). Sister deliverable; same shape; different ecosystem.
Why TypeScript matters in M3:
Scope (M3)
SDK design
package.json)client.identity.whoami(actor)client.memory.get(...)/client.memory.put(...)client.permission.check(...)client.cap.mint(...)/client.cap.revoke(...)client.audit.append(...)anyin the public API surfacePackaging
@agentkeys/sdkExamples
Out of scope (defer)
useAgentKeys) — M4, after the parent-UI UI primitives stabilizeAcceptance criteria
npm install @agentkeys/sdkworks on Node 18, 20, 22anyin the public API surfaceRisks
tsupwith documented dual-build config; test consumer import from a freshnpm initprojectReferences
docs/spec/plans/milestones-roadmap.md§4 (M3 scope)docs/research/agent-iam-strategy.md§5 Phase 3 (runtime neutrality + SDK ecosystem)Effort
~1 week. Sequencing:
Pickup notes for the next agent / developer
tsupfor the dual ESM/CJS build; it Just Works for this kind of SDK"strict": truein tsconfig) + no implicit any — the value of a typed SDK is what's typedfs,crypto.randomBytes, etc. behind environment-conditional importsEventSourceis fine for most browsers; only polyfill if a vendor target is olderanyslip into the public API, vendor type-checkers will silently miss bugs./agentkeys-issue-createskill for follow-up issues (e.g., React hooks, Deno-specific build)