@camstack/types 1.2.204 → 1.2.206

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.
@@ -35,6 +35,7 @@ export declare const PickStreamRequirementsSchema: z.ZodReadonly<z.ZodObject<{
35
35
  vp9: "vp9";
36
36
  }>>>>;
37
37
  allowTranscode: z.ZodOptional<z.ZodBoolean>;
38
+ requireProfileBound: z.ZodOptional<z.ZodBoolean>;
38
39
  }, z.core.$strip>>;
39
40
  export declare const PickStreamPreferencesSchema: z.ZodReadonly<z.ZodObject<{
40
41
  preferredProviders: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -55,6 +56,18 @@ export declare const PickedCamStreamSchema: z.ZodObject<{
55
56
  }, z.core.$strip>>;
56
57
  transcodes: z.ZodBoolean;
57
58
  reason: z.ZodString;
59
+ profile: z.ZodOptional<z.ZodEnum<{
60
+ high: "high";
61
+ mid: "mid";
62
+ low: "low";
63
+ }>>;
64
+ brokerId: z.ZodOptional<z.ZodString>;
65
+ url: z.ZodOptional<z.ZodString>;
66
+ fps: z.ZodOptional<z.ZodNumber>;
67
+ fpsSource: z.ZodOptional<z.ZodEnum<{
68
+ published: "published";
69
+ measured: "measured";
70
+ }>>;
58
71
  }, z.core.$strip>;
59
72
  export type PickedCamStream = z.infer<typeof PickedCamStreamSchema>;
60
73
  /**
@@ -232,6 +245,7 @@ export declare const cameraStreamsCapability: {
232
245
  vp9: "vp9";
233
246
  }>>>>;
234
247
  allowTranscode: z.ZodOptional<z.ZodBoolean>;
248
+ requireProfileBound: z.ZodOptional<z.ZodBoolean>;
235
249
  }, z.core.$strip>>;
236
250
  preferences: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
237
251
  preferredProviders: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -250,6 +264,18 @@ export declare const cameraStreamsCapability: {
250
264
  }, z.core.$strip>>;
251
265
  transcodes: z.ZodBoolean;
252
266
  reason: z.ZodString;
267
+ profile: z.ZodOptional<z.ZodEnum<{
268
+ high: "high";
269
+ mid: "mid";
270
+ low: "low";
271
+ }>>;
272
+ brokerId: z.ZodOptional<z.ZodString>;
273
+ url: z.ZodOptional<z.ZodString>;
274
+ fps: z.ZodOptional<z.ZodNumber>;
275
+ fpsSource: z.ZodOptional<z.ZodEnum<{
276
+ published: "published";
277
+ measured: "measured";
278
+ }>>;
253
279
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
254
280
  };
255
281
  readonly events: {
@@ -70,7 +70,14 @@ import { z } from 'zod';
70
70
  */
71
71
  export declare const LOCATION_ICON_IDS: readonly ["map-pin", "house", "door-open", "sofa", "utensils", "bed-double", "bath", "briefcase", "car", "circle-parking", "route", "trees", "umbrella", "waves-ladder", "fence", "package", "warehouse", "store", "sun", "radar"];
72
72
  /** One member of {@link LOCATION_ICON_IDS}. */
73
- export type LocationIconId = (typeof LOCATION_ICON_IDS)[number];
73
+ /**
74
+ * Inferred from the schema, not re-derived from the tuple.
75
+ *
76
+ * `(typeof LOCATION_ICON_IDS)[number]` is the same set today and is a SECOND
77
+ * statement of it — and a second shape does not fail loudly, it strips fields
78
+ * on the wire. One declaration, one truth.
79
+ */
80
+ export type LocationIconId = z.infer<typeof LocationIconIdSchema>;
74
81
  /**
75
82
  * The id every surface is guaranteed to draw, and what an unrecognised value
76
83
  * degrades to. It has been in both icon sets since before this vocabulary
@@ -10504,6 +10504,7 @@ export type AppRouter = TrpcCoreRouter<{
10504
10504
  scope: {
10505
10505
  kind: "grid-view" | "events-view";
10506
10506
  deviceIds: number[];
10507
+ talk?: boolean | undefined;
10507
10508
  };
10508
10509
  ttlSec?: number | "never" | undefined;
10509
10510
  };
@@ -10532,6 +10533,7 @@ export type AppRouter = TrpcCoreRouter<{
10532
10533
  scope: {
10533
10534
  kind: "grid-view" | "events-view";
10534
10535
  deviceIds: number[];
10536
+ talk?: boolean | undefined;
10535
10537
  };
10536
10538
  createdAt: number;
10537
10539
  expiresAt: number | null;
@@ -10880,6 +10882,7 @@ export type AppRouter = TrpcCoreRouter<{
10880
10882
  scope: {
10881
10883
  kind: "grid-view" | "events-view";
10882
10884
  deviceIds: number[];
10885
+ talk?: boolean | undefined;
10883
10886
  };
10884
10887
  ttlSec?: number | "never" | undefined;
10885
10888
  };
@@ -10908,6 +10911,7 @@ export type AppRouter = TrpcCoreRouter<{
10908
10911
  scope: {
10909
10912
  kind: "grid-view" | "events-view";
10910
10913
  deviceIds: number[];
10914
+ talk?: boolean | undefined;
10911
10915
  };
10912
10916
  createdAt: number;
10913
10917
  expiresAt: number | null;
package/dist/index.js CHANGED
@@ -9442,7 +9442,23 @@ var PickStreamRequirementsSchema = zod.z.object({
9442
9442
  * This is what lets one picker serve both the bypass and the full source
9443
9443
  * choice, instead of a consumer scoring privately when the bypass misses.
9444
9444
  */
9445
- allowTranscode: zod.z.boolean().optional()
9445
+ allowTranscode: zod.z.boolean().optional(),
9446
+ /**
9447
+ * Consider ONLY streams the broker has bound to a profile slot.
9448
+ *
9449
+ * A consumer that dials the broker — which is every exporter, since none
9450
+ * of them may open the camera's own URL — can do nothing with a source
9451
+ * that has no slot: there is no restream to dial. Without this the picker
9452
+ * can name such a stream, and each consumer discovers the dead end for
9453
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
9454
+ * falls back, and HomeKit would have had to grow the same function again.
9455
+ *
9456
+ * Default `false`, and deliberately so: the BROKER itself picks through
9457
+ * here when it decides which source to BIND to a slot
9458
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
9459
+ * could never bind them.
9460
+ */
9461
+ requireProfileBound: zod.z.boolean().optional()
9446
9462
  }).readonly();
9447
9463
  var PickStreamPreferencesSchema = zod.z.object({
9448
9464
  /**
@@ -9483,7 +9499,43 @@ var PickedCamStreamSchema = zod.z.object({
9483
9499
  */
9484
9500
  transcodes: zod.z.boolean(),
9485
9501
  /** One-line explanation of why this stream won — for logs / debug UI. */
9486
- reason: zod.z.string()
9502
+ reason: zod.z.string(),
9503
+ /**
9504
+ * The broker profile slot this source is bound to, when it is bound.
9505
+ *
9506
+ * Answered HERE because every consumer needs it and none of them can get it
9507
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
9508
+ * a second cap read plus a `null` branch — and HomeKit was about to write
9509
+ * the same function a second time.
9510
+ *
9511
+ * Absent when the source has no slot, which a caller passing
9512
+ * `requireProfileBound` can never see.
9513
+ */
9514
+ profile: require_sleep.CamProfileSchema.optional(),
9515
+ /** The broker id of that slot, for logs that must name what was dialled. */
9516
+ brokerId: zod.z.string().optional(),
9517
+ /**
9518
+ * The broker restream URL to dial for this stream.
9519
+ *
9520
+ * An exporter must never open the camera's own URL — the broker is the one
9521
+ * that dials the camera, and every consumer goes through its restream. So
9522
+ * the picker answers with the thing a consumer may actually use, instead of
9523
+ * naming a source and leaving each caller to look the URL up.
9524
+ */
9525
+ url: zod.z.string().optional(),
9526
+ /**
9527
+ * Frames per second this stream really delivers, and where the number came
9528
+ * from.
9529
+ *
9530
+ * It is here because getting it wrong is expensive and silent: a HomeKit
9531
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
9532
+ * and the controller rendered nothing at all. The source is carried with the
9533
+ * value for the same reason the bitrate evidence is: `published` is what the
9534
+ * publisher declares and `measured` is what the broker observed, and they
9535
+ * are not interchangeable.
9536
+ */
9537
+ fps: zod.z.number().positive().optional(),
9538
+ fpsSource: zod.z.enum(["published", "measured"]).optional()
9487
9539
  });
9488
9540
  /**
9489
9541
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/dist/index.mjs CHANGED
@@ -9441,7 +9441,23 @@ var PickStreamRequirementsSchema = z.object({
9441
9441
  * This is what lets one picker serve both the bypass and the full source
9442
9442
  * choice, instead of a consumer scoring privately when the bypass misses.
9443
9443
  */
9444
- allowTranscode: z.boolean().optional()
9444
+ allowTranscode: z.boolean().optional(),
9445
+ /**
9446
+ * Consider ONLY streams the broker has bound to a profile slot.
9447
+ *
9448
+ * A consumer that dials the broker — which is every exporter, since none
9449
+ * of them may open the camera's own URL — can do nothing with a source
9450
+ * that has no slot: there is no restream to dial. Without this the picker
9451
+ * can name such a stream, and each consumer discovers the dead end for
9452
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
9453
+ * falls back, and HomeKit would have had to grow the same function again.
9454
+ *
9455
+ * Default `false`, and deliberately so: the BROKER itself picks through
9456
+ * here when it decides which source to BIND to a slot
9457
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
9458
+ * could never bind them.
9459
+ */
9460
+ requireProfileBound: z.boolean().optional()
9445
9461
  }).readonly();
9446
9462
  var PickStreamPreferencesSchema = z.object({
9447
9463
  /**
@@ -9482,7 +9498,43 @@ var PickedCamStreamSchema = z.object({
9482
9498
  */
9483
9499
  transcodes: z.boolean(),
9484
9500
  /** One-line explanation of why this stream won — for logs / debug UI. */
9485
- reason: z.string()
9501
+ reason: z.string(),
9502
+ /**
9503
+ * The broker profile slot this source is bound to, when it is bound.
9504
+ *
9505
+ * Answered HERE because every consumer needs it and none of them can get it
9506
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
9507
+ * a second cap read plus a `null` branch — and HomeKit was about to write
9508
+ * the same function a second time.
9509
+ *
9510
+ * Absent when the source has no slot, which a caller passing
9511
+ * `requireProfileBound` can never see.
9512
+ */
9513
+ profile: CamProfileSchema.optional(),
9514
+ /** The broker id of that slot, for logs that must name what was dialled. */
9515
+ brokerId: z.string().optional(),
9516
+ /**
9517
+ * The broker restream URL to dial for this stream.
9518
+ *
9519
+ * An exporter must never open the camera's own URL — the broker is the one
9520
+ * that dials the camera, and every consumer goes through its restream. So
9521
+ * the picker answers with the thing a consumer may actually use, instead of
9522
+ * naming a source and leaving each caller to look the URL up.
9523
+ */
9524
+ url: z.string().optional(),
9525
+ /**
9526
+ * Frames per second this stream really delivers, and where the number came
9527
+ * from.
9528
+ *
9529
+ * It is here because getting it wrong is expensive and silent: a HomeKit
9530
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
9531
+ * and the controller rendered nothing at all. The source is carried with the
9532
+ * value for the same reason the bitrate evidence is: `published` is what the
9533
+ * publisher declares and `measured` is what the broker observed, and they
9534
+ * are not interchangeable.
9535
+ */
9536
+ fps: z.number().positive().optional(),
9537
+ fpsSource: z.enum(["published", "measured"]).optional()
9486
9538
  });
9487
9539
  /**
9488
9540
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.204",
3
+ "version": "1.2.206",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",