@camstack/addon-model-studio 1.1.261 → 1.1.262
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/{MaskShapeCanvas-DBaZffFb.mjs → MaskShapeCanvas-CrWutXSb.mjs} +2330 -2329
- package/dist/MotionZonesSettings-DtoUJxd6.mjs +309 -0
- package/dist/PrivacyMaskSettings-Bd5lL0CO.mjs +368 -0
- package/dist/SceneMonitorEditor-BG0CBUrr.mjs +846 -0
- package/dist/_stub.js +9125 -7988
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BLNkyVNp.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CmpS6H8K.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DlW3IlLM.mjs +26 -0
- package/dist/{_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-CHL8loOl.mjs → _virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DMBKVIH7.mjs} +1 -1
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-D8GpjpEa.mjs → hostInit-Cuk6X8GJ.mjs} +3 -3
- package/dist/model-studio.addon.js +179 -6
- package/dist/model-studio.addon.mjs +179 -6
- package/dist/player-overlays-DXeDukPC.mjs +44 -0
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DkEyuaY7.mjs → responsive-D9Bo78lO.mjs} +35 -35
- package/dist/scene-monitor-copy-CQr7egaT.mjs +227 -0
- package/dist/{square-BuUmfUsp.mjs → square-d__poSpa.mjs} +1 -1
- package/dist/{trash-2-CVLNpvpf.mjs → trash-2-C0XdoZQu.mjs} +1 -1
- package/dist/ui-text-BqZa5BNK.mjs +34 -0
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-B7QpttUx.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CS43EGzM.mjs} +1 -1
- package/package.json +1 -1
- package/dist/MotionZonesSettings-hiAo2-5o.mjs +0 -310
- package/dist/PrivacyMaskSettings-BdJJ1m-Z.mjs +0 -377
- package/dist/SceneMonitorEditor-hfPKGf8z.mjs +0 -831
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CEZAcVSS.mjs +0 -26
- package/dist/player-overlays-D2zkUA6J.mjs +0 -44
- package/dist/scene-monitor-copy-CLdYZqAD.mjs +0 -187
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
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.
|
|
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.
|
|
84
|
+
version: "1.2.292",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -5782,7 +5782,7 @@ var ZodIssueCode = {
|
|
|
5782
5782
|
var ZodFirstPartyTypeKind;
|
|
5783
5783
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5784
5784
|
//#endregion
|
|
5785
|
-
//#region ../types/dist/sleep-
|
|
5785
|
+
//#region ../types/dist/sleep-DRqxtc0C.mjs
|
|
5786
5786
|
/**
|
|
5787
5787
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5788
5788
|
* window to float samples (D455).
|
|
@@ -8631,8 +8631,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8631
8631
|
kind: "mutation",
|
|
8632
8632
|
auth: "admin"
|
|
8633
8633
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8634
|
+
object({
|
|
8635
|
+
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8636
|
+
params: record(string(), union([string(), number()])).optional()
|
|
8637
|
+
});
|
|
8634
8638
|
//#endregion
|
|
8635
|
-
//#region ../types/dist/err-msg-
|
|
8639
|
+
//#region ../types/dist/err-msg-DLerKiVO.mjs
|
|
8636
8640
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8637
8641
|
DeviceType["Camera"] = "camera";
|
|
8638
8642
|
DeviceType["Hub"] = "hub";
|
|
@@ -8882,6 +8886,22 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8882
8886
|
DeviceRole["Nightvision"] = "nightvision";
|
|
8883
8887
|
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
8884
8888
|
DeviceRole["Doorbell"] = "doorbell";
|
|
8889
|
+
/** Interior blind / shade / roller blind. HA `device_class: blind|shade`. */
|
|
8890
|
+
DeviceRole["CoverBlind"] = "cover-blind";
|
|
8891
|
+
/** Exterior roller shutter. HA `device_class: shutter`; Homematic BROLL. */
|
|
8892
|
+
DeviceRole["CoverShutter"] = "cover-shutter";
|
|
8893
|
+
/** Exterior awning. HA `device_class: awning`. */
|
|
8894
|
+
DeviceRole["CoverAwning"] = "cover-awning";
|
|
8895
|
+
/** Curtain / drape. HA `device_class: curtain`. */
|
|
8896
|
+
DeviceRole["CoverCurtain"] = "cover-curtain";
|
|
8897
|
+
/** Garage door. HA `device_class: garage`. A security actuator: exports gate it. */
|
|
8898
|
+
DeviceRole["CoverGarage"] = "cover-garage";
|
|
8899
|
+
/** Gate. HA `device_class: gate`. A security actuator: exports gate it. */
|
|
8900
|
+
DeviceRole["CoverGate"] = "cover-gate";
|
|
8901
|
+
/** Door. HA `device_class: door`. A security actuator: exports gate it. */
|
|
8902
|
+
DeviceRole["CoverDoor"] = "cover-door";
|
|
8903
|
+
/** Window. HA `device_class: window`. */
|
|
8904
|
+
DeviceRole["CoverWindow"] = "cover-window";
|
|
8885
8905
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8886
8906
|
* real Switch device for UI rendering / export adapters. */
|
|
8887
8907
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
@@ -8952,7 +8972,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8952
8972
|
return DeviceRole;
|
|
8953
8973
|
}({});
|
|
8954
8974
|
//#endregion
|
|
8955
|
-
//#region ../types/dist/composition-
|
|
8975
|
+
//#region ../types/dist/composition-EQ9Ok0Ee.mjs
|
|
8956
8976
|
/**
|
|
8957
8977
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8958
8978
|
*
|
|
@@ -12768,7 +12788,8 @@ var ConvertResultSchema = object({
|
|
|
12768
12788
|
artifacts: array(ConvertArtifactSchema).readonly()
|
|
12769
12789
|
});
|
|
12770
12790
|
_enum(["new-session", "step-up"]);
|
|
12771
|
-
|
|
12791
|
+
/** The languages the hub's app landing pages are written in (D858). */
|
|
12792
|
+
var AppPageLangSchema = _enum(["en", "it"]);
|
|
12772
12793
|
/** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
|
|
12773
12794
|
var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
|
|
12774
12795
|
kind: literal("browser"),
|
|
@@ -13282,7 +13303,9 @@ var ConfigTabDeclarationSchema = object({
|
|
|
13282
13303
|
var ConfigSectionWithValuesSchema = object({
|
|
13283
13304
|
id: string(),
|
|
13284
13305
|
title: string(),
|
|
13306
|
+
titleKey: string().optional(),
|
|
13285
13307
|
description: string().optional(),
|
|
13308
|
+
descriptionKey: string().optional(),
|
|
13286
13309
|
style: _enum(["card", "accordion"]).optional(),
|
|
13287
13310
|
defaultCollapsed: boolean().optional(),
|
|
13288
13311
|
columns: union([
|
|
@@ -16536,6 +16559,9 @@ method(object({
|
|
|
16536
16559
|
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
16537
16560
|
kind: "mutation",
|
|
16538
16561
|
auth: "admin"
|
|
16562
|
+
}), method(object({ deviceId: number().int() }), object({ refs: array(string()).readonly() }), {
|
|
16563
|
+
kind: "mutation",
|
|
16564
|
+
auth: "admin"
|
|
16539
16565
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
16540
16566
|
/**
|
|
16541
16567
|
* device-history — the ONE mechanism for numeric history (D850).
|
|
@@ -37939,6 +37965,38 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
37939
37965
|
* omits it and the keyword backstop applies. */
|
|
37940
37966
|
secretConfigPaths: array(string()).optional()
|
|
37941
37967
|
});
|
|
37968
|
+
/** One deleted device, kept by device-manager so an addon that missed the
|
|
37969
|
+
* deletion can still learn of it (D865). Written by the delete path ONLY. */
|
|
37970
|
+
var DeviceTombstoneSchema = object({
|
|
37971
|
+
deviceId: number().int().positive(),
|
|
37972
|
+
/** Epoch ms the device was deleted. */
|
|
37973
|
+
deletedAt: number(),
|
|
37974
|
+
/** The addon that owned the device when it was deleted. */
|
|
37975
|
+
providerAddonId: string()
|
|
37976
|
+
});
|
|
37977
|
+
/** Data held for one device that device-manager no longer knows. */
|
|
37978
|
+
var OrphanDeviceDataSchema = object({
|
|
37979
|
+
deviceId: number().int().positive(),
|
|
37980
|
+
/** Rows/files per store (`<addonId>:<store>`). */
|
|
37981
|
+
stores: record(string(), number().int().nonnegative())
|
|
37982
|
+
});
|
|
37983
|
+
var CleanupDeletedDevicesResultSchema = object({
|
|
37984
|
+
/**
|
|
37985
|
+
* `skipped` — the absence check could not be trusted (a device-list read
|
|
37986
|
+
* failed or the two reads disagreed); nothing was listed or deleted.
|
|
37987
|
+
* `dry-run` — `devices` is what a confirmed run would delete.
|
|
37988
|
+
* `cleaned` — `devices` is what was deleted.
|
|
37989
|
+
*/
|
|
37990
|
+
status: _enum([
|
|
37991
|
+
"skipped",
|
|
37992
|
+
"dry-run",
|
|
37993
|
+
"cleaned"
|
|
37994
|
+
]),
|
|
37995
|
+
reason: string().nullable(),
|
|
37996
|
+
devices: array(OrphanDeviceDataSchema),
|
|
37997
|
+
/** Implementers that could not be asked (their stores are not in `devices`). */
|
|
37998
|
+
unreachable: array(string())
|
|
37999
|
+
});
|
|
37942
38000
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
37943
38001
|
var DevicePersistConfigPayloadSchema = object({
|
|
37944
38002
|
deviceId: number(),
|
|
@@ -38177,6 +38235,9 @@ method(object({
|
|
|
38177
38235
|
}), method(object({ deviceId: number() }), object({ success: literal(true) }), {
|
|
38178
38236
|
kind: "mutation",
|
|
38179
38237
|
auth: "admin"
|
|
38238
|
+
}), method(object({ sinceMs: number() }), array(DeviceTombstoneSchema).readonly(), { auth: "admin" }), method(object({ confirm: boolean() }), CleanupDeletedDevicesResultSchema, {
|
|
38239
|
+
kind: "mutation",
|
|
38240
|
+
auth: "admin"
|
|
38180
38241
|
}), method(object({ integrationId: string() }), object({ removed: number() }), {
|
|
38181
38242
|
kind: "mutation",
|
|
38182
38243
|
auth: "admin"
|
|
@@ -38639,6 +38700,72 @@ method(object({
|
|
|
38639
38700
|
auth: "admin"
|
|
38640
38701
|
});
|
|
38641
38702
|
/**
|
|
38703
|
+
* `device-removal-hook` — the reliable way an addon learns a device was DELETED,
|
|
38704
|
+
* so it can delete what it keeps for that device (D865).
|
|
38705
|
+
*
|
|
38706
|
+
* ## Why an event was not enough
|
|
38707
|
+
*
|
|
38708
|
+
* `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
|
|
38709
|
+
* hung its per-device clean-up on it left durable garbage whenever the event was
|
|
38710
|
+
* lost, the addon was down, or it was restarting at that moment — footage,
|
|
38711
|
+
* analytics rows and settings of device 4483 outlived the device. Loss of this
|
|
38712
|
+
* signal corrupts durable state, so it travels by RPC with a recorded fact
|
|
38713
|
+
* behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
|
|
38714
|
+
*
|
|
38715
|
+
* ## The three pieces
|
|
38716
|
+
*
|
|
38717
|
+
* 1. device-manager records a TOMBSTONE per deleted device
|
|
38718
|
+
* (`deviceManager.listDeletedSince`). The tombstone is written by the delete
|
|
38719
|
+
* path only — a device that is unregistered, offline or whose provider is
|
|
38720
|
+
* restarting is NOT deleted and gets none.
|
|
38721
|
+
* 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
|
|
38722
|
+
* this collection, one by one, with bounded retries, logged.
|
|
38723
|
+
* 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
|
|
38724
|
+
* (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
|
|
38725
|
+
* may have missed. Reconcile is driven by tombstones, never by "the device is
|
|
38726
|
+
* not in the current list": a failed or partial list read must not destroy data.
|
|
38727
|
+
*
|
|
38728
|
+
* ## Contract for an implementer
|
|
38729
|
+
*
|
|
38730
|
+
* - **Idempotent.** It is called again by a retry, by a reconcile and by the
|
|
38731
|
+
* admin cleanup of data that predates tombstones. A device with nothing left
|
|
38732
|
+
* answers zero counts.
|
|
38733
|
+
* - **One key per store** in `counts`, deleted rows/files per store, so the log
|
|
38734
|
+
* line and the admin dry run can say where the data was.
|
|
38735
|
+
* - **Training datasets are NOT device data** and are never deleted by a hook.
|
|
38736
|
+
* - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
|
|
38737
|
+
* per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
|
|
38738
|
+
* for every addon centrally at delete time. This hook is for device DATA
|
|
38739
|
+
* that is not settings: footage, event media, analytics rows, history.
|
|
38740
|
+
* - A provider that cannot tell is allowed to throw; the caller retries it.
|
|
38741
|
+
*
|
|
38742
|
+
* `listDeviceData` is the read side of the admin "Clean data of deleted devices"
|
|
38743
|
+
* action: which device ids this addon holds data for, and how much per store. It
|
|
38744
|
+
* never deletes. device-manager decides which of those ids are absent from the
|
|
38745
|
+
* fleet, from TWO consistent reads of the device list (D49).
|
|
38746
|
+
*/
|
|
38747
|
+
/** What a hook is told about the deletion. */
|
|
38748
|
+
var DeviceRemovedInputSchema = object({
|
|
38749
|
+
deviceId: number().int().positive(),
|
|
38750
|
+
/** Epoch ms the device was deleted (the tombstone's `deletedAt`). */
|
|
38751
|
+
deletedAt: number(),
|
|
38752
|
+
/** The addon that owned the device, as device-manager last knew it. */
|
|
38753
|
+
providerAddonId: string()
|
|
38754
|
+
});
|
|
38755
|
+
/** Rows/files/refs deleted, per store this implementer owns. */
|
|
38756
|
+
var DeviceRemovedResultSchema = object({ counts: record(string(), number().int().nonnegative()) });
|
|
38757
|
+
/** One (store, device) pair an implementer holds data for. */
|
|
38758
|
+
var DeviceDataEntrySchema = object({
|
|
38759
|
+
store: string(),
|
|
38760
|
+
deviceId: number().int().positive(),
|
|
38761
|
+
/** Rows (or files) held for the device in the store. */
|
|
38762
|
+
count: number().int().nonnegative()
|
|
38763
|
+
});
|
|
38764
|
+
method(DeviceRemovedInputSchema, DeviceRemovedResultSchema, {
|
|
38765
|
+
kind: "mutation",
|
|
38766
|
+
auth: "admin"
|
|
38767
|
+
}), method(_void(), array(DeviceDataEntrySchema).readonly(), { auth: "admin" });
|
|
38768
|
+
/**
|
|
38642
38769
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
38643
38770
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
38644
38771
|
*
|
|
@@ -63242,6 +63369,12 @@ Object.freeze({
|
|
|
63242
63369
|
addonId: null,
|
|
63243
63370
|
access: "create"
|
|
63244
63371
|
},
|
|
63372
|
+
"deviceManager.cleanupDeletedDevicesData": {
|
|
63373
|
+
capName: "device-manager",
|
|
63374
|
+
capScope: "system",
|
|
63375
|
+
addonId: null,
|
|
63376
|
+
access: "create"
|
|
63377
|
+
},
|
|
63245
63378
|
"deviceManager.createDevice": {
|
|
63246
63379
|
capName: "device-manager",
|
|
63247
63380
|
capScope: "system",
|
|
@@ -63422,6 +63555,12 @@ Object.freeze({
|
|
|
63422
63555
|
addonId: null,
|
|
63423
63556
|
access: "view"
|
|
63424
63557
|
},
|
|
63558
|
+
"deviceManager.listDeletedSince": {
|
|
63559
|
+
capName: "device-manager",
|
|
63560
|
+
capScope: "system",
|
|
63561
|
+
addonId: null,
|
|
63562
|
+
access: "view"
|
|
63563
|
+
},
|
|
63425
63564
|
"deviceManager.listDeviceIdsByCaps": {
|
|
63426
63565
|
capName: "device-manager",
|
|
63427
63566
|
capScope: "system",
|
|
@@ -63830,6 +63969,18 @@ Object.freeze({
|
|
|
63830
63969
|
addonId: null,
|
|
63831
63970
|
access: "create"
|
|
63832
63971
|
},
|
|
63972
|
+
"deviceRemovalHook.listDeviceData": {
|
|
63973
|
+
capName: "device-removal-hook",
|
|
63974
|
+
capScope: "system",
|
|
63975
|
+
addonId: null,
|
|
63976
|
+
access: "view"
|
|
63977
|
+
},
|
|
63978
|
+
"deviceRemovalHook.onDeviceRemoved": {
|
|
63979
|
+
capName: "device-removal-hook",
|
|
63980
|
+
capScope: "system",
|
|
63981
|
+
addonId: null,
|
|
63982
|
+
access: "create"
|
|
63983
|
+
},
|
|
63833
63984
|
"deviceState.claimFields": {
|
|
63834
63985
|
capName: "device-state",
|
|
63835
63986
|
capScope: "system",
|
|
@@ -64262,6 +64413,12 @@ Object.freeze({
|
|
|
64262
64413
|
addonId: null,
|
|
64263
64414
|
access: "delete"
|
|
64264
64415
|
},
|
|
64416
|
+
"keychain.deleteDeviceScope": {
|
|
64417
|
+
capName: "keychain",
|
|
64418
|
+
capScope: "system",
|
|
64419
|
+
addonId: null,
|
|
64420
|
+
access: "delete"
|
|
64421
|
+
},
|
|
64265
64422
|
"keychain.getState": {
|
|
64266
64423
|
capName: "keychain",
|
|
64267
64424
|
capScope: "system",
|
|
@@ -70274,6 +70431,11 @@ Object.freeze({
|
|
|
70274
70431
|
form: "single",
|
|
70275
70432
|
optional: false
|
|
70276
70433
|
}],
|
|
70434
|
+
"deviceRemovalHook.onDeviceRemoved": [{
|
|
70435
|
+
name: "deviceId",
|
|
70436
|
+
form: "single",
|
|
70437
|
+
optional: false
|
|
70438
|
+
}],
|
|
70277
70439
|
"deviceState.claimFields": [{
|
|
70278
70440
|
name: "deviceId",
|
|
70279
70441
|
form: "single",
|
|
@@ -70463,6 +70625,11 @@ Object.freeze({
|
|
|
70463
70625
|
form: "single",
|
|
70464
70626
|
optional: false
|
|
70465
70627
|
}],
|
|
70628
|
+
"keychain.deleteDeviceScope": [{
|
|
70629
|
+
name: "deviceId",
|
|
70630
|
+
form: "single",
|
|
70631
|
+
optional: false
|
|
70632
|
+
}],
|
|
70466
70633
|
"lawnMowerControl.dock": [{
|
|
70467
70634
|
name: "deviceId",
|
|
70468
70635
|
form: "single",
|
|
@@ -72811,6 +72978,8 @@ new Set([
|
|
|
72811
72978
|
"audio-tools",
|
|
72812
72979
|
"audio-silence"
|
|
72813
72980
|
]);
|
|
72981
|
+
AppPageLangSchema.options;
|
|
72982
|
+
record(string().min(1), string());
|
|
72814
72983
|
/**
|
|
72815
72984
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
72816
72985
|
*
|
|
@@ -73361,11 +73530,15 @@ function parseDisplayName(raw) {
|
|
|
73361
73530
|
if (name.length === 0) return { kind: "reset" };
|
|
73362
73531
|
if (CONTROL_CHARS.test(name)) return {
|
|
73363
73532
|
kind: "invalid",
|
|
73364
|
-
reason: "The name contains control characters."
|
|
73533
|
+
reason: "The name contains control characters.",
|
|
73534
|
+
code: "control",
|
|
73535
|
+
length: name.length
|
|
73365
73536
|
};
|
|
73366
73537
|
if (name.length > 80) return {
|
|
73367
73538
|
kind: "invalid",
|
|
73368
|
-
reason: `The name is ${name.length} characters long; the limit is 80
|
|
73539
|
+
reason: `The name is ${name.length} characters long; the limit is 80.`,
|
|
73540
|
+
code: "too-long",
|
|
73541
|
+
length: name.length
|
|
73369
73542
|
};
|
|
73370
73543
|
return {
|
|
73371
73544
|
kind: "set",
|
|
@@ -5756,7 +5756,7 @@ var ZodIssueCode = {
|
|
|
5756
5756
|
var ZodFirstPartyTypeKind;
|
|
5757
5757
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5758
5758
|
//#endregion
|
|
5759
|
-
//#region ../types/dist/sleep-
|
|
5759
|
+
//#region ../types/dist/sleep-DRqxtc0C.mjs
|
|
5760
5760
|
/**
|
|
5761
5761
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5762
5762
|
* window to float samples (D455).
|
|
@@ -8605,8 +8605,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8605
8605
|
kind: "mutation",
|
|
8606
8606
|
auth: "admin"
|
|
8607
8607
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8608
|
+
object({
|
|
8609
|
+
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8610
|
+
params: record(string(), union([string(), number()])).optional()
|
|
8611
|
+
});
|
|
8608
8612
|
//#endregion
|
|
8609
|
-
//#region ../types/dist/err-msg-
|
|
8613
|
+
//#region ../types/dist/err-msg-DLerKiVO.mjs
|
|
8610
8614
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8611
8615
|
DeviceType["Camera"] = "camera";
|
|
8612
8616
|
DeviceType["Hub"] = "hub";
|
|
@@ -8856,6 +8860,22 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8856
8860
|
DeviceRole["Nightvision"] = "nightvision";
|
|
8857
8861
|
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
8858
8862
|
DeviceRole["Doorbell"] = "doorbell";
|
|
8863
|
+
/** Interior blind / shade / roller blind. HA `device_class: blind|shade`. */
|
|
8864
|
+
DeviceRole["CoverBlind"] = "cover-blind";
|
|
8865
|
+
/** Exterior roller shutter. HA `device_class: shutter`; Homematic BROLL. */
|
|
8866
|
+
DeviceRole["CoverShutter"] = "cover-shutter";
|
|
8867
|
+
/** Exterior awning. HA `device_class: awning`. */
|
|
8868
|
+
DeviceRole["CoverAwning"] = "cover-awning";
|
|
8869
|
+
/** Curtain / drape. HA `device_class: curtain`. */
|
|
8870
|
+
DeviceRole["CoverCurtain"] = "cover-curtain";
|
|
8871
|
+
/** Garage door. HA `device_class: garage`. A security actuator: exports gate it. */
|
|
8872
|
+
DeviceRole["CoverGarage"] = "cover-garage";
|
|
8873
|
+
/** Gate. HA `device_class: gate`. A security actuator: exports gate it. */
|
|
8874
|
+
DeviceRole["CoverGate"] = "cover-gate";
|
|
8875
|
+
/** Door. HA `device_class: door`. A security actuator: exports gate it. */
|
|
8876
|
+
DeviceRole["CoverDoor"] = "cover-door";
|
|
8877
|
+
/** Window. HA `device_class: window`. */
|
|
8878
|
+
DeviceRole["CoverWindow"] = "cover-window";
|
|
8859
8879
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8860
8880
|
* real Switch device for UI rendering / export adapters. */
|
|
8861
8881
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
@@ -8926,7 +8946,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8926
8946
|
return DeviceRole;
|
|
8927
8947
|
}({});
|
|
8928
8948
|
//#endregion
|
|
8929
|
-
//#region ../types/dist/composition-
|
|
8949
|
+
//#region ../types/dist/composition-EQ9Ok0Ee.mjs
|
|
8930
8950
|
/**
|
|
8931
8951
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8932
8952
|
*
|
|
@@ -12742,7 +12762,8 @@ var ConvertResultSchema = object({
|
|
|
12742
12762
|
artifacts: array(ConvertArtifactSchema).readonly()
|
|
12743
12763
|
});
|
|
12744
12764
|
_enum(["new-session", "step-up"]);
|
|
12745
|
-
|
|
12765
|
+
/** The languages the hub's app landing pages are written in (D858). */
|
|
12766
|
+
var AppPageLangSchema = _enum(["en", "it"]);
|
|
12746
12767
|
/** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
|
|
12747
12768
|
var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
|
|
12748
12769
|
kind: literal("browser"),
|
|
@@ -13256,7 +13277,9 @@ var ConfigTabDeclarationSchema = object({
|
|
|
13256
13277
|
var ConfigSectionWithValuesSchema = object({
|
|
13257
13278
|
id: string(),
|
|
13258
13279
|
title: string(),
|
|
13280
|
+
titleKey: string().optional(),
|
|
13259
13281
|
description: string().optional(),
|
|
13282
|
+
descriptionKey: string().optional(),
|
|
13260
13283
|
style: _enum(["card", "accordion"]).optional(),
|
|
13261
13284
|
defaultCollapsed: boolean().optional(),
|
|
13262
13285
|
columns: union([
|
|
@@ -16510,6 +16533,9 @@ method(object({
|
|
|
16510
16533
|
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
16511
16534
|
kind: "mutation",
|
|
16512
16535
|
auth: "admin"
|
|
16536
|
+
}), method(object({ deviceId: number().int() }), object({ refs: array(string()).readonly() }), {
|
|
16537
|
+
kind: "mutation",
|
|
16538
|
+
auth: "admin"
|
|
16513
16539
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
16514
16540
|
/**
|
|
16515
16541
|
* device-history — the ONE mechanism for numeric history (D850).
|
|
@@ -37913,6 +37939,38 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
37913
37939
|
* omits it and the keyword backstop applies. */
|
|
37914
37940
|
secretConfigPaths: array(string()).optional()
|
|
37915
37941
|
});
|
|
37942
|
+
/** One deleted device, kept by device-manager so an addon that missed the
|
|
37943
|
+
* deletion can still learn of it (D865). Written by the delete path ONLY. */
|
|
37944
|
+
var DeviceTombstoneSchema = object({
|
|
37945
|
+
deviceId: number().int().positive(),
|
|
37946
|
+
/** Epoch ms the device was deleted. */
|
|
37947
|
+
deletedAt: number(),
|
|
37948
|
+
/** The addon that owned the device when it was deleted. */
|
|
37949
|
+
providerAddonId: string()
|
|
37950
|
+
});
|
|
37951
|
+
/** Data held for one device that device-manager no longer knows. */
|
|
37952
|
+
var OrphanDeviceDataSchema = object({
|
|
37953
|
+
deviceId: number().int().positive(),
|
|
37954
|
+
/** Rows/files per store (`<addonId>:<store>`). */
|
|
37955
|
+
stores: record(string(), number().int().nonnegative())
|
|
37956
|
+
});
|
|
37957
|
+
var CleanupDeletedDevicesResultSchema = object({
|
|
37958
|
+
/**
|
|
37959
|
+
* `skipped` — the absence check could not be trusted (a device-list read
|
|
37960
|
+
* failed or the two reads disagreed); nothing was listed or deleted.
|
|
37961
|
+
* `dry-run` — `devices` is what a confirmed run would delete.
|
|
37962
|
+
* `cleaned` — `devices` is what was deleted.
|
|
37963
|
+
*/
|
|
37964
|
+
status: _enum([
|
|
37965
|
+
"skipped",
|
|
37966
|
+
"dry-run",
|
|
37967
|
+
"cleaned"
|
|
37968
|
+
]),
|
|
37969
|
+
reason: string().nullable(),
|
|
37970
|
+
devices: array(OrphanDeviceDataSchema),
|
|
37971
|
+
/** Implementers that could not be asked (their stores are not in `devices`). */
|
|
37972
|
+
unreachable: array(string())
|
|
37973
|
+
});
|
|
37916
37974
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
37917
37975
|
var DevicePersistConfigPayloadSchema = object({
|
|
37918
37976
|
deviceId: number(),
|
|
@@ -38151,6 +38209,9 @@ method(object({
|
|
|
38151
38209
|
}), method(object({ deviceId: number() }), object({ success: literal(true) }), {
|
|
38152
38210
|
kind: "mutation",
|
|
38153
38211
|
auth: "admin"
|
|
38212
|
+
}), method(object({ sinceMs: number() }), array(DeviceTombstoneSchema).readonly(), { auth: "admin" }), method(object({ confirm: boolean() }), CleanupDeletedDevicesResultSchema, {
|
|
38213
|
+
kind: "mutation",
|
|
38214
|
+
auth: "admin"
|
|
38154
38215
|
}), method(object({ integrationId: string() }), object({ removed: number() }), {
|
|
38155
38216
|
kind: "mutation",
|
|
38156
38217
|
auth: "admin"
|
|
@@ -38613,6 +38674,72 @@ method(object({
|
|
|
38613
38674
|
auth: "admin"
|
|
38614
38675
|
});
|
|
38615
38676
|
/**
|
|
38677
|
+
* `device-removal-hook` — the reliable way an addon learns a device was DELETED,
|
|
38678
|
+
* so it can delete what it keeps for that device (D865).
|
|
38679
|
+
*
|
|
38680
|
+
* ## Why an event was not enough
|
|
38681
|
+
*
|
|
38682
|
+
* `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
|
|
38683
|
+
* hung its per-device clean-up on it left durable garbage whenever the event was
|
|
38684
|
+
* lost, the addon was down, or it was restarting at that moment — footage,
|
|
38685
|
+
* analytics rows and settings of device 4483 outlived the device. Loss of this
|
|
38686
|
+
* signal corrupts durable state, so it travels by RPC with a recorded fact
|
|
38687
|
+
* behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
|
|
38688
|
+
*
|
|
38689
|
+
* ## The three pieces
|
|
38690
|
+
*
|
|
38691
|
+
* 1. device-manager records a TOMBSTONE per deleted device
|
|
38692
|
+
* (`deviceManager.listDeletedSince`). The tombstone is written by the delete
|
|
38693
|
+
* path only — a device that is unregistered, offline or whose provider is
|
|
38694
|
+
* restarting is NOT deleted and gets none.
|
|
38695
|
+
* 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
|
|
38696
|
+
* this collection, one by one, with bounded retries, logged.
|
|
38697
|
+
* 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
|
|
38698
|
+
* (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
|
|
38699
|
+
* may have missed. Reconcile is driven by tombstones, never by "the device is
|
|
38700
|
+
* not in the current list": a failed or partial list read must not destroy data.
|
|
38701
|
+
*
|
|
38702
|
+
* ## Contract for an implementer
|
|
38703
|
+
*
|
|
38704
|
+
* - **Idempotent.** It is called again by a retry, by a reconcile and by the
|
|
38705
|
+
* admin cleanup of data that predates tombstones. A device with nothing left
|
|
38706
|
+
* answers zero counts.
|
|
38707
|
+
* - **One key per store** in `counts`, deleted rows/files per store, so the log
|
|
38708
|
+
* line and the admin dry run can say where the data was.
|
|
38709
|
+
* - **Training datasets are NOT device data** and are never deleted by a hook.
|
|
38710
|
+
* - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
|
|
38711
|
+
* per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
|
|
38712
|
+
* for every addon centrally at delete time. This hook is for device DATA
|
|
38713
|
+
* that is not settings: footage, event media, analytics rows, history.
|
|
38714
|
+
* - A provider that cannot tell is allowed to throw; the caller retries it.
|
|
38715
|
+
*
|
|
38716
|
+
* `listDeviceData` is the read side of the admin "Clean data of deleted devices"
|
|
38717
|
+
* action: which device ids this addon holds data for, and how much per store. It
|
|
38718
|
+
* never deletes. device-manager decides which of those ids are absent from the
|
|
38719
|
+
* fleet, from TWO consistent reads of the device list (D49).
|
|
38720
|
+
*/
|
|
38721
|
+
/** What a hook is told about the deletion. */
|
|
38722
|
+
var DeviceRemovedInputSchema = object({
|
|
38723
|
+
deviceId: number().int().positive(),
|
|
38724
|
+
/** Epoch ms the device was deleted (the tombstone's `deletedAt`). */
|
|
38725
|
+
deletedAt: number(),
|
|
38726
|
+
/** The addon that owned the device, as device-manager last knew it. */
|
|
38727
|
+
providerAddonId: string()
|
|
38728
|
+
});
|
|
38729
|
+
/** Rows/files/refs deleted, per store this implementer owns. */
|
|
38730
|
+
var DeviceRemovedResultSchema = object({ counts: record(string(), number().int().nonnegative()) });
|
|
38731
|
+
/** One (store, device) pair an implementer holds data for. */
|
|
38732
|
+
var DeviceDataEntrySchema = object({
|
|
38733
|
+
store: string(),
|
|
38734
|
+
deviceId: number().int().positive(),
|
|
38735
|
+
/** Rows (or files) held for the device in the store. */
|
|
38736
|
+
count: number().int().nonnegative()
|
|
38737
|
+
});
|
|
38738
|
+
method(DeviceRemovedInputSchema, DeviceRemovedResultSchema, {
|
|
38739
|
+
kind: "mutation",
|
|
38740
|
+
auth: "admin"
|
|
38741
|
+
}), method(_void(), array(DeviceDataEntrySchema).readonly(), { auth: "admin" });
|
|
38742
|
+
/**
|
|
38616
38743
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
38617
38744
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
38618
38745
|
*
|
|
@@ -63216,6 +63343,12 @@ Object.freeze({
|
|
|
63216
63343
|
addonId: null,
|
|
63217
63344
|
access: "create"
|
|
63218
63345
|
},
|
|
63346
|
+
"deviceManager.cleanupDeletedDevicesData": {
|
|
63347
|
+
capName: "device-manager",
|
|
63348
|
+
capScope: "system",
|
|
63349
|
+
addonId: null,
|
|
63350
|
+
access: "create"
|
|
63351
|
+
},
|
|
63219
63352
|
"deviceManager.createDevice": {
|
|
63220
63353
|
capName: "device-manager",
|
|
63221
63354
|
capScope: "system",
|
|
@@ -63396,6 +63529,12 @@ Object.freeze({
|
|
|
63396
63529
|
addonId: null,
|
|
63397
63530
|
access: "view"
|
|
63398
63531
|
},
|
|
63532
|
+
"deviceManager.listDeletedSince": {
|
|
63533
|
+
capName: "device-manager",
|
|
63534
|
+
capScope: "system",
|
|
63535
|
+
addonId: null,
|
|
63536
|
+
access: "view"
|
|
63537
|
+
},
|
|
63399
63538
|
"deviceManager.listDeviceIdsByCaps": {
|
|
63400
63539
|
capName: "device-manager",
|
|
63401
63540
|
capScope: "system",
|
|
@@ -63804,6 +63943,18 @@ Object.freeze({
|
|
|
63804
63943
|
addonId: null,
|
|
63805
63944
|
access: "create"
|
|
63806
63945
|
},
|
|
63946
|
+
"deviceRemovalHook.listDeviceData": {
|
|
63947
|
+
capName: "device-removal-hook",
|
|
63948
|
+
capScope: "system",
|
|
63949
|
+
addonId: null,
|
|
63950
|
+
access: "view"
|
|
63951
|
+
},
|
|
63952
|
+
"deviceRemovalHook.onDeviceRemoved": {
|
|
63953
|
+
capName: "device-removal-hook",
|
|
63954
|
+
capScope: "system",
|
|
63955
|
+
addonId: null,
|
|
63956
|
+
access: "create"
|
|
63957
|
+
},
|
|
63807
63958
|
"deviceState.claimFields": {
|
|
63808
63959
|
capName: "device-state",
|
|
63809
63960
|
capScope: "system",
|
|
@@ -64236,6 +64387,12 @@ Object.freeze({
|
|
|
64236
64387
|
addonId: null,
|
|
64237
64388
|
access: "delete"
|
|
64238
64389
|
},
|
|
64390
|
+
"keychain.deleteDeviceScope": {
|
|
64391
|
+
capName: "keychain",
|
|
64392
|
+
capScope: "system",
|
|
64393
|
+
addonId: null,
|
|
64394
|
+
access: "delete"
|
|
64395
|
+
},
|
|
64239
64396
|
"keychain.getState": {
|
|
64240
64397
|
capName: "keychain",
|
|
64241
64398
|
capScope: "system",
|
|
@@ -70248,6 +70405,11 @@ Object.freeze({
|
|
|
70248
70405
|
form: "single",
|
|
70249
70406
|
optional: false
|
|
70250
70407
|
}],
|
|
70408
|
+
"deviceRemovalHook.onDeviceRemoved": [{
|
|
70409
|
+
name: "deviceId",
|
|
70410
|
+
form: "single",
|
|
70411
|
+
optional: false
|
|
70412
|
+
}],
|
|
70251
70413
|
"deviceState.claimFields": [{
|
|
70252
70414
|
name: "deviceId",
|
|
70253
70415
|
form: "single",
|
|
@@ -70437,6 +70599,11 @@ Object.freeze({
|
|
|
70437
70599
|
form: "single",
|
|
70438
70600
|
optional: false
|
|
70439
70601
|
}],
|
|
70602
|
+
"keychain.deleteDeviceScope": [{
|
|
70603
|
+
name: "deviceId",
|
|
70604
|
+
form: "single",
|
|
70605
|
+
optional: false
|
|
70606
|
+
}],
|
|
70440
70607
|
"lawnMowerControl.dock": [{
|
|
70441
70608
|
name: "deviceId",
|
|
70442
70609
|
form: "single",
|
|
@@ -72785,6 +72952,8 @@ new Set([
|
|
|
72785
72952
|
"audio-tools",
|
|
72786
72953
|
"audio-silence"
|
|
72787
72954
|
]);
|
|
72955
|
+
AppPageLangSchema.options;
|
|
72956
|
+
record(string().min(1), string());
|
|
72788
72957
|
/**
|
|
72789
72958
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
72790
72959
|
*
|
|
@@ -73335,11 +73504,15 @@ function parseDisplayName(raw) {
|
|
|
73335
73504
|
if (name.length === 0) return { kind: "reset" };
|
|
73336
73505
|
if (CONTROL_CHARS.test(name)) return {
|
|
73337
73506
|
kind: "invalid",
|
|
73338
|
-
reason: "The name contains control characters."
|
|
73507
|
+
reason: "The name contains control characters.",
|
|
73508
|
+
code: "control",
|
|
73509
|
+
length: name.length
|
|
73339
73510
|
};
|
|
73340
73511
|
if (name.length > 80) return {
|
|
73341
73512
|
kind: "invalid",
|
|
73342
|
-
reason: `The name is ${name.length} characters long; the limit is 80
|
|
73513
|
+
reason: `The name is ${name.length} characters long; the limit is 80.`,
|
|
73514
|
+
code: "too-long",
|
|
73515
|
+
length: name.length
|
|
73343
73516
|
};
|
|
73344
73517
|
return {
|
|
73345
73518
|
kind: "set",
|