@camstack/addon-provider-onvif 1.2.11 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +954 -62
- package/dist/addon.mjs +954 -62
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -7205,8 +7205,31 @@ var AdoptionJobSchema = object({
|
|
|
7205
7205
|
error: string().nullable()
|
|
7206
7206
|
});
|
|
7207
7207
|
/**
|
|
7208
|
-
* Per-camera FUNCTION SWITCHES
|
|
7209
|
-
*
|
|
7208
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7209
|
+
*
|
|
7210
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7211
|
+
*
|
|
7212
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7213
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7214
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7215
|
+
* every function already had a settings page of its own, and a second place to
|
|
7216
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7217
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7218
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7219
|
+
* (which was always first-class; the switch was a veneer over
|
|
7220
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7221
|
+
* per-device setting, the two camera planes to their own components.
|
|
7222
|
+
*
|
|
7223
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7224
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7225
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7226
|
+
* never about a control panel.
|
|
7227
|
+
*
|
|
7228
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7229
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7230
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7231
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7232
|
+
* stop; nothing new may be built on it.
|
|
7210
7233
|
*
|
|
7211
7234
|
* ## This file adds no state
|
|
7212
7235
|
*
|
|
@@ -7551,14 +7574,21 @@ var RecordingConfigSchema = object({
|
|
|
7551
7574
|
/**
|
|
7552
7575
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7553
7576
|
*
|
|
7554
|
-
* One shape shared by the recorder
|
|
7555
|
-
*
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
*
|
|
7559
|
-
|
|
7577
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7578
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7579
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7580
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7581
|
+
* addon surface.
|
|
7582
|
+
*/
|
|
7583
|
+
/**
|
|
7584
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7585
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7586
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7587
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7588
|
+
* runs at all.
|
|
7560
7589
|
*/
|
|
7561
7590
|
var RelocateJobStateSchema = _enum([
|
|
7591
|
+
"queued",
|
|
7562
7592
|
"running",
|
|
7563
7593
|
"done",
|
|
7564
7594
|
"failed",
|
|
@@ -7583,19 +7613,109 @@ var RelocateJobSchema = object({
|
|
|
7583
7613
|
finishedAt: number().nullable(),
|
|
7584
7614
|
error: string().nullable()
|
|
7585
7615
|
});
|
|
7616
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7617
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7618
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7586
7619
|
var RelocateFootageInputSchema = object({
|
|
7587
|
-
deviceId: number().optional(),
|
|
7588
7620
|
fromLocationId: string(),
|
|
7589
7621
|
toLocationId: string(),
|
|
7590
7622
|
entities: array(_enum(["segments"])).optional(),
|
|
7623
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7624
|
+
* pre-orchestration compatibility path. */
|
|
7625
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7626
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7627
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7628
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7629
|
+
deviceId: number().int().optional(),
|
|
7630
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7631
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7632
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7633
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7634
|
+
profiles: array(string()).optional(),
|
|
7591
7635
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7592
7636
|
* never allowed to starve live writers. */
|
|
7593
7637
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7594
7638
|
});
|
|
7595
|
-
|
|
7596
|
-
|
|
7639
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7640
|
+
* from persistent recording settings: a migration never changes
|
|
7641
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7642
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7643
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7644
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7597
7645
|
toLocationId: string(),
|
|
7598
7646
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7647
|
+
}).extend({ leaseId: string().min(1) });
|
|
7648
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7649
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7650
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7651
|
+
var StorageMigrationClassSchema = _enum([
|
|
7652
|
+
"recordings",
|
|
7653
|
+
"recordingsLow",
|
|
7654
|
+
"eventMedia"
|
|
7655
|
+
]);
|
|
7656
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7657
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7658
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7659
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7660
|
+
recordings: string().min(1).optional(),
|
|
7661
|
+
recordingsLow: string().min(1).optional(),
|
|
7662
|
+
eventMedia: string().min(1).optional()
|
|
7663
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7664
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7665
|
+
var StorageMigrationInputSchema = object({
|
|
7666
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7667
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7668
|
+
});
|
|
7669
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7670
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7671
|
+
* verified. */
|
|
7672
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7673
|
+
"planning",
|
|
7674
|
+
"pausing",
|
|
7675
|
+
"moving",
|
|
7676
|
+
"verifying",
|
|
7677
|
+
"repointing",
|
|
7678
|
+
"refreshing",
|
|
7679
|
+
"resuming",
|
|
7680
|
+
"done",
|
|
7681
|
+
"failed",
|
|
7682
|
+
"cancelled"
|
|
7683
|
+
]);
|
|
7684
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7685
|
+
"pipeline",
|
|
7686
|
+
"recorder",
|
|
7687
|
+
"analytics"
|
|
7688
|
+
]);
|
|
7689
|
+
var StorageMigrationMoveSchema = object({
|
|
7690
|
+
storageClass: StorageMigrationClassSchema,
|
|
7691
|
+
fromLocationId: string(),
|
|
7692
|
+
toLocationId: string(),
|
|
7693
|
+
moverJobId: string().nullable(),
|
|
7694
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7695
|
+
error: string().nullable()
|
|
7696
|
+
});
|
|
7697
|
+
var StorageMigrationJobSchema = object({
|
|
7698
|
+
jobId: string(),
|
|
7699
|
+
phase: StorageMigrationPhaseSchema,
|
|
7700
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7701
|
+
throttleMbps: number(),
|
|
7702
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7703
|
+
pauseLeaseId: string().nullable(),
|
|
7704
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7705
|
+
repointed: boolean(),
|
|
7706
|
+
cancelRequested: boolean(),
|
|
7707
|
+
startedAt: number(),
|
|
7708
|
+
updatedAt: number(),
|
|
7709
|
+
finishedAt: number().nullable(),
|
|
7710
|
+
error: string().nullable()
|
|
7711
|
+
});
|
|
7712
|
+
var StorageMigrationPlanSchema = object({
|
|
7713
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7714
|
+
moves: array(object({
|
|
7715
|
+
storageClass: StorageMigrationClassSchema,
|
|
7716
|
+
fromLocationId: string(),
|
|
7717
|
+
toLocationId: string()
|
|
7718
|
+
}))
|
|
7599
7719
|
});
|
|
7600
7720
|
/**
|
|
7601
7721
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7647,6 +7767,21 @@ var StorageLocationSchema = object({
|
|
|
7647
7767
|
nodeId: string().optional(),
|
|
7648
7768
|
isDefault: boolean().default(false),
|
|
7649
7769
|
isSystem: boolean().default(false),
|
|
7770
|
+
/**
|
|
7771
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7772
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7773
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7774
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7775
|
+
* extended to add the next consumer.
|
|
7776
|
+
*
|
|
7777
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7778
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7779
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7780
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7781
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7782
|
+
* always stamped `true`.
|
|
7783
|
+
*/
|
|
7784
|
+
enabled: boolean().optional(),
|
|
7650
7785
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7651
7786
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7652
7787
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12004,7 +12139,8 @@ method(object({
|
|
|
12004
12139
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12005
12140
|
/**
|
|
12006
12141
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12007
|
-
* filesystem
|
|
12142
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12143
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12008
12144
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12009
12145
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12010
12146
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13817,6 +13953,13 @@ var MaskGridDimsSchema = object({
|
|
|
13817
13953
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13818
13954
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13819
13955
|
* one trigger.
|
|
13956
|
+
*
|
|
13957
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13958
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13959
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13960
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13961
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13962
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13820
13963
|
*/
|
|
13821
13964
|
var NcDeliverySchema = _enum([
|
|
13822
13965
|
"immediate",
|
|
@@ -13831,15 +13974,32 @@ var NcDeliverySchema = _enum([
|
|
|
13831
13974
|
* depend on a provider's raw event name or payload shape.
|
|
13832
13975
|
*/
|
|
13833
13976
|
var NcSystemEventKindSchema = _enum([
|
|
13834
|
-
"
|
|
13835
|
-
"
|
|
13977
|
+
"device-online",
|
|
13978
|
+
"device-offline",
|
|
13979
|
+
"device-disabled",
|
|
13980
|
+
"device-enabled",
|
|
13836
13981
|
"stream-online",
|
|
13837
13982
|
"stream-offline",
|
|
13838
13983
|
"node-online",
|
|
13839
13984
|
"node-offline",
|
|
13840
13985
|
"addon-update-available",
|
|
13841
|
-
"server-update-available"
|
|
13986
|
+
"server-update-available",
|
|
13987
|
+
"alarm-triggered",
|
|
13988
|
+
"alarm-armed",
|
|
13989
|
+
"alarm-disarmed",
|
|
13990
|
+
"camera-online",
|
|
13991
|
+
"camera-offline",
|
|
13992
|
+
"camera-disabled",
|
|
13993
|
+
"camera-enabled"
|
|
13994
|
+
]);
|
|
13995
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13996
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13997
|
+
"camera-online",
|
|
13998
|
+
"camera-offline",
|
|
13999
|
+
"camera-disabled",
|
|
14000
|
+
"camera-enabled"
|
|
13842
14001
|
]);
|
|
14002
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13843
14003
|
/**
|
|
13844
14004
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13845
14005
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13848,6 +14008,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13848
14008
|
var NcSystemEventConditionSchema = object({
|
|
13849
14009
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13850
14010
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14011
|
+
/**
|
|
14012
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14013
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14014
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14015
|
+
*
|
|
14016
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14017
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14018
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14019
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14020
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14021
|
+
*/
|
|
14022
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13851
14023
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13852
14024
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13853
14025
|
});
|
|
@@ -13898,6 +14070,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13898
14070
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13899
14071
|
});
|
|
13900
14072
|
/**
|
|
14073
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14074
|
+
*
|
|
14075
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14076
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14077
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14078
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14079
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14080
|
+
*
|
|
14081
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14082
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14083
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14084
|
+
*
|
|
14085
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14086
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14087
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14088
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14089
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14090
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14091
|
+
* ZodEffects the cap path would have to special-case).
|
|
14092
|
+
*
|
|
14093
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14094
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14095
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14096
|
+
* `samplingSeconds` decorative.
|
|
14097
|
+
*
|
|
14098
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14099
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14100
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14101
|
+
* an operator who typed `dog` mean the same thing.
|
|
14102
|
+
*/
|
|
14103
|
+
var NcAudioConditionSchema = object({
|
|
14104
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14105
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14106
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14107
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14108
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14109
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14110
|
+
/** Length of the sampling window in seconds. */
|
|
14111
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14112
|
+
});
|
|
14113
|
+
/**
|
|
13901
14114
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13902
14115
|
*
|
|
13903
14116
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14170,7 +14383,33 @@ var NcConditionsSchema = object({
|
|
|
14170
14383
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14171
14384
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14172
14385
|
*/
|
|
14173
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14386
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14387
|
+
/**
|
|
14388
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14389
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14390
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14391
|
+
* a window that is not full yet, neither filter given). See
|
|
14392
|
+
* {@link NcAudioCondition}.
|
|
14393
|
+
*
|
|
14394
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14395
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14396
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14397
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14398
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14399
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14400
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14401
|
+
*
|
|
14402
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14403
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14404
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14405
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14406
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14407
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14408
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14409
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14410
|
+
* does an audio rule become authorable.
|
|
14411
|
+
*/
|
|
14412
|
+
audio: NcAudioConditionSchema.optional()
|
|
14174
14413
|
});
|
|
14175
14414
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14176
14415
|
var NcRuleTargetSchema = object({
|
|
@@ -14284,6 +14523,73 @@ var NcThrottleSchema = object({
|
|
|
14284
14523
|
*/
|
|
14285
14524
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14286
14525
|
});
|
|
14526
|
+
/**
|
|
14527
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14528
|
+
* it judges may be.
|
|
14529
|
+
*
|
|
14530
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14531
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14532
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14533
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14534
|
+
* tokens for pixels the model pools away.
|
|
14535
|
+
*/
|
|
14536
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14537
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14538
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14539
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14540
|
+
var NcConfirmExpectSchema = object({
|
|
14541
|
+
op: _enum([
|
|
14542
|
+
">=",
|
|
14543
|
+
">",
|
|
14544
|
+
"<=",
|
|
14545
|
+
"<",
|
|
14546
|
+
"=="
|
|
14547
|
+
]),
|
|
14548
|
+
count: number().int().min(0).max(1e3)
|
|
14549
|
+
});
|
|
14550
|
+
/**
|
|
14551
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14552
|
+
* to ship and says whether it agrees with the rule.
|
|
14553
|
+
*
|
|
14554
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14555
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14556
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14557
|
+
*
|
|
14558
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14559
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14560
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14561
|
+
* open looks in the log exactly like a gate that works.
|
|
14562
|
+
*
|
|
14563
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14564
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14565
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14566
|
+
* above rather than trusting a parse it may never have seen.
|
|
14567
|
+
*/
|
|
14568
|
+
var NcConfirmSchema = object({
|
|
14569
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14570
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14571
|
+
enabled: boolean().default(false),
|
|
14572
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14573
|
+
profileId: string().optional(),
|
|
14574
|
+
/**
|
|
14575
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14576
|
+
* from the rule (its class and its expectation).
|
|
14577
|
+
*
|
|
14578
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14579
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14580
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14581
|
+
* turn and only rule-authored words land here.
|
|
14582
|
+
*/
|
|
14583
|
+
prompt: string().max(1e3).optional(),
|
|
14584
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14585
|
+
* own boolean verdict decides. */
|
|
14586
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14587
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14588
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14589
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14590
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14591
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14592
|
+
});
|
|
14287
14593
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14288
14594
|
var NcRuleInputSchema = object({
|
|
14289
14595
|
name: string().min(1).max(200),
|
|
@@ -14344,7 +14650,13 @@ var NcRuleInputSchema = object({
|
|
|
14344
14650
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14345
14651
|
* shape as every other actuation.
|
|
14346
14652
|
*/
|
|
14347
|
-
actions: NcRuleActionsSchema.optional()
|
|
14653
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14654
|
+
/**
|
|
14655
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14656
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14657
|
+
* did, and absent is the only way to say that without a migration.
|
|
14658
|
+
*/
|
|
14659
|
+
confirm: NcConfirmSchema.optional()
|
|
14348
14660
|
});
|
|
14349
14661
|
/**
|
|
14350
14662
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14355,7 +14667,37 @@ var NcRuleInputSchema = object({
|
|
|
14355
14667
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14356
14668
|
* `updateRule` patch.
|
|
14357
14669
|
*/
|
|
14358
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14670
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14671
|
+
disabledTargetIds: array(string()).optional(),
|
|
14672
|
+
/**
|
|
14673
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14674
|
+
*
|
|
14675
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14676
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14677
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14678
|
+
* one — which made every partial edit destructive:
|
|
14679
|
+
*
|
|
14680
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14681
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14682
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14683
|
+
*
|
|
14684
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14685
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14686
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14687
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14688
|
+
* within a minute of a two-field patch.
|
|
14689
|
+
*
|
|
14690
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14691
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14692
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14693
|
+
* absent key is now genuinely absent.
|
|
14694
|
+
*/
|
|
14695
|
+
enabled: boolean().optional(),
|
|
14696
|
+
conditions: NcConditionsSchema.optional(),
|
|
14697
|
+
media: NcMediaPolicySchema.optional(),
|
|
14698
|
+
throttle: NcThrottleSchema.optional(),
|
|
14699
|
+
priority: number().int().min(1).max(5).optional()
|
|
14700
|
+
});
|
|
14359
14701
|
/** A persisted rule. */
|
|
14360
14702
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14361
14703
|
id: string(),
|
|
@@ -14656,6 +14998,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14656
14998
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14657
14999
|
* copy would lie the first time a rule is disabled.
|
|
14658
15000
|
*/
|
|
15001
|
+
/**
|
|
15002
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15003
|
+
*
|
|
15004
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15005
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15006
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15007
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15008
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15009
|
+
* with the switches the operator actually used.
|
|
15010
|
+
*/
|
|
15011
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15012
|
+
"muted",
|
|
15013
|
+
"detection-off",
|
|
15014
|
+
"offline"
|
|
15015
|
+
]);
|
|
15016
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15017
|
+
deviceId: number().int(),
|
|
15018
|
+
reason: NcAlarmSkipReasonSchema
|
|
15019
|
+
});
|
|
14659
15020
|
var NcAlarmModeCoverageSchema = object({
|
|
14660
15021
|
mode: AlarmArmModeSchema,
|
|
14661
15022
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14663,7 +15024,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14663
15024
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14664
15025
|
allDevices: boolean(),
|
|
14665
15026
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14666
|
-
deviceIds: array(number().int())
|
|
15027
|
+
deviceIds: array(number().int()),
|
|
15028
|
+
/**
|
|
15029
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15030
|
+
* excludes it.
|
|
15031
|
+
*
|
|
15032
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15033
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15034
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15035
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15036
|
+
* alarm tab.
|
|
15037
|
+
*/
|
|
15038
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14667
15039
|
});
|
|
14668
15040
|
var NcAlarmConfigSchema = object({
|
|
14669
15041
|
/**
|
|
@@ -16026,13 +16398,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16026
16398
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16027
16399
|
kind: "mutation",
|
|
16028
16400
|
auth: "admin"
|
|
16029
|
-
}), method(
|
|
16401
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16030
16402
|
kind: "mutation",
|
|
16031
16403
|
auth: "admin"
|
|
16032
|
-
}), method(object({
|
|
16033
|
-
kind: "
|
|
16404
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16405
|
+
kind: "mutation",
|
|
16034
16406
|
auth: "admin"
|
|
16035
|
-
}), method(
|
|
16407
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16408
|
+
kind: "mutation",
|
|
16409
|
+
auth: "admin"
|
|
16410
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16411
|
+
kind: "mutation",
|
|
16412
|
+
auth: "admin"
|
|
16413
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16036
16414
|
kind: "mutation",
|
|
16037
16415
|
auth: "admin"
|
|
16038
16416
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17456,9 +17834,16 @@ var CameraStatusSchema = object({
|
|
|
17456
17834
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17457
17835
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17458
17836
|
/**
|
|
17459
|
-
* Per-camera
|
|
17837
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17460
17838
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17461
17839
|
*
|
|
17840
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17841
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17842
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17843
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17844
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17845
|
+
* the difference between a camera being off and a camera being dead.
|
|
17846
|
+
*
|
|
17462
17847
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17463
17848
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17464
17849
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17529,7 +17914,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17529
17914
|
reachable: boolean(),
|
|
17530
17915
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17531
17916
|
});
|
|
17532
|
-
method(object({
|
|
17917
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17918
|
+
kind: "mutation",
|
|
17919
|
+
auth: "admin"
|
|
17920
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17921
|
+
kind: "mutation",
|
|
17922
|
+
auth: "admin"
|
|
17923
|
+
}), method(object({
|
|
17533
17924
|
deviceId: number(),
|
|
17534
17925
|
agentNodeId: string()
|
|
17535
17926
|
}), object({ success: literal(true) }), {
|
|
@@ -18059,24 +18450,28 @@ var snapshotCapability = {
|
|
|
18059
18450
|
*
|
|
18060
18451
|
* `getSnapshotOverview` is cache-only by contract: it answers from whatever
|
|
18061
18452
|
* the wrapper happens to hold and never captures. Under D93 the client
|
|
18062
|
-
* versions its image URL on that answer, and an image REQUEST
|
|
18063
|
-
*
|
|
18064
|
-
*
|
|
18065
|
-
*
|
|
18066
|
-
*
|
|
18067
|
-
*
|
|
18068
|
-
*
|
|
18069
|
-
*
|
|
18453
|
+
* versions its image URL on that answer, and an image REQUEST was the only
|
|
18454
|
+
* demand signal. Both of those are satisfiable by the client's own image
|
|
18455
|
+
* cache — `expo-image` is URL-keyed and never revalidates — so a URL painted
|
|
18456
|
+
* in a previous session comes off disk with no network, no demand, and no
|
|
18457
|
+
* capture. Measured on the live hub: reopening after two minutes idle
|
|
18458
|
+
* painted 15 of 16 tiles at **168 s old** with zero HTTP requests, and the
|
|
18459
|
+
* fleet only recovered because a later poll happened to observe a different
|
|
18460
|
+
* identity.
|
|
18070
18461
|
*
|
|
18071
18462
|
* ## The two properties that fix it
|
|
18072
18463
|
*
|
|
18073
18464
|
* **It is an RPC, so no client cache can answer it.** The demand signal
|
|
18074
|
-
* always reaches the wrapper. This method therefore
|
|
18075
|
-
*
|
|
18076
|
-
*
|
|
18077
|
-
*
|
|
18078
|
-
*
|
|
18079
|
-
*
|
|
18465
|
+
* always reaches the wrapper. This method therefore CAPTURES, where
|
|
18466
|
+
* `getSnapshotOverview` must never (D93) — the distinction is not "one is
|
|
18467
|
+
* newer" but that the overview poll is app-wide (a capturing overview would
|
|
18468
|
+
* dial every camera on the install) while this is called by a rendered
|
|
18469
|
+
* surface naming the tiles it is actually painting, at the width it is
|
|
18470
|
+
* painting them.
|
|
18471
|
+
*
|
|
18472
|
+
* Since 2026-08-11 this is the ONLY thing that refreshes a snapshot: the
|
|
18473
|
+
* server-side keep-warm loop was removed (operator directive — on-demand,
|
|
18474
|
+
* always), so a camera nobody is looking at costs nothing at all.
|
|
18080
18475
|
*
|
|
18081
18476
|
* **It waits, briefly and boundedly, for the capture it triggered.** The
|
|
18082
18477
|
* returned `capturedAt` is the frame the link will serve, not the frame the
|
|
@@ -18294,6 +18689,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18294
18689
|
locationId: string(),
|
|
18295
18690
|
targetBytes: number().int().positive()
|
|
18296
18691
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18692
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18693
|
+
kind: "mutation",
|
|
18694
|
+
auth: "admin"
|
|
18695
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18696
|
+
kind: "mutation",
|
|
18697
|
+
auth: "admin"
|
|
18698
|
+
});
|
|
18297
18699
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18298
18700
|
providerId: string().min(1),
|
|
18299
18701
|
displayName: string().min(1),
|
|
@@ -18397,6 +18799,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18397
18799
|
label: string(),
|
|
18398
18800
|
description: string().optional()
|
|
18399
18801
|
});
|
|
18802
|
+
/**
|
|
18803
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18804
|
+
* an instance declares a camera.
|
|
18805
|
+
*/
|
|
18806
|
+
var TerminalInstanceInfoSchema = object({
|
|
18807
|
+
instanceId: string(),
|
|
18808
|
+
cameraStableId: string(),
|
|
18809
|
+
nodeId: string(),
|
|
18810
|
+
profileId: string(),
|
|
18811
|
+
profileLabel: string(),
|
|
18812
|
+
name: string(),
|
|
18813
|
+
enabled: boolean()
|
|
18814
|
+
});
|
|
18815
|
+
var TerminalLegacyCameraSchema = object({
|
|
18816
|
+
stableId: string(),
|
|
18817
|
+
nodeId: string(),
|
|
18818
|
+
profileId: string(),
|
|
18819
|
+
profileLabel: string(),
|
|
18820
|
+
name: string(),
|
|
18821
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18822
|
+
adoptable: boolean()
|
|
18823
|
+
});
|
|
18400
18824
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18401
18825
|
seq: number().int().positive(),
|
|
18402
18826
|
kind: literal("data"),
|
|
@@ -18413,7 +18837,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18413
18837
|
snapshot: string().optional(),
|
|
18414
18838
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18415
18839
|
});
|
|
18416
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18840
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18841
|
+
targetNodeId: string().min(1),
|
|
18842
|
+
profileId: string().min(1),
|
|
18843
|
+
name: string().trim().min(1).max(160).optional()
|
|
18844
|
+
}), TerminalInstanceInfoSchema, {
|
|
18845
|
+
kind: "mutation",
|
|
18846
|
+
auth: "admin"
|
|
18847
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18848
|
+
kind: "mutation",
|
|
18849
|
+
auth: "admin"
|
|
18850
|
+
}), method(object({
|
|
18851
|
+
instanceId: string().min(1),
|
|
18852
|
+
enabled: boolean()
|
|
18853
|
+
}), TerminalInstanceInfoSchema, {
|
|
18854
|
+
kind: "mutation",
|
|
18855
|
+
auth: "admin"
|
|
18856
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18857
|
+
stableId: string().min(1),
|
|
18858
|
+
name: string().trim().min(1).max(160).optional()
|
|
18859
|
+
}), TerminalInstanceInfoSchema, {
|
|
18860
|
+
kind: "mutation",
|
|
18861
|
+
auth: "admin"
|
|
18862
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18417
18863
|
profileId: string(),
|
|
18418
18864
|
cols: number().int().positive(),
|
|
18419
18865
|
rows: number().int().positive()
|
|
@@ -18430,7 +18876,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18430
18876
|
}), method(object({
|
|
18431
18877
|
sessionId: string(),
|
|
18432
18878
|
afterSeq: number().int().nonnegative(),
|
|
18433
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18879
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18880
|
+
/**
|
|
18881
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18882
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18883
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18884
|
+
*/
|
|
18885
|
+
waitForOutput: boolean().optional()
|
|
18434
18886
|
}), TerminalOutputBatchSchema, {
|
|
18435
18887
|
kind: "mutation",
|
|
18436
18888
|
auth: "admin",
|
|
@@ -20371,6 +20823,7 @@ var FaceInfoSchema = object({
|
|
|
20371
20823
|
var FaceFilterEnum = _enum([
|
|
20372
20824
|
"unassigned",
|
|
20373
20825
|
"recognized",
|
|
20826
|
+
"identified",
|
|
20374
20827
|
"all"
|
|
20375
20828
|
]);
|
|
20376
20829
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20399,6 +20852,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20399
20852
|
kind: "mutation",
|
|
20400
20853
|
auth: "admin"
|
|
20401
20854
|
}), method(object({
|
|
20855
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20856
|
+
deviceId: number().int().optional(),
|
|
20402
20857
|
limit: number().int().positive().optional(),
|
|
20403
20858
|
filter: FaceFilterEnum.optional(),
|
|
20404
20859
|
/**
|
|
@@ -22164,6 +22619,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22164
22619
|
capName: string().min(1).max(64),
|
|
22165
22620
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22166
22621
|
valuePath: string().min(1).max(64)
|
|
22622
|
+
}),
|
|
22623
|
+
object({
|
|
22624
|
+
kind: literal("latest-recognition"),
|
|
22625
|
+
recognition: _enum(["person", "plate"])
|
|
22167
22626
|
})
|
|
22168
22627
|
]);
|
|
22169
22628
|
var OsdSlotBindingSchema = object({
|
|
@@ -22269,6 +22728,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22269
22728
|
}), object({ success: literal(true) }), {
|
|
22270
22729
|
kind: "mutation",
|
|
22271
22730
|
auth: "admin"
|
|
22731
|
+
}), method(object({
|
|
22732
|
+
sourceDeviceId: number().int(),
|
|
22733
|
+
targetDeviceId: number().int()
|
|
22734
|
+
}), object({
|
|
22735
|
+
copied: number().int().nonnegative(),
|
|
22736
|
+
skipped: number().int().nonnegative()
|
|
22737
|
+
}), {
|
|
22738
|
+
kind: "mutation",
|
|
22739
|
+
auth: "admin"
|
|
22272
22740
|
}), method(object({
|
|
22273
22741
|
deviceId: number().int(),
|
|
22274
22742
|
slotId: string().min(1),
|
|
@@ -23021,7 +23489,19 @@ var RecordingManifestSchema = object({
|
|
|
23021
23489
|
* profiles/subtrees/locations on this node). */
|
|
23022
23490
|
var RecordingDeviceUsageSchema = object({
|
|
23023
23491
|
deviceId: number(),
|
|
23024
|
-
usedBytes: number()
|
|
23492
|
+
usedBytes: number(),
|
|
23493
|
+
/**
|
|
23494
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23495
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23496
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23497
|
+
*
|
|
23498
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23499
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23500
|
+
* field must keep validating that older provider's payload: the framework
|
|
23501
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23502
|
+
* the later of the two.
|
|
23503
|
+
*/
|
|
23504
|
+
oldestMs: number().nullable().optional()
|
|
23025
23505
|
});
|
|
23026
23506
|
/** Recording storage usage + capacity for one storage location. */
|
|
23027
23507
|
var RecordingLocationUsageSchema = object({
|
|
@@ -23049,6 +23529,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
23049
23529
|
locations: array(RecordingLocationUsageSchema)
|
|
23050
23530
|
});
|
|
23051
23531
|
/**
|
|
23532
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23533
|
+
*
|
|
23534
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23535
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23536
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23537
|
+
* location, run FIFO behind the single-flight mover.
|
|
23538
|
+
*
|
|
23539
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23540
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23541
|
+
* (empty on the plan).
|
|
23542
|
+
*/
|
|
23543
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23544
|
+
deviceId: number(),
|
|
23545
|
+
profile: string(),
|
|
23546
|
+
fromLocationId: string(),
|
|
23547
|
+
toLocationId: string(),
|
|
23548
|
+
bytes: number(),
|
|
23549
|
+
files: number().int()
|
|
23550
|
+
});
|
|
23551
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23552
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23553
|
+
* that had nothing to do. */
|
|
23554
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23555
|
+
"unassigned",
|
|
23556
|
+
"target-not-writable",
|
|
23557
|
+
"below-threshold",
|
|
23558
|
+
"no-headroom"
|
|
23559
|
+
]);
|
|
23560
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23561
|
+
deviceId: number(),
|
|
23562
|
+
profile: string(),
|
|
23563
|
+
fromLocationId: string(),
|
|
23564
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23565
|
+
toLocationId: string().nullable(),
|
|
23566
|
+
bytes: number(),
|
|
23567
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23568
|
+
});
|
|
23569
|
+
var RecordingRebalancePlanSchema = object({
|
|
23570
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23571
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23572
|
+
bytesToMove: number(),
|
|
23573
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23574
|
+
jobIds: array(string())
|
|
23575
|
+
});
|
|
23576
|
+
var RecordingRebalanceInputSchema = object({
|
|
23577
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23578
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23579
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23580
|
+
minMoveGb: number().min(0).optional()
|
|
23581
|
+
});
|
|
23582
|
+
/**
|
|
23052
23583
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
23053
23584
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
23054
23585
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23196,6 +23727,21 @@ method(object({
|
|
|
23196
23727
|
}), {
|
|
23197
23728
|
kind: "mutation",
|
|
23198
23729
|
auth: "admin"
|
|
23730
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23731
|
+
kind: "mutation",
|
|
23732
|
+
auth: "admin"
|
|
23733
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23734
|
+
kind: "mutation",
|
|
23735
|
+
auth: "admin"
|
|
23736
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23737
|
+
kind: "mutation",
|
|
23738
|
+
auth: "admin"
|
|
23739
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23740
|
+
kind: "mutation",
|
|
23741
|
+
auth: "admin"
|
|
23742
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23743
|
+
kind: "mutation",
|
|
23744
|
+
auth: "admin"
|
|
23199
23745
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23200
23746
|
kind: "mutation",
|
|
23201
23747
|
auth: "admin"
|
|
@@ -23205,9 +23751,15 @@ method(object({
|
|
|
23205
23751
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23206
23752
|
kind: "mutation",
|
|
23207
23753
|
auth: "admin"
|
|
23754
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23755
|
+
kind: "query",
|
|
23756
|
+
auth: "admin"
|
|
23757
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23758
|
+
kind: "mutation",
|
|
23759
|
+
auth: "admin"
|
|
23208
23760
|
});
|
|
23209
23761
|
/**
|
|
23210
|
-
* `
|
|
23762
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23211
23763
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23212
23764
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23213
23765
|
* delete-after-download.
|
|
@@ -23222,10 +23774,42 @@ method(object({
|
|
|
23222
23774
|
*/
|
|
23223
23775
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23224
23776
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23777
|
+
/**
|
|
23778
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23779
|
+
*
|
|
23780
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23781
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23782
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23783
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23784
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23785
|
+
*/
|
|
23786
|
+
var ExportDenseRangeSchema = object({
|
|
23787
|
+
fromSec: number().nonnegative(),
|
|
23788
|
+
toSec: number().nonnegative()
|
|
23789
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23790
|
+
/**
|
|
23791
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23792
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23793
|
+
*
|
|
23794
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23795
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23796
|
+
*/
|
|
23797
|
+
var ExportDenseSchema = object({
|
|
23798
|
+
everyMs: number().int().positive(),
|
|
23799
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23800
|
+
});
|
|
23225
23801
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23226
23802
|
var ExportTimelapseSchema = object({
|
|
23227
23803
|
everyMs: number().int().positive(),
|
|
23228
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23804
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23805
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23806
|
+
dense: ExportDenseSchema.optional()
|
|
23807
|
+
}).superRefine((v, ctx) => {
|
|
23808
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23809
|
+
code: ZodIssueCode.custom,
|
|
23810
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23811
|
+
path: ["dense", "everyMs"]
|
|
23812
|
+
});
|
|
23229
23813
|
});
|
|
23230
23814
|
/**
|
|
23231
23815
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23283,6 +23867,19 @@ var ExportDownloadSchema = object({
|
|
|
23283
23867
|
url: string(),
|
|
23284
23868
|
endpoints: array(string())
|
|
23285
23869
|
});
|
|
23870
|
+
/**
|
|
23871
|
+
* A finished export's bytes, inline.
|
|
23872
|
+
*
|
|
23873
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23874
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23875
|
+
*/
|
|
23876
|
+
var ExportBytesSchema = object({
|
|
23877
|
+
base64: string(),
|
|
23878
|
+
contentType: string(),
|
|
23879
|
+
/** Suggested filename, extension included. */
|
|
23880
|
+
name: string(),
|
|
23881
|
+
bytes: number().int().nonnegative()
|
|
23882
|
+
});
|
|
23286
23883
|
method(object({
|
|
23287
23884
|
deviceId: number(),
|
|
23288
23885
|
profile: string(),
|
|
@@ -23307,6 +23904,9 @@ method(object({
|
|
|
23307
23904
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23308
23905
|
kind: "query",
|
|
23309
23906
|
auth: "protected"
|
|
23907
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23908
|
+
kind: "query",
|
|
23909
|
+
auth: "protected"
|
|
23310
23910
|
});
|
|
23311
23911
|
/**
|
|
23312
23912
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27733,6 +28333,12 @@ Object.freeze({
|
|
|
27733
28333
|
addonId: null,
|
|
27734
28334
|
access: "delete"
|
|
27735
28335
|
},
|
|
28336
|
+
"osdManager.copyDeviceConfiguration": {
|
|
28337
|
+
capName: "osd-manager",
|
|
28338
|
+
capScope: "system",
|
|
28339
|
+
addonId: null,
|
|
28340
|
+
access: "create"
|
|
28341
|
+
},
|
|
27736
28342
|
"osdManager.getConditionSupport": {
|
|
27737
28343
|
capName: "osd-manager",
|
|
27738
28344
|
capScope: "system",
|
|
@@ -27829,7 +28435,7 @@ Object.freeze({
|
|
|
27829
28435
|
addonId: null,
|
|
27830
28436
|
access: "create"
|
|
27831
28437
|
},
|
|
27832
|
-
"pipelineAnalytics.
|
|
28438
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27833
28439
|
capName: "pipeline-analytics",
|
|
27834
28440
|
capScope: "device",
|
|
27835
28441
|
addonId: null,
|
|
@@ -27901,12 +28507,6 @@ Object.freeze({
|
|
|
27901
28507
|
addonId: null,
|
|
27902
28508
|
access: "view"
|
|
27903
28509
|
},
|
|
27904
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27905
|
-
capName: "pipeline-analytics",
|
|
27906
|
-
capScope: "device",
|
|
27907
|
-
addonId: null,
|
|
27908
|
-
access: "view"
|
|
27909
|
-
},
|
|
27910
28510
|
"pipelineAnalytics.getMotionEvents": {
|
|
27911
28511
|
capName: "pipeline-analytics",
|
|
27912
28512
|
capScope: "device",
|
|
@@ -27943,6 +28543,12 @@ Object.freeze({
|
|
|
27943
28543
|
addonId: null,
|
|
27944
28544
|
access: "view"
|
|
27945
28545
|
},
|
|
28546
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
28547
|
+
capName: "pipeline-analytics",
|
|
28548
|
+
capScope: "device",
|
|
28549
|
+
addonId: null,
|
|
28550
|
+
access: "view"
|
|
28551
|
+
},
|
|
27946
28552
|
"pipelineAnalytics.getTrack": {
|
|
27947
28553
|
capName: "pipeline-analytics",
|
|
27948
28554
|
capScope: "device",
|
|
@@ -28021,6 +28627,12 @@ Object.freeze({
|
|
|
28021
28627
|
addonId: null,
|
|
28022
28628
|
access: "view"
|
|
28023
28629
|
},
|
|
28630
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28631
|
+
capName: "pipeline-analytics",
|
|
28632
|
+
capScope: "device",
|
|
28633
|
+
addonId: null,
|
|
28634
|
+
access: "create"
|
|
28635
|
+
},
|
|
28024
28636
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
28025
28637
|
capName: "pipeline-analytics",
|
|
28026
28638
|
capScope: "device",
|
|
@@ -28051,7 +28663,7 @@ Object.freeze({
|
|
|
28051
28663
|
addonId: null,
|
|
28052
28664
|
access: "create"
|
|
28053
28665
|
},
|
|
28054
|
-
"pipelineAnalytics.
|
|
28666
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
28055
28667
|
capName: "pipeline-analytics",
|
|
28056
28668
|
capScope: "device",
|
|
28057
28669
|
addonId: null,
|
|
@@ -28063,6 +28675,12 @@ Object.freeze({
|
|
|
28063
28675
|
addonId: null,
|
|
28064
28676
|
access: "create"
|
|
28065
28677
|
},
|
|
28678
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28679
|
+
capName: "pipeline-analytics",
|
|
28680
|
+
capScope: "device",
|
|
28681
|
+
addonId: null,
|
|
28682
|
+
access: "create"
|
|
28683
|
+
},
|
|
28066
28684
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
28067
28685
|
capName: "pipeline-analytics",
|
|
28068
28686
|
capScope: "device",
|
|
@@ -28087,6 +28705,12 @@ Object.freeze({
|
|
|
28087
28705
|
addonId: null,
|
|
28088
28706
|
access: "create"
|
|
28089
28707
|
},
|
|
28708
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28709
|
+
capName: "pipeline-analytics",
|
|
28710
|
+
capScope: "device",
|
|
28711
|
+
addonId: null,
|
|
28712
|
+
access: "create"
|
|
28713
|
+
},
|
|
28090
28714
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
28091
28715
|
capName: "pipeline-analytics",
|
|
28092
28716
|
capScope: "device",
|
|
@@ -28453,6 +29077,12 @@ Object.freeze({
|
|
|
28453
29077
|
addonId: null,
|
|
28454
29078
|
access: "view"
|
|
28455
29079
|
},
|
|
29080
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
29081
|
+
capName: "pipeline-orchestrator",
|
|
29082
|
+
capScope: "system",
|
|
29083
|
+
addonId: null,
|
|
29084
|
+
access: "create"
|
|
29085
|
+
},
|
|
28456
29086
|
"pipelineOrchestrator.rebalance": {
|
|
28457
29087
|
capName: "pipeline-orchestrator",
|
|
28458
29088
|
capScope: "system",
|
|
@@ -28477,6 +29107,12 @@ Object.freeze({
|
|
|
28477
29107
|
addonId: null,
|
|
28478
29108
|
access: "view"
|
|
28479
29109
|
},
|
|
29110
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
29111
|
+
capName: "pipeline-orchestrator",
|
|
29112
|
+
capScope: "system",
|
|
29113
|
+
addonId: null,
|
|
29114
|
+
access: "create"
|
|
29115
|
+
},
|
|
28480
29116
|
"pipelineOrchestrator.saveTemplate": {
|
|
28481
29117
|
capName: "pipeline-orchestrator",
|
|
28482
29118
|
capScope: "system",
|
|
@@ -28873,7 +29509,13 @@ Object.freeze({
|
|
|
28873
29509
|
addonId: null,
|
|
28874
29510
|
access: "create"
|
|
28875
29511
|
},
|
|
28876
|
-
"recording.
|
|
29512
|
+
"recording.cancelRelocateJob": {
|
|
29513
|
+
capName: "recording",
|
|
29514
|
+
capScope: "system",
|
|
29515
|
+
addonId: null,
|
|
29516
|
+
access: "create"
|
|
29517
|
+
},
|
|
29518
|
+
"recording.cancelStorageMigrationMove": {
|
|
28877
29519
|
capName: "recording",
|
|
28878
29520
|
capScope: "system",
|
|
28879
29521
|
addonId: null,
|
|
@@ -28909,7 +29551,7 @@ Object.freeze({
|
|
|
28909
29551
|
addonId: null,
|
|
28910
29552
|
access: "view"
|
|
28911
29553
|
},
|
|
28912
|
-
"recording.
|
|
29554
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28913
29555
|
capName: "recording",
|
|
28914
29556
|
capScope: "system",
|
|
28915
29557
|
addonId: null,
|
|
@@ -28927,12 +29569,30 @@ Object.freeze({
|
|
|
28927
29569
|
addonId: null,
|
|
28928
29570
|
access: "view"
|
|
28929
29571
|
},
|
|
29572
|
+
"recording.listRelocateJobs": {
|
|
29573
|
+
capName: "recording",
|
|
29574
|
+
capScope: "system",
|
|
29575
|
+
addonId: null,
|
|
29576
|
+
access: "view"
|
|
29577
|
+
},
|
|
28930
29578
|
"recording.locateSegment": {
|
|
28931
29579
|
capName: "recording",
|
|
28932
29580
|
capScope: "system",
|
|
28933
29581
|
addonId: null,
|
|
28934
29582
|
access: "view"
|
|
28935
29583
|
},
|
|
29584
|
+
"recording.pauseForStorageMigration": {
|
|
29585
|
+
capName: "recording",
|
|
29586
|
+
capScope: "system",
|
|
29587
|
+
addonId: null,
|
|
29588
|
+
access: "create"
|
|
29589
|
+
},
|
|
29590
|
+
"recording.planStorageRebalance": {
|
|
29591
|
+
capName: "recording",
|
|
29592
|
+
capScope: "system",
|
|
29593
|
+
addonId: null,
|
|
29594
|
+
access: "view"
|
|
29595
|
+
},
|
|
28936
29596
|
"recording.pruneFootage": {
|
|
28937
29597
|
capName: "recording",
|
|
28938
29598
|
capScope: "system",
|
|
@@ -28951,6 +29611,12 @@ Object.freeze({
|
|
|
28951
29611
|
addonId: null,
|
|
28952
29612
|
access: "view"
|
|
28953
29613
|
},
|
|
29614
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29615
|
+
capName: "recording",
|
|
29616
|
+
capScope: "system",
|
|
29617
|
+
addonId: null,
|
|
29618
|
+
access: "create"
|
|
29619
|
+
},
|
|
28954
29620
|
"recording.relocateFootage": {
|
|
28955
29621
|
capName: "recording",
|
|
28956
29622
|
capScope: "system",
|
|
@@ -28975,44 +29641,68 @@ Object.freeze({
|
|
|
28975
29641
|
addonId: null,
|
|
28976
29642
|
access: "create"
|
|
28977
29643
|
},
|
|
29644
|
+
"recording.resumeForStorageMigration": {
|
|
29645
|
+
capName: "recording",
|
|
29646
|
+
capScope: "system",
|
|
29647
|
+
addonId: null,
|
|
29648
|
+
access: "create"
|
|
29649
|
+
},
|
|
28978
29650
|
"recording.setDeviceConfig": {
|
|
28979
29651
|
capName: "recording",
|
|
28980
29652
|
capScope: "system",
|
|
28981
29653
|
addonId: null,
|
|
28982
29654
|
access: "create"
|
|
28983
29655
|
},
|
|
29656
|
+
"recording.startStorageMigrationMove": {
|
|
29657
|
+
capName: "recording",
|
|
29658
|
+
capScope: "system",
|
|
29659
|
+
addonId: null,
|
|
29660
|
+
access: "create"
|
|
29661
|
+
},
|
|
29662
|
+
"recording.startStorageRebalance": {
|
|
29663
|
+
capName: "recording",
|
|
29664
|
+
capScope: "system",
|
|
29665
|
+
addonId: null,
|
|
29666
|
+
access: "create"
|
|
29667
|
+
},
|
|
28984
29668
|
"recordingExport.cancelExport": {
|
|
28985
|
-
capName: "
|
|
29669
|
+
capName: "recording-export",
|
|
28986
29670
|
capScope: "system",
|
|
28987
29671
|
addonId: null,
|
|
28988
29672
|
access: "create"
|
|
28989
29673
|
},
|
|
28990
29674
|
"recordingExport.createExport": {
|
|
28991
|
-
capName: "
|
|
29675
|
+
capName: "recording-export",
|
|
28992
29676
|
capScope: "system",
|
|
28993
29677
|
addonId: null,
|
|
28994
29678
|
access: "create"
|
|
28995
29679
|
},
|
|
28996
29680
|
"recordingExport.deleteExport": {
|
|
28997
|
-
capName: "
|
|
29681
|
+
capName: "recording-export",
|
|
28998
29682
|
capScope: "system",
|
|
28999
29683
|
addonId: null,
|
|
29000
29684
|
access: "delete"
|
|
29001
29685
|
},
|
|
29002
29686
|
"recordingExport.getDownloadUrl": {
|
|
29003
|
-
capName: "
|
|
29687
|
+
capName: "recording-export",
|
|
29004
29688
|
capScope: "system",
|
|
29005
29689
|
addonId: null,
|
|
29006
29690
|
access: "view"
|
|
29007
29691
|
},
|
|
29008
29692
|
"recordingExport.getExport": {
|
|
29009
|
-
capName: "
|
|
29693
|
+
capName: "recording-export",
|
|
29010
29694
|
capScope: "system",
|
|
29011
29695
|
addonId: null,
|
|
29012
29696
|
access: "view"
|
|
29013
29697
|
},
|
|
29014
29698
|
"recordingExport.listExports": {
|
|
29015
|
-
capName: "
|
|
29699
|
+
capName: "recording-export",
|
|
29700
|
+
capScope: "system",
|
|
29701
|
+
addonId: null,
|
|
29702
|
+
access: "view"
|
|
29703
|
+
},
|
|
29704
|
+
"recordingExport.readExportBytes": {
|
|
29705
|
+
capName: "recording-export",
|
|
29016
29706
|
capScope: "system",
|
|
29017
29707
|
addonId: null,
|
|
29018
29708
|
access: "view"
|
|
@@ -29371,6 +30061,30 @@ Object.freeze({
|
|
|
29371
30061
|
addonId: null,
|
|
29372
30062
|
access: "view"
|
|
29373
30063
|
},
|
|
30064
|
+
"storageMigration.cancel": {
|
|
30065
|
+
capName: "storage-migration",
|
|
30066
|
+
capScope: "system",
|
|
30067
|
+
addonId: null,
|
|
30068
|
+
access: "create"
|
|
30069
|
+
},
|
|
30070
|
+
"storageMigration.plan": {
|
|
30071
|
+
capName: "storage-migration",
|
|
30072
|
+
capScope: "system",
|
|
30073
|
+
addonId: null,
|
|
30074
|
+
access: "view"
|
|
30075
|
+
},
|
|
30076
|
+
"storageMigration.start": {
|
|
30077
|
+
capName: "storage-migration",
|
|
30078
|
+
capScope: "system",
|
|
30079
|
+
addonId: null,
|
|
30080
|
+
access: "create"
|
|
30081
|
+
},
|
|
30082
|
+
"storageMigration.status": {
|
|
30083
|
+
capName: "storage-migration",
|
|
30084
|
+
capScope: "system",
|
|
30085
|
+
addonId: null,
|
|
30086
|
+
access: "view"
|
|
30087
|
+
},
|
|
29374
30088
|
"storageProvider.abortUpload": {
|
|
29375
30089
|
capName: "storage-provider",
|
|
29376
30090
|
capScope: "system",
|
|
@@ -29749,12 +30463,42 @@ Object.freeze({
|
|
|
29749
30463
|
addonId: null,
|
|
29750
30464
|
access: "create"
|
|
29751
30465
|
},
|
|
30466
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
30467
|
+
capName: "terminal-session",
|
|
30468
|
+
capScope: "system",
|
|
30469
|
+
addonId: null,
|
|
30470
|
+
access: "create"
|
|
30471
|
+
},
|
|
29752
30472
|
"terminalSession.close": {
|
|
29753
30473
|
capName: "terminal-session",
|
|
29754
30474
|
capScope: "system",
|
|
29755
30475
|
addonId: null,
|
|
29756
30476
|
access: "create"
|
|
29757
30477
|
},
|
|
30478
|
+
"terminalSession.createInstance": {
|
|
30479
|
+
capName: "terminal-session",
|
|
30480
|
+
capScope: "system",
|
|
30481
|
+
addonId: null,
|
|
30482
|
+
access: "create"
|
|
30483
|
+
},
|
|
30484
|
+
"terminalSession.deleteInstance": {
|
|
30485
|
+
capName: "terminal-session",
|
|
30486
|
+
capScope: "system",
|
|
30487
|
+
addonId: null,
|
|
30488
|
+
access: "delete"
|
|
30489
|
+
},
|
|
30490
|
+
"terminalSession.listInstances": {
|
|
30491
|
+
capName: "terminal-session",
|
|
30492
|
+
capScope: "system",
|
|
30493
|
+
addonId: null,
|
|
30494
|
+
access: "view"
|
|
30495
|
+
},
|
|
30496
|
+
"terminalSession.listLegacyCameras": {
|
|
30497
|
+
capName: "terminal-session",
|
|
30498
|
+
capScope: "system",
|
|
30499
|
+
addonId: null,
|
|
30500
|
+
access: "view"
|
|
30501
|
+
},
|
|
29758
30502
|
"terminalSession.listProfiles": {
|
|
29759
30503
|
capName: "terminal-session",
|
|
29760
30504
|
capScope: "system",
|
|
@@ -29785,6 +30529,12 @@ Object.freeze({
|
|
|
29785
30529
|
addonId: null,
|
|
29786
30530
|
access: "create"
|
|
29787
30531
|
},
|
|
30532
|
+
"terminalSession.setInstanceEnabled": {
|
|
30533
|
+
capName: "terminal-session",
|
|
30534
|
+
capScope: "system",
|
|
30535
|
+
addonId: null,
|
|
30536
|
+
access: "create"
|
|
30537
|
+
},
|
|
29788
30538
|
"terminalSession.writeInput": {
|
|
29789
30539
|
capName: "terminal-session",
|
|
29790
30540
|
capScope: "system",
|
|
@@ -30329,6 +31079,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
30329
31079
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
30330
31080
|
var PriorityField = number().int().min(1).max(5);
|
|
30331
31081
|
/**
|
|
31082
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
31083
|
+
*
|
|
31084
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
31085
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
31086
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
31087
|
+
*
|
|
31088
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
31089
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
31090
|
+
*
|
|
31091
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
31092
|
+
*
|
|
31093
|
+
* 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.
|
|
31094
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
31095
|
+
* and therefore the length of a quiet night, does not move.
|
|
31096
|
+
*
|
|
31097
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
31098
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
31099
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
31100
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
31101
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
31102
|
+
*/
|
|
31103
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
31104
|
+
/**
|
|
31105
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
31106
|
+
*
|
|
31107
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
31108
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
31109
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
31110
|
+
* that range every ~583 ms.
|
|
31111
|
+
*
|
|
31112
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
31113
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
31114
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
31115
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
31116
|
+
* schema change and are the tracked follow-up.
|
|
31117
|
+
*
|
|
31118
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
31119
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
31120
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
31121
|
+
* happened.
|
|
31122
|
+
*/
|
|
31123
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
31124
|
+
/**
|
|
31125
|
+
* Caption burned into the notification's preview frame.
|
|
31126
|
+
*
|
|
31127
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
31128
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
31129
|
+
* templating dialect for one field would be a second thing to explain.
|
|
31130
|
+
*
|
|
31131
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
31132
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
31133
|
+
* the reason this is not `.min(1)`.
|
|
31134
|
+
*/
|
|
31135
|
+
var PreviewTextField = string().max(200);
|
|
31136
|
+
/**
|
|
31137
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
31138
|
+
*
|
|
31139
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
31140
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
31141
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
31142
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
31143
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
31144
|
+
* them.
|
|
31145
|
+
*
|
|
31146
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
31147
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
31148
|
+
* paying that on the deploy that shipped it.
|
|
31149
|
+
*
|
|
31150
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
31151
|
+
*/
|
|
31152
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
31153
|
+
/**
|
|
31154
|
+
* Which detection classes the notification reports counts for.
|
|
31155
|
+
*
|
|
31156
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
31157
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
31158
|
+
* class the window actually contained", which is what an operator who never
|
|
31159
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
31160
|
+
* counts cars all night).
|
|
31161
|
+
*
|
|
31162
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
31163
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
31164
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
31165
|
+
* not emit.
|
|
31166
|
+
*
|
|
31167
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
31168
|
+
* - `{{detections}}` — total over the reported classes
|
|
31169
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
31170
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
31171
|
+
* one per class, `count_` + the class name
|
|
31172
|
+
*
|
|
31173
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
31174
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
31175
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
31176
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
31177
|
+
*/
|
|
31178
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
31179
|
+
/**
|
|
30332
31180
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
30333
31181
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
30334
31182
|
* here (see the ownership note above).
|
|
@@ -30348,9 +31196,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
30348
31196
|
cadenceSec: CadenceSecField.default(15),
|
|
30349
31197
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
30350
31198
|
framerate: FramerateField.default(10),
|
|
31199
|
+
/**
|
|
31200
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
31201
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
31202
|
+
* field gets.
|
|
31203
|
+
*/
|
|
31204
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
31205
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
31206
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30351
31207
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
30352
31208
|
targets: TargetsField,
|
|
30353
31209
|
template: TimelapseTemplateSchema.optional(),
|
|
31210
|
+
/**
|
|
31211
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
31212
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
31213
|
+
*
|
|
31214
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
31215
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
31216
|
+
* silently clear the caption too.
|
|
31217
|
+
*/
|
|
31218
|
+
previewText: PreviewTextField.optional(),
|
|
31219
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
31220
|
+
previewMode: PreviewModeField.default("image"),
|
|
31221
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
31222
|
+
reportClasses: ReportClassesField.optional(),
|
|
30354
31223
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
30355
31224
|
priority: PriorityField.default(3)
|
|
30356
31225
|
});
|
|
@@ -30361,8 +31230,13 @@ object({
|
|
|
30361
31230
|
schedule: NcScheduleSchema.optional(),
|
|
30362
31231
|
cadenceSec: CadenceSecField.optional(),
|
|
30363
31232
|
framerate: FramerateField.optional(),
|
|
31233
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
31234
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30364
31235
|
targets: TargetsField.optional(),
|
|
30365
31236
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
31237
|
+
previewText: PreviewTextField.optional(),
|
|
31238
|
+
previewMode: PreviewModeField.optional(),
|
|
31239
|
+
reportClasses: ReportClassesField.optional(),
|
|
30366
31240
|
priority: PriorityField.optional()
|
|
30367
31241
|
});
|
|
30368
31242
|
TimelapseRuleInputSchema.extend({
|
|
@@ -30374,10 +31248,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
30374
31248
|
*/
|
|
30375
31249
|
ownerUserId: string().optional(),
|
|
30376
31250
|
/**
|
|
30377
|
-
* Epoch-ms of the
|
|
30378
|
-
*
|
|
31251
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
31252
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
31253
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
30379
31254
|
*/
|
|
30380
31255
|
lastGeneratedAt: number().optional(),
|
|
31256
|
+
/**
|
|
31257
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
31258
|
+
* re-generation guard's real durable state.
|
|
31259
|
+
*
|
|
31260
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
31261
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
31262
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
31263
|
+
* already done — and B's night is gone for good, because the window will not
|
|
31264
|
+
* come back.
|
|
31265
|
+
*
|
|
31266
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
31267
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
31268
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
31269
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
31270
|
+
* once, on the deploy that shipped the map.
|
|
31271
|
+
*/
|
|
31272
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
30381
31273
|
/** userId of the caller who created the rule (server-stamped). */
|
|
30382
31274
|
createdBy: string(),
|
|
30383
31275
|
createdAt: number(),
|