@camstack/addon-provider-homeassistant 1.2.99 → 1.2.101

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-Ds1Z7VBZ.js");
2
+ const require_dist = require("./dist-B8yYEg2y.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-B_gh5FO-.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-CCAzG3ec.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
@@ -19134,11 +19134,30 @@ var SensorEventSchema = object({
19134
19134
  value: record(string(), unknown()).nullable(),
19135
19135
  timestamp: number()
19136
19136
  });
19137
+ /**
19138
+ * One stored sighting on a track's trajectory.
19139
+ *
19140
+ * The array these live in is returned in TIME order (D399) — it is APPENDED in
19141
+ * arrival order, and the two detector passes interleave, so a consumer must not
19142
+ * assume the two are the same on a row written by an older build.
19143
+ */
19137
19144
  var TrackPositionSchema = object({
19138
19145
  x: number(),
19139
19146
  y: number(),
19140
19147
  timestamp: number(),
19141
- bbox: BoundingBoxSchema
19148
+ bbox: BoundingBoxSchema,
19149
+ /**
19150
+ * Which detector pass measured this box (D399): `frame` is the full-frame
19151
+ * pass on the analysis raster, `recovery` is the native-resolution
19152
+ * small-subject second pass (D377/D378). Both write into one array, and until
19153
+ * this field existed the only way to tell them apart was that full-frame boxes
19154
+ * are exact multiples of 1.2 while recovery boxes are full-precision floats.
19155
+ * Absent on rows written before D399.
19156
+ */
19157
+ source: _enum(["frame", "recovery"]).optional(),
19158
+ /** Detection score of this box, so a position can be weighed and not only
19159
+ * plotted. Absent on rows written before D399. */
19160
+ score: number().optional()
19142
19161
  });
19143
19162
  var TrackSnapshotSchema = object({
19144
19163
  timestamp: number(),
@@ -19538,14 +19557,25 @@ var TrackSchema = object({
19538
19557
  */
19539
19558
  hasRider: boolean().optional(),
19540
19559
  /**
19541
- * WHY this track ended without a NATIVE best-shot tile
19542
- * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
19560
+ * WHY this track ended without a NATIVE best-shot FRAME
19561
+ * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md),
19562
+ * widened by [D400](../decisions/adr-0400-the-picture-is-judged-on-what-is-delivered.md)) —
19543
19563
  * a composed token line (`no-key-frame capture=keyframe:native-missx4`,
19544
- * `derive-returned-null tile=standin`, …) written at close and CLEARED by
19545
- * the late-keyFrame upgrade when a native tile lands after all. The
19546
- * operator-facing answer to "perché manca l'immagine?" on a track whose
19564
+ * `derive-returned-null tile=standin`,
19565
+ * `native-tile tile=native no-key-frame-at-close`, …) written at close and
19566
+ * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
19567
+ * The operator-facing answer to "perché manca l'immagine?" on a track whose
19547
19568
  * tile is a face/plate stand-in, a raster crop, or an icon.
19548
19569
  *
19570
+ * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
19571
+ * the TILE ranked below native, so a track whose thumbnail landed natively
19572
+ * while its key frame missed carried no reason at all — three of the four
19573
+ * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
19574
+ * that shape, and their "niente ultimo" had no cause anywhere on the row.
19575
+ * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
19576
+ * lastFrame copy source`), so its absence is now on this line whatever the
19577
+ * tile ended up being.
19578
+ *
19549
19579
  * **Absent ≠ "missed silently"**: a row written before the column, a hub
19550
19580
  * that predates the field, and every track whose tile landed native all
19551
19581
  * omit it. Render nothing when absent.
@@ -25698,6 +25728,59 @@ var IdentitySampleInfoSchema = object({
25698
25728
  deviceId: number().int().optional(),
25699
25729
  base64: string().optional()
25700
25730
  });
25731
+ /**
25732
+ * One enrolled sample, judged against the gallery it lives in.
25733
+ *
25734
+ * The gallery is the one input to recognition nobody re-reads: a sample
25735
+ * enrolled from the wrong face keeps voting forever, and because the matches it
25736
+ * pulls then look confident, nobody goes back. The 2026-09-08 audit found
25737
+ * exactly one such pair on this cluster — a sample scoring 0.61 against three
25738
+ * samples of ANOTHER person, enrolled from the same camera in the same minute,
25739
+ * where every other cross-identity pair sits under 0.50.
25740
+ */
25741
+ var IdentitySampleAuditRowSchema = object({
25742
+ sampleId: string(),
25743
+ enrolledAt: number().int(),
25744
+ deviceId: number().int().optional(),
25745
+ source: _enum(["detected", "photo"]),
25746
+ /** The enrolled crop's media key, so the panel can show the evidence. */
25747
+ mediaKey: string().optional(),
25748
+ /**
25749
+ * False = the sample is stamped with a DIFFERENT face model, and a cosine
25750
+ * across feature spaces is a well-formed float with no meaning. Every number
25751
+ * below then says nothing — it must read as "cannot say", never as an
25752
+ * accusation and never as a clean bill: this list ends in a Remove button.
25753
+ */
25754
+ comparable: boolean(),
25755
+ /** Mean cosine against this person's other samples. Null when there are none
25756
+ * to compare with — never 0, which would read as "opposite". */
25757
+ selfMean: number().nullable(),
25758
+ /** The other person this sample looks most like, when it looks like one.
25759
+ * This is the half that convicts: not looking like yourself can be a hard
25760
+ * angle; looking like someone the gallery can NAME is a mis-enrolment. */
25761
+ bestForeign: object({
25762
+ identityId: string(),
25763
+ name: string(),
25764
+ score: number()
25765
+ }).optional(),
25766
+ /** 0 = nothing to say. Higher = look at this one sooner. */
25767
+ suspicion: number()
25768
+ });
25769
+ var IdentitySampleAuditSchema = object({
25770
+ identityId: string(),
25771
+ name: string(),
25772
+ /** The cluster face model every comparison was made in. */
25773
+ modelId: string(),
25774
+ totalSamples: number().int(),
25775
+ comparableSamples: number().int(),
25776
+ flagged: number().int(),
25777
+ /** The bar `flagged` counts against, so the panel states the RULE and not
25778
+ * only its current result. */
25779
+ flagThreshold: number(),
25780
+ /** Worst first. A row with nothing to say still appears, at the bottom: the
25781
+ * operator asked to see the gallery, not only its accusations. */
25782
+ rows: array(IdentitySampleAuditRowSchema).readonly()
25783
+ });
25701
25784
  var FaceInfoSchema = object({
25702
25785
  faceId: string(),
25703
25786
  deviceId: number().int(),
@@ -25849,7 +25932,7 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
25849
25932
  }), method(object({ id: string() }), _void(), {
25850
25933
  kind: "mutation",
25851
25934
  auth: "admin"
25852
- }), method(object({ identityId: string() }), array(IdentitySampleInfoSchema).readonly()), method(object({
25935
+ }), method(object({ identityId: string() }), array(IdentitySampleInfoSchema).readonly()), method(object({ identityId: string().min(1) }), IdentitySampleAuditSchema, { auth: "admin" }), method(object({
25853
25936
  identityId: string(),
25854
25937
  sampleId: string()
25855
25938
  }), _void(), {
@@ -36342,6 +36425,12 @@ Object.freeze({
36342
36425
  addonId: null,
36343
36426
  access: "create"
36344
36427
  },
36428
+ "faceGallery.auditIdentitySamples": {
36429
+ capName: "face-gallery",
36430
+ capScope: "system",
36431
+ addonId: null,
36432
+ access: "view"
36433
+ },
36345
36434
  "faceGallery.createIdentity": {
36346
36435
  capName: "face-gallery",
36347
36436
  capScope: "system",
@@ -19134,11 +19134,30 @@ var SensorEventSchema = object({
19134
19134
  value: record(string(), unknown()).nullable(),
19135
19135
  timestamp: number()
19136
19136
  });
19137
+ /**
19138
+ * One stored sighting on a track's trajectory.
19139
+ *
19140
+ * The array these live in is returned in TIME order (D399) — it is APPENDED in
19141
+ * arrival order, and the two detector passes interleave, so a consumer must not
19142
+ * assume the two are the same on a row written by an older build.
19143
+ */
19137
19144
  var TrackPositionSchema = object({
19138
19145
  x: number(),
19139
19146
  y: number(),
19140
19147
  timestamp: number(),
19141
- bbox: BoundingBoxSchema
19148
+ bbox: BoundingBoxSchema,
19149
+ /**
19150
+ * Which detector pass measured this box (D399): `frame` is the full-frame
19151
+ * pass on the analysis raster, `recovery` is the native-resolution
19152
+ * small-subject second pass (D377/D378). Both write into one array, and until
19153
+ * this field existed the only way to tell them apart was that full-frame boxes
19154
+ * are exact multiples of 1.2 while recovery boxes are full-precision floats.
19155
+ * Absent on rows written before D399.
19156
+ */
19157
+ source: _enum(["frame", "recovery"]).optional(),
19158
+ /** Detection score of this box, so a position can be weighed and not only
19159
+ * plotted. Absent on rows written before D399. */
19160
+ score: number().optional()
19142
19161
  });
19143
19162
  var TrackSnapshotSchema = object({
19144
19163
  timestamp: number(),
@@ -19538,14 +19557,25 @@ var TrackSchema = object({
19538
19557
  */
19539
19558
  hasRider: boolean().optional(),
19540
19559
  /**
19541
- * WHY this track ended without a NATIVE best-shot tile
19542
- * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
19560
+ * WHY this track ended without a NATIVE best-shot FRAME
19561
+ * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md),
19562
+ * widened by [D400](../decisions/adr-0400-the-picture-is-judged-on-what-is-delivered.md)) —
19543
19563
  * a composed token line (`no-key-frame capture=keyframe:native-missx4`,
19544
- * `derive-returned-null tile=standin`, …) written at close and CLEARED by
19545
- * the late-keyFrame upgrade when a native tile lands after all. The
19546
- * operator-facing answer to "perché manca l'immagine?" on a track whose
19564
+ * `derive-returned-null tile=standin`,
19565
+ * `native-tile tile=native no-key-frame-at-close`, …) written at close and
19566
+ * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
19567
+ * The operator-facing answer to "perché manca l'immagine?" on a track whose
19547
19568
  * tile is a face/plate stand-in, a raster crop, or an icon.
19548
19569
  *
19570
+ * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
19571
+ * the TILE ranked below native, so a track whose thumbnail landed natively
19572
+ * while its key frame missed carried no reason at all — three of the four
19573
+ * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
19574
+ * that shape, and their "niente ultimo" had no cause anywhere on the row.
19575
+ * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
19576
+ * lastFrame copy source`), so its absence is now on this line whatever the
19577
+ * tile ended up being.
19578
+ *
19549
19579
  * **Absent ≠ "missed silently"**: a row written before the column, a hub
19550
19580
  * that predates the field, and every track whose tile landed native all
19551
19581
  * omit it. Render nothing when absent.
@@ -25698,6 +25728,59 @@ var IdentitySampleInfoSchema = object({
25698
25728
  deviceId: number().int().optional(),
25699
25729
  base64: string().optional()
25700
25730
  });
25731
+ /**
25732
+ * One enrolled sample, judged against the gallery it lives in.
25733
+ *
25734
+ * The gallery is the one input to recognition nobody re-reads: a sample
25735
+ * enrolled from the wrong face keeps voting forever, and because the matches it
25736
+ * pulls then look confident, nobody goes back. The 2026-09-08 audit found
25737
+ * exactly one such pair on this cluster — a sample scoring 0.61 against three
25738
+ * samples of ANOTHER person, enrolled from the same camera in the same minute,
25739
+ * where every other cross-identity pair sits under 0.50.
25740
+ */
25741
+ var IdentitySampleAuditRowSchema = object({
25742
+ sampleId: string(),
25743
+ enrolledAt: number().int(),
25744
+ deviceId: number().int().optional(),
25745
+ source: _enum(["detected", "photo"]),
25746
+ /** The enrolled crop's media key, so the panel can show the evidence. */
25747
+ mediaKey: string().optional(),
25748
+ /**
25749
+ * False = the sample is stamped with a DIFFERENT face model, and a cosine
25750
+ * across feature spaces is a well-formed float with no meaning. Every number
25751
+ * below then says nothing — it must read as "cannot say", never as an
25752
+ * accusation and never as a clean bill: this list ends in a Remove button.
25753
+ */
25754
+ comparable: boolean(),
25755
+ /** Mean cosine against this person's other samples. Null when there are none
25756
+ * to compare with — never 0, which would read as "opposite". */
25757
+ selfMean: number().nullable(),
25758
+ /** The other person this sample looks most like, when it looks like one.
25759
+ * This is the half that convicts: not looking like yourself can be a hard
25760
+ * angle; looking like someone the gallery can NAME is a mis-enrolment. */
25761
+ bestForeign: object({
25762
+ identityId: string(),
25763
+ name: string(),
25764
+ score: number()
25765
+ }).optional(),
25766
+ /** 0 = nothing to say. Higher = look at this one sooner. */
25767
+ suspicion: number()
25768
+ });
25769
+ var IdentitySampleAuditSchema = object({
25770
+ identityId: string(),
25771
+ name: string(),
25772
+ /** The cluster face model every comparison was made in. */
25773
+ modelId: string(),
25774
+ totalSamples: number().int(),
25775
+ comparableSamples: number().int(),
25776
+ flagged: number().int(),
25777
+ /** The bar `flagged` counts against, so the panel states the RULE and not
25778
+ * only its current result. */
25779
+ flagThreshold: number(),
25780
+ /** Worst first. A row with nothing to say still appears, at the bottom: the
25781
+ * operator asked to see the gallery, not only its accusations. */
25782
+ rows: array(IdentitySampleAuditRowSchema).readonly()
25783
+ });
25701
25784
  var FaceInfoSchema = object({
25702
25785
  faceId: string(),
25703
25786
  deviceId: number().int(),
@@ -25849,7 +25932,7 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
25849
25932
  }), method(object({ id: string() }), _void(), {
25850
25933
  kind: "mutation",
25851
25934
  auth: "admin"
25852
- }), method(object({ identityId: string() }), array(IdentitySampleInfoSchema).readonly()), method(object({
25935
+ }), method(object({ identityId: string() }), array(IdentitySampleInfoSchema).readonly()), method(object({ identityId: string().min(1) }), IdentitySampleAuditSchema, { auth: "admin" }), method(object({
25853
25936
  identityId: string(),
25854
25937
  sampleId: string()
25855
25938
  }), _void(), {
@@ -36342,6 +36425,12 @@ Object.freeze({
36342
36425
  addonId: null,
36343
36426
  access: "create"
36344
36427
  },
36428
+ "faceGallery.auditIdentitySamples": {
36429
+ capName: "face-gallery",
36430
+ capScope: "system",
36431
+ addonId: null,
36432
+ access: "view"
36433
+ },
36345
36434
  "faceGallery.createIdentity": {
36346
36435
  capName: "face-gallery",
36347
36436
  capScope: "system",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-Ds1Z7VBZ.js");
6
+ const require_dist = require("../dist-B8yYEg2y.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-B_gh5FO-.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-CCAzG3ec.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.99",
3
+ "version": "1.2.101",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",