@camstack/addon-provider-homeassistant 1.2.114 → 1.2.116

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-1-owndOS.js");
2
+ const require_dist = require("./dist-Daqsf2Q7.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-BPuEMYlM.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-DRv84o8E.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
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-DAXzJeTX.mjs
1
+ //#region ../types/dist/event-category-ZyX6jcse.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -559,7 +559,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
559
559
  * a package zone — a newly-appeared stationary object of a package class
560
560
  * that cleared the class / zone / dwell / size gates. Payload:
561
561
  * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
562
- * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
562
+ * entryId, className, zoneIds, keyFrameMediaId?, bbox, timestamp }`.
563
563
  * Telemetry (D8): the durable record is the `package-events` store row;
564
564
  * this bus topic drives notifier rules + live UI. See
565
565
  * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
@@ -5345,7 +5345,7 @@ var ZodIssueCode = {
5345
5345
  var ZodFirstPartyTypeKind;
5346
5346
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5347
5347
  //#endregion
5348
- //#region ../types/dist/sleep-BnujYGPe.mjs
5348
+ //#region ../types/dist/sleep-CnLyvg3w.mjs
5349
5349
  /**
5350
5350
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5351
5351
  * window to float samples (D455).
@@ -7371,13 +7371,30 @@ new Set([
7371
7371
  "scene",
7372
7372
  "motion",
7373
7373
  "object",
7374
- "audio"
7374
+ "audio",
7375
+ "mosaic"
7375
7376
  ]);
7376
- new Set([
7377
+ /**
7378
+ * The owner types that are event tables, in the order the event-media resolver
7379
+ * should consider them. Exported so a consumer asking "is this key an event?"
7380
+ * does not re-spell the list and drift from it.
7381
+ */
7382
+ var EVENT_OWNER_TYPES = [
7377
7383
  "motion",
7378
7384
  "object",
7379
7385
  "audio"
7380
- ]);
7386
+ ];
7387
+ /**
7388
+ * The same list as a Zod enum, for the cap inputs that must NAME the table
7389
+ * (D482: `getEventMedia` / `listEventMedia` take an owner, and an owner is
7390
+ * `(table, id)`).
7391
+ *
7392
+ * Built FROM {@link EVENT_OWNER_TYPES} rather than re-spelled: a fourth event
7393
+ * table would otherwise be accepted by the codec and refused at the door, with
7394
+ * nothing failing until a caller asked.
7395
+ */
7396
+ var EventOwnerTypeSchema = _enum(EVENT_OWNER_TYPES);
7397
+ new Set(EVENT_OWNER_TYPES);
7381
7398
  /**
7382
7399
  * Build an `IAddonRouteProvider` from a list of routes. Implements
7383
7400
  * both the operator-facing `getRoutes` (returning route descriptors
@@ -12787,6 +12804,16 @@ method(object({
12787
12804
  filter: QueryFilterSchema.optional(),
12788
12805
  columns: array(string()).readonly().optional()
12789
12806
  }), array(SettingsRecordSchema).readonly()), method(object({
12807
+ namespace: string().optional(),
12808
+ collection: string(),
12809
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
12810
+ * index on the collection. Never empty. */
12811
+ conflict: array(string()).readonly(),
12812
+ record: BulkRecordSchema
12813
+ }), object({
12814
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
12815
+ * row's own id on an update. */
12816
+ id: union([string(), number()]) }), { kind: "mutation" }), method(object({
12790
12817
  namespace: string().optional(),
12791
12818
  collection: string(),
12792
12819
  record: object({
@@ -12921,6 +12948,14 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
12921
12948
  id: union([string(), number()]) }), {
12922
12949
  kind: "mutation",
12923
12950
  auth: "admin"
12951
+ }), method(object({
12952
+ namespace: string().optional(),
12953
+ collection: string(),
12954
+ conflict: array(string()).readonly(),
12955
+ record: BulkRecordSchema
12956
+ }), object({ id: union([string(), number()]) }), {
12957
+ kind: "mutation",
12958
+ auth: "admin"
12924
12959
  }), method(object({
12925
12960
  namespace: string().optional(),
12926
12961
  collection: string(),
@@ -19520,8 +19555,8 @@ var TrackPositionSchema = object({
19520
19555
  var TrackSnapshotSchema = object({
19521
19556
  timestamp: number(),
19522
19557
  position: TrackPositionSchema,
19523
- /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
19524
- mediaKey: string()
19558
+ /** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
19559
+ mediaId: number().int()
19525
19560
  });
19526
19561
  /**
19527
19562
  * Normalized 0..1 trajectory envelope (min/max over every position bbox,
@@ -20125,14 +20160,14 @@ var ObjectEventSchema = object({
20125
20160
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20126
20161
  frameWidth: number().optional(),
20127
20162
  frameHeight: number().optional(),
20128
- /** MediaStore key for the crop attached to this event (if any). */
20129
- mediaKey: string().optional(),
20130
- /** Design B: MediaStore key of the track's native-resolution key frame (the
20163
+ /** Media row id of the crop attached to this event (if any) — D482. */
20164
+ mediaId: number().int().optional(),
20165
+ /** Design B: media row id of the track's native-resolution key frame (the
20131
20166
  * best-detection full frame). Resolve via the event-media data-plane
20132
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
20167
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`) for a detail view that
20133
20168
  * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
20134
- * sources — consumers fall back to `mediaKey` (the tight crop). */
20135
- keyFrameMediaKey: string().optional(),
20169
+ * sources — consumers fall back to `mediaId` (the tight crop). */
20170
+ keyFrameMediaId: number().int().optional(),
20136
20171
  /** Populated by B5 (recording playback URL for this event). */
20137
20172
  mediaUrl: string().optional(),
20138
20173
  /** The parent track's key-event importance [0,1], propagated to every object
@@ -20182,7 +20217,7 @@ var MediaFileKindEnum = _enum([
20182
20217
  * hub-main's heap on the way past — for an `<img>` that would have cached it.
20183
20218
  *
20184
20219
  * `url` points at the `event-media` data plane
20185
- * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
20220
+ * (`/addon/<addonId>/event-media/m/<mediaId>` — D482), which serves the same blob
20186
20221
  * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
20187
20222
  * render a `?variant=thumb`, and streams. The hub gate in front of it requires
20188
20223
  * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
@@ -20190,10 +20225,13 @@ var MediaFileKindEnum = _enum([
20190
20225
  * `data-plane-access.ts` for the rule and the one gap it does not close
20191
20226
  * (per-device scoping).
20192
20227
  *
20193
- * The URL is built from the row's **stored** key, which is not always its
20194
- * published `kind`: a track's face/plate crop is stored as `crop` under
20228
+ * The URL is built from the row's own id, which since D482 says nothing about
20229
+ * the row's owner or kind — and that is the point. The published `kind` is not
20230
+ * the stored one (a track's face/plate crop is stored as `crop` under
20195
20231
  * `('face'|'plate', '<prefix>-<trackId>')` and published as
20196
- * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
20232
+ * `faceCrop`/`plateCrop`), and under the old composite key the URL had to be
20233
+ * taken from `row.key` verbatim or it 404'd exactly those two rows. An id
20234
+ * cannot be mis-reconstructed, because there is nothing in it to reconstruct.
20197
20235
  *
20198
20236
  * ## `base64` is TRANSITIONAL and is going away
20199
20237
  *
@@ -20206,7 +20244,19 @@ var MediaFileKindEnum = _enum([
20206
20244
  * `analytics-query-facade.ts`; nothing else reads it.
20207
20245
  */
20208
20246
  var MediaFileSchema = object({
20209
- key: string(),
20247
+ /**
20248
+ * The media row's OWN id — the rowid SQLite assigned it (D482).
20249
+ *
20250
+ * It used to be the row's composite key, `<ownerType>:<ownerId>:<fileKind>
20251
+ * [:<timestampMs>]`, which embedded a FOREIGN id. D474 made event ids
20252
+ * per-table rowid aliases, so `object:101314` and `motion:101314` are two
20253
+ * different rows that spell the same number, and a track whose
20254
+ * `bestEventId` was an object event was served a motion event's snapshot —
20255
+ * a night-time thumbnail on an afternoon track, with no error anywhere. A
20256
+ * surrogate id cannot name the wrong row's owner, because it names no owner
20257
+ * at all.
20258
+ */
20259
+ mediaId: number().int(),
20210
20260
  kind: MediaFileKindEnum,
20211
20261
  sizeBytes: number(),
20212
20262
  timestamp: number()
@@ -20314,7 +20364,7 @@ var RetrainTrackSchema = object({
20314
20364
  });
20315
20365
  /** A frame the picker may offer — an index row, no blob was read to produce it. */
20316
20366
  var RetrainFrameCandidateSchema = object({
20317
- mediaKey: string(),
20367
+ mediaId: number().int(),
20318
20368
  kind: MediaFileKindEnum,
20319
20369
  timestamp: number(),
20320
20370
  sizeBytes: number().int(),
@@ -20328,7 +20378,7 @@ var RetrainFrameSchema = object({
20328
20378
  deviceId: number(),
20329
20379
  trackId: string(),
20330
20380
  /** Provenance only. It may already point at nothing — that is expected. */
20331
- sourceMediaKey: string(),
20381
+ sourceMediaId: number().int(),
20332
20382
  sourceKind: MediaFileKindEnum,
20333
20383
  sizeBytes: number().int(),
20334
20384
  width: number().int(),
@@ -20344,7 +20394,7 @@ var RetrainCopyRefusalSchema = _enum([
20344
20394
  var RetrainFrameSelectionSchema = object({
20345
20395
  copied: array(RetrainFrameSchema).readonly(),
20346
20396
  refused: array(object({
20347
- sourceMediaKey: string(),
20397
+ sourceMediaId: number().int(),
20348
20398
  reason: RetrainCopyRefusalSchema
20349
20399
  })).readonly()
20350
20400
  });
@@ -20352,7 +20402,7 @@ var RetrainFrameListSchema = object({
20352
20402
  candidates: array(RetrainFrameCandidateSchema).readonly(),
20353
20403
  copies: array(RetrainFrameSchema).readonly(),
20354
20404
  /** What the page pre-selects — the native key frame when one survives. */
20355
- autoPickMediaKey: string().optional()
20405
+ autoPickMediaId: number().int().optional()
20356
20406
  });
20357
20407
  /** What the operator asked the assist to look for. */
20358
20408
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
@@ -20447,9 +20497,11 @@ var RecentTracksQueryInput = object({
20447
20497
  });
20448
20498
  /**
20449
20499
  * A Summary (D359): the per-camera session envelope that references tracks.
20450
- * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
20451
- * served by the event-media plane by key), null until the first frame with a
20452
- * member visible has been materialised.
20500
+ * `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
20501
+ * 'summary'`, served by the event-media plane at `/m/<id>`), null until the
20502
+ * first frame with a member visible has been materialised (D482 — it was the
20503
+ * row's composite key, which embedded the owner and could name another table's
20504
+ * row once event ids became per-table rowids).
20453
20505
  */
20454
20506
  var SummarySchema = object({
20455
20507
  id: string(),
@@ -20458,7 +20510,7 @@ var SummarySchema = object({
20458
20510
  lastActiveAt: number(),
20459
20511
  sealedAt: number().nullable(),
20460
20512
  memberCount: number().int().nonnegative(),
20461
- groupShotKey: string().nullable()
20513
+ groupShotMediaId: number().int().nullable()
20462
20514
  });
20463
20515
  var SummariesQueryInput = object({
20464
20516
  deviceIds: array(number()).min(1),
@@ -21012,7 +21064,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21012
21064
  }), method(object({
21013
21065
  deviceId: number(),
21014
21066
  trackId: string(),
21015
- mediaKeys: array(string()).min(1)
21067
+ mediaIds: array(number().int()).min(1)
21016
21068
  }), RetrainFrameSelectionSchema, {
21017
21069
  kind: "mutation",
21018
21070
  auth: "admin"
@@ -21080,7 +21132,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21080
21132
  kind: "query",
21081
21133
  auth: "admin"
21082
21134
  }), method(object({
21083
- eventId: string(),
21135
+ /** Which of the three event tables owns the row. */
21136
+ ownerType: EventOwnerTypeSchema,
21137
+ /** The event's rowid in that table (D474: an event id is a number). */
21138
+ eventId: number().int(),
21084
21139
  kind: MediaFileKindEnum.optional(),
21085
21140
  deviceId: number()
21086
21141
  }), array(MediaFileSchema).readonly()), method(object({
@@ -21091,7 +21146,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21091
21146
  trackId: string(),
21092
21147
  deviceId: number()
21093
21148
  }), array(MediaFileInfoSchema).readonly()), method(object({
21094
- eventId: string(),
21149
+ ownerType: EventOwnerTypeSchema,
21150
+ eventId: number().int(),
21095
21151
  deviceId: number()
21096
21152
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
21097
21153
  kind: "mutation",
@@ -26373,8 +26429,8 @@ var IdentitySchema = object({
26373
26429
  id: string(),
26374
26430
  name: string(),
26375
26431
  sampleCount: number().int().nonnegative(),
26376
- coverMediaKey: string().optional(),
26377
- /** Inline base64 of the cover sample's crop, resolved from `coverMediaKey`.
26432
+ coverMediaId: number().int().optional(),
26433
+ /** Inline base64 of the cover sample's crop, resolved from `coverMediaId`.
26378
26434
  * Lets the UI render the person's face avatar instead of a placeholder icon. */
26379
26435
  coverBase64: string().optional()
26380
26436
  });
@@ -26400,8 +26456,8 @@ var IdentitySampleAuditRowSchema = object({
26400
26456
  enrolledAt: number().int(),
26401
26457
  deviceId: number().int().optional(),
26402
26458
  source: _enum(["detected", "photo"]),
26403
- /** The enrolled crop's media key, so the panel can show the evidence. */
26404
- mediaKey: string().optional(),
26459
+ /** The enrolled crop's media row id, so the panel can show the evidence. */
26460
+ mediaId: number().int().optional(),
26405
26461
  /**
26406
26462
  * False = the sample is stamped with a DIFFERENT face model, and a cosine
26407
26463
  * across feature spaces is a well-formed float with no meaning. Every number
@@ -26470,15 +26526,15 @@ var FaceInfoSchema = object({
26470
26526
  */
26471
26527
  cropUrl: string().optional(),
26472
26528
  /** Design B: the face bbox (pixel space) on the key frame — lets a detail
26473
- * view draw the box over the native `keyFrameMediaKey` frame. Absent on
26529
+ * view draw the box over the native `keyFrameMediaId` frame. Absent on
26474
26530
  * legacy rows written before design B. */
26475
26531
  faceBbox: BoundingBoxSchema.optional(),
26476
26532
  /** Design B: MediaStore key of the track's native-resolution key frame.
26477
26533
  * Fetch the native JPEG via the event-media data-plane
26478
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
26534
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`). Absent when the
26479
26535
  * track produced no key frame (e.g. native/onboard source) — the UI falls
26480
26536
  * back to the inline `base64` face crop. */
26481
- keyFrameMediaKey: string().optional(),
26537
+ keyFrameMediaId: number().int().optional(),
26482
26538
  /** Winning identity-match cosine (0..1) for this face's track, when an
26483
26539
  * identity was auto-confirmed. Lets the UI surface WHY a face was assigned
26484
26540
  * (confidence badge / low-confidence audit). Absent on legacy rows and on
@@ -26547,11 +26603,14 @@ var FaceClusterSchema = object({
26547
26603
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
26548
26604
  * dialog already rendering its key FRAME from the `event-media` plane.
26549
26605
  *
26550
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
26551
- * media key directly, so this needed no new plane and no new access decision.
26606
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
26607
+ * resolves a media row by its own id, so this needed no new plane and no new
26608
+ * access decision.
26552
26609
  */
26553
26610
  var MediaFileLiteSchema$1 = object({
26554
- key: string(),
26611
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
26612
+ * (D482). It was the row's composite key, which embedded the owner. */
26613
+ mediaId: number().int(),
26555
26614
  kind: string(),
26556
26615
  url: string(),
26557
26616
  sizeBytes: number(),
@@ -26568,7 +26627,7 @@ method(object({
26568
26627
  * covers inline, ~10 KB of base64 per row, on a query this UI mounts
26569
26628
  * four times and the viewer holds at `staleTime: 30_000`.
26570
26629
  *
26571
- * Nothing loses its avatar: `coverMediaKey` is already on every row and
26630
+ * Nothing loses its avatar: `coverMediaId` is already on every row and
26572
26631
  * the `event-media` plane serves that key `immutable` with an ETag.
26573
26632
  *
26574
26633
  * **This is an INPUT field, so it does not reach the addon until the
@@ -29931,8 +29990,8 @@ var VehicleSchema = object({
29931
29990
  id: string(),
29932
29991
  name: string(),
29933
29992
  sampleCount: number().int().nonnegative(),
29934
- coverMediaKey: string().optional(),
29935
- /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
29993
+ coverMediaId: number().int().optional(),
29994
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaId`. */
29936
29995
  coverBase64: string().optional()
29937
29996
  });
29938
29997
  var VehicleSampleInfoSchema = object({
@@ -29965,7 +30024,7 @@ var PlateInfoSchema = object({
29965
30024
  /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
29966
30025
  plateBbox: BoundingBoxSchema.optional(),
29967
30026
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
29968
- keyFrameMediaKey: string().optional(),
30027
+ keyFrameMediaId: number().int().optional(),
29969
30028
  base64: string().optional(),
29970
30029
  /**
29971
30030
  * Same crop as a data-plane URL, always present when the plate has a stored
@@ -29986,11 +30045,14 @@ var PlateInfoSchema = object({
29986
30045
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
29987
30046
  * dialog already rendering its key FRAME from the `event-media` plane.
29988
30047
  *
29989
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
29990
- * media key directly, so this needed no new plane and no new access decision.
30048
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
30049
+ * resolves a media row by its own id, so this needed no new plane and no new
30050
+ * access decision.
29991
30051
  */
29992
30052
  var MediaFileLiteSchema = object({
29993
- key: string(),
30053
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
30054
+ * (D482). It was the row's composite key, which embedded the owner. */
30055
+ mediaId: number().int(),
29994
30056
  kind: string(),
29995
30057
  url: string(),
29996
30058
  sizeBytes: number(),
@@ -30049,7 +30111,7 @@ method(object({
30049
30111
  }), method(object({
30050
30112
  /** Inline {@link VehicleSchema.coverBase64} on every row. Default
30051
30113
  * `false` — the vehicle twin of `faceGallery.listIdentities`'s
30052
- * option; `coverMediaKey` + the `event-media` plane carry the picture.
30114
+ * option; `coverMediaId` + the `event-media` plane carry the picture.
30053
30115
  * INPUT field: stripped by the hub router until the train ships, which
30054
30116
  * resolves to `false` and is exactly the intended default. */
30055
30117
  includeCrops: boolean().optional() }).optional(), array(VehicleSchema).readonly()), method(object({ name: string().min(1) }), VehicleSchema, {
@@ -31618,7 +31680,14 @@ var SceneReferenceSchema = object({
31618
31680
  modelId: string(),
31619
31681
  condition: SceneConditionSchema,
31620
31682
  capturedAt: number(),
31621
- thumbnailMediaId: string().optional(),
31683
+ /**
31684
+ * The reference thumbnail's media ROW id (D482).
31685
+ *
31686
+ * The name already said `mediaId` while the value was the row's composite
31687
+ * key — a leftover that read as done and was not. It is the row's own id
31688
+ * now, addressed at `/addon/<addonId>/event-media/m/<id>`.
31689
+ */
31690
+ thumbnailMediaId: number().int().optional(),
31622
31691
  /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
31623
31692
  * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
31624
31693
  * normalized rect frame a different piece of world, and the scene would
@@ -33602,7 +33671,7 @@ var StationaryObjectSchema = object({
33602
33671
  /** Enrichment label carried from the source track (identity / plate). */
33603
33672
  label: string().optional(),
33604
33673
  /** Native-resolution key-frame media key for the parked object's best image. */
33605
- keyFrameMediaKey: string().optional()
33674
+ keyFrameMediaId: number().int().optional()
33606
33675
  });
33607
33676
  var CameraOccupancySnapshotSchema = object({
33608
33677
  /** Frame timestamp of the inference result that produced this snapshot. */
@@ -36340,6 +36409,12 @@ Object.freeze({
36340
36409
  addonId: null,
36341
36410
  access: "create"
36342
36411
  },
36412
+ "dataStoreProvider.upsert": {
36413
+ capName: "data-store-provider",
36414
+ capScope: "system",
36415
+ addonId: null,
36416
+ access: "create"
36417
+ },
36343
36418
  "dayNight.getOptions": {
36344
36419
  capName: "day-night",
36345
36420
  capScope: "device",
@@ -40204,6 +40279,12 @@ Object.freeze({
40204
40279
  addonId: null,
40205
40280
  access: "create"
40206
40281
  },
40282
+ "settingsStore.upsert": {
40283
+ capName: "settings-store",
40284
+ capScope: "system",
40285
+ addonId: null,
40286
+ access: "create"
40287
+ },
40207
40288
  "smtpProvider.getStatus": {
40208
40289
  capName: "smtp-provider",
40209
40290
  capScope: "system",
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-DAXzJeTX.mjs
1
+ //#region ../types/dist/event-category-ZyX6jcse.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -559,7 +559,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
559
559
  * a package zone — a newly-appeared stationary object of a package class
560
560
  * that cleared the class / zone / dwell / size gates. Payload:
561
561
  * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
562
- * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
562
+ * entryId, className, zoneIds, keyFrameMediaId?, bbox, timestamp }`.
563
563
  * Telemetry (D8): the durable record is the `package-events` store row;
564
564
  * this bus topic drives notifier rules + live UI. See
565
565
  * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
@@ -5345,7 +5345,7 @@ var ZodIssueCode = {
5345
5345
  var ZodFirstPartyTypeKind;
5346
5346
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5347
5347
  //#endregion
5348
- //#region ../types/dist/sleep-BnujYGPe.mjs
5348
+ //#region ../types/dist/sleep-CnLyvg3w.mjs
5349
5349
  /**
5350
5350
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5351
5351
  * window to float samples (D455).
@@ -7371,13 +7371,30 @@ new Set([
7371
7371
  "scene",
7372
7372
  "motion",
7373
7373
  "object",
7374
- "audio"
7374
+ "audio",
7375
+ "mosaic"
7375
7376
  ]);
7376
- new Set([
7377
+ /**
7378
+ * The owner types that are event tables, in the order the event-media resolver
7379
+ * should consider them. Exported so a consumer asking "is this key an event?"
7380
+ * does not re-spell the list and drift from it.
7381
+ */
7382
+ var EVENT_OWNER_TYPES = [
7377
7383
  "motion",
7378
7384
  "object",
7379
7385
  "audio"
7380
- ]);
7386
+ ];
7387
+ /**
7388
+ * The same list as a Zod enum, for the cap inputs that must NAME the table
7389
+ * (D482: `getEventMedia` / `listEventMedia` take an owner, and an owner is
7390
+ * `(table, id)`).
7391
+ *
7392
+ * Built FROM {@link EVENT_OWNER_TYPES} rather than re-spelled: a fourth event
7393
+ * table would otherwise be accepted by the codec and refused at the door, with
7394
+ * nothing failing until a caller asked.
7395
+ */
7396
+ var EventOwnerTypeSchema = _enum(EVENT_OWNER_TYPES);
7397
+ new Set(EVENT_OWNER_TYPES);
7381
7398
  /**
7382
7399
  * Build an `IAddonRouteProvider` from a list of routes. Implements
7383
7400
  * both the operator-facing `getRoutes` (returning route descriptors
@@ -12787,6 +12804,16 @@ method(object({
12787
12804
  filter: QueryFilterSchema.optional(),
12788
12805
  columns: array(string()).readonly().optional()
12789
12806
  }), array(SettingsRecordSchema).readonly()), method(object({
12807
+ namespace: string().optional(),
12808
+ collection: string(),
12809
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
12810
+ * index on the collection. Never empty. */
12811
+ conflict: array(string()).readonly(),
12812
+ record: BulkRecordSchema
12813
+ }), object({
12814
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
12815
+ * row's own id on an update. */
12816
+ id: union([string(), number()]) }), { kind: "mutation" }), method(object({
12790
12817
  namespace: string().optional(),
12791
12818
  collection: string(),
12792
12819
  record: object({
@@ -12921,6 +12948,14 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
12921
12948
  id: union([string(), number()]) }), {
12922
12949
  kind: "mutation",
12923
12950
  auth: "admin"
12951
+ }), method(object({
12952
+ namespace: string().optional(),
12953
+ collection: string(),
12954
+ conflict: array(string()).readonly(),
12955
+ record: BulkRecordSchema
12956
+ }), object({ id: union([string(), number()]) }), {
12957
+ kind: "mutation",
12958
+ auth: "admin"
12924
12959
  }), method(object({
12925
12960
  namespace: string().optional(),
12926
12961
  collection: string(),
@@ -19520,8 +19555,8 @@ var TrackPositionSchema = object({
19520
19555
  var TrackSnapshotSchema = object({
19521
19556
  timestamp: number(),
19522
19557
  position: TrackPositionSchema,
19523
- /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
19524
- mediaKey: string()
19558
+ /** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
19559
+ mediaId: number().int()
19525
19560
  });
19526
19561
  /**
19527
19562
  * Normalized 0..1 trajectory envelope (min/max over every position bbox,
@@ -20125,14 +20160,14 @@ var ObjectEventSchema = object({
20125
20160
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20126
20161
  frameWidth: number().optional(),
20127
20162
  frameHeight: number().optional(),
20128
- /** MediaStore key for the crop attached to this event (if any). */
20129
- mediaKey: string().optional(),
20130
- /** Design B: MediaStore key of the track's native-resolution key frame (the
20163
+ /** Media row id of the crop attached to this event (if any) — D482. */
20164
+ mediaId: number().int().optional(),
20165
+ /** Design B: media row id of the track's native-resolution key frame (the
20131
20166
  * best-detection full frame). Resolve via the event-media data-plane
20132
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
20167
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`) for a detail view that
20133
20168
  * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
20134
- * sources — consumers fall back to `mediaKey` (the tight crop). */
20135
- keyFrameMediaKey: string().optional(),
20169
+ * sources — consumers fall back to `mediaId` (the tight crop). */
20170
+ keyFrameMediaId: number().int().optional(),
20136
20171
  /** Populated by B5 (recording playback URL for this event). */
20137
20172
  mediaUrl: string().optional(),
20138
20173
  /** The parent track's key-event importance [0,1], propagated to every object
@@ -20182,7 +20217,7 @@ var MediaFileKindEnum = _enum([
20182
20217
  * hub-main's heap on the way past — for an `<img>` that would have cached it.
20183
20218
  *
20184
20219
  * `url` points at the `event-media` data plane
20185
- * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
20220
+ * (`/addon/<addonId>/event-media/m/<mediaId>` — D482), which serves the same blob
20186
20221
  * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
20187
20222
  * render a `?variant=thumb`, and streams. The hub gate in front of it requires
20188
20223
  * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
@@ -20190,10 +20225,13 @@ var MediaFileKindEnum = _enum([
20190
20225
  * `data-plane-access.ts` for the rule and the one gap it does not close
20191
20226
  * (per-device scoping).
20192
20227
  *
20193
- * The URL is built from the row's **stored** key, which is not always its
20194
- * published `kind`: a track's face/plate crop is stored as `crop` under
20228
+ * The URL is built from the row's own id, which since D482 says nothing about
20229
+ * the row's owner or kind — and that is the point. The published `kind` is not
20230
+ * the stored one (a track's face/plate crop is stored as `crop` under
20195
20231
  * `('face'|'plate', '<prefix>-<trackId>')` and published as
20196
- * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
20232
+ * `faceCrop`/`plateCrop`), and under the old composite key the URL had to be
20233
+ * taken from `row.key` verbatim or it 404'd exactly those two rows. An id
20234
+ * cannot be mis-reconstructed, because there is nothing in it to reconstruct.
20197
20235
  *
20198
20236
  * ## `base64` is TRANSITIONAL and is going away
20199
20237
  *
@@ -20206,7 +20244,19 @@ var MediaFileKindEnum = _enum([
20206
20244
  * `analytics-query-facade.ts`; nothing else reads it.
20207
20245
  */
20208
20246
  var MediaFileSchema = object({
20209
- key: string(),
20247
+ /**
20248
+ * The media row's OWN id — the rowid SQLite assigned it (D482).
20249
+ *
20250
+ * It used to be the row's composite key, `<ownerType>:<ownerId>:<fileKind>
20251
+ * [:<timestampMs>]`, which embedded a FOREIGN id. D474 made event ids
20252
+ * per-table rowid aliases, so `object:101314` and `motion:101314` are two
20253
+ * different rows that spell the same number, and a track whose
20254
+ * `bestEventId` was an object event was served a motion event's snapshot —
20255
+ * a night-time thumbnail on an afternoon track, with no error anywhere. A
20256
+ * surrogate id cannot name the wrong row's owner, because it names no owner
20257
+ * at all.
20258
+ */
20259
+ mediaId: number().int(),
20210
20260
  kind: MediaFileKindEnum,
20211
20261
  sizeBytes: number(),
20212
20262
  timestamp: number()
@@ -20314,7 +20364,7 @@ var RetrainTrackSchema = object({
20314
20364
  });
20315
20365
  /** A frame the picker may offer — an index row, no blob was read to produce it. */
20316
20366
  var RetrainFrameCandidateSchema = object({
20317
- mediaKey: string(),
20367
+ mediaId: number().int(),
20318
20368
  kind: MediaFileKindEnum,
20319
20369
  timestamp: number(),
20320
20370
  sizeBytes: number().int(),
@@ -20328,7 +20378,7 @@ var RetrainFrameSchema = object({
20328
20378
  deviceId: number(),
20329
20379
  trackId: string(),
20330
20380
  /** Provenance only. It may already point at nothing — that is expected. */
20331
- sourceMediaKey: string(),
20381
+ sourceMediaId: number().int(),
20332
20382
  sourceKind: MediaFileKindEnum,
20333
20383
  sizeBytes: number().int(),
20334
20384
  width: number().int(),
@@ -20344,7 +20394,7 @@ var RetrainCopyRefusalSchema = _enum([
20344
20394
  var RetrainFrameSelectionSchema = object({
20345
20395
  copied: array(RetrainFrameSchema).readonly(),
20346
20396
  refused: array(object({
20347
- sourceMediaKey: string(),
20397
+ sourceMediaId: number().int(),
20348
20398
  reason: RetrainCopyRefusalSchema
20349
20399
  })).readonly()
20350
20400
  });
@@ -20352,7 +20402,7 @@ var RetrainFrameListSchema = object({
20352
20402
  candidates: array(RetrainFrameCandidateSchema).readonly(),
20353
20403
  copies: array(RetrainFrameSchema).readonly(),
20354
20404
  /** What the page pre-selects — the native key frame when one survives. */
20355
- autoPickMediaKey: string().optional()
20405
+ autoPickMediaId: number().int().optional()
20356
20406
  });
20357
20407
  /** What the operator asked the assist to look for. */
20358
20408
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
@@ -20447,9 +20497,11 @@ var RecentTracksQueryInput = object({
20447
20497
  });
20448
20498
  /**
20449
20499
  * A Summary (D359): the per-camera session envelope that references tracks.
20450
- * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
20451
- * served by the event-media plane by key), null until the first frame with a
20452
- * member visible has been materialised.
20500
+ * `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
20501
+ * 'summary'`, served by the event-media plane at `/m/<id>`), null until the
20502
+ * first frame with a member visible has been materialised (D482 — it was the
20503
+ * row's composite key, which embedded the owner and could name another table's
20504
+ * row once event ids became per-table rowids).
20453
20505
  */
20454
20506
  var SummarySchema = object({
20455
20507
  id: string(),
@@ -20458,7 +20510,7 @@ var SummarySchema = object({
20458
20510
  lastActiveAt: number(),
20459
20511
  sealedAt: number().nullable(),
20460
20512
  memberCount: number().int().nonnegative(),
20461
- groupShotKey: string().nullable()
20513
+ groupShotMediaId: number().int().nullable()
20462
20514
  });
20463
20515
  var SummariesQueryInput = object({
20464
20516
  deviceIds: array(number()).min(1),
@@ -21012,7 +21064,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21012
21064
  }), method(object({
21013
21065
  deviceId: number(),
21014
21066
  trackId: string(),
21015
- mediaKeys: array(string()).min(1)
21067
+ mediaIds: array(number().int()).min(1)
21016
21068
  }), RetrainFrameSelectionSchema, {
21017
21069
  kind: "mutation",
21018
21070
  auth: "admin"
@@ -21080,7 +21132,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21080
21132
  kind: "query",
21081
21133
  auth: "admin"
21082
21134
  }), method(object({
21083
- eventId: string(),
21135
+ /** Which of the three event tables owns the row. */
21136
+ ownerType: EventOwnerTypeSchema,
21137
+ /** The event's rowid in that table (D474: an event id is a number). */
21138
+ eventId: number().int(),
21084
21139
  kind: MediaFileKindEnum.optional(),
21085
21140
  deviceId: number()
21086
21141
  }), array(MediaFileSchema).readonly()), method(object({
@@ -21091,7 +21146,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21091
21146
  trackId: string(),
21092
21147
  deviceId: number()
21093
21148
  }), array(MediaFileInfoSchema).readonly()), method(object({
21094
- eventId: string(),
21149
+ ownerType: EventOwnerTypeSchema,
21150
+ eventId: number().int(),
21095
21151
  deviceId: number()
21096
21152
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
21097
21153
  kind: "mutation",
@@ -26373,8 +26429,8 @@ var IdentitySchema = object({
26373
26429
  id: string(),
26374
26430
  name: string(),
26375
26431
  sampleCount: number().int().nonnegative(),
26376
- coverMediaKey: string().optional(),
26377
- /** Inline base64 of the cover sample's crop, resolved from `coverMediaKey`.
26432
+ coverMediaId: number().int().optional(),
26433
+ /** Inline base64 of the cover sample's crop, resolved from `coverMediaId`.
26378
26434
  * Lets the UI render the person's face avatar instead of a placeholder icon. */
26379
26435
  coverBase64: string().optional()
26380
26436
  });
@@ -26400,8 +26456,8 @@ var IdentitySampleAuditRowSchema = object({
26400
26456
  enrolledAt: number().int(),
26401
26457
  deviceId: number().int().optional(),
26402
26458
  source: _enum(["detected", "photo"]),
26403
- /** The enrolled crop's media key, so the panel can show the evidence. */
26404
- mediaKey: string().optional(),
26459
+ /** The enrolled crop's media row id, so the panel can show the evidence. */
26460
+ mediaId: number().int().optional(),
26405
26461
  /**
26406
26462
  * False = the sample is stamped with a DIFFERENT face model, and a cosine
26407
26463
  * across feature spaces is a well-formed float with no meaning. Every number
@@ -26470,15 +26526,15 @@ var FaceInfoSchema = object({
26470
26526
  */
26471
26527
  cropUrl: string().optional(),
26472
26528
  /** Design B: the face bbox (pixel space) on the key frame — lets a detail
26473
- * view draw the box over the native `keyFrameMediaKey` frame. Absent on
26529
+ * view draw the box over the native `keyFrameMediaId` frame. Absent on
26474
26530
  * legacy rows written before design B. */
26475
26531
  faceBbox: BoundingBoxSchema.optional(),
26476
26532
  /** Design B: MediaStore key of the track's native-resolution key frame.
26477
26533
  * Fetch the native JPEG via the event-media data-plane
26478
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
26534
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`). Absent when the
26479
26535
  * track produced no key frame (e.g. native/onboard source) — the UI falls
26480
26536
  * back to the inline `base64` face crop. */
26481
- keyFrameMediaKey: string().optional(),
26537
+ keyFrameMediaId: number().int().optional(),
26482
26538
  /** Winning identity-match cosine (0..1) for this face's track, when an
26483
26539
  * identity was auto-confirmed. Lets the UI surface WHY a face was assigned
26484
26540
  * (confidence badge / low-confidence audit). Absent on legacy rows and on
@@ -26547,11 +26603,14 @@ var FaceClusterSchema = object({
26547
26603
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
26548
26604
  * dialog already rendering its key FRAME from the `event-media` plane.
26549
26605
  *
26550
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
26551
- * media key directly, so this needed no new plane and no new access decision.
26606
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
26607
+ * resolves a media row by its own id, so this needed no new plane and no new
26608
+ * access decision.
26552
26609
  */
26553
26610
  var MediaFileLiteSchema$1 = object({
26554
- key: string(),
26611
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
26612
+ * (D482). It was the row's composite key, which embedded the owner. */
26613
+ mediaId: number().int(),
26555
26614
  kind: string(),
26556
26615
  url: string(),
26557
26616
  sizeBytes: number(),
@@ -26568,7 +26627,7 @@ method(object({
26568
26627
  * covers inline, ~10 KB of base64 per row, on a query this UI mounts
26569
26628
  * four times and the viewer holds at `staleTime: 30_000`.
26570
26629
  *
26571
- * Nothing loses its avatar: `coverMediaKey` is already on every row and
26630
+ * Nothing loses its avatar: `coverMediaId` is already on every row and
26572
26631
  * the `event-media` plane serves that key `immutable` with an ETag.
26573
26632
  *
26574
26633
  * **This is an INPUT field, so it does not reach the addon until the
@@ -29931,8 +29990,8 @@ var VehicleSchema = object({
29931
29990
  id: string(),
29932
29991
  name: string(),
29933
29992
  sampleCount: number().int().nonnegative(),
29934
- coverMediaKey: string().optional(),
29935
- /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
29993
+ coverMediaId: number().int().optional(),
29994
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaId`. */
29936
29995
  coverBase64: string().optional()
29937
29996
  });
29938
29997
  var VehicleSampleInfoSchema = object({
@@ -29965,7 +30024,7 @@ var PlateInfoSchema = object({
29965
30024
  /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
29966
30025
  plateBbox: BoundingBoxSchema.optional(),
29967
30026
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
29968
- keyFrameMediaKey: string().optional(),
30027
+ keyFrameMediaId: number().int().optional(),
29969
30028
  base64: string().optional(),
29970
30029
  /**
29971
30030
  * Same crop as a data-plane URL, always present when the plate has a stored
@@ -29986,11 +30045,14 @@ var PlateInfoSchema = object({
29986
30045
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
29987
30046
  * dialog already rendering its key FRAME from the `event-media` plane.
29988
30047
  *
29989
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
29990
- * media key directly, so this needed no new plane and no new access decision.
30048
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
30049
+ * resolves a media row by its own id, so this needed no new plane and no new
30050
+ * access decision.
29991
30051
  */
29992
30052
  var MediaFileLiteSchema = object({
29993
- key: string(),
30053
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
30054
+ * (D482). It was the row's composite key, which embedded the owner. */
30055
+ mediaId: number().int(),
29994
30056
  kind: string(),
29995
30057
  url: string(),
29996
30058
  sizeBytes: number(),
@@ -30049,7 +30111,7 @@ method(object({
30049
30111
  }), method(object({
30050
30112
  /** Inline {@link VehicleSchema.coverBase64} on every row. Default
30051
30113
  * `false` — the vehicle twin of `faceGallery.listIdentities`'s
30052
- * option; `coverMediaKey` + the `event-media` plane carry the picture.
30114
+ * option; `coverMediaId` + the `event-media` plane carry the picture.
30053
30115
  * INPUT field: stripped by the hub router until the train ships, which
30054
30116
  * resolves to `false` and is exactly the intended default. */
30055
30117
  includeCrops: boolean().optional() }).optional(), array(VehicleSchema).readonly()), method(object({ name: string().min(1) }), VehicleSchema, {
@@ -31618,7 +31680,14 @@ var SceneReferenceSchema = object({
31618
31680
  modelId: string(),
31619
31681
  condition: SceneConditionSchema,
31620
31682
  capturedAt: number(),
31621
- thumbnailMediaId: string().optional(),
31683
+ /**
31684
+ * The reference thumbnail's media ROW id (D482).
31685
+ *
31686
+ * The name already said `mediaId` while the value was the row's composite
31687
+ * key — a leftover that read as done and was not. It is the row's own id
31688
+ * now, addressed at `/addon/<addonId>/event-media/m/<id>`.
31689
+ */
31690
+ thumbnailMediaId: number().int().optional(),
31622
31691
  /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
31623
31692
  * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
31624
31693
  * normalized rect frame a different piece of world, and the scene would
@@ -33602,7 +33671,7 @@ var StationaryObjectSchema = object({
33602
33671
  /** Enrichment label carried from the source track (identity / plate). */
33603
33672
  label: string().optional(),
33604
33673
  /** Native-resolution key-frame media key for the parked object's best image. */
33605
- keyFrameMediaKey: string().optional()
33674
+ keyFrameMediaId: number().int().optional()
33606
33675
  });
33607
33676
  var CameraOccupancySnapshotSchema = object({
33608
33677
  /** Frame timestamp of the inference result that produced this snapshot. */
@@ -36340,6 +36409,12 @@ Object.freeze({
36340
36409
  addonId: null,
36341
36410
  access: "create"
36342
36411
  },
36412
+ "dataStoreProvider.upsert": {
36413
+ capName: "data-store-provider",
36414
+ capScope: "system",
36415
+ addonId: null,
36416
+ access: "create"
36417
+ },
36343
36418
  "dayNight.getOptions": {
36344
36419
  capName: "day-night",
36345
36420
  capScope: "device",
@@ -40204,6 +40279,12 @@ Object.freeze({
40204
40279
  addonId: null,
40205
40280
  access: "create"
40206
40281
  },
40282
+ "settingsStore.upsert": {
40283
+ capName: "settings-store",
40284
+ capScope: "system",
40285
+ addonId: null,
40286
+ access: "create"
40287
+ },
40207
40288
  "smtpProvider.getStatus": {
40208
40289
  capName: "smtp-provider",
40209
40290
  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-1-owndOS.js");
6
+ const require_dist = require("../dist-Daqsf2Q7.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-BPuEMYlM.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-DRv84o8E.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.114",
3
+ "version": "1.2.116",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",