@camstack/addon-post-analysis 1.2.319 → 1.2.320
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/{clip-model-registry-DSqobJfx.mjs → clip-model-registry-C-IEAIQQ.mjs} +223 -46
- package/dist/{clip-model-registry-BjYpZuuI.js → clip-model-registry-C_aKxHpy.js} +252 -45
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CKHzDA_B.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D553qWb_.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-7e_3hsiC.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C1V_UEyk.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-DDDjJDA6.mjs → hostInit-ByDyL2zi.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +287 -66
- package/dist/pipeline-analytics/index.mjs +287 -66
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bz37odzX.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B_KS96RA.mjs +0 -26
|
@@ -21812,14 +21812,52 @@ var NcAlarmNonBlockingEditSchema = object({
|
|
|
21812
21812
|
nonBlocking: boolean()
|
|
21813
21813
|
});
|
|
21814
21814
|
/**
|
|
21815
|
+
* Controllable openings: opt IN to blocking (default is do not block). Contacts
|
|
21816
|
+
* keep using {@link NcAlarmNonBlockingEditSchema}.
|
|
21817
|
+
*/
|
|
21818
|
+
var NcAlarmBlockingEditSchema = object({
|
|
21819
|
+
mode: AlarmArmModeSchema,
|
|
21820
|
+
deviceId: number().int().positive(),
|
|
21821
|
+
/** true = on the list (blocks when open); false = off the list (default). */
|
|
21822
|
+
blocking: boolean()
|
|
21823
|
+
});
|
|
21824
|
+
/**
|
|
21825
|
+
* Controllable openings: opt OUT of secure-on-arm (default is secure ON —
|
|
21826
|
+
* close / lock / turn off when this mode arms).
|
|
21827
|
+
*/
|
|
21828
|
+
var NcAlarmSecureOnArmEditSchema = object({
|
|
21829
|
+
mode: AlarmArmModeSchema,
|
|
21830
|
+
deviceId: number().int().positive(),
|
|
21831
|
+
/** true = secure on arm (default); false = do not actuate on arm. */
|
|
21832
|
+
secureOnArm: boolean()
|
|
21833
|
+
});
|
|
21834
|
+
/**
|
|
21835
|
+
* One arm mode's device-id list (non-blocking, blocking, or secure-on-arm-off).
|
|
21836
|
+
*/
|
|
21837
|
+
var NcAlarmModeDeviceListSchema = object({
|
|
21838
|
+
mode: AlarmArmModeSchema,
|
|
21839
|
+
deviceIds: array(number().int()).max(200)
|
|
21840
|
+
});
|
|
21841
|
+
/**
|
|
21842
|
+
* One arm mode's non-blocking list: devices that may be open when that mode
|
|
21843
|
+
* arms, without the arm being refused.
|
|
21844
|
+
*/
|
|
21845
|
+
var NcAlarmNonBlockingSchema = NcAlarmModeDeviceListSchema;
|
|
21846
|
+
/** Controllable devices that DO block when open (opt-in; default empty). */
|
|
21847
|
+
var NcAlarmBlockingSchema = NcAlarmModeDeviceListSchema;
|
|
21848
|
+
/**
|
|
21849
|
+
* Controllable devices that do NOT secure on arm (opt-out; default empty =
|
|
21850
|
+
* every controllable secures).
|
|
21851
|
+
*/
|
|
21852
|
+
var NcAlarmSecureOnArmOffSchema = NcAlarmModeDeviceListSchema;
|
|
21853
|
+
/**
|
|
21815
21854
|
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
21816
21855
|
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
21817
21856
|
* at the boundary rather than interpreted.
|
|
21818
21857
|
*/
|
|
21819
|
-
var NcAlarmNonBlockingListSchema = array(
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
})).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
21858
|
+
var NcAlarmNonBlockingListSchema = array(NcAlarmNonBlockingSchema).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
21859
|
+
var NcAlarmBlockingListSchema = array(NcAlarmBlockingSchema).max(8).refine(uniqueModes, { message: "blocking: at most one list per arm mode" });
|
|
21860
|
+
var NcAlarmSecureOnArmOffListSchema = array(NcAlarmSecureOnArmOffSchema).max(8).refine(uniqueModes, { message: "secureOnArmOff: at most one list per arm mode" });
|
|
21823
21861
|
/**
|
|
21824
21862
|
* The three durations — global, and per mode since D697 — the panel's state
|
|
21825
21863
|
* machine runs on, who hears about its transitions, and which openings each mode tolerates.
|
|
@@ -21862,9 +21900,23 @@ var NcAlarmSettingsSchema = object({
|
|
|
21862
21900
|
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
21863
21901
|
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
21864
21902
|
* parses as "every opening blocks" — the behaviour it was written under.
|
|
21903
|
+
* Contacts use this list; controllable openings use {@link blocking} instead
|
|
21904
|
+
* (default: do not block).
|
|
21865
21905
|
*/
|
|
21866
21906
|
nonBlocking: NcAlarmNonBlockingListSchema.default([]),
|
|
21867
21907
|
/**
|
|
21908
|
+
* Per arm mode, controllable openings that DO refuse the arm when open.
|
|
21909
|
+
* Default `[]` = none block (secure-on-arm closes them instead). Absent on a
|
|
21910
|
+
* blob older than this field — read as empty.
|
|
21911
|
+
*/
|
|
21912
|
+
blocking: NcAlarmBlockingListSchema.default([]),
|
|
21913
|
+
/**
|
|
21914
|
+
* Per arm mode, controllable openings that must NOT be actuated on arm.
|
|
21915
|
+
* Default `[]` = every controllable secures (close / lock / off). Absent on
|
|
21916
|
+
* an older blob — read as empty (secure ON).
|
|
21917
|
+
*/
|
|
21918
|
+
secureOnArmOff: NcAlarmSecureOnArmOffListSchema.default([]),
|
|
21919
|
+
/**
|
|
21868
21920
|
* Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
|
|
21869
21921
|
* without a field, uses the global value above — so `[]`, the default, is exactly the
|
|
21870
21922
|
* behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
|
|
@@ -21874,7 +21926,7 @@ var NcAlarmSettingsSchema = object({
|
|
|
21874
21926
|
/**
|
|
21875
21927
|
* Every field optional — a tab edits one control at a time.
|
|
21876
21928
|
*
|
|
21877
|
-
*
|
|
21929
|
+
* List fields and `modeDelays` are re-declared WITHOUT their defaults:
|
|
21878
21930
|
* `.partial()` does not remove an inner `.default()`, so a patch that never
|
|
21879
21931
|
* named the field would parse to `[]` and wipe every mode's list on an
|
|
21880
21932
|
* unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
|
|
@@ -21882,11 +21934,15 @@ var NcAlarmSettingsSchema = object({
|
|
|
21882
21934
|
*/
|
|
21883
21935
|
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21884
21936
|
nonBlocking: NcAlarmNonBlockingListSchema,
|
|
21937
|
+
blocking: NcAlarmBlockingListSchema,
|
|
21938
|
+
secureOnArmOff: NcAlarmSecureOnArmOffListSchema,
|
|
21885
21939
|
/** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
|
|
21886
21940
|
modeDelays: NcAlarmModeDelaysEditListSchema,
|
|
21887
21941
|
/** ONE membership change; the panel applies it to the list it holds at its turn. */
|
|
21888
|
-
nonBlockingEdit: NcAlarmNonBlockingEditSchema
|
|
21889
|
-
|
|
21942
|
+
nonBlockingEdit: NcAlarmNonBlockingEditSchema,
|
|
21943
|
+
blockingEdit: NcAlarmBlockingEditSchema,
|
|
21944
|
+
secureOnArmEdit: NcAlarmSecureOnArmEditSchema
|
|
21945
|
+
}).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" }).refine((p) => p.blocking === void 0 || p.blockingEdit === void 0, { message: "blocking and blockingEdit are exclusive — send the whole lists or one edit" }).refine((p) => p.secureOnArmOff === void 0 || p.secureOnArmEdit === void 0, { message: "secureOnArmOff and secureOnArmEdit are exclusive — send the whole lists or one edit" });
|
|
21890
21946
|
/**
|
|
21891
21947
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
21892
21948
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -22001,7 +22057,13 @@ var NcAlarmSensorStateSchema = object({
|
|
|
22001
22057
|
/** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
|
|
22002
22058
|
unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
|
|
22003
22059
|
/** The device manager's liveness as the centre mirrors it; null = not known. */
|
|
22004
|
-
online: boolean().nullable()
|
|
22060
|
+
online: boolean().nullable(),
|
|
22061
|
+
/**
|
|
22062
|
+
* True when the opening is a cover / lock / switch — the table shows the
|
|
22063
|
+
* Secure-on-arm switch and uses the controllable defaults. False for contacts
|
|
22064
|
+
* and for non-openings. Defaulted so an older hub answer still parses.
|
|
22065
|
+
*/
|
|
22066
|
+
controllable: boolean().default(false)
|
|
22005
22067
|
});
|
|
22006
22068
|
var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
|
|
22007
22069
|
var NcAlarmSensorsSchema = object({
|
|
@@ -36098,38 +36160,52 @@ DeviceType.Camera, method(object({
|
|
|
36098
36160
|
deviceId: number(),
|
|
36099
36161
|
status: OsdStatusSchema
|
|
36100
36162
|
});
|
|
36163
|
+
_enum([
|
|
36164
|
+
"value",
|
|
36165
|
+
"unit",
|
|
36166
|
+
"full"
|
|
36167
|
+
]);
|
|
36168
|
+
_enum([
|
|
36169
|
+
"value+unit",
|
|
36170
|
+
"value",
|
|
36171
|
+
"unit"
|
|
36172
|
+
]);
|
|
36101
36173
|
/**
|
|
36102
|
-
*
|
|
36103
|
-
*
|
|
36104
|
-
*
|
|
36105
|
-
* SLOTS and writes literal text into one. It has no idea WHERE that text
|
|
36106
|
-
* comes from, and it must not — a driver that grew a "show the temperature
|
|
36107
|
-
* here" feature would grow it once per vendor.
|
|
36108
|
-
*
|
|
36109
|
-
* This cap owns the other half: a per-(camera, slot) BINDING that says
|
|
36110
|
-
* which value feeds the slot, how it is formatted, and under which
|
|
36111
|
-
* conditions it is shown at all. One addon renders every binding on every
|
|
36112
|
-
* camera, so a new source costs zero driver code.
|
|
36113
|
-
*
|
|
36114
|
-
* Three deliberate choices, each with a rejected alternative:
|
|
36115
|
-
*
|
|
36116
|
-
* 1. A source is `(capName, valuePath)` over the kernel's device
|
|
36117
|
-
* runtime-state mirror — NOT a closed enum of source kinds. Every
|
|
36118
|
-
* cap-keyed slice a device publishes is bindable the day the cap
|
|
36119
|
-
* ships. The rejected alternative (one enum member per source, with
|
|
36120
|
-
* a resolver branch each) is what makes "add the humidity too" a
|
|
36121
|
-
* code change.
|
|
36122
|
-
* 2. The display gate reuses `NcConditionsSchema` verbatim — the
|
|
36123
|
-
* notification centre's condition vocabulary — rather than a parallel
|
|
36124
|
-
* model. An operator who has learned one condition editor has learned
|
|
36125
|
-
* both.
|
|
36126
|
-
* 3. Because the renderer's facts are device STATE and not a detection
|
|
36127
|
-
* record, only a SUBSET of that vocabulary can be answered here.
|
|
36128
|
-
* `setSlotBinding` REJECTS the rest at write time (see
|
|
36129
|
-
* `getConditionSupport`). It does not accept-then-fail-closed: a
|
|
36130
|
-
* condition that can never be true renders a permanently blank
|
|
36131
|
-
* overlay, and a blank overlay looks exactly like a broken camera.
|
|
36174
|
+
* How the operator reached the leaf device. `deviceId` is ALWAYS the
|
|
36175
|
+
* OSD-supported leaf that is read; `containerId` is set when the pick
|
|
36176
|
+
* went through a container (gateway) first.
|
|
36132
36177
|
*/
|
|
36178
|
+
var OsdTemplatePickSchema = object({
|
|
36179
|
+
containerId: number().int().optional(),
|
|
36180
|
+
deviceId: number().int()
|
|
36181
|
+
});
|
|
36182
|
+
/**
|
|
36183
|
+
* One named binding inside a multi-device template: device path + unit
|
|
36184
|
+
* selection + precision. The parser expands `{alias}`, `{alias.value}`,
|
|
36185
|
+
* `{alias.unit}`, or `{alias.full}` from the same binding — there is no
|
|
36186
|
+
* per-binding format lock.
|
|
36187
|
+
*/
|
|
36188
|
+
var OsdTemplateBindingSchema = object({
|
|
36189
|
+
/** Token stem in the parser, e.g. `t` → `{t}` / `{t.value}`. Unique within the template. */
|
|
36190
|
+
alias: string().min(1).max(32).regex(/^[A-Za-z][A-Za-z0-9_-]*$/, "alias must start with a letter"),
|
|
36191
|
+
pick: OsdTemplatePickSchema,
|
|
36192
|
+
capName: string().min(1).max(64),
|
|
36193
|
+
valuePath: string().min(1).max(64),
|
|
36194
|
+
/** Convert TO this unit at render (`tryConvertUnit`). Absent = source unit. */
|
|
36195
|
+
displayUnit: string().max(16).optional(),
|
|
36196
|
+
maxDecimals: number().int().min(0).max(4).default(1)
|
|
36197
|
+
});
|
|
36198
|
+
/**
|
|
36199
|
+
* A named template: bindings (alias → leaf field) + a parser that
|
|
36200
|
+
* references `{alias}` / `{alias.value}` / `{alias.unit}` / `{alias.full}`.
|
|
36201
|
+
*/
|
|
36202
|
+
var OsdNamedTemplateSchema = object({
|
|
36203
|
+
id: string().min(1).max(64),
|
|
36204
|
+
name: string().min(1).max(64),
|
|
36205
|
+
bindings: array(OsdTemplateBindingSchema).max(32).default([]),
|
|
36206
|
+
/** Parser with alias placeholders, e.g. `{t.value} {t.unit} / {h}`. */
|
|
36207
|
+
parser: string().max(256).default("")
|
|
36208
|
+
});
|
|
36133
36209
|
/** Where a slot's value comes from. */
|
|
36134
36210
|
var OsdSourceSchema = discriminatedUnion("kind", [
|
|
36135
36211
|
object({
|
|
@@ -36148,11 +36224,17 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
36148
36224
|
deviceId: number().int().optional(),
|
|
36149
36225
|
capName: string().min(1).max(64),
|
|
36150
36226
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
36151
|
-
valuePath: string().min(1).max(64)
|
|
36227
|
+
valuePath: string().min(1).max(64),
|
|
36228
|
+
/** Convert TO this unit at render. Absent = no conversion. */
|
|
36229
|
+
displayUnit: string().max(16).optional()
|
|
36152
36230
|
}),
|
|
36153
36231
|
object({
|
|
36154
36232
|
kind: literal("latest-recognition"),
|
|
36155
36233
|
recognition: _enum(["person", "plate"])
|
|
36234
|
+
}),
|
|
36235
|
+
object({
|
|
36236
|
+
kind: literal("template"),
|
|
36237
|
+
templateId: string().min(1).max(64)
|
|
36156
36238
|
})
|
|
36157
36239
|
]);
|
|
36158
36240
|
var OsdSlotBindingSchema = object({
|
|
@@ -36168,7 +36250,10 @@ var OsdSlotBindingSchema = object({
|
|
|
36168
36250
|
* documented workaround for firmwares that reject `.` in overlay text.
|
|
36169
36251
|
*/
|
|
36170
36252
|
maxDecimals: number().int().min(0).max(4).default(1),
|
|
36171
|
-
/**
|
|
36253
|
+
/**
|
|
36254
|
+
* Appended via `${unit}` when no unit conversion produces a label.
|
|
36255
|
+
* Prefer `source.displayUnit` for converted device-state values.
|
|
36256
|
+
*/
|
|
36172
36257
|
unitLabel: string().max(8).optional(),
|
|
36173
36258
|
/** Raw value → display text, e.g. `{"true":"MOTION","false":""}`. */
|
|
36174
36259
|
valueMap: record(string(), string()).optional(),
|
|
@@ -36277,6 +36362,12 @@ method(object({ deviceId: number().int() }), object({
|
|
|
36277
36362
|
}), method(object({ deviceId: number().int() }), object({ results: array(OsdRenderResultSchema) }), {
|
|
36278
36363
|
kind: "mutation",
|
|
36279
36364
|
auth: "admin"
|
|
36365
|
+
}), method(object({}), object({ templates: array(OsdNamedTemplateSchema) }), { auth: "admin" }), method(object({ template: OsdNamedTemplateSchema }), object({ template: OsdNamedTemplateSchema }), {
|
|
36366
|
+
kind: "mutation",
|
|
36367
|
+
auth: "admin"
|
|
36368
|
+
}), method(object({ templateId: string().min(1).max(64) }), object({ success: literal(true) }), {
|
|
36369
|
+
kind: "mutation",
|
|
36370
|
+
auth: "admin"
|
|
36280
36371
|
});
|
|
36281
36372
|
/**
|
|
36282
36373
|
* Feeder connectivity / power status — mirrors the HA petkit device-status
|
|
@@ -47725,6 +47816,12 @@ Object.freeze({
|
|
|
47725
47816
|
addonId: null,
|
|
47726
47817
|
access: "create"
|
|
47727
47818
|
},
|
|
47819
|
+
"osdManager.deleteTemplate": {
|
|
47820
|
+
capName: "osd-manager",
|
|
47821
|
+
capScope: "system",
|
|
47822
|
+
addonId: null,
|
|
47823
|
+
access: "delete"
|
|
47824
|
+
},
|
|
47728
47825
|
"osdManager.getConditionSupport": {
|
|
47729
47826
|
capName: "osd-manager",
|
|
47730
47827
|
capScope: "system",
|
|
@@ -47743,6 +47840,12 @@ Object.freeze({
|
|
|
47743
47840
|
addonId: null,
|
|
47744
47841
|
access: "view"
|
|
47745
47842
|
},
|
|
47843
|
+
"osdManager.listTemplates": {
|
|
47844
|
+
capName: "osd-manager",
|
|
47845
|
+
capScope: "system",
|
|
47846
|
+
addonId: null,
|
|
47847
|
+
access: "view"
|
|
47848
|
+
},
|
|
47746
47849
|
"osdManager.previewSlot": {
|
|
47747
47850
|
capName: "osd-manager",
|
|
47748
47851
|
capScope: "system",
|
|
@@ -47761,6 +47864,12 @@ Object.freeze({
|
|
|
47761
47864
|
addonId: null,
|
|
47762
47865
|
access: "create"
|
|
47763
47866
|
},
|
|
47867
|
+
"osdManager.upsertTemplate": {
|
|
47868
|
+
capName: "osd-manager",
|
|
47869
|
+
capScope: "system",
|
|
47870
|
+
addonId: null,
|
|
47871
|
+
access: "create"
|
|
47872
|
+
},
|
|
47764
47873
|
"petFeeder.callPet": {
|
|
47765
47874
|
capName: "pet-feeder",
|
|
47766
47875
|
capScope: "device",
|
|
@@ -54341,6 +54450,18 @@ var ARMED_WORD_PREFIX = "armed_";
|
|
|
54341
54450
|
var ALARM_PANEL_CAP = "alarm-panel";
|
|
54342
54451
|
var ALARM_PANEL_TRIGGER_METHOD = "trigger";
|
|
54343
54452
|
/**
|
|
54453
|
+
* Opening caps that can be ACTUATED to a secure state on arm (close / lock /
|
|
54454
|
+
* off). Contacts are openings but not controllable — they only block.
|
|
54455
|
+
*/
|
|
54456
|
+
var NC_ALARM_CONTROLLABLE_CAPS = [
|
|
54457
|
+
"cover",
|
|
54458
|
+
"lock-control",
|
|
54459
|
+
"switch"
|
|
54460
|
+
];
|
|
54461
|
+
function isAlarmControllableCap(cap) {
|
|
54462
|
+
return NC_ALARM_CONTROLLABLE_CAPS.includes(cap);
|
|
54463
|
+
}
|
|
54464
|
+
/**
|
|
54344
54465
|
* A rule belongs to the alarm when its `deviceState` gate names ANY device's
|
|
54345
54466
|
* `armed_*` word, or an ENABLED `onTrigger` sequence pulls the alarm panel's
|
|
54346
54467
|
* trigger (D630).
|
|
@@ -54349,6 +54470,32 @@ function ruleBelongsToAlarm(rule) {
|
|
|
54349
54470
|
if ((rule.conditions.deviceState?.states ?? []).some((s) => s.trim().toLowerCase().startsWith(ARMED_WORD_PREFIX))) return true;
|
|
54350
54471
|
return (rule.onTrigger ?? []).some((sequence) => sequence.enabled && sequence.actions.some((step) => step.kind === "cap" && step.cap === ALARM_PANEL_CAP && step.method === ALARM_PANEL_TRIGGER_METHOD));
|
|
54351
54472
|
}
|
|
54473
|
+
/** Whether this controllable should be closed/locked/turned off on arm. */
|
|
54474
|
+
function alarmDeviceSecureOnArm(input) {
|
|
54475
|
+
if (!input.controllable) return false;
|
|
54476
|
+
return !input.secureOnArmOff.includes(input.deviceId);
|
|
54477
|
+
}
|
|
54478
|
+
/** The one secure command for a controllable opening cap, or null for contacts. */
|
|
54479
|
+
function secureActuationFor(cap) {
|
|
54480
|
+
if (!isAlarmControllableCap(cap)) return null;
|
|
54481
|
+
switch (cap) {
|
|
54482
|
+
case "cover": return {
|
|
54483
|
+
cap,
|
|
54484
|
+
method: "close",
|
|
54485
|
+
args: {}
|
|
54486
|
+
};
|
|
54487
|
+
case "lock-control": return {
|
|
54488
|
+
cap,
|
|
54489
|
+
method: "lock",
|
|
54490
|
+
args: {}
|
|
54491
|
+
};
|
|
54492
|
+
case "switch": return {
|
|
54493
|
+
cap,
|
|
54494
|
+
method: "setState",
|
|
54495
|
+
args: { on: false }
|
|
54496
|
+
};
|
|
54497
|
+
}
|
|
54498
|
+
}
|
|
54352
54499
|
var NC_ALARM_DELAY_FIELDS = [
|
|
54353
54500
|
"exitDelaySec",
|
|
54354
54501
|
"entryDelaySec",
|
|
@@ -54408,10 +54555,11 @@ function applyModeDelaysEdits(current, edits) {
|
|
|
54408
54555
|
return out.filter((e) => e.exitDelaySec !== void 0 || e.entryDelaySec !== void 0 || e.triggeredDurationSec !== void 0);
|
|
54409
54556
|
}
|
|
54410
54557
|
/**
|
|
54411
|
-
* Put ONE device on, or take it off, ONE mode's list. A no-op answers
|
|
54412
|
-
* to a full list is REFUSED by reason (never silently
|
|
54558
|
+
* Put ONE device on, or take it off, ONE mode's device-id list. A no-op answers
|
|
54559
|
+
* `changed: false`; an add to a full list is REFUSED by reason (never silently
|
|
54560
|
+
* dropped); an emptied list drops its entry.
|
|
54413
54561
|
*/
|
|
54414
|
-
function
|
|
54562
|
+
function applyModeDeviceListEdit(lists, edit) {
|
|
54415
54563
|
const copy = lists.map((l) => ({
|
|
54416
54564
|
mode: l.mode,
|
|
54417
54565
|
deviceIds: [...l.deviceIds]
|
|
@@ -54419,12 +54567,12 @@ function applyNonBlockingEdit(lists, edit) {
|
|
|
54419
54567
|
const at = copy.findIndex((l) => l.mode === edit.mode);
|
|
54420
54568
|
const held = at >= 0 ? copy[at]?.deviceIds ?? [] : [];
|
|
54421
54569
|
const present = held.includes(edit.deviceId);
|
|
54422
|
-
if (edit.
|
|
54570
|
+
if (edit.present === present) return {
|
|
54423
54571
|
kind: "applied",
|
|
54424
54572
|
lists: copy,
|
|
54425
54573
|
changed: false
|
|
54426
54574
|
};
|
|
54427
|
-
if (edit.
|
|
54575
|
+
if (edit.present) {
|
|
54428
54576
|
if (held.length >= 200) return {
|
|
54429
54577
|
kind: "refused",
|
|
54430
54578
|
reason: "list-full",
|
|
@@ -54451,6 +54599,35 @@ function applyNonBlockingEdit(lists, edit) {
|
|
|
54451
54599
|
};
|
|
54452
54600
|
}
|
|
54453
54601
|
/**
|
|
54602
|
+
* Put ONE device on, or take it off, ONE mode's non-blocking list.
|
|
54603
|
+
*/
|
|
54604
|
+
function applyNonBlockingEdit(lists, edit) {
|
|
54605
|
+
return applyModeDeviceListEdit(lists, {
|
|
54606
|
+
mode: edit.mode,
|
|
54607
|
+
deviceId: edit.deviceId,
|
|
54608
|
+
present: edit.nonBlocking
|
|
54609
|
+
});
|
|
54610
|
+
}
|
|
54611
|
+
/** Controllable opt-in to blocking. */
|
|
54612
|
+
function applyBlockingEdit(lists, edit) {
|
|
54613
|
+
return applyModeDeviceListEdit(lists, {
|
|
54614
|
+
mode: edit.mode,
|
|
54615
|
+
deviceId: edit.deviceId,
|
|
54616
|
+
present: edit.blocking
|
|
54617
|
+
});
|
|
54618
|
+
}
|
|
54619
|
+
/**
|
|
54620
|
+
* Controllable secure-on-arm: `secureOnArm: true` removes from the opt-out list;
|
|
54621
|
+
* `false` adds to it.
|
|
54622
|
+
*/
|
|
54623
|
+
function applySecureOnArmEdit(lists, edit) {
|
|
54624
|
+
return applyModeDeviceListEdit(lists, {
|
|
54625
|
+
mode: edit.mode,
|
|
54626
|
+
deviceId: edit.deviceId,
|
|
54627
|
+
present: !edit.secureOnArm
|
|
54628
|
+
});
|
|
54629
|
+
}
|
|
54630
|
+
/**
|
|
54454
54631
|
* WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
|
|
54455
54632
|
* persists (D640 "a sensor rule fires on the raise, the clear, or both").
|
|
54456
54633
|
*
|
|
@@ -56867,4 +57044,4 @@ function buildClipModelRegistry(entries) {
|
|
|
56867
57044
|
/** The built-in catalog's registry. */
|
|
56868
57045
|
var BUILTIN_CLIP_MODELS = buildClipModelRegistry(CLIP_IMAGE_MODELS);
|
|
56869
57046
|
//#endregion
|
|
56870
|
-
export { NC_ALARM_SYSTEM_EVENT_KINDS as $,
|
|
57047
|
+
export { NC_ALARM_SYSTEM_EVENT_KINDS as $, isVectorIndexDimConflict as $n, boolean as $r, SCENE_DEFAULT_UNCOVERED_POLICY as $t, EMBEDDING_REQUIREMENTS_FAILED as A, describeSystemEventDeliveryProblem as An, templateCarriesSummary as Ar, NcScheduleSchema as At, ListTrackRelationsInputSchema as B, failureContributionCapability as Bn, BaseAddon as Br, OPS_LOG_DEFAULT_LIMIT as Bt, DEFAULT_EVENT_COLOR as C, assertTimelapseCadences as Cn, storageOccupancyCapability as Cr, NcConditionDescriptorSchema as Ct, DeclaredDevices as D, consumableLowPercentOf as Dn, systemEventFilterApplies as Dr, NcRuleSchema as Dt, DETECTION_PIPELINE_CAP_NAME as E, buildEventKindDescriptor as En, systemEventFamilyProblems as Er, NcRulePatchSchema as Et, EXPORT_DENSE_MAX_RANGES as F, embeddingRequirementsFailedError as Fn, canonicalHash as Fr, NcSystemEventKindSchema as Ft, MAX_BIRTH_LATENCY_PROXY_MS as G, isDetectionMacroClass as Gn, hydrateSchema as Gr, RebuildObjectEmbeddingsRefusalSchema as Gt, LockStateSchema as H, gifFromMp4Args as Hn, createEvent as Hr, PoolMemoryWatchdog as Ht, FIRST_LEVEL_MACRO_CLASSES as I, embeddingRequirementsUnavailableError as In, evaluateSensorEdge as Ir, NcTaxonomySchema as It, MOTION_CLOSE_AFTER_MS as J, isMediaOwnerType as Jn, normalizeNodeId as Jr, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as Jt, MAX_TRACK_PURITIES as K, isEventOwnerType as Kn, isDeviceScopedCap as Kr, RetrainStatusSchema as Kt, FULL_IMAGE_BBOX as L, encodeVectorBase64 as Ln, isSourceCap as Lr, NcTemplatePreviewInputSchema as Lt, EVENT_DENSITY_BATCH_MAX as M, embeddingEncoderCapability as Mn, vectorDimFromBase64 as Mr, NcSnoozeSchema as Mt, EVENT_KIND_BY_CAP as N, embeddingModelFailedError as Nn, zoneAnalyticsCapability as Nr, NcSnoozeSuppressedSchema as Nt, DetectionSourceSchema as O, cosineSimilarity as On, systemEventSummaryScheduleOf as Or, NcRuleTargetSchema as Ot, EVENT_OWNER_TYPES as P, embeddingRefusalOf as Pn, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Pr, NcStateSummarySectionIdSchema as Pt, NC_ALARM_DELAY_MAX_SEC as Q, isSystemEventSummaryRule as Qn, array as Qr, SCENE_DEFAULT_QUIET_SECONDS as Qt, FailureCounters as R, evictionPolicyOfLocation as Rn, DeviceType as Rr, NcTemplatePreviewSchema as Rt, CoverStateSchema as S, applySecureOnArmEdit as Sn, servedTemplateVars as Sr, NcAlarmSettingsPatchSchema as St, DETECTION_MACRO_CLASSES as T, audioModeOf as Tn, systemEventDeliveryProblems as Tr, NcRuleInputSchema as Tt, MAX_ARCHIVED_DEBUG_NOTES as U, isAlarmControllableCap as Un, customAction as Ur, RECORDING_EXPORT_MAX_READ_BYTES as Ut, ListTrackRelationsResultSchema as V, gifDeriveSpeed as Vn, CamProfileSchema as Vr, OpsLogEntrySchema as Vt, MAX_BIRTH_DECISION_RECORDS as W, isAudioClassName as Wn, defineCustomActions as Wr, RECORDING_SOURCE_CAMSTACK_ADDON as Wt, MotionTriggeredBySchema as X, isScheduleActive as Xn, ZodObject as Xr, SCENE_DEFAULT_CHECK_INTERVAL_SEC as Xt, MediaFileKindEnum as Y, isRetiredClearKey as Yn, sleep as Yr, SCENE_DEFAULT_ANCHOR_THRESHOLD as Yt, NC_ALARM_DELAY_FIELDS as Z, isSystemDelivery as Zn, _enum as Zr, SCENE_DEFAULT_OBSERVATION_SPACING_SEC as Zt, BaseDevice as _, alarmDeviceSecureOnArm as _n, ruleGroupingApplies as _r, NC_TAXONOMY as _t, CLIP_EMBEDDING_STEP_ID as a, partialRecord as ai, SetTrackRelationInputSchema as an, parseProcStatus as ar, NC_CLIP_RETENTION_MAX_SEC as at, ClearTrackRelationInputSchema as b, applyModeDelaysEdits as bn, secureActuationFor as br, NcAlarmSensorsInputSchema as bt, resolveClusterModelPin as c, string as ci, TimelapseRuleInputSchema as cn, readDeviceStateFrom as cr, NC_CONSUMABLE_SYSTEM_EVENT_KINDS as ct, APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT as d, union as di, TrackPuritySchema as dn, resolveClipSearchMinScore as dr, NC_GROUPING_MAX_SEC as dt, discriminatedUnion as ei, SCENE_DIVERGED as en, kebabToCamel as er, NC_ALARM_TRIGGERED_MAX_SEC as et, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT as f, unknown as fi, TrackRelationKindSchema as fn, resolveLocationMode as fr, NC_GROUPING_MIN_SEC as ft, BIRTH_DECISION_DEFAULT_LIMIT as g, addonWidgetsSourceCapability as gn, ruleDeviceCompatCapQueries as gr, NC_TANK_SYSTEM_EVENT_KINDS as gt, ArchivedDebugNoteSchema as h, TrackSourceSchema as hn, ruleBelongsToAlarm as hr, NC_SYSTEM_EVENT_KIND_GROUP_SPECS as ht, CLIP_TEXT_MODELS as i, object as ii, SetTrackPurityResultSchema as in, occupancyScope as ir, NC_CLIP_PRE_ROLL_DEFAULT_SEC as it, EMBEDDING_REQUIREMENTS_UNAVAILABLE as j, describeSystemEventFamilyProblem as jn, templateVarsFor as jr, NcSnoozeInputSchema as jt, EMBEDDING_MODEL_FAILED as k, deriveRecordingMode as kn, systemEventSummarySplitOf as kr, NcRuleUpdateInputSchema as kt, APPEARANCE_BIN_COUNT as l, templateLiteral as li, TimelapseRulePatchSchema as ln, readMotionTriggeredBy as lr, NC_DEFAULT_SNOOZE_MINUTES as lt, AlarmArmModeSchema as m, TrackSideSchema as mn, resolvePoolMemoryPolicy as mr, NC_SNOOZE_MAX_MINUTES as mt, DEFAULT_CLIP_MODEL as n, looseObject as ni, SceneMonitorSchema as nn, memoizePinnedFfmpeg as nr, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT as nt, FACE_EMBEDDING_STEP_ID as o, record as oi, TIMELAPSE_DENSE_FLOOR_SEC as on, pipelineAnalyticsCapability as or, NC_CONDITION_CATALOG as ot, AUDIO_MACRO_LABELS as p, EventCategory as pi, TrackRelationSchema as pn, resolveModeDelays as pr, NC_SENSOR_TRANSITION_KINDS as pt, MAX_TRACK_RELATIONS as q, isKnownTemplateVar as qn, nodePin as qr, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX as qt, CLIP_IMAGE_MODELS as r, number as ri, SetTrackPurityInputSchema as rn, notificationRulesCapability as rr, NC_CLIP_POST_ROLL_DEFAULT_SEC as rt, readClusterModelPinStrict as s, strictObject as si, TRACK_RELATIONS_DEFAULT_LIMIT as sn, plateGalleryCapability as sr, NC_CONSUMABLE_LOW_PERCENT_DEFAULT as st, BUILTIN_CLIP_MODELS as t, literal as ti, SCENE_RESET_RECAPTURES as tn, mayWriteToLocation as tr, NC_AUDIO_CONFIRM_HITS_DEFAULT as tt, APPEARANCE_BLOCKS as u, tuple as ui, TimelapseRuleSchema as un, readTimelapseGeneratedAt as ur, NC_GROUPING_DEFAULT_SEC as ut, BirthDecisionRecordSchema as v, alarmPanelCapability as vn, ruleKindOf as vr, NC_TEMPLATE_VARS as vt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as w, audioMetricsCapability as wn, subKindsOf as wr, NcConditionsSchema as wt, ClearTrackRelationResultSchema as x, applyNonBlockingEdit as xn, sensorRaisedOf as xr, NcAlarmSensorsSchema as xt, COCO_TO_MACRO as y, applyBlockingEdit as yn, sceneMonitorCapability as yr, NcAlarmConfigSchema as yt, LabelAttributionSchema as z, faceGalleryCapability as zn, errMsg as zr, NcTemplateVarDescriptorSchema as zt };
|