@camstack/addon-provider-rademacher 0.2.67 → 0.2.69

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/addon.js CHANGED
@@ -984,7 +984,7 @@ var Rademacher = class {
984
984
  }
985
985
  };
986
986
  //#endregion
987
- //#region ../types/dist/event-category-BZL-fdNj.mjs
987
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
988
988
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
989
989
  EventCategory["SystemBoot"] = "system.boot";
990
990
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1356,6 +1356,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1356
1356
  */
1357
1357
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
1358
1358
  /**
1359
+ * Cap event fired by every device that registers the `network-link`
1360
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
1361
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
1362
+ * reading that moved.
1363
+ */
1364
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
1365
+ /**
1359
1366
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
1360
1367
  * "wake in progress" window — between the Baichuan wake-up issue and
1361
1368
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -20374,6 +20381,33 @@ var RecentTracksQueryInput = object({
20374
20381
  */
20375
20382
  classes: array(string()).optional()
20376
20383
  });
20384
+ /**
20385
+ * A Summary (D359): the per-camera session envelope that references tracks.
20386
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
20387
+ * served by the event-media plane by key), null until the first frame with a
20388
+ * member visible has been materialised.
20389
+ */
20390
+ var SummarySchema = object({
20391
+ id: string(),
20392
+ deviceId: number(),
20393
+ openedAt: number(),
20394
+ lastActiveAt: number(),
20395
+ sealedAt: number().nullable(),
20396
+ memberCount: number().int().nonnegative(),
20397
+ groupShotKey: string().nullable()
20398
+ });
20399
+ var SummariesQueryInput = object({
20400
+ deviceIds: array(number()).min(1),
20401
+ since: number().optional(),
20402
+ until: number().optional(),
20403
+ limit: number().int().min(1).max(200).default(50)
20404
+ });
20405
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20406
+ var SummaryDetailSchema = object({
20407
+ summary: SummarySchema,
20408
+ /** Member track ids, in absorption order. */
20409
+ trackIds: array(string()).readonly()
20410
+ });
20377
20411
  var RecentTracksPageSchema = object({
20378
20412
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
20379
20413
  tracks: array(TrackSchema).readonly(),
@@ -20774,7 +20808,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20774
20808
  * timeline would read as a camera that saw nothing.
20775
20809
  */
20776
20810
  classes: array(string()).optional()
20777
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
20811
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20778
20812
  kind: "mutation",
20779
20813
  auth: "admin"
20780
20814
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -24707,6 +24741,88 @@ onStatusChanged: { data: object({
24707
24741
  volatileStateFields: ["lastUpdated"]
24708
24742
  };
24709
24743
  /**
24744
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
24745
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24746
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24747
+ * one Home Assistant projection.
24748
+ */
24749
+ var NetworkLinkStatusSchema = object({
24750
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24751
+ type: _enum([
24752
+ "wifi",
24753
+ "ethernet",
24754
+ "cellular",
24755
+ "unknown"
24756
+ ]),
24757
+ /**
24758
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24759
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24760
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24761
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24762
+ * SKIP a null rather than coerce it.
24763
+ */
24764
+ signalPercent: number().min(0).max(100).nullable(),
24765
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24766
+ rssiDbm: number().optional(),
24767
+ /** Network name of a wireless link, when the firmware reports it. */
24768
+ ssid: string().optional(),
24769
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24770
+ lastUpdated: number()
24771
+ });
24772
+ var networkLinkCapability = {
24773
+ name: "network-link",
24774
+ scope: "device",
24775
+ deviceNative: true,
24776
+ mode: "singleton",
24777
+ deviceTypes: [
24778
+ DeviceType.Camera,
24779
+ DeviceType.Sensor,
24780
+ DeviceType.Button,
24781
+ DeviceType.Switch,
24782
+ DeviceType.Light,
24783
+ DeviceType.Lock,
24784
+ DeviceType.Siren
24785
+ ],
24786
+ methods: {},
24787
+ events: {
24788
+ /**
24789
+ * Emitted whenever the cached status changes (a link switch, a signal
24790
+ * reading that moved). Mirrored on the parent chain by the
24791
+ * DeviceEventPropagator like `battery.onStatusChanged`.
24792
+ */
24793
+ onStatusChanged: { data: object({
24794
+ deviceId: number(),
24795
+ status: NetworkLinkStatusSchema
24796
+ }) } },
24797
+ status: {
24798
+ schema: NetworkLinkStatusSchema,
24799
+ kind: "push",
24800
+ empty: {
24801
+ type: "unknown",
24802
+ signalPercent: null,
24803
+ lastUpdated: 0
24804
+ }
24805
+ },
24806
+ /**
24807
+ * Runtime-state slice — every provider stores the same shape under
24808
+ * `device.runtimeState['network-link']`, read once by the badge and the
24809
+ * Home Assistant projector regardless of the driver.
24810
+ */
24811
+ runtimeState: NetworkLinkStatusSchema,
24812
+ /**
24813
+ * Runtime-state durability: **restored** — a link reading is slow to
24814
+ * change and a sleeping battery camera may not report for hours; the
24815
+ * restored slice is what the badge shows until the next read.
24816
+ *
24817
+ * See `RuntimeStateDurability`. Enforced by
24818
+ * `scripts/check-runtime-state-durability.ts`.
24819
+ */
24820
+ durability: "restored",
24821
+ /** Clock fields: written, but excluded from the compare that decides
24822
+ * whether persisting is worth a SQLite commit. */
24823
+ volatileStateFields: ["lastUpdated"]
24824
+ };
24825
+ /**
24710
24826
  * Generic boolean sensor — last-resort fallback when no domain-
24711
24827
  * specific binary cap fits (Home Assistant `binary_sensor` without a
24712
24828
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -33091,6 +33207,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33091
33207
  motionTrigger: motionTriggerCapability,
33092
33208
  motionZones: motionZonesCapability,
33093
33209
  nativeObjectDetection: nativeObjectDetectionCapability,
33210
+ networkLink: networkLinkCapability,
33094
33211
  notifier: notifierCapability,
33095
33212
  numericSensor: numericSensorCapability,
33096
33213
  petFeeder: petFeederCapability,
@@ -37508,6 +37625,12 @@ Object.freeze({
37508
37625
  addonId: null,
37509
37626
  access: "view"
37510
37627
  },
37628
+ "pipelineAnalytics.getSummary": {
37629
+ capName: "pipeline-analytics",
37630
+ capScope: "device",
37631
+ addonId: null,
37632
+ access: "view"
37633
+ },
37511
37634
  "pipelineAnalytics.getTrack": {
37512
37635
  capName: "pipeline-analytics",
37513
37636
  capScope: "device",
@@ -37586,6 +37709,12 @@ Object.freeze({
37586
37709
  addonId: null,
37587
37710
  access: "view"
37588
37711
  },
37712
+ "pipelineAnalytics.listSummaries": {
37713
+ capName: "pipeline-analytics",
37714
+ capScope: "device",
37715
+ addonId: null,
37716
+ access: "view"
37717
+ },
37589
37718
  "pipelineAnalytics.listTrackMedia": {
37590
37719
  capName: "pipeline-analytics",
37591
37720
  capScope: "device",
@@ -41281,6 +41410,11 @@ Object.freeze({
41281
41410
  form: "array",
41282
41411
  optional: true
41283
41412
  }],
41413
+ "pipelineAnalytics.listSummaries": [{
41414
+ name: "deviceIds",
41415
+ form: "array",
41416
+ optional: false
41417
+ }],
41284
41418
  "pipelineAnalytics.listTrackMedia": [{
41285
41419
  name: "deviceId",
41286
41420
  form: "single",
package/dist/addon.mjs CHANGED
@@ -983,7 +983,7 @@ var Rademacher = class {
983
983
  }
984
984
  };
985
985
  //#endregion
986
- //#region ../types/dist/event-category-BZL-fdNj.mjs
986
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
987
987
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
988
988
  EventCategory["SystemBoot"] = "system.boot";
989
989
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1355,6 +1355,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1355
1355
  */
1356
1356
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
1357
1357
  /**
1358
+ * Cap event fired by every device that registers the `network-link`
1359
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
1360
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
1361
+ * reading that moved.
1362
+ */
1363
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
1364
+ /**
1358
1365
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
1359
1366
  * "wake in progress" window — between the Baichuan wake-up issue and
1360
1367
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -20373,6 +20380,33 @@ var RecentTracksQueryInput = object({
20373
20380
  */
20374
20381
  classes: array(string()).optional()
20375
20382
  });
20383
+ /**
20384
+ * A Summary (D359): the per-camera session envelope that references tracks.
20385
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
20386
+ * served by the event-media plane by key), null until the first frame with a
20387
+ * member visible has been materialised.
20388
+ */
20389
+ var SummarySchema = object({
20390
+ id: string(),
20391
+ deviceId: number(),
20392
+ openedAt: number(),
20393
+ lastActiveAt: number(),
20394
+ sealedAt: number().nullable(),
20395
+ memberCount: number().int().nonnegative(),
20396
+ groupShotKey: string().nullable()
20397
+ });
20398
+ var SummariesQueryInput = object({
20399
+ deviceIds: array(number()).min(1),
20400
+ since: number().optional(),
20401
+ until: number().optional(),
20402
+ limit: number().int().min(1).max(200).default(50)
20403
+ });
20404
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20405
+ var SummaryDetailSchema = object({
20406
+ summary: SummarySchema,
20407
+ /** Member track ids, in absorption order. */
20408
+ trackIds: array(string()).readonly()
20409
+ });
20376
20410
  var RecentTracksPageSchema = object({
20377
20411
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
20378
20412
  tracks: array(TrackSchema).readonly(),
@@ -20773,7 +20807,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20773
20807
  * timeline would read as a camera that saw nothing.
20774
20808
  */
20775
20809
  classes: array(string()).optional()
20776
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
20810
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20777
20811
  kind: "mutation",
20778
20812
  auth: "admin"
20779
20813
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -24706,6 +24740,88 @@ onStatusChanged: { data: object({
24706
24740
  volatileStateFields: ["lastUpdated"]
24707
24741
  };
24708
24742
  /**
24743
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
24744
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24745
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24746
+ * one Home Assistant projection.
24747
+ */
24748
+ var NetworkLinkStatusSchema = object({
24749
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24750
+ type: _enum([
24751
+ "wifi",
24752
+ "ethernet",
24753
+ "cellular",
24754
+ "unknown"
24755
+ ]),
24756
+ /**
24757
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24758
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24759
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24760
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24761
+ * SKIP a null rather than coerce it.
24762
+ */
24763
+ signalPercent: number().min(0).max(100).nullable(),
24764
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24765
+ rssiDbm: number().optional(),
24766
+ /** Network name of a wireless link, when the firmware reports it. */
24767
+ ssid: string().optional(),
24768
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24769
+ lastUpdated: number()
24770
+ });
24771
+ var networkLinkCapability = {
24772
+ name: "network-link",
24773
+ scope: "device",
24774
+ deviceNative: true,
24775
+ mode: "singleton",
24776
+ deviceTypes: [
24777
+ DeviceType.Camera,
24778
+ DeviceType.Sensor,
24779
+ DeviceType.Button,
24780
+ DeviceType.Switch,
24781
+ DeviceType.Light,
24782
+ DeviceType.Lock,
24783
+ DeviceType.Siren
24784
+ ],
24785
+ methods: {},
24786
+ events: {
24787
+ /**
24788
+ * Emitted whenever the cached status changes (a link switch, a signal
24789
+ * reading that moved). Mirrored on the parent chain by the
24790
+ * DeviceEventPropagator like `battery.onStatusChanged`.
24791
+ */
24792
+ onStatusChanged: { data: object({
24793
+ deviceId: number(),
24794
+ status: NetworkLinkStatusSchema
24795
+ }) } },
24796
+ status: {
24797
+ schema: NetworkLinkStatusSchema,
24798
+ kind: "push",
24799
+ empty: {
24800
+ type: "unknown",
24801
+ signalPercent: null,
24802
+ lastUpdated: 0
24803
+ }
24804
+ },
24805
+ /**
24806
+ * Runtime-state slice — every provider stores the same shape under
24807
+ * `device.runtimeState['network-link']`, read once by the badge and the
24808
+ * Home Assistant projector regardless of the driver.
24809
+ */
24810
+ runtimeState: NetworkLinkStatusSchema,
24811
+ /**
24812
+ * Runtime-state durability: **restored** — a link reading is slow to
24813
+ * change and a sleeping battery camera may not report for hours; the
24814
+ * restored slice is what the badge shows until the next read.
24815
+ *
24816
+ * See `RuntimeStateDurability`. Enforced by
24817
+ * `scripts/check-runtime-state-durability.ts`.
24818
+ */
24819
+ durability: "restored",
24820
+ /** Clock fields: written, but excluded from the compare that decides
24821
+ * whether persisting is worth a SQLite commit. */
24822
+ volatileStateFields: ["lastUpdated"]
24823
+ };
24824
+ /**
24709
24825
  * Generic boolean sensor — last-resort fallback when no domain-
24710
24826
  * specific binary cap fits (Home Assistant `binary_sensor` without a
24711
24827
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -33090,6 +33206,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33090
33206
  motionTrigger: motionTriggerCapability,
33091
33207
  motionZones: motionZonesCapability,
33092
33208
  nativeObjectDetection: nativeObjectDetectionCapability,
33209
+ networkLink: networkLinkCapability,
33093
33210
  notifier: notifierCapability,
33094
33211
  numericSensor: numericSensorCapability,
33095
33212
  petFeeder: petFeederCapability,
@@ -37507,6 +37624,12 @@ Object.freeze({
37507
37624
  addonId: null,
37508
37625
  access: "view"
37509
37626
  },
37627
+ "pipelineAnalytics.getSummary": {
37628
+ capName: "pipeline-analytics",
37629
+ capScope: "device",
37630
+ addonId: null,
37631
+ access: "view"
37632
+ },
37510
37633
  "pipelineAnalytics.getTrack": {
37511
37634
  capName: "pipeline-analytics",
37512
37635
  capScope: "device",
@@ -37585,6 +37708,12 @@ Object.freeze({
37585
37708
  addonId: null,
37586
37709
  access: "view"
37587
37710
  },
37711
+ "pipelineAnalytics.listSummaries": {
37712
+ capName: "pipeline-analytics",
37713
+ capScope: "device",
37714
+ addonId: null,
37715
+ access: "view"
37716
+ },
37588
37717
  "pipelineAnalytics.listTrackMedia": {
37589
37718
  capName: "pipeline-analytics",
37590
37719
  capScope: "device",
@@ -41280,6 +41409,11 @@ Object.freeze({
41280
41409
  form: "array",
41281
41410
  optional: true
41282
41411
  }],
41412
+ "pipelineAnalytics.listSummaries": [{
41413
+ name: "deviceIds",
41414
+ form: "array",
41415
+ optional: false
41416
+ }],
41283
41417
  "pipelineAnalytics.listTrackMedia": [{
41284
41418
  name: "deviceId",
41285
41419
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rademacher",
3
- "version": "0.2.67",
3
+ "version": "0.2.69",
4
4
  "description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
5
5
  "keywords": [
6
6
  "camstack",