@ceralive/cerastream 2026.7.1 → 2026.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,6 +10,8 @@ engine's JSON-RPC 2.0 / NDJSON control plane over a Unix domain socket.
10
10
  - Two-tier error codes (RPC + runtime)
11
11
  - A unified engine config schema (= `start` params)
12
12
  - A `CerastreamClient` interface + `connect()` factory (UDS transport)
13
+ - Additive `client.getCapabilities()` discovery for platform, source, encoder, and
14
+ local preview availability
13
15
 
14
16
  The Zod schemas, types, and constants are the frozen wire contract; `connect()`
15
17
  drives that contract over an NDJSON/UDS transport with no native dependencies.
@@ -45,6 +47,8 @@ import { connect } from "@ceralive/cerastream";
45
47
 
46
48
  const client = await connect({ autoReconnect: true }); // hello handshake runs here
47
49
  console.log(client.hello.engine_version);
50
+ const capabilities = await client.getCapabilities();
51
+ console.log(capabilities.preview?.bound);
48
52
 
49
53
  const sub = await client.subscribeEvents({ topics: ["status", "bitrate"] }, (ev) => {
50
54
  if (ev.type === "bitrate") console.log("bitrate", ev.current_bitrate);
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type HelloResult } from "./envelope.js";
2
2
  import { type EventParams } from "./events.js";
3
- import { type ListDevicesParams, type ListDevicesResult, type PreviewSessionParams, type PreviewSessionResult, type ReloadConfigParams, type ReloadConfigResult, type SetBitrateParams, type SetBitrateResult, type StartParams, type StartResult, type StopParams, type StopResult, type SubscribeEventsParams, type SubscribeEventsResult, type SwitchInputParams, type SwitchInputResult } from "./messages.js";
3
+ import { type GetCapabilitiesResult, type ListDevicesParams, type ListDevicesResult, type PreviewSessionParams, type PreviewSessionResult, type ReloadConfigParams, type ReloadConfigResult, type SetBitrateParams, type SetBitrateResult, type StartParams, type StartResult, type StopParams, type StopResult, type SubscribeEventsParams, type SubscribeEventsResult, type SwitchInputParams, type SwitchInputResult } from "./messages.js";
4
4
  /** Options for {@link connect}. All optional — `connect({})` is valid. */
5
5
  export interface ConnectOptions {
6
6
  /** Control socket path override. Defaults to the resolved /run/cerastream/control.sock. */
@@ -77,6 +77,11 @@ export interface CerastreamClient {
77
77
  * @returns The discovered capture devices.
78
78
  */
79
79
  listDevices(params?: ListDevicesParams): Promise<ListDevicesResult>;
80
+ /**
81
+ * Read the engine's additive capability contract, including local preview
82
+ * availability. This request intentionally sits outside the frozen v1 map.
83
+ */
84
+ getCapabilities(): Promise<GetCapabilitiesResult>;
80
85
  /**
81
86
  * Subscribe to the live event stream; `handler` fires for each pushed event.
82
87
  * @param params The topics to subscribe to (absent ⇒ all topics).
package/dist/client.js CHANGED
@@ -3,7 +3,7 @@ import { helloResultSchema, rpcErrorSchema, rpcResponseSchema, } from "./envelop
3
3
  import { CerastreamConnectionError, CerastreamRpcError, CerastreamTimeoutError, } from "./errors.js";
4
4
  import { eventParamsSchema } from "./events.js";
5
5
  import { controlSocketPath } from "./paths.js";
6
- import { requestSchemas, } from "./messages.js";
6
+ import { getCapabilitiesResultSchema, requestSchemas, } from "./messages.js";
7
7
  import { LineSocket } from "./transport.js";
8
8
  const DEFAULTS = {
9
9
  requestTimeoutMs: 10_000,
@@ -78,6 +78,9 @@ class ClientImpl {
78
78
  listDevices(params) {
79
79
  return this.call("list-devices", params);
80
80
  }
81
+ async getCapabilities() {
82
+ return getCapabilitiesResultSchema.parse(await this.rawRequest("get-capabilities", undefined));
83
+ }
81
84
  previewSession(params) {
82
85
  return this.call("preview-session", params);
83
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceralive/cerastream",
3
- "version": "2026.7.1",
3
+ "version": "2026.7.2",
4
4
  "description": "Type-safe TypeScript schema + IPC client for the cerastream streaming engine (JSON-RPC 2.0 / NDJSON over a Unix domain socket).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",