Summary
Remove the ./server entry point (createServerClient, createSession, mintSessionToken) in the next breaking release (0.2.0). It is not removed in 0.1.0 (already published) to avoid a breaking change on a patch/minor.
Why
./server is a TypeScript helper for the account-secret half of the flow (create session + mint scoped token). But the real consumers implement that server side in their own backend language:
- Care does it in Python via the
care-scribe-be Django plugin — a TS helper is unusable there.
- The browser SDK (the genuinely hard part: mic capture, resumable chunk upload, polling) plus a documented 2-endpoint REST contract (create session + mint token) is all any backend needs, in any language.
Shipping an unused, language-locked server helper adds public API surface and maintenance for no current consumer (YAGNI).
Plan for 0.2.0
- Remove the
./server export, src/server.ts, and its tests.
- Keep the shared types (
OutputSpec, FieldSpec, StartSessionOptions) exported from . so backends can still type their payloads.
- Document the two backend operations as a REST contract in the README (method, path, request/response, auth), so any backend implements them.
- Bump to
0.2.0 and note the removal in the changelog.
Alternative (if a Node/TS backend consumer appears)
Keep ./server. It's tree-shakeable and harmless; re-evaluate if/when a Node-backed app actually uses it.
Summary
Remove the
./serverentry point (createServerClient,createSession,mintSessionToken) in the next breaking release (0.2.0). It is not removed in0.1.0(already published) to avoid a breaking change on a patch/minor.Why
./serveris a TypeScript helper for the account-secret half of the flow (create session + mint scoped token). But the real consumers implement that server side in their own backend language:care-scribe-beDjango plugin — a TS helper is unusable there.Shipping an unused, language-locked server helper adds public API surface and maintenance for no current consumer (YAGNI).
Plan for 0.2.0
./serverexport,src/server.ts, and its tests.OutputSpec,FieldSpec,StartSessionOptions) exported from.so backends can still type their payloads.0.2.0and note the removal in the changelog.Alternative (if a Node/TS backend consumer appears)
Keep
./server. It's tree-shakeable and harmless; re-evaluate if/when a Node-backed app actually uses it.