@camstack/addon-provider-rtsp 1.2.12 → 1.2.14
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
|
@@ -7219,8 +7219,31 @@ var AdoptionJobSchema = object({
|
|
|
7219
7219
|
error: string().nullable()
|
|
7220
7220
|
});
|
|
7221
7221
|
/**
|
|
7222
|
-
* Per-camera FUNCTION SWITCHES
|
|
7223
|
-
*
|
|
7222
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7223
|
+
*
|
|
7224
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7225
|
+
*
|
|
7226
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7227
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7228
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7229
|
+
* every function already had a settings page of its own, and a second place to
|
|
7230
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7231
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7232
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7233
|
+
* (which was always first-class; the switch was a veneer over
|
|
7234
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7235
|
+
* per-device setting, the two camera planes to their own components.
|
|
7236
|
+
*
|
|
7237
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7238
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7239
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7240
|
+
* never about a control panel.
|
|
7241
|
+
*
|
|
7242
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7243
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7244
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7245
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7246
|
+
* stop; nothing new may be built on it.
|
|
7224
7247
|
*
|
|
7225
7248
|
* ## This file adds no state
|
|
7226
7249
|
*
|
|
@@ -7597,14 +7620,21 @@ var RecordingConfigSchema = object({
|
|
|
7597
7620
|
/**
|
|
7598
7621
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7599
7622
|
*
|
|
7600
|
-
* One shape shared by the recorder
|
|
7601
|
-
*
|
|
7602
|
-
*
|
|
7603
|
-
*
|
|
7604
|
-
*
|
|
7605
|
-
|
|
7623
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7624
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7625
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7626
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7627
|
+
* addon surface.
|
|
7628
|
+
*/
|
|
7629
|
+
/**
|
|
7630
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7631
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7632
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7633
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7634
|
+
* runs at all.
|
|
7606
7635
|
*/
|
|
7607
7636
|
var RelocateJobStateSchema = _enum([
|
|
7637
|
+
"queued",
|
|
7608
7638
|
"running",
|
|
7609
7639
|
"done",
|
|
7610
7640
|
"failed",
|
|
@@ -7629,19 +7659,109 @@ var RelocateJobSchema = object({
|
|
|
7629
7659
|
finishedAt: number().nullable(),
|
|
7630
7660
|
error: string().nullable()
|
|
7631
7661
|
});
|
|
7662
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7663
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7664
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7632
7665
|
var RelocateFootageInputSchema = object({
|
|
7633
|
-
deviceId: number().optional(),
|
|
7634
7666
|
fromLocationId: string(),
|
|
7635
7667
|
toLocationId: string(),
|
|
7636
7668
|
entities: array(_enum(["segments"])).optional(),
|
|
7669
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7670
|
+
* pre-orchestration compatibility path. */
|
|
7671
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7672
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7673
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7674
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7675
|
+
deviceId: number().int().optional(),
|
|
7676
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7677
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7678
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7679
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7680
|
+
profiles: array(string()).optional(),
|
|
7637
7681
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7638
7682
|
* never allowed to starve live writers. */
|
|
7639
7683
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7640
7684
|
});
|
|
7641
|
-
|
|
7642
|
-
|
|
7685
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7686
|
+
* from persistent recording settings: a migration never changes
|
|
7687
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7688
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7689
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7690
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7643
7691
|
toLocationId: string(),
|
|
7644
7692
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7693
|
+
}).extend({ leaseId: string().min(1) });
|
|
7694
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7695
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7696
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7697
|
+
var StorageMigrationClassSchema = _enum([
|
|
7698
|
+
"recordings",
|
|
7699
|
+
"recordingsLow",
|
|
7700
|
+
"eventMedia"
|
|
7701
|
+
]);
|
|
7702
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7703
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7704
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7705
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7706
|
+
recordings: string().min(1).optional(),
|
|
7707
|
+
recordingsLow: string().min(1).optional(),
|
|
7708
|
+
eventMedia: string().min(1).optional()
|
|
7709
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7710
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7711
|
+
var StorageMigrationInputSchema = object({
|
|
7712
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7713
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7714
|
+
});
|
|
7715
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7716
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7717
|
+
* verified. */
|
|
7718
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7719
|
+
"planning",
|
|
7720
|
+
"pausing",
|
|
7721
|
+
"moving",
|
|
7722
|
+
"verifying",
|
|
7723
|
+
"repointing",
|
|
7724
|
+
"refreshing",
|
|
7725
|
+
"resuming",
|
|
7726
|
+
"done",
|
|
7727
|
+
"failed",
|
|
7728
|
+
"cancelled"
|
|
7729
|
+
]);
|
|
7730
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7731
|
+
"pipeline",
|
|
7732
|
+
"recorder",
|
|
7733
|
+
"analytics"
|
|
7734
|
+
]);
|
|
7735
|
+
var StorageMigrationMoveSchema = object({
|
|
7736
|
+
storageClass: StorageMigrationClassSchema,
|
|
7737
|
+
fromLocationId: string(),
|
|
7738
|
+
toLocationId: string(),
|
|
7739
|
+
moverJobId: string().nullable(),
|
|
7740
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7741
|
+
error: string().nullable()
|
|
7742
|
+
});
|
|
7743
|
+
var StorageMigrationJobSchema = object({
|
|
7744
|
+
jobId: string(),
|
|
7745
|
+
phase: StorageMigrationPhaseSchema,
|
|
7746
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7747
|
+
throttleMbps: number(),
|
|
7748
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7749
|
+
pauseLeaseId: string().nullable(),
|
|
7750
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7751
|
+
repointed: boolean(),
|
|
7752
|
+
cancelRequested: boolean(),
|
|
7753
|
+
startedAt: number(),
|
|
7754
|
+
updatedAt: number(),
|
|
7755
|
+
finishedAt: number().nullable(),
|
|
7756
|
+
error: string().nullable()
|
|
7757
|
+
});
|
|
7758
|
+
var StorageMigrationPlanSchema = object({
|
|
7759
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7760
|
+
moves: array(object({
|
|
7761
|
+
storageClass: StorageMigrationClassSchema,
|
|
7762
|
+
fromLocationId: string(),
|
|
7763
|
+
toLocationId: string()
|
|
7764
|
+
}))
|
|
7645
7765
|
});
|
|
7646
7766
|
/**
|
|
7647
7767
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7693,6 +7813,21 @@ var StorageLocationSchema = object({
|
|
|
7693
7813
|
nodeId: string().optional(),
|
|
7694
7814
|
isDefault: boolean().default(false),
|
|
7695
7815
|
isSystem: boolean().default(false),
|
|
7816
|
+
/**
|
|
7817
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7818
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7819
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7820
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7821
|
+
* extended to add the next consumer.
|
|
7822
|
+
*
|
|
7823
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7824
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7825
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7826
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7827
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7828
|
+
* always stamped `true`.
|
|
7829
|
+
*/
|
|
7830
|
+
enabled: boolean().optional(),
|
|
7696
7831
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7697
7832
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7698
7833
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12245,7 +12380,8 @@ method(object({
|
|
|
12245
12380
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12246
12381
|
/**
|
|
12247
12382
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12248
|
-
* filesystem
|
|
12383
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12384
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12249
12385
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12250
12386
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12251
12387
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14086,6 +14222,13 @@ var MaskGridDimsSchema = object({
|
|
|
14086
14222
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14087
14223
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14088
14224
|
* one trigger.
|
|
14225
|
+
*
|
|
14226
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14227
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14228
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14229
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14230
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14231
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14089
14232
|
*/
|
|
14090
14233
|
var NcDeliverySchema = _enum([
|
|
14091
14234
|
"immediate",
|
|
@@ -14100,15 +14243,32 @@ var NcDeliverySchema = _enum([
|
|
|
14100
14243
|
* depend on a provider's raw event name or payload shape.
|
|
14101
14244
|
*/
|
|
14102
14245
|
var NcSystemEventKindSchema = _enum([
|
|
14103
|
-
"
|
|
14104
|
-
"
|
|
14246
|
+
"device-online",
|
|
14247
|
+
"device-offline",
|
|
14248
|
+
"device-disabled",
|
|
14249
|
+
"device-enabled",
|
|
14105
14250
|
"stream-online",
|
|
14106
14251
|
"stream-offline",
|
|
14107
14252
|
"node-online",
|
|
14108
14253
|
"node-offline",
|
|
14109
14254
|
"addon-update-available",
|
|
14110
|
-
"server-update-available"
|
|
14255
|
+
"server-update-available",
|
|
14256
|
+
"alarm-triggered",
|
|
14257
|
+
"alarm-armed",
|
|
14258
|
+
"alarm-disarmed",
|
|
14259
|
+
"camera-online",
|
|
14260
|
+
"camera-offline",
|
|
14261
|
+
"camera-disabled",
|
|
14262
|
+
"camera-enabled"
|
|
14263
|
+
]);
|
|
14264
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14265
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14266
|
+
"camera-online",
|
|
14267
|
+
"camera-offline",
|
|
14268
|
+
"camera-disabled",
|
|
14269
|
+
"camera-enabled"
|
|
14111
14270
|
]);
|
|
14271
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14112
14272
|
/**
|
|
14113
14273
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14114
14274
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14117,6 +14277,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14117
14277
|
var NcSystemEventConditionSchema = object({
|
|
14118
14278
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14119
14279
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14280
|
+
/**
|
|
14281
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14282
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14283
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14284
|
+
*
|
|
14285
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14286
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14287
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14288
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14289
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14290
|
+
*/
|
|
14291
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14120
14292
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14121
14293
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14122
14294
|
});
|
|
@@ -14167,6 +14339,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14167
14339
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14168
14340
|
});
|
|
14169
14341
|
/**
|
|
14342
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14343
|
+
*
|
|
14344
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14345
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14346
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14347
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14348
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14349
|
+
*
|
|
14350
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14351
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14352
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14353
|
+
*
|
|
14354
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14355
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14356
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14357
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14358
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14359
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14360
|
+
* ZodEffects the cap path would have to special-case).
|
|
14361
|
+
*
|
|
14362
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14363
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14364
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14365
|
+
* `samplingSeconds` decorative.
|
|
14366
|
+
*
|
|
14367
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14368
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14369
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14370
|
+
* an operator who typed `dog` mean the same thing.
|
|
14371
|
+
*/
|
|
14372
|
+
var NcAudioConditionSchema = object({
|
|
14373
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14374
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14375
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14376
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14377
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14378
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14379
|
+
/** Length of the sampling window in seconds. */
|
|
14380
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14381
|
+
});
|
|
14382
|
+
/**
|
|
14170
14383
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14171
14384
|
*
|
|
14172
14385
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14439,7 +14652,33 @@ var NcConditionsSchema = object({
|
|
|
14439
14652
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14440
14653
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14441
14654
|
*/
|
|
14442
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14655
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14656
|
+
/**
|
|
14657
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14658
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14659
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14660
|
+
* a window that is not full yet, neither filter given). See
|
|
14661
|
+
* {@link NcAudioCondition}.
|
|
14662
|
+
*
|
|
14663
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14664
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14665
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14666
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14667
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14668
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14669
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14670
|
+
*
|
|
14671
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14672
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14673
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14674
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14675
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14676
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14677
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14678
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14679
|
+
* does an audio rule become authorable.
|
|
14680
|
+
*/
|
|
14681
|
+
audio: NcAudioConditionSchema.optional()
|
|
14443
14682
|
});
|
|
14444
14683
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14445
14684
|
var NcRuleTargetSchema = object({
|
|
@@ -14553,6 +14792,73 @@ var NcThrottleSchema = object({
|
|
|
14553
14792
|
*/
|
|
14554
14793
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14555
14794
|
});
|
|
14795
|
+
/**
|
|
14796
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14797
|
+
* it judges may be.
|
|
14798
|
+
*
|
|
14799
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14800
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14801
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14802
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14803
|
+
* tokens for pixels the model pools away.
|
|
14804
|
+
*/
|
|
14805
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14806
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14807
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14808
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14809
|
+
var NcConfirmExpectSchema = object({
|
|
14810
|
+
op: _enum([
|
|
14811
|
+
">=",
|
|
14812
|
+
">",
|
|
14813
|
+
"<=",
|
|
14814
|
+
"<",
|
|
14815
|
+
"=="
|
|
14816
|
+
]),
|
|
14817
|
+
count: number().int().min(0).max(1e3)
|
|
14818
|
+
});
|
|
14819
|
+
/**
|
|
14820
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14821
|
+
* to ship and says whether it agrees with the rule.
|
|
14822
|
+
*
|
|
14823
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14824
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14825
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14826
|
+
*
|
|
14827
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14828
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14829
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14830
|
+
* open looks in the log exactly like a gate that works.
|
|
14831
|
+
*
|
|
14832
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14833
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14834
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14835
|
+
* above rather than trusting a parse it may never have seen.
|
|
14836
|
+
*/
|
|
14837
|
+
var NcConfirmSchema = object({
|
|
14838
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14839
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14840
|
+
enabled: boolean().default(false),
|
|
14841
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14842
|
+
profileId: string().optional(),
|
|
14843
|
+
/**
|
|
14844
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14845
|
+
* from the rule (its class and its expectation).
|
|
14846
|
+
*
|
|
14847
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14848
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14849
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14850
|
+
* turn and only rule-authored words land here.
|
|
14851
|
+
*/
|
|
14852
|
+
prompt: string().max(1e3).optional(),
|
|
14853
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14854
|
+
* own boolean verdict decides. */
|
|
14855
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14856
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14857
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14858
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14859
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14860
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14861
|
+
});
|
|
14556
14862
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14557
14863
|
var NcRuleInputSchema = object({
|
|
14558
14864
|
name: string().min(1).max(200),
|
|
@@ -14613,7 +14919,13 @@ var NcRuleInputSchema = object({
|
|
|
14613
14919
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14614
14920
|
* shape as every other actuation.
|
|
14615
14921
|
*/
|
|
14616
|
-
actions: NcRuleActionsSchema.optional()
|
|
14922
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14923
|
+
/**
|
|
14924
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14925
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14926
|
+
* did, and absent is the only way to say that without a migration.
|
|
14927
|
+
*/
|
|
14928
|
+
confirm: NcConfirmSchema.optional()
|
|
14617
14929
|
});
|
|
14618
14930
|
/**
|
|
14619
14931
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14624,7 +14936,37 @@ var NcRuleInputSchema = object({
|
|
|
14624
14936
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14625
14937
|
* `updateRule` patch.
|
|
14626
14938
|
*/
|
|
14627
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14939
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14940
|
+
disabledTargetIds: array(string()).optional(),
|
|
14941
|
+
/**
|
|
14942
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14943
|
+
*
|
|
14944
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14945
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14946
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14947
|
+
* one — which made every partial edit destructive:
|
|
14948
|
+
*
|
|
14949
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14950
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14951
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14952
|
+
*
|
|
14953
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14954
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14955
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14956
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14957
|
+
* within a minute of a two-field patch.
|
|
14958
|
+
*
|
|
14959
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14960
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14961
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14962
|
+
* absent key is now genuinely absent.
|
|
14963
|
+
*/
|
|
14964
|
+
enabled: boolean().optional(),
|
|
14965
|
+
conditions: NcConditionsSchema.optional(),
|
|
14966
|
+
media: NcMediaPolicySchema.optional(),
|
|
14967
|
+
throttle: NcThrottleSchema.optional(),
|
|
14968
|
+
priority: number().int().min(1).max(5).optional()
|
|
14969
|
+
});
|
|
14628
14970
|
/** A persisted rule. */
|
|
14629
14971
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14630
14972
|
id: string(),
|
|
@@ -14925,6 +15267,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14925
15267
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14926
15268
|
* copy would lie the first time a rule is disabled.
|
|
14927
15269
|
*/
|
|
15270
|
+
/**
|
|
15271
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15272
|
+
*
|
|
15273
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15274
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15275
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15276
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15277
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15278
|
+
* with the switches the operator actually used.
|
|
15279
|
+
*/
|
|
15280
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15281
|
+
"muted",
|
|
15282
|
+
"detection-off",
|
|
15283
|
+
"offline"
|
|
15284
|
+
]);
|
|
15285
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15286
|
+
deviceId: number().int(),
|
|
15287
|
+
reason: NcAlarmSkipReasonSchema
|
|
15288
|
+
});
|
|
14928
15289
|
var NcAlarmModeCoverageSchema = object({
|
|
14929
15290
|
mode: AlarmArmModeSchema,
|
|
14930
15291
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14932,7 +15293,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14932
15293
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14933
15294
|
allDevices: boolean(),
|
|
14934
15295
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14935
|
-
deviceIds: array(number().int())
|
|
15296
|
+
deviceIds: array(number().int()),
|
|
15297
|
+
/**
|
|
15298
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15299
|
+
* excludes it.
|
|
15300
|
+
*
|
|
15301
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15302
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15303
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15304
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15305
|
+
* alarm tab.
|
|
15306
|
+
*/
|
|
15307
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14936
15308
|
});
|
|
14937
15309
|
var NcAlarmConfigSchema = object({
|
|
14938
15310
|
/**
|
|
@@ -16295,13 +16667,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16295
16667
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16296
16668
|
kind: "mutation",
|
|
16297
16669
|
auth: "admin"
|
|
16298
|
-
}), method(
|
|
16670
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16299
16671
|
kind: "mutation",
|
|
16300
16672
|
auth: "admin"
|
|
16301
|
-
}), method(object({
|
|
16302
|
-
kind: "
|
|
16673
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16674
|
+
kind: "mutation",
|
|
16303
16675
|
auth: "admin"
|
|
16304
|
-
}), method(
|
|
16676
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16677
|
+
kind: "mutation",
|
|
16678
|
+
auth: "admin"
|
|
16679
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16680
|
+
kind: "mutation",
|
|
16681
|
+
auth: "admin"
|
|
16682
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16305
16683
|
kind: "mutation",
|
|
16306
16684
|
auth: "admin"
|
|
16307
16685
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17758,9 +18136,16 @@ var CameraStatusSchema = object({
|
|
|
17758
18136
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17759
18137
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17760
18138
|
/**
|
|
17761
|
-
* Per-camera
|
|
18139
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17762
18140
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17763
18141
|
*
|
|
18142
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18143
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18144
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18145
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18146
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18147
|
+
* the difference between a camera being off and a camera being dead.
|
|
18148
|
+
*
|
|
17764
18149
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17765
18150
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17766
18151
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17831,7 +18216,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17831
18216
|
reachable: boolean(),
|
|
17832
18217
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17833
18218
|
});
|
|
17834
|
-
method(object({
|
|
18219
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18220
|
+
kind: "mutation",
|
|
18221
|
+
auth: "admin"
|
|
18222
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18223
|
+
kind: "mutation",
|
|
18224
|
+
auth: "admin"
|
|
18225
|
+
}), method(object({
|
|
17835
18226
|
deviceId: number(),
|
|
17836
18227
|
agentNodeId: string()
|
|
17837
18228
|
}), object({ success: literal(true) }), {
|
|
@@ -18361,24 +18752,28 @@ var snapshotCapability = {
|
|
|
18361
18752
|
*
|
|
18362
18753
|
* `getSnapshotOverview` is cache-only by contract: it answers from whatever
|
|
18363
18754
|
* the wrapper happens to hold and never captures. Under D93 the client
|
|
18364
|
-
* versions its image URL on that answer, and an image REQUEST
|
|
18365
|
-
*
|
|
18366
|
-
*
|
|
18367
|
-
*
|
|
18368
|
-
*
|
|
18369
|
-
*
|
|
18370
|
-
*
|
|
18371
|
-
*
|
|
18755
|
+
* versions its image URL on that answer, and an image REQUEST was the only
|
|
18756
|
+
* demand signal. Both of those are satisfiable by the client's own image
|
|
18757
|
+
* cache — `expo-image` is URL-keyed and never revalidates — so a URL painted
|
|
18758
|
+
* in a previous session comes off disk with no network, no demand, and no
|
|
18759
|
+
* capture. Measured on the live hub: reopening after two minutes idle
|
|
18760
|
+
* painted 15 of 16 tiles at **168 s old** with zero HTTP requests, and the
|
|
18761
|
+
* fleet only recovered because a later poll happened to observe a different
|
|
18762
|
+
* identity.
|
|
18372
18763
|
*
|
|
18373
18764
|
* ## The two properties that fix it
|
|
18374
18765
|
*
|
|
18375
18766
|
* **It is an RPC, so no client cache can answer it.** The demand signal
|
|
18376
|
-
* always reaches the wrapper. This method therefore
|
|
18377
|
-
*
|
|
18378
|
-
*
|
|
18379
|
-
*
|
|
18380
|
-
*
|
|
18381
|
-
*
|
|
18767
|
+
* always reaches the wrapper. This method therefore CAPTURES, where
|
|
18768
|
+
* `getSnapshotOverview` must never (D93) — the distinction is not "one is
|
|
18769
|
+
* newer" but that the overview poll is app-wide (a capturing overview would
|
|
18770
|
+
* dial every camera on the install) while this is called by a rendered
|
|
18771
|
+
* surface naming the tiles it is actually painting, at the width it is
|
|
18772
|
+
* painting them.
|
|
18773
|
+
*
|
|
18774
|
+
* Since 2026-08-11 this is the ONLY thing that refreshes a snapshot: the
|
|
18775
|
+
* server-side keep-warm loop was removed (operator directive — on-demand,
|
|
18776
|
+
* always), so a camera nobody is looking at costs nothing at all.
|
|
18382
18777
|
*
|
|
18383
18778
|
* **It waits, briefly and boundedly, for the capture it triggered.** The
|
|
18384
18779
|
* returned `capturedAt` is the frame the link will serve, not the frame the
|
|
@@ -18596,6 +18991,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18596
18991
|
locationId: string(),
|
|
18597
18992
|
targetBytes: number().int().positive()
|
|
18598
18993
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18994
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18995
|
+
kind: "mutation",
|
|
18996
|
+
auth: "admin"
|
|
18997
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18998
|
+
kind: "mutation",
|
|
18999
|
+
auth: "admin"
|
|
19000
|
+
});
|
|
18599
19001
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18600
19002
|
providerId: string().min(1),
|
|
18601
19003
|
displayName: string().min(1),
|
|
@@ -18699,6 +19101,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18699
19101
|
label: string(),
|
|
18700
19102
|
description: string().optional()
|
|
18701
19103
|
});
|
|
19104
|
+
/**
|
|
19105
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19106
|
+
* an instance declares a camera.
|
|
19107
|
+
*/
|
|
19108
|
+
var TerminalInstanceInfoSchema = object({
|
|
19109
|
+
instanceId: string(),
|
|
19110
|
+
cameraStableId: string(),
|
|
19111
|
+
nodeId: string(),
|
|
19112
|
+
profileId: string(),
|
|
19113
|
+
profileLabel: string(),
|
|
19114
|
+
name: string(),
|
|
19115
|
+
enabled: boolean()
|
|
19116
|
+
});
|
|
19117
|
+
var TerminalLegacyCameraSchema = object({
|
|
19118
|
+
stableId: string(),
|
|
19119
|
+
nodeId: string(),
|
|
19120
|
+
profileId: string(),
|
|
19121
|
+
profileLabel: string(),
|
|
19122
|
+
name: string(),
|
|
19123
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19124
|
+
adoptable: boolean()
|
|
19125
|
+
});
|
|
18702
19126
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18703
19127
|
seq: number().int().positive(),
|
|
18704
19128
|
kind: literal("data"),
|
|
@@ -18715,7 +19139,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18715
19139
|
snapshot: string().optional(),
|
|
18716
19140
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18717
19141
|
});
|
|
18718
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19142
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19143
|
+
targetNodeId: string().min(1),
|
|
19144
|
+
profileId: string().min(1),
|
|
19145
|
+
name: string().trim().min(1).max(160).optional()
|
|
19146
|
+
}), TerminalInstanceInfoSchema, {
|
|
19147
|
+
kind: "mutation",
|
|
19148
|
+
auth: "admin"
|
|
19149
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19150
|
+
kind: "mutation",
|
|
19151
|
+
auth: "admin"
|
|
19152
|
+
}), method(object({
|
|
19153
|
+
instanceId: string().min(1),
|
|
19154
|
+
enabled: boolean()
|
|
19155
|
+
}), TerminalInstanceInfoSchema, {
|
|
19156
|
+
kind: "mutation",
|
|
19157
|
+
auth: "admin"
|
|
19158
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19159
|
+
stableId: string().min(1),
|
|
19160
|
+
name: string().trim().min(1).max(160).optional()
|
|
19161
|
+
}), TerminalInstanceInfoSchema, {
|
|
19162
|
+
kind: "mutation",
|
|
19163
|
+
auth: "admin"
|
|
19164
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18719
19165
|
profileId: string(),
|
|
18720
19166
|
cols: number().int().positive(),
|
|
18721
19167
|
rows: number().int().positive()
|
|
@@ -18732,7 +19178,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18732
19178
|
}), method(object({
|
|
18733
19179
|
sessionId: string(),
|
|
18734
19180
|
afterSeq: number().int().nonnegative(),
|
|
18735
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19181
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19182
|
+
/**
|
|
19183
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19184
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19185
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19186
|
+
*/
|
|
19187
|
+
waitForOutput: boolean().optional()
|
|
18736
19188
|
}), TerminalOutputBatchSchema, {
|
|
18737
19189
|
kind: "mutation",
|
|
18738
19190
|
auth: "admin",
|
|
@@ -21238,6 +21690,7 @@ var FaceInfoSchema = object({
|
|
|
21238
21690
|
var FaceFilterEnum = _enum([
|
|
21239
21691
|
"unassigned",
|
|
21240
21692
|
"recognized",
|
|
21693
|
+
"identified",
|
|
21241
21694
|
"all"
|
|
21242
21695
|
]);
|
|
21243
21696
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21266,6 +21719,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21266
21719
|
kind: "mutation",
|
|
21267
21720
|
auth: "admin"
|
|
21268
21721
|
}), method(object({
|
|
21722
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21723
|
+
deviceId: number().int().optional(),
|
|
21269
21724
|
limit: number().int().positive().optional(),
|
|
21270
21725
|
filter: FaceFilterEnum.optional(),
|
|
21271
21726
|
/**
|
|
@@ -23495,6 +23950,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23495
23950
|
capName: string().min(1).max(64),
|
|
23496
23951
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23497
23952
|
valuePath: string().min(1).max(64)
|
|
23953
|
+
}),
|
|
23954
|
+
object({
|
|
23955
|
+
kind: literal("latest-recognition"),
|
|
23956
|
+
recognition: _enum(["person", "plate"])
|
|
23498
23957
|
})
|
|
23499
23958
|
]);
|
|
23500
23959
|
var OsdSlotBindingSchema = object({
|
|
@@ -23600,6 +24059,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23600
24059
|
}), object({ success: literal(true) }), {
|
|
23601
24060
|
kind: "mutation",
|
|
23602
24061
|
auth: "admin"
|
|
24062
|
+
}), method(object({
|
|
24063
|
+
sourceDeviceId: number().int(),
|
|
24064
|
+
targetDeviceId: number().int()
|
|
24065
|
+
}), object({
|
|
24066
|
+
copied: number().int().nonnegative(),
|
|
24067
|
+
skipped: number().int().nonnegative()
|
|
24068
|
+
}), {
|
|
24069
|
+
kind: "mutation",
|
|
24070
|
+
auth: "admin"
|
|
23603
24071
|
}), method(object({
|
|
23604
24072
|
deviceId: number().int(),
|
|
23605
24073
|
slotId: string().min(1),
|
|
@@ -24522,7 +24990,19 @@ var RecordingManifestSchema = object({
|
|
|
24522
24990
|
* profiles/subtrees/locations on this node). */
|
|
24523
24991
|
var RecordingDeviceUsageSchema = object({
|
|
24524
24992
|
deviceId: number(),
|
|
24525
|
-
usedBytes: number()
|
|
24993
|
+
usedBytes: number(),
|
|
24994
|
+
/**
|
|
24995
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
24996
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
24997
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
24998
|
+
*
|
|
24999
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25000
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25001
|
+
* field must keep validating that older provider's payload: the framework
|
|
25002
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25003
|
+
* the later of the two.
|
|
25004
|
+
*/
|
|
25005
|
+
oldestMs: number().nullable().optional()
|
|
24526
25006
|
});
|
|
24527
25007
|
/** Recording storage usage + capacity for one storage location. */
|
|
24528
25008
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24550,6 +25030,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24550
25030
|
locations: array(RecordingLocationUsageSchema)
|
|
24551
25031
|
});
|
|
24552
25032
|
/**
|
|
25033
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25034
|
+
*
|
|
25035
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25036
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25037
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25038
|
+
* location, run FIFO behind the single-flight mover.
|
|
25039
|
+
*
|
|
25040
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25041
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25042
|
+
* (empty on the plan).
|
|
25043
|
+
*/
|
|
25044
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25045
|
+
deviceId: number(),
|
|
25046
|
+
profile: string(),
|
|
25047
|
+
fromLocationId: string(),
|
|
25048
|
+
toLocationId: string(),
|
|
25049
|
+
bytes: number(),
|
|
25050
|
+
files: number().int()
|
|
25051
|
+
});
|
|
25052
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25053
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25054
|
+
* that had nothing to do. */
|
|
25055
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25056
|
+
"unassigned",
|
|
25057
|
+
"target-not-writable",
|
|
25058
|
+
"below-threshold",
|
|
25059
|
+
"no-headroom"
|
|
25060
|
+
]);
|
|
25061
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25062
|
+
deviceId: number(),
|
|
25063
|
+
profile: string(),
|
|
25064
|
+
fromLocationId: string(),
|
|
25065
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25066
|
+
toLocationId: string().nullable(),
|
|
25067
|
+
bytes: number(),
|
|
25068
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25069
|
+
});
|
|
25070
|
+
var RecordingRebalancePlanSchema = object({
|
|
25071
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25072
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25073
|
+
bytesToMove: number(),
|
|
25074
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25075
|
+
jobIds: array(string())
|
|
25076
|
+
});
|
|
25077
|
+
var RecordingRebalanceInputSchema = object({
|
|
25078
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25079
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25080
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25081
|
+
minMoveGb: number().min(0).optional()
|
|
25082
|
+
});
|
|
25083
|
+
/**
|
|
24553
25084
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24554
25085
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24555
25086
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24697,6 +25228,21 @@ method(object({
|
|
|
24697
25228
|
}), {
|
|
24698
25229
|
kind: "mutation",
|
|
24699
25230
|
auth: "admin"
|
|
25231
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25232
|
+
kind: "mutation",
|
|
25233
|
+
auth: "admin"
|
|
25234
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25235
|
+
kind: "mutation",
|
|
25236
|
+
auth: "admin"
|
|
25237
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25238
|
+
kind: "mutation",
|
|
25239
|
+
auth: "admin"
|
|
25240
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25241
|
+
kind: "mutation",
|
|
25242
|
+
auth: "admin"
|
|
25243
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25244
|
+
kind: "mutation",
|
|
25245
|
+
auth: "admin"
|
|
24700
25246
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24701
25247
|
kind: "mutation",
|
|
24702
25248
|
auth: "admin"
|
|
@@ -24706,9 +25252,15 @@ method(object({
|
|
|
24706
25252
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24707
25253
|
kind: "mutation",
|
|
24708
25254
|
auth: "admin"
|
|
25255
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25256
|
+
kind: "query",
|
|
25257
|
+
auth: "admin"
|
|
25258
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25259
|
+
kind: "mutation",
|
|
25260
|
+
auth: "admin"
|
|
24709
25261
|
});
|
|
24710
25262
|
/**
|
|
24711
|
-
* `
|
|
25263
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24712
25264
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24713
25265
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24714
25266
|
* delete-after-download.
|
|
@@ -24723,10 +25275,42 @@ method(object({
|
|
|
24723
25275
|
*/
|
|
24724
25276
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24725
25277
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25278
|
+
/**
|
|
25279
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25280
|
+
*
|
|
25281
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25282
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25283
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25284
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25285
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25286
|
+
*/
|
|
25287
|
+
var ExportDenseRangeSchema = object({
|
|
25288
|
+
fromSec: number().nonnegative(),
|
|
25289
|
+
toSec: number().nonnegative()
|
|
25290
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25291
|
+
/**
|
|
25292
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25293
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25294
|
+
*
|
|
25295
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25296
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25297
|
+
*/
|
|
25298
|
+
var ExportDenseSchema = object({
|
|
25299
|
+
everyMs: number().int().positive(),
|
|
25300
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25301
|
+
});
|
|
24726
25302
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24727
25303
|
var ExportTimelapseSchema = object({
|
|
24728
25304
|
everyMs: number().int().positive(),
|
|
24729
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25305
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25306
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25307
|
+
dense: ExportDenseSchema.optional()
|
|
25308
|
+
}).superRefine((v, ctx) => {
|
|
25309
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25310
|
+
code: ZodIssueCode.custom,
|
|
25311
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25312
|
+
path: ["dense", "everyMs"]
|
|
25313
|
+
});
|
|
24730
25314
|
});
|
|
24731
25315
|
/**
|
|
24732
25316
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24784,6 +25368,19 @@ var ExportDownloadSchema = object({
|
|
|
24784
25368
|
url: string(),
|
|
24785
25369
|
endpoints: array(string())
|
|
24786
25370
|
});
|
|
25371
|
+
/**
|
|
25372
|
+
* A finished export's bytes, inline.
|
|
25373
|
+
*
|
|
25374
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25375
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25376
|
+
*/
|
|
25377
|
+
var ExportBytesSchema = object({
|
|
25378
|
+
base64: string(),
|
|
25379
|
+
contentType: string(),
|
|
25380
|
+
/** Suggested filename, extension included. */
|
|
25381
|
+
name: string(),
|
|
25382
|
+
bytes: number().int().nonnegative()
|
|
25383
|
+
});
|
|
24787
25384
|
method(object({
|
|
24788
25385
|
deviceId: number(),
|
|
24789
25386
|
profile: string(),
|
|
@@ -24808,6 +25405,9 @@ method(object({
|
|
|
24808
25405
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24809
25406
|
kind: "query",
|
|
24810
25407
|
auth: "protected"
|
|
25408
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25409
|
+
kind: "query",
|
|
25410
|
+
auth: "protected"
|
|
24811
25411
|
});
|
|
24812
25412
|
/**
|
|
24813
25413
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30388,6 +30988,12 @@ Object.freeze({
|
|
|
30388
30988
|
addonId: null,
|
|
30389
30989
|
access: "delete"
|
|
30390
30990
|
},
|
|
30991
|
+
"osdManager.copyDeviceConfiguration": {
|
|
30992
|
+
capName: "osd-manager",
|
|
30993
|
+
capScope: "system",
|
|
30994
|
+
addonId: null,
|
|
30995
|
+
access: "create"
|
|
30996
|
+
},
|
|
30391
30997
|
"osdManager.getConditionSupport": {
|
|
30392
30998
|
capName: "osd-manager",
|
|
30393
30999
|
capScope: "system",
|
|
@@ -30484,7 +31090,7 @@ Object.freeze({
|
|
|
30484
31090
|
addonId: null,
|
|
30485
31091
|
access: "create"
|
|
30486
31092
|
},
|
|
30487
|
-
"pipelineAnalytics.
|
|
31093
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30488
31094
|
capName: "pipeline-analytics",
|
|
30489
31095
|
capScope: "device",
|
|
30490
31096
|
addonId: null,
|
|
@@ -30556,12 +31162,6 @@ Object.freeze({
|
|
|
30556
31162
|
addonId: null,
|
|
30557
31163
|
access: "view"
|
|
30558
31164
|
},
|
|
30559
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30560
|
-
capName: "pipeline-analytics",
|
|
30561
|
-
capScope: "device",
|
|
30562
|
-
addonId: null,
|
|
30563
|
-
access: "view"
|
|
30564
|
-
},
|
|
30565
31165
|
"pipelineAnalytics.getMotionEvents": {
|
|
30566
31166
|
capName: "pipeline-analytics",
|
|
30567
31167
|
capScope: "device",
|
|
@@ -30598,6 +31198,12 @@ Object.freeze({
|
|
|
30598
31198
|
addonId: null,
|
|
30599
31199
|
access: "view"
|
|
30600
31200
|
},
|
|
31201
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31202
|
+
capName: "pipeline-analytics",
|
|
31203
|
+
capScope: "device",
|
|
31204
|
+
addonId: null,
|
|
31205
|
+
access: "view"
|
|
31206
|
+
},
|
|
30601
31207
|
"pipelineAnalytics.getTrack": {
|
|
30602
31208
|
capName: "pipeline-analytics",
|
|
30603
31209
|
capScope: "device",
|
|
@@ -30676,6 +31282,12 @@ Object.freeze({
|
|
|
30676
31282
|
addonId: null,
|
|
30677
31283
|
access: "view"
|
|
30678
31284
|
},
|
|
31285
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31286
|
+
capName: "pipeline-analytics",
|
|
31287
|
+
capScope: "device",
|
|
31288
|
+
addonId: null,
|
|
31289
|
+
access: "create"
|
|
31290
|
+
},
|
|
30679
31291
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30680
31292
|
capName: "pipeline-analytics",
|
|
30681
31293
|
capScope: "device",
|
|
@@ -30706,7 +31318,7 @@ Object.freeze({
|
|
|
30706
31318
|
addonId: null,
|
|
30707
31319
|
access: "create"
|
|
30708
31320
|
},
|
|
30709
|
-
"pipelineAnalytics.
|
|
31321
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30710
31322
|
capName: "pipeline-analytics",
|
|
30711
31323
|
capScope: "device",
|
|
30712
31324
|
addonId: null,
|
|
@@ -30718,6 +31330,12 @@ Object.freeze({
|
|
|
30718
31330
|
addonId: null,
|
|
30719
31331
|
access: "create"
|
|
30720
31332
|
},
|
|
31333
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31334
|
+
capName: "pipeline-analytics",
|
|
31335
|
+
capScope: "device",
|
|
31336
|
+
addonId: null,
|
|
31337
|
+
access: "create"
|
|
31338
|
+
},
|
|
30721
31339
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30722
31340
|
capName: "pipeline-analytics",
|
|
30723
31341
|
capScope: "device",
|
|
@@ -30742,6 +31360,12 @@ Object.freeze({
|
|
|
30742
31360
|
addonId: null,
|
|
30743
31361
|
access: "create"
|
|
30744
31362
|
},
|
|
31363
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31364
|
+
capName: "pipeline-analytics",
|
|
31365
|
+
capScope: "device",
|
|
31366
|
+
addonId: null,
|
|
31367
|
+
access: "create"
|
|
31368
|
+
},
|
|
30745
31369
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30746
31370
|
capName: "pipeline-analytics",
|
|
30747
31371
|
capScope: "device",
|
|
@@ -31108,6 +31732,12 @@ Object.freeze({
|
|
|
31108
31732
|
addonId: null,
|
|
31109
31733
|
access: "view"
|
|
31110
31734
|
},
|
|
31735
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31736
|
+
capName: "pipeline-orchestrator",
|
|
31737
|
+
capScope: "system",
|
|
31738
|
+
addonId: null,
|
|
31739
|
+
access: "create"
|
|
31740
|
+
},
|
|
31111
31741
|
"pipelineOrchestrator.rebalance": {
|
|
31112
31742
|
capName: "pipeline-orchestrator",
|
|
31113
31743
|
capScope: "system",
|
|
@@ -31132,6 +31762,12 @@ Object.freeze({
|
|
|
31132
31762
|
addonId: null,
|
|
31133
31763
|
access: "view"
|
|
31134
31764
|
},
|
|
31765
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31766
|
+
capName: "pipeline-orchestrator",
|
|
31767
|
+
capScope: "system",
|
|
31768
|
+
addonId: null,
|
|
31769
|
+
access: "create"
|
|
31770
|
+
},
|
|
31135
31771
|
"pipelineOrchestrator.saveTemplate": {
|
|
31136
31772
|
capName: "pipeline-orchestrator",
|
|
31137
31773
|
capScope: "system",
|
|
@@ -31528,7 +32164,13 @@ Object.freeze({
|
|
|
31528
32164
|
addonId: null,
|
|
31529
32165
|
access: "create"
|
|
31530
32166
|
},
|
|
31531
|
-
"recording.
|
|
32167
|
+
"recording.cancelRelocateJob": {
|
|
32168
|
+
capName: "recording",
|
|
32169
|
+
capScope: "system",
|
|
32170
|
+
addonId: null,
|
|
32171
|
+
access: "create"
|
|
32172
|
+
},
|
|
32173
|
+
"recording.cancelStorageMigrationMove": {
|
|
31532
32174
|
capName: "recording",
|
|
31533
32175
|
capScope: "system",
|
|
31534
32176
|
addonId: null,
|
|
@@ -31564,7 +32206,7 @@ Object.freeze({
|
|
|
31564
32206
|
addonId: null,
|
|
31565
32207
|
access: "view"
|
|
31566
32208
|
},
|
|
31567
|
-
"recording.
|
|
32209
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31568
32210
|
capName: "recording",
|
|
31569
32211
|
capScope: "system",
|
|
31570
32212
|
addonId: null,
|
|
@@ -31582,12 +32224,30 @@ Object.freeze({
|
|
|
31582
32224
|
addonId: null,
|
|
31583
32225
|
access: "view"
|
|
31584
32226
|
},
|
|
32227
|
+
"recording.listRelocateJobs": {
|
|
32228
|
+
capName: "recording",
|
|
32229
|
+
capScope: "system",
|
|
32230
|
+
addonId: null,
|
|
32231
|
+
access: "view"
|
|
32232
|
+
},
|
|
31585
32233
|
"recording.locateSegment": {
|
|
31586
32234
|
capName: "recording",
|
|
31587
32235
|
capScope: "system",
|
|
31588
32236
|
addonId: null,
|
|
31589
32237
|
access: "view"
|
|
31590
32238
|
},
|
|
32239
|
+
"recording.pauseForStorageMigration": {
|
|
32240
|
+
capName: "recording",
|
|
32241
|
+
capScope: "system",
|
|
32242
|
+
addonId: null,
|
|
32243
|
+
access: "create"
|
|
32244
|
+
},
|
|
32245
|
+
"recording.planStorageRebalance": {
|
|
32246
|
+
capName: "recording",
|
|
32247
|
+
capScope: "system",
|
|
32248
|
+
addonId: null,
|
|
32249
|
+
access: "view"
|
|
32250
|
+
},
|
|
31591
32251
|
"recording.pruneFootage": {
|
|
31592
32252
|
capName: "recording",
|
|
31593
32253
|
capScope: "system",
|
|
@@ -31606,6 +32266,12 @@ Object.freeze({
|
|
|
31606
32266
|
addonId: null,
|
|
31607
32267
|
access: "view"
|
|
31608
32268
|
},
|
|
32269
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32270
|
+
capName: "recording",
|
|
32271
|
+
capScope: "system",
|
|
32272
|
+
addonId: null,
|
|
32273
|
+
access: "create"
|
|
32274
|
+
},
|
|
31609
32275
|
"recording.relocateFootage": {
|
|
31610
32276
|
capName: "recording",
|
|
31611
32277
|
capScope: "system",
|
|
@@ -31630,44 +32296,68 @@ Object.freeze({
|
|
|
31630
32296
|
addonId: null,
|
|
31631
32297
|
access: "create"
|
|
31632
32298
|
},
|
|
32299
|
+
"recording.resumeForStorageMigration": {
|
|
32300
|
+
capName: "recording",
|
|
32301
|
+
capScope: "system",
|
|
32302
|
+
addonId: null,
|
|
32303
|
+
access: "create"
|
|
32304
|
+
},
|
|
31633
32305
|
"recording.setDeviceConfig": {
|
|
31634
32306
|
capName: "recording",
|
|
31635
32307
|
capScope: "system",
|
|
31636
32308
|
addonId: null,
|
|
31637
32309
|
access: "create"
|
|
31638
32310
|
},
|
|
32311
|
+
"recording.startStorageMigrationMove": {
|
|
32312
|
+
capName: "recording",
|
|
32313
|
+
capScope: "system",
|
|
32314
|
+
addonId: null,
|
|
32315
|
+
access: "create"
|
|
32316
|
+
},
|
|
32317
|
+
"recording.startStorageRebalance": {
|
|
32318
|
+
capName: "recording",
|
|
32319
|
+
capScope: "system",
|
|
32320
|
+
addonId: null,
|
|
32321
|
+
access: "create"
|
|
32322
|
+
},
|
|
31639
32323
|
"recordingExport.cancelExport": {
|
|
31640
|
-
capName: "
|
|
32324
|
+
capName: "recording-export",
|
|
31641
32325
|
capScope: "system",
|
|
31642
32326
|
addonId: null,
|
|
31643
32327
|
access: "create"
|
|
31644
32328
|
},
|
|
31645
32329
|
"recordingExport.createExport": {
|
|
31646
|
-
capName: "
|
|
32330
|
+
capName: "recording-export",
|
|
31647
32331
|
capScope: "system",
|
|
31648
32332
|
addonId: null,
|
|
31649
32333
|
access: "create"
|
|
31650
32334
|
},
|
|
31651
32335
|
"recordingExport.deleteExport": {
|
|
31652
|
-
capName: "
|
|
32336
|
+
capName: "recording-export",
|
|
31653
32337
|
capScope: "system",
|
|
31654
32338
|
addonId: null,
|
|
31655
32339
|
access: "delete"
|
|
31656
32340
|
},
|
|
31657
32341
|
"recordingExport.getDownloadUrl": {
|
|
31658
|
-
capName: "
|
|
32342
|
+
capName: "recording-export",
|
|
31659
32343
|
capScope: "system",
|
|
31660
32344
|
addonId: null,
|
|
31661
32345
|
access: "view"
|
|
31662
32346
|
},
|
|
31663
32347
|
"recordingExport.getExport": {
|
|
31664
|
-
capName: "
|
|
32348
|
+
capName: "recording-export",
|
|
31665
32349
|
capScope: "system",
|
|
31666
32350
|
addonId: null,
|
|
31667
32351
|
access: "view"
|
|
31668
32352
|
},
|
|
31669
32353
|
"recordingExport.listExports": {
|
|
31670
|
-
capName: "
|
|
32354
|
+
capName: "recording-export",
|
|
32355
|
+
capScope: "system",
|
|
32356
|
+
addonId: null,
|
|
32357
|
+
access: "view"
|
|
32358
|
+
},
|
|
32359
|
+
"recordingExport.readExportBytes": {
|
|
32360
|
+
capName: "recording-export",
|
|
31671
32361
|
capScope: "system",
|
|
31672
32362
|
addonId: null,
|
|
31673
32363
|
access: "view"
|
|
@@ -32026,6 +32716,30 @@ Object.freeze({
|
|
|
32026
32716
|
addonId: null,
|
|
32027
32717
|
access: "view"
|
|
32028
32718
|
},
|
|
32719
|
+
"storageMigration.cancel": {
|
|
32720
|
+
capName: "storage-migration",
|
|
32721
|
+
capScope: "system",
|
|
32722
|
+
addonId: null,
|
|
32723
|
+
access: "create"
|
|
32724
|
+
},
|
|
32725
|
+
"storageMigration.plan": {
|
|
32726
|
+
capName: "storage-migration",
|
|
32727
|
+
capScope: "system",
|
|
32728
|
+
addonId: null,
|
|
32729
|
+
access: "view"
|
|
32730
|
+
},
|
|
32731
|
+
"storageMigration.start": {
|
|
32732
|
+
capName: "storage-migration",
|
|
32733
|
+
capScope: "system",
|
|
32734
|
+
addonId: null,
|
|
32735
|
+
access: "create"
|
|
32736
|
+
},
|
|
32737
|
+
"storageMigration.status": {
|
|
32738
|
+
capName: "storage-migration",
|
|
32739
|
+
capScope: "system",
|
|
32740
|
+
addonId: null,
|
|
32741
|
+
access: "view"
|
|
32742
|
+
},
|
|
32029
32743
|
"storageProvider.abortUpload": {
|
|
32030
32744
|
capName: "storage-provider",
|
|
32031
32745
|
capScope: "system",
|
|
@@ -32404,12 +33118,42 @@ Object.freeze({
|
|
|
32404
33118
|
addonId: null,
|
|
32405
33119
|
access: "create"
|
|
32406
33120
|
},
|
|
33121
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33122
|
+
capName: "terminal-session",
|
|
33123
|
+
capScope: "system",
|
|
33124
|
+
addonId: null,
|
|
33125
|
+
access: "create"
|
|
33126
|
+
},
|
|
32407
33127
|
"terminalSession.close": {
|
|
32408
33128
|
capName: "terminal-session",
|
|
32409
33129
|
capScope: "system",
|
|
32410
33130
|
addonId: null,
|
|
32411
33131
|
access: "create"
|
|
32412
33132
|
},
|
|
33133
|
+
"terminalSession.createInstance": {
|
|
33134
|
+
capName: "terminal-session",
|
|
33135
|
+
capScope: "system",
|
|
33136
|
+
addonId: null,
|
|
33137
|
+
access: "create"
|
|
33138
|
+
},
|
|
33139
|
+
"terminalSession.deleteInstance": {
|
|
33140
|
+
capName: "terminal-session",
|
|
33141
|
+
capScope: "system",
|
|
33142
|
+
addonId: null,
|
|
33143
|
+
access: "delete"
|
|
33144
|
+
},
|
|
33145
|
+
"terminalSession.listInstances": {
|
|
33146
|
+
capName: "terminal-session",
|
|
33147
|
+
capScope: "system",
|
|
33148
|
+
addonId: null,
|
|
33149
|
+
access: "view"
|
|
33150
|
+
},
|
|
33151
|
+
"terminalSession.listLegacyCameras": {
|
|
33152
|
+
capName: "terminal-session",
|
|
33153
|
+
capScope: "system",
|
|
33154
|
+
addonId: null,
|
|
33155
|
+
access: "view"
|
|
33156
|
+
},
|
|
32413
33157
|
"terminalSession.listProfiles": {
|
|
32414
33158
|
capName: "terminal-session",
|
|
32415
33159
|
capScope: "system",
|
|
@@ -32440,6 +33184,12 @@ Object.freeze({
|
|
|
32440
33184
|
addonId: null,
|
|
32441
33185
|
access: "create"
|
|
32442
33186
|
},
|
|
33187
|
+
"terminalSession.setInstanceEnabled": {
|
|
33188
|
+
capName: "terminal-session",
|
|
33189
|
+
capScope: "system",
|
|
33190
|
+
addonId: null,
|
|
33191
|
+
access: "create"
|
|
33192
|
+
},
|
|
32443
33193
|
"terminalSession.writeInput": {
|
|
32444
33194
|
capName: "terminal-session",
|
|
32445
33195
|
capScope: "system",
|
|
@@ -32984,6 +33734,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
32984
33734
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
32985
33735
|
var PriorityField = number().int().min(1).max(5);
|
|
32986
33736
|
/**
|
|
33737
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33738
|
+
*
|
|
33739
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33740
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33741
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33742
|
+
*
|
|
33743
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33744
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33745
|
+
*
|
|
33746
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33747
|
+
*
|
|
33748
|
+
* 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.
|
|
33749
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33750
|
+
* and therefore the length of a quiet night, does not move.
|
|
33751
|
+
*
|
|
33752
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33753
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33754
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33755
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33756
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33757
|
+
*/
|
|
33758
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33759
|
+
/**
|
|
33760
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33761
|
+
*
|
|
33762
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33763
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33764
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33765
|
+
* that range every ~583 ms.
|
|
33766
|
+
*
|
|
33767
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33768
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33769
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33770
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33771
|
+
* schema change and are the tracked follow-up.
|
|
33772
|
+
*
|
|
33773
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33774
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33775
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33776
|
+
* happened.
|
|
33777
|
+
*/
|
|
33778
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33779
|
+
/**
|
|
33780
|
+
* Caption burned into the notification's preview frame.
|
|
33781
|
+
*
|
|
33782
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33783
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33784
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33785
|
+
*
|
|
33786
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33787
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33788
|
+
* the reason this is not `.min(1)`.
|
|
33789
|
+
*/
|
|
33790
|
+
var PreviewTextField = string().max(200);
|
|
33791
|
+
/**
|
|
33792
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33793
|
+
*
|
|
33794
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33795
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33796
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33797
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33798
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33799
|
+
* them.
|
|
33800
|
+
*
|
|
33801
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33802
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33803
|
+
* paying that on the deploy that shipped it.
|
|
33804
|
+
*
|
|
33805
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33806
|
+
*/
|
|
33807
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33808
|
+
/**
|
|
33809
|
+
* Which detection classes the notification reports counts for.
|
|
33810
|
+
*
|
|
33811
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33812
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33813
|
+
* class the window actually contained", which is what an operator who never
|
|
33814
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33815
|
+
* counts cars all night).
|
|
33816
|
+
*
|
|
33817
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33818
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33819
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33820
|
+
* not emit.
|
|
33821
|
+
*
|
|
33822
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33823
|
+
* - `{{detections}}` — total over the reported classes
|
|
33824
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33825
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33826
|
+
* one per class, `count_` + the class name
|
|
33827
|
+
*
|
|
33828
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33829
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33830
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33831
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33832
|
+
*/
|
|
33833
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33834
|
+
/**
|
|
32987
33835
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
32988
33836
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
32989
33837
|
* here (see the ownership note above).
|
|
@@ -33003,9 +33851,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33003
33851
|
cadenceSec: CadenceSecField.default(15),
|
|
33004
33852
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33005
33853
|
framerate: FramerateField.default(10),
|
|
33854
|
+
/**
|
|
33855
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33856
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33857
|
+
* field gets.
|
|
33858
|
+
*/
|
|
33859
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33860
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33861
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33006
33862
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33007
33863
|
targets: TargetsField,
|
|
33008
33864
|
template: TimelapseTemplateSchema.optional(),
|
|
33865
|
+
/**
|
|
33866
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33867
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33868
|
+
*
|
|
33869
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33870
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33871
|
+
* silently clear the caption too.
|
|
33872
|
+
*/
|
|
33873
|
+
previewText: PreviewTextField.optional(),
|
|
33874
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33875
|
+
previewMode: PreviewModeField.default("image"),
|
|
33876
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33877
|
+
reportClasses: ReportClassesField.optional(),
|
|
33009
33878
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33010
33879
|
priority: PriorityField.default(3)
|
|
33011
33880
|
});
|
|
@@ -33016,8 +33885,13 @@ object({
|
|
|
33016
33885
|
schedule: NcScheduleSchema.optional(),
|
|
33017
33886
|
cadenceSec: CadenceSecField.optional(),
|
|
33018
33887
|
framerate: FramerateField.optional(),
|
|
33888
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33889
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33019
33890
|
targets: TargetsField.optional(),
|
|
33020
33891
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33892
|
+
previewText: PreviewTextField.optional(),
|
|
33893
|
+
previewMode: PreviewModeField.optional(),
|
|
33894
|
+
reportClasses: ReportClassesField.optional(),
|
|
33021
33895
|
priority: PriorityField.optional()
|
|
33022
33896
|
});
|
|
33023
33897
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33029,10 +33903,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33029
33903
|
*/
|
|
33030
33904
|
ownerUserId: string().optional(),
|
|
33031
33905
|
/**
|
|
33032
|
-
* Epoch-ms of the
|
|
33033
|
-
*
|
|
33906
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33907
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33908
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33034
33909
|
*/
|
|
33035
33910
|
lastGeneratedAt: number().optional(),
|
|
33911
|
+
/**
|
|
33912
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33913
|
+
* re-generation guard's real durable state.
|
|
33914
|
+
*
|
|
33915
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33916
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33917
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33918
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33919
|
+
* come back.
|
|
33920
|
+
*
|
|
33921
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33922
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33923
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33924
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33925
|
+
* once, on the deploy that shipped the map.
|
|
33926
|
+
*/
|
|
33927
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33036
33928
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33037
33929
|
createdBy: string(),
|
|
33038
33930
|
createdAt: number(),
|