@camstack/addon-model-studio 1.1.18 → 1.1.20
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/{MotionZonesSettings-O5n6O0Gj.mjs → MotionZonesSettings-Cu3v84EK.mjs} +1 -1
- package/dist/{PrivacyMaskSettings-CSp0pqdC.mjs → PrivacyMaskSettings-BXCBb85n.mjs} +2 -2
- package/dist/_stub.js +7 -7
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DDgNY3RZ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-ChXR-SrT.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DpvRwqsx.mjs +26 -0
- package/dist/{hostInit-DOu0vY6d.mjs → hostInit-DTLitKtO.mjs} +3 -3
- package/dist/model-studio.addon.js +936 -48
- package/dist/model-studio.addon.mjs +936 -48
- package/dist/{player-overlays-WenGh8C9.mjs → player-overlays-9g9Wl5lu.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{trash-2-g2CKQXbP.mjs → trash-2-CuBBH1-r.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BxoKR4IK.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CNbwY0Zt.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-l-RIbQas.mjs +0 -26
- package/python/__pycache__/convert.cpython-314.pyc +0 -0
- package/python/__pycache__/convert_lib.cpython-312.pyc +0 -0
- package/python/__pycache__/convert_lib.cpython-314.pyc +0 -0
- package/python/__tests__/__pycache__/test_convert_lib.cpython-314.pyc +0 -0
|
@@ -7316,8 +7316,31 @@ var AdoptionJobSchema = object({
|
|
|
7316
7316
|
error: string().nullable()
|
|
7317
7317
|
});
|
|
7318
7318
|
/**
|
|
7319
|
-
* Per-camera FUNCTION SWITCHES
|
|
7320
|
-
*
|
|
7319
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7320
|
+
*
|
|
7321
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7322
|
+
*
|
|
7323
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7324
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7325
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7326
|
+
* every function already had a settings page of its own, and a second place to
|
|
7327
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7328
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7329
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7330
|
+
* (which was always first-class; the switch was a veneer over
|
|
7331
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7332
|
+
* per-device setting, the two camera planes to their own components.
|
|
7333
|
+
*
|
|
7334
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7335
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7336
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7337
|
+
* never about a control panel.
|
|
7338
|
+
*
|
|
7339
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7340
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7341
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7342
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7343
|
+
* stop; nothing new may be built on it.
|
|
7321
7344
|
*
|
|
7322
7345
|
* ## This file adds no state
|
|
7323
7346
|
*
|
|
@@ -7662,14 +7685,21 @@ var RecordingConfigSchema = object({
|
|
|
7662
7685
|
/**
|
|
7663
7686
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7664
7687
|
*
|
|
7665
|
-
* One shape shared by the recorder
|
|
7666
|
-
*
|
|
7667
|
-
*
|
|
7668
|
-
*
|
|
7669
|
-
*
|
|
7670
|
-
|
|
7688
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7689
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7690
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7691
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7692
|
+
* addon surface.
|
|
7693
|
+
*/
|
|
7694
|
+
/**
|
|
7695
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7696
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7697
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7698
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7699
|
+
* runs at all.
|
|
7671
7700
|
*/
|
|
7672
7701
|
var RelocateJobStateSchema = _enum([
|
|
7702
|
+
"queued",
|
|
7673
7703
|
"running",
|
|
7674
7704
|
"done",
|
|
7675
7705
|
"failed",
|
|
@@ -7694,19 +7724,109 @@ var RelocateJobSchema = object({
|
|
|
7694
7724
|
finishedAt: number().nullable(),
|
|
7695
7725
|
error: string().nullable()
|
|
7696
7726
|
});
|
|
7727
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7728
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7729
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7697
7730
|
var RelocateFootageInputSchema = object({
|
|
7698
|
-
deviceId: number().optional(),
|
|
7699
7731
|
fromLocationId: string(),
|
|
7700
7732
|
toLocationId: string(),
|
|
7701
7733
|
entities: array(_enum(["segments"])).optional(),
|
|
7734
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7735
|
+
* pre-orchestration compatibility path. */
|
|
7736
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7737
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7738
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7739
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7740
|
+
deviceId: number().int().optional(),
|
|
7741
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7742
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7743
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7744
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7745
|
+
profiles: array(string()).optional(),
|
|
7702
7746
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7703
7747
|
* never allowed to starve live writers. */
|
|
7704
7748
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7705
7749
|
});
|
|
7706
|
-
|
|
7707
|
-
|
|
7750
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7751
|
+
* from persistent recording settings: a migration never changes
|
|
7752
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7753
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7754
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7755
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7708
7756
|
toLocationId: string(),
|
|
7709
7757
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7758
|
+
}).extend({ leaseId: string().min(1) });
|
|
7759
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7760
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7761
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7762
|
+
var StorageMigrationClassSchema = _enum([
|
|
7763
|
+
"recordings",
|
|
7764
|
+
"recordingsLow",
|
|
7765
|
+
"eventMedia"
|
|
7766
|
+
]);
|
|
7767
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7768
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7769
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7770
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7771
|
+
recordings: string().min(1).optional(),
|
|
7772
|
+
recordingsLow: string().min(1).optional(),
|
|
7773
|
+
eventMedia: string().min(1).optional()
|
|
7774
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7775
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7776
|
+
var StorageMigrationInputSchema = object({
|
|
7777
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7778
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7779
|
+
});
|
|
7780
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7781
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7782
|
+
* verified. */
|
|
7783
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7784
|
+
"planning",
|
|
7785
|
+
"pausing",
|
|
7786
|
+
"moving",
|
|
7787
|
+
"verifying",
|
|
7788
|
+
"repointing",
|
|
7789
|
+
"refreshing",
|
|
7790
|
+
"resuming",
|
|
7791
|
+
"done",
|
|
7792
|
+
"failed",
|
|
7793
|
+
"cancelled"
|
|
7794
|
+
]);
|
|
7795
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7796
|
+
"pipeline",
|
|
7797
|
+
"recorder",
|
|
7798
|
+
"analytics"
|
|
7799
|
+
]);
|
|
7800
|
+
var StorageMigrationMoveSchema = object({
|
|
7801
|
+
storageClass: StorageMigrationClassSchema,
|
|
7802
|
+
fromLocationId: string(),
|
|
7803
|
+
toLocationId: string(),
|
|
7804
|
+
moverJobId: string().nullable(),
|
|
7805
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7806
|
+
error: string().nullable()
|
|
7807
|
+
});
|
|
7808
|
+
var StorageMigrationJobSchema = object({
|
|
7809
|
+
jobId: string(),
|
|
7810
|
+
phase: StorageMigrationPhaseSchema,
|
|
7811
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7812
|
+
throttleMbps: number(),
|
|
7813
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7814
|
+
pauseLeaseId: string().nullable(),
|
|
7815
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7816
|
+
repointed: boolean(),
|
|
7817
|
+
cancelRequested: boolean(),
|
|
7818
|
+
startedAt: number(),
|
|
7819
|
+
updatedAt: number(),
|
|
7820
|
+
finishedAt: number().nullable(),
|
|
7821
|
+
error: string().nullable()
|
|
7822
|
+
});
|
|
7823
|
+
var StorageMigrationPlanSchema = object({
|
|
7824
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7825
|
+
moves: array(object({
|
|
7826
|
+
storageClass: StorageMigrationClassSchema,
|
|
7827
|
+
fromLocationId: string(),
|
|
7828
|
+
toLocationId: string()
|
|
7829
|
+
}))
|
|
7710
7830
|
});
|
|
7711
7831
|
/**
|
|
7712
7832
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7758,6 +7878,21 @@ var StorageLocationSchema = object({
|
|
|
7758
7878
|
nodeId: string().optional(),
|
|
7759
7879
|
isDefault: boolean().default(false),
|
|
7760
7880
|
isSystem: boolean().default(false),
|
|
7881
|
+
/**
|
|
7882
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7883
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7884
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7885
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7886
|
+
* extended to add the next consumer.
|
|
7887
|
+
*
|
|
7888
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7889
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7890
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7891
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7892
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7893
|
+
* always stamped `true`.
|
|
7894
|
+
*/
|
|
7895
|
+
enabled: boolean().optional(),
|
|
7761
7896
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7762
7897
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7763
7898
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12095,7 +12230,8 @@ method(object({
|
|
|
12095
12230
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12096
12231
|
/**
|
|
12097
12232
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12098
|
-
* filesystem
|
|
12233
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12234
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12099
12235
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12100
12236
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12101
12237
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13914,6 +14050,13 @@ var MaskGridDimsSchema = object({
|
|
|
13914
14050
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13915
14051
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13916
14052
|
* one trigger.
|
|
14053
|
+
*
|
|
14054
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14055
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14056
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14057
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14058
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14059
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13917
14060
|
*/
|
|
13918
14061
|
var NcDeliverySchema = _enum([
|
|
13919
14062
|
"immediate",
|
|
@@ -13928,15 +14071,32 @@ var NcDeliverySchema = _enum([
|
|
|
13928
14071
|
* depend on a provider's raw event name or payload shape.
|
|
13929
14072
|
*/
|
|
13930
14073
|
var NcSystemEventKindSchema = _enum([
|
|
13931
|
-
"
|
|
13932
|
-
"
|
|
14074
|
+
"device-online",
|
|
14075
|
+
"device-offline",
|
|
14076
|
+
"device-disabled",
|
|
14077
|
+
"device-enabled",
|
|
13933
14078
|
"stream-online",
|
|
13934
14079
|
"stream-offline",
|
|
13935
14080
|
"node-online",
|
|
13936
14081
|
"node-offline",
|
|
13937
14082
|
"addon-update-available",
|
|
13938
|
-
"server-update-available"
|
|
14083
|
+
"server-update-available",
|
|
14084
|
+
"alarm-triggered",
|
|
14085
|
+
"alarm-armed",
|
|
14086
|
+
"alarm-disarmed",
|
|
14087
|
+
"camera-online",
|
|
14088
|
+
"camera-offline",
|
|
14089
|
+
"camera-disabled",
|
|
14090
|
+
"camera-enabled"
|
|
14091
|
+
]);
|
|
14092
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14093
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14094
|
+
"camera-online",
|
|
14095
|
+
"camera-offline",
|
|
14096
|
+
"camera-disabled",
|
|
14097
|
+
"camera-enabled"
|
|
13939
14098
|
]);
|
|
14099
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13940
14100
|
/**
|
|
13941
14101
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13942
14102
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13945,6 +14105,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13945
14105
|
var NcSystemEventConditionSchema = object({
|
|
13946
14106
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13947
14107
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14108
|
+
/**
|
|
14109
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14110
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14111
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14112
|
+
*
|
|
14113
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14114
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14115
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14116
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14117
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14118
|
+
*/
|
|
14119
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13948
14120
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13949
14121
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13950
14122
|
});
|
|
@@ -13995,6 +14167,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13995
14167
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13996
14168
|
});
|
|
13997
14169
|
/**
|
|
14170
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14171
|
+
*
|
|
14172
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14173
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14174
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14175
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14176
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14177
|
+
*
|
|
14178
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14179
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14180
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14181
|
+
*
|
|
14182
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14183
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14184
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14185
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14186
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14187
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14188
|
+
* ZodEffects the cap path would have to special-case).
|
|
14189
|
+
*
|
|
14190
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14191
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14192
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14193
|
+
* `samplingSeconds` decorative.
|
|
14194
|
+
*
|
|
14195
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14196
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14197
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14198
|
+
* an operator who typed `dog` mean the same thing.
|
|
14199
|
+
*/
|
|
14200
|
+
var NcAudioConditionSchema = object({
|
|
14201
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14202
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14203
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14204
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14205
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14206
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14207
|
+
/** Length of the sampling window in seconds. */
|
|
14208
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14209
|
+
});
|
|
14210
|
+
/**
|
|
13998
14211
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13999
14212
|
*
|
|
14000
14213
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14267,7 +14480,33 @@ var NcConditionsSchema = object({
|
|
|
14267
14480
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14268
14481
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14269
14482
|
*/
|
|
14270
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14483
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14484
|
+
/**
|
|
14485
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14486
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14487
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14488
|
+
* a window that is not full yet, neither filter given). See
|
|
14489
|
+
* {@link NcAudioCondition}.
|
|
14490
|
+
*
|
|
14491
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14492
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14493
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14494
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14495
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14496
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14497
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14498
|
+
*
|
|
14499
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14500
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14501
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14502
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14503
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14504
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14505
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14506
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14507
|
+
* does an audio rule become authorable.
|
|
14508
|
+
*/
|
|
14509
|
+
audio: NcAudioConditionSchema.optional()
|
|
14271
14510
|
});
|
|
14272
14511
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14273
14512
|
var NcRuleTargetSchema = object({
|
|
@@ -14381,6 +14620,73 @@ var NcThrottleSchema = object({
|
|
|
14381
14620
|
*/
|
|
14382
14621
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14383
14622
|
});
|
|
14623
|
+
/**
|
|
14624
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14625
|
+
* it judges may be.
|
|
14626
|
+
*
|
|
14627
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14628
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14629
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14630
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14631
|
+
* tokens for pixels the model pools away.
|
|
14632
|
+
*/
|
|
14633
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14634
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14635
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14636
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14637
|
+
var NcConfirmExpectSchema = object({
|
|
14638
|
+
op: _enum([
|
|
14639
|
+
">=",
|
|
14640
|
+
">",
|
|
14641
|
+
"<=",
|
|
14642
|
+
"<",
|
|
14643
|
+
"=="
|
|
14644
|
+
]),
|
|
14645
|
+
count: number().int().min(0).max(1e3)
|
|
14646
|
+
});
|
|
14647
|
+
/**
|
|
14648
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14649
|
+
* to ship and says whether it agrees with the rule.
|
|
14650
|
+
*
|
|
14651
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14652
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14653
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14654
|
+
*
|
|
14655
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14656
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14657
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14658
|
+
* open looks in the log exactly like a gate that works.
|
|
14659
|
+
*
|
|
14660
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14661
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14662
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14663
|
+
* above rather than trusting a parse it may never have seen.
|
|
14664
|
+
*/
|
|
14665
|
+
var NcConfirmSchema = object({
|
|
14666
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14667
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14668
|
+
enabled: boolean().default(false),
|
|
14669
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14670
|
+
profileId: string().optional(),
|
|
14671
|
+
/**
|
|
14672
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14673
|
+
* from the rule (its class and its expectation).
|
|
14674
|
+
*
|
|
14675
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14676
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14677
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14678
|
+
* turn and only rule-authored words land here.
|
|
14679
|
+
*/
|
|
14680
|
+
prompt: string().max(1e3).optional(),
|
|
14681
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14682
|
+
* own boolean verdict decides. */
|
|
14683
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14684
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14685
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14686
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14687
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14688
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14689
|
+
});
|
|
14384
14690
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14385
14691
|
var NcRuleInputSchema = object({
|
|
14386
14692
|
name: string().min(1).max(200),
|
|
@@ -14441,7 +14747,13 @@ var NcRuleInputSchema = object({
|
|
|
14441
14747
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14442
14748
|
* shape as every other actuation.
|
|
14443
14749
|
*/
|
|
14444
|
-
actions: NcRuleActionsSchema.optional()
|
|
14750
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14751
|
+
/**
|
|
14752
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14753
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14754
|
+
* did, and absent is the only way to say that without a migration.
|
|
14755
|
+
*/
|
|
14756
|
+
confirm: NcConfirmSchema.optional()
|
|
14445
14757
|
});
|
|
14446
14758
|
/**
|
|
14447
14759
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14452,7 +14764,37 @@ var NcRuleInputSchema = object({
|
|
|
14452
14764
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14453
14765
|
* `updateRule` patch.
|
|
14454
14766
|
*/
|
|
14455
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14767
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14768
|
+
disabledTargetIds: array(string()).optional(),
|
|
14769
|
+
/**
|
|
14770
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14771
|
+
*
|
|
14772
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14773
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14774
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14775
|
+
* one — which made every partial edit destructive:
|
|
14776
|
+
*
|
|
14777
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14778
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14779
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14780
|
+
*
|
|
14781
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14782
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14783
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14784
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14785
|
+
* within a minute of a two-field patch.
|
|
14786
|
+
*
|
|
14787
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14788
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14789
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14790
|
+
* absent key is now genuinely absent.
|
|
14791
|
+
*/
|
|
14792
|
+
enabled: boolean().optional(),
|
|
14793
|
+
conditions: NcConditionsSchema.optional(),
|
|
14794
|
+
media: NcMediaPolicySchema.optional(),
|
|
14795
|
+
throttle: NcThrottleSchema.optional(),
|
|
14796
|
+
priority: number().int().min(1).max(5).optional()
|
|
14797
|
+
});
|
|
14456
14798
|
/** A persisted rule. */
|
|
14457
14799
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14458
14800
|
id: string(),
|
|
@@ -14753,6 +15095,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14753
15095
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14754
15096
|
* copy would lie the first time a rule is disabled.
|
|
14755
15097
|
*/
|
|
15098
|
+
/**
|
|
15099
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15100
|
+
*
|
|
15101
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15102
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15103
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15104
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15105
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15106
|
+
* with the switches the operator actually used.
|
|
15107
|
+
*/
|
|
15108
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15109
|
+
"muted",
|
|
15110
|
+
"detection-off",
|
|
15111
|
+
"offline"
|
|
15112
|
+
]);
|
|
15113
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15114
|
+
deviceId: number().int(),
|
|
15115
|
+
reason: NcAlarmSkipReasonSchema
|
|
15116
|
+
});
|
|
14756
15117
|
var NcAlarmModeCoverageSchema = object({
|
|
14757
15118
|
mode: AlarmArmModeSchema,
|
|
14758
15119
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14760,7 +15121,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14760
15121
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14761
15122
|
allDevices: boolean(),
|
|
14762
15123
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14763
|
-
deviceIds: array(number().int())
|
|
15124
|
+
deviceIds: array(number().int()),
|
|
15125
|
+
/**
|
|
15126
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15127
|
+
* excludes it.
|
|
15128
|
+
*
|
|
15129
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15130
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15131
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15132
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15133
|
+
* alarm tab.
|
|
15134
|
+
*/
|
|
15135
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14764
15136
|
});
|
|
14765
15137
|
var NcAlarmConfigSchema = object({
|
|
14766
15138
|
/**
|
|
@@ -16123,13 +16495,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16123
16495
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16124
16496
|
kind: "mutation",
|
|
16125
16497
|
auth: "admin"
|
|
16126
|
-
}), method(
|
|
16498
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16127
16499
|
kind: "mutation",
|
|
16128
16500
|
auth: "admin"
|
|
16129
|
-
}), method(object({
|
|
16130
|
-
kind: "
|
|
16501
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16502
|
+
kind: "mutation",
|
|
16131
16503
|
auth: "admin"
|
|
16132
|
-
}), method(
|
|
16504
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16505
|
+
kind: "mutation",
|
|
16506
|
+
auth: "admin"
|
|
16507
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16508
|
+
kind: "mutation",
|
|
16509
|
+
auth: "admin"
|
|
16510
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16133
16511
|
kind: "mutation",
|
|
16134
16512
|
auth: "admin"
|
|
16135
16513
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17553,9 +17931,16 @@ var CameraStatusSchema = object({
|
|
|
17553
17931
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17554
17932
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17555
17933
|
/**
|
|
17556
|
-
* Per-camera
|
|
17934
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17557
17935
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17558
17936
|
*
|
|
17937
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17938
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17939
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17940
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17941
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17942
|
+
* the difference between a camera being off and a camera being dead.
|
|
17943
|
+
*
|
|
17559
17944
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17560
17945
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17561
17946
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17626,7 +18011,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17626
18011
|
reachable: boolean(),
|
|
17627
18012
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17628
18013
|
});
|
|
17629
|
-
method(object({
|
|
18014
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18015
|
+
kind: "mutation",
|
|
18016
|
+
auth: "admin"
|
|
18017
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18018
|
+
kind: "mutation",
|
|
18019
|
+
auth: "admin"
|
|
18020
|
+
}), method(object({
|
|
17630
18021
|
deviceId: number(),
|
|
17631
18022
|
agentNodeId: string()
|
|
17632
18023
|
}), object({ success: literal(true) }), {
|
|
@@ -18300,6 +18691,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18300
18691
|
locationId: string(),
|
|
18301
18692
|
targetBytes: number().int().positive()
|
|
18302
18693
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18694
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18695
|
+
kind: "mutation",
|
|
18696
|
+
auth: "admin"
|
|
18697
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18698
|
+
kind: "mutation",
|
|
18699
|
+
auth: "admin"
|
|
18700
|
+
});
|
|
18303
18701
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18304
18702
|
providerId: string().min(1),
|
|
18305
18703
|
displayName: string().min(1),
|
|
@@ -18403,6 +18801,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18403
18801
|
label: string(),
|
|
18404
18802
|
description: string().optional()
|
|
18405
18803
|
});
|
|
18804
|
+
/**
|
|
18805
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18806
|
+
* an instance declares a camera.
|
|
18807
|
+
*/
|
|
18808
|
+
var TerminalInstanceInfoSchema = object({
|
|
18809
|
+
instanceId: string(),
|
|
18810
|
+
cameraStableId: string(),
|
|
18811
|
+
nodeId: string(),
|
|
18812
|
+
profileId: string(),
|
|
18813
|
+
profileLabel: string(),
|
|
18814
|
+
name: string(),
|
|
18815
|
+
enabled: boolean()
|
|
18816
|
+
});
|
|
18817
|
+
var TerminalLegacyCameraSchema = object({
|
|
18818
|
+
stableId: string(),
|
|
18819
|
+
nodeId: string(),
|
|
18820
|
+
profileId: string(),
|
|
18821
|
+
profileLabel: string(),
|
|
18822
|
+
name: string(),
|
|
18823
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18824
|
+
adoptable: boolean()
|
|
18825
|
+
});
|
|
18406
18826
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18407
18827
|
seq: number().int().positive(),
|
|
18408
18828
|
kind: literal("data"),
|
|
@@ -18419,7 +18839,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18419
18839
|
snapshot: string().optional(),
|
|
18420
18840
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18421
18841
|
});
|
|
18422
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18842
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18843
|
+
targetNodeId: string().min(1),
|
|
18844
|
+
profileId: string().min(1),
|
|
18845
|
+
name: string().trim().min(1).max(160).optional()
|
|
18846
|
+
}), TerminalInstanceInfoSchema, {
|
|
18847
|
+
kind: "mutation",
|
|
18848
|
+
auth: "admin"
|
|
18849
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18850
|
+
kind: "mutation",
|
|
18851
|
+
auth: "admin"
|
|
18852
|
+
}), method(object({
|
|
18853
|
+
instanceId: string().min(1),
|
|
18854
|
+
enabled: boolean()
|
|
18855
|
+
}), TerminalInstanceInfoSchema, {
|
|
18856
|
+
kind: "mutation",
|
|
18857
|
+
auth: "admin"
|
|
18858
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18859
|
+
stableId: string().min(1),
|
|
18860
|
+
name: string().trim().min(1).max(160).optional()
|
|
18861
|
+
}), TerminalInstanceInfoSchema, {
|
|
18862
|
+
kind: "mutation",
|
|
18863
|
+
auth: "admin"
|
|
18864
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18423
18865
|
profileId: string(),
|
|
18424
18866
|
cols: number().int().positive(),
|
|
18425
18867
|
rows: number().int().positive()
|
|
@@ -18436,7 +18878,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18436
18878
|
}), method(object({
|
|
18437
18879
|
sessionId: string(),
|
|
18438
18880
|
afterSeq: number().int().nonnegative(),
|
|
18439
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18881
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18882
|
+
/**
|
|
18883
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18884
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18885
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18886
|
+
*/
|
|
18887
|
+
waitForOutput: boolean().optional()
|
|
18440
18888
|
}), TerminalOutputBatchSchema, {
|
|
18441
18889
|
kind: "mutation",
|
|
18442
18890
|
auth: "admin",
|
|
@@ -20377,6 +20825,7 @@ var FaceInfoSchema = object({
|
|
|
20377
20825
|
var FaceFilterEnum = _enum([
|
|
20378
20826
|
"unassigned",
|
|
20379
20827
|
"recognized",
|
|
20828
|
+
"identified",
|
|
20380
20829
|
"all"
|
|
20381
20830
|
]);
|
|
20382
20831
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20405,6 +20854,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20405
20854
|
kind: "mutation",
|
|
20406
20855
|
auth: "admin"
|
|
20407
20856
|
}), method(object({
|
|
20857
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20858
|
+
deviceId: number().int().optional(),
|
|
20408
20859
|
limit: number().int().positive().optional(),
|
|
20409
20860
|
filter: FaceFilterEnum.optional(),
|
|
20410
20861
|
/**
|
|
@@ -22170,6 +22621,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22170
22621
|
capName: string().min(1).max(64),
|
|
22171
22622
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22172
22623
|
valuePath: string().min(1).max(64)
|
|
22624
|
+
}),
|
|
22625
|
+
object({
|
|
22626
|
+
kind: literal("latest-recognition"),
|
|
22627
|
+
recognition: _enum(["person", "plate"])
|
|
22173
22628
|
})
|
|
22174
22629
|
]);
|
|
22175
22630
|
var OsdSlotBindingSchema = object({
|
|
@@ -22275,6 +22730,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22275
22730
|
}), object({ success: literal(true) }), {
|
|
22276
22731
|
kind: "mutation",
|
|
22277
22732
|
auth: "admin"
|
|
22733
|
+
}), method(object({
|
|
22734
|
+
sourceDeviceId: number().int(),
|
|
22735
|
+
targetDeviceId: number().int()
|
|
22736
|
+
}), object({
|
|
22737
|
+
copied: number().int().nonnegative(),
|
|
22738
|
+
skipped: number().int().nonnegative()
|
|
22739
|
+
}), {
|
|
22740
|
+
kind: "mutation",
|
|
22741
|
+
auth: "admin"
|
|
22278
22742
|
}), method(object({
|
|
22279
22743
|
deviceId: number().int(),
|
|
22280
22744
|
slotId: string().min(1),
|
|
@@ -22985,7 +23449,19 @@ var RecordingManifestSchema = object({
|
|
|
22985
23449
|
* profiles/subtrees/locations on this node). */
|
|
22986
23450
|
var RecordingDeviceUsageSchema = object({
|
|
22987
23451
|
deviceId: number(),
|
|
22988
|
-
usedBytes: number()
|
|
23452
|
+
usedBytes: number(),
|
|
23453
|
+
/**
|
|
23454
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23455
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23456
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23457
|
+
*
|
|
23458
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23459
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23460
|
+
* field must keep validating that older provider's payload: the framework
|
|
23461
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23462
|
+
* the later of the two.
|
|
23463
|
+
*/
|
|
23464
|
+
oldestMs: number().nullable().optional()
|
|
22989
23465
|
});
|
|
22990
23466
|
/** Recording storage usage + capacity for one storage location. */
|
|
22991
23467
|
var RecordingLocationUsageSchema = object({
|
|
@@ -23013,6 +23489,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
23013
23489
|
locations: array(RecordingLocationUsageSchema)
|
|
23014
23490
|
});
|
|
23015
23491
|
/**
|
|
23492
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23493
|
+
*
|
|
23494
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23495
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23496
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23497
|
+
* location, run FIFO behind the single-flight mover.
|
|
23498
|
+
*
|
|
23499
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23500
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23501
|
+
* (empty on the plan).
|
|
23502
|
+
*/
|
|
23503
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23504
|
+
deviceId: number(),
|
|
23505
|
+
profile: string(),
|
|
23506
|
+
fromLocationId: string(),
|
|
23507
|
+
toLocationId: string(),
|
|
23508
|
+
bytes: number(),
|
|
23509
|
+
files: number().int()
|
|
23510
|
+
});
|
|
23511
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23512
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23513
|
+
* that had nothing to do. */
|
|
23514
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23515
|
+
"unassigned",
|
|
23516
|
+
"target-not-writable",
|
|
23517
|
+
"below-threshold",
|
|
23518
|
+
"no-headroom"
|
|
23519
|
+
]);
|
|
23520
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23521
|
+
deviceId: number(),
|
|
23522
|
+
profile: string(),
|
|
23523
|
+
fromLocationId: string(),
|
|
23524
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23525
|
+
toLocationId: string().nullable(),
|
|
23526
|
+
bytes: number(),
|
|
23527
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23528
|
+
});
|
|
23529
|
+
var RecordingRebalancePlanSchema = object({
|
|
23530
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23531
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23532
|
+
bytesToMove: number(),
|
|
23533
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23534
|
+
jobIds: array(string())
|
|
23535
|
+
});
|
|
23536
|
+
var RecordingRebalanceInputSchema = object({
|
|
23537
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23538
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23539
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23540
|
+
minMoveGb: number().min(0).optional()
|
|
23541
|
+
});
|
|
23542
|
+
/**
|
|
23016
23543
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
23017
23544
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
23018
23545
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23160,6 +23687,21 @@ method(object({
|
|
|
23160
23687
|
}), {
|
|
23161
23688
|
kind: "mutation",
|
|
23162
23689
|
auth: "admin"
|
|
23690
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23691
|
+
kind: "mutation",
|
|
23692
|
+
auth: "admin"
|
|
23693
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23694
|
+
kind: "mutation",
|
|
23695
|
+
auth: "admin"
|
|
23696
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23697
|
+
kind: "mutation",
|
|
23698
|
+
auth: "admin"
|
|
23699
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23700
|
+
kind: "mutation",
|
|
23701
|
+
auth: "admin"
|
|
23702
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23703
|
+
kind: "mutation",
|
|
23704
|
+
auth: "admin"
|
|
23163
23705
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23164
23706
|
kind: "mutation",
|
|
23165
23707
|
auth: "admin"
|
|
@@ -23169,9 +23711,15 @@ method(object({
|
|
|
23169
23711
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23170
23712
|
kind: "mutation",
|
|
23171
23713
|
auth: "admin"
|
|
23714
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23715
|
+
kind: "query",
|
|
23716
|
+
auth: "admin"
|
|
23717
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23718
|
+
kind: "mutation",
|
|
23719
|
+
auth: "admin"
|
|
23172
23720
|
});
|
|
23173
23721
|
/**
|
|
23174
|
-
* `
|
|
23722
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23175
23723
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23176
23724
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23177
23725
|
* delete-after-download.
|
|
@@ -23186,10 +23734,42 @@ method(object({
|
|
|
23186
23734
|
*/
|
|
23187
23735
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23188
23736
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23737
|
+
/**
|
|
23738
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23739
|
+
*
|
|
23740
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23741
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23742
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23743
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23744
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23745
|
+
*/
|
|
23746
|
+
var ExportDenseRangeSchema = object({
|
|
23747
|
+
fromSec: number().nonnegative(),
|
|
23748
|
+
toSec: number().nonnegative()
|
|
23749
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23750
|
+
/**
|
|
23751
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23752
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23753
|
+
*
|
|
23754
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23755
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23756
|
+
*/
|
|
23757
|
+
var ExportDenseSchema = object({
|
|
23758
|
+
everyMs: number().int().positive(),
|
|
23759
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23760
|
+
});
|
|
23189
23761
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23190
23762
|
var ExportTimelapseSchema = object({
|
|
23191
23763
|
everyMs: number().int().positive(),
|
|
23192
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23764
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23765
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23766
|
+
dense: ExportDenseSchema.optional()
|
|
23767
|
+
}).superRefine((v, ctx) => {
|
|
23768
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23769
|
+
code: ZodIssueCode.custom,
|
|
23770
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23771
|
+
path: ["dense", "everyMs"]
|
|
23772
|
+
});
|
|
23193
23773
|
});
|
|
23194
23774
|
/**
|
|
23195
23775
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23247,6 +23827,19 @@ var ExportDownloadSchema = object({
|
|
|
23247
23827
|
url: string(),
|
|
23248
23828
|
endpoints: array(string())
|
|
23249
23829
|
});
|
|
23830
|
+
/**
|
|
23831
|
+
* A finished export's bytes, inline.
|
|
23832
|
+
*
|
|
23833
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23834
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23835
|
+
*/
|
|
23836
|
+
var ExportBytesSchema = object({
|
|
23837
|
+
base64: string(),
|
|
23838
|
+
contentType: string(),
|
|
23839
|
+
/** Suggested filename, extension included. */
|
|
23840
|
+
name: string(),
|
|
23841
|
+
bytes: number().int().nonnegative()
|
|
23842
|
+
});
|
|
23250
23843
|
method(object({
|
|
23251
23844
|
deviceId: number(),
|
|
23252
23845
|
profile: string(),
|
|
@@ -23271,6 +23864,9 @@ method(object({
|
|
|
23271
23864
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23272
23865
|
kind: "query",
|
|
23273
23866
|
auth: "protected"
|
|
23867
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23868
|
+
kind: "query",
|
|
23869
|
+
auth: "protected"
|
|
23274
23870
|
});
|
|
23275
23871
|
/**
|
|
23276
23872
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27288,6 +27884,12 @@ Object.freeze({
|
|
|
27288
27884
|
addonId: null,
|
|
27289
27885
|
access: "delete"
|
|
27290
27886
|
},
|
|
27887
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27888
|
+
capName: "osd-manager",
|
|
27889
|
+
capScope: "system",
|
|
27890
|
+
addonId: null,
|
|
27891
|
+
access: "create"
|
|
27892
|
+
},
|
|
27291
27893
|
"osdManager.getConditionSupport": {
|
|
27292
27894
|
capName: "osd-manager",
|
|
27293
27895
|
capScope: "system",
|
|
@@ -27384,7 +27986,7 @@ Object.freeze({
|
|
|
27384
27986
|
addonId: null,
|
|
27385
27987
|
access: "create"
|
|
27386
27988
|
},
|
|
27387
|
-
"pipelineAnalytics.
|
|
27989
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27388
27990
|
capName: "pipeline-analytics",
|
|
27389
27991
|
capScope: "device",
|
|
27390
27992
|
addonId: null,
|
|
@@ -27456,12 +28058,6 @@ Object.freeze({
|
|
|
27456
28058
|
addonId: null,
|
|
27457
28059
|
access: "view"
|
|
27458
28060
|
},
|
|
27459
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27460
|
-
capName: "pipeline-analytics",
|
|
27461
|
-
capScope: "device",
|
|
27462
|
-
addonId: null,
|
|
27463
|
-
access: "view"
|
|
27464
|
-
},
|
|
27465
28061
|
"pipelineAnalytics.getMotionEvents": {
|
|
27466
28062
|
capName: "pipeline-analytics",
|
|
27467
28063
|
capScope: "device",
|
|
@@ -27498,6 +28094,12 @@ Object.freeze({
|
|
|
27498
28094
|
addonId: null,
|
|
27499
28095
|
access: "view"
|
|
27500
28096
|
},
|
|
28097
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
28098
|
+
capName: "pipeline-analytics",
|
|
28099
|
+
capScope: "device",
|
|
28100
|
+
addonId: null,
|
|
28101
|
+
access: "view"
|
|
28102
|
+
},
|
|
27501
28103
|
"pipelineAnalytics.getTrack": {
|
|
27502
28104
|
capName: "pipeline-analytics",
|
|
27503
28105
|
capScope: "device",
|
|
@@ -27576,6 +28178,12 @@ Object.freeze({
|
|
|
27576
28178
|
addonId: null,
|
|
27577
28179
|
access: "view"
|
|
27578
28180
|
},
|
|
28181
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28182
|
+
capName: "pipeline-analytics",
|
|
28183
|
+
capScope: "device",
|
|
28184
|
+
addonId: null,
|
|
28185
|
+
access: "create"
|
|
28186
|
+
},
|
|
27579
28187
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27580
28188
|
capName: "pipeline-analytics",
|
|
27581
28189
|
capScope: "device",
|
|
@@ -27606,7 +28214,7 @@ Object.freeze({
|
|
|
27606
28214
|
addonId: null,
|
|
27607
28215
|
access: "create"
|
|
27608
28216
|
},
|
|
27609
|
-
"pipelineAnalytics.
|
|
28217
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27610
28218
|
capName: "pipeline-analytics",
|
|
27611
28219
|
capScope: "device",
|
|
27612
28220
|
addonId: null,
|
|
@@ -27618,6 +28226,12 @@ Object.freeze({
|
|
|
27618
28226
|
addonId: null,
|
|
27619
28227
|
access: "create"
|
|
27620
28228
|
},
|
|
28229
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28230
|
+
capName: "pipeline-analytics",
|
|
28231
|
+
capScope: "device",
|
|
28232
|
+
addonId: null,
|
|
28233
|
+
access: "create"
|
|
28234
|
+
},
|
|
27621
28235
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27622
28236
|
capName: "pipeline-analytics",
|
|
27623
28237
|
capScope: "device",
|
|
@@ -27642,6 +28256,12 @@ Object.freeze({
|
|
|
27642
28256
|
addonId: null,
|
|
27643
28257
|
access: "create"
|
|
27644
28258
|
},
|
|
28259
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28260
|
+
capName: "pipeline-analytics",
|
|
28261
|
+
capScope: "device",
|
|
28262
|
+
addonId: null,
|
|
28263
|
+
access: "create"
|
|
28264
|
+
},
|
|
27645
28265
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27646
28266
|
capName: "pipeline-analytics",
|
|
27647
28267
|
capScope: "device",
|
|
@@ -28008,6 +28628,12 @@ Object.freeze({
|
|
|
28008
28628
|
addonId: null,
|
|
28009
28629
|
access: "view"
|
|
28010
28630
|
},
|
|
28631
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28632
|
+
capName: "pipeline-orchestrator",
|
|
28633
|
+
capScope: "system",
|
|
28634
|
+
addonId: null,
|
|
28635
|
+
access: "create"
|
|
28636
|
+
},
|
|
28011
28637
|
"pipelineOrchestrator.rebalance": {
|
|
28012
28638
|
capName: "pipeline-orchestrator",
|
|
28013
28639
|
capScope: "system",
|
|
@@ -28032,6 +28658,12 @@ Object.freeze({
|
|
|
28032
28658
|
addonId: null,
|
|
28033
28659
|
access: "view"
|
|
28034
28660
|
},
|
|
28661
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28662
|
+
capName: "pipeline-orchestrator",
|
|
28663
|
+
capScope: "system",
|
|
28664
|
+
addonId: null,
|
|
28665
|
+
access: "create"
|
|
28666
|
+
},
|
|
28035
28667
|
"pipelineOrchestrator.saveTemplate": {
|
|
28036
28668
|
capName: "pipeline-orchestrator",
|
|
28037
28669
|
capScope: "system",
|
|
@@ -28428,7 +29060,13 @@ Object.freeze({
|
|
|
28428
29060
|
addonId: null,
|
|
28429
29061
|
access: "create"
|
|
28430
29062
|
},
|
|
28431
|
-
"recording.
|
|
29063
|
+
"recording.cancelRelocateJob": {
|
|
29064
|
+
capName: "recording",
|
|
29065
|
+
capScope: "system",
|
|
29066
|
+
addonId: null,
|
|
29067
|
+
access: "create"
|
|
29068
|
+
},
|
|
29069
|
+
"recording.cancelStorageMigrationMove": {
|
|
28432
29070
|
capName: "recording",
|
|
28433
29071
|
capScope: "system",
|
|
28434
29072
|
addonId: null,
|
|
@@ -28464,7 +29102,7 @@ Object.freeze({
|
|
|
28464
29102
|
addonId: null,
|
|
28465
29103
|
access: "view"
|
|
28466
29104
|
},
|
|
28467
|
-
"recording.
|
|
29105
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28468
29106
|
capName: "recording",
|
|
28469
29107
|
capScope: "system",
|
|
28470
29108
|
addonId: null,
|
|
@@ -28482,12 +29120,30 @@ Object.freeze({
|
|
|
28482
29120
|
addonId: null,
|
|
28483
29121
|
access: "view"
|
|
28484
29122
|
},
|
|
29123
|
+
"recording.listRelocateJobs": {
|
|
29124
|
+
capName: "recording",
|
|
29125
|
+
capScope: "system",
|
|
29126
|
+
addonId: null,
|
|
29127
|
+
access: "view"
|
|
29128
|
+
},
|
|
28485
29129
|
"recording.locateSegment": {
|
|
28486
29130
|
capName: "recording",
|
|
28487
29131
|
capScope: "system",
|
|
28488
29132
|
addonId: null,
|
|
28489
29133
|
access: "view"
|
|
28490
29134
|
},
|
|
29135
|
+
"recording.pauseForStorageMigration": {
|
|
29136
|
+
capName: "recording",
|
|
29137
|
+
capScope: "system",
|
|
29138
|
+
addonId: null,
|
|
29139
|
+
access: "create"
|
|
29140
|
+
},
|
|
29141
|
+
"recording.planStorageRebalance": {
|
|
29142
|
+
capName: "recording",
|
|
29143
|
+
capScope: "system",
|
|
29144
|
+
addonId: null,
|
|
29145
|
+
access: "view"
|
|
29146
|
+
},
|
|
28491
29147
|
"recording.pruneFootage": {
|
|
28492
29148
|
capName: "recording",
|
|
28493
29149
|
capScope: "system",
|
|
@@ -28506,6 +29162,12 @@ Object.freeze({
|
|
|
28506
29162
|
addonId: null,
|
|
28507
29163
|
access: "view"
|
|
28508
29164
|
},
|
|
29165
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29166
|
+
capName: "recording",
|
|
29167
|
+
capScope: "system",
|
|
29168
|
+
addonId: null,
|
|
29169
|
+
access: "create"
|
|
29170
|
+
},
|
|
28509
29171
|
"recording.relocateFootage": {
|
|
28510
29172
|
capName: "recording",
|
|
28511
29173
|
capScope: "system",
|
|
@@ -28530,44 +29192,68 @@ Object.freeze({
|
|
|
28530
29192
|
addonId: null,
|
|
28531
29193
|
access: "create"
|
|
28532
29194
|
},
|
|
29195
|
+
"recording.resumeForStorageMigration": {
|
|
29196
|
+
capName: "recording",
|
|
29197
|
+
capScope: "system",
|
|
29198
|
+
addonId: null,
|
|
29199
|
+
access: "create"
|
|
29200
|
+
},
|
|
28533
29201
|
"recording.setDeviceConfig": {
|
|
28534
29202
|
capName: "recording",
|
|
28535
29203
|
capScope: "system",
|
|
28536
29204
|
addonId: null,
|
|
28537
29205
|
access: "create"
|
|
28538
29206
|
},
|
|
29207
|
+
"recording.startStorageMigrationMove": {
|
|
29208
|
+
capName: "recording",
|
|
29209
|
+
capScope: "system",
|
|
29210
|
+
addonId: null,
|
|
29211
|
+
access: "create"
|
|
29212
|
+
},
|
|
29213
|
+
"recording.startStorageRebalance": {
|
|
29214
|
+
capName: "recording",
|
|
29215
|
+
capScope: "system",
|
|
29216
|
+
addonId: null,
|
|
29217
|
+
access: "create"
|
|
29218
|
+
},
|
|
28539
29219
|
"recordingExport.cancelExport": {
|
|
28540
|
-
capName: "
|
|
29220
|
+
capName: "recording-export",
|
|
28541
29221
|
capScope: "system",
|
|
28542
29222
|
addonId: null,
|
|
28543
29223
|
access: "create"
|
|
28544
29224
|
},
|
|
28545
29225
|
"recordingExport.createExport": {
|
|
28546
|
-
capName: "
|
|
29226
|
+
capName: "recording-export",
|
|
28547
29227
|
capScope: "system",
|
|
28548
29228
|
addonId: null,
|
|
28549
29229
|
access: "create"
|
|
28550
29230
|
},
|
|
28551
29231
|
"recordingExport.deleteExport": {
|
|
28552
|
-
capName: "
|
|
29232
|
+
capName: "recording-export",
|
|
28553
29233
|
capScope: "system",
|
|
28554
29234
|
addonId: null,
|
|
28555
29235
|
access: "delete"
|
|
28556
29236
|
},
|
|
28557
29237
|
"recordingExport.getDownloadUrl": {
|
|
28558
|
-
capName: "
|
|
29238
|
+
capName: "recording-export",
|
|
28559
29239
|
capScope: "system",
|
|
28560
29240
|
addonId: null,
|
|
28561
29241
|
access: "view"
|
|
28562
29242
|
},
|
|
28563
29243
|
"recordingExport.getExport": {
|
|
28564
|
-
capName: "
|
|
29244
|
+
capName: "recording-export",
|
|
28565
29245
|
capScope: "system",
|
|
28566
29246
|
addonId: null,
|
|
28567
29247
|
access: "view"
|
|
28568
29248
|
},
|
|
28569
29249
|
"recordingExport.listExports": {
|
|
28570
|
-
capName: "
|
|
29250
|
+
capName: "recording-export",
|
|
29251
|
+
capScope: "system",
|
|
29252
|
+
addonId: null,
|
|
29253
|
+
access: "view"
|
|
29254
|
+
},
|
|
29255
|
+
"recordingExport.readExportBytes": {
|
|
29256
|
+
capName: "recording-export",
|
|
28571
29257
|
capScope: "system",
|
|
28572
29258
|
addonId: null,
|
|
28573
29259
|
access: "view"
|
|
@@ -28926,6 +29612,30 @@ Object.freeze({
|
|
|
28926
29612
|
addonId: null,
|
|
28927
29613
|
access: "view"
|
|
28928
29614
|
},
|
|
29615
|
+
"storageMigration.cancel": {
|
|
29616
|
+
capName: "storage-migration",
|
|
29617
|
+
capScope: "system",
|
|
29618
|
+
addonId: null,
|
|
29619
|
+
access: "create"
|
|
29620
|
+
},
|
|
29621
|
+
"storageMigration.plan": {
|
|
29622
|
+
capName: "storage-migration",
|
|
29623
|
+
capScope: "system",
|
|
29624
|
+
addonId: null,
|
|
29625
|
+
access: "view"
|
|
29626
|
+
},
|
|
29627
|
+
"storageMigration.start": {
|
|
29628
|
+
capName: "storage-migration",
|
|
29629
|
+
capScope: "system",
|
|
29630
|
+
addonId: null,
|
|
29631
|
+
access: "create"
|
|
29632
|
+
},
|
|
29633
|
+
"storageMigration.status": {
|
|
29634
|
+
capName: "storage-migration",
|
|
29635
|
+
capScope: "system",
|
|
29636
|
+
addonId: null,
|
|
29637
|
+
access: "view"
|
|
29638
|
+
},
|
|
28929
29639
|
"storageProvider.abortUpload": {
|
|
28930
29640
|
capName: "storage-provider",
|
|
28931
29641
|
capScope: "system",
|
|
@@ -29304,12 +30014,42 @@ Object.freeze({
|
|
|
29304
30014
|
addonId: null,
|
|
29305
30015
|
access: "create"
|
|
29306
30016
|
},
|
|
30017
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
30018
|
+
capName: "terminal-session",
|
|
30019
|
+
capScope: "system",
|
|
30020
|
+
addonId: null,
|
|
30021
|
+
access: "create"
|
|
30022
|
+
},
|
|
29307
30023
|
"terminalSession.close": {
|
|
29308
30024
|
capName: "terminal-session",
|
|
29309
30025
|
capScope: "system",
|
|
29310
30026
|
addonId: null,
|
|
29311
30027
|
access: "create"
|
|
29312
30028
|
},
|
|
30029
|
+
"terminalSession.createInstance": {
|
|
30030
|
+
capName: "terminal-session",
|
|
30031
|
+
capScope: "system",
|
|
30032
|
+
addonId: null,
|
|
30033
|
+
access: "create"
|
|
30034
|
+
},
|
|
30035
|
+
"terminalSession.deleteInstance": {
|
|
30036
|
+
capName: "terminal-session",
|
|
30037
|
+
capScope: "system",
|
|
30038
|
+
addonId: null,
|
|
30039
|
+
access: "delete"
|
|
30040
|
+
},
|
|
30041
|
+
"terminalSession.listInstances": {
|
|
30042
|
+
capName: "terminal-session",
|
|
30043
|
+
capScope: "system",
|
|
30044
|
+
addonId: null,
|
|
30045
|
+
access: "view"
|
|
30046
|
+
},
|
|
30047
|
+
"terminalSession.listLegacyCameras": {
|
|
30048
|
+
capName: "terminal-session",
|
|
30049
|
+
capScope: "system",
|
|
30050
|
+
addonId: null,
|
|
30051
|
+
access: "view"
|
|
30052
|
+
},
|
|
29313
30053
|
"terminalSession.listProfiles": {
|
|
29314
30054
|
capName: "terminal-session",
|
|
29315
30055
|
capScope: "system",
|
|
@@ -29340,6 +30080,12 @@ Object.freeze({
|
|
|
29340
30080
|
addonId: null,
|
|
29341
30081
|
access: "create"
|
|
29342
30082
|
},
|
|
30083
|
+
"terminalSession.setInstanceEnabled": {
|
|
30084
|
+
capName: "terminal-session",
|
|
30085
|
+
capScope: "system",
|
|
30086
|
+
addonId: null,
|
|
30087
|
+
access: "create"
|
|
30088
|
+
},
|
|
29343
30089
|
"terminalSession.writeInput": {
|
|
29344
30090
|
capName: "terminal-session",
|
|
29345
30091
|
capScope: "system",
|
|
@@ -29884,6 +30630,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29884
30630
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29885
30631
|
var PriorityField = number().int().min(1).max(5);
|
|
29886
30632
|
/**
|
|
30633
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30634
|
+
*
|
|
30635
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30636
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30637
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30638
|
+
*
|
|
30639
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30640
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30641
|
+
*
|
|
30642
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30643
|
+
*
|
|
30644
|
+
* 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.
|
|
30645
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30646
|
+
* and therefore the length of a quiet night, does not move.
|
|
30647
|
+
*
|
|
30648
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30649
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30650
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30651
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30652
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30653
|
+
*/
|
|
30654
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30655
|
+
/**
|
|
30656
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30657
|
+
*
|
|
30658
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30659
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30660
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30661
|
+
* that range every ~583 ms.
|
|
30662
|
+
*
|
|
30663
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30664
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30665
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30666
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30667
|
+
* schema change and are the tracked follow-up.
|
|
30668
|
+
*
|
|
30669
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30670
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30671
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30672
|
+
* happened.
|
|
30673
|
+
*/
|
|
30674
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30675
|
+
/**
|
|
30676
|
+
* Caption burned into the notification's preview frame.
|
|
30677
|
+
*
|
|
30678
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30679
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30680
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30681
|
+
*
|
|
30682
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30683
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30684
|
+
* the reason this is not `.min(1)`.
|
|
30685
|
+
*/
|
|
30686
|
+
var PreviewTextField = string().max(200);
|
|
30687
|
+
/**
|
|
30688
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30689
|
+
*
|
|
30690
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30691
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30692
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30693
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30694
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30695
|
+
* them.
|
|
30696
|
+
*
|
|
30697
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30698
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30699
|
+
* paying that on the deploy that shipped it.
|
|
30700
|
+
*
|
|
30701
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30702
|
+
*/
|
|
30703
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30704
|
+
/**
|
|
30705
|
+
* Which detection classes the notification reports counts for.
|
|
30706
|
+
*
|
|
30707
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30708
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30709
|
+
* class the window actually contained", which is what an operator who never
|
|
30710
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30711
|
+
* counts cars all night).
|
|
30712
|
+
*
|
|
30713
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30714
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30715
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30716
|
+
* not emit.
|
|
30717
|
+
*
|
|
30718
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30719
|
+
* - `{{detections}}` — total over the reported classes
|
|
30720
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30721
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30722
|
+
* one per class, `count_` + the class name
|
|
30723
|
+
*
|
|
30724
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30725
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30726
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30727
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30728
|
+
*/
|
|
30729
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30730
|
+
/**
|
|
29887
30731
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29888
30732
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29889
30733
|
* here (see the ownership note above).
|
|
@@ -29903,9 +30747,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29903
30747
|
cadenceSec: CadenceSecField.default(15),
|
|
29904
30748
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29905
30749
|
framerate: FramerateField.default(10),
|
|
30750
|
+
/**
|
|
30751
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30752
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30753
|
+
* field gets.
|
|
30754
|
+
*/
|
|
30755
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30756
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30757
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29906
30758
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29907
30759
|
targets: TargetsField,
|
|
29908
30760
|
template: TimelapseTemplateSchema.optional(),
|
|
30761
|
+
/**
|
|
30762
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30763
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30764
|
+
*
|
|
30765
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30766
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30767
|
+
* silently clear the caption too.
|
|
30768
|
+
*/
|
|
30769
|
+
previewText: PreviewTextField.optional(),
|
|
30770
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30771
|
+
previewMode: PreviewModeField.default("image"),
|
|
30772
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30773
|
+
reportClasses: ReportClassesField.optional(),
|
|
29909
30774
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29910
30775
|
priority: PriorityField.default(3)
|
|
29911
30776
|
});
|
|
@@ -29916,8 +30781,13 @@ object({
|
|
|
29916
30781
|
schedule: NcScheduleSchema.optional(),
|
|
29917
30782
|
cadenceSec: CadenceSecField.optional(),
|
|
29918
30783
|
framerate: FramerateField.optional(),
|
|
30784
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30785
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29919
30786
|
targets: TargetsField.optional(),
|
|
29920
30787
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30788
|
+
previewText: PreviewTextField.optional(),
|
|
30789
|
+
previewMode: PreviewModeField.optional(),
|
|
30790
|
+
reportClasses: ReportClassesField.optional(),
|
|
29921
30791
|
priority: PriorityField.optional()
|
|
29922
30792
|
});
|
|
29923
30793
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29929,10 +30799,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29929
30799
|
*/
|
|
29930
30800
|
ownerUserId: string().optional(),
|
|
29931
30801
|
/**
|
|
29932
|
-
* Epoch-ms of the
|
|
29933
|
-
*
|
|
30802
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30803
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30804
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29934
30805
|
*/
|
|
29935
30806
|
lastGeneratedAt: number().optional(),
|
|
30807
|
+
/**
|
|
30808
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30809
|
+
* re-generation guard's real durable state.
|
|
30810
|
+
*
|
|
30811
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30812
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30813
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30814
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30815
|
+
* come back.
|
|
30816
|
+
*
|
|
30817
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30818
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30819
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30820
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30821
|
+
* once, on the deploy that shipped the map.
|
|
30822
|
+
*/
|
|
30823
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29936
30824
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29937
30825
|
createdBy: string(),
|
|
29938
30826
|
createdAt: number(),
|