@camstack/addon-training 0.1.47 → 0.1.48

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.
Files changed (40) hide show
  1. package/dist/{MaskShapeCanvas-Kfg9dl6B.mjs → MaskShapeCanvas-HNL0xNpy.mjs} +229 -228
  2. package/dist/MotionZonesSettings-B1g6IUfQ.mjs +291 -0
  3. package/dist/PrivacyMaskSettings-D4WRZZeD.mjs +339 -0
  4. package/dist/{ReactKonva-DGuYUN0L.mjs → ReactKonva-DzGysLZQ.mjs} +28 -28
  5. package/dist/SceneMonitorEditor-pYZfyXtn.mjs +825 -0
  6. package/dist/_stub.js +11561 -10220
  7. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-cOIklMU6.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-BclY1R96.mjs} +4 -4
  8. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BVsoOuTM.mjs +26 -0
  9. package/dist/{_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs → _virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-CEvdvp1T.mjs} +1 -1
  10. package/dist/addon-training.css +1 -1
  11. package/dist/{chevron-right-D3StkdcR.mjs → chevron-right-cA8Hucbi.mjs} +1 -1
  12. package/dist/{createLucideIcon-CPP1Jzoz.mjs → createLucideIcon-C0bBNRpC.mjs} +8 -8
  13. package/dist/{dist-BUzSmOA3.js → dist-DxTjO9kC.js} +173 -4
  14. package/dist/{dist-CCnnaqt1.mjs → dist-GI2KEl-e.mjs} +173 -4
  15. package/dist/{grid-2x2-Yngdckwo.mjs → grid-2x2-CHuMzRxF.mjs} +1 -1
  16. package/dist/{hostInit-v495uwvg.mjs → hostInit-BHX8oN7K.mjs} +3 -3
  17. package/dist/{icons-C4_Ji5S0.mjs → icons-BwkaMam3.mjs} +9 -9
  18. package/dist/index.js +1 -1
  19. package/dist/{mic-off-DPNSd6G7.mjs → mic-off-2uHAsVtR.mjs} +1 -1
  20. package/dist/orchestrator/training.addon.js +1 -1
  21. package/dist/orchestrator/training.addon.mjs +1 -1
  22. package/dist/{player-overlays-DXTsKpgo.mjs → player-overlays-B4V_uIvb.mjs} +25 -25
  23. package/dist/providers/modal/training-modal.addon.js +1 -1
  24. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  25. package/dist/remoteEntry.js +1 -1
  26. package/dist/{responsive-Cfmds8tw.mjs → responsive-1iwc-rj2.mjs} +26 -26
  27. package/dist/{rotate-ccw-Dak-lXgZ.mjs → rotate-ccw-Cu6tGrgG.mjs} +1 -1
  28. package/dist/scene-monitor-copy-Cqfs4Vng.mjs +176 -0
  29. package/dist/{settings-2-Cgiv3kQb.mjs → settings-2-xV0I5Y5U.mjs} +1 -1
  30. package/dist/{square-B_679zIX.mjs → square-ZPUterXM.mjs} +1 -1
  31. package/dist/{trash-2-DC8LDYlI.mjs → trash-2-BKfuhsgY.mjs} +1 -1
  32. package/dist/ui-text-CqJgUCKX.mjs +34 -0
  33. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-CdlOqgkp.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-D5OhZIRm.mjs} +1 -1
  34. package/dist/{zoom-out-BJoVDYa3.mjs → zoom-out-DDZCsqkQ.mjs} +1 -1
  35. package/package.json +1 -1
  36. package/dist/MotionZonesSettings-15Lfyz9l.mjs +0 -292
  37. package/dist/PrivacyMaskSettings-CAyzlGjl.mjs +0 -348
  38. package/dist/SceneMonitorEditor-D49_o83T.mjs +0 -810
  39. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Cn2OEGrR.mjs +0 -26
  40. package/dist/scene-monitor-copy-DX2u-htD.mjs +0 -136
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-CPP1Jzoz.mjs";
1
+ import { t as e } from "./createLucideIcon-C0bBNRpC.mjs";
2
2
  var t = e("chevron-down", [["path", {
3
3
  d: "m6 9 6 6 6-6",
4
4
  key: "qrunsl"
@@ -1,6 +1,6 @@
1
- import { S as e, n as t, r as n } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
1
+ import { i as e, r as t, w as n } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-CEvdvp1T.mjs";
2
2
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
3
- e();
3
+ n();
4
4
  var r = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), i = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), a = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), o = (e) => {
5
5
  let t = a(e);
6
6
  return t.charAt(0).toUpperCase() + t.slice(1);
@@ -17,7 +17,7 @@ var r = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
17
17
  }, c = (e) => {
18
18
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
19
19
  return !1;
20
- }, l = n(({ color: e = "currentColor", size: n = 24, strokeWidth: i = 2, absoluteStrokeWidth: a, className: o = "", children: l, iconNode: u, ...d }, f) => t("svg", {
20
+ }, l = e(({ color: e = "currentColor", size: n = 24, strokeWidth: i = 2, absoluteStrokeWidth: a, className: o = "", children: l, iconNode: u, ...d }, f) => t("svg", {
21
21
  ref: f,
22
22
  ...s,
23
23
  width: n,
@@ -30,15 +30,15 @@ var r = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
30
30
  }, [...u.map(([e, n]) => t(e, n)), ...Array.isArray(l) ? l : [l]]));
31
31
  //#endregion
32
32
  //#region ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
33
- e();
34
- var u = (e, a) => {
35
- let s = n(({ className: n, ...s }, c) => t(l, {
33
+ n();
34
+ var u = (n, a) => {
35
+ let s = e(({ className: e, ...s }, c) => t(l, {
36
36
  ref: c,
37
37
  iconNode: a,
38
- className: r(`lucide-${i(o(e))}`, `lucide-${e}`, n),
38
+ className: r(`lucide-${i(o(n))}`, `lucide-${n}`, e),
39
39
  ...s
40
40
  }));
41
- return s.displayName = o(e), s;
41
+ return s.displayName = o(n), s;
42
42
  };
43
43
  //#endregion
44
44
  export { u as t };
@@ -5420,7 +5420,7 @@ var ZodIssueCode = {
5420
5420
  var ZodFirstPartyTypeKind;
5421
5421
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5422
5422
  //#endregion
5423
- //#region ../types/dist/sleep-DAX0-2v9.mjs
5423
+ //#region ../types/dist/sleep-DRqxtc0C.mjs
5424
5424
  /**
5425
5425
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5426
5426
  * window to float samples (D455).
@@ -8188,8 +8188,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8188
8188
  kind: "mutation",
8189
8189
  auth: "admin"
8190
8190
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8191
+ object({
8192
+ code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8193
+ params: record(string(), union([string(), number()])).optional()
8194
+ });
8191
8195
  //#endregion
8192
- //#region ../types/dist/err-msg-DX6i_MY4.mjs
8196
+ //#region ../types/dist/err-msg-DLerKiVO.mjs
8193
8197
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8194
8198
  DeviceType["Camera"] = "camera";
8195
8199
  DeviceType["Hub"] = "hub";
@@ -8439,6 +8443,22 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8439
8443
  DeviceRole["Nightvision"] = "nightvision";
8440
8444
  DeviceRole["PrivacyMask"] = "privacy-mask";
8441
8445
  DeviceRole["Doorbell"] = "doorbell";
8446
+ /** Interior blind / shade / roller blind. HA `device_class: blind|shade`. */
8447
+ DeviceRole["CoverBlind"] = "cover-blind";
8448
+ /** Exterior roller shutter. HA `device_class: shutter`; Homematic BROLL. */
8449
+ DeviceRole["CoverShutter"] = "cover-shutter";
8450
+ /** Exterior awning. HA `device_class: awning`. */
8451
+ DeviceRole["CoverAwning"] = "cover-awning";
8452
+ /** Curtain / drape. HA `device_class: curtain`. */
8453
+ DeviceRole["CoverCurtain"] = "cover-curtain";
8454
+ /** Garage door. HA `device_class: garage`. A security actuator: exports gate it. */
8455
+ DeviceRole["CoverGarage"] = "cover-garage";
8456
+ /** Gate. HA `device_class: gate`. A security actuator: exports gate it. */
8457
+ DeviceRole["CoverGate"] = "cover-gate";
8458
+ /** Door. HA `device_class: door`. A security actuator: exports gate it. */
8459
+ DeviceRole["CoverDoor"] = "cover-door";
8460
+ /** Window. HA `device_class: window`. */
8461
+ DeviceRole["CoverWindow"] = "cover-window";
8442
8462
  /** Virtual HA toggle (input_boolean.*) — distinguishable from a
8443
8463
  * real Switch device for UI rendering / export adapters. */
8444
8464
  DeviceRole["BinaryHelper"] = "binary-helper";
@@ -8509,7 +8529,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8509
8529
  return DeviceRole;
8510
8530
  }({});
8511
8531
  //#endregion
8512
- //#region ../types/dist/composition-C-WpVYTX.mjs
8532
+ //#region ../types/dist/composition-EQ9Ok0Ee.mjs
8513
8533
  /**
8514
8534
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8515
8535
  *
@@ -12204,7 +12224,8 @@ var ConvertResultSchema = object({
12204
12224
  })).readonly()
12205
12225
  });
12206
12226
  _enum(["new-session", "step-up"]);
12207
- _enum(["en", "it"]);
12227
+ /** The languages the hub's app landing pages are written in (D858). */
12228
+ var AppPageLangSchema = _enum(["en", "it"]);
12208
12229
  /** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
12209
12230
  var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
12210
12231
  kind: literal("browser"),
@@ -12718,7 +12739,9 @@ var ConfigTabDeclarationSchema = object({
12718
12739
  var ConfigSectionWithValuesSchema = object({
12719
12740
  id: string(),
12720
12741
  title: string(),
12742
+ titleKey: string().optional(),
12721
12743
  description: string().optional(),
12744
+ descriptionKey: string().optional(),
12722
12745
  style: _enum(["card", "accordion"]).optional(),
12723
12746
  defaultCollapsed: boolean().optional(),
12724
12747
  columns: union([
@@ -15944,6 +15967,9 @@ method(object({
15944
15967
  }), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
15945
15968
  kind: "mutation",
15946
15969
  auth: "admin"
15970
+ }), method(object({ deviceId: number().int() }), object({ refs: array(string()).readonly() }), {
15971
+ kind: "mutation",
15972
+ auth: "admin"
15947
15973
  }), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
15948
15974
  /**
15949
15975
  * device-history — the ONE mechanism for numeric history (D850).
@@ -37347,6 +37373,38 @@ var DeviceRegisterPayloadSchema = object({
37347
37373
  * omits it and the keyword backstop applies. */
37348
37374
  secretConfigPaths: array(string()).optional()
37349
37375
  });
37376
+ /** One deleted device, kept by device-manager so an addon that missed the
37377
+ * deletion can still learn of it (D865). Written by the delete path ONLY. */
37378
+ var DeviceTombstoneSchema = object({
37379
+ deviceId: number().int().positive(),
37380
+ /** Epoch ms the device was deleted. */
37381
+ deletedAt: number(),
37382
+ /** The addon that owned the device when it was deleted. */
37383
+ providerAddonId: string()
37384
+ });
37385
+ /** Data held for one device that device-manager no longer knows. */
37386
+ var OrphanDeviceDataSchema = object({
37387
+ deviceId: number().int().positive(),
37388
+ /** Rows/files per store (`<addonId>:<store>`). */
37389
+ stores: record(string(), number().int().nonnegative())
37390
+ });
37391
+ var CleanupDeletedDevicesResultSchema = object({
37392
+ /**
37393
+ * `skipped` — the absence check could not be trusted (a device-list read
37394
+ * failed or the two reads disagreed); nothing was listed or deleted.
37395
+ * `dry-run` — `devices` is what a confirmed run would delete.
37396
+ * `cleaned` — `devices` is what was deleted.
37397
+ */
37398
+ status: _enum([
37399
+ "skipped",
37400
+ "dry-run",
37401
+ "cleaned"
37402
+ ]),
37403
+ reason: string().nullable(),
37404
+ devices: array(OrphanDeviceDataSchema),
37405
+ /** Implementers that could not be asked (their stores are not in `devices`). */
37406
+ unreachable: array(string())
37407
+ });
37350
37408
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
37351
37409
  var DevicePersistConfigPayloadSchema = object({
37352
37410
  deviceId: number(),
@@ -37585,6 +37643,9 @@ method(object({
37585
37643
  }), method(object({ deviceId: number() }), object({ success: literal(true) }), {
37586
37644
  kind: "mutation",
37587
37645
  auth: "admin"
37646
+ }), method(object({ sinceMs: number() }), array(DeviceTombstoneSchema).readonly(), { auth: "admin" }), method(object({ confirm: boolean() }), CleanupDeletedDevicesResultSchema, {
37647
+ kind: "mutation",
37648
+ auth: "admin"
37588
37649
  }), method(object({ integrationId: string() }), object({ removed: number() }), {
37589
37650
  kind: "mutation",
37590
37651
  auth: "admin"
@@ -38047,6 +38108,72 @@ method(object({
38047
38108
  auth: "admin"
38048
38109
  });
38049
38110
  /**
38111
+ * `device-removal-hook` — the reliable way an addon learns a device was DELETED,
38112
+ * so it can delete what it keeps for that device (D865).
38113
+ *
38114
+ * ## Why an event was not enough
38115
+ *
38116
+ * `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
38117
+ * hung its per-device clean-up on it left durable garbage whenever the event was
38118
+ * lost, the addon was down, or it was restarting at that moment — footage,
38119
+ * analytics rows and settings of device 4483 outlived the device. Loss of this
38120
+ * signal corrupts durable state, so it travels by RPC with a recorded fact
38121
+ * behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
38122
+ *
38123
+ * ## The three pieces
38124
+ *
38125
+ * 1. device-manager records a TOMBSTONE per deleted device
38126
+ * (`deviceManager.listDeletedSince`). The tombstone is written by the delete
38127
+ * path only — a device that is unregistered, offline or whose provider is
38128
+ * restarting is NOT deleted and gets none.
38129
+ * 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
38130
+ * this collection, one by one, with bounded retries, logged.
38131
+ * 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
38132
+ * (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
38133
+ * may have missed. Reconcile is driven by tombstones, never by "the device is
38134
+ * not in the current list": a failed or partial list read must not destroy data.
38135
+ *
38136
+ * ## Contract for an implementer
38137
+ *
38138
+ * - **Idempotent.** It is called again by a retry, by a reconcile and by the
38139
+ * admin cleanup of data that predates tombstones. A device with nothing left
38140
+ * answers zero counts.
38141
+ * - **One key per store** in `counts`, deleted rows/files per store, so the log
38142
+ * line and the admin dry run can say where the data was.
38143
+ * - **Training datasets are NOT device data** and are never deleted by a hook.
38144
+ * - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
38145
+ * per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
38146
+ * for every addon centrally at delete time. This hook is for device DATA
38147
+ * that is not settings: footage, event media, analytics rows, history.
38148
+ * - A provider that cannot tell is allowed to throw; the caller retries it.
38149
+ *
38150
+ * `listDeviceData` is the read side of the admin "Clean data of deleted devices"
38151
+ * action: which device ids this addon holds data for, and how much per store. It
38152
+ * never deletes. device-manager decides which of those ids are absent from the
38153
+ * fleet, from TWO consistent reads of the device list (D49).
38154
+ */
38155
+ /** What a hook is told about the deletion. */
38156
+ var DeviceRemovedInputSchema = object({
38157
+ deviceId: number().int().positive(),
38158
+ /** Epoch ms the device was deleted (the tombstone's `deletedAt`). */
38159
+ deletedAt: number(),
38160
+ /** The addon that owned the device, as device-manager last knew it. */
38161
+ providerAddonId: string()
38162
+ });
38163
+ /** Rows/files/refs deleted, per store this implementer owns. */
38164
+ var DeviceRemovedResultSchema = object({ counts: record(string(), number().int().nonnegative()) });
38165
+ /** One (store, device) pair an implementer holds data for. */
38166
+ var DeviceDataEntrySchema = object({
38167
+ store: string(),
38168
+ deviceId: number().int().positive(),
38169
+ /** Rows (or files) held for the device in the store. */
38170
+ count: number().int().nonnegative()
38171
+ });
38172
+ method(DeviceRemovedInputSchema, DeviceRemovedResultSchema, {
38173
+ kind: "mutation",
38174
+ auth: "admin"
38175
+ }), method(_void(), array(DeviceDataEntrySchema).readonly(), { auth: "admin" });
38176
+ /**
38050
38177
  * `failure-contribution` — the capability an addon reports its OWN losses
38051
38178
  * through, per camera, with the denominator attached. It stores nothing.
38052
38179
  *
@@ -62646,6 +62773,12 @@ Object.freeze({
62646
62773
  addonId: null,
62647
62774
  access: "create"
62648
62775
  },
62776
+ "deviceManager.cleanupDeletedDevicesData": {
62777
+ capName: "device-manager",
62778
+ capScope: "system",
62779
+ addonId: null,
62780
+ access: "create"
62781
+ },
62649
62782
  "deviceManager.createDevice": {
62650
62783
  capName: "device-manager",
62651
62784
  capScope: "system",
@@ -62826,6 +62959,12 @@ Object.freeze({
62826
62959
  addonId: null,
62827
62960
  access: "view"
62828
62961
  },
62962
+ "deviceManager.listDeletedSince": {
62963
+ capName: "device-manager",
62964
+ capScope: "system",
62965
+ addonId: null,
62966
+ access: "view"
62967
+ },
62829
62968
  "deviceManager.listDeviceIdsByCaps": {
62830
62969
  capName: "device-manager",
62831
62970
  capScope: "system",
@@ -63234,6 +63373,18 @@ Object.freeze({
63234
63373
  addonId: null,
63235
63374
  access: "create"
63236
63375
  },
63376
+ "deviceRemovalHook.listDeviceData": {
63377
+ capName: "device-removal-hook",
63378
+ capScope: "system",
63379
+ addonId: null,
63380
+ access: "view"
63381
+ },
63382
+ "deviceRemovalHook.onDeviceRemoved": {
63383
+ capName: "device-removal-hook",
63384
+ capScope: "system",
63385
+ addonId: null,
63386
+ access: "create"
63387
+ },
63237
63388
  "deviceState.claimFields": {
63238
63389
  capName: "device-state",
63239
63390
  capScope: "system",
@@ -63666,6 +63817,12 @@ Object.freeze({
63666
63817
  addonId: null,
63667
63818
  access: "delete"
63668
63819
  },
63820
+ "keychain.deleteDeviceScope": {
63821
+ capName: "keychain",
63822
+ capScope: "system",
63823
+ addonId: null,
63824
+ access: "delete"
63825
+ },
63669
63826
  "keychain.getState": {
63670
63827
  capName: "keychain",
63671
63828
  capScope: "system",
@@ -69678,6 +69835,11 @@ Object.freeze({
69678
69835
  form: "single",
69679
69836
  optional: false
69680
69837
  }],
69838
+ "deviceRemovalHook.onDeviceRemoved": [{
69839
+ name: "deviceId",
69840
+ form: "single",
69841
+ optional: false
69842
+ }],
69681
69843
  "deviceState.claimFields": [{
69682
69844
  name: "deviceId",
69683
69845
  form: "single",
@@ -69867,6 +70029,11 @@ Object.freeze({
69867
70029
  form: "single",
69868
70030
  optional: false
69869
70031
  }],
70032
+ "keychain.deleteDeviceScope": [{
70033
+ name: "deviceId",
70034
+ form: "single",
70035
+ optional: false
70036
+ }],
69870
70037
  "lawnMowerControl.dock": [{
69871
70038
  name: "deviceId",
69872
70039
  form: "single",
@@ -72215,6 +72382,8 @@ new Set([
72215
72382
  "audio-tools",
72216
72383
  "audio-silence"
72217
72384
  ]);
72385
+ AppPageLangSchema.options;
72386
+ record(string().min(1), string());
72218
72387
  /**
72219
72388
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
72220
72389
  *
@@ -5387,7 +5387,7 @@ var ZodIssueCode = {
5387
5387
  var ZodFirstPartyTypeKind;
5388
5388
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5389
5389
  //#endregion
5390
- //#region ../types/dist/sleep-DAX0-2v9.mjs
5390
+ //#region ../types/dist/sleep-DRqxtc0C.mjs
5391
5391
  /**
5392
5392
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5393
5393
  * window to float samples (D455).
@@ -8155,8 +8155,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8155
8155
  kind: "mutation",
8156
8156
  auth: "admin"
8157
8157
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8158
+ object({
8159
+ code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8160
+ params: record(string(), union([string(), number()])).optional()
8161
+ });
8158
8162
  //#endregion
8159
- //#region ../types/dist/err-msg-DX6i_MY4.mjs
8163
+ //#region ../types/dist/err-msg-DLerKiVO.mjs
8160
8164
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8161
8165
  DeviceType["Camera"] = "camera";
8162
8166
  DeviceType["Hub"] = "hub";
@@ -8406,6 +8410,22 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8406
8410
  DeviceRole["Nightvision"] = "nightvision";
8407
8411
  DeviceRole["PrivacyMask"] = "privacy-mask";
8408
8412
  DeviceRole["Doorbell"] = "doorbell";
8413
+ /** Interior blind / shade / roller blind. HA `device_class: blind|shade`. */
8414
+ DeviceRole["CoverBlind"] = "cover-blind";
8415
+ /** Exterior roller shutter. HA `device_class: shutter`; Homematic BROLL. */
8416
+ DeviceRole["CoverShutter"] = "cover-shutter";
8417
+ /** Exterior awning. HA `device_class: awning`. */
8418
+ DeviceRole["CoverAwning"] = "cover-awning";
8419
+ /** Curtain / drape. HA `device_class: curtain`. */
8420
+ DeviceRole["CoverCurtain"] = "cover-curtain";
8421
+ /** Garage door. HA `device_class: garage`. A security actuator: exports gate it. */
8422
+ DeviceRole["CoverGarage"] = "cover-garage";
8423
+ /** Gate. HA `device_class: gate`. A security actuator: exports gate it. */
8424
+ DeviceRole["CoverGate"] = "cover-gate";
8425
+ /** Door. HA `device_class: door`. A security actuator: exports gate it. */
8426
+ DeviceRole["CoverDoor"] = "cover-door";
8427
+ /** Window. HA `device_class: window`. */
8428
+ DeviceRole["CoverWindow"] = "cover-window";
8409
8429
  /** Virtual HA toggle (input_boolean.*) — distinguishable from a
8410
8430
  * real Switch device for UI rendering / export adapters. */
8411
8431
  DeviceRole["BinaryHelper"] = "binary-helper";
@@ -8476,7 +8496,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8476
8496
  return DeviceRole;
8477
8497
  }({});
8478
8498
  //#endregion
8479
- //#region ../types/dist/composition-C-WpVYTX.mjs
8499
+ //#region ../types/dist/composition-EQ9Ok0Ee.mjs
8480
8500
  /**
8481
8501
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8482
8502
  *
@@ -12171,7 +12191,8 @@ var ConvertResultSchema = object({
12171
12191
  })).readonly()
12172
12192
  });
12173
12193
  _enum(["new-session", "step-up"]);
12174
- _enum(["en", "it"]);
12194
+ /** The languages the hub's app landing pages are written in (D858). */
12195
+ var AppPageLangSchema = _enum(["en", "it"]);
12175
12196
  /** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
12176
12197
  var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
12177
12198
  kind: literal("browser"),
@@ -12685,7 +12706,9 @@ var ConfigTabDeclarationSchema = object({
12685
12706
  var ConfigSectionWithValuesSchema = object({
12686
12707
  id: string(),
12687
12708
  title: string(),
12709
+ titleKey: string().optional(),
12688
12710
  description: string().optional(),
12711
+ descriptionKey: string().optional(),
12689
12712
  style: _enum(["card", "accordion"]).optional(),
12690
12713
  defaultCollapsed: boolean().optional(),
12691
12714
  columns: union([
@@ -15911,6 +15934,9 @@ method(object({
15911
15934
  }), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
15912
15935
  kind: "mutation",
15913
15936
  auth: "admin"
15937
+ }), method(object({ deviceId: number().int() }), object({ refs: array(string()).readonly() }), {
15938
+ kind: "mutation",
15939
+ auth: "admin"
15914
15940
  }), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
15915
15941
  /**
15916
15942
  * device-history — the ONE mechanism for numeric history (D850).
@@ -37314,6 +37340,38 @@ var DeviceRegisterPayloadSchema = object({
37314
37340
  * omits it and the keyword backstop applies. */
37315
37341
  secretConfigPaths: array(string()).optional()
37316
37342
  });
37343
+ /** One deleted device, kept by device-manager so an addon that missed the
37344
+ * deletion can still learn of it (D865). Written by the delete path ONLY. */
37345
+ var DeviceTombstoneSchema = object({
37346
+ deviceId: number().int().positive(),
37347
+ /** Epoch ms the device was deleted. */
37348
+ deletedAt: number(),
37349
+ /** The addon that owned the device when it was deleted. */
37350
+ providerAddonId: string()
37351
+ });
37352
+ /** Data held for one device that device-manager no longer knows. */
37353
+ var OrphanDeviceDataSchema = object({
37354
+ deviceId: number().int().positive(),
37355
+ /** Rows/files per store (`<addonId>:<store>`). */
37356
+ stores: record(string(), number().int().nonnegative())
37357
+ });
37358
+ var CleanupDeletedDevicesResultSchema = object({
37359
+ /**
37360
+ * `skipped` — the absence check could not be trusted (a device-list read
37361
+ * failed or the two reads disagreed); nothing was listed or deleted.
37362
+ * `dry-run` — `devices` is what a confirmed run would delete.
37363
+ * `cleaned` — `devices` is what was deleted.
37364
+ */
37365
+ status: _enum([
37366
+ "skipped",
37367
+ "dry-run",
37368
+ "cleaned"
37369
+ ]),
37370
+ reason: string().nullable(),
37371
+ devices: array(OrphanDeviceDataSchema),
37372
+ /** Implementers that could not be asked (their stores are not in `devices`). */
37373
+ unreachable: array(string())
37374
+ });
37317
37375
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
37318
37376
  var DevicePersistConfigPayloadSchema = object({
37319
37377
  deviceId: number(),
@@ -37552,6 +37610,9 @@ method(object({
37552
37610
  }), method(object({ deviceId: number() }), object({ success: literal(true) }), {
37553
37611
  kind: "mutation",
37554
37612
  auth: "admin"
37613
+ }), method(object({ sinceMs: number() }), array(DeviceTombstoneSchema).readonly(), { auth: "admin" }), method(object({ confirm: boolean() }), CleanupDeletedDevicesResultSchema, {
37614
+ kind: "mutation",
37615
+ auth: "admin"
37555
37616
  }), method(object({ integrationId: string() }), object({ removed: number() }), {
37556
37617
  kind: "mutation",
37557
37618
  auth: "admin"
@@ -38014,6 +38075,72 @@ method(object({
38014
38075
  auth: "admin"
38015
38076
  });
38016
38077
  /**
38078
+ * `device-removal-hook` — the reliable way an addon learns a device was DELETED,
38079
+ * so it can delete what it keeps for that device (D865).
38080
+ *
38081
+ * ## Why an event was not enough
38082
+ *
38083
+ * `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
38084
+ * hung its per-device clean-up on it left durable garbage whenever the event was
38085
+ * lost, the addon was down, or it was restarting at that moment — footage,
38086
+ * analytics rows and settings of device 4483 outlived the device. Loss of this
38087
+ * signal corrupts durable state, so it travels by RPC with a recorded fact
38088
+ * behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
38089
+ *
38090
+ * ## The three pieces
38091
+ *
38092
+ * 1. device-manager records a TOMBSTONE per deleted device
38093
+ * (`deviceManager.listDeletedSince`). The tombstone is written by the delete
38094
+ * path only — a device that is unregistered, offline or whose provider is
38095
+ * restarting is NOT deleted and gets none.
38096
+ * 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
38097
+ * this collection, one by one, with bounded retries, logged.
38098
+ * 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
38099
+ * (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
38100
+ * may have missed. Reconcile is driven by tombstones, never by "the device is
38101
+ * not in the current list": a failed or partial list read must not destroy data.
38102
+ *
38103
+ * ## Contract for an implementer
38104
+ *
38105
+ * - **Idempotent.** It is called again by a retry, by a reconcile and by the
38106
+ * admin cleanup of data that predates tombstones. A device with nothing left
38107
+ * answers zero counts.
38108
+ * - **One key per store** in `counts`, deleted rows/files per store, so the log
38109
+ * line and the admin dry run can say where the data was.
38110
+ * - **Training datasets are NOT device data** and are never deleted by a hook.
38111
+ * - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
38112
+ * per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
38113
+ * for every addon centrally at delete time. This hook is for device DATA
38114
+ * that is not settings: footage, event media, analytics rows, history.
38115
+ * - A provider that cannot tell is allowed to throw; the caller retries it.
38116
+ *
38117
+ * `listDeviceData` is the read side of the admin "Clean data of deleted devices"
38118
+ * action: which device ids this addon holds data for, and how much per store. It
38119
+ * never deletes. device-manager decides which of those ids are absent from the
38120
+ * fleet, from TWO consistent reads of the device list (D49).
38121
+ */
38122
+ /** What a hook is told about the deletion. */
38123
+ var DeviceRemovedInputSchema = object({
38124
+ deviceId: number().int().positive(),
38125
+ /** Epoch ms the device was deleted (the tombstone's `deletedAt`). */
38126
+ deletedAt: number(),
38127
+ /** The addon that owned the device, as device-manager last knew it. */
38128
+ providerAddonId: string()
38129
+ });
38130
+ /** Rows/files/refs deleted, per store this implementer owns. */
38131
+ var DeviceRemovedResultSchema = object({ counts: record(string(), number().int().nonnegative()) });
38132
+ /** One (store, device) pair an implementer holds data for. */
38133
+ var DeviceDataEntrySchema = object({
38134
+ store: string(),
38135
+ deviceId: number().int().positive(),
38136
+ /** Rows (or files) held for the device in the store. */
38137
+ count: number().int().nonnegative()
38138
+ });
38139
+ method(DeviceRemovedInputSchema, DeviceRemovedResultSchema, {
38140
+ kind: "mutation",
38141
+ auth: "admin"
38142
+ }), method(_void(), array(DeviceDataEntrySchema).readonly(), { auth: "admin" });
38143
+ /**
38017
38144
  * `failure-contribution` — the capability an addon reports its OWN losses
38018
38145
  * through, per camera, with the denominator attached. It stores nothing.
38019
38146
  *
@@ -62613,6 +62740,12 @@ Object.freeze({
62613
62740
  addonId: null,
62614
62741
  access: "create"
62615
62742
  },
62743
+ "deviceManager.cleanupDeletedDevicesData": {
62744
+ capName: "device-manager",
62745
+ capScope: "system",
62746
+ addonId: null,
62747
+ access: "create"
62748
+ },
62616
62749
  "deviceManager.createDevice": {
62617
62750
  capName: "device-manager",
62618
62751
  capScope: "system",
@@ -62793,6 +62926,12 @@ Object.freeze({
62793
62926
  addonId: null,
62794
62927
  access: "view"
62795
62928
  },
62929
+ "deviceManager.listDeletedSince": {
62930
+ capName: "device-manager",
62931
+ capScope: "system",
62932
+ addonId: null,
62933
+ access: "view"
62934
+ },
62796
62935
  "deviceManager.listDeviceIdsByCaps": {
62797
62936
  capName: "device-manager",
62798
62937
  capScope: "system",
@@ -63201,6 +63340,18 @@ Object.freeze({
63201
63340
  addonId: null,
63202
63341
  access: "create"
63203
63342
  },
63343
+ "deviceRemovalHook.listDeviceData": {
63344
+ capName: "device-removal-hook",
63345
+ capScope: "system",
63346
+ addonId: null,
63347
+ access: "view"
63348
+ },
63349
+ "deviceRemovalHook.onDeviceRemoved": {
63350
+ capName: "device-removal-hook",
63351
+ capScope: "system",
63352
+ addonId: null,
63353
+ access: "create"
63354
+ },
63204
63355
  "deviceState.claimFields": {
63205
63356
  capName: "device-state",
63206
63357
  capScope: "system",
@@ -63633,6 +63784,12 @@ Object.freeze({
63633
63784
  addonId: null,
63634
63785
  access: "delete"
63635
63786
  },
63787
+ "keychain.deleteDeviceScope": {
63788
+ capName: "keychain",
63789
+ capScope: "system",
63790
+ addonId: null,
63791
+ access: "delete"
63792
+ },
63636
63793
  "keychain.getState": {
63637
63794
  capName: "keychain",
63638
63795
  capScope: "system",
@@ -69645,6 +69802,11 @@ Object.freeze({
69645
69802
  form: "single",
69646
69803
  optional: false
69647
69804
  }],
69805
+ "deviceRemovalHook.onDeviceRemoved": [{
69806
+ name: "deviceId",
69807
+ form: "single",
69808
+ optional: false
69809
+ }],
69648
69810
  "deviceState.claimFields": [{
69649
69811
  name: "deviceId",
69650
69812
  form: "single",
@@ -69834,6 +69996,11 @@ Object.freeze({
69834
69996
  form: "single",
69835
69997
  optional: false
69836
69998
  }],
69999
+ "keychain.deleteDeviceScope": [{
70000
+ name: "deviceId",
70001
+ form: "single",
70002
+ optional: false
70003
+ }],
69837
70004
  "lawnMowerControl.dock": [{
69838
70005
  name: "deviceId",
69839
70006
  form: "single",
@@ -72182,6 +72349,8 @@ new Set([
72182
72349
  "audio-tools",
72183
72350
  "audio-silence"
72184
72351
  ]);
72352
+ AppPageLangSchema.options;
72353
+ record(string().min(1), string());
72185
72354
  /**
72186
72355
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
72187
72356
  *
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-CPP1Jzoz.mjs";
1
+ import { t as e } from "./createLucideIcon-C0bBNRpC.mjs";
2
2
  var t = e("grid-2x2", [
3
3
  ["path", {
4
4
  d: "M12 3v18",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.373",
39
+ version: "1.2.374",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.2.131",
48
+ version: "1.2.132",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.291",
84
+ version: "1.2.292",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,