-
Notifications
You must be signed in to change notification settings - Fork 1
TypeScript/JavaScript SDK #11
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestsdkSDK implementations (Python, TypeScript, Go)SDK implementations (Python, TypeScript, Go)
Description
Summary
LDP needs a TypeScript/JavaScript SDK for the web and Node.js ecosystem. This is the second most important SDK after Python.
What to do
- Create
sdk/typescript/with a proper npm package structure - Implement TypeScript types for all protocol types (matching Python SDK 1:1):
LdpIdentityCard,LdpCapability,QualityMetricsPayloadMode,TrustDomain,ProvenanceLdpEnvelope,LdpMessageBodySessionConfig,LdpSession
- Implement
LdpClientwith fetch-based HTTP client - Implement
LdpRouterwith quality/cost/latency/balanced strategies - Add tests with vitest or jest
Package structure
sdk/typescript/
├── package.json
├── tsconfig.json
├── src/
│ ├── index.ts
│ ├── types/
│ │ ├── identity.ts
│ │ ├── capability.ts
│ │ ├── messages.ts
│ │ ├── payload.ts
│ │ ├── provenance.ts
│ │ ├── session.ts
│ │ └── trust.ts
│ ├── client.ts
│ └── router.ts
└── tests/
Why this matters
The web/Node.js ecosystem is huge. A TypeScript SDK unlocks: browser-based LDP clients, Next.js/Express server delegates, Cloudflare Worker delegates, and Deno/Bun compatibility.
References
- Python SDK (reference):
sdk/python/src/ldp_protocol/ - A2A's TypeScript SDK: https://github.com/a2aproject/a2a-js (480 stars)
Acceptance criteria
- Types match the Python SDK 1:1
-
LdpClientwith discover, session management, submit_task -
LdpRouterwith 4 routing strategies - Published to npm as
ldp-protocol - Tests passing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsdkSDK implementations (Python, TypeScript, Go)SDK implementations (Python, TypeScript, Go)