@camstack/addon-terminal 0.1.147 → 0.1.149
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 +114 -67
- package/dist/addon.mjs +114 -67
- 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
|
|
@@ -5454,7 +5463,7 @@ var ZodIssueCode = {
|
|
|
5454
5463
|
var ZodFirstPartyTypeKind;
|
|
5455
5464
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5456
5465
|
//#endregion
|
|
5457
|
-
//#region ../types/dist/sleep-
|
|
5466
|
+
//#region ../types/dist/sleep-DJFUfKvA.mjs
|
|
5458
5467
|
/**
|
|
5459
5468
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5460
5469
|
* window to float samples (D455).
|
|
@@ -7983,7 +7992,7 @@ var EntryDescriptorSchema = object({
|
|
|
7983
7992
|
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7984
7993
|
fields: record(string(), unknown())
|
|
7985
7994
|
}).strict();
|
|
7986
|
-
/** What crosses the wire
|
|
7995
|
+
/** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
|
|
7987
7996
|
var RecordKindDeclarationSchema = object({
|
|
7988
7997
|
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7989
7998
|
class: _enum(RECORD_CLASSES),
|
|
@@ -8002,14 +8011,6 @@ var RecordKindDeclarationSchema = object({
|
|
|
8002
8011
|
secretPaths: array(string().min(1)).default([]),
|
|
8003
8012
|
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
8004
8013
|
secretArrayKeys: record(string(), string()).default({}),
|
|
8005
|
-
/**
|
|
8006
|
-
* RETIRED (D900): the legacy table a kind adopted from during the records
|
|
8007
|
-
* migration. Nothing declares it any more and nothing reads it; the schema
|
|
8008
|
-
* still ACCEPTS it because the catalog rows the migration wrote carry it
|
|
8009
|
-
* (an orphaned kind is never redeclared) and an addon built before the
|
|
8010
|
-
* removal still sends it. Never set it.
|
|
8011
|
-
*/
|
|
8012
|
-
adoptsFrom: string().min(1).optional(),
|
|
8013
8014
|
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
8014
8015
|
transactFamily: string().min(1).optional(),
|
|
8015
8016
|
entry: EntryDescriptorSchema.optional()
|
|
@@ -12778,17 +12779,6 @@ object({
|
|
|
12778
12779
|
createdAt: number(),
|
|
12779
12780
|
updatedAt: number()
|
|
12780
12781
|
});
|
|
12781
|
-
object({
|
|
12782
|
-
id: string(),
|
|
12783
|
-
label: string(),
|
|
12784
|
-
isAdmin: boolean().default(false),
|
|
12785
|
-
allowedProviders: AllowedProviderSchema,
|
|
12786
|
-
allowedDevices: AllowedDevicesSchema,
|
|
12787
|
-
tokenHash: string(),
|
|
12788
|
-
tokenPrefix: string(),
|
|
12789
|
-
createdAt: number(),
|
|
12790
|
-
lastUsedAt: number().optional()
|
|
12791
|
-
});
|
|
12792
12782
|
object({
|
|
12793
12783
|
id: string(),
|
|
12794
12784
|
userId: string(),
|
|
@@ -16770,16 +16760,36 @@ var RecordKindStateSchema = _enum([
|
|
|
16770
16760
|
var DeclareKindResultSchema = object({
|
|
16771
16761
|
kindId: number().int(),
|
|
16772
16762
|
state: RecordKindStateSchema,
|
|
16773
|
-
createdIndexes: array(string())
|
|
16774
|
-
/**
|
|
16775
|
-
* RETIRED (D900): always `null`. It carried the records-migration boot guard;
|
|
16776
|
-
* it stays on the wire, null, because an addon built before the removal reads
|
|
16777
|
-
* an ABSENT field as "adoption pending" and refuses to start.
|
|
16778
|
-
*/
|
|
16779
|
-
adoptionPending: _null()
|
|
16763
|
+
createdIndexes: array(string())
|
|
16780
16764
|
});
|
|
16781
16765
|
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16782
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
|
+
]);
|
|
16783
16793
|
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16784
16794
|
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16785
16795
|
kind: "mutation",
|
|
@@ -16886,6 +16896,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
|
|
|
16886
16896
|
}), {
|
|
16887
16897
|
kind: "mutation",
|
|
16888
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"
|
|
16889
16909
|
}), method(object({
|
|
16890
16910
|
deviceId: number().int(),
|
|
16891
16911
|
kinds: array(RecordKindNameSchema).optional()
|
|
@@ -42399,9 +42419,13 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42399
42419
|
"node-updating",
|
|
42400
42420
|
"node-inference-unavailable",
|
|
42401
42421
|
"detection-blind",
|
|
42422
|
+
"motion-noisy",
|
|
42423
|
+
"motion-calm",
|
|
42402
42424
|
"recording-stalled",
|
|
42403
42425
|
"recording-healthy",
|
|
42404
42426
|
"recording-degraded",
|
|
42427
|
+
"device-attention-required",
|
|
42428
|
+
"device-attention-resolved",
|
|
42405
42429
|
"storage-location-low",
|
|
42406
42430
|
"storage-location-critical",
|
|
42407
42431
|
"storage-location-ok",
|
|
@@ -47962,7 +47986,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
|
47962
47986
|
modelId: string()
|
|
47963
47987
|
}),
|
|
47964
47988
|
object({ kind: literal("cpu-device") }),
|
|
47965
|
-
object({ kind: literal("coral-untouched") }),
|
|
47966
47989
|
object({ kind: literal("device-disabled") }),
|
|
47967
47990
|
object({ kind: literal("device-unavailable") }),
|
|
47968
47991
|
object({ kind: literal("node-offline") }),
|
|
@@ -48060,11 +48083,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
|
48060
48083
|
kind: literal("detector-store-unreadable"),
|
|
48061
48084
|
error: string()
|
|
48062
48085
|
}),
|
|
48063
|
-
object({
|
|
48064
|
-
kind: literal("coral-enabled"),
|
|
48065
|
-
nodeId: string(),
|
|
48066
|
-
deviceKey: string()
|
|
48067
|
-
}),
|
|
48068
48086
|
object({
|
|
48069
48087
|
kind: literal("custom-pin-kept"),
|
|
48070
48088
|
nodeId: string(),
|
|
@@ -55873,6 +55891,16 @@ var DishwasherStatusSchema = object({
|
|
|
55873
55891
|
powerState: string().nullable(),
|
|
55874
55892
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55875
55893
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55894
|
+
/**
|
|
55895
|
+
* True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
|
|
55896
|
+
* combined care-and-filter reminder raised); false when every such reminder reads clear; null
|
|
55897
|
+
* when none is reported. A cleared reminder is not an unknown one.
|
|
55898
|
+
*/
|
|
55899
|
+
filterCleaningDue: boolean().nullable(),
|
|
55900
|
+
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
55901
|
+
machineCareDue: boolean().nullable(),
|
|
55902
|
+
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
55903
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
55876
55904
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55877
55905
|
halfLoad: boolean().nullable(),
|
|
55878
55906
|
hygienePlus: boolean().nullable(),
|
|
@@ -64523,16 +64551,6 @@ var UpdateUserInputSchema = object({
|
|
|
64523
64551
|
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64524
64552
|
scopes: array(TokenScopeSchema).optional()
|
|
64525
64553
|
});
|
|
64526
|
-
var ApiKeySummarySchema = object({
|
|
64527
|
-
id: string(),
|
|
64528
|
-
label: string(),
|
|
64529
|
-
isAdmin: boolean().default(false),
|
|
64530
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
64531
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64532
|
-
tokenPrefix: string(),
|
|
64533
|
-
createdAt: number(),
|
|
64534
|
-
lastUsedAt: number().optional()
|
|
64535
|
-
});
|
|
64536
64554
|
var OauthSessionSummarySchema = object({
|
|
64537
64555
|
id: string(),
|
|
64538
64556
|
userId: string(),
|
|
@@ -64554,8 +64572,7 @@ var TotpStatusSchema = object({
|
|
|
64554
64572
|
confirmedAt: number().nullable()
|
|
64555
64573
|
});
|
|
64556
64574
|
/**
|
|
64557
|
-
* user-management — singleton capability for user accounts
|
|
64558
|
-
* legacy API-key rows.
|
|
64575
|
+
* user-management — singleton capability for user accounts.
|
|
64559
64576
|
*
|
|
64560
64577
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64561
64578
|
* — the subset check on `setUserScopes` is moot
|
|
@@ -64611,10 +64628,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64611
64628
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
64612
64629
|
kind: "mutation",
|
|
64613
64630
|
access: "view"
|
|
64614
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
64615
|
-
kind: "mutation",
|
|
64616
|
-
auth: "admin",
|
|
64617
|
-
access: "delete"
|
|
64618
64631
|
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
64619
64632
|
kind: "mutation",
|
|
64620
64633
|
auth: "admin",
|
|
@@ -73587,6 +73600,12 @@ Object.freeze({
|
|
|
73587
73600
|
addonId: null,
|
|
73588
73601
|
access: "view"
|
|
73589
73602
|
},
|
|
73603
|
+
"records.transact": {
|
|
73604
|
+
capName: "records",
|
|
73605
|
+
capScope: "system",
|
|
73606
|
+
addonId: null,
|
|
73607
|
+
access: "create"
|
|
73608
|
+
},
|
|
73590
73609
|
"sceneMonitor.captureReference": {
|
|
73591
73610
|
capName: "scene-monitor",
|
|
73592
73611
|
capScope: "device",
|
|
@@ -74919,12 +74938,6 @@ Object.freeze({
|
|
|
74919
74938
|
addonId: null,
|
|
74920
74939
|
access: "view"
|
|
74921
74940
|
},
|
|
74922
|
-
"userManagement.listApiKeys": {
|
|
74923
|
-
capName: "user-management",
|
|
74924
|
-
capScope: "system",
|
|
74925
|
-
addonId: null,
|
|
74926
|
-
access: "view"
|
|
74927
|
-
},
|
|
74928
74941
|
"userManagement.listExternalIdentities": {
|
|
74929
74942
|
capName: "user-management",
|
|
74930
74943
|
capScope: "system",
|
|
@@ -74979,12 +74992,6 @@ Object.freeze({
|
|
|
74979
74992
|
addonId: null,
|
|
74980
74993
|
access: "create"
|
|
74981
74994
|
},
|
|
74982
|
-
"userManagement.revokeApiKey": {
|
|
74983
|
-
capName: "user-management",
|
|
74984
|
-
capScope: "system",
|
|
74985
|
-
addonId: null,
|
|
74986
|
-
access: "delete"
|
|
74987
|
-
},
|
|
74988
74995
|
"userManagement.revokeOauthSession": {
|
|
74989
74996
|
capName: "user-management",
|
|
74990
74997
|
capScope: "system",
|
|
@@ -78349,9 +78356,13 @@ new Map(Object.entries({
|
|
|
78349
78356
|
"stream-online": "device-events",
|
|
78350
78357
|
"stream-offline": "device-events",
|
|
78351
78358
|
"detection-blind": "device-events",
|
|
78359
|
+
"motion-noisy": "device-events",
|
|
78360
|
+
"motion-calm": "device-events",
|
|
78352
78361
|
"recording-stalled": "device-events",
|
|
78353
78362
|
"recording-healthy": "device-events",
|
|
78354
78363
|
"recording-degraded": "device-events",
|
|
78364
|
+
"device-attention-required": "device-events",
|
|
78365
|
+
"device-attention-resolved": "device-events",
|
|
78355
78366
|
"node-online": "system",
|
|
78356
78367
|
"node-offline": "system",
|
|
78357
78368
|
"node-restarting": "system",
|
|
@@ -78434,6 +78445,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78434
78445
|
label: "Detecting nothing",
|
|
78435
78446
|
kinds: ["detection-blind"]
|
|
78436
78447
|
},
|
|
78448
|
+
{
|
|
78449
|
+
id: "motion-noise",
|
|
78450
|
+
family: "device-events",
|
|
78451
|
+
label: "Motion without a subject",
|
|
78452
|
+
kinds: ["motion-noisy", "motion-calm"]
|
|
78453
|
+
},
|
|
78437
78454
|
{
|
|
78438
78455
|
id: "recording",
|
|
78439
78456
|
family: "device-events",
|
|
@@ -78444,6 +78461,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78444
78461
|
"recording-degraded"
|
|
78445
78462
|
]
|
|
78446
78463
|
},
|
|
78464
|
+
{
|
|
78465
|
+
id: "device-attention",
|
|
78466
|
+
family: "device-events",
|
|
78467
|
+
label: "Needs attention",
|
|
78468
|
+
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
78469
|
+
},
|
|
78447
78470
|
{
|
|
78448
78471
|
id: "nodes",
|
|
78449
78472
|
family: "system",
|
|
@@ -78583,6 +78606,7 @@ var ALERT_EPISODE = [
|
|
|
78583
78606
|
"alert-error",
|
|
78584
78607
|
"alert-critical-resolved"
|
|
78585
78608
|
];
|
|
78609
|
+
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
78586
78610
|
var UPDATES = [
|
|
78587
78611
|
"addon-update-available",
|
|
78588
78612
|
"server-update-available",
|
|
@@ -78612,9 +78636,12 @@ var DEVICE_EVENTS = [
|
|
|
78612
78636
|
"stream-online",
|
|
78613
78637
|
"stream-offline",
|
|
78614
78638
|
"detection-blind",
|
|
78639
|
+
"motion-noisy",
|
|
78640
|
+
"motion-calm",
|
|
78615
78641
|
"recording-stalled",
|
|
78616
78642
|
"recording-healthy",
|
|
78617
78643
|
"recording-degraded",
|
|
78644
|
+
...DEVICE_ATTENTION,
|
|
78618
78645
|
...ALARM
|
|
78619
78646
|
];
|
|
78620
78647
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -78782,7 +78809,9 @@ var STATE_SUMMARY_VARS = [
|
|
|
78782
78809
|
[...RULE_TEXT],
|
|
78783
78810
|
[...RULE_TEXT],
|
|
78784
78811
|
[...RULE_TEXT],
|
|
78785
|
-
|
|
78812
|
+
[...RULE_TEXT],
|
|
78813
|
+
[...RULE_TEXT],
|
|
78814
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78786
78815
|
[...RULE_TEXT],
|
|
78787
78816
|
[...RULE_TEXT],
|
|
78788
78817
|
[...RULE_TEXT],
|
|
@@ -78804,11 +78833,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78804
78833
|
[...RULE_TEXT],
|
|
78805
78834
|
[...RULE_TEXT],
|
|
78806
78835
|
[...RULE_TEXT],
|
|
78836
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78807
78837
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78838
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78808
78839
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78809
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78810
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78811
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78840
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78812
78841
|
[...RULE_TEXT],
|
|
78813
78842
|
[...RULE_TEXT],
|
|
78814
78843
|
[...RULE_TEXT],
|
|
@@ -78884,6 +78913,15 @@ new Map([
|
|
|
78884
78913
|
snapshotLabel: "Tanks low or full now",
|
|
78885
78914
|
snapshotSection: "tanks"
|
|
78886
78915
|
},
|
|
78916
|
+
{
|
|
78917
|
+
id: "motion-noise",
|
|
78918
|
+
family: "device-events",
|
|
78919
|
+
label: "Motion without a subject (constant / calm again)",
|
|
78920
|
+
bad: ["motion-noisy"],
|
|
78921
|
+
recovery: ["motion-calm"],
|
|
78922
|
+
snapshotLabel: "Cameras with constant motion now",
|
|
78923
|
+
snapshotSection: null
|
|
78924
|
+
},
|
|
78887
78925
|
{
|
|
78888
78926
|
id: "recording-health",
|
|
78889
78927
|
family: "device-events",
|
|
@@ -78893,6 +78931,15 @@ new Map([
|
|
|
78893
78931
|
snapshotLabel: "Recordings stalled now",
|
|
78894
78932
|
snapshotSection: null
|
|
78895
78933
|
},
|
|
78934
|
+
{
|
|
78935
|
+
id: "device-attention",
|
|
78936
|
+
family: "device-events",
|
|
78937
|
+
label: "Device needs attention (raised / resolved)",
|
|
78938
|
+
bad: ["device-attention-required"],
|
|
78939
|
+
recovery: ["device-attention-resolved"],
|
|
78940
|
+
snapshotLabel: "Devices needing attention now",
|
|
78941
|
+
snapshotSection: null
|
|
78942
|
+
},
|
|
78896
78943
|
{
|
|
78897
78944
|
id: "node-connectivity",
|
|
78898
78945
|
family: "system",
|
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
|
|
@@ -5431,7 +5440,7 @@ var ZodIssueCode = {
|
|
|
5431
5440
|
var ZodFirstPartyTypeKind;
|
|
5432
5441
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5433
5442
|
//#endregion
|
|
5434
|
-
//#region ../types/dist/sleep-
|
|
5443
|
+
//#region ../types/dist/sleep-DJFUfKvA.mjs
|
|
5435
5444
|
/**
|
|
5436
5445
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5437
5446
|
* window to float samples (D455).
|
|
@@ -7960,7 +7969,7 @@ var EntryDescriptorSchema = object({
|
|
|
7960
7969
|
/** JSON Schema of the entry body; `secret: true` marks a password field. */
|
|
7961
7970
|
fields: record(string(), unknown())
|
|
7962
7971
|
}).strict();
|
|
7963
|
-
/** What crosses the wire
|
|
7972
|
+
/** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
|
|
7964
7973
|
var RecordKindDeclarationSchema = object({
|
|
7965
7974
|
database: _enum(RECORD_DATABASES).default("settings"),
|
|
7966
7975
|
class: _enum(RECORD_CLASSES),
|
|
@@ -7979,14 +7988,6 @@ var RecordKindDeclarationSchema = object({
|
|
|
7979
7988
|
secretPaths: array(string().min(1)).default([]),
|
|
7980
7989
|
/** The id key of each array that carries a secret (`{ headers: 'name' }`). */
|
|
7981
7990
|
secretArrayKeys: record(string(), string()).default({}),
|
|
7982
|
-
/**
|
|
7983
|
-
* RETIRED (D900): the legacy table a kind adopted from during the records
|
|
7984
|
-
* migration. Nothing declares it any more and nothing reads it; the schema
|
|
7985
|
-
* still ACCEPTS it because the catalog rows the migration wrote carry it
|
|
7986
|
-
* (an orphaned kind is never redeclared) and an addon built before the
|
|
7987
|
-
* removal still sends it. Never set it.
|
|
7988
|
-
*/
|
|
7989
|
-
adoptsFrom: string().min(1).optional(),
|
|
7990
7991
|
/** Kinds that must agree through `transact` sit in one file under one family name. */
|
|
7991
7992
|
transactFamily: string().min(1).optional(),
|
|
7992
7993
|
entry: EntryDescriptorSchema.optional()
|
|
@@ -12755,17 +12756,6 @@ object({
|
|
|
12755
12756
|
createdAt: number(),
|
|
12756
12757
|
updatedAt: number()
|
|
12757
12758
|
});
|
|
12758
|
-
object({
|
|
12759
|
-
id: string(),
|
|
12760
|
-
label: string(),
|
|
12761
|
-
isAdmin: boolean().default(false),
|
|
12762
|
-
allowedProviders: AllowedProviderSchema,
|
|
12763
|
-
allowedDevices: AllowedDevicesSchema,
|
|
12764
|
-
tokenHash: string(),
|
|
12765
|
-
tokenPrefix: string(),
|
|
12766
|
-
createdAt: number(),
|
|
12767
|
-
lastUsedAt: number().optional()
|
|
12768
|
-
});
|
|
12769
12759
|
object({
|
|
12770
12760
|
id: string(),
|
|
12771
12761
|
userId: string(),
|
|
@@ -16747,16 +16737,36 @@ var RecordKindStateSchema = _enum([
|
|
|
16747
16737
|
var DeclareKindResultSchema = object({
|
|
16748
16738
|
kindId: number().int(),
|
|
16749
16739
|
state: RecordKindStateSchema,
|
|
16750
|
-
createdIndexes: array(string())
|
|
16751
|
-
/**
|
|
16752
|
-
* RETIRED (D900): always `null`. It carried the records-migration boot guard;
|
|
16753
|
-
* it stays on the wire, null, because an addon built before the removal reads
|
|
16754
|
-
* an ABSENT field as "adoption pending" and refuses to start.
|
|
16755
|
-
*/
|
|
16756
|
-
adoptionPending: _null()
|
|
16740
|
+
createdIndexes: array(string())
|
|
16757
16741
|
});
|
|
16758
16742
|
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
16759
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
|
+
]);
|
|
16760
16770
|
var RecordSecretRefsSchema = record(string(), record(string(), string()));
|
|
16761
16771
|
method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
|
|
16762
16772
|
kind: "mutation",
|
|
@@ -16863,6 +16873,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
|
|
|
16863
16873
|
}), {
|
|
16864
16874
|
kind: "mutation",
|
|
16865
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"
|
|
16866
16886
|
}), method(object({
|
|
16867
16887
|
deviceId: number().int(),
|
|
16868
16888
|
kinds: array(RecordKindNameSchema).optional()
|
|
@@ -42376,9 +42396,13 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42376
42396
|
"node-updating",
|
|
42377
42397
|
"node-inference-unavailable",
|
|
42378
42398
|
"detection-blind",
|
|
42399
|
+
"motion-noisy",
|
|
42400
|
+
"motion-calm",
|
|
42379
42401
|
"recording-stalled",
|
|
42380
42402
|
"recording-healthy",
|
|
42381
42403
|
"recording-degraded",
|
|
42404
|
+
"device-attention-required",
|
|
42405
|
+
"device-attention-resolved",
|
|
42382
42406
|
"storage-location-low",
|
|
42383
42407
|
"storage-location-critical",
|
|
42384
42408
|
"storage-location-ok",
|
|
@@ -47939,7 +47963,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
|
|
|
47939
47963
|
modelId: string()
|
|
47940
47964
|
}),
|
|
47941
47965
|
object({ kind: literal("cpu-device") }),
|
|
47942
|
-
object({ kind: literal("coral-untouched") }),
|
|
47943
47966
|
object({ kind: literal("device-disabled") }),
|
|
47944
47967
|
object({ kind: literal("device-unavailable") }),
|
|
47945
47968
|
object({ kind: literal("node-offline") }),
|
|
@@ -48037,11 +48060,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
|
|
|
48037
48060
|
kind: literal("detector-store-unreadable"),
|
|
48038
48061
|
error: string()
|
|
48039
48062
|
}),
|
|
48040
|
-
object({
|
|
48041
|
-
kind: literal("coral-enabled"),
|
|
48042
|
-
nodeId: string(),
|
|
48043
|
-
deviceKey: string()
|
|
48044
|
-
}),
|
|
48045
48063
|
object({
|
|
48046
48064
|
kind: literal("custom-pin-kept"),
|
|
48047
48065
|
nodeId: string(),
|
|
@@ -55850,6 +55868,16 @@ var DishwasherStatusSchema = object({
|
|
|
55850
55868
|
powerState: string().nullable(),
|
|
55851
55869
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55852
55870
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55871
|
+
/**
|
|
55872
|
+
* True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
|
|
55873
|
+
* combined care-and-filter reminder raised); false when every such reminder reads clear; null
|
|
55874
|
+
* when none is reported. A cleared reminder is not an unknown one.
|
|
55875
|
+
*/
|
|
55876
|
+
filterCleaningDue: boolean().nullable(),
|
|
55877
|
+
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
55878
|
+
machineCareDue: boolean().nullable(),
|
|
55879
|
+
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
55880
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
55853
55881
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55854
55882
|
halfLoad: boolean().nullable(),
|
|
55855
55883
|
hygienePlus: boolean().nullable(),
|
|
@@ -64500,16 +64528,6 @@ var UpdateUserInputSchema = object({
|
|
|
64500
64528
|
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64501
64529
|
scopes: array(TokenScopeSchema).optional()
|
|
64502
64530
|
});
|
|
64503
|
-
var ApiKeySummarySchema = object({
|
|
64504
|
-
id: string(),
|
|
64505
|
-
label: string(),
|
|
64506
|
-
isAdmin: boolean().default(false),
|
|
64507
|
-
allowedProviders: union([array(string()), literal("*")]).optional(),
|
|
64508
|
-
allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
|
|
64509
|
-
tokenPrefix: string(),
|
|
64510
|
-
createdAt: number(),
|
|
64511
|
-
lastUsedAt: number().optional()
|
|
64512
|
-
});
|
|
64513
64531
|
var OauthSessionSummarySchema = object({
|
|
64514
64532
|
id: string(),
|
|
64515
64533
|
userId: string(),
|
|
@@ -64531,8 +64549,7 @@ var TotpStatusSchema = object({
|
|
|
64531
64549
|
confirmedAt: number().nullable()
|
|
64532
64550
|
});
|
|
64533
64551
|
/**
|
|
64534
|
-
* user-management — singleton capability for user accounts
|
|
64535
|
-
* legacy API-key rows.
|
|
64552
|
+
* user-management — singleton capability for user accounts.
|
|
64536
64553
|
*
|
|
64537
64554
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64538
64555
|
* — the subset check on `setUserScopes` is moot
|
|
@@ -64588,10 +64605,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64588
64605
|
}), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
|
|
64589
64606
|
kind: "mutation",
|
|
64590
64607
|
access: "view"
|
|
64591
|
-
}), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
64592
|
-
kind: "mutation",
|
|
64593
|
-
auth: "admin",
|
|
64594
|
-
access: "delete"
|
|
64595
64608
|
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
64596
64609
|
kind: "mutation",
|
|
64597
64610
|
auth: "admin",
|
|
@@ -73564,6 +73577,12 @@ Object.freeze({
|
|
|
73564
73577
|
addonId: null,
|
|
73565
73578
|
access: "view"
|
|
73566
73579
|
},
|
|
73580
|
+
"records.transact": {
|
|
73581
|
+
capName: "records",
|
|
73582
|
+
capScope: "system",
|
|
73583
|
+
addonId: null,
|
|
73584
|
+
access: "create"
|
|
73585
|
+
},
|
|
73567
73586
|
"sceneMonitor.captureReference": {
|
|
73568
73587
|
capName: "scene-monitor",
|
|
73569
73588
|
capScope: "device",
|
|
@@ -74896,12 +74915,6 @@ Object.freeze({
|
|
|
74896
74915
|
addonId: null,
|
|
74897
74916
|
access: "view"
|
|
74898
74917
|
},
|
|
74899
|
-
"userManagement.listApiKeys": {
|
|
74900
|
-
capName: "user-management",
|
|
74901
|
-
capScope: "system",
|
|
74902
|
-
addonId: null,
|
|
74903
|
-
access: "view"
|
|
74904
|
-
},
|
|
74905
74918
|
"userManagement.listExternalIdentities": {
|
|
74906
74919
|
capName: "user-management",
|
|
74907
74920
|
capScope: "system",
|
|
@@ -74956,12 +74969,6 @@ Object.freeze({
|
|
|
74956
74969
|
addonId: null,
|
|
74957
74970
|
access: "create"
|
|
74958
74971
|
},
|
|
74959
|
-
"userManagement.revokeApiKey": {
|
|
74960
|
-
capName: "user-management",
|
|
74961
|
-
capScope: "system",
|
|
74962
|
-
addonId: null,
|
|
74963
|
-
access: "delete"
|
|
74964
|
-
},
|
|
74965
74972
|
"userManagement.revokeOauthSession": {
|
|
74966
74973
|
capName: "user-management",
|
|
74967
74974
|
capScope: "system",
|
|
@@ -78326,9 +78333,13 @@ new Map(Object.entries({
|
|
|
78326
78333
|
"stream-online": "device-events",
|
|
78327
78334
|
"stream-offline": "device-events",
|
|
78328
78335
|
"detection-blind": "device-events",
|
|
78336
|
+
"motion-noisy": "device-events",
|
|
78337
|
+
"motion-calm": "device-events",
|
|
78329
78338
|
"recording-stalled": "device-events",
|
|
78330
78339
|
"recording-healthy": "device-events",
|
|
78331
78340
|
"recording-degraded": "device-events",
|
|
78341
|
+
"device-attention-required": "device-events",
|
|
78342
|
+
"device-attention-resolved": "device-events",
|
|
78332
78343
|
"node-online": "system",
|
|
78333
78344
|
"node-offline": "system",
|
|
78334
78345
|
"node-restarting": "system",
|
|
@@ -78411,6 +78422,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78411
78422
|
label: "Detecting nothing",
|
|
78412
78423
|
kinds: ["detection-blind"]
|
|
78413
78424
|
},
|
|
78425
|
+
{
|
|
78426
|
+
id: "motion-noise",
|
|
78427
|
+
family: "device-events",
|
|
78428
|
+
label: "Motion without a subject",
|
|
78429
|
+
kinds: ["motion-noisy", "motion-calm"]
|
|
78430
|
+
},
|
|
78414
78431
|
{
|
|
78415
78432
|
id: "recording",
|
|
78416
78433
|
family: "device-events",
|
|
@@ -78421,6 +78438,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78421
78438
|
"recording-degraded"
|
|
78422
78439
|
]
|
|
78423
78440
|
},
|
|
78441
|
+
{
|
|
78442
|
+
id: "device-attention",
|
|
78443
|
+
family: "device-events",
|
|
78444
|
+
label: "Needs attention",
|
|
78445
|
+
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
78446
|
+
},
|
|
78424
78447
|
{
|
|
78425
78448
|
id: "nodes",
|
|
78426
78449
|
family: "system",
|
|
@@ -78560,6 +78583,7 @@ var ALERT_EPISODE = [
|
|
|
78560
78583
|
"alert-error",
|
|
78561
78584
|
"alert-critical-resolved"
|
|
78562
78585
|
];
|
|
78586
|
+
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
78563
78587
|
var UPDATES = [
|
|
78564
78588
|
"addon-update-available",
|
|
78565
78589
|
"server-update-available",
|
|
@@ -78589,9 +78613,12 @@ var DEVICE_EVENTS = [
|
|
|
78589
78613
|
"stream-online",
|
|
78590
78614
|
"stream-offline",
|
|
78591
78615
|
"detection-blind",
|
|
78616
|
+
"motion-noisy",
|
|
78617
|
+
"motion-calm",
|
|
78592
78618
|
"recording-stalled",
|
|
78593
78619
|
"recording-healthy",
|
|
78594
78620
|
"recording-degraded",
|
|
78621
|
+
...DEVICE_ATTENTION,
|
|
78595
78622
|
...ALARM
|
|
78596
78623
|
];
|
|
78597
78624
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -78759,7 +78786,9 @@ var STATE_SUMMARY_VARS = [
|
|
|
78759
78786
|
[...RULE_TEXT],
|
|
78760
78787
|
[...RULE_TEXT],
|
|
78761
78788
|
[...RULE_TEXT],
|
|
78762
|
-
|
|
78789
|
+
[...RULE_TEXT],
|
|
78790
|
+
[...RULE_TEXT],
|
|
78791
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78763
78792
|
[...RULE_TEXT],
|
|
78764
78793
|
[...RULE_TEXT],
|
|
78765
78794
|
[...RULE_TEXT],
|
|
@@ -78781,11 +78810,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78781
78810
|
[...RULE_TEXT],
|
|
78782
78811
|
[...RULE_TEXT],
|
|
78783
78812
|
[...RULE_TEXT],
|
|
78813
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78784
78814
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78815
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78785
78816
|
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78786
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78787
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78788
|
-
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78817
|
+
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
78789
78818
|
[...RULE_TEXT],
|
|
78790
78819
|
[...RULE_TEXT],
|
|
78791
78820
|
[...RULE_TEXT],
|
|
@@ -78861,6 +78890,15 @@ new Map([
|
|
|
78861
78890
|
snapshotLabel: "Tanks low or full now",
|
|
78862
78891
|
snapshotSection: "tanks"
|
|
78863
78892
|
},
|
|
78893
|
+
{
|
|
78894
|
+
id: "motion-noise",
|
|
78895
|
+
family: "device-events",
|
|
78896
|
+
label: "Motion without a subject (constant / calm again)",
|
|
78897
|
+
bad: ["motion-noisy"],
|
|
78898
|
+
recovery: ["motion-calm"],
|
|
78899
|
+
snapshotLabel: "Cameras with constant motion now",
|
|
78900
|
+
snapshotSection: null
|
|
78901
|
+
},
|
|
78864
78902
|
{
|
|
78865
78903
|
id: "recording-health",
|
|
78866
78904
|
family: "device-events",
|
|
@@ -78870,6 +78908,15 @@ new Map([
|
|
|
78870
78908
|
snapshotLabel: "Recordings stalled now",
|
|
78871
78909
|
snapshotSection: null
|
|
78872
78910
|
},
|
|
78911
|
+
{
|
|
78912
|
+
id: "device-attention",
|
|
78913
|
+
family: "device-events",
|
|
78914
|
+
label: "Device needs attention (raised / resolved)",
|
|
78915
|
+
bad: ["device-attention-required"],
|
|
78916
|
+
recovery: ["device-attention-resolved"],
|
|
78917
|
+
snapshotLabel: "Devices needing attention now",
|
|
78918
|
+
snapshotSection: null
|
|
78919
|
+
},
|
|
78873
78920
|
{
|
|
78874
78921
|
id: "node-connectivity",
|
|
78875
78922
|
family: "system",
|