@ceralive/cerastream 2026.9.3 → 2026.9.5

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
@@ -16,6 +17,11 @@ engine's JSON-RPC 2.0 / NDJSON control plane over a Unix domain socket.
16
17
  - A `CerastreamClient` interface + `connect()` factory (UDS transport)
17
18
  - Additive `client.getCapabilities()` discovery for platform, source, encoder, and
18
19
  local preview availability
20
+ - Per-codec encoder capability entries with format, resolution/framerate, and
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
19
25
  - Additive `client.changeConfig()` — reconfigure the live session (resolution,
20
26
  framerate, codec, pipeline, source) as one transaction with typed rollback;
21
27
  composition-only changes use live layout/alpha writes and secondary rebind
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 ChangeConfigParams, type ChangeConfigResult, 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';
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
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. */
@@ -64,6 +64,17 @@ export interface CerastreamClient {
64
64
  * @throws {CerastreamRpcError} when the value is out of the configured range.
65
65
  */
66
66
  setBitrate(params: SetBitrateParams): Promise<SetBitrateResult>;
67
+ requestKeyframe(): Promise<RequestKeyframeResult>;
68
+ /**
69
+ * Switch the HDMI-RX EDID profile transactionally: write, byte-verify,
70
+ * persist, then re-read the device projection once the link has settled.
71
+ * @param params The profile to advertise.
72
+ * @returns The committed profile, the one it replaced, and the post-settle devices.
73
+ * @throws {CerastreamRpcError} `cerastream.params.invalid` prefixed
74
+ * `capture-active` while any capture leg is live — including when the driver
75
+ * itself refuses the write — and `hdmirx-unavailable` on a board with no receiver.
76
+ */
77
+ setEdidProfile(params: SetEdidProfileParams): Promise<SetEdidProfileResult>;
67
78
  /**
68
79
  * Switch the active capture source (manual) or hand selection to failover (auto).
69
80
  * @param params The target input id and switch mode.
package/dist/client.js CHANGED
@@ -3,7 +3,7 @@ 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, requestSchemas, } from './messages.js';
6
+ import { changeConfigParamsSchema, changeConfigResultSchema, getCapabilitiesResultSchema, requestKeyframeResultSchema, requestSchemas, setEdidProfileResultSchema, } from './messages.js';
7
7
  import { controlSocketPath } from './paths.js';
8
8
  import { LineSocket } from './transport.js';
9
9
  const DEFAULTS = {
@@ -70,6 +70,12 @@ class ClientImpl {
70
70
  setBitrate(params) {
71
71
  return this.call('set-bitrate', params);
72
72
  }
73
+ async requestKeyframe() {
74
+ return requestKeyframeResultSchema.parse(await this.rawRequest('request-keyframe', {}));
75
+ }
76
+ async setEdidProfile(params) {
77
+ return setEdidProfileResultSchema.parse(await this.rawRequest('hdmirx.setEdidProfile', params));
78
+ }
73
79
  switchInput(params) {
74
80
  return this.call('switch-input', params);
75
81
  }
@@ -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.14.0';
11
+ export declare const SCHEMA_VERSION: '0.17.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.14.0';
14
+ export const SCHEMA_VERSION = '0.17.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
@@ -97,22 +97,32 @@ export declare const processErrorCodeSchema: z.ZodEnum<{
97
97
  export type ProcessErrorCode = z.infer<typeof processErrorCodeSchema>;
98
98
  export declare const captureCauseSchema: z.ZodEnum<{
99
99
  "composition-unsupported": "composition-unsupported";
100
+ "decoder-unavailable": "decoder-unavailable";
100
101
  device_busy: "device_busy";
102
+ "interlaced-unsupported": "interlaced-unsupported";
101
103
  negotiation_failed: "negotiation_failed";
102
104
  no_signal: "no_signal";
103
105
  no_silicon_converter: "no_silicon_converter";
104
106
  "secondary-unavailable": "secondary-unavailable";
107
+ "software-pixel-path-rejected": "software-pixel-path-rejected";
108
+ "source-changed": "source-changed";
109
+ "unsupported-format": "unsupported-format";
105
110
  }>;
106
111
  export type CaptureCause = z.infer<typeof captureCauseSchema>;
107
112
  export declare const captureCauseEntrySchema: z.ZodObject<{
108
113
  device: z.ZodString;
109
114
  cause: z.ZodEnum<{
110
115
  "composition-unsupported": "composition-unsupported";
116
+ "decoder-unavailable": "decoder-unavailable";
111
117
  device_busy: "device_busy";
118
+ "interlaced-unsupported": "interlaced-unsupported";
112
119
  negotiation_failed: "negotiation_failed";
113
120
  no_signal: "no_signal";
114
121
  no_silicon_converter: "no_silicon_converter";
115
122
  "secondary-unavailable": "secondary-unavailable";
123
+ "software-pixel-path-rejected": "software-pixel-path-rejected";
124
+ "source-changed": "source-changed";
125
+ "unsupported-format": "unsupported-format";
116
126
  }>;
117
127
  }, z.core.$strip>;
118
128
  export type CaptureCauseEntry = z.infer<typeof captureCauseEntrySchema>;
package/dist/errors.js CHANGED
@@ -143,8 +143,13 @@ export const captureCauseSchema = z.enum([
143
143
  'no_signal',
144
144
  'device_busy',
145
145
  'no_silicon_converter',
146
+ 'decoder-unavailable',
147
+ 'software-pixel-path-rejected',
146
148
  'composition-unsupported',
147
149
  'secondary-unavailable',
150
+ 'unsupported-format',
151
+ 'interlaced-unsupported',
152
+ 'source-changed',
148
153
  ]);
149
154
  export const captureCauseEntrySchema = z.object({
150
155
  device: z.string(),
package/dist/events.d.ts CHANGED
@@ -241,11 +241,16 @@ export declare const runtimeErrorEventSchema: z.ZodObject<{
241
241
  selected: z.ZodOptional<z.ZodBoolean>;
242
242
  capture_cause: z.ZodOptional<z.ZodEnum<{
243
243
  "composition-unsupported": "composition-unsupported";
244
+ "decoder-unavailable": "decoder-unavailable";
244
245
  device_busy: "device_busy";
246
+ "interlaced-unsupported": "interlaced-unsupported";
245
247
  negotiation_failed: "negotiation_failed";
246
248
  no_signal: "no_signal";
247
249
  no_silicon_converter: "no_silicon_converter";
248
250
  "secondary-unavailable": "secondary-unavailable";
251
+ "software-pixel-path-rejected": "software-pixel-path-rejected";
252
+ "source-changed": "source-changed";
253
+ "unsupported-format": "unsupported-format";
249
254
  }>>;
250
255
  }, z.core.$strip>;
251
256
  /** Payload of a {@link runtimeErrorEventSchema} event. */
@@ -467,11 +472,16 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
467
472
  selected: z.ZodOptional<z.ZodBoolean>;
468
473
  capture_cause: z.ZodOptional<z.ZodEnum<{
469
474
  "composition-unsupported": "composition-unsupported";
475
+ "decoder-unavailable": "decoder-unavailable";
470
476
  device_busy: "device_busy";
477
+ "interlaced-unsupported": "interlaced-unsupported";
471
478
  negotiation_failed: "negotiation_failed";
472
479
  no_signal: "no_signal";
473
480
  no_silicon_converter: "no_silicon_converter";
474
481
  "secondary-unavailable": "secondary-unavailable";
482
+ "software-pixel-path-rejected": "software-pixel-path-rejected";
483
+ "source-changed": "source-changed";
484
+ "unsupported-format": "unsupported-format";
475
485
  }>>;
476
486
  }, z.core.$strip>, z.ZodObject<{
477
487
  type: z.ZodLiteral<"preview">;
@@ -667,11 +677,16 @@ export declare const cerastreamEventSchema: z.ZodObject<{
667
677
  selected: z.ZodOptional<z.ZodBoolean>;
668
678
  capture_cause: z.ZodOptional<z.ZodEnum<{
669
679
  "composition-unsupported": "composition-unsupported";
680
+ "decoder-unavailable": "decoder-unavailable";
670
681
  device_busy: "device_busy";
682
+ "interlaced-unsupported": "interlaced-unsupported";
671
683
  negotiation_failed: "negotiation_failed";
672
684
  no_signal: "no_signal";
673
685
  no_silicon_converter: "no_silicon_converter";
674
686
  "secondary-unavailable": "secondary-unavailable";
687
+ "software-pixel-path-rejected": "software-pixel-path-rejected";
688
+ "source-changed": "source-changed";
689
+ "unsupported-format": "unsupported-format";
675
690
  }>>;
676
691
  }, z.core.$strip>, z.ZodObject<{
677
692
  type: z.ZodLiteral<"preview">;
@@ -876,11 +891,16 @@ export declare const eventSchemas: {
876
891
  selected: z.ZodOptional<z.ZodBoolean>;
877
892
  capture_cause: z.ZodOptional<z.ZodEnum<{
878
893
  "composition-unsupported": "composition-unsupported";
894
+ "decoder-unavailable": "decoder-unavailable";
879
895
  device_busy: "device_busy";
896
+ "interlaced-unsupported": "interlaced-unsupported";
880
897
  negotiation_failed: "negotiation_failed";
881
898
  no_signal: "no_signal";
882
899
  no_silicon_converter: "no_silicon_converter";
883
900
  "secondary-unavailable": "secondary-unavailable";
901
+ "software-pixel-path-rejected": "software-pixel-path-rejected";
902
+ "source-changed": "source-changed";
903
+ "unsupported-format": "unsupported-format";
884
904
  }>>;
885
905
  }, z.core.$strip>;
886
906
  readonly preview: z.ZodObject<{
@@ -22,6 +22,7 @@ export declare const startParamsSchema: z.ZodObject<{
22
22
  }, z.core.$strip>;
23
23
  input_id: z.ZodOptional<z.ZodString>;
24
24
  codec: z.ZodOptional<z.ZodEnum<{
25
+ av1: "av1";
25
26
  h264: "h264";
26
27
  h265: "h265";
27
28
  }>>;
@@ -172,6 +173,103 @@ export declare const setBitrateResultSchema: z.ZodObject<{
172
173
  reason: z.ZodOptional<z.ZodString>;
173
174
  }, z.core.$strip>;
174
175
  export type SetBitrateResult = z.infer<typeof setBitrateResultSchema>;
176
+ export declare const requestKeyframeParamsSchema: z.ZodObject<{}, z.core.$strip>;
177
+ export type RequestKeyframeParams = z.infer<typeof requestKeyframeParamsSchema>;
178
+ export declare const requestKeyframeResultSchema: z.ZodObject<{
179
+ applied: z.ZodLiteral<true>;
180
+ }, z.core.$strip>;
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>;
175
273
  export declare const switchInputParamsSchema: z.ZodObject<{
176
274
  input_id: z.ZodString;
177
275
  mode: z.ZodDefault<z.ZodEnum<{
@@ -371,6 +469,27 @@ export declare const encoderCapsSchema: z.ZodObject<{
371
469
  }, z.core.$strip>;
372
470
  }, z.core.$strip>;
373
471
  export type EncoderCaps = z.infer<typeof encoderCapsSchema>;
472
+ export declare const encoderGateStatusSchema: z.ZodEnum<{
473
+ kept: "kept";
474
+ measured: "measured";
475
+ untested: "untested";
476
+ }>;
477
+ export type EncoderGateStatus = z.infer<typeof encoderGateStatusSchema>;
478
+ export declare const encoderCapabilitySchema: z.ZodObject<{
479
+ codec: z.ZodString;
480
+ max_resolution: z.ZodString;
481
+ max_framerate: z.ZodNumber;
482
+ formats: z.ZodArray<z.ZodString>;
483
+ gates: z.ZodObject<{
484
+ '4k60': z.ZodEnum<{
485
+ kept: "kept";
486
+ measured: "measured";
487
+ untested: "untested";
488
+ }>;
489
+ reason: z.ZodOptional<z.ZodString>;
490
+ }, z.core.$strip>;
491
+ }, z.core.$strip>;
492
+ export type EncoderCapability = z.infer<typeof encoderCapabilitySchema>;
374
493
  export declare const platformConverterSchema: z.ZodEnum<{
375
494
  librga: "librga";
376
495
  none: "none";
@@ -434,6 +553,20 @@ export declare const getCapabilitiesResultSchema: z.ZodObject<{
434
553
  unit: z.ZodString;
435
554
  }, z.core.$strip>;
436
555
  }, z.core.$strip>;
556
+ encoders: z.ZodOptional<z.ZodArray<z.ZodObject<{
557
+ codec: z.ZodString;
558
+ max_resolution: z.ZodString;
559
+ max_framerate: z.ZodNumber;
560
+ formats: z.ZodArray<z.ZodString>;
561
+ gates: z.ZodObject<{
562
+ '4k60': z.ZodEnum<{
563
+ kept: "kept";
564
+ measured: "measured";
565
+ untested: "untested";
566
+ }>;
567
+ reason: z.ZodOptional<z.ZodString>;
568
+ }, z.core.$strip>;
569
+ }, z.core.$strip>>>;
437
570
  sources: z.ZodArray<z.ZodObject<{
438
571
  id: z.ZodString;
439
572
  supports_audio: z.ZodBoolean;
@@ -469,6 +602,7 @@ export declare const getCapabilitiesResultSchema: z.ZodObject<{
469
602
  }, z.core.$strip>>;
470
603
  network_embedded_audio: z.ZodOptional<z.ZodBoolean>;
471
604
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
605
+ pixel_paths: z.ZodOptional<z.ZodLiteral<"silicon-only">>;
472
606
  }, z.core.$strip>;
473
607
  export type GetCapabilitiesResult = z.infer<typeof getCapabilitiesResultSchema>;
474
608
  export declare const changeConfigParamsSchema: z.ZodObject<{
@@ -476,6 +610,7 @@ export declare const changeConfigParamsSchema: z.ZodObject<{
476
610
  resolution: z.ZodOptional<z.ZodString>;
477
611
  framerate: z.ZodOptional<z.ZodNumber>;
478
612
  codec: z.ZodOptional<z.ZodEnum<{
613
+ av1: "av1";
479
614
  h264: "h264";
480
615
  h265: "h265";
481
616
  }>>;
@@ -573,6 +708,7 @@ export declare const requestSchemas: {
573
708
  }, z.core.$strip>;
574
709
  input_id: z.ZodOptional<z.ZodString>;
575
710
  codec: z.ZodOptional<z.ZodEnum<{
711
+ av1: "av1";
576
712
  h264: "h264";
577
713
  h265: "h265";
578
714
  }>>;
package/dist/messages.js CHANGED
@@ -72,6 +72,25 @@ export const setBitrateResultSchema = z.object({
72
72
  bitrate_control: bitrateControlSchema.optional(),
73
73
  reason: z.string().optional(),
74
74
  });
75
+ export const requestKeyframeParamsSchema = z.object({});
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
+ });
75
94
  // ---- 5. switch-input ----
76
95
  export const switchInputParamsSchema = z.object({
77
96
  input_id: z.string(), // device/input identifier from list-devices
@@ -172,6 +191,17 @@ export const encoderCapsSchema = z.object({
172
191
  codecs: z.array(z.string()),
173
192
  bitrate_range: bitrateRangeCapsSchema,
174
193
  });
194
+ export const encoderGateStatusSchema = z.enum(['measured', 'kept', 'untested']);
195
+ export const encoderCapabilitySchema = z.object({
196
+ codec: z.string(),
197
+ max_resolution: z.string(),
198
+ max_framerate: z.number().int().positive(),
199
+ formats: z.array(z.string()),
200
+ gates: z.object({
201
+ '4k60': encoderGateStatusSchema,
202
+ reason: z.string().optional(),
203
+ }),
204
+ });
175
205
  export const platformConverterSchema = z.enum(['librga', 'v4l2-rga2', 'none']);
176
206
  export const platformCapsSchema = z.object({
177
207
  supports_h265: z.boolean(),
@@ -202,6 +232,7 @@ export const previewAvailabilitySchema = z.object({
202
232
  export const getCapabilitiesResultSchema = z.object({
203
233
  platform: platformCapsSchema,
204
234
  encoder: encoderCapsSchema,
235
+ encoders: z.array(encoderCapabilitySchema).optional(),
205
236
  sources: z.array(videoSourceCapSchema),
206
237
  audio_live_switch: z.boolean().optional(),
207
238
  audio_backends: z
@@ -217,6 +248,7 @@ export const getCapabilitiesResultSchema = z.object({
217
248
  preview: previewAvailabilitySchema.optional(), // preview-server availability (unbound vs down)
218
249
  network_embedded_audio: z.boolean().optional(), // engine routes network-ingest embedded audio to the mux
219
250
  features: z.array(z.string()).optional(), // named engine features (e.g. "video-passthrough") for fail-closed negotiation
251
+ pixel_paths: z.literal('silicon-only').optional(),
220
252
  });
221
253
  // ---- 10. change-config (0.10.0, additive) ----
222
254
  // Deliberately absent from V1_METHODS / requestSchemas, like get-capabilities and
package/dist/types.d.ts CHANGED
@@ -40,6 +40,7 @@ export declare const previewEncodeFallbackSchema: z.ZodDiscriminatedUnion<[z.Zod
40
40
  }, z.core.$strip>], "code">;
41
41
  export type PreviewEncodeFallback = z.infer<typeof previewEncodeFallbackSchema>;
42
42
  export declare const videoCodecSchema: z.ZodEnum<{
43
+ av1: "av1";
43
44
  h264: "h264";
44
45
  h265: "h265";
45
46
  }>;
@@ -189,6 +190,7 @@ export declare const cerastreamConfigSchema: z.ZodObject<{
189
190
  }, z.core.$strip>;
190
191
  input_id: z.ZodOptional<z.ZodString>;
191
192
  codec: z.ZodOptional<z.ZodEnum<{
193
+ av1: "av1";
192
194
  h264: "h264";
193
195
  h265: "h265";
194
196
  }>>;
package/dist/types.js CHANGED
@@ -28,7 +28,7 @@ export const previewEncodeFallbackSchema = z.discriminatedUnion('code', [
28
28
  // Requested egress video codec (0.4.0, additive). Absent ⇒ the engine picks its
29
29
  // platform default. Wire values are the codec id strings the encoder caps also
30
30
  // advertise ("h264"/"h265") — never an encoder element name.
31
- export const videoCodecSchema = z.enum(['h264', 'h265']);
31
+ export const videoCodecSchema = z.enum(['h264', 'h265', 'av1']);
32
32
  // Same-codec passthrough policy (0.5.0, additive). Absent ⇒ "auto". "auto" =
33
33
  // passthrough only when adaptive bitrate is inactive and eligibility holds;
34
34
  // "force" = passthrough whenever eligible (typed start failure otherwise);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceralive/cerastream",
3
- "version": "2026.9.3",
3
+ "version": "2026.9.5",
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",