@ceralive/cerastream 2026.9.4 → 2026.9.6

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
@@ -9,6 +9,7 @@ engine's JSON-RPC 2.0 / NDJSON control plane over a Unix domain socket.
9
9
  - The nine server-push event payloads (discriminated union)
10
10
  - Two-tier error codes (RPC + runtime)
11
11
  - Typed capture-probe causes retained on runtime events and rejected-start exceptions
12
+ (including HDMI `unsupported-format`, `interlaced-unsupported`, `source-changed`)
12
13
  - Typed platform capture-converter reporting (`librga`, `v4l2-rga2`, or `none`)
13
14
  - Typed RK3588 composition config (secondary input, six PiP/PbP layouts, alpha),
14
15
  gated by the READY-trialled `composition` capability token
@@ -18,6 +19,9 @@ engine's JSON-RPC 2.0 / NDJSON control plane over a Unix domain socket.
18
19
  local preview availability
19
20
  - Per-codec encoder capability entries with format, resolution/framerate, and
20
21
  explicit 4K60 qualification-gate truth
22
+ - Additive `client.setEdidProfile()` — switch the HDMI-RX EDID between the named
23
+ `full` / `robust-4k60` profiles as one transaction: written, byte-verified,
24
+ persisted, then the device projection re-read only after the link settles
21
25
  - Additive `client.changeConfig()` — reconfigure the live session (resolution,
22
26
  framerate, codec, pipeline, source) as one transaction with typed rollback;
23
27
  composition-only changes use live layout/alpha writes and secondary rebind
@@ -82,6 +86,15 @@ systemd-owned service — the client connects to it and never spawns it.
82
86
 
83
87
  ## Versioning
84
88
 
89
+ Version **2026.9.6 / schema 0.18.0** adds
90
+ `client.listSwitchTargets()` and optional `active_encode.switch_targets`.
91
+ Targets are `{input_id, kind: "capture"|"synthetic"|"network"}`; the query returns
92
+ `{session_id?, active_input?, switch_targets: [...]}`. They describe built live
93
+ legs, not idle capabilities; passthrough/composition explicitly return `[]`.
94
+ Import `SessionSwitchTarget` and `ListSwitchTargetsResult` from this package,
95
+ never shadow the wire types. Re-query before switching and handle refusal; the
96
+ snapshot does not reserve a leg. Release/publish must happen before consumption.
97
+
85
98
  Two independent version axes. The **wire-schema version** (`PROTOCOL_VERSION` +
86
99
  `SCHEMA_VERSION`) is pinned cross-language with the engine and is additive-only
87
100
  within `cerastream-ipc/1`. The **npm package version** is CalVer
package/dist/client.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { type HelloResult } from './envelope.js';
2
2
  import { type EventParams } from './events.js';
3
- import { type ChangeConfigParams, type ChangeConfigResult, type GetCapabilitiesResult, type ListDevicesParams, type ListDevicesResult, type PreviewSessionParams, type PreviewSessionResult, type ReloadConfigParams, type ReloadConfigResult, type RequestKeyframeResult, 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 ChangeConfigParams, type ChangeConfigResult, type GetCapabilitiesResult, type ListDevicesParams, type ListDevicesResult, type PreviewSessionParams, type PreviewSessionResult, type ReloadConfigParams, type ReloadConfigResult, type RequestKeyframeResult, type SetBitrateParams, type SetBitrateResult, type SetEdidProfileParams, type SetEdidProfileResult, type StartParams, type StartResult, type StopParams, type StopResult, type SubscribeEventsParams, type SubscribeEventsResult, type SwitchInputParams, type SwitchInputResult } from './messages.js';
4
+ import { type ListSwitchTargetsResult } from './session-switch.js';
4
5
  /** Options for {@link connect}. All optional — `connect({})` is valid. */
5
6
  export interface ConnectOptions {
6
7
  /** Control socket path override. Defaults to the resolved /run/cerastream/control.sock. */
@@ -65,6 +66,16 @@ export interface CerastreamClient {
65
66
  */
66
67
  setBitrate(params: SetBitrateParams): Promise<SetBitrateResult>;
67
68
  requestKeyframe(): Promise<RequestKeyframeResult>;
69
+ /**
70
+ * Switch the HDMI-RX EDID profile transactionally: write, byte-verify,
71
+ * persist, then re-read the device projection once the link has settled.
72
+ * @param params The profile to advertise.
73
+ * @returns The committed profile, the one it replaced, and the post-settle devices.
74
+ * @throws {CerastreamRpcError} `cerastream.params.invalid` prefixed
75
+ * `capture-active` while any capture leg is live — including when the driver
76
+ * itself refuses the write — and `hdmirx-unavailable` on a board with no receiver.
77
+ */
78
+ setEdidProfile(params: SetEdidProfileParams): Promise<SetEdidProfileResult>;
68
79
  /**
69
80
  * Switch the active capture source (manual) or hand selection to failover (auto).
70
81
  * @param params The target input id and switch mode.
@@ -72,6 +83,7 @@ export interface CerastreamClient {
72
83
  * @throws {CerastreamRpcError} when the input id is unknown.
73
84
  */
74
85
  switchInput(params: SwitchInputParams): Promise<SwitchInputResult>;
86
+ listSwitchTargets(): Promise<ListSwitchTargetsResult>;
75
87
  /**
76
88
  * Enumerate capture devices (GstDeviceMonitor, de-duped by device path).
77
89
  * @param params Optional media-class filter.
package/dist/client.js CHANGED
@@ -3,8 +3,9 @@ import { CONTROL_SOCKET_PATH, PROTOCOL_VERSION } from './constants.js';
3
3
  import { helloResultSchema, rpcErrorSchema, rpcResponseSchema, } from './envelope.js';
4
4
  import { CerastreamConnectionError, CerastreamRpcError, CerastreamTimeoutError, } from './errors.js';
5
5
  import { eventParamsSchema } from './events.js';
6
- import { changeConfigParamsSchema, changeConfigResultSchema, getCapabilitiesResultSchema, requestKeyframeResultSchema, requestSchemas, } from './messages.js';
6
+ import { changeConfigParamsSchema, changeConfigResultSchema, getCapabilitiesResultSchema, requestKeyframeResultSchema, requestSchemas, setEdidProfileResultSchema, } from './messages.js';
7
7
  import { controlSocketPath } from './paths.js';
8
+ import { listSwitchTargetsResultSchema } from './session-switch.js';
8
9
  import { LineSocket } from './transport.js';
9
10
  const DEFAULTS = {
10
11
  requestTimeoutMs: 10_000,
@@ -73,12 +74,18 @@ class ClientImpl {
73
74
  async requestKeyframe() {
74
75
  return requestKeyframeResultSchema.parse(await this.rawRequest('request-keyframe', {}));
75
76
  }
77
+ async setEdidProfile(params) {
78
+ return setEdidProfileResultSchema.parse(await this.rawRequest('hdmirx.setEdidProfile', params));
79
+ }
76
80
  switchInput(params) {
77
81
  return this.call('switch-input', params);
78
82
  }
79
83
  listDevices(params) {
80
84
  return this.call('list-devices', params);
81
85
  }
86
+ async listSwitchTargets() {
87
+ return listSwitchTargetsResultSchema.parse(await this.rawRequest('list-switch-targets', {}));
88
+ }
82
89
  async getCapabilities() {
83
90
  return getCapabilitiesResultSchema.parse(await this.rawRequest('get-capabilities', undefined));
84
91
  }
@@ -8,7 +8,7 @@ export declare const PROTOCOL_VERSION: 'cerastream-ipc/1';
8
8
  * additive-only within protocol major `cerastream-ipc/1` (ADR-0002 §4); this value
9
9
  * only moves when the wire schema itself does, in lockstep across both languages.
10
10
  */
11
- export declare const SCHEMA_VERSION: '0.16.0';
11
+ export declare const SCHEMA_VERSION: '0.18.0';
12
12
  /** Runtime dir holding both control + preview sockets. systemd `RuntimeDirectory=cerastream`. */
13
13
  export declare const DEFAULT_IPC_DIR: '/run/cerastream';
14
14
  /** Env override for the IPC dir (tests/dev). Defaults to {@link DEFAULT_IPC_DIR}. */
package/dist/constants.js CHANGED
@@ -11,7 +11,7 @@ export const PROTOCOL_VERSION = 'cerastream-ipc/1';
11
11
  * additive-only within protocol major `cerastream-ipc/1` (ADR-0002 §4); this value
12
12
  * only moves when the wire schema itself does, in lockstep across both languages.
13
13
  */
14
- export const SCHEMA_VERSION = '0.16.0';
14
+ export const SCHEMA_VERSION = '0.18.0';
15
15
  /** Runtime dir holding both control + preview sockets. systemd `RuntimeDirectory=cerastream`. */
16
16
  export const DEFAULT_IPC_DIR = '/run/cerastream';
17
17
  /** Env override for the IPC dir (tests/dev). Defaults to {@link DEFAULT_IPC_DIR}. */
package/dist/errors.d.ts CHANGED
@@ -99,11 +99,14 @@ export declare const captureCauseSchema: z.ZodEnum<{
99
99
  "composition-unsupported": "composition-unsupported";
100
100
  "decoder-unavailable": "decoder-unavailable";
101
101
  device_busy: "device_busy";
102
+ "interlaced-unsupported": "interlaced-unsupported";
102
103
  negotiation_failed: "negotiation_failed";
103
104
  no_signal: "no_signal";
104
105
  no_silicon_converter: "no_silicon_converter";
105
106
  "secondary-unavailable": "secondary-unavailable";
106
107
  "software-pixel-path-rejected": "software-pixel-path-rejected";
108
+ "source-changed": "source-changed";
109
+ "unsupported-format": "unsupported-format";
107
110
  }>;
108
111
  export type CaptureCause = z.infer<typeof captureCauseSchema>;
109
112
  export declare const captureCauseEntrySchema: z.ZodObject<{
@@ -112,11 +115,14 @@ export declare const captureCauseEntrySchema: z.ZodObject<{
112
115
  "composition-unsupported": "composition-unsupported";
113
116
  "decoder-unavailable": "decoder-unavailable";
114
117
  device_busy: "device_busy";
118
+ "interlaced-unsupported": "interlaced-unsupported";
115
119
  negotiation_failed: "negotiation_failed";
116
120
  no_signal: "no_signal";
117
121
  no_silicon_converter: "no_silicon_converter";
118
122
  "secondary-unavailable": "secondary-unavailable";
119
123
  "software-pixel-path-rejected": "software-pixel-path-rejected";
124
+ "source-changed": "source-changed";
125
+ "unsupported-format": "unsupported-format";
120
126
  }>;
121
127
  }, z.core.$strip>;
122
128
  export type CaptureCauseEntry = z.infer<typeof captureCauseEntrySchema>;
package/dist/errors.js CHANGED
@@ -147,6 +147,9 @@ export const captureCauseSchema = z.enum([
147
147
  'software-pixel-path-rejected',
148
148
  'composition-unsupported',
149
149
  'secondary-unavailable',
150
+ 'unsupported-format',
151
+ 'interlaced-unsupported',
152
+ 'source-changed',
150
153
  ]);
151
154
  export const captureCauseEntrySchema = z.object({
152
155
  device: z.string(),
package/dist/events.d.ts CHANGED
@@ -11,6 +11,14 @@ export declare const activeEncodeSchema: z.ZodObject<{
11
11
  resolution: z.ZodString;
12
12
  framerate: z.ZodNumber;
13
13
  active_input: z.ZodOptional<z.ZodString>;
14
+ switch_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ input_id: z.ZodString;
16
+ kind: z.ZodEnum<{
17
+ capture: "capture";
18
+ network: "network";
19
+ synthetic: "synthetic";
20
+ }>;
21
+ }, z.core.$strip>>>;
14
22
  decoder: z.ZodOptional<z.ZodString>;
15
23
  input_codec: z.ZodOptional<z.ZodString>;
16
24
  passthrough: z.ZodOptional<z.ZodBoolean>;
@@ -84,6 +92,14 @@ export declare const statusEventSchema: z.ZodObject<{
84
92
  resolution: z.ZodString;
85
93
  framerate: z.ZodNumber;
86
94
  active_input: z.ZodOptional<z.ZodString>;
95
+ switch_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ input_id: z.ZodString;
97
+ kind: z.ZodEnum<{
98
+ capture: "capture";
99
+ network: "network";
100
+ synthetic: "synthetic";
101
+ }>;
102
+ }, z.core.$strip>>>;
87
103
  decoder: z.ZodOptional<z.ZodString>;
88
104
  input_codec: z.ZodOptional<z.ZodString>;
89
105
  passthrough: z.ZodOptional<z.ZodBoolean>;
@@ -243,11 +259,14 @@ export declare const runtimeErrorEventSchema: z.ZodObject<{
243
259
  "composition-unsupported": "composition-unsupported";
244
260
  "decoder-unavailable": "decoder-unavailable";
245
261
  device_busy: "device_busy";
262
+ "interlaced-unsupported": "interlaced-unsupported";
246
263
  negotiation_failed: "negotiation_failed";
247
264
  no_signal: "no_signal";
248
265
  no_silicon_converter: "no_silicon_converter";
249
266
  "secondary-unavailable": "secondary-unavailable";
250
267
  "software-pixel-path-rejected": "software-pixel-path-rejected";
268
+ "source-changed": "source-changed";
269
+ "unsupported-format": "unsupported-format";
251
270
  }>>;
252
271
  }, z.core.$strip>;
253
272
  /** Payload of a {@link runtimeErrorEventSchema} event. */
@@ -339,6 +358,14 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
339
358
  resolution: z.ZodString;
340
359
  framerate: z.ZodNumber;
341
360
  active_input: z.ZodOptional<z.ZodString>;
361
+ switch_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
362
+ input_id: z.ZodString;
363
+ kind: z.ZodEnum<{
364
+ capture: "capture";
365
+ network: "network";
366
+ synthetic: "synthetic";
367
+ }>;
368
+ }, z.core.$strip>>>;
342
369
  decoder: z.ZodOptional<z.ZodString>;
343
370
  input_codec: z.ZodOptional<z.ZodString>;
344
371
  passthrough: z.ZodOptional<z.ZodBoolean>;
@@ -471,11 +498,14 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
471
498
  "composition-unsupported": "composition-unsupported";
472
499
  "decoder-unavailable": "decoder-unavailable";
473
500
  device_busy: "device_busy";
501
+ "interlaced-unsupported": "interlaced-unsupported";
474
502
  negotiation_failed: "negotiation_failed";
475
503
  no_signal: "no_signal";
476
504
  no_silicon_converter: "no_silicon_converter";
477
505
  "secondary-unavailable": "secondary-unavailable";
478
506
  "software-pixel-path-rejected": "software-pixel-path-rejected";
507
+ "source-changed": "source-changed";
508
+ "unsupported-format": "unsupported-format";
479
509
  }>>;
480
510
  }, z.core.$strip>, z.ZodObject<{
481
511
  type: z.ZodLiteral<"preview">;
@@ -541,6 +571,14 @@ export declare const cerastreamEventSchema: z.ZodObject<{
541
571
  resolution: z.ZodString;
542
572
  framerate: z.ZodNumber;
543
573
  active_input: z.ZodOptional<z.ZodString>;
574
+ switch_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
575
+ input_id: z.ZodString;
576
+ kind: z.ZodEnum<{
577
+ capture: "capture";
578
+ network: "network";
579
+ synthetic: "synthetic";
580
+ }>;
581
+ }, z.core.$strip>>>;
544
582
  decoder: z.ZodOptional<z.ZodString>;
545
583
  input_codec: z.ZodOptional<z.ZodString>;
546
584
  passthrough: z.ZodOptional<z.ZodBoolean>;
@@ -673,11 +711,14 @@ export declare const cerastreamEventSchema: z.ZodObject<{
673
711
  "composition-unsupported": "composition-unsupported";
674
712
  "decoder-unavailable": "decoder-unavailable";
675
713
  device_busy: "device_busy";
714
+ "interlaced-unsupported": "interlaced-unsupported";
676
715
  negotiation_failed: "negotiation_failed";
677
716
  no_signal: "no_signal";
678
717
  no_silicon_converter: "no_silicon_converter";
679
718
  "secondary-unavailable": "secondary-unavailable";
680
719
  "software-pixel-path-rejected": "software-pixel-path-rejected";
720
+ "source-changed": "source-changed";
721
+ "unsupported-format": "unsupported-format";
681
722
  }>>;
682
723
  }, z.core.$strip>, z.ZodObject<{
683
724
  type: z.ZodLiteral<"preview">;
@@ -747,6 +788,14 @@ export declare const eventSchemas: {
747
788
  resolution: z.ZodString;
748
789
  framerate: z.ZodNumber;
749
790
  active_input: z.ZodOptional<z.ZodString>;
791
+ switch_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
792
+ input_id: z.ZodString;
793
+ kind: z.ZodEnum<{
794
+ capture: "capture";
795
+ network: "network";
796
+ synthetic: "synthetic";
797
+ }>;
798
+ }, z.core.$strip>>>;
750
799
  decoder: z.ZodOptional<z.ZodString>;
751
800
  input_codec: z.ZodOptional<z.ZodString>;
752
801
  passthrough: z.ZodOptional<z.ZodBoolean>;
@@ -884,11 +933,14 @@ export declare const eventSchemas: {
884
933
  "composition-unsupported": "composition-unsupported";
885
934
  "decoder-unavailable": "decoder-unavailable";
886
935
  device_busy: "device_busy";
936
+ "interlaced-unsupported": "interlaced-unsupported";
887
937
  negotiation_failed: "negotiation_failed";
888
938
  no_signal: "no_signal";
889
939
  no_silicon_converter: "no_silicon_converter";
890
940
  "secondary-unavailable": "secondary-unavailable";
891
941
  "software-pixel-path-rejected": "software-pixel-path-rejected";
942
+ "source-changed": "source-changed";
943
+ "unsupported-format": "unsupported-format";
892
944
  }>>;
893
945
  }, z.core.$strip>;
894
946
  readonly preview: z.ZodObject<{
package/dist/events.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { captureCauseSchema, processErrorCodeSchema, processErrorSourceSchema } from './errors.js';
3
+ import { sessionSwitchTargetSchema } from './session-switch.js';
3
4
  import { captureDeviceSchema, configChangePhaseSchema, inputModeSchema, mediaClassSchema, previewEncodeFallbackSchema, previewEncodeModeSchema, streamStateSchema, } from './types.js';
4
5
  // Server → client `event` notifications, delivered after `subscribe-events`
5
6
  // (schema.md "Events"). Each event is the inner `params` of an rpcEventSchema:
@@ -17,6 +18,7 @@ export const activeEncodeSchema = z.object({
17
18
  resolution: z.string(), // "WxH" pixels in effect, e.g. "1920x1080"
18
19
  framerate: z.number(), // fps in effect, e.g. 29.97
19
20
  active_input: z.string().optional(), // active input id feeding the encode
21
+ switch_targets: z.array(sessionSwitchTargetSchema).optional(),
20
22
  decoder: z.string().optional(), // runtime-selected decode element when transcoding
21
23
  input_codec: z.string().optional(), // incoming pre-decode codec token: "h264"/"h265"/"mjpeg"
22
24
  passthrough: z.boolean().optional(), // 0.5.0: true when a same-codec passthrough graph is live (no decode/re-encode)
package/dist/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export * from './errors.js';
6
6
  export * from './events.js';
7
7
  export * from './messages.js';
8
8
  export * from './paths.js';
9
+ export * from './session-switch.js';
9
10
  export * from './types.js';
package/dist/index.js CHANGED
@@ -10,4 +10,5 @@ export * from './errors.js';
10
10
  export * from './events.js';
11
11
  export * from './messages.js';
12
12
  export * from './paths.js';
13
+ export * from './session-switch.js';
13
14
  export * from './types.js';
@@ -179,6 +179,97 @@ export declare const requestKeyframeResultSchema: z.ZodObject<{
179
179
  applied: z.ZodLiteral<true>;
180
180
  }, z.core.$strip>;
181
181
  export type RequestKeyframeResult = z.infer<typeof requestKeyframeResultSchema>;
182
+ export declare const edidProfileSchema: z.ZodEnum<{
183
+ full: "full";
184
+ "robust-4k60": "robust-4k60";
185
+ }>;
186
+ export type EdidProfile = z.infer<typeof edidProfileSchema>;
187
+ export declare const setEdidProfileParamsSchema: z.ZodObject<{
188
+ profile: z.ZodEnum<{
189
+ full: "full";
190
+ "robust-4k60": "robust-4k60";
191
+ }>;
192
+ }, z.core.$strip>;
193
+ export type SetEdidProfileParams = z.infer<typeof setEdidProfileParamsSchema>;
194
+ export declare const edidSettleOutcomeSchema: z.ZodEnum<{
195
+ "no-signal": "no-signal";
196
+ relocked: "relocked";
197
+ unknown: "unknown";
198
+ }>;
199
+ export type EdidSettleOutcome = z.infer<typeof edidSettleOutcomeSchema>;
200
+ export declare const setEdidProfileResultSchema: z.ZodObject<{
201
+ profile: z.ZodEnum<{
202
+ full: "full";
203
+ "robust-4k60": "robust-4k60";
204
+ }>;
205
+ previous: z.ZodEnum<{
206
+ full: "full";
207
+ "robust-4k60": "robust-4k60";
208
+ }>;
209
+ applied: z.ZodLiteral<true>;
210
+ settle: z.ZodEnum<{
211
+ "no-signal": "no-signal";
212
+ relocked: "relocked";
213
+ unknown: "unknown";
214
+ }>;
215
+ devices: z.ZodArray<z.ZodObject<{
216
+ input_id: z.ZodString;
217
+ device_path: z.ZodString;
218
+ display_name: z.ZodString;
219
+ media_class: z.ZodEnum<{
220
+ audio: "audio";
221
+ video: "video";
222
+ }>;
223
+ caps: z.ZodOptional<z.ZodArray<z.ZodObject<{
224
+ width: z.ZodOptional<z.ZodNumber>;
225
+ height: z.ZodOptional<z.ZodNumber>;
226
+ framerate: z.ZodOptional<z.ZodString>;
227
+ media_type: z.ZodOptional<z.ZodString>;
228
+ }, z.core.$strip>>>;
229
+ kind: z.ZodOptional<z.ZodEnum<{
230
+ audio: "audio";
231
+ camlink: "camlink";
232
+ hdmi: "hdmi";
233
+ mjpeg: "mjpeg";
234
+ network: "network";
235
+ test: "test";
236
+ uvc_h264: "uvc_h264";
237
+ uvc_h265: "uvc_h265";
238
+ }>>;
239
+ modes: z.ZodOptional<z.ZodArray<z.ZodObject<{
240
+ media_type: z.ZodString;
241
+ pipeline_kind: z.ZodEnum<{
242
+ audio: "audio";
243
+ camlink: "camlink";
244
+ hdmi: "hdmi";
245
+ mjpeg: "mjpeg";
246
+ network: "network";
247
+ test: "test";
248
+ uvc_h264: "uvc_h264";
249
+ uvc_h265: "uvc_h265";
250
+ }>;
251
+ caps: z.ZodArray<z.ZodObject<{
252
+ width: z.ZodOptional<z.ZodNumber>;
253
+ height: z.ZodOptional<z.ZodNumber>;
254
+ framerate: z.ZodOptional<z.ZodString>;
255
+ media_type: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strip>>;
257
+ }, z.core.$strip>>>;
258
+ alsa_card_id: z.ZodOptional<z.ZodString>;
259
+ product_name: z.ZodOptional<z.ZodString>;
260
+ transport: z.ZodOptional<z.ZodEnum<{
261
+ bluetooth: "bluetooth";
262
+ hdmi: "hdmi";
263
+ onboard: "onboard";
264
+ usb: "usb";
265
+ }>>;
266
+ stable_id: z.ZodOptional<z.ZodString>;
267
+ physical_group_id: z.ZodOptional<z.ZodString>;
268
+ hardware_serial: z.ZodOptional<z.ZodString>;
269
+ device_address: z.ZodOptional<z.ZodString>;
270
+ }, z.core.$strip>>;
271
+ }, z.core.$strip>;
272
+ export type SetEdidProfileResult = z.infer<typeof setEdidProfileResultSchema>;
182
273
  export declare const switchInputParamsSchema: z.ZodObject<{
183
274
  input_id: z.ZodString;
184
275
  mode: z.ZodDefault<z.ZodEnum<{
package/dist/messages.js CHANGED
@@ -74,6 +74,23 @@ export const setBitrateResultSchema = z.object({
74
74
  });
75
75
  export const requestKeyframeParamsSchema = z.object({});
76
76
  export const requestKeyframeResultSchema = z.object({ applied: z.literal(true) });
77
+ // ---- 4b. hdmirx.setEdidProfile (additive, 0.17.0; not in V1_METHODS) ----
78
+ // The operator picks a named POLICY, never a blob: an EDID is a checksummed
79
+ // 256-byte structure whose contents the device owns.
80
+ export const edidProfileSchema = z.enum(['full', 'robust-4k60']);
81
+ export const setEdidProfileParamsSchema = z.object({ profile: edidProfileSchema });
82
+ // How the receiver settled before `devices` below was re-read, so a consumer can
83
+ // tell "relocked and here are its real modes" from "the link is dark".
84
+ export const edidSettleOutcomeSchema = z.enum(['relocked', 'no-signal', 'unknown']);
85
+ export const setEdidProfileResultSchema = z.object({
86
+ profile: edidProfileSchema,
87
+ previous: edidProfileSchema,
88
+ // Always true: a non-applied attempt is an RPC error, never this result.
89
+ applied: z.literal(true),
90
+ settle: edidSettleOutcomeSchema,
91
+ // The POST-SETTLE list-devices projection — never the pre-switch mode list.
92
+ devices: z.array(captureDeviceSchema),
93
+ });
77
94
  // ---- 5. switch-input ----
78
95
  export const switchInputParamsSchema = z.object({
79
96
  input_id: z.string(), // device/input identifier from list-devices
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ /** Already-built program-switch legs, not the idle source catalog. */
3
+ export declare const sessionSwitchTargetKindSchema: z.ZodEnum<{
4
+ capture: "capture";
5
+ network: "network";
6
+ synthetic: "synthetic";
7
+ }>;
8
+ export type SessionSwitchTargetKind = z.infer<typeof sessionSwitchTargetKindSchema>;
9
+ export declare const sessionSwitchTargetSchema: z.ZodObject<{
10
+ input_id: z.ZodString;
11
+ kind: z.ZodEnum<{
12
+ capture: "capture";
13
+ network: "network";
14
+ synthetic: "synthetic";
15
+ }>;
16
+ }, z.core.$strip>;
17
+ export type SessionSwitchTarget = z.infer<typeof sessionSwitchTargetSchema>;
18
+ export declare const listSwitchTargetsParamsSchema: z.ZodObject<{}, z.core.$strip>;
19
+ export type ListSwitchTargetsParams = z.infer<typeof listSwitchTargetsParamsSchema>;
20
+ /** A snapshot, not a reservation; re-query before dispatch and handle switch refusal. */
21
+ export declare const listSwitchTargetsResultSchema: z.ZodObject<{
22
+ session_id: z.ZodOptional<z.ZodString>;
23
+ active_input: z.ZodOptional<z.ZodString>;
24
+ switch_targets: z.ZodArray<z.ZodObject<{
25
+ input_id: z.ZodString;
26
+ kind: z.ZodEnum<{
27
+ capture: "capture";
28
+ network: "network";
29
+ synthetic: "synthetic";
30
+ }>;
31
+ }, z.core.$strip>>;
32
+ }, z.core.$strip>;
33
+ export type ListSwitchTargetsResult = z.infer<typeof listSwitchTargetsResultSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ /** Already-built program-switch legs, not the idle source catalog. */
3
+ export const sessionSwitchTargetKindSchema = z.enum(['capture', 'synthetic', 'network']);
4
+ export const sessionSwitchTargetSchema = z.object({
5
+ input_id: z.string(),
6
+ kind: sessionSwitchTargetKindSchema,
7
+ });
8
+ export const listSwitchTargetsParamsSchema = z.object({});
9
+ /** A snapshot, not a reservation; re-query before dispatch and handle switch refusal. */
10
+ export const listSwitchTargetsResultSchema = z.object({
11
+ session_id: z.string().optional(),
12
+ active_input: z.string().optional(),
13
+ switch_targets: z.array(sessionSwitchTargetSchema),
14
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceralive/cerastream",
3
- "version": "2026.9.4",
3
+ "version": "2026.9.6",
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",