Skip to content

Drop the ./server entry point in 0.2.0 #1

Description

@bodhish

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions