@ceralive/cerastream 2026.6.0-rc.2 → 2026.6.1

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/dist/events.d.ts CHANGED
@@ -42,6 +42,7 @@ export declare const deviceEventSchema: z.ZodObject<{
42
42
  width: z.ZodOptional<z.ZodNumber>;
43
43
  height: z.ZodOptional<z.ZodNumber>;
44
44
  framerate: z.ZodOptional<z.ZodString>;
45
+ media_type: z.ZodOptional<z.ZodString>;
45
46
  }, z.core.$strip>>>;
46
47
  }, z.core.$strip>;
47
48
  }, z.core.$strip>;
@@ -127,6 +128,7 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
127
128
  width: z.ZodOptional<z.ZodNumber>;
128
129
  height: z.ZodOptional<z.ZodNumber>;
129
130
  framerate: z.ZodOptional<z.ZodString>;
131
+ media_type: z.ZodOptional<z.ZodString>;
130
132
  }, z.core.$strip>>>;
131
133
  }, z.core.$strip>;
132
134
  }, z.core.$strip>, z.ZodObject<{
@@ -207,6 +209,7 @@ export declare const cerastreamEventSchema: z.ZodObject<{
207
209
  width: z.ZodOptional<z.ZodNumber>;
208
210
  height: z.ZodOptional<z.ZodNumber>;
209
211
  framerate: z.ZodOptional<z.ZodString>;
212
+ media_type: z.ZodOptional<z.ZodString>;
210
213
  }, z.core.$strip>>>;
211
214
  }, z.core.$strip>;
212
215
  }, z.core.$strip>, z.ZodObject<{
@@ -291,6 +294,7 @@ export declare const eventSchemas: {
291
294
  width: z.ZodOptional<z.ZodNumber>;
292
295
  height: z.ZodOptional<z.ZodNumber>;
293
296
  framerate: z.ZodOptional<z.ZodString>;
297
+ media_type: z.ZodOptional<z.ZodString>;
294
298
  }, z.core.$strip>>>;
295
299
  }, z.core.$strip>;
296
300
  }, z.core.$strip>;
@@ -121,6 +121,7 @@ export declare const listDevicesResultSchema: z.ZodObject<{
121
121
  width: z.ZodOptional<z.ZodNumber>;
122
122
  height: z.ZodOptional<z.ZodNumber>;
123
123
  framerate: z.ZodOptional<z.ZodString>;
124
+ media_type: z.ZodOptional<z.ZodString>;
124
125
  }, z.core.$strip>>>;
125
126
  }, z.core.$strip>>;
126
127
  }, z.core.$strip>;
@@ -190,6 +191,60 @@ export declare const previewSessionResultSchema: z.ZodObject<{
190
191
  }, z.core.$strip>], "kind">;
191
192
  }, z.core.$strip>;
192
193
  export type PreviewSessionResult = z.infer<typeof previewSessionResultSchema>;
194
+ export declare const videoSourceCapSchema: z.ZodObject<{
195
+ id: z.ZodString;
196
+ supports_audio: z.ZodBoolean;
197
+ supports_resolution_override: z.ZodBoolean;
198
+ supports_framerate_override: z.ZodBoolean;
199
+ default_resolution: z.ZodString;
200
+ default_framerate: z.ZodNumber;
201
+ }, z.core.$strip>;
202
+ export type VideoSourceCap = z.infer<typeof videoSourceCapSchema>;
203
+ export declare const bitrateRangeCapsSchema: z.ZodObject<{
204
+ min: z.ZodNumber;
205
+ max: z.ZodNumber;
206
+ unit: z.ZodString;
207
+ }, z.core.$strip>;
208
+ export type BitrateRangeCaps = z.infer<typeof bitrateRangeCapsSchema>;
209
+ export declare const encoderCapsSchema: z.ZodObject<{
210
+ codecs: z.ZodArray<z.ZodString>;
211
+ bitrate_range: z.ZodObject<{
212
+ min: z.ZodNumber;
213
+ max: z.ZodNumber;
214
+ unit: z.ZodString;
215
+ }, z.core.$strip>;
216
+ }, z.core.$strip>;
217
+ export type EncoderCaps = z.infer<typeof encoderCapsSchema>;
218
+ export declare const platformCapsSchema: z.ZodObject<{
219
+ supports_h265: z.ZodBoolean;
220
+ hardware_accelerated: z.ZodBoolean;
221
+ max_resolution: z.ZodString;
222
+ }, z.core.$strip>;
223
+ export type PlatformCaps = z.infer<typeof platformCapsSchema>;
224
+ export declare const getCapabilitiesResultSchema: z.ZodObject<{
225
+ platform: z.ZodObject<{
226
+ supports_h265: z.ZodBoolean;
227
+ hardware_accelerated: z.ZodBoolean;
228
+ max_resolution: z.ZodString;
229
+ }, z.core.$strip>;
230
+ encoder: z.ZodObject<{
231
+ codecs: z.ZodArray<z.ZodString>;
232
+ bitrate_range: z.ZodObject<{
233
+ min: z.ZodNumber;
234
+ max: z.ZodNumber;
235
+ unit: z.ZodString;
236
+ }, z.core.$strip>;
237
+ }, z.core.$strip>;
238
+ sources: z.ZodArray<z.ZodObject<{
239
+ id: z.ZodString;
240
+ supports_audio: z.ZodBoolean;
241
+ supports_resolution_override: z.ZodBoolean;
242
+ supports_framerate_override: z.ZodBoolean;
243
+ default_resolution: z.ZodString;
244
+ default_framerate: z.ZodNumber;
245
+ }, z.core.$strip>>;
246
+ }, z.core.$strip>;
247
+ export type GetCapabilitiesResult = z.infer<typeof getCapabilitiesResultSchema>;
193
248
  /** The eight v1 control methods (the literal JSON-RPC `method` strings). */
194
249
  export declare const V1_METHODS: readonly ["start", "stop", "reload-config", "set-bitrate", "switch-input", "list-devices", "subscribe-events", "preview-session"];
195
250
  export type V1Method = (typeof V1_METHODS)[number];
@@ -332,6 +387,7 @@ export declare const requestSchemas: {
332
387
  width: z.ZodOptional<z.ZodNumber>;
333
388
  height: z.ZodOptional<z.ZodNumber>;
334
389
  framerate: z.ZodOptional<z.ZodString>;
390
+ media_type: z.ZodOptional<z.ZodString>;
335
391
  }, z.core.$strip>>>;
336
392
  }, z.core.$strip>>;
337
393
  }, z.core.$strip>;
package/dist/messages.js CHANGED
@@ -104,6 +104,36 @@ export const previewSessionResultSchema = z.object({
104
104
  z.object({ kind: z.literal("webrtc"), sdp: z.string().optional() }),
105
105
  ]),
106
106
  });
107
+ // ---- 9. get-capabilities ----
108
+ // Deliberately absent from V1_METHODS / requestSchemas: it is an additive
109
+ // standalone schema, so the frozen eight-method contract-count stays eight.
110
+ export const videoSourceCapSchema = z.object({
111
+ id: z.string(),
112
+ supports_audio: z.boolean(),
113
+ supports_resolution_override: z.boolean(),
114
+ supports_framerate_override: z.boolean(),
115
+ default_resolution: z.string(),
116
+ default_framerate: z.number().int(),
117
+ });
118
+ export const bitrateRangeCapsSchema = z.object({
119
+ min: z.number().int(),
120
+ max: z.number().int(),
121
+ unit: z.string(), // "bps" or "kbps"
122
+ });
123
+ export const encoderCapsSchema = z.object({
124
+ codecs: z.array(z.string()),
125
+ bitrate_range: bitrateRangeCapsSchema,
126
+ });
127
+ export const platformCapsSchema = z.object({
128
+ supports_h265: z.boolean(),
129
+ hardware_accelerated: z.boolean(),
130
+ max_resolution: z.string(),
131
+ });
132
+ export const getCapabilitiesResultSchema = z.object({
133
+ platform: platformCapsSchema,
134
+ encoder: encoderCapsSchema,
135
+ sources: z.array(videoSourceCapSchema),
136
+ });
107
137
  // ---- method registry (count-assertion source of truth) ----
108
138
  /** The eight v1 control methods (the literal JSON-RPC `method` strings). */
109
139
  export const V1_METHODS = [
package/dist/types.d.ts CHANGED
@@ -85,6 +85,7 @@ export declare const captureCapSchema: z.ZodObject<{
85
85
  width: z.ZodOptional<z.ZodNumber>;
86
86
  height: z.ZodOptional<z.ZodNumber>;
87
87
  framerate: z.ZodOptional<z.ZodString>;
88
+ media_type: z.ZodOptional<z.ZodString>;
88
89
  }, z.core.$strip>;
89
90
  export type CaptureCap = z.infer<typeof captureCapSchema>;
90
91
  export declare const captureDeviceSchema: z.ZodObject<{
@@ -99,6 +100,7 @@ export declare const captureDeviceSchema: z.ZodObject<{
99
100
  width: z.ZodOptional<z.ZodNumber>;
100
101
  height: z.ZodOptional<z.ZodNumber>;
101
102
  framerate: z.ZodOptional<z.ZodString>;
103
+ media_type: z.ZodOptional<z.ZodString>;
102
104
  }, z.core.$strip>>>;
103
105
  }, z.core.$strip>;
104
106
  export type CaptureDevice = z.infer<typeof captureDeviceSchema>;
package/dist/types.js CHANGED
@@ -53,6 +53,7 @@ export const captureCapSchema = z.object({
53
53
  width: z.number().int().optional(),
54
54
  height: z.number().int().optional(),
55
55
  framerate: z.string().optional(), // e.g. "30/1"
56
+ media_type: z.string().optional(), // e.g. "video/x-h265"; additive, absent on legacy producers
56
57
  });
57
58
  export const captureDeviceSchema = z.object({
58
59
  input_id: z.string(), // stable id used by switch-input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceralive/cerastream",
3
- "version": "2026.6.0-rc.2",
3
+ "version": "2026.6.1",
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",