@camstack/addon-agent-ui 1.2.235 → 1.2.236
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 +174 -5
- package/dist/assets/MaskShapeCanvas-BTvl6Rin.js +33 -0
- package/dist/assets/MotionZonesSettings-BmNn3_sj.js +1 -0
- package/dist/assets/PrivacyMaskSettings-C6O52l13.js +1 -0
- package/dist/assets/SceneMonitorEditor-BLRix0YP.js +1 -0
- package/dist/assets/index-3tuhc4zx.js +112 -0
- package/dist/assets/index-CfJM7zHb.css +2 -0
- package/dist/assets/{scheduler-mSeF_D00.js → scheduler-0XZJE03d.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/MaskShapeCanvas-u4Ka7P5T.js +0 -33
- package/dist/assets/MotionZonesSettings-D_eS8B8X.js +0 -1
- package/dist/assets/PrivacyMaskSettings-D_-8lP1W.js +0 -1
- package/dist/assets/SceneMonitorEditor-wWE2ZCRb.js +0 -1
- package/dist/assets/index-B3_9Aedf.css +0 -2
- package/dist/assets/index-CYjtqVWq.js +0 -112
package/dist/addon.js
CHANGED
|
@@ -5388,7 +5388,7 @@ var ZodIssueCode = {
|
|
|
5388
5388
|
var ZodFirstPartyTypeKind;
|
|
5389
5389
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5390
5390
|
//#endregion
|
|
5391
|
-
//#region ../types/dist/sleep-
|
|
5391
|
+
//#region ../types/dist/sleep-DRqxtc0C.mjs
|
|
5392
5392
|
/**
|
|
5393
5393
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5394
5394
|
* window to float samples (D455).
|
|
@@ -8174,8 +8174,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
8174
8174
|
kind: "mutation",
|
|
8175
8175
|
auth: "admin"
|
|
8176
8176
|
}), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
8177
|
+
object({
|
|
8178
|
+
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
8179
|
+
params: record(string(), union([string(), number()])).optional()
|
|
8180
|
+
});
|
|
8177
8181
|
//#endregion
|
|
8178
|
-
//#region ../types/dist/err-msg-
|
|
8182
|
+
//#region ../types/dist/err-msg-DLerKiVO.mjs
|
|
8179
8183
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
8180
8184
|
DeviceType["Camera"] = "camera";
|
|
8181
8185
|
DeviceType["Hub"] = "hub";
|
|
@@ -8425,6 +8429,22 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8425
8429
|
DeviceRole["Nightvision"] = "nightvision";
|
|
8426
8430
|
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
8427
8431
|
DeviceRole["Doorbell"] = "doorbell";
|
|
8432
|
+
/** Interior blind / shade / roller blind. HA `device_class: blind|shade`. */
|
|
8433
|
+
DeviceRole["CoverBlind"] = "cover-blind";
|
|
8434
|
+
/** Exterior roller shutter. HA `device_class: shutter`; Homematic BROLL. */
|
|
8435
|
+
DeviceRole["CoverShutter"] = "cover-shutter";
|
|
8436
|
+
/** Exterior awning. HA `device_class: awning`. */
|
|
8437
|
+
DeviceRole["CoverAwning"] = "cover-awning";
|
|
8438
|
+
/** Curtain / drape. HA `device_class: curtain`. */
|
|
8439
|
+
DeviceRole["CoverCurtain"] = "cover-curtain";
|
|
8440
|
+
/** Garage door. HA `device_class: garage`. A security actuator: exports gate it. */
|
|
8441
|
+
DeviceRole["CoverGarage"] = "cover-garage";
|
|
8442
|
+
/** Gate. HA `device_class: gate`. A security actuator: exports gate it. */
|
|
8443
|
+
DeviceRole["CoverGate"] = "cover-gate";
|
|
8444
|
+
/** Door. HA `device_class: door`. A security actuator: exports gate it. */
|
|
8445
|
+
DeviceRole["CoverDoor"] = "cover-door";
|
|
8446
|
+
/** Window. HA `device_class: window`. */
|
|
8447
|
+
DeviceRole["CoverWindow"] = "cover-window";
|
|
8428
8448
|
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
8429
8449
|
* real Switch device for UI rendering / export adapters. */
|
|
8430
8450
|
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
@@ -8495,7 +8515,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
8495
8515
|
return DeviceRole;
|
|
8496
8516
|
}({});
|
|
8497
8517
|
//#endregion
|
|
8498
|
-
//#region ../types/dist/composition-
|
|
8518
|
+
//#region ../types/dist/composition-EQ9Ok0Ee.mjs
|
|
8499
8519
|
/**
|
|
8500
8520
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8501
8521
|
*
|
|
@@ -12172,7 +12192,8 @@ var ConvertResultSchema = object({
|
|
|
12172
12192
|
})).readonly()
|
|
12173
12193
|
});
|
|
12174
12194
|
_enum(["new-session", "step-up"]);
|
|
12175
|
-
|
|
12195
|
+
/** The languages the hub's app landing pages are written in (D858). */
|
|
12196
|
+
var AppPageLangSchema = _enum(["en", "it"]);
|
|
12176
12197
|
/** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
|
|
12177
12198
|
var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
|
|
12178
12199
|
kind: literal("browser"),
|
|
@@ -12669,7 +12690,9 @@ var ConfigTabDeclarationSchema = object({
|
|
|
12669
12690
|
var ConfigSectionWithValuesSchema = object({
|
|
12670
12691
|
id: string(),
|
|
12671
12692
|
title: string(),
|
|
12693
|
+
titleKey: string().optional(),
|
|
12672
12694
|
description: string().optional(),
|
|
12695
|
+
descriptionKey: string().optional(),
|
|
12673
12696
|
style: _enum(["card", "accordion"]).optional(),
|
|
12674
12697
|
defaultCollapsed: boolean().optional(),
|
|
12675
12698
|
columns: union([
|
|
@@ -15895,6 +15918,9 @@ method(object({
|
|
|
15895
15918
|
}), method(object({ refs: RefListSchema }), KeychainResolveResultSchema, { auth: "admin" }), method(object({ refs: RefListSchema }), object({ deleted: number().int() }), {
|
|
15896
15919
|
kind: "mutation",
|
|
15897
15920
|
auth: "admin"
|
|
15921
|
+
}), method(object({ deviceId: number().int() }), object({ refs: array(string()).readonly() }), {
|
|
15922
|
+
kind: "mutation",
|
|
15923
|
+
auth: "admin"
|
|
15898
15924
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15899
15925
|
/**
|
|
15900
15926
|
* device-history — the ONE mechanism for numeric history (D850).
|
|
@@ -37298,6 +37324,38 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
37298
37324
|
* omits it and the keyword backstop applies. */
|
|
37299
37325
|
secretConfigPaths: array(string()).optional()
|
|
37300
37326
|
});
|
|
37327
|
+
/** One deleted device, kept by device-manager so an addon that missed the
|
|
37328
|
+
* deletion can still learn of it (D865). Written by the delete path ONLY. */
|
|
37329
|
+
var DeviceTombstoneSchema = object({
|
|
37330
|
+
deviceId: number().int().positive(),
|
|
37331
|
+
/** Epoch ms the device was deleted. */
|
|
37332
|
+
deletedAt: number(),
|
|
37333
|
+
/** The addon that owned the device when it was deleted. */
|
|
37334
|
+
providerAddonId: string()
|
|
37335
|
+
});
|
|
37336
|
+
/** Data held for one device that device-manager no longer knows. */
|
|
37337
|
+
var OrphanDeviceDataSchema = object({
|
|
37338
|
+
deviceId: number().int().positive(),
|
|
37339
|
+
/** Rows/files per store (`<addonId>:<store>`). */
|
|
37340
|
+
stores: record(string(), number().int().nonnegative())
|
|
37341
|
+
});
|
|
37342
|
+
var CleanupDeletedDevicesResultSchema = object({
|
|
37343
|
+
/**
|
|
37344
|
+
* `skipped` — the absence check could not be trusted (a device-list read
|
|
37345
|
+
* failed or the two reads disagreed); nothing was listed or deleted.
|
|
37346
|
+
* `dry-run` — `devices` is what a confirmed run would delete.
|
|
37347
|
+
* `cleaned` — `devices` is what was deleted.
|
|
37348
|
+
*/
|
|
37349
|
+
status: _enum([
|
|
37350
|
+
"skipped",
|
|
37351
|
+
"dry-run",
|
|
37352
|
+
"cleaned"
|
|
37353
|
+
]),
|
|
37354
|
+
reason: string().nullable(),
|
|
37355
|
+
devices: array(OrphanDeviceDataSchema),
|
|
37356
|
+
/** Implementers that could not be asked (their stores are not in `devices`). */
|
|
37357
|
+
unreachable: array(string())
|
|
37358
|
+
});
|
|
37301
37359
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
37302
37360
|
var DevicePersistConfigPayloadSchema = object({
|
|
37303
37361
|
deviceId: number(),
|
|
@@ -37536,6 +37594,9 @@ method(object({
|
|
|
37536
37594
|
}), method(object({ deviceId: number() }), object({ success: literal(true) }), {
|
|
37537
37595
|
kind: "mutation",
|
|
37538
37596
|
auth: "admin"
|
|
37597
|
+
}), method(object({ sinceMs: number() }), array(DeviceTombstoneSchema).readonly(), { auth: "admin" }), method(object({ confirm: boolean() }), CleanupDeletedDevicesResultSchema, {
|
|
37598
|
+
kind: "mutation",
|
|
37599
|
+
auth: "admin"
|
|
37539
37600
|
}), method(object({ integrationId: string() }), object({ removed: number() }), {
|
|
37540
37601
|
kind: "mutation",
|
|
37541
37602
|
auth: "admin"
|
|
@@ -37998,6 +38059,72 @@ method(object({
|
|
|
37998
38059
|
auth: "admin"
|
|
37999
38060
|
});
|
|
38000
38061
|
/**
|
|
38062
|
+
* `device-removal-hook` — the reliable way an addon learns a device was DELETED,
|
|
38063
|
+
* so it can delete what it keeps for that device (D865).
|
|
38064
|
+
*
|
|
38065
|
+
* ## Why an event was not enough
|
|
38066
|
+
*
|
|
38067
|
+
* `DeviceUnregistered` is telemetry and may be dropped (D8, D11). An addon that
|
|
38068
|
+
* hung its per-device clean-up on it left durable garbage whenever the event was
|
|
38069
|
+
* lost, the addon was down, or it was restarting at that moment — footage,
|
|
38070
|
+
* analytics rows and settings of device 4483 outlived the device. Loss of this
|
|
38071
|
+
* signal corrupts durable state, so it travels by RPC with a recorded fact
|
|
38072
|
+
* behind it (D8: "if loss would corrupt durable state, use RPC plus a reconcile").
|
|
38073
|
+
*
|
|
38074
|
+
* ## The three pieces
|
|
38075
|
+
*
|
|
38076
|
+
* 1. device-manager records a TOMBSTONE per deleted device
|
|
38077
|
+
* (`deviceManager.listDeletedSince`). The tombstone is written by the delete
|
|
38078
|
+
* path only — a device that is unregistered, offline or whose provider is
|
|
38079
|
+
* restarting is NOT deleted and gets none.
|
|
38080
|
+
* 2. After a delete, device-manager calls `onDeviceRemoved` on EVERY provider of
|
|
38081
|
+
* this collection, one by one, with bounded retries, logged.
|
|
38082
|
+
* 3. An implementer that was down asks `deviceManager.listDeletedSince` at start
|
|
38083
|
+
* (and periodically) and runs its own `onDeviceRemoved` for each tombstone it
|
|
38084
|
+
* may have missed. Reconcile is driven by tombstones, never by "the device is
|
|
38085
|
+
* not in the current list": a failed or partial list read must not destroy data.
|
|
38086
|
+
*
|
|
38087
|
+
* ## Contract for an implementer
|
|
38088
|
+
*
|
|
38089
|
+
* - **Idempotent.** It is called again by a retry, by a reconcile and by the
|
|
38090
|
+
* admin cleanup of data that predates tombstones. A device with nothing left
|
|
38091
|
+
* answers zero counts.
|
|
38092
|
+
* - **One key per store** in `counts`, deleted rows/files per store, so the log
|
|
38093
|
+
* line and the admin dry run can say where the data was.
|
|
38094
|
+
* - **Training datasets are NOT device data** and are never deleted by a hook.
|
|
38095
|
+
* - **Per-device SETTINGS are not hooked.** Configuration lives in the standard
|
|
38096
|
+
* per-device store (`ctx.settings.*DeviceStore`), which device-manager clears
|
|
38097
|
+
* for every addon centrally at delete time. This hook is for device DATA
|
|
38098
|
+
* that is not settings: footage, event media, analytics rows, history.
|
|
38099
|
+
* - A provider that cannot tell is allowed to throw; the caller retries it.
|
|
38100
|
+
*
|
|
38101
|
+
* `listDeviceData` is the read side of the admin "Clean data of deleted devices"
|
|
38102
|
+
* action: which device ids this addon holds data for, and how much per store. It
|
|
38103
|
+
* never deletes. device-manager decides which of those ids are absent from the
|
|
38104
|
+
* fleet, from TWO consistent reads of the device list (D49).
|
|
38105
|
+
*/
|
|
38106
|
+
/** What a hook is told about the deletion. */
|
|
38107
|
+
var DeviceRemovedInputSchema = object({
|
|
38108
|
+
deviceId: number().int().positive(),
|
|
38109
|
+
/** Epoch ms the device was deleted (the tombstone's `deletedAt`). */
|
|
38110
|
+
deletedAt: number(),
|
|
38111
|
+
/** The addon that owned the device, as device-manager last knew it. */
|
|
38112
|
+
providerAddonId: string()
|
|
38113
|
+
});
|
|
38114
|
+
/** Rows/files/refs deleted, per store this implementer owns. */
|
|
38115
|
+
var DeviceRemovedResultSchema = object({ counts: record(string(), number().int().nonnegative()) });
|
|
38116
|
+
/** One (store, device) pair an implementer holds data for. */
|
|
38117
|
+
var DeviceDataEntrySchema = object({
|
|
38118
|
+
store: string(),
|
|
38119
|
+
deviceId: number().int().positive(),
|
|
38120
|
+
/** Rows (or files) held for the device in the store. */
|
|
38121
|
+
count: number().int().nonnegative()
|
|
38122
|
+
});
|
|
38123
|
+
method(DeviceRemovedInputSchema, DeviceRemovedResultSchema, {
|
|
38124
|
+
kind: "mutation",
|
|
38125
|
+
auth: "admin"
|
|
38126
|
+
}), method(_void(), array(DeviceDataEntrySchema).readonly(), { auth: "admin" });
|
|
38127
|
+
/**
|
|
38001
38128
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
38002
38129
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
38003
38130
|
*
|
|
@@ -62497,6 +62624,12 @@ Object.freeze({
|
|
|
62497
62624
|
addonId: null,
|
|
62498
62625
|
access: "create"
|
|
62499
62626
|
},
|
|
62627
|
+
"deviceManager.cleanupDeletedDevicesData": {
|
|
62628
|
+
capName: "device-manager",
|
|
62629
|
+
capScope: "system",
|
|
62630
|
+
addonId: null,
|
|
62631
|
+
access: "create"
|
|
62632
|
+
},
|
|
62500
62633
|
"deviceManager.createDevice": {
|
|
62501
62634
|
capName: "device-manager",
|
|
62502
62635
|
capScope: "system",
|
|
@@ -62677,6 +62810,12 @@ Object.freeze({
|
|
|
62677
62810
|
addonId: null,
|
|
62678
62811
|
access: "view"
|
|
62679
62812
|
},
|
|
62813
|
+
"deviceManager.listDeletedSince": {
|
|
62814
|
+
capName: "device-manager",
|
|
62815
|
+
capScope: "system",
|
|
62816
|
+
addonId: null,
|
|
62817
|
+
access: "view"
|
|
62818
|
+
},
|
|
62680
62819
|
"deviceManager.listDeviceIdsByCaps": {
|
|
62681
62820
|
capName: "device-manager",
|
|
62682
62821
|
capScope: "system",
|
|
@@ -63085,6 +63224,18 @@ Object.freeze({
|
|
|
63085
63224
|
addonId: null,
|
|
63086
63225
|
access: "create"
|
|
63087
63226
|
},
|
|
63227
|
+
"deviceRemovalHook.listDeviceData": {
|
|
63228
|
+
capName: "device-removal-hook",
|
|
63229
|
+
capScope: "system",
|
|
63230
|
+
addonId: null,
|
|
63231
|
+
access: "view"
|
|
63232
|
+
},
|
|
63233
|
+
"deviceRemovalHook.onDeviceRemoved": {
|
|
63234
|
+
capName: "device-removal-hook",
|
|
63235
|
+
capScope: "system",
|
|
63236
|
+
addonId: null,
|
|
63237
|
+
access: "create"
|
|
63238
|
+
},
|
|
63088
63239
|
"deviceState.claimFields": {
|
|
63089
63240
|
capName: "device-state",
|
|
63090
63241
|
capScope: "system",
|
|
@@ -63517,6 +63668,12 @@ Object.freeze({
|
|
|
63517
63668
|
addonId: null,
|
|
63518
63669
|
access: "delete"
|
|
63519
63670
|
},
|
|
63671
|
+
"keychain.deleteDeviceScope": {
|
|
63672
|
+
capName: "keychain",
|
|
63673
|
+
capScope: "system",
|
|
63674
|
+
addonId: null,
|
|
63675
|
+
access: "delete"
|
|
63676
|
+
},
|
|
63520
63677
|
"keychain.getState": {
|
|
63521
63678
|
capName: "keychain",
|
|
63522
63679
|
capScope: "system",
|
|
@@ -69529,6 +69686,11 @@ Object.freeze({
|
|
|
69529
69686
|
form: "single",
|
|
69530
69687
|
optional: false
|
|
69531
69688
|
}],
|
|
69689
|
+
"deviceRemovalHook.onDeviceRemoved": [{
|
|
69690
|
+
name: "deviceId",
|
|
69691
|
+
form: "single",
|
|
69692
|
+
optional: false
|
|
69693
|
+
}],
|
|
69532
69694
|
"deviceState.claimFields": [{
|
|
69533
69695
|
name: "deviceId",
|
|
69534
69696
|
form: "single",
|
|
@@ -69718,6 +69880,11 @@ Object.freeze({
|
|
|
69718
69880
|
form: "single",
|
|
69719
69881
|
optional: false
|
|
69720
69882
|
}],
|
|
69883
|
+
"keychain.deleteDeviceScope": [{
|
|
69884
|
+
name: "deviceId",
|
|
69885
|
+
form: "single",
|
|
69886
|
+
optional: false
|
|
69887
|
+
}],
|
|
69721
69888
|
"lawnMowerControl.dock": [{
|
|
69722
69889
|
name: "deviceId",
|
|
69723
69890
|
form: "single",
|
|
@@ -72066,6 +72233,8 @@ new Set([
|
|
|
72066
72233
|
"audio-tools",
|
|
72067
72234
|
"audio-silence"
|
|
72068
72235
|
]);
|
|
72236
|
+
AppPageLangSchema.options;
|
|
72237
|
+
record(string().min(1), string());
|
|
72069
72238
|
/**
|
|
72070
72239
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
72071
72240
|
*
|
|
@@ -72501,7 +72670,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
72501
72670
|
capability: adminUiCapability,
|
|
72502
72671
|
provider: {
|
|
72503
72672
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
72504
|
-
getVersion: async () => ({ version: "1.2.
|
|
72673
|
+
getVersion: async () => ({ version: "1.2.236" })
|
|
72505
72674
|
}
|
|
72506
72675
|
}];
|
|
72507
72676
|
}
|