@camstack/addon-provider-wyze 0.2.72 → 0.2.74

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
@@ -31,7 +31,7 @@ let net = require("net");
31
31
  net = __toESM(net, 1);
32
32
  let node_child_process = require("node:child_process");
33
33
  let node_tls = require("node:tls");
34
- //#region ../types/dist/event-category-BZL-fdNj.mjs
34
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
35
35
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
36
36
  EventCategory["SystemBoot"] = "system.boot";
37
37
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -403,6 +403,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
403
403
  */
404
404
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
405
405
  /**
406
+ * Cap event fired by every device that registers the `network-link`
407
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
408
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
409
+ * reading that moved.
410
+ */
411
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
412
+ /**
406
413
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
407
414
  * "wake in progress" window — between the Baichuan wake-up issue and
408
415
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19438,6 +19445,33 @@ var RecentTracksQueryInput = object({
19438
19445
  */
19439
19446
  classes: array(string()).optional()
19440
19447
  });
19448
+ /**
19449
+ * A Summary (D359): the per-camera session envelope that references tracks.
19450
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19451
+ * served by the event-media plane by key), null until the first frame with a
19452
+ * member visible has been materialised.
19453
+ */
19454
+ var SummarySchema = object({
19455
+ id: string(),
19456
+ deviceId: number(),
19457
+ openedAt: number(),
19458
+ lastActiveAt: number(),
19459
+ sealedAt: number().nullable(),
19460
+ memberCount: number().int().nonnegative(),
19461
+ groupShotKey: string().nullable()
19462
+ });
19463
+ var SummariesQueryInput = object({
19464
+ deviceIds: array(number()).min(1),
19465
+ since: number().optional(),
19466
+ until: number().optional(),
19467
+ limit: number().int().min(1).max(200).default(50)
19468
+ });
19469
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19470
+ var SummaryDetailSchema = object({
19471
+ summary: SummarySchema,
19472
+ /** Member track ids, in absorption order. */
19473
+ trackIds: array(string()).readonly()
19474
+ });
19441
19475
  var RecentTracksPageSchema = object({
19442
19476
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19443
19477
  tracks: array(TrackSchema).readonly(),
@@ -19838,7 +19872,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19838
19872
  * timeline would read as a camera that saw nothing.
19839
19873
  */
19840
19874
  classes: array(string()).optional()
19841
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19875
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19842
19876
  kind: "mutation",
19843
19877
  auth: "admin"
19844
19878
  }), 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({
@@ -23875,6 +23909,88 @@ onStatusChanged: { data: object({
23875
23909
  volatileStateFields: ["lastUpdated"]
23876
23910
  };
23877
23911
  /**
23912
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23913
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23914
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23915
+ * one Home Assistant projection.
23916
+ */
23917
+ var NetworkLinkStatusSchema = object({
23918
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23919
+ type: _enum([
23920
+ "wifi",
23921
+ "ethernet",
23922
+ "cellular",
23923
+ "unknown"
23924
+ ]),
23925
+ /**
23926
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23927
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23928
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23929
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23930
+ * SKIP a null rather than coerce it.
23931
+ */
23932
+ signalPercent: number().min(0).max(100).nullable(),
23933
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23934
+ rssiDbm: number().optional(),
23935
+ /** Network name of a wireless link, when the firmware reports it. */
23936
+ ssid: string().optional(),
23937
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23938
+ lastUpdated: number()
23939
+ });
23940
+ var networkLinkCapability = {
23941
+ name: "network-link",
23942
+ scope: "device",
23943
+ deviceNative: true,
23944
+ mode: "singleton",
23945
+ deviceTypes: [
23946
+ DeviceType.Camera,
23947
+ DeviceType.Sensor,
23948
+ DeviceType.Button,
23949
+ DeviceType.Switch,
23950
+ DeviceType.Light,
23951
+ DeviceType.Lock,
23952
+ DeviceType.Siren
23953
+ ],
23954
+ methods: {},
23955
+ events: {
23956
+ /**
23957
+ * Emitted whenever the cached status changes (a link switch, a signal
23958
+ * reading that moved). Mirrored on the parent chain by the
23959
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23960
+ */
23961
+ onStatusChanged: { data: object({
23962
+ deviceId: number(),
23963
+ status: NetworkLinkStatusSchema
23964
+ }) } },
23965
+ status: {
23966
+ schema: NetworkLinkStatusSchema,
23967
+ kind: "push",
23968
+ empty: {
23969
+ type: "unknown",
23970
+ signalPercent: null,
23971
+ lastUpdated: 0
23972
+ }
23973
+ },
23974
+ /**
23975
+ * Runtime-state slice — every provider stores the same shape under
23976
+ * `device.runtimeState['network-link']`, read once by the badge and the
23977
+ * Home Assistant projector regardless of the driver.
23978
+ */
23979
+ runtimeState: NetworkLinkStatusSchema,
23980
+ /**
23981
+ * Runtime-state durability: **restored** — a link reading is slow to
23982
+ * change and a sleeping battery camera may not report for hours; the
23983
+ * restored slice is what the badge shows until the next read.
23984
+ *
23985
+ * See `RuntimeStateDurability`. Enforced by
23986
+ * `scripts/check-runtime-state-durability.ts`.
23987
+ */
23988
+ durability: "restored",
23989
+ /** Clock fields: written, but excluded from the compare that decides
23990
+ * whether persisting is worth a SQLite commit. */
23991
+ volatileStateFields: ["lastUpdated"]
23992
+ };
23993
+ /**
23878
23994
  * Generic boolean sensor — last-resort fallback when no domain-
23879
23995
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23880
23996
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32267,6 +32383,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32267
32383
  motionTrigger: motionTriggerCapability,
32268
32384
  motionZones: motionZonesCapability,
32269
32385
  nativeObjectDetection: nativeObjectDetectionCapability,
32386
+ networkLink: networkLinkCapability,
32270
32387
  notifier: notifierCapability,
32271
32388
  numericSensor: numericSensorCapability,
32272
32389
  petFeeder: petFeederCapability,
@@ -36684,6 +36801,12 @@ Object.freeze({
36684
36801
  addonId: null,
36685
36802
  access: "view"
36686
36803
  },
36804
+ "pipelineAnalytics.getSummary": {
36805
+ capName: "pipeline-analytics",
36806
+ capScope: "device",
36807
+ addonId: null,
36808
+ access: "view"
36809
+ },
36687
36810
  "pipelineAnalytics.getTrack": {
36688
36811
  capName: "pipeline-analytics",
36689
36812
  capScope: "device",
@@ -36762,6 +36885,12 @@ Object.freeze({
36762
36885
  addonId: null,
36763
36886
  access: "view"
36764
36887
  },
36888
+ "pipelineAnalytics.listSummaries": {
36889
+ capName: "pipeline-analytics",
36890
+ capScope: "device",
36891
+ addonId: null,
36892
+ access: "view"
36893
+ },
36765
36894
  "pipelineAnalytics.listTrackMedia": {
36766
36895
  capName: "pipeline-analytics",
36767
36896
  capScope: "device",
@@ -40457,6 +40586,11 @@ Object.freeze({
40457
40586
  form: "array",
40458
40587
  optional: true
40459
40588
  }],
40589
+ "pipelineAnalytics.listSummaries": [{
40590
+ name: "deviceIds",
40591
+ form: "array",
40592
+ optional: false
40593
+ }],
40460
40594
  "pipelineAnalytics.listTrackMedia": [{
40461
40595
  name: "deviceId",
40462
40596
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10,7 +10,7 @@ import { getCACertificates, setDefaultCACertificates } from "node:tls";
10
10
  //#region \0rolldown/runtime.js
11
11
  var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
12
12
  //#endregion
13
- //#region ../types/dist/event-category-BZL-fdNj.mjs
13
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
14
14
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
15
15
  EventCategory["SystemBoot"] = "system.boot";
16
16
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -382,6 +382,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
382
382
  */
383
383
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
384
384
  /**
385
+ * Cap event fired by every device that registers the `network-link`
386
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
387
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
388
+ * reading that moved.
389
+ */
390
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
391
+ /**
385
392
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
386
393
  * "wake in progress" window — between the Baichuan wake-up issue and
387
394
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19417,6 +19424,33 @@ var RecentTracksQueryInput = object({
19417
19424
  */
19418
19425
  classes: array(string()).optional()
19419
19426
  });
19427
+ /**
19428
+ * A Summary (D359): the per-camera session envelope that references tracks.
19429
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19430
+ * served by the event-media plane by key), null until the first frame with a
19431
+ * member visible has been materialised.
19432
+ */
19433
+ var SummarySchema = object({
19434
+ id: string(),
19435
+ deviceId: number(),
19436
+ openedAt: number(),
19437
+ lastActiveAt: number(),
19438
+ sealedAt: number().nullable(),
19439
+ memberCount: number().int().nonnegative(),
19440
+ groupShotKey: string().nullable()
19441
+ });
19442
+ var SummariesQueryInput = object({
19443
+ deviceIds: array(number()).min(1),
19444
+ since: number().optional(),
19445
+ until: number().optional(),
19446
+ limit: number().int().min(1).max(200).default(50)
19447
+ });
19448
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19449
+ var SummaryDetailSchema = object({
19450
+ summary: SummarySchema,
19451
+ /** Member track ids, in absorption order. */
19452
+ trackIds: array(string()).readonly()
19453
+ });
19420
19454
  var RecentTracksPageSchema = object({
19421
19455
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19422
19456
  tracks: array(TrackSchema).readonly(),
@@ -19817,7 +19851,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19817
19851
  * timeline would read as a camera that saw nothing.
19818
19852
  */
19819
19853
  classes: array(string()).optional()
19820
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19854
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19821
19855
  kind: "mutation",
19822
19856
  auth: "admin"
19823
19857
  }), 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({
@@ -23854,6 +23888,88 @@ onStatusChanged: { data: object({
23854
23888
  volatileStateFields: ["lastUpdated"]
23855
23889
  };
23856
23890
  /**
23891
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23892
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23893
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23894
+ * one Home Assistant projection.
23895
+ */
23896
+ var NetworkLinkStatusSchema = object({
23897
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23898
+ type: _enum([
23899
+ "wifi",
23900
+ "ethernet",
23901
+ "cellular",
23902
+ "unknown"
23903
+ ]),
23904
+ /**
23905
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23906
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23907
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23908
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23909
+ * SKIP a null rather than coerce it.
23910
+ */
23911
+ signalPercent: number().min(0).max(100).nullable(),
23912
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23913
+ rssiDbm: number().optional(),
23914
+ /** Network name of a wireless link, when the firmware reports it. */
23915
+ ssid: string().optional(),
23916
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23917
+ lastUpdated: number()
23918
+ });
23919
+ var networkLinkCapability = {
23920
+ name: "network-link",
23921
+ scope: "device",
23922
+ deviceNative: true,
23923
+ mode: "singleton",
23924
+ deviceTypes: [
23925
+ DeviceType.Camera,
23926
+ DeviceType.Sensor,
23927
+ DeviceType.Button,
23928
+ DeviceType.Switch,
23929
+ DeviceType.Light,
23930
+ DeviceType.Lock,
23931
+ DeviceType.Siren
23932
+ ],
23933
+ methods: {},
23934
+ events: {
23935
+ /**
23936
+ * Emitted whenever the cached status changes (a link switch, a signal
23937
+ * reading that moved). Mirrored on the parent chain by the
23938
+ * DeviceEventPropagator like `battery.onStatusChanged`.
23939
+ */
23940
+ onStatusChanged: { data: object({
23941
+ deviceId: number(),
23942
+ status: NetworkLinkStatusSchema
23943
+ }) } },
23944
+ status: {
23945
+ schema: NetworkLinkStatusSchema,
23946
+ kind: "push",
23947
+ empty: {
23948
+ type: "unknown",
23949
+ signalPercent: null,
23950
+ lastUpdated: 0
23951
+ }
23952
+ },
23953
+ /**
23954
+ * Runtime-state slice — every provider stores the same shape under
23955
+ * `device.runtimeState['network-link']`, read once by the badge and the
23956
+ * Home Assistant projector regardless of the driver.
23957
+ */
23958
+ runtimeState: NetworkLinkStatusSchema,
23959
+ /**
23960
+ * Runtime-state durability: **restored** — a link reading is slow to
23961
+ * change and a sleeping battery camera may not report for hours; the
23962
+ * restored slice is what the badge shows until the next read.
23963
+ *
23964
+ * See `RuntimeStateDurability`. Enforced by
23965
+ * `scripts/check-runtime-state-durability.ts`.
23966
+ */
23967
+ durability: "restored",
23968
+ /** Clock fields: written, but excluded from the compare that decides
23969
+ * whether persisting is worth a SQLite commit. */
23970
+ volatileStateFields: ["lastUpdated"]
23971
+ };
23972
+ /**
23857
23973
  * Generic boolean sensor — last-resort fallback when no domain-
23858
23974
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23859
23975
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32246,6 +32362,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32246
32362
  motionTrigger: motionTriggerCapability,
32247
32363
  motionZones: motionZonesCapability,
32248
32364
  nativeObjectDetection: nativeObjectDetectionCapability,
32365
+ networkLink: networkLinkCapability,
32249
32366
  notifier: notifierCapability,
32250
32367
  numericSensor: numericSensorCapability,
32251
32368
  petFeeder: petFeederCapability,
@@ -36663,6 +36780,12 @@ Object.freeze({
36663
36780
  addonId: null,
36664
36781
  access: "view"
36665
36782
  },
36783
+ "pipelineAnalytics.getSummary": {
36784
+ capName: "pipeline-analytics",
36785
+ capScope: "device",
36786
+ addonId: null,
36787
+ access: "view"
36788
+ },
36666
36789
  "pipelineAnalytics.getTrack": {
36667
36790
  capName: "pipeline-analytics",
36668
36791
  capScope: "device",
@@ -36741,6 +36864,12 @@ Object.freeze({
36741
36864
  addonId: null,
36742
36865
  access: "view"
36743
36866
  },
36867
+ "pipelineAnalytics.listSummaries": {
36868
+ capName: "pipeline-analytics",
36869
+ capScope: "device",
36870
+ addonId: null,
36871
+ access: "view"
36872
+ },
36744
36873
  "pipelineAnalytics.listTrackMedia": {
36745
36874
  capName: "pipeline-analytics",
36746
36875
  capScope: "device",
@@ -40436,6 +40565,11 @@ Object.freeze({
40436
40565
  form: "array",
40437
40566
  optional: true
40438
40567
  }],
40568
+ "pipelineAnalytics.listSummaries": [{
40569
+ name: "deviceIds",
40570
+ form: "array",
40571
+ optional: false
40572
+ }],
40439
40573
  "pipelineAnalytics.listTrackMedia": [{
40440
40574
  name: "deviceId",
40441
40575
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.72",
3
+ "version": "0.2.74",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",