@camstack/addon-terminal 0.1.146 → 0.1.148
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 +237 -61
- package/dist/addon.mjs +237 -61
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -31,7 +31,7 @@ let node_module = require("node:module");
|
|
|
31
31
|
let sharp = require("sharp");
|
|
32
32
|
sharp = __toESM(sharp);
|
|
33
33
|
let node_http = require("node:http");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-BfJwUd2S.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -348,6 +348,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
348
348
|
*/
|
|
349
349
|
EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
|
|
350
350
|
/**
|
|
351
|
+
* A camera's motion source has fired constantly with no subject for an hour
|
|
352
|
+
* (motion duty or session count over the bar, zero detections) — it is not
|
|
353
|
+
* blind, its motion zones or sensitivity want tuning (D907). Paired with
|
|
354
|
+
* {@link PipelineMotionCalm}.
|
|
355
|
+
*/
|
|
356
|
+
EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
|
|
357
|
+
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
358
|
+
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
359
|
+
/**
|
|
351
360
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
352
361
|
* (3-level settings change via `setAgentAddonDefaults` /
|
|
353
362
|
* `setCameraStepToggle` / `setCameraPipelineForAgent` or a
|
|
@@ -719,6 +728,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
719
728
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
720
729
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
721
730
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
731
|
+
/**
|
|
732
|
+
* A notification rule that cannot work (D905): its stored row does not load,
|
|
733
|
+
* or it still names a device / delivery target the prune CONFIRMED deleted.
|
|
734
|
+
* One edge per rule per distinct set of reasons; never on an unanswered read.
|
|
735
|
+
*/
|
|
736
|
+
EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
|
|
737
|
+
/** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
|
|
738
|
+
EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
|
|
722
739
|
EventCategory["DeviceUpdated"] = "device.updated";
|
|
723
740
|
/**
|
|
724
741
|
* Transport-level connectivity. Emitted by the device driver when
|
|
@@ -5446,7 +5463,7 @@ var ZodIssueCode = {
|
|
|
5446
5463
|
var ZodFirstPartyTypeKind;
|
|
5447
5464
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5448
5465
|
//#endregion
|
|
5449
|
-
//#region ../types/dist/sleep-
|
|
5466
|
+
//#region ../types/dist/sleep-DJFUfKvA.mjs
|
|
5450
5467
|
/**
|
|
5451
5468
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5452
5469
|
* window to float samples (D455).
|
|
@@ -7975,7 +7992,7 @@ var EntryDescriptorSchema = object({
|
|
|
7975
7992
|
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7976
7993
|
fields: record(string(), unknown())
|
|
7977
7994
|
}).strict();
|
|
7978
|
-
/** What crosses the wire
|
|
7995
|
+
/** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
|
|
7979
7996
|
var RecordKindDeclarationSchema = object({
|
|
7980
7997
|
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7981
7998
|
class: _enum(RECORD_CLASSES),
|
|
@@ -7994,14 +8011,6 @@ var RecordKindDeclarationSchema = object({
|
|
|
7994
8011
|
secretPaths: array(string().min(1)).default([]),
|
|
7995
8012
|
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7996
8013
|
secretArrayKeys: record(string(), string()).default({}),
|
|
7997
|
-
/**
|
|
7998
|
-
* RETIRED (D900): the legacy table a kind adopted from during the records
|
|
7999
|
-
* migration. Nothing declares it any more and nothing reads it; the schema
|
|
8000
|
-
* still ACCEPTS it because the catalog rows the migration wrote carry it
|
|
8001
|
-
* (an orphaned kind is never redeclared) and an addon built before the
|
|
8002
|
-
* removal still sends it. Never set it.
|
|
8003
|
-
*/
|
|
8004
|
-
adoptsFrom: string().min(1).optional(),
|
|
8005
8014
|
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
8006
8015
|
transactFamily: string().min(1).optional(),
|
|
8007
8016
|
entry: EntryDescriptorSchema.optional()
|
|
@@ -12770,17 +12779,6 @@ object({
|
|
|
12770
12779
|
createdAt: number(),
|
|
12771
12780
|
updatedAt: number()
|
|
12772
12781
|
});
|
|
12773
|
-
object({
|
|
12774
|
-
id: string(),
|
|
12775
|
-
label: string(),
|
|
12776
|
-
isAdmin: boolean().default(false),
|
|
12777
|
-
allowedProviders: AllowedProviderSchema,
|
|
12778
|
-
allowedDevices: AllowedDevicesSchema,
|
|
12779
|
-
tokenHash: string(),
|
|
12780
|
-
tokenPrefix: string(),
|
|
12781
|
-
createdAt: number(),
|
|
12782
|
-
lastUsedAt: number().optional()
|
|
12783
|
-
});
|
|
12784
12782
|
object({
|
|
12785
12783
|
id: string(),
|
|
12786
12784
|
userId: string(),
|
|
@@ -16762,16 +16760,36 @@ var RecordKindStateSchema = _enum([
|
|
|
16762
16760
|
var DeclareKindResultSchema = object({
|
|
16763
16761
|
kindId: number().int(),
|
|
16764
16762
|
state: RecordKindStateSchema,
|
|
16765
|
-
createdIndexes: array(string())
|
|
16766
|
-
/**
|
|
16767
|
-
* RETIRED (D900): always `null`. It carried the records-migration boot guard;
|
|
16768
|
-
* it stays on the wire, null, because an addon built before the removal reads
|
|
16769
|
-
* an ABSENT field as "adoption pending" and refuses to start.
|
|
16770
|
-
*/
|
|
16771
|
-
adoptionPending: _null()
|
|
16763
|
+
createdIndexes: array(string())
|
|
16772
16764
|
});
|
|
16773
16765
|
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16774
16766
|
var SecretRefsList = array(string());
|
|
16767
|
+
/**
|
|
16768
|
+
* One op of a `transact`: the single-row writes, each on a kind of the caller.
|
|
16769
|
+
* All ops of one call share ONE database file and ONE `transactFamily`.
|
|
16770
|
+
*/
|
|
16771
|
+
var RecordTransactOpSchema = discriminatedUnion("op", [
|
|
16772
|
+
object({
|
|
16773
|
+
op: literal("put"),
|
|
16774
|
+
kind: RecordKindNameSchema,
|
|
16775
|
+
record: RecordInputSchema,
|
|
16776
|
+
ifRev: number().int().min(0).optional()
|
|
16777
|
+
}),
|
|
16778
|
+
object({
|
|
16779
|
+
op: literal("patch"),
|
|
16780
|
+
kind: RecordKindNameSchema,
|
|
16781
|
+
id: RecordIdSchema,
|
|
16782
|
+
data: RecordBodySchema,
|
|
16783
|
+
at: number().int().nullable().optional(),
|
|
16784
|
+
expiresAt: number().int().nullable().optional(),
|
|
16785
|
+
ifRev: number().int().min(1).optional()
|
|
16786
|
+
}),
|
|
16787
|
+
object({
|
|
16788
|
+
op: literal("delete"),
|
|
16789
|
+
kind: RecordKindNameSchema,
|
|
16790
|
+
id: RecordIdSchema
|
|
16791
|
+
})
|
|
16792
|
+
]);
|
|
16775
16793
|
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16776
16794
|
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16777
16795
|
kind: "mutation",
|
|
@@ -16878,6 +16896,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
|
|
|
16878
16896
|
}), {
|
|
16879
16897
|
kind: "mutation",
|
|
16880
16898
|
auth: "admin"
|
|
16899
|
+
}), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
|
|
16900
|
+
results: array(object({
|
|
16901
|
+
rev: number().int().nullable(),
|
|
16902
|
+
deleted: boolean()
|
|
16903
|
+
})),
|
|
16904
|
+
releasedRefs: SecretRefsList,
|
|
16905
|
+
secretRefs: SecretRefsList
|
|
16906
|
+
}), {
|
|
16907
|
+
kind: "mutation",
|
|
16908
|
+
auth: "admin"
|
|
16881
16909
|
}), method(object({
|
|
16882
16910
|
deviceId: number().int(),
|
|
16883
16911
|
kinds: array(RecordKindNameSchema).optional()
|
|
@@ -42391,9 +42419,13 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42391
42419
|
"node-updating",
|
|
42392
42420
|
"node-inference-unavailable",
|
|
42393
42421
|
"detection-blind",
|
|
42422
|
+
"motion-noisy",
|
|
42423
|
+
"motion-calm",
|
|
42394
42424
|
"recording-stalled",
|
|
42395
42425
|
"recording-healthy",
|
|
42396
42426
|
"recording-degraded",
|
|
42427
|
+
"device-attention-required",
|
|
42428
|
+
"device-attention-resolved",
|
|
42397
42429
|
"storage-location-low",
|
|
42398
42430
|
"storage-location-critical",
|
|
42399
42431
|
"storage-location-ok",
|
|
@@ -42417,6 +42449,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42417
42449
|
"alert-critical",
|
|
42418
42450
|
"alert-error",
|
|
42419
42451
|
"alert-critical-resolved",
|
|
42452
|
+
"rule-broken",
|
|
42453
|
+
"rule-repaired",
|
|
42420
42454
|
"camera-online",
|
|
42421
42455
|
"camera-offline",
|
|
42422
42456
|
"camera-disabled",
|
|
@@ -55863,6 +55897,16 @@ var DishwasherStatusSchema = object({
|
|
|
55863
55897
|
powerState: string().nullable(),
|
|
55864
55898
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55865
55899
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55900
|
+
/**
|
|
55901
|
+
* True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
|
|
55902
|
+
* combined care-and-filter reminder raised); false when every such reminder reads clear; null
|
|
55903
|
+
* when none is reported. A cleared reminder is not an unknown one.
|
|
55904
|
+
*/
|
|
55905
|
+
filterCleaningDue: boolean().nullable(),
|
|
55906
|
+
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
55907
|
+
machineCareDue: boolean().nullable(),
|
|
55908
|
+
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
55909
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
55866
55910
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55867
55911
|
halfLoad: boolean().nullable(),
|
|
55868
55912
|
hygienePlus: boolean().nullable(),
|
|
@@ -64513,16 +64557,6 @@ var UpdateUserInputSchema = object({
|
|
|
64513
64557
|
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64514
64558
|
scopes: array(TokenScopeSchema).optional()
|
|
64515
64559
|
});
|
|
64516
|
-
var ApiKeySummarySchema = object({
|
|
64517
|
-
id: string(),
|
|
64518
|
-
label: string(),
|
|
64519
|
-
isAdmin: boolean().default(false),
|
|
64520
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
64521
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64522
|
-
tokenPrefix: string(),
|
|
64523
|
-
createdAt: number(),
|
|
64524
|
-
lastUsedAt: number().optional()
|
|
64525
|
-
});
|
|
64526
64560
|
var OauthSessionSummarySchema = object({
|
|
64527
64561
|
id: string(),
|
|
64528
64562
|
userId: string(),
|
|
@@ -64544,8 +64578,7 @@ var TotpStatusSchema = object({
|
|
|
64544
64578
|
confirmedAt: number().nullable()
|
|
64545
64579
|
});
|
|
64546
64580
|
/**
|
|
64547
|
-
* user-management — singleton capability for user accounts
|
|
64548
|
-
* legacy API-key rows.
|
|
64581
|
+
* user-management — singleton capability for user accounts.
|
|
64549
64582
|
*
|
|
64550
64583
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64551
64584
|
* — the subset check on `setUserScopes` is moot
|
|
@@ -64601,10 +64634,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64601
64634
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
64602
64635
|
kind: "mutation",
|
|
64603
64636
|
access: "view"
|
|
64604
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
64605
|
-
kind: "mutation",
|
|
64606
|
-
auth: "admin",
|
|
64607
|
-
access: "delete"
|
|
64608
64637
|
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
64609
64638
|
kind: "mutation",
|
|
64610
64639
|
auth: "admin",
|
|
@@ -73577,6 +73606,12 @@ Object.freeze({
|
|
|
73577
73606
|
addonId: null,
|
|
73578
73607
|
access: "view"
|
|
73579
73608
|
},
|
|
73609
|
+
"records.transact": {
|
|
73610
|
+
capName: "records",
|
|
73611
|
+
capScope: "system",
|
|
73612
|
+
addonId: null,
|
|
73613
|
+
access: "create"
|
|
73614
|
+
},
|
|
73580
73615
|
"sceneMonitor.captureReference": {
|
|
73581
73616
|
capName: "scene-monitor",
|
|
73582
73617
|
capScope: "device",
|
|
@@ -74909,12 +74944,6 @@ Object.freeze({
|
|
|
74909
74944
|
addonId: null,
|
|
74910
74945
|
access: "view"
|
|
74911
74946
|
},
|
|
74912
|
-
"userManagement.listApiKeys": {
|
|
74913
|
-
capName: "user-management",
|
|
74914
|
-
capScope: "system",
|
|
74915
|
-
addonId: null,
|
|
74916
|
-
access: "view"
|
|
74917
|
-
},
|
|
74918
74947
|
"userManagement.listExternalIdentities": {
|
|
74919
74948
|
capName: "user-management",
|
|
74920
74949
|
capScope: "system",
|
|
@@ -74969,12 +74998,6 @@ Object.freeze({
|
|
|
74969
74998
|
addonId: null,
|
|
74970
74999
|
access: "create"
|
|
74971
75000
|
},
|
|
74972
|
-
"userManagement.revokeApiKey": {
|
|
74973
|
-
capName: "user-management",
|
|
74974
|
-
capScope: "system",
|
|
74975
|
-
addonId: null,
|
|
74976
|
-
access: "delete"
|
|
74977
|
-
},
|
|
74978
75001
|
"userManagement.revokeOauthSession": {
|
|
74979
75002
|
capName: "user-management",
|
|
74980
75003
|
capScope: "system",
|
|
@@ -78339,9 +78362,13 @@ new Map(Object.entries({
|
|
|
78339
78362
|
"stream-online": "device-events",
|
|
78340
78363
|
"stream-offline": "device-events",
|
|
78341
78364
|
"detection-blind": "device-events",
|
|
78365
|
+
"motion-noisy": "device-events",
|
|
78366
|
+
"motion-calm": "device-events",
|
|
78342
78367
|
"recording-stalled": "device-events",
|
|
78343
78368
|
"recording-healthy": "device-events",
|
|
78344
78369
|
"recording-degraded": "device-events",
|
|
78370
|
+
"device-attention-required": "device-events",
|
|
78371
|
+
"device-attention-resolved": "device-events",
|
|
78345
78372
|
"node-online": "system",
|
|
78346
78373
|
"node-offline": "system",
|
|
78347
78374
|
"node-restarting": "system",
|
|
@@ -78358,6 +78385,8 @@ new Map(Object.entries({
|
|
|
78358
78385
|
"alert-critical": "system",
|
|
78359
78386
|
"alert-error": "system",
|
|
78360
78387
|
"alert-critical-resolved": "system",
|
|
78388
|
+
"rule-broken": "system",
|
|
78389
|
+
"rule-repaired": "system",
|
|
78361
78390
|
"storage-location-low": "system",
|
|
78362
78391
|
"storage-location-critical": "system",
|
|
78363
78392
|
"storage-location-ok": "system",
|
|
@@ -78422,6 +78451,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78422
78451
|
label: "Detecting nothing",
|
|
78423
78452
|
kinds: ["detection-blind"]
|
|
78424
78453
|
},
|
|
78454
|
+
{
|
|
78455
|
+
id: "motion-noise",
|
|
78456
|
+
family: "device-events",
|
|
78457
|
+
label: "Motion without a subject",
|
|
78458
|
+
kinds: ["motion-noisy", "motion-calm"]
|
|
78459
|
+
},
|
|
78425
78460
|
{
|
|
78426
78461
|
id: "recording",
|
|
78427
78462
|
family: "device-events",
|
|
@@ -78432,6 +78467,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78432
78467
|
"recording-degraded"
|
|
78433
78468
|
]
|
|
78434
78469
|
},
|
|
78470
|
+
{
|
|
78471
|
+
id: "device-attention",
|
|
78472
|
+
family: "device-events",
|
|
78473
|
+
label: "Needs attention",
|
|
78474
|
+
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
78475
|
+
},
|
|
78435
78476
|
{
|
|
78436
78477
|
id: "nodes",
|
|
78437
78478
|
family: "system",
|
|
@@ -78492,6 +78533,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78492
78533
|
"alert-critical-resolved"
|
|
78493
78534
|
]
|
|
78494
78535
|
},
|
|
78536
|
+
{
|
|
78537
|
+
id: "rule-health",
|
|
78538
|
+
family: "system",
|
|
78539
|
+
label: "Notification rules",
|
|
78540
|
+
kinds: ["rule-broken", "rule-repaired"]
|
|
78541
|
+
},
|
|
78495
78542
|
{
|
|
78496
78543
|
id: "alarm",
|
|
78497
78544
|
family: "alarm",
|
|
@@ -78565,6 +78612,7 @@ var ALERT_EPISODE = [
|
|
|
78565
78612
|
"alert-error",
|
|
78566
78613
|
"alert-critical-resolved"
|
|
78567
78614
|
];
|
|
78615
|
+
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
78568
78616
|
var UPDATES = [
|
|
78569
78617
|
"addon-update-available",
|
|
78570
78618
|
"server-update-available",
|
|
@@ -78594,9 +78642,12 @@ var DEVICE_EVENTS = [
|
|
|
78594
78642
|
"stream-online",
|
|
78595
78643
|
"stream-offline",
|
|
78596
78644
|
"detection-blind",
|
|
78645
|
+
"motion-noisy",
|
|
78646
|
+
"motion-calm",
|
|
78597
78647
|
"recording-stalled",
|
|
78598
78648
|
"recording-healthy",
|
|
78599
78649
|
"recording-degraded",
|
|
78650
|
+
...DEVICE_ATTENTION,
|
|
78600
78651
|
...ALARM
|
|
78601
78652
|
];
|
|
78602
78653
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -78764,7 +78815,13 @@ var STATE_SUMMARY_VARS = [
|
|
|
78764
78815
|
[...RULE_TEXT],
|
|
78765
78816
|
[...RULE_TEXT],
|
|
78766
78817
|
[...RULE_TEXT],
|
|
78767
|
-
|
|
78818
|
+
[...RULE_TEXT],
|
|
78819
|
+
[...RULE_TEXT],
|
|
78820
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78821
|
+
[...RULE_TEXT],
|
|
78822
|
+
[...RULE_TEXT],
|
|
78823
|
+
[...RULE_TEXT],
|
|
78824
|
+
[...RULE_TEXT],
|
|
78768
78825
|
[...RULE_TEXT],
|
|
78769
78826
|
[...RULE_TEXT],
|
|
78770
78827
|
[...RULE_TEXT],
|
|
@@ -78782,11 +78839,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78782
78839
|
[...RULE_TEXT],
|
|
78783
78840
|
[...RULE_TEXT],
|
|
78784
78841
|
[...RULE_TEXT],
|
|
78842
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78785
78843
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78844
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78786
78845
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78787
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78788
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78789
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78846
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78790
78847
|
[...RULE_TEXT],
|
|
78791
78848
|
[...RULE_TEXT],
|
|
78792
78849
|
[...RULE_TEXT],
|
|
@@ -78807,6 +78864,125 @@ var STATE_SUMMARY_VARS = [
|
|
|
78807
78864
|
[...RULE_TEXT],
|
|
78808
78865
|
...STATE_SUMMARY_VARS
|
|
78809
78866
|
];
|
|
78867
|
+
new Map([
|
|
78868
|
+
{
|
|
78869
|
+
id: "device-connectivity",
|
|
78870
|
+
family: "device-events",
|
|
78871
|
+
label: "Device connectivity (offline / back online)",
|
|
78872
|
+
bad: ["device-offline"],
|
|
78873
|
+
recovery: ["device-online"],
|
|
78874
|
+
snapshotLabel: "Devices offline now",
|
|
78875
|
+
snapshotSection: "device-state"
|
|
78876
|
+
},
|
|
78877
|
+
{
|
|
78878
|
+
id: "device-switch",
|
|
78879
|
+
family: "device-events",
|
|
78880
|
+
label: "Device switched off / back on",
|
|
78881
|
+
bad: ["device-disabled"],
|
|
78882
|
+
recovery: ["device-enabled"],
|
|
78883
|
+
snapshotLabel: "Devices switched off now",
|
|
78884
|
+
snapshotSection: "device-state"
|
|
78885
|
+
},
|
|
78886
|
+
{
|
|
78887
|
+
id: "stream-connectivity",
|
|
78888
|
+
family: "device-events",
|
|
78889
|
+
label: "Stream connectivity (offline / back online)",
|
|
78890
|
+
bad: ["stream-offline"],
|
|
78891
|
+
recovery: ["stream-online"],
|
|
78892
|
+
snapshotLabel: "Streams offline now",
|
|
78893
|
+
snapshotSection: "streams"
|
|
78894
|
+
},
|
|
78895
|
+
{
|
|
78896
|
+
id: "battery",
|
|
78897
|
+
family: "device-events",
|
|
78898
|
+
label: "Battery (low / back to normal)",
|
|
78899
|
+
bad: ["device-battery-low"],
|
|
78900
|
+
recovery: ["device-battery-normal"],
|
|
78901
|
+
snapshotLabel: "Batteries low now",
|
|
78902
|
+
snapshotSection: "battery"
|
|
78903
|
+
},
|
|
78904
|
+
{
|
|
78905
|
+
id: "consumables",
|
|
78906
|
+
family: "device-events",
|
|
78907
|
+
label: "Consumables (low / replaced)",
|
|
78908
|
+
bad: ["device-consumable-low"],
|
|
78909
|
+
recovery: ["device-consumable-normal"],
|
|
78910
|
+
snapshotLabel: "Consumables low now",
|
|
78911
|
+
snapshotSection: "consumables"
|
|
78912
|
+
},
|
|
78913
|
+
{
|
|
78914
|
+
id: "tanks",
|
|
78915
|
+
family: "device-events",
|
|
78916
|
+
label: "Tanks (low or full / back to normal)",
|
|
78917
|
+
bad: ["device-tank-low", "device-tank-full"],
|
|
78918
|
+
recovery: ["device-tank-normal"],
|
|
78919
|
+
snapshotLabel: "Tanks low or full now",
|
|
78920
|
+
snapshotSection: "tanks"
|
|
78921
|
+
},
|
|
78922
|
+
{
|
|
78923
|
+
id: "motion-noise",
|
|
78924
|
+
family: "device-events",
|
|
78925
|
+
label: "Motion without a subject (constant / calm again)",
|
|
78926
|
+
bad: ["motion-noisy"],
|
|
78927
|
+
recovery: ["motion-calm"],
|
|
78928
|
+
snapshotLabel: "Cameras with constant motion now",
|
|
78929
|
+
snapshotSection: null
|
|
78930
|
+
},
|
|
78931
|
+
{
|
|
78932
|
+
id: "recording-health",
|
|
78933
|
+
family: "device-events",
|
|
78934
|
+
label: "Recording health (stalled or degraded / recording again)",
|
|
78935
|
+
bad: ["recording-stalled", "recording-degraded"],
|
|
78936
|
+
recovery: ["recording-healthy"],
|
|
78937
|
+
snapshotLabel: "Recordings stalled now",
|
|
78938
|
+
snapshotSection: null
|
|
78939
|
+
},
|
|
78940
|
+
{
|
|
78941
|
+
id: "device-attention",
|
|
78942
|
+
family: "device-events",
|
|
78943
|
+
label: "Device needs attention (raised / resolved)",
|
|
78944
|
+
bad: ["device-attention-required"],
|
|
78945
|
+
recovery: ["device-attention-resolved"],
|
|
78946
|
+
snapshotLabel: "Devices needing attention now",
|
|
78947
|
+
snapshotSection: null
|
|
78948
|
+
},
|
|
78949
|
+
{
|
|
78950
|
+
id: "node-connectivity",
|
|
78951
|
+
family: "system",
|
|
78952
|
+
label: "Node connectivity (offline / back online)",
|
|
78953
|
+
bad: ["node-offline"],
|
|
78954
|
+
recovery: ["node-online"],
|
|
78955
|
+
snapshotLabel: "Nodes offline now",
|
|
78956
|
+
snapshotSection: "nodes"
|
|
78957
|
+
},
|
|
78958
|
+
{
|
|
78959
|
+
id: "storage-space",
|
|
78960
|
+
family: "system",
|
|
78961
|
+
label: "Storage space (low or critical / ok again)",
|
|
78962
|
+
bad: ["storage-location-low", "storage-location-critical"],
|
|
78963
|
+
recovery: ["storage-location-ok"],
|
|
78964
|
+
snapshotLabel: "Storage locations low now",
|
|
78965
|
+
snapshotSection: null
|
|
78966
|
+
},
|
|
78967
|
+
{
|
|
78968
|
+
id: "critical-alerts",
|
|
78969
|
+
family: "system",
|
|
78970
|
+
label: "Critical alerts (raised / resolved)",
|
|
78971
|
+
bad: ["alert-critical"],
|
|
78972
|
+
recovery: ["alert-critical-resolved"],
|
|
78973
|
+
snapshotLabel: "Critical alerts open now",
|
|
78974
|
+
snapshotSection: null
|
|
78975
|
+
},
|
|
78976
|
+
{
|
|
78977
|
+
id: "rule-health",
|
|
78978
|
+
family: "system",
|
|
78979
|
+
label: "Rule health (broken / repaired)",
|
|
78980
|
+
bad: ["rule-broken"],
|
|
78981
|
+
recovery: ["rule-repaired"],
|
|
78982
|
+
snapshotLabel: "Notification rules broken now",
|
|
78983
|
+
snapshotSection: null
|
|
78984
|
+
}
|
|
78985
|
+
].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
|
|
78810
78986
|
new Set([
|
|
78811
78987
|
"disarmed",
|
|
78812
78988
|
"armed_home",
|
package/dist/addon.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { createServer } from "node:http";
|
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-BfJwUd2S.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -325,6 +325,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
325
325
|
*/
|
|
326
326
|
EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
|
|
327
327
|
/**
|
|
328
|
+
* A camera's motion source has fired constantly with no subject for an hour
|
|
329
|
+
* (motion duty or session count over the bar, zero detections) — it is not
|
|
330
|
+
* blind, its motion zones or sensitivity want tuning (D907). Paired with
|
|
331
|
+
* {@link PipelineMotionCalm}.
|
|
332
|
+
*/
|
|
333
|
+
EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
|
|
334
|
+
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
335
|
+
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
336
|
+
/**
|
|
328
337
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
329
338
|
* (3-level settings change via `setAgentAddonDefaults` /
|
|
330
339
|
* `setCameraStepToggle` / `setCameraPipelineForAgent` or a
|
|
@@ -696,6 +705,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
696
705
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
697
706
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
698
707
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
708
|
+
/**
|
|
709
|
+
* A notification rule that cannot work (D905): its stored row does not load,
|
|
710
|
+
* or it still names a device / delivery target the prune CONFIRMED deleted.
|
|
711
|
+
* One edge per rule per distinct set of reasons; never on an unanswered read.
|
|
712
|
+
*/
|
|
713
|
+
EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
|
|
714
|
+
/** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
|
|
715
|
+
EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
|
|
699
716
|
EventCategory["DeviceUpdated"] = "device.updated";
|
|
700
717
|
/**
|
|
701
718
|
* Transport-level connectivity. Emitted by the device driver when
|
|
@@ -5423,7 +5440,7 @@ var ZodIssueCode = {
|
|
|
5423
5440
|
var ZodFirstPartyTypeKind;
|
|
5424
5441
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5425
5442
|
//#endregion
|
|
5426
|
-
//#region ../types/dist/sleep-
|
|
5443
|
+
//#region ../types/dist/sleep-DJFUfKvA.mjs
|
|
5427
5444
|
/**
|
|
5428
5445
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5429
5446
|
* window to float samples (D455).
|
|
@@ -7952,7 +7969,7 @@ var EntryDescriptorSchema = object({
|
|
|
7952
7969
|
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7953
7970
|
fields: record(string(), unknown())
|
|
7954
7971
|
}).strict();
|
|
7955
|
-
/** What crosses the wire
|
|
7972
|
+
/** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
|
|
7956
7973
|
var RecordKindDeclarationSchema = object({
|
|
7957
7974
|
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7958
7975
|
class: _enum(RECORD_CLASSES),
|
|
@@ -7971,14 +7988,6 @@ var RecordKindDeclarationSchema = object({
|
|
|
7971
7988
|
secretPaths: array(string().min(1)).default([]),
|
|
7972
7989
|
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7973
7990
|
secretArrayKeys: record(string(), string()).default({}),
|
|
7974
|
-
/**
|
|
7975
|
-
* RETIRED (D900): the legacy table a kind adopted from during the records
|
|
7976
|
-
* migration. Nothing declares it any more and nothing reads it; the schema
|
|
7977
|
-
* still ACCEPTS it because the catalog rows the migration wrote carry it
|
|
7978
|
-
* (an orphaned kind is never redeclared) and an addon built before the
|
|
7979
|
-
* removal still sends it. Never set it.
|
|
7980
|
-
*/
|
|
7981
|
-
adoptsFrom: string().min(1).optional(),
|
|
7982
7991
|
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7983
7992
|
transactFamily: string().min(1).optional(),
|
|
7984
7993
|
entry: EntryDescriptorSchema.optional()
|
|
@@ -12747,17 +12756,6 @@ object({
|
|
|
12747
12756
|
createdAt: number(),
|
|
12748
12757
|
updatedAt: number()
|
|
12749
12758
|
});
|
|
12750
|
-
object({
|
|
12751
|
-
id: string(),
|
|
12752
|
-
label: string(),
|
|
12753
|
-
isAdmin: boolean().default(false),
|
|
12754
|
-
allowedProviders: AllowedProviderSchema,
|
|
12755
|
-
allowedDevices: AllowedDevicesSchema,
|
|
12756
|
-
tokenHash: string(),
|
|
12757
|
-
tokenPrefix: string(),
|
|
12758
|
-
createdAt: number(),
|
|
12759
|
-
lastUsedAt: number().optional()
|
|
12760
|
-
});
|
|
12761
12759
|
object({
|
|
12762
12760
|
id: string(),
|
|
12763
12761
|
userId: string(),
|
|
@@ -16739,16 +16737,36 @@ var RecordKindStateSchema = _enum([
|
|
|
16739
16737
|
var DeclareKindResultSchema = object({
|
|
16740
16738
|
kindId: number().int(),
|
|
16741
16739
|
state: RecordKindStateSchema,
|
|
16742
|
-
createdIndexes: array(string())
|
|
16743
|
-
/**
|
|
16744
|
-
* RETIRED (D900): always `null`. It carried the records-migration boot guard;
|
|
16745
|
-
* it stays on the wire, null, because an addon built before the removal reads
|
|
16746
|
-
* an ABSENT field as "adoption pending" and refuses to start.
|
|
16747
|
-
*/
|
|
16748
|
-
adoptionPending: _null()
|
|
16740
|
+
createdIndexes: array(string())
|
|
16749
16741
|
});
|
|
16750
16742
|
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16751
16743
|
var SecretRefsList = array(string());
|
|
16744
|
+
/**
|
|
16745
|
+
* One op of a `transact`: the single-row writes, each on a kind of the caller.
|
|
16746
|
+
* All ops of one call share ONE database file and ONE `transactFamily`.
|
|
16747
|
+
*/
|
|
16748
|
+
var RecordTransactOpSchema = discriminatedUnion("op", [
|
|
16749
|
+
object({
|
|
16750
|
+
op: literal("put"),
|
|
16751
|
+
kind: RecordKindNameSchema,
|
|
16752
|
+
record: RecordInputSchema,
|
|
16753
|
+
ifRev: number().int().min(0).optional()
|
|
16754
|
+
}),
|
|
16755
|
+
object({
|
|
16756
|
+
op: literal("patch"),
|
|
16757
|
+
kind: RecordKindNameSchema,
|
|
16758
|
+
id: RecordIdSchema,
|
|
16759
|
+
data: RecordBodySchema,
|
|
16760
|
+
at: number().int().nullable().optional(),
|
|
16761
|
+
expiresAt: number().int().nullable().optional(),
|
|
16762
|
+
ifRev: number().int().min(1).optional()
|
|
16763
|
+
}),
|
|
16764
|
+
object({
|
|
16765
|
+
op: literal("delete"),
|
|
16766
|
+
kind: RecordKindNameSchema,
|
|
16767
|
+
id: RecordIdSchema
|
|
16768
|
+
})
|
|
16769
|
+
]);
|
|
16752
16770
|
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16753
16771
|
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16754
16772
|
kind: "mutation",
|
|
@@ -16855,6 +16873,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
|
|
|
16855
16873
|
}), {
|
|
16856
16874
|
kind: "mutation",
|
|
16857
16875
|
auth: "admin"
|
|
16876
|
+
}), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
|
|
16877
|
+
results: array(object({
|
|
16878
|
+
rev: number().int().nullable(),
|
|
16879
|
+
deleted: boolean()
|
|
16880
|
+
})),
|
|
16881
|
+
releasedRefs: SecretRefsList,
|
|
16882
|
+
secretRefs: SecretRefsList
|
|
16883
|
+
}), {
|
|
16884
|
+
kind: "mutation",
|
|
16885
|
+
auth: "admin"
|
|
16858
16886
|
}), method(object({
|
|
16859
16887
|
deviceId: number().int(),
|
|
16860
16888
|
kinds: array(RecordKindNameSchema).optional()
|
|
@@ -42368,9 +42396,13 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42368
42396
|
"node-updating",
|
|
42369
42397
|
"node-inference-unavailable",
|
|
42370
42398
|
"detection-blind",
|
|
42399
|
+
"motion-noisy",
|
|
42400
|
+
"motion-calm",
|
|
42371
42401
|
"recording-stalled",
|
|
42372
42402
|
"recording-healthy",
|
|
42373
42403
|
"recording-degraded",
|
|
42404
|
+
"device-attention-required",
|
|
42405
|
+
"device-attention-resolved",
|
|
42374
42406
|
"storage-location-low",
|
|
42375
42407
|
"storage-location-critical",
|
|
42376
42408
|
"storage-location-ok",
|
|
@@ -42394,6 +42426,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42394
42426
|
"alert-critical",
|
|
42395
42427
|
"alert-error",
|
|
42396
42428
|
"alert-critical-resolved",
|
|
42429
|
+
"rule-broken",
|
|
42430
|
+
"rule-repaired",
|
|
42397
42431
|
"camera-online",
|
|
42398
42432
|
"camera-offline",
|
|
42399
42433
|
"camera-disabled",
|
|
@@ -55840,6 +55874,16 @@ var DishwasherStatusSchema = object({
|
|
|
55840
55874
|
powerState: string().nullable(),
|
|
55841
55875
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55842
55876
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55877
|
+
/**
|
|
55878
|
+
* True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
|
|
55879
|
+
* combined care-and-filter reminder raised); false when every such reminder reads clear; null
|
|
55880
|
+
* when none is reported. A cleared reminder is not an unknown one.
|
|
55881
|
+
*/
|
|
55882
|
+
filterCleaningDue: boolean().nullable(),
|
|
55883
|
+
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
55884
|
+
machineCareDue: boolean().nullable(),
|
|
55885
|
+
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
55886
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
55843
55887
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55844
55888
|
halfLoad: boolean().nullable(),
|
|
55845
55889
|
hygienePlus: boolean().nullable(),
|
|
@@ -64490,16 +64534,6 @@ var UpdateUserInputSchema = object({
|
|
|
64490
64534
|
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64491
64535
|
scopes: array(TokenScopeSchema).optional()
|
|
64492
64536
|
});
|
|
64493
|
-
var ApiKeySummarySchema = object({
|
|
64494
|
-
id: string(),
|
|
64495
|
-
label: string(),
|
|
64496
|
-
isAdmin: boolean().default(false),
|
|
64497
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
64498
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64499
|
-
tokenPrefix: string(),
|
|
64500
|
-
createdAt: number(),
|
|
64501
|
-
lastUsedAt: number().optional()
|
|
64502
|
-
});
|
|
64503
64537
|
var OauthSessionSummarySchema = object({
|
|
64504
64538
|
id: string(),
|
|
64505
64539
|
userId: string(),
|
|
@@ -64521,8 +64555,7 @@ var TotpStatusSchema = object({
|
|
|
64521
64555
|
confirmedAt: number().nullable()
|
|
64522
64556
|
});
|
|
64523
64557
|
/**
|
|
64524
|
-
* user-management — singleton capability for user accounts
|
|
64525
|
-
* legacy API-key rows.
|
|
64558
|
+
* user-management — singleton capability for user accounts.
|
|
64526
64559
|
*
|
|
64527
64560
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64528
64561
|
* — the subset check on `setUserScopes` is moot
|
|
@@ -64578,10 +64611,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64578
64611
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
64579
64612
|
kind: "mutation",
|
|
64580
64613
|
access: "view"
|
|
64581
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
64582
|
-
kind: "mutation",
|
|
64583
|
-
auth: "admin",
|
|
64584
|
-
access: "delete"
|
|
64585
64614
|
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
64586
64615
|
kind: "mutation",
|
|
64587
64616
|
auth: "admin",
|
|
@@ -73554,6 +73583,12 @@ Object.freeze({
|
|
|
73554
73583
|
addonId: null,
|
|
73555
73584
|
access: "view"
|
|
73556
73585
|
},
|
|
73586
|
+
"records.transact": {
|
|
73587
|
+
capName: "records",
|
|
73588
|
+
capScope: "system",
|
|
73589
|
+
addonId: null,
|
|
73590
|
+
access: "create"
|
|
73591
|
+
},
|
|
73557
73592
|
"sceneMonitor.captureReference": {
|
|
73558
73593
|
capName: "scene-monitor",
|
|
73559
73594
|
capScope: "device",
|
|
@@ -74886,12 +74921,6 @@ Object.freeze({
|
|
|
74886
74921
|
addonId: null,
|
|
74887
74922
|
access: "view"
|
|
74888
74923
|
},
|
|
74889
|
-
"userManagement.listApiKeys": {
|
|
74890
|
-
capName: "user-management",
|
|
74891
|
-
capScope: "system",
|
|
74892
|
-
addonId: null,
|
|
74893
|
-
access: "view"
|
|
74894
|
-
},
|
|
74895
74924
|
"userManagement.listExternalIdentities": {
|
|
74896
74925
|
capName: "user-management",
|
|
74897
74926
|
capScope: "system",
|
|
@@ -74946,12 +74975,6 @@ Object.freeze({
|
|
|
74946
74975
|
addonId: null,
|
|
74947
74976
|
access: "create"
|
|
74948
74977
|
},
|
|
74949
|
-
"userManagement.revokeApiKey": {
|
|
74950
|
-
capName: "user-management",
|
|
74951
|
-
capScope: "system",
|
|
74952
|
-
addonId: null,
|
|
74953
|
-
access: "delete"
|
|
74954
|
-
},
|
|
74955
74978
|
"userManagement.revokeOauthSession": {
|
|
74956
74979
|
capName: "user-management",
|
|
74957
74980
|
capScope: "system",
|
|
@@ -78316,9 +78339,13 @@ new Map(Object.entries({
|
|
|
78316
78339
|
"stream-online": "device-events",
|
|
78317
78340
|
"stream-offline": "device-events",
|
|
78318
78341
|
"detection-blind": "device-events",
|
|
78342
|
+
"motion-noisy": "device-events",
|
|
78343
|
+
"motion-calm": "device-events",
|
|
78319
78344
|
"recording-stalled": "device-events",
|
|
78320
78345
|
"recording-healthy": "device-events",
|
|
78321
78346
|
"recording-degraded": "device-events",
|
|
78347
|
+
"device-attention-required": "device-events",
|
|
78348
|
+
"device-attention-resolved": "device-events",
|
|
78322
78349
|
"node-online": "system",
|
|
78323
78350
|
"node-offline": "system",
|
|
78324
78351
|
"node-restarting": "system",
|
|
@@ -78335,6 +78362,8 @@ new Map(Object.entries({
|
|
|
78335
78362
|
"alert-critical": "system",
|
|
78336
78363
|
"alert-error": "system",
|
|
78337
78364
|
"alert-critical-resolved": "system",
|
|
78365
|
+
"rule-broken": "system",
|
|
78366
|
+
"rule-repaired": "system",
|
|
78338
78367
|
"storage-location-low": "system",
|
|
78339
78368
|
"storage-location-critical": "system",
|
|
78340
78369
|
"storage-location-ok": "system",
|
|
@@ -78399,6 +78428,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78399
78428
|
label: "Detecting nothing",
|
|
78400
78429
|
kinds: ["detection-blind"]
|
|
78401
78430
|
},
|
|
78431
|
+
{
|
|
78432
|
+
id: "motion-noise",
|
|
78433
|
+
family: "device-events",
|
|
78434
|
+
label: "Motion without a subject",
|
|
78435
|
+
kinds: ["motion-noisy", "motion-calm"]
|
|
78436
|
+
},
|
|
78402
78437
|
{
|
|
78403
78438
|
id: "recording",
|
|
78404
78439
|
family: "device-events",
|
|
@@ -78409,6 +78444,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78409
78444
|
"recording-degraded"
|
|
78410
78445
|
]
|
|
78411
78446
|
},
|
|
78447
|
+
{
|
|
78448
|
+
id: "device-attention",
|
|
78449
|
+
family: "device-events",
|
|
78450
|
+
label: "Needs attention",
|
|
78451
|
+
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
78452
|
+
},
|
|
78412
78453
|
{
|
|
78413
78454
|
id: "nodes",
|
|
78414
78455
|
family: "system",
|
|
@@ -78469,6 +78510,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78469
78510
|
"alert-critical-resolved"
|
|
78470
78511
|
]
|
|
78471
78512
|
},
|
|
78513
|
+
{
|
|
78514
|
+
id: "rule-health",
|
|
78515
|
+
family: "system",
|
|
78516
|
+
label: "Notification rules",
|
|
78517
|
+
kinds: ["rule-broken", "rule-repaired"]
|
|
78518
|
+
},
|
|
78472
78519
|
{
|
|
78473
78520
|
id: "alarm",
|
|
78474
78521
|
family: "alarm",
|
|
@@ -78542,6 +78589,7 @@ var ALERT_EPISODE = [
|
|
|
78542
78589
|
"alert-error",
|
|
78543
78590
|
"alert-critical-resolved"
|
|
78544
78591
|
];
|
|
78592
|
+
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
78545
78593
|
var UPDATES = [
|
|
78546
78594
|
"addon-update-available",
|
|
78547
78595
|
"server-update-available",
|
|
@@ -78571,9 +78619,12 @@ var DEVICE_EVENTS = [
|
|
|
78571
78619
|
"stream-online",
|
|
78572
78620
|
"stream-offline",
|
|
78573
78621
|
"detection-blind",
|
|
78622
|
+
"motion-noisy",
|
|
78623
|
+
"motion-calm",
|
|
78574
78624
|
"recording-stalled",
|
|
78575
78625
|
"recording-healthy",
|
|
78576
78626
|
"recording-degraded",
|
|
78627
|
+
...DEVICE_ATTENTION,
|
|
78577
78628
|
...ALARM
|
|
78578
78629
|
];
|
|
78579
78630
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -78741,7 +78792,13 @@ var STATE_SUMMARY_VARS = [
|
|
|
78741
78792
|
[...RULE_TEXT],
|
|
78742
78793
|
[...RULE_TEXT],
|
|
78743
78794
|
[...RULE_TEXT],
|
|
78744
|
-
|
|
78795
|
+
[...RULE_TEXT],
|
|
78796
|
+
[...RULE_TEXT],
|
|
78797
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78798
|
+
[...RULE_TEXT],
|
|
78799
|
+
[...RULE_TEXT],
|
|
78800
|
+
[...RULE_TEXT],
|
|
78801
|
+
[...RULE_TEXT],
|
|
78745
78802
|
[...RULE_TEXT],
|
|
78746
78803
|
[...RULE_TEXT],
|
|
78747
78804
|
[...RULE_TEXT],
|
|
@@ -78759,11 +78816,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78759
78816
|
[...RULE_TEXT],
|
|
78760
78817
|
[...RULE_TEXT],
|
|
78761
78818
|
[...RULE_TEXT],
|
|
78819
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78762
78820
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78821
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78763
78822
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78764
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78765
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78766
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78823
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78767
78824
|
[...RULE_TEXT],
|
|
78768
78825
|
[...RULE_TEXT],
|
|
78769
78826
|
[...RULE_TEXT],
|
|
@@ -78784,6 +78841,125 @@ var STATE_SUMMARY_VARS = [
|
|
|
78784
78841
|
[...RULE_TEXT],
|
|
78785
78842
|
...STATE_SUMMARY_VARS
|
|
78786
78843
|
];
|
|
78844
|
+
new Map([
|
|
78845
|
+
{
|
|
78846
|
+
id: "device-connectivity",
|
|
78847
|
+
family: "device-events",
|
|
78848
|
+
label: "Device connectivity (offline / back online)",
|
|
78849
|
+
bad: ["device-offline"],
|
|
78850
|
+
recovery: ["device-online"],
|
|
78851
|
+
snapshotLabel: "Devices offline now",
|
|
78852
|
+
snapshotSection: "device-state"
|
|
78853
|
+
},
|
|
78854
|
+
{
|
|
78855
|
+
id: "device-switch",
|
|
78856
|
+
family: "device-events",
|
|
78857
|
+
label: "Device switched off / back on",
|
|
78858
|
+
bad: ["device-disabled"],
|
|
78859
|
+
recovery: ["device-enabled"],
|
|
78860
|
+
snapshotLabel: "Devices switched off now",
|
|
78861
|
+
snapshotSection: "device-state"
|
|
78862
|
+
},
|
|
78863
|
+
{
|
|
78864
|
+
id: "stream-connectivity",
|
|
78865
|
+
family: "device-events",
|
|
78866
|
+
label: "Stream connectivity (offline / back online)",
|
|
78867
|
+
bad: ["stream-offline"],
|
|
78868
|
+
recovery: ["stream-online"],
|
|
78869
|
+
snapshotLabel: "Streams offline now",
|
|
78870
|
+
snapshotSection: "streams"
|
|
78871
|
+
},
|
|
78872
|
+
{
|
|
78873
|
+
id: "battery",
|
|
78874
|
+
family: "device-events",
|
|
78875
|
+
label: "Battery (low / back to normal)",
|
|
78876
|
+
bad: ["device-battery-low"],
|
|
78877
|
+
recovery: ["device-battery-normal"],
|
|
78878
|
+
snapshotLabel: "Batteries low now",
|
|
78879
|
+
snapshotSection: "battery"
|
|
78880
|
+
},
|
|
78881
|
+
{
|
|
78882
|
+
id: "consumables",
|
|
78883
|
+
family: "device-events",
|
|
78884
|
+
label: "Consumables (low / replaced)",
|
|
78885
|
+
bad: ["device-consumable-low"],
|
|
78886
|
+
recovery: ["device-consumable-normal"],
|
|
78887
|
+
snapshotLabel: "Consumables low now",
|
|
78888
|
+
snapshotSection: "consumables"
|
|
78889
|
+
},
|
|
78890
|
+
{
|
|
78891
|
+
id: "tanks",
|
|
78892
|
+
family: "device-events",
|
|
78893
|
+
label: "Tanks (low or full / back to normal)",
|
|
78894
|
+
bad: ["device-tank-low", "device-tank-full"],
|
|
78895
|
+
recovery: ["device-tank-normal"],
|
|
78896
|
+
snapshotLabel: "Tanks low or full now",
|
|
78897
|
+
snapshotSection: "tanks"
|
|
78898
|
+
},
|
|
78899
|
+
{
|
|
78900
|
+
id: "motion-noise",
|
|
78901
|
+
family: "device-events",
|
|
78902
|
+
label: "Motion without a subject (constant / calm again)",
|
|
78903
|
+
bad: ["motion-noisy"],
|
|
78904
|
+
recovery: ["motion-calm"],
|
|
78905
|
+
snapshotLabel: "Cameras with constant motion now",
|
|
78906
|
+
snapshotSection: null
|
|
78907
|
+
},
|
|
78908
|
+
{
|
|
78909
|
+
id: "recording-health",
|
|
78910
|
+
family: "device-events",
|
|
78911
|
+
label: "Recording health (stalled or degraded / recording again)",
|
|
78912
|
+
bad: ["recording-stalled", "recording-degraded"],
|
|
78913
|
+
recovery: ["recording-healthy"],
|
|
78914
|
+
snapshotLabel: "Recordings stalled now",
|
|
78915
|
+
snapshotSection: null
|
|
78916
|
+
},
|
|
78917
|
+
{
|
|
78918
|
+
id: "device-attention",
|
|
78919
|
+
family: "device-events",
|
|
78920
|
+
label: "Device needs attention (raised / resolved)",
|
|
78921
|
+
bad: ["device-attention-required"],
|
|
78922
|
+
recovery: ["device-attention-resolved"],
|
|
78923
|
+
snapshotLabel: "Devices needing attention now",
|
|
78924
|
+
snapshotSection: null
|
|
78925
|
+
},
|
|
78926
|
+
{
|
|
78927
|
+
id: "node-connectivity",
|
|
78928
|
+
family: "system",
|
|
78929
|
+
label: "Node connectivity (offline / back online)",
|
|
78930
|
+
bad: ["node-offline"],
|
|
78931
|
+
recovery: ["node-online"],
|
|
78932
|
+
snapshotLabel: "Nodes offline now",
|
|
78933
|
+
snapshotSection: "nodes"
|
|
78934
|
+
},
|
|
78935
|
+
{
|
|
78936
|
+
id: "storage-space",
|
|
78937
|
+
family: "system",
|
|
78938
|
+
label: "Storage space (low or critical / ok again)",
|
|
78939
|
+
bad: ["storage-location-low", "storage-location-critical"],
|
|
78940
|
+
recovery: ["storage-location-ok"],
|
|
78941
|
+
snapshotLabel: "Storage locations low now",
|
|
78942
|
+
snapshotSection: null
|
|
78943
|
+
},
|
|
78944
|
+
{
|
|
78945
|
+
id: "critical-alerts",
|
|
78946
|
+
family: "system",
|
|
78947
|
+
label: "Critical alerts (raised / resolved)",
|
|
78948
|
+
bad: ["alert-critical"],
|
|
78949
|
+
recovery: ["alert-critical-resolved"],
|
|
78950
|
+
snapshotLabel: "Critical alerts open now",
|
|
78951
|
+
snapshotSection: null
|
|
78952
|
+
},
|
|
78953
|
+
{
|
|
78954
|
+
id: "rule-health",
|
|
78955
|
+
family: "system",
|
|
78956
|
+
label: "Rule health (broken / repaired)",
|
|
78957
|
+
bad: ["rule-broken"],
|
|
78958
|
+
recovery: ["rule-repaired"],
|
|
78959
|
+
snapshotLabel: "Notification rules broken now",
|
|
78960
|
+
snapshotSection: null
|
|
78961
|
+
}
|
|
78962
|
+
].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
|
|
78787
78963
|
new Set([
|
|
78788
78964
|
"disarmed",
|
|
78789
78965
|
"armed_home",
|