Skip to content
Planned interfaceSpecification; not implemented

TypeScript SDK specification

Planned. No public RegesARC npm SDK is published or qualified. The typed window.reges bridge exists only inside the owned native renderer; it is not a package to import into another website.

A future SDK should call the authenticated public API and discover the server’s declared version/capabilities. Node and browser clients have different trust boundaries. Browser-safe code must never include a runtime administrative key, launch local processes, bypass CORS or expose native filesystem access.

The existing desktop bridge is useful design input: it has explicit load options, results and request-correlated chunks. A public SDK needs its own versioning, transport, authentication and lifecycle policy rather than exporting the preload wholesale.

Use typed event unions and a clear terminal result. Handle text, reasoning, usage, tool-call fragments, errors and completion distinctly. Support AbortSignal with documented settlement semantics, and test that cancellation reaches actual owned work. Accumulating a final string must not discard an error event or mistake a truncated stream for success.

Resource cleanup should cover readers, subscriptions, timers and background reconnection tasks. Publish explicit behavior for client disposal and server restart. Avoid silent retries that repeat tool side effects or duplicate lifecycle jobs.

A client must not assume every model can use tools, vision, embeddings or structured output because the server supports a route. The serving-model identity remains the actual local artifact/instance. Unsupported fields receive actionable errors.

Provide runtime validation at trust boundaries, not just TypeScript types that vanish after compilation. Preserve unknown optional fields where forward compatibility requires it, but do not silently accept security-sensitive configuration.

Before documenting an install command, establish the real package name, registry ownership, version, license, provenance and supported runtimes. Test Node/browser entry points, bundling, authentication, cancellation, timeouts, errors and protocol fixtures against actual server versions.

LM Studio’s TypeScript SDK docs describe that product’s client and plugin APIs. They are an upstream reference, not a claim that its SDK can operate RegesARC or that RegesARC already supports the same plugin contract.