@camstack/addon-admin-ui 1.2.50 → 1.2.52
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/assets/AddLocationWizard-ByfVTf7z.js +1 -0
- package/dist/assets/{AddonCollectionPage-CT4Vuznz.js → AddonCollectionPage-BuFuYYvJ.js} +1 -1
- package/dist/assets/{Addons-B_VbpsZA.js → Addons-DDEVSb9E.js} +1 -1
- package/dist/assets/{AdminTabs-DDFIqZNV.js → AdminTabs-Bpp49XUt.js} +1 -1
- package/dist/assets/AiProfiles-DyI1sGHM.js +1 -0
- package/dist/assets/{BrokerForm-zPB5Fz9g.js → BrokerForm-CN34GcQh.js} +1 -1
- package/dist/assets/Build-6KbkAmwC.js +32 -0
- package/dist/assets/{Capabilities-C3BMCiwV.js → Capabilities-D-DpTlWs.js} +1 -1
- package/dist/assets/CapabilityBadges-CHhrKMvk.js +1 -0
- package/dist/assets/Cluster-CM4RcSfn.js +1 -0
- package/dist/assets/Data-BsrNNDe4.js +1 -0
- package/dist/assets/{DetectionIntelligence-BM6Ux7Vq.js → DetectionIntelligence-wwS6t-iu.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-BA_SP-HR.js → DeviceAggregateSection-m7QBjvw1.js} +1 -1
- package/dist/assets/DeviceDetail-BRqNfgrV.js +2 -0
- package/dist/assets/{Devices-8u3JIqxr.js → Devices-C_Iy-1DY.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-aI1hmuAW.js → EmbedPlayerPage-BzJREYPg.js} +1 -1
- package/dist/assets/Events-CIAJeuGc.js +1 -0
- package/dist/assets/{FormBuilder-Uk2TiLIL.js → FormBuilder-8G0bykRV.js} +1 -1
- package/dist/assets/{Identity-9KqXr-j2.js → Identity-CKFcxYAD.js} +1 -1
- package/dist/assets/IntegrationDetail-CYO9evSX.js +1 -0
- package/dist/assets/Integrations-DIbr02Wd.js +1 -0
- package/dist/assets/{Integrations-B6hH0gGV.js → Integrations-DvDVnh_e.js} +1 -1
- package/dist/assets/{Logs-CVDkHZNL.js → Logs-DSbrNopM.js} +1 -1
- package/dist/assets/{MotionZonesSettings-CeR5VdHF.js → MotionZonesSettings-DhmylyWm.js} +1 -1
- package/dist/assets/{MyAccess-C1g595ov.js → MyAccess-2qf_vuZX.js} +1 -1
- package/dist/assets/{Network-Cq9iMt-S.js → Network-DM6W1cMH.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BbU0zWTj.js → NodeAddonsSettingsPanel-OlYGh17A.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-zGiwPb9S.js → NodeInferenceDevices-D0dCWFuM.js} +1 -1
- package/dist/assets/Notifications-B57yS_N9.js +1 -0
- package/dist/assets/Pipeline-C36d_bUf.js +1 -0
- package/dist/assets/{Plates-pdxHQLhg.js → Plates-CaE-1mzS.js} +1 -1
- package/dist/assets/PrivacyMaskSettings-CKW0LV6c.js +1 -0
- package/dist/assets/{ProviderIcon-CSWSCcb3.js → ProviderIcon-CtnmYlEc.js} +1 -1
- package/dist/assets/Recordings-DN7GpdSr.js +1 -0
- package/dist/assets/{ScanNetworkModal-C9QX2cIu.js → ScanNetworkModal-D_uWkwpW.js} +1 -1
- package/dist/assets/{Settings-DCIeWgXU.js → Settings-BHNismMH.js} +1 -1
- package/dist/assets/{Showroom-C2_dUzIt.js → Showroom-DAfTzeRJ.js} +1 -1
- package/dist/assets/{Terminal-GcYPpGIe.js → Terminal-ChPkNmcT.js} +2 -2
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DSCIiy8m.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-C4v0_fvJ.js} +1 -1
- package/dist/assets/bell-ring-B89FuVzx.js +1 -0
- package/dist/assets/{boxes-Doq7E83T.js → boxes-E67TckHL.js} +1 -1
- package/dist/assets/{build-cluster-graph-DR3K68id.js → build-cluster-graph-C9P8BH_Y.js} +1 -1
- package/dist/assets/circle-check-big-6KqLnh7I.js +1 -0
- package/dist/assets/{circle-x-F4_6Z6hp.js → circle-x-BOCM3Jay.js} +1 -1
- package/dist/assets/clock-BB5ZlM4P.js +1 -0
- package/dist/assets/{copy-D7L611bm.js → copy-BAh4BimG.js} +1 -1
- package/dist/assets/{debounced-invalidate-Cwz58epM.js → debounced-invalidate-B6n92LfS.js} +1 -1
- package/dist/assets/{dist-ByLBDbZ0.js → dist-DMs8CJMG.js} +1 -1
- package/dist/assets/dist-ujytOS_T.js +345 -0
- package/dist/assets/{download-DK6K1z5p.js → download-NchcTrNY.js} +1 -1
- package/dist/assets/{face-bbox-B9bqau8Q.js → face-bbox-CxWVEvLH.js} +1 -1
- package/dist/assets/{hard-drive-hP5NrPld.js → hard-drive-v3gsMgpj.js} +1 -1
- package/dist/assets/{hostInit-BEKkUU_i.js → hostInit-BsdExvxu.js} +1 -1
- package/dist/assets/{index-Dm9Uz1f0.js → index-DOGqQOnC.js} +3 -3
- package/dist/assets/index-DchMAgXl.css +2 -0
- package/dist/assets/{key-round-Cj7KTTaR.js → key-round-B8nOHuYS.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-ae1d8899.js → mf-entry-bootstrap-0-fb7d830c.js} +2 -2
- package/dist/assets/{pencil-DzxpzCXv.js → pencil-sz3vITXt.js} +1 -1
- package/dist/assets/play-BO_n_04H.js +1 -0
- package/dist/assets/{player-overlays-Cs56mPfn.js → player-overlays-35cjLMFQ.js} +1 -1
- package/dist/assets/plus-CzPndm5P.js +1 -0
- package/dist/assets/power-DFi-GnjG.js +1 -0
- package/dist/assets/{radio-BKHpiLrH.js → radio-DyOU1pqI.js} +1 -1
- package/dist/assets/{refresh-cw-BSZWNnN4.js → refresh-cw-yJ3BGqhW.js} +1 -1
- package/dist/assets/remoteEntry-DhlUKvH0.js +1 -0
- package/dist/assets/rotate-ccw-B2UqNaB5.js +1 -0
- package/dist/assets/rotate-cw-Ceq0Xutw.js +1 -0
- package/dist/assets/search-Djlmih4W.js +1 -0
- package/dist/assets/{send-BbwJgyZU.js → send-ibgpXPAd.js} +1 -1
- package/dist/assets/{server-6BSkkWM_.js → server-W3u0QEGh.js} +1 -1
- package/dist/assets/square-BhLZ-0MF.js +1 -0
- package/dist/assets/{square-check-big-CVctePO-.js → square-check-big-N3hx4ccu.js} +1 -1
- package/dist/assets/src-C9Wl4IAv.js +345 -0
- package/dist/assets/src-DfTnwu3m.js +67 -0
- package/dist/assets/{undo-2-QajNXpI1.js → undo-2-03JG1b2r.js} +1 -1
- package/dist/assets/{upload-COZK66d7.js → upload-PhcvMnIf.js} +1 -1
- package/dist/assets/{useEventInvalidation-BNRoP33J.js → useEventInvalidation-ChMOpmx7.js} +1 -1
- package/dist/assets/video-D3jIKSxB.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CEAjda8_.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-2K3VQBSZ.js} +2 -2
- package/dist/assets/{wifi-BgmKj3zj.js → wifi-D-m2AtcE.js} +1 -1
- package/dist/assets/zap-FMbpMlZh.js +1 -0
- package/dist/index.html +6 -6
- package/dist/server/addon.js +561 -35
- package/package.json +1 -1
- package/dist/assets/AddLocationWizard-CooAni_i.js +0 -1
- package/dist/assets/AiProfiles-BzCtQi16.js +0 -1
- package/dist/assets/Build-C0IybqDl.js +0 -32
- package/dist/assets/CapabilityBadges-DKhByP_7.js +0 -1
- package/dist/assets/Cluster-BkqBoEsE.js +0 -1
- package/dist/assets/Data-aHHRJZhH.js +0 -1
- package/dist/assets/DeviceDetail-Bl4Y9PYy.js +0 -2
- package/dist/assets/Events-e_Q_LwJ5.js +0 -1
- package/dist/assets/IntegrationDetail-CeUR9Dyx.js +0 -1
- package/dist/assets/Integrations-BM-jkcfI.js +0 -1
- package/dist/assets/Notifications-D4RCvVQj.js +0 -1
- package/dist/assets/Pipeline-ClchQ6CM.js +0 -1
- package/dist/assets/PrivacyMaskSettings-9kxvi7tM.js +0 -1
- package/dist/assets/Recordings-CBMphQh7.js +0 -1
- package/dist/assets/circle-check-big-DCUpDJJ8.js +0 -1
- package/dist/assets/clock-C4ln4UIx.js +0 -1
- package/dist/assets/dist-C4ma4NyY.js +0 -345
- package/dist/assets/index-DfbxOmzG.css +0 -2
- package/dist/assets/play-CWNgmzrn.js +0 -1
- package/dist/assets/plus-B-ylzENt.js +0 -1
- package/dist/assets/power-DxUwR0ke.js +0 -1
- package/dist/assets/remoteEntry-O0N1CtRD.js +0 -1
- package/dist/assets/rotate-ccw-BfMMeeIh.js +0 -1
- package/dist/assets/rotate-cw-BbHvbnfD.js +0 -1
- package/dist/assets/search-DhjInNkL.js +0 -1
- package/dist/assets/square-KmrQB4nC.js +0 -1
- package/dist/assets/src-Bch8B6OR.js +0 -345
- package/dist/assets/src-V00nU2Tb.js +0 -67
- package/dist/assets/zap-BZasYUgo.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -7574,7 +7574,15 @@ var RecordingConfigSchema = object({
|
|
|
7574
7574
|
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7575
7575
|
* addon surface.
|
|
7576
7576
|
*/
|
|
7577
|
+
/**
|
|
7578
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7579
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7580
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7581
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7582
|
+
* runs at all.
|
|
7583
|
+
*/
|
|
7577
7584
|
var RelocateJobStateSchema = _enum([
|
|
7585
|
+
"queued",
|
|
7578
7586
|
"running",
|
|
7579
7587
|
"done",
|
|
7580
7588
|
"failed",
|
|
@@ -7609,6 +7617,15 @@ var RelocateFootageInputSchema = object({
|
|
|
7609
7617
|
/** Limits relocation to the logical profile class. Omit only for the
|
|
7610
7618
|
* pre-orchestration compatibility path. */
|
|
7611
7619
|
footageClass: RelocateFootageClassSchema.optional(),
|
|
7620
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7621
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7622
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7623
|
+
deviceId: number().int().optional(),
|
|
7624
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7625
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7626
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7627
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7628
|
+
profiles: array(string()).optional(),
|
|
7612
7629
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7613
7630
|
* never allowed to starve live writers. */
|
|
7614
7631
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
@@ -13875,6 +13892,13 @@ var MaskGridDimsSchema = object({
|
|
|
13875
13892
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13876
13893
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13877
13894
|
* one trigger.
|
|
13895
|
+
*
|
|
13896
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13897
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13898
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13899
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13900
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13901
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13878
13902
|
*/
|
|
13879
13903
|
var NcDeliverySchema = _enum([
|
|
13880
13904
|
"immediate",
|
|
@@ -13889,15 +13913,32 @@ var NcDeliverySchema = _enum([
|
|
|
13889
13913
|
* depend on a provider's raw event name or payload shape.
|
|
13890
13914
|
*/
|
|
13891
13915
|
var NcSystemEventKindSchema = _enum([
|
|
13892
|
-
"
|
|
13893
|
-
"
|
|
13916
|
+
"device-online",
|
|
13917
|
+
"device-offline",
|
|
13918
|
+
"device-disabled",
|
|
13919
|
+
"device-enabled",
|
|
13894
13920
|
"stream-online",
|
|
13895
13921
|
"stream-offline",
|
|
13896
13922
|
"node-online",
|
|
13897
13923
|
"node-offline",
|
|
13898
13924
|
"addon-update-available",
|
|
13899
|
-
"server-update-available"
|
|
13925
|
+
"server-update-available",
|
|
13926
|
+
"alarm-triggered",
|
|
13927
|
+
"alarm-armed",
|
|
13928
|
+
"alarm-disarmed",
|
|
13929
|
+
"camera-online",
|
|
13930
|
+
"camera-offline",
|
|
13931
|
+
"camera-disabled",
|
|
13932
|
+
"camera-enabled"
|
|
13933
|
+
]);
|
|
13934
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13935
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13936
|
+
"camera-online",
|
|
13937
|
+
"camera-offline",
|
|
13938
|
+
"camera-disabled",
|
|
13939
|
+
"camera-enabled"
|
|
13900
13940
|
]);
|
|
13941
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13901
13942
|
/**
|
|
13902
13943
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13903
13944
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13906,6 +13947,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13906
13947
|
var NcSystemEventConditionSchema = object({
|
|
13907
13948
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13908
13949
|
deviceIds: array(number().int()).min(1).optional(),
|
|
13950
|
+
/**
|
|
13951
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
13952
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
13953
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
13954
|
+
*
|
|
13955
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
13956
|
+
* one reason: the intake cannot know which devices this household cares
|
|
13957
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
13958
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
13959
|
+
* does not carry) matches no `deviceTypes` list.
|
|
13960
|
+
*/
|
|
13961
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13909
13962
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13910
13963
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13911
13964
|
});
|
|
@@ -13956,6 +14009,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13956
14009
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13957
14010
|
});
|
|
13958
14011
|
/**
|
|
14012
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14013
|
+
*
|
|
14014
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14015
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14016
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14017
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14018
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14019
|
+
*
|
|
14020
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14021
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14022
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14023
|
+
*
|
|
14024
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14025
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14026
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14027
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14028
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14029
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14030
|
+
* ZodEffects the cap path would have to special-case).
|
|
14031
|
+
*
|
|
14032
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14033
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14034
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14035
|
+
* `samplingSeconds` decorative.
|
|
14036
|
+
*
|
|
14037
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14038
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14039
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14040
|
+
* an operator who typed `dog` mean the same thing.
|
|
14041
|
+
*/
|
|
14042
|
+
var NcAudioConditionSchema = object({
|
|
14043
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14044
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14045
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14046
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14047
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14048
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14049
|
+
/** Length of the sampling window in seconds. */
|
|
14050
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14051
|
+
});
|
|
14052
|
+
/**
|
|
13959
14053
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13960
14054
|
*
|
|
13961
14055
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14228,7 +14322,33 @@ var NcConditionsSchema = object({
|
|
|
14228
14322
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14229
14323
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14230
14324
|
*/
|
|
14231
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14325
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14326
|
+
/**
|
|
14327
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14328
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14329
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14330
|
+
* a window that is not full yet, neither filter given). See
|
|
14331
|
+
* {@link NcAudioCondition}.
|
|
14332
|
+
*
|
|
14333
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14334
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14335
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14336
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14337
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14338
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14339
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14340
|
+
*
|
|
14341
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14342
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14343
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14344
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14345
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14346
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14347
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14348
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14349
|
+
* does an audio rule become authorable.
|
|
14350
|
+
*/
|
|
14351
|
+
audio: NcAudioConditionSchema.optional()
|
|
14232
14352
|
});
|
|
14233
14353
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14234
14354
|
var NcRuleTargetSchema = object({
|
|
@@ -14342,6 +14462,73 @@ var NcThrottleSchema = object({
|
|
|
14342
14462
|
*/
|
|
14343
14463
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14344
14464
|
});
|
|
14465
|
+
/**
|
|
14466
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14467
|
+
* it judges may be.
|
|
14468
|
+
*
|
|
14469
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14470
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14471
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14472
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14473
|
+
* tokens for pixels the model pools away.
|
|
14474
|
+
*/
|
|
14475
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14476
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14477
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14478
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14479
|
+
var NcConfirmExpectSchema = object({
|
|
14480
|
+
op: _enum([
|
|
14481
|
+
">=",
|
|
14482
|
+
">",
|
|
14483
|
+
"<=",
|
|
14484
|
+
"<",
|
|
14485
|
+
"=="
|
|
14486
|
+
]),
|
|
14487
|
+
count: number().int().min(0).max(1e3)
|
|
14488
|
+
});
|
|
14489
|
+
/**
|
|
14490
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14491
|
+
* to ship and says whether it agrees with the rule.
|
|
14492
|
+
*
|
|
14493
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14494
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14495
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14496
|
+
*
|
|
14497
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14498
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14499
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14500
|
+
* open looks in the log exactly like a gate that works.
|
|
14501
|
+
*
|
|
14502
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14503
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14504
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14505
|
+
* above rather than trusting a parse it may never have seen.
|
|
14506
|
+
*/
|
|
14507
|
+
var NcConfirmSchema = object({
|
|
14508
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14509
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14510
|
+
enabled: boolean().default(false),
|
|
14511
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14512
|
+
profileId: string().optional(),
|
|
14513
|
+
/**
|
|
14514
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14515
|
+
* from the rule (its class and its expectation).
|
|
14516
|
+
*
|
|
14517
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14518
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14519
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14520
|
+
* turn and only rule-authored words land here.
|
|
14521
|
+
*/
|
|
14522
|
+
prompt: string().max(1e3).optional(),
|
|
14523
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14524
|
+
* own boolean verdict decides. */
|
|
14525
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14526
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14527
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14528
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14529
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14530
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14531
|
+
});
|
|
14345
14532
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14346
14533
|
var NcRuleInputSchema = object({
|
|
14347
14534
|
name: string().min(1).max(200),
|
|
@@ -14402,7 +14589,13 @@ var NcRuleInputSchema = object({
|
|
|
14402
14589
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14403
14590
|
* shape as every other actuation.
|
|
14404
14591
|
*/
|
|
14405
|
-
actions: NcRuleActionsSchema.optional()
|
|
14592
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14593
|
+
/**
|
|
14594
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14595
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14596
|
+
* did, and absent is the only way to say that without a migration.
|
|
14597
|
+
*/
|
|
14598
|
+
confirm: NcConfirmSchema.optional()
|
|
14406
14599
|
});
|
|
14407
14600
|
/**
|
|
14408
14601
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14413,7 +14606,37 @@ var NcRuleInputSchema = object({
|
|
|
14413
14606
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14414
14607
|
* `updateRule` patch.
|
|
14415
14608
|
*/
|
|
14416
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14609
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14610
|
+
disabledTargetIds: array(string()).optional(),
|
|
14611
|
+
/**
|
|
14612
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14613
|
+
*
|
|
14614
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14615
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14616
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14617
|
+
* one — which made every partial edit destructive:
|
|
14618
|
+
*
|
|
14619
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14620
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14621
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14622
|
+
*
|
|
14623
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14624
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14625
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14626
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14627
|
+
* within a minute of a two-field patch.
|
|
14628
|
+
*
|
|
14629
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14630
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14631
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14632
|
+
* absent key is now genuinely absent.
|
|
14633
|
+
*/
|
|
14634
|
+
enabled: boolean().optional(),
|
|
14635
|
+
conditions: NcConditionsSchema.optional(),
|
|
14636
|
+
media: NcMediaPolicySchema.optional(),
|
|
14637
|
+
throttle: NcThrottleSchema.optional(),
|
|
14638
|
+
priority: number().int().min(1).max(5).optional()
|
|
14639
|
+
});
|
|
14417
14640
|
/** A persisted rule. */
|
|
14418
14641
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14419
14642
|
id: string(),
|
|
@@ -14714,6 +14937,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14714
14937
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14715
14938
|
* copy would lie the first time a rule is disabled.
|
|
14716
14939
|
*/
|
|
14940
|
+
/**
|
|
14941
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
14942
|
+
*
|
|
14943
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
14944
|
+
* per-camera notification switch the Notification Center already owns,
|
|
14945
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
14946
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
14947
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
14948
|
+
* with the switches the operator actually used.
|
|
14949
|
+
*/
|
|
14950
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
14951
|
+
"muted",
|
|
14952
|
+
"detection-off",
|
|
14953
|
+
"offline"
|
|
14954
|
+
]);
|
|
14955
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
14956
|
+
deviceId: number().int(),
|
|
14957
|
+
reason: NcAlarmSkipReasonSchema
|
|
14958
|
+
});
|
|
14717
14959
|
var NcAlarmModeCoverageSchema = object({
|
|
14718
14960
|
mode: AlarmArmModeSchema,
|
|
14719
14961
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14721,7 +14963,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14721
14963
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14722
14964
|
allDevices: boolean(),
|
|
14723
14965
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14724
|
-
deviceIds: array(number().int())
|
|
14966
|
+
deviceIds: array(number().int()),
|
|
14967
|
+
/**
|
|
14968
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
14969
|
+
* excludes it.
|
|
14970
|
+
*
|
|
14971
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
14972
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
14973
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
14974
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
14975
|
+
* alarm tab.
|
|
14976
|
+
*/
|
|
14977
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14725
14978
|
});
|
|
14726
14979
|
var NcAlarmConfigSchema = object({
|
|
14727
14980
|
/**
|
|
@@ -23038,7 +23291,19 @@ var RecordingManifestSchema = object({
|
|
|
23038
23291
|
* profiles/subtrees/locations on this node). */
|
|
23039
23292
|
var RecordingDeviceUsageSchema = object({
|
|
23040
23293
|
deviceId: number(),
|
|
23041
|
-
usedBytes: number()
|
|
23294
|
+
usedBytes: number(),
|
|
23295
|
+
/**
|
|
23296
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23297
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23298
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23299
|
+
*
|
|
23300
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23301
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23302
|
+
* field must keep validating that older provider's payload: the framework
|
|
23303
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23304
|
+
* the later of the two.
|
|
23305
|
+
*/
|
|
23306
|
+
oldestMs: number().nullable().optional()
|
|
23042
23307
|
});
|
|
23043
23308
|
/** Recording storage usage + capacity for one storage location. */
|
|
23044
23309
|
var RecordingLocationUsageSchema = object({
|
|
@@ -23066,6 +23331,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
23066
23331
|
locations: array(RecordingLocationUsageSchema)
|
|
23067
23332
|
});
|
|
23068
23333
|
/**
|
|
23334
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23335
|
+
*
|
|
23336
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23337
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23338
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23339
|
+
* location, run FIFO behind the single-flight mover.
|
|
23340
|
+
*
|
|
23341
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23342
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23343
|
+
* (empty on the plan).
|
|
23344
|
+
*/
|
|
23345
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23346
|
+
deviceId: number(),
|
|
23347
|
+
profile: string(),
|
|
23348
|
+
fromLocationId: string(),
|
|
23349
|
+
toLocationId: string(),
|
|
23350
|
+
bytes: number(),
|
|
23351
|
+
files: number().int()
|
|
23352
|
+
});
|
|
23353
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23354
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23355
|
+
* that had nothing to do. */
|
|
23356
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23357
|
+
"unassigned",
|
|
23358
|
+
"target-not-writable",
|
|
23359
|
+
"below-threshold",
|
|
23360
|
+
"no-headroom"
|
|
23361
|
+
]);
|
|
23362
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23363
|
+
deviceId: number(),
|
|
23364
|
+
profile: string(),
|
|
23365
|
+
fromLocationId: string(),
|
|
23366
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23367
|
+
toLocationId: string().nullable(),
|
|
23368
|
+
bytes: number(),
|
|
23369
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23370
|
+
});
|
|
23371
|
+
var RecordingRebalancePlanSchema = object({
|
|
23372
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23373
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23374
|
+
bytesToMove: number(),
|
|
23375
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23376
|
+
jobIds: array(string())
|
|
23377
|
+
});
|
|
23378
|
+
var RecordingRebalanceInputSchema = object({
|
|
23379
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23380
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23381
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23382
|
+
minMoveGb: number().min(0).optional()
|
|
23383
|
+
});
|
|
23384
|
+
/**
|
|
23069
23385
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
23070
23386
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
23071
23387
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23228,6 +23544,21 @@ method(object({
|
|
|
23228
23544
|
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23229
23545
|
kind: "mutation",
|
|
23230
23546
|
auth: "admin"
|
|
23547
|
+
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23548
|
+
kind: "mutation",
|
|
23549
|
+
auth: "admin"
|
|
23550
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
23551
|
+
kind: "query",
|
|
23552
|
+
auth: "admin"
|
|
23553
|
+
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23554
|
+
kind: "mutation",
|
|
23555
|
+
auth: "admin"
|
|
23556
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23557
|
+
kind: "query",
|
|
23558
|
+
auth: "admin"
|
|
23559
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23560
|
+
kind: "mutation",
|
|
23561
|
+
auth: "admin"
|
|
23231
23562
|
});
|
|
23232
23563
|
/**
|
|
23233
23564
|
* `recording-export` cap — render a footage time range into a single downloadable
|
|
@@ -23246,13 +23577,24 @@ method(object({
|
|
|
23246
23577
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23247
23578
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23248
23579
|
/**
|
|
23249
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23580
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23250
23581
|
*
|
|
23251
|
-
*
|
|
23252
|
-
*
|
|
23253
|
-
*
|
|
23254
|
-
*
|
|
23255
|
-
*
|
|
23582
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
23583
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
23584
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
23585
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
23586
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
23587
|
+
* the render side knows the segments, so the translation lives there
|
|
23588
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
23589
|
+
*
|
|
23590
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
23591
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
23592
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
23593
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
23594
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
23595
|
+
*
|
|
23596
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
23597
|
+
* call site responsible for the same subtraction.
|
|
23256
23598
|
*/
|
|
23257
23599
|
var ExportDenseRangeSchema = object({
|
|
23258
23600
|
fromSec: number().nonnegative(),
|
|
@@ -28571,6 +28913,12 @@ Object.freeze({
|
|
|
28571
28913
|
addonId: null,
|
|
28572
28914
|
access: "create"
|
|
28573
28915
|
},
|
|
28916
|
+
"recording.cancelRelocateJob": {
|
|
28917
|
+
capName: "recording",
|
|
28918
|
+
capScope: "system",
|
|
28919
|
+
addonId: null,
|
|
28920
|
+
access: "create"
|
|
28921
|
+
},
|
|
28574
28922
|
"recording.cancelStorageMigrationMove": {
|
|
28575
28923
|
capName: "recording",
|
|
28576
28924
|
capScope: "system",
|
|
@@ -28625,6 +28973,12 @@ Object.freeze({
|
|
|
28625
28973
|
addonId: null,
|
|
28626
28974
|
access: "view"
|
|
28627
28975
|
},
|
|
28976
|
+
"recording.listRelocateJobs": {
|
|
28977
|
+
capName: "recording",
|
|
28978
|
+
capScope: "system",
|
|
28979
|
+
addonId: null,
|
|
28980
|
+
access: "view"
|
|
28981
|
+
},
|
|
28628
28982
|
"recording.locateSegment": {
|
|
28629
28983
|
capName: "recording",
|
|
28630
28984
|
capScope: "system",
|
|
@@ -28637,6 +28991,12 @@ Object.freeze({
|
|
|
28637
28991
|
addonId: null,
|
|
28638
28992
|
access: "create"
|
|
28639
28993
|
},
|
|
28994
|
+
"recording.planStorageRebalance": {
|
|
28995
|
+
capName: "recording",
|
|
28996
|
+
capScope: "system",
|
|
28997
|
+
addonId: null,
|
|
28998
|
+
access: "view"
|
|
28999
|
+
},
|
|
28640
29000
|
"recording.pruneFootage": {
|
|
28641
29001
|
capName: "recording",
|
|
28642
29002
|
capScope: "system",
|
|
@@ -28661,6 +29021,12 @@ Object.freeze({
|
|
|
28661
29021
|
addonId: null,
|
|
28662
29022
|
access: "create"
|
|
28663
29023
|
},
|
|
29024
|
+
"recording.relocateFootage": {
|
|
29025
|
+
capName: "recording",
|
|
29026
|
+
capScope: "system",
|
|
29027
|
+
addonId: null,
|
|
29028
|
+
access: "create"
|
|
29029
|
+
},
|
|
28664
29030
|
"recording.renderClip": {
|
|
28665
29031
|
capName: "recording",
|
|
28666
29032
|
capScope: "system",
|
|
@@ -28697,6 +29063,12 @@ Object.freeze({
|
|
|
28697
29063
|
addonId: null,
|
|
28698
29064
|
access: "create"
|
|
28699
29065
|
},
|
|
29066
|
+
"recording.startStorageRebalance": {
|
|
29067
|
+
capName: "recording",
|
|
29068
|
+
capScope: "system",
|
|
29069
|
+
addonId: null,
|
|
29070
|
+
access: "create"
|
|
29071
|
+
},
|
|
28700
29072
|
"recordingExport.cancelExport": {
|
|
28701
29073
|
capName: "recording-export",
|
|
28702
29074
|
capScope: "system",
|
|
@@ -30111,6 +30483,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
30111
30483
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
30112
30484
|
var PriorityField = number().int().min(1).max(5);
|
|
30113
30485
|
/**
|
|
30486
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30487
|
+
*
|
|
30488
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30489
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30490
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30491
|
+
*
|
|
30492
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30493
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30494
|
+
*
|
|
30495
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30496
|
+
*
|
|
30497
|
+
* so a 7 s pass at 1 s / 12 fps is 0.58 s of video, and at 0.5 s it is 1.17 s.
|
|
30498
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30499
|
+
* and therefore the length of a quiet night, does not move.
|
|
30500
|
+
*
|
|
30501
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30502
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30503
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30504
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30505
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30506
|
+
*/
|
|
30507
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30508
|
+
/**
|
|
30509
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30510
|
+
*
|
|
30511
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30512
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30513
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30514
|
+
* that range every ~583 ms.
|
|
30515
|
+
*
|
|
30516
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30517
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30518
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30519
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30520
|
+
* schema change and are the tracked follow-up.
|
|
30521
|
+
*
|
|
30522
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30523
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30524
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30525
|
+
* happened.
|
|
30526
|
+
*/
|
|
30527
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30528
|
+
/**
|
|
30529
|
+
* Caption burned into the notification's preview frame.
|
|
30530
|
+
*
|
|
30531
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30532
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30533
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30534
|
+
*
|
|
30535
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30536
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30537
|
+
* the reason this is not `.min(1)`.
|
|
30538
|
+
*/
|
|
30539
|
+
var PreviewTextField = string().max(200);
|
|
30540
|
+
/**
|
|
30541
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30542
|
+
*
|
|
30543
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30544
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30545
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30546
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30547
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30548
|
+
* them.
|
|
30549
|
+
*
|
|
30550
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30551
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30552
|
+
* paying that on the deploy that shipped it.
|
|
30553
|
+
*
|
|
30554
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30555
|
+
*/
|
|
30556
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30557
|
+
/**
|
|
30558
|
+
* Which detection classes the notification reports counts for.
|
|
30559
|
+
*
|
|
30560
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30561
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30562
|
+
* class the window actually contained", which is what an operator who never
|
|
30563
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30564
|
+
* counts cars all night).
|
|
30565
|
+
*
|
|
30566
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30567
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30568
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30569
|
+
* not emit.
|
|
30570
|
+
*
|
|
30571
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30572
|
+
* - `{{detections}}` — total over the reported classes
|
|
30573
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30574
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30575
|
+
* one per class, `count_` + the class name
|
|
30576
|
+
*
|
|
30577
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30578
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30579
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30580
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30581
|
+
*/
|
|
30582
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30583
|
+
/**
|
|
30114
30584
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
30115
30585
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
30116
30586
|
* here (see the ownership note above).
|
|
@@ -30130,9 +30600,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
30130
30600
|
cadenceSec: CadenceSecField.default(15),
|
|
30131
30601
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
30132
30602
|
framerate: FramerateField.default(10),
|
|
30603
|
+
/**
|
|
30604
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30605
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30606
|
+
* field gets.
|
|
30607
|
+
*/
|
|
30608
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30609
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30610
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30133
30611
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
30134
30612
|
targets: TargetsField,
|
|
30135
30613
|
template: TimelapseTemplateSchema.optional(),
|
|
30614
|
+
/**
|
|
30615
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30616
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30617
|
+
*
|
|
30618
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30619
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30620
|
+
* silently clear the caption too.
|
|
30621
|
+
*/
|
|
30622
|
+
previewText: PreviewTextField.optional(),
|
|
30623
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30624
|
+
previewMode: PreviewModeField.default("image"),
|
|
30625
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30626
|
+
reportClasses: ReportClassesField.optional(),
|
|
30136
30627
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
30137
30628
|
priority: PriorityField.default(3)
|
|
30138
30629
|
});
|
|
@@ -30143,8 +30634,13 @@ object({
|
|
|
30143
30634
|
schedule: NcScheduleSchema.optional(),
|
|
30144
30635
|
cadenceSec: CadenceSecField.optional(),
|
|
30145
30636
|
framerate: FramerateField.optional(),
|
|
30637
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30638
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30146
30639
|
targets: TargetsField.optional(),
|
|
30147
30640
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30641
|
+
previewText: PreviewTextField.optional(),
|
|
30642
|
+
previewMode: PreviewModeField.optional(),
|
|
30643
|
+
reportClasses: ReportClassesField.optional(),
|
|
30148
30644
|
priority: PriorityField.optional()
|
|
30149
30645
|
});
|
|
30150
30646
|
TimelapseRuleInputSchema.extend({
|
|
@@ -30228,25 +30724,32 @@ object({
|
|
|
30228
30724
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
30229
30725
|
object({
|
|
30230
30726
|
/**
|
|
30231
|
-
* How
|
|
30727
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
30728
|
+
* detection result.
|
|
30232
30729
|
*
|
|
30233
|
-
*
|
|
30234
|
-
*
|
|
30235
|
-
*
|
|
30236
|
-
*
|
|
30237
|
-
*
|
|
30730
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
30731
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
30732
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
30733
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
30734
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
30735
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
30736
|
+
*
|
|
30737
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
30738
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
30739
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
30740
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
30741
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
30238
30742
|
*/
|
|
30239
|
-
|
|
30743
|
+
holdFrames: number().int().min(1).max(64),
|
|
30240
30744
|
/**
|
|
30241
30745
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
30242
30746
|
*
|
|
30243
|
-
*
|
|
30244
|
-
*
|
|
30245
|
-
*
|
|
30246
|
-
*
|
|
30247
|
-
*
|
|
30248
|
-
*
|
|
30249
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
30747
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
30748
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
30749
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
30750
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
30751
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
30752
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
30250
30753
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
30251
30754
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
30252
30755
|
* to replace).
|
|
@@ -30272,22 +30775,45 @@ object({
|
|
|
30272
30775
|
* there is the signal that some caller names frames outside the inference set
|
|
30273
30776
|
* and that this must go back to `all`.
|
|
30274
30777
|
*/
|
|
30275
|
-
admission: NativeLeaseAdmissionSchema
|
|
30778
|
+
admission: NativeLeaseAdmissionSchema,
|
|
30779
|
+
/**
|
|
30780
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
30781
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
30782
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
30783
|
+
*
|
|
30784
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
30785
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
30786
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
30787
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
30788
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
30789
|
+
* was interrogated per SUBJECT.
|
|
30790
|
+
*
|
|
30791
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
30792
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
30793
|
+
* reproduce that.
|
|
30794
|
+
*/
|
|
30795
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
30276
30796
|
});
|
|
30277
30797
|
/**
|
|
30278
|
-
* The values in force when the operator has set nothing
|
|
30279
|
-
*
|
|
30280
|
-
*
|
|
30798
|
+
* The values in force when the operator has set nothing.
|
|
30799
|
+
*
|
|
30800
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
30801
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
30802
|
+
* in the same change that redefines it would make a regression and a retune
|
|
30803
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
30804
|
+
* live traffic.
|
|
30281
30805
|
*/
|
|
30282
30806
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
30283
|
-
|
|
30807
|
+
holdFrames: 8,
|
|
30284
30808
|
budgetMb: 1024,
|
|
30285
30809
|
activityMs: 15e3,
|
|
30810
|
+
tileBudgetMb: 64,
|
|
30286
30811
|
admission: "inferred"
|
|
30287
30812
|
};
|
|
30288
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
30813
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
30289
30814
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
30290
30815
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
30816
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
30291
30817
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
30292
30818
|
//#endregion
|
|
30293
30819
|
//#region src/server/addon.ts
|
|
@@ -30308,7 +30834,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
30308
30834
|
capability: adminUiCapability,
|
|
30309
30835
|
provider: {
|
|
30310
30836
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
30311
|
-
getVersion: async () => ({ version: "1.2.
|
|
30837
|
+
getVersion: async () => ({ version: "1.2.52" })
|
|
30312
30838
|
}
|
|
30313
30839
|
}];
|
|
30314
30840
|
}
|