mirror of
https://github.com/turnstonelabs/turnstone.git
synced 2026-08-12 23:12:23 -06:00
5ee539c983
* Add Python and TypeScript client SDKs for server and console APIs Python SDK (turnstone/sdk/) with sync + async clients for both server and console APIs. Returns Pydantic models directly, streams SSE events as typed dataclasses. 27 event types with registry-based deserialization. High-level send_and_wait() for request-response patterns. TypeScript SDK (sdk/typescript/) with zero browser dependencies. Uses fetch + ReadableStream for SSE parsing. Discriminated union event types with type guards. Same API surface as Python SDK. 63 Python tests, 21 TypeScript tests (vitest). Comprehensive docs at docs/sdk.md with SDK architecture diagram. * Address PR #19 review feedback + fix lint - Fix consume_task leak in send_and_wait when send() raises (try/finally) - Fix TS sendAndWait: open SSE before send, plumb AbortSignal for timeout - Add signal param to TS streamSSE for cancellation support - Fix SSE parser: join multi-line data: fields with \n per spec, handle CRLF - Fix generate-types.py sys.path (parents[3] not parents[2]) - Document token ignored when httpx_client provided - Document TS timeout units as milliseconds - Fix stale docstring in test_sdk_sse.py - Fix import sorting (ruff I001)
39 lines
747 B
JSON
39 lines
747 B
JSON
{
|
|
"name": "@turnstone/sdk",
|
|
"version": "0.3.0",
|
|
"description": "TypeScript client SDK for the turnstone AI orchestration platform",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"typecheck": "tsc --noEmit",
|
|
"generate-types": "python scripts/generate-types.py"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src"
|
|
],
|
|
"keywords": [
|
|
"turnstone",
|
|
"ai",
|
|
"llm",
|
|
"agent",
|
|
"sdk",
|
|
"client"
|
|
],
|
|
"license": "BUSL-1.1",
|
|
"devDependencies": {
|
|
"typescript": "^5.4",
|
|
"vitest": "^2.0"
|
|
}
|
|
}
|