@camstack/addon-post-analysis 1.2.280 → 1.2.281
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/{dist-VeiAavYR.js → dist-BtqlSCQT.js} +397 -23
- package/dist/{dist-Z6AO1MsY.mjs → dist-DkERzZfY.mjs} +368 -24
- 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-C_C1P6Bk.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-d-u88SNA.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-OkXjMLHG.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-B62fofgN.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BA7N1yDM.mjs} +1 -1
- package/dist/pipeline-analytics/{hostInit-B5__n3rE.mjs → hostInit-Cq_8hgwY.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +156 -2
- package/dist/pipeline-analytics/index.mjs +156 -2
- 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-DBnj0lb3.mjs +0 -26
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
2
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
@@ -7567,6 +7568,39 @@ function sleep(ms) {
|
|
|
7567
7568
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
7568
7569
|
}
|
|
7569
7570
|
//#endregion
|
|
7571
|
+
//#region ../types/dist/canonical-hash-CPK2Dy60.mjs
|
|
7572
|
+
/**
|
|
7573
|
+
* Deterministic SHA-256 hash of an arbitrary serialisable value. The
|
|
7574
|
+
* canonical form sorts object keys alphabetically at every depth so two
|
|
7575
|
+
* structurally-equal inputs with different key insertion orders produce
|
|
7576
|
+
* the same hash. Returns a 64-char lowercase hex digest.
|
|
7577
|
+
*
|
|
7578
|
+
* Used by export adapters (Alexa, HAP) to short-circuit re-discovery /
|
|
7579
|
+
* accessory-rebuild work when the upstream shape is byte-identical to
|
|
7580
|
+
* the last applied state — preventing user-visible "re-discovery"
|
|
7581
|
+
* notifications on every addon-runner respawn. Each respawn re-fires
|
|
7582
|
+
* `DeviceBindingsChanged` for every cap registration, which without
|
|
7583
|
+
* this guard would propagate redundant pushes.
|
|
7584
|
+
*
|
|
7585
|
+
* Note: this is a SYMPTOMATIC fix layered on top of the binding-change
|
|
7586
|
+
* subscription. The proper fix is a single "device ready" lifecycle
|
|
7587
|
+
* barrier so exports react only when the full cap set has landed —
|
|
7588
|
+
* tracked separately for post-HA-integration work.
|
|
7589
|
+
*/
|
|
7590
|
+
function canonicalHash(value) {
|
|
7591
|
+
const canonical = JSON.stringify(value, replaceWithSortedKeys);
|
|
7592
|
+
return createHash("sha256").update(canonical ?? "").digest("hex");
|
|
7593
|
+
}
|
|
7594
|
+
function replaceWithSortedKeys(_key, value) {
|
|
7595
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
7596
|
+
const obj = value;
|
|
7597
|
+
const out = {};
|
|
7598
|
+
for (const k of Object.keys(obj).toSorted()) out[k] = obj[k];
|
|
7599
|
+
return out;
|
|
7600
|
+
}
|
|
7601
|
+
return value;
|
|
7602
|
+
}
|
|
7603
|
+
//#endregion
|
|
7570
7604
|
//#region ../types/dist/err-msg-IQTHeDzc.mjs
|
|
7571
7605
|
/**
|
|
7572
7606
|
import { errMsg } from '@camstack/types'
|
|
@@ -18965,9 +18999,29 @@ var NcTestResultSchema = object({
|
|
|
18965
18999
|
className: string().optional(),
|
|
18966
19000
|
label: string().optional()
|
|
18967
19001
|
});
|
|
18968
|
-
/** The
|
|
18969
|
-
*
|
|
19002
|
+
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
|
|
19003
|
+
* same union; the template-vars spec pins the two together. `mixed` is DERIVED
|
|
19004
|
+
* (a stored system rule whose kinds span families, D637) and never authored. */
|
|
18970
19005
|
var NcRuleKindSchema = _enum([
|
|
19006
|
+
"detection",
|
|
19007
|
+
"sensor",
|
|
19008
|
+
"occupancy",
|
|
19009
|
+
"sound",
|
|
19010
|
+
"device-events",
|
|
19011
|
+
"system",
|
|
19012
|
+
"alarm",
|
|
19013
|
+
"mixed"
|
|
19014
|
+
]);
|
|
19015
|
+
/**
|
|
19016
|
+
* The kinds a SERVED template-variable descriptor may name: the five that
|
|
19017
|
+
* existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
|
|
19018
|
+
* installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
|
|
19019
|
+
* strict five-member enum — one `device-events` in one descriptor fails the
|
|
19020
|
+
* whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
|
|
19021
|
+
* `templateVarKindApplies` reads a `system` descriptor as applying to every
|
|
19022
|
+
* system rule kind (`device-events`, `system`, `alarm`, `mixed`).
|
|
19023
|
+
*/
|
|
19024
|
+
var NcTemplateVarKindSchema = _enum([
|
|
18971
19025
|
"detection",
|
|
18972
19026
|
"sensor",
|
|
18973
19027
|
"occupancy",
|
|
@@ -19005,7 +19059,7 @@ var NcTemplateVarGroupSchema = _enum([
|
|
|
19005
19059
|
*
|
|
19006
19060
|
* `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
|
|
19007
19061
|
* it has a value; absent = no restriction on that axis. `systemEventKinds` is
|
|
19008
|
-
* read only for a
|
|
19062
|
+
* read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
|
|
19009
19063
|
* (`count_<class>`): the descriptor's `name` is the example member.
|
|
19010
19064
|
*/
|
|
19011
19065
|
var NcTemplateVarDescriptorSchema = object({
|
|
@@ -19016,7 +19070,7 @@ var NcTemplateVarDescriptorSchema = object({
|
|
|
19016
19070
|
group: NcTemplateVarGroupSchema,
|
|
19017
19071
|
families: array(NcTemplateFamilySchema).min(1),
|
|
19018
19072
|
fields: array(NcTemplateFieldSchema).optional(),
|
|
19019
|
-
kinds: array(
|
|
19073
|
+
kinds: array(NcTemplateVarKindSchema).optional(),
|
|
19020
19074
|
deliveries: array(NcDeliverySchema).optional(),
|
|
19021
19075
|
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
19022
19076
|
dynamic: object({
|
|
@@ -33169,7 +33223,30 @@ var RenameNodeResultSchema = object({
|
|
|
33169
33223
|
nodeId: string(),
|
|
33170
33224
|
name: string()
|
|
33171
33225
|
});
|
|
33172
|
-
|
|
33226
|
+
/**
|
|
33227
|
+
* The cheap node list. A consumer's rule for a STORED node id (a rule's
|
|
33228
|
+
* `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
|
|
33229
|
+
* as a removable chip labelled unknown, never drop it (D49). Even a complete
|
|
33230
|
+
* list omits a node that joined and left between two history captures, so a
|
|
33231
|
+
* missing id means "not known to the hub", never "removed". Only the operator
|
|
33232
|
+
* removes it.
|
|
33233
|
+
*
|
|
33234
|
+
* `complete` changes only the WORDING: `false` = no history read has ever
|
|
33235
|
+
* answered, so the list may be missing offline nodes the hub does know (D315).
|
|
33236
|
+
*
|
|
33237
|
+
* `name` is the history row's name (≤ 30 s behind a rename), or the id when
|
|
33238
|
+
* the history has none.
|
|
33239
|
+
*/
|
|
33240
|
+
var NodeDirectorySchema = object({
|
|
33241
|
+
nodes: array(object({
|
|
33242
|
+
id: string(),
|
|
33243
|
+
name: string(),
|
|
33244
|
+
isHub: boolean(),
|
|
33245
|
+
isOnline: boolean()
|
|
33246
|
+
})).readonly(),
|
|
33247
|
+
complete: boolean()
|
|
33248
|
+
});
|
|
33249
|
+
method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(_void(), NodeDirectorySchema, { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
|
|
33173
33250
|
kind: "mutation",
|
|
33174
33251
|
auth: "admin"
|
|
33175
33252
|
}), method(NodeAddonInputSchema, SuccessSchema, {
|
|
@@ -44695,6 +44772,12 @@ Object.freeze({
|
|
|
44695
44772
|
addonId: null,
|
|
44696
44773
|
access: "create"
|
|
44697
44774
|
},
|
|
44775
|
+
"nodes.directory": {
|
|
44776
|
+
capName: "nodes",
|
|
44777
|
+
capScope: "system",
|
|
44778
|
+
addonId: null,
|
|
44779
|
+
access: "view"
|
|
44780
|
+
},
|
|
44698
44781
|
"nodes.executeQuery": {
|
|
44699
44782
|
capName: "nodes",
|
|
44700
44783
|
capScope: "system",
|
|
@@ -50479,6 +50562,253 @@ function audioModeOf(value) {
|
|
|
50479
50562
|
return null;
|
|
50480
50563
|
}
|
|
50481
50564
|
new Set(["devices", "classes"]);
|
|
50565
|
+
/** Every filter, for the callers that must cover all four (guards, tests). */
|
|
50566
|
+
var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
50567
|
+
"deviceIds",
|
|
50568
|
+
"deviceTypes",
|
|
50569
|
+
"nodeIds",
|
|
50570
|
+
"packageNames"
|
|
50571
|
+
];
|
|
50572
|
+
/**
|
|
50573
|
+
* Does `filter` say anything about `kind`?
|
|
50574
|
+
*
|
|
50575
|
+
* `false` means the filter is not part of this kind's vocabulary: the engine
|
|
50576
|
+
* ignores it and an editor hides its input. It never means "excluded".
|
|
50577
|
+
*/
|
|
50578
|
+
function systemEventFilterApplies(kind, filter) {
|
|
50579
|
+
switch (filter) {
|
|
50580
|
+
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind === "alarm-triggered";
|
|
50581
|
+
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind";
|
|
50582
|
+
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated";
|
|
50583
|
+
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "server-updated";
|
|
50584
|
+
}
|
|
50585
|
+
}
|
|
50586
|
+
/**
|
|
50587
|
+
* WHICH FAMILY every system-event kind belongs to, and which narrowing filters
|
|
50588
|
+
* each family may carry: one table, read by the hub validator, by `ruleKindOf`
|
|
50589
|
+
* and by both rule editors (D637).
|
|
50590
|
+
*
|
|
50591
|
+
* A system rule used to be one editor for thirty-one kinds and five filters.
|
|
50592
|
+
* "Eventi di sistema" carried battery kinds under a liveness `deviceTypes` filter
|
|
50593
|
+
* and went silent for two weeks (D636). The three families are three questions:
|
|
50594
|
+
* about devices, about the installation, and about the alarm panel. A rule
|
|
50595
|
+
* answers one of them. The engine never needed to know, and it still does not:
|
|
50596
|
+
* a mixed stored rule keeps firing. Only AUTHORING is strict.
|
|
50597
|
+
*
|
|
50598
|
+
* The legacy `camera-*` tail has no family (`null`). It is parsed, never produced,
|
|
50599
|
+
* never offered.
|
|
50600
|
+
*/
|
|
50601
|
+
var NC_SYSTEM_EVENT_FAMILIES = [
|
|
50602
|
+
"device-events",
|
|
50603
|
+
"system",
|
|
50604
|
+
"alarm"
|
|
50605
|
+
];
|
|
50606
|
+
function isSystemEventFamily(value) {
|
|
50607
|
+
return NC_SYSTEM_EVENT_FAMILIES.some((family) => family === value);
|
|
50608
|
+
}
|
|
50609
|
+
/** Total over the enum: a kind added to the cap without a family fails tsc here. */
|
|
50610
|
+
var NC_SYSTEM_EVENT_FAMILY = {
|
|
50611
|
+
"device-online": "device-events",
|
|
50612
|
+
"device-offline": "device-events",
|
|
50613
|
+
"device-disabled": "device-events",
|
|
50614
|
+
"device-enabled": "device-events",
|
|
50615
|
+
"device-battery-low": "device-events",
|
|
50616
|
+
"device-battery-normal": "device-events",
|
|
50617
|
+
"device-consumable-low": "device-events",
|
|
50618
|
+
"device-consumable-normal": "device-events",
|
|
50619
|
+
"stream-online": "device-events",
|
|
50620
|
+
"stream-offline": "device-events",
|
|
50621
|
+
"detection-blind": "device-events",
|
|
50622
|
+
"node-online": "system",
|
|
50623
|
+
"node-offline": "system",
|
|
50624
|
+
"node-inference-unavailable": "system",
|
|
50625
|
+
"addon-crash-loop": "system",
|
|
50626
|
+
"addon-update-available": "system",
|
|
50627
|
+
"addon-updated": "system",
|
|
50628
|
+
"server-update-available": "system",
|
|
50629
|
+
"server-updated": "system",
|
|
50630
|
+
"wrapper-update-available": "system",
|
|
50631
|
+
"backup-completed": "system",
|
|
50632
|
+
"export-completed": "system",
|
|
50633
|
+
"alarm-triggered": "alarm",
|
|
50634
|
+
"alarm-armed": "alarm",
|
|
50635
|
+
"alarm-disarmed": "alarm",
|
|
50636
|
+
"alarm-arming": "alarm",
|
|
50637
|
+
"alarm-arm-refused": "alarm",
|
|
50638
|
+
"alarm-pending": "alarm",
|
|
50639
|
+
"alarm-rearmed": "alarm",
|
|
50640
|
+
"alarm-sensor-bypass": "alarm",
|
|
50641
|
+
"alarm-check-failed": "alarm",
|
|
50642
|
+
"camera-online": null,
|
|
50643
|
+
"camera-offline": null,
|
|
50644
|
+
"camera-disabled": null,
|
|
50645
|
+
"camera-enabled": null
|
|
50646
|
+
};
|
|
50647
|
+
new Map(Object.entries(NC_SYSTEM_EVENT_FAMILY));
|
|
50648
|
+
var NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS = [...NC_SYSTEM_EVENT_FILTER_KEYS, "excludeDeviceIds"];
|
|
50649
|
+
/**
|
|
50650
|
+
* The filters a family may carry. The four base filters are the union of
|
|
50651
|
+
* `systemEventFilterApplies` over the family's kinds (the spec pins that
|
|
50652
|
+
* equality). `excludeDeviceIds` is a device-events filter only: an alarm is
|
|
50653
|
+
* narrowed to the camera that triggered it and excludes nothing.
|
|
50654
|
+
*/
|
|
50655
|
+
var NC_SYSTEM_EVENT_FAMILY_FILTERS = {
|
|
50656
|
+
"device-events": [
|
|
50657
|
+
"deviceIds",
|
|
50658
|
+
"excludeDeviceIds",
|
|
50659
|
+
"deviceTypes"
|
|
50660
|
+
],
|
|
50661
|
+
system: ["nodeIds", "packageNames"],
|
|
50662
|
+
alarm: ["deviceIds"]
|
|
50663
|
+
};
|
|
50664
|
+
var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
50665
|
+
{
|
|
50666
|
+
id: "device-state",
|
|
50667
|
+
family: "device-events",
|
|
50668
|
+
label: "Device state",
|
|
50669
|
+
kinds: [
|
|
50670
|
+
"device-offline",
|
|
50671
|
+
"device-online",
|
|
50672
|
+
"device-disabled",
|
|
50673
|
+
"device-enabled"
|
|
50674
|
+
]
|
|
50675
|
+
},
|
|
50676
|
+
{
|
|
50677
|
+
id: "streams",
|
|
50678
|
+
family: "device-events",
|
|
50679
|
+
label: "Streams",
|
|
50680
|
+
kinds: ["stream-offline", "stream-online"]
|
|
50681
|
+
},
|
|
50682
|
+
{
|
|
50683
|
+
id: "battery",
|
|
50684
|
+
family: "device-events",
|
|
50685
|
+
label: "Battery",
|
|
50686
|
+
kinds: ["device-battery-low", "device-battery-normal"]
|
|
50687
|
+
},
|
|
50688
|
+
{
|
|
50689
|
+
id: "consumables",
|
|
50690
|
+
family: "device-events",
|
|
50691
|
+
label: "Consumables",
|
|
50692
|
+
kinds: ["device-consumable-low", "device-consumable-normal"]
|
|
50693
|
+
},
|
|
50694
|
+
{
|
|
50695
|
+
id: "detection-blind",
|
|
50696
|
+
family: "device-events",
|
|
50697
|
+
label: "Detecting nothing",
|
|
50698
|
+
kinds: ["detection-blind"]
|
|
50699
|
+
},
|
|
50700
|
+
{
|
|
50701
|
+
id: "nodes",
|
|
50702
|
+
family: "system",
|
|
50703
|
+
label: "Nodes",
|
|
50704
|
+
kinds: [
|
|
50705
|
+
"node-offline",
|
|
50706
|
+
"node-online",
|
|
50707
|
+
"node-inference-unavailable"
|
|
50708
|
+
]
|
|
50709
|
+
},
|
|
50710
|
+
{
|
|
50711
|
+
id: "addons",
|
|
50712
|
+
family: "system",
|
|
50713
|
+
label: "Addons",
|
|
50714
|
+
kinds: [
|
|
50715
|
+
"addon-crash-loop",
|
|
50716
|
+
"addon-update-available",
|
|
50717
|
+
"addon-updated"
|
|
50718
|
+
]
|
|
50719
|
+
},
|
|
50720
|
+
{
|
|
50721
|
+
id: "updates",
|
|
50722
|
+
family: "system",
|
|
50723
|
+
label: "Server & container updates",
|
|
50724
|
+
kinds: [
|
|
50725
|
+
"server-update-available",
|
|
50726
|
+
"server-updated",
|
|
50727
|
+
"wrapper-update-available"
|
|
50728
|
+
]
|
|
50729
|
+
},
|
|
50730
|
+
{
|
|
50731
|
+
id: "backups-exports",
|
|
50732
|
+
family: "system",
|
|
50733
|
+
label: "Backups & exports",
|
|
50734
|
+
kinds: ["backup-completed", "export-completed"]
|
|
50735
|
+
},
|
|
50736
|
+
{
|
|
50737
|
+
id: "alarm",
|
|
50738
|
+
family: "alarm",
|
|
50739
|
+
label: "Alarm",
|
|
50740
|
+
kinds: NC_ALARM_SYSTEM_EVENT_KINDS
|
|
50741
|
+
}
|
|
50742
|
+
];
|
|
50743
|
+
function systemEventKindsOfFamily(family) {
|
|
50744
|
+
return NC_SYSTEM_EVENT_KIND_GROUP_SPECS.filter((g) => g.family === family).flatMap((g) => g.kinds);
|
|
50745
|
+
}
|
|
50746
|
+
/**
|
|
50747
|
+
* Why the hub refuses this condition on a new or updated rule. Empty = accepted.
|
|
50748
|
+
* Families are reported in `NC_SYSTEM_EVENT_FAMILIES` order, and filters in
|
|
50749
|
+
* `NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS` order, so a refusal reads the same
|
|
50750
|
+
* every time.
|
|
50751
|
+
*/
|
|
50752
|
+
function systemEventFamilyProblems(condition) {
|
|
50753
|
+
if (condition === void 0 || condition.kinds.length === 0) return [{ code: "no-kinds" }];
|
|
50754
|
+
const problems = [];
|
|
50755
|
+
const present = /* @__PURE__ */ new Set();
|
|
50756
|
+
for (const kind of condition.kinds) {
|
|
50757
|
+
const family = NC_SYSTEM_EVENT_FAMILY[kind];
|
|
50758
|
+
if (family === null) problems.push({
|
|
50759
|
+
code: "legacy-kind",
|
|
50760
|
+
kind
|
|
50761
|
+
});
|
|
50762
|
+
else present.add(family);
|
|
50763
|
+
}
|
|
50764
|
+
const families = NC_SYSTEM_EVENT_FAMILIES.filter((f) => present.has(f));
|
|
50765
|
+
if (families.length > 1) problems.push({
|
|
50766
|
+
code: "mixed-families",
|
|
50767
|
+
families
|
|
50768
|
+
});
|
|
50769
|
+
const [family] = families;
|
|
50770
|
+
if (families.length !== 1 || family === void 0) return problems;
|
|
50771
|
+
const allowed = NC_SYSTEM_EVENT_FAMILY_FILTERS[family];
|
|
50772
|
+
for (const filter of NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS) if (condition[filter] !== void 0 && !allowed.includes(filter)) problems.push({
|
|
50773
|
+
code: "filter-outside-family",
|
|
50774
|
+
filter,
|
|
50775
|
+
family
|
|
50776
|
+
});
|
|
50777
|
+
return problems;
|
|
50778
|
+
}
|
|
50779
|
+
function describeSystemEventFamilyProblem(problem) {
|
|
50780
|
+
switch (problem.code) {
|
|
50781
|
+
case "no-kinds": return "a system-event rule needs at least one event kind";
|
|
50782
|
+
case "legacy-kind": return `'${problem.kind}' is a legacy kind and cannot be authored`;
|
|
50783
|
+
case "mixed-families": return `event kinds span ${problem.families.join(" + ")} — one rule per family`;
|
|
50784
|
+
case "filter-outside-family": return `filter '${problem.filter}' is not allowed on a ${problem.family} rule`;
|
|
50785
|
+
}
|
|
50786
|
+
}
|
|
50787
|
+
/** Every kind a `system-event` rule can derive — the three families and `mixed`. */
|
|
50788
|
+
var NC_SYSTEM_RULE_KINDS = [
|
|
50789
|
+
"device-events",
|
|
50790
|
+
"system",
|
|
50791
|
+
"alarm",
|
|
50792
|
+
"mixed"
|
|
50793
|
+
];
|
|
50794
|
+
/** Is this a kind a `system-event` rule derives (any family, or `mixed`)? */
|
|
50795
|
+
function isSystemRuleKind(kind) {
|
|
50796
|
+
return NC_SYSTEM_RULE_KINDS.some((k) => k === kind);
|
|
50797
|
+
}
|
|
50798
|
+
/** The family a kind authors, or undefined (a camera kind, or `mixed`). */
|
|
50799
|
+
function systemFamilyOfKind(kind) {
|
|
50800
|
+
return isSystemEventFamily(kind) ? kind : void 0;
|
|
50801
|
+
}
|
|
50802
|
+
/** The delivery a system rule rides — named once, compared everywhere. */
|
|
50803
|
+
var NC_SYSTEM_DELIVERY = "system-event";
|
|
50804
|
+
/**
|
|
50805
|
+
* Is this a SYSTEM rule — one about the installation rather than about anything
|
|
50806
|
+
* a camera saw? Takes a plain `string` so a rule carrying a delivery this build
|
|
50807
|
+
* has never heard of still gets an answer instead of a type error.
|
|
50808
|
+
*/
|
|
50809
|
+
function isSystemDelivery(delivery) {
|
|
50810
|
+
return delivery === NC_SYSTEM_DELIVERY;
|
|
50811
|
+
}
|
|
50482
50812
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
50483
50813
|
var WEEKDAY_TO_DAY = {
|
|
50484
50814
|
Sun: 0,
|
|
@@ -51277,10 +51607,38 @@ var CAPTION_VARS = {
|
|
|
51277
51607
|
function onAxis(declared, asked) {
|
|
51278
51608
|
return declared === void 0 || asked === void 0 || declared.includes(asked);
|
|
51279
51609
|
}
|
|
51280
|
-
|
|
51281
|
-
|
|
51610
|
+
/**
|
|
51611
|
+
* Does a descriptor declared for `declared` kinds have a value for a rule of
|
|
51612
|
+
* `kind`?
|
|
51613
|
+
*
|
|
51614
|
+
* `system` on the WIRE stands for every system rule kind (D637): the served
|
|
51615
|
+
* catalog keeps the five pre-D637 tokens so installed viewers still parse it
|
|
51616
|
+
* (`NcTemplateVarKindSchema`), and the family split lives here, in the match.
|
|
51617
|
+
* Exported so the admin's local interpreter of the served catalog asks the
|
|
51618
|
+
* same question instead of restating it.
|
|
51619
|
+
*/
|
|
51620
|
+
function templateVarKindApplies(declared, kind) {
|
|
51621
|
+
if (declared === void 0 || kind === void 0) return true;
|
|
51622
|
+
if (declared.some((k) => k === kind)) return true;
|
|
51623
|
+
return isSystemRuleKind(kind) && declared.includes("system");
|
|
51624
|
+
}
|
|
51625
|
+
/**
|
|
51626
|
+
* Is a descriptor that names `systemEventKinds` on the event-kind axis of a
|
|
51627
|
+
* system rule? Read only for a system rule kind; any other kind ignores it.
|
|
51628
|
+
*
|
|
51629
|
+
* Event kinds chosen: the descriptor must speak about one of them. None chosen
|
|
51630
|
+
* yet: a FAMILY kind watches its own family's event kinds (a device-events rule
|
|
51631
|
+
* is never offered the alarm's `{{mode}}`), and `mixed` watches all of them.
|
|
51632
|
+
*/
|
|
51633
|
+
function templateVarSystemEventApplies(d, ctx) {
|
|
51634
|
+
if (!isSystemRuleKind(ctx.kind) || d.systemEventKinds === void 0) return true;
|
|
51635
|
+
const declared = d.systemEventKinds;
|
|
51282
51636
|
const asked = ctx.systemEventKinds ?? [];
|
|
51283
|
-
|
|
51637
|
+
if (asked.length > 0) return asked.some((k) => declared.includes(k));
|
|
51638
|
+
const family = ctx.kind === void 0 ? void 0 : systemFamilyOfKind(ctx.kind);
|
|
51639
|
+
if (family === void 0) return true;
|
|
51640
|
+
const own = systemEventKindsOfFamily(family);
|
|
51641
|
+
return declared.some((k) => own.includes(k));
|
|
51284
51642
|
}
|
|
51285
51643
|
/**
|
|
51286
51644
|
* The variables that have a value in `ctx`, in catalog order. Pure.
|
|
@@ -51294,27 +51652,13 @@ function templateVarsFor(ctx) {
|
|
|
51294
51652
|
const allowed = CAPTION_VARS[ctx.field];
|
|
51295
51653
|
return NC_TEMPLATE_VARS.filter((d) => d.families.includes(ctx.family) && allowed.includes(d.name) && d.dynamic === void 0);
|
|
51296
51654
|
}
|
|
51297
|
-
return NC_TEMPLATE_VARS.filter((d) => d.families.includes(ctx.family) && onAxis(d.fields, ctx.field) &&
|
|
51655
|
+
return NC_TEMPLATE_VARS.filter((d) => d.families.includes(ctx.family) && onAxis(d.fields, ctx.field) && templateVarKindApplies(d.kinds, ctx.kind) && onAxis(d.deliveries, ctx.delivery) && templateVarSystemEventApplies(d, ctx));
|
|
51298
51656
|
}
|
|
51299
51657
|
/** True when `name` is supplied in `ctx`, dynamic families (`count_<class>`) included. */
|
|
51300
51658
|
function isKnownTemplateVar(name, ctx) {
|
|
51301
51659
|
return templateVarsFor(ctx).some((d) => d.dynamic !== void 0 ? name.startsWith(d.dynamic.prefix) && name.length > d.dynamic.prefix.length : d.name === name);
|
|
51302
51660
|
}
|
|
51303
51661
|
/**
|
|
51304
|
-
* Does `filter` say anything about `kind`?
|
|
51305
|
-
*
|
|
51306
|
-
* `false` means the filter is not part of this kind's vocabulary: the engine
|
|
51307
|
-
* ignores it and an editor hides its input. It never means "excluded".
|
|
51308
|
-
*/
|
|
51309
|
-
function systemEventFilterApplies(kind, filter) {
|
|
51310
|
-
switch (filter) {
|
|
51311
|
-
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind === "alarm-triggered" || kind === "export-completed";
|
|
51312
|
-
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind";
|
|
51313
|
-
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated";
|
|
51314
|
-
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "server-updated";
|
|
51315
|
-
}
|
|
51316
|
-
}
|
|
51317
|
-
/**
|
|
51318
51662
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
51319
51663
|
*
|
|
51320
51664
|
* Spec: `docs/superpowers/specs/2026-07-24-nc-occupancy-timelapse-design.md`
|
|
@@ -52318,4 +52662,4 @@ function vectorDimFromBase64(encoded) {
|
|
|
52318
52662
|
return Math.floor(Buffer.from(encoded, "base64").byteLength / 4);
|
|
52319
52663
|
}
|
|
52320
52664
|
//#endregion
|
|
52321
|
-
export {
|
|
52665
|
+
export { RECORDING_EXPORT_MAX_READ_BYTES as $, vectorDimFromBase64 as $t, NC_SNOOZE_MAX_MINUTES as A, isKnownTemplateVar as At, NcRuleTargetSchema as B, pickClusterStepModels as Bt, MAX_BIRTH_DECISION_RECORDS as C, unknown as Cn, evaluateSensorEdge as Ct, NC_ALARM_SYSTEM_EVENT_KINDS as D, hfModelUrl as Dt, MediaFileKindEnum as E, failureContributionCapability as Et, NcConditionDescriptorSchema as F, kebabToCamel as Ft, NcSnoozeSuppressedSchema as G, resolveLocationMode as Gt, NcScheduleSchema as H, plateGalleryCapability as Ht, NcConditionsSchema as I, mayWriteToLocation as It, NcTemplatePreviewInputSchema as J, storageOccupancyCapability as Jt, NcSystemEventKindSchema as K, resolvePoolMemoryPolicy as Kt, NcRuleInputSchema as L, notificationRulesCapability as Lt, NC_TEMPLATE_VARS as M, isScheduleActive as Mt, NcAlarmConfigSchema as N, isSourceCap as Nt, NC_CONDITION_CATALOG as O, isDetectionMacroClass as Ot, NcAlarmSettingsPatchSchema as P, isSystemDelivery as Pt, PoolMemoryWatchdog as Q, templateVarsFor as Qt, NcRulePatchSchema as R, occupancyScope as Rt, MAX_ARCHIVED_DEBUG_NOTES as S, string as Sn, encodeVectorBase64 as St, MOTION_CLOSE_AFTER_MS as T, faceGalleryCapability as Tt, NcSnoozeInputSchema as U, readDeviceStateFrom as Ut, NcRuleUpdateInputSchema as V, pipelineAnalyticsCapability as Vt, NcSnoozeSchema as W, readTimelapseGeneratedAt as Wt, NcTemplateVarDescriptorSchema as X, systemEventFamilyProblems as Xt, NcTemplatePreviewSchema as Y, subKindsOf as Yt, OpsLogEntrySchema as Z, systemEventFilterApplies as Zt, FIRST_LEVEL_MACRO_CLASSES as _, literal as _n, buildEventKindDescriptor as _t, BirthDecisionRecordSchema as a, DeviceType as an, SCENE_DIVERGED as at, LabelAttributionSchema as b, partialRecord as bn, describeSystemEventFamilyProblem as bt, CoverStateSchema as c, defineCustomActions as cn, TimelapseRuleInputSchema as ct, DEFAULT_TIMELAPSE_PREVIEW_TEXT as d, nodePin as dn, TrackSourceSchema as dt, zoneAnalyticsCapability as en, RECORDING_SOURCE_CAMSTACK_ADDON as et, DETECTION_MACRO_CLASSES as f, sleep as fn, addonWidgetsSourceCapability as ft, EVENT_OWNER_TYPES as g, discriminatedUnion as gn, audioModeOf as gt, EVENT_KIND_BY_CAP as h, boolean as hn, audioMetricsCapability as ht, BaseDevice as i, CamProfileSchema as in, SCENE_DEFAULT_UNCOVERED_POLICY as it, NC_TAXONOMY as j, isMediaOwnerType as jt, NC_DEFAULT_SNOOZE_MINUTES as k, isEventOwnerType as kt, DEFAULT_EVENT_COLOR as l, hydrateSchema as ln, TimelapseRulePatchSchema as lt, DeclaredDevices as m, array as mn, assertTimelapseCadences as mt, AlarmArmModeSchema as n, canonicalHash as nn, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as nt, CLUSTER_MODEL_SCOPED_STEPS as o, createEvent as on, SceneMonitorSchema as ot, DETECTION_PIPELINE_CAP_NAME as p, _enum as pn, alarmPanelCapability as pt, NcTaxonomySchema as q, sceneMonitorCapability as qt, ArchivedDebugNoteSchema as r, BaseAddon as rn, SCENE_DEFAULT_ANCHOR_THRESHOLD as rt, COCO_TO_MACRO as s, customAction as sn, TIMELAPSE_DENSE_FLOOR_SEC as st, AUDIO_MACRO_LABELS as t, errMsg as tn, RetrainStatusSchema as tt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as u, isDeviceScopedCap as un, TimelapseRuleSchema as ut, FULL_IMAGE_BBOX as v, number as vn, cosineSimilarity as vt, MAX_BIRTH_LATENCY_PROXY_MS as w, EventCategory as wn, evictionPolicyOfLocation as wt, LockStateSchema as x, record as xn, embeddingEncoderCapability as xt, FailureCounters as y, object as yn, deriveRecordingMode as yt, NcRuleSchema as z, parseProcStatus as zt };
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-BtqlSCQT.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
node_fs = require_dist.__toESM(node_fs);
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as hfModelUrl, Kt as resolvePoolMemoryPolicy, Q as PoolMemoryWatchdog, rn as BaseAddon, xt as embeddingEncoderCapability, zt as parseProcStatus } from "../dist-DkERzZfY.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs";
|
|
2
2
|
import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
|
|
3
|
-
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
3
|
+
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BA7N1yDM.mjs";
|
|
4
4
|
import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
|
|
5
|
-
import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
5
|
+
import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-OkXjMLHG.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
7
7
|
var v = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), y = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), b = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), x = (e) => {
|
|
8
8
|
let t = b(e);
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.255",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.204",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_pipeline_analytics_widgets",
|