@camstack/addon-provider-homeassistant 1.2.108 → 1.2.110

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
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-DAVF2Q_0.js");
2
+ const require_dist = require("./dist-DYX4j65H.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-CBPvkoKj.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-CQP9bPT3.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -16842,6 +16842,7 @@ var NcSystemEventKindSchema = _enum([
16842
16842
  "addon-crash-loop",
16843
16843
  "addon-update-available",
16844
16844
  "server-update-available",
16845
+ "wrapper-update-available",
16845
16846
  "alarm-triggered",
16846
16847
  "alarm-armed",
16847
16848
  "alarm-disarmed",
@@ -20303,7 +20304,17 @@ var EventDensityBucketSchema = object({
20303
20304
  bucketStart: number(),
20304
20305
  motion: number().int(),
20305
20306
  object: number().int(),
20306
- audio: number().int()
20307
+ audio: number().int(),
20308
+ /**
20309
+ * Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
20310
+ * as opposed to `audio`, which is their COUNT (D431).
20311
+ *
20312
+ * ABSENT when the bucket holds no audio event. Absence means "nothing was
20313
+ * measured", which is not the same claim as silence, and a lane that cannot
20314
+ * tell them apart paints a quiet hour at full scale — which is exactly what
20315
+ * the count-on-a-level-meter did.
20316
+ */
20317
+ audioDbfs: number().optional()
20307
20318
  });
20308
20319
  /**
20309
20320
  * One camera's row in a `getEventDensityBatch` answer.
@@ -22404,6 +22415,53 @@ var ImageContractSchema = object({
22404
22415
  /** One operator-grade sentence: this node runs image X; the contract says Y. */
22405
22416
  message: string()
22406
22417
  });
22418
+ /**
22419
+ * The shell verdict (see {@link WrapperKindSchema}) with the proofs that
22420
+ * produced it.
22421
+ *
22422
+ * There is deliberately NO `canSelfUpdate` and no apply action: a wrapper
22423
+ * update is an ANNOUNCEMENT. The notification body carries the exact command
22424
+ * for a `docker` shell and says the app restarts into the new build for
22425
+ * `electron`, and that sentence is chosen from `kind` alone — a boolean
22426
+ * nothing reads is the defect this repo keeps paying for.
22427
+ */
22428
+ var WrapperIdentitySchema = object({
22429
+ kind: _enum([
22430
+ "docker",
22431
+ "electron",
22432
+ "native",
22433
+ "contradictory",
22434
+ "unknown"
22435
+ ]),
22436
+ /** Every probe that ran, in a stable order. Never empty. */
22437
+ evidence: array(object({
22438
+ /** Which probe this row reports. */
22439
+ fact: _enum([
22440
+ "dockerenv-file",
22441
+ "proc-1-cgroup",
22442
+ "platform",
22443
+ "electron-app-version-env"
22444
+ ]),
22445
+ /**
22446
+ * `observed` — this process read it itself. `declared` — the shell told the
22447
+ * process and nothing here can check it. Only the Electron app version is
22448
+ * ever `declared`, and only because a child cannot see its parent.
22449
+ */
22450
+ mode: _enum(["observed", "declared"]),
22451
+ /** Did the probe support the fact it names? A `false` row is still evidence. */
22452
+ holds: boolean(),
22453
+ /** What was actually read, verbatim enough for an operator to argue with. */
22454
+ detail: string()
22455
+ })),
22456
+ /**
22457
+ * The version of the SHELL, when the shell has one it can state: the
22458
+ * Electron app version it declared, or the baked seed closure that
22459
+ * fingerprints a container / app bundle. `null` for `contradictory` and
22460
+ * `unknown` — which version belongs to the shell is precisely what is not
22461
+ * known there.
22462
+ */
22463
+ currentVersion: string().nullable()
22464
+ });
22407
22465
  var ServerRollbackInfoSchema = object({
22408
22466
  /** The version that failed (or was manually rolled back). */
22409
22467
  fromVersion: string(),
@@ -22445,7 +22503,13 @@ var ServerPackageStatusSchema = object({
22445
22503
  * Seed-vs-contract verdict (see {@link ImageContractSchema}). Optional for
22446
22504
  * version skew: an older provider's payload simply omits it.
22447
22505
  */
22448
- imageContract: ImageContractSchema.optional()
22506
+ imageContract: ImageContractSchema.optional(),
22507
+ /**
22508
+ * What this node runs INSIDE (see {@link WrapperIdentitySchema}). Optional
22509
+ * for version skew: an older provider's payload simply omits it, and an
22510
+ * absent wrapper is unknown — never `native`.
22511
+ */
22512
+ wrapper: WrapperIdentitySchema.optional()
22449
22513
  });
22450
22514
  var ServerUpdateCheckResultSchema = object({
22451
22515
  packageName: string(),
@@ -30407,7 +30471,23 @@ var RecordingRangeSchema = object({
30407
30471
  });
30408
30472
  var RecordingAvailabilitySchema = object({
30409
30473
  deviceId: number(),
30410
- ranges: array(RecordingRangeSchema)
30474
+ ranges: array(RecordingRangeSchema),
30475
+ /**
30476
+ * Every profile this camera has footage in — not only the one `ranges`
30477
+ * describes (D433).
30478
+ *
30479
+ * `ranges` answers for ONE profile by design: the timeline is a single bar,
30480
+ * and enumerating all of them triples the directory reads for a bar that
30481
+ * would look identical. But the answer used to say nothing about that, so a
30482
+ * caller asking "what can I export?" read the single preferred profile as
30483
+ * the only one that exists — on this deployment every camera records `high`
30484
+ * AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
30485
+ * UI could not see it.
30486
+ *
30487
+ * Cheap: it is the same shallow directory read the profile CHOICE already
30488
+ * makes. Ask for a specific profile's ranges with the `profile` input.
30489
+ */
30490
+ profilesWithFootage: array(string())
30411
30491
  });
30412
30492
  var RecordingDaysSchema = object({
30413
30493
  deviceId: number(),
@@ -30433,7 +30513,11 @@ var RecordingDaysSchema = object({
30433
30513
  var RecordingAvailabilityForDeviceSchema = object({
30434
30514
  deviceId: number(),
30435
30515
  read: _enum(["read", "unreadable"]),
30436
- ranges: array(RecordingRangeSchema).readonly()
30516
+ ranges: array(RecordingRangeSchema).readonly(),
30517
+ /** Same field, same meaning, as the singular answer (D433). A row that
30518
+ * dropped it would tell a grid caller the archive holds one profile.
30519
+ * Empty on an `'unreadable'` row: nobody looked. */
30520
+ profilesWithFootage: array(string()).readonly()
30437
30521
  });
30438
30522
  /**
30439
30523
  * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
@@ -30723,7 +30807,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
30723
30807
  method(object({
30724
30808
  deviceId: number(),
30725
30809
  fromMs: number(),
30726
- toMs: number()
30810
+ toMs: number(),
30811
+ /**
30812
+ * Answer for THIS profile instead of the preferred one (D433). Absent
30813
+ * keeps the timeline's behaviour — one bar, one profile, one set of
30814
+ * reads. `profilesWithFootage` on the answer says what may be asked
30815
+ * for.
30816
+ */
30817
+ profile: string().optional()
30727
30818
  }), RecordingAvailabilitySchema, {
30728
30819
  kind: "query",
30729
30820
  auth: "protected"
@@ -16842,6 +16842,7 @@ var NcSystemEventKindSchema = _enum([
16842
16842
  "addon-crash-loop",
16843
16843
  "addon-update-available",
16844
16844
  "server-update-available",
16845
+ "wrapper-update-available",
16845
16846
  "alarm-triggered",
16846
16847
  "alarm-armed",
16847
16848
  "alarm-disarmed",
@@ -20303,7 +20304,17 @@ var EventDensityBucketSchema = object({
20303
20304
  bucketStart: number(),
20304
20305
  motion: number().int(),
20305
20306
  object: number().int(),
20306
- audio: number().int()
20307
+ audio: number().int(),
20308
+ /**
20309
+ * Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
20310
+ * as opposed to `audio`, which is their COUNT (D431).
20311
+ *
20312
+ * ABSENT when the bucket holds no audio event. Absence means "nothing was
20313
+ * measured", which is not the same claim as silence, and a lane that cannot
20314
+ * tell them apart paints a quiet hour at full scale — which is exactly what
20315
+ * the count-on-a-level-meter did.
20316
+ */
20317
+ audioDbfs: number().optional()
20307
20318
  });
20308
20319
  /**
20309
20320
  * One camera's row in a `getEventDensityBatch` answer.
@@ -22404,6 +22415,53 @@ var ImageContractSchema = object({
22404
22415
  /** One operator-grade sentence: this node runs image X; the contract says Y. */
22405
22416
  message: string()
22406
22417
  });
22418
+ /**
22419
+ * The shell verdict (see {@link WrapperKindSchema}) with the proofs that
22420
+ * produced it.
22421
+ *
22422
+ * There is deliberately NO `canSelfUpdate` and no apply action: a wrapper
22423
+ * update is an ANNOUNCEMENT. The notification body carries the exact command
22424
+ * for a `docker` shell and says the app restarts into the new build for
22425
+ * `electron`, and that sentence is chosen from `kind` alone — a boolean
22426
+ * nothing reads is the defect this repo keeps paying for.
22427
+ */
22428
+ var WrapperIdentitySchema = object({
22429
+ kind: _enum([
22430
+ "docker",
22431
+ "electron",
22432
+ "native",
22433
+ "contradictory",
22434
+ "unknown"
22435
+ ]),
22436
+ /** Every probe that ran, in a stable order. Never empty. */
22437
+ evidence: array(object({
22438
+ /** Which probe this row reports. */
22439
+ fact: _enum([
22440
+ "dockerenv-file",
22441
+ "proc-1-cgroup",
22442
+ "platform",
22443
+ "electron-app-version-env"
22444
+ ]),
22445
+ /**
22446
+ * `observed` — this process read it itself. `declared` — the shell told the
22447
+ * process and nothing here can check it. Only the Electron app version is
22448
+ * ever `declared`, and only because a child cannot see its parent.
22449
+ */
22450
+ mode: _enum(["observed", "declared"]),
22451
+ /** Did the probe support the fact it names? A `false` row is still evidence. */
22452
+ holds: boolean(),
22453
+ /** What was actually read, verbatim enough for an operator to argue with. */
22454
+ detail: string()
22455
+ })),
22456
+ /**
22457
+ * The version of the SHELL, when the shell has one it can state: the
22458
+ * Electron app version it declared, or the baked seed closure that
22459
+ * fingerprints a container / app bundle. `null` for `contradictory` and
22460
+ * `unknown` — which version belongs to the shell is precisely what is not
22461
+ * known there.
22462
+ */
22463
+ currentVersion: string().nullable()
22464
+ });
22407
22465
  var ServerRollbackInfoSchema = object({
22408
22466
  /** The version that failed (or was manually rolled back). */
22409
22467
  fromVersion: string(),
@@ -22445,7 +22503,13 @@ var ServerPackageStatusSchema = object({
22445
22503
  * Seed-vs-contract verdict (see {@link ImageContractSchema}). Optional for
22446
22504
  * version skew: an older provider's payload simply omits it.
22447
22505
  */
22448
- imageContract: ImageContractSchema.optional()
22506
+ imageContract: ImageContractSchema.optional(),
22507
+ /**
22508
+ * What this node runs INSIDE (see {@link WrapperIdentitySchema}). Optional
22509
+ * for version skew: an older provider's payload simply omits it, and an
22510
+ * absent wrapper is unknown — never `native`.
22511
+ */
22512
+ wrapper: WrapperIdentitySchema.optional()
22449
22513
  });
22450
22514
  var ServerUpdateCheckResultSchema = object({
22451
22515
  packageName: string(),
@@ -30407,7 +30471,23 @@ var RecordingRangeSchema = object({
30407
30471
  });
30408
30472
  var RecordingAvailabilitySchema = object({
30409
30473
  deviceId: number(),
30410
- ranges: array(RecordingRangeSchema)
30474
+ ranges: array(RecordingRangeSchema),
30475
+ /**
30476
+ * Every profile this camera has footage in — not only the one `ranges`
30477
+ * describes (D433).
30478
+ *
30479
+ * `ranges` answers for ONE profile by design: the timeline is a single bar,
30480
+ * and enumerating all of them triples the directory reads for a bar that
30481
+ * would look identical. But the answer used to say nothing about that, so a
30482
+ * caller asking "what can I export?" read the single preferred profile as
30483
+ * the only one that exists — on this deployment every camera records `high`
30484
+ * AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
30485
+ * UI could not see it.
30486
+ *
30487
+ * Cheap: it is the same shallow directory read the profile CHOICE already
30488
+ * makes. Ask for a specific profile's ranges with the `profile` input.
30489
+ */
30490
+ profilesWithFootage: array(string())
30411
30491
  });
30412
30492
  var RecordingDaysSchema = object({
30413
30493
  deviceId: number(),
@@ -30433,7 +30513,11 @@ var RecordingDaysSchema = object({
30433
30513
  var RecordingAvailabilityForDeviceSchema = object({
30434
30514
  deviceId: number(),
30435
30515
  read: _enum(["read", "unreadable"]),
30436
- ranges: array(RecordingRangeSchema).readonly()
30516
+ ranges: array(RecordingRangeSchema).readonly(),
30517
+ /** Same field, same meaning, as the singular answer (D433). A row that
30518
+ * dropped it would tell a grid caller the archive holds one profile.
30519
+ * Empty on an `'unreadable'` row: nobody looked. */
30520
+ profilesWithFootage: array(string()).readonly()
30437
30521
  });
30438
30522
  /**
30439
30523
  * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
@@ -30723,7 +30807,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
30723
30807
  method(object({
30724
30808
  deviceId: number(),
30725
30809
  fromMs: number(),
30726
- toMs: number()
30810
+ toMs: number(),
30811
+ /**
30812
+ * Answer for THIS profile instead of the preferred one (D433). Absent
30813
+ * keeps the timeline's behaviour — one bar, one profile, one set of
30814
+ * reads. `profilesWithFootage` on the answer says what may be asked
30815
+ * for.
30816
+ */
30817
+ profile: string().optional()
30727
30818
  }), RecordingAvailabilitySchema, {
30728
30819
  kind: "query",
30729
30820
  auth: "protected"
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-DAVF2Q_0.js");
6
+ const require_dist = require("../dist-DYX4j65H.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-CBPvkoKj.mjs";
1
+ import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-CQP9bPT3.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.108",
3
+ "version": "1.2.110",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",