@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.js
CHANGED
|
@@ -7243,8 +7243,31 @@ var AdoptionJobSchema = object({
|
|
|
7243
7243
|
error: string().nullable()
|
|
7244
7244
|
});
|
|
7245
7245
|
/**
|
|
7246
|
-
* Per-camera FUNCTION SWITCHES
|
|
7247
|
-
*
|
|
7246
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7247
|
+
*
|
|
7248
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7249
|
+
*
|
|
7250
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7251
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7252
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7253
|
+
* every function already had a settings page of its own, and a second place to
|
|
7254
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7255
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7256
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7257
|
+
* (which was always first-class; the switch was a veneer over
|
|
7258
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7259
|
+
* per-device setting, the two camera planes to their own components.
|
|
7260
|
+
*
|
|
7261
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7262
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7263
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7264
|
+
* never about a control panel.
|
|
7265
|
+
*
|
|
7266
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7267
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7268
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7269
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7270
|
+
* stop; nothing new may be built on it.
|
|
7248
7271
|
*
|
|
7249
7272
|
* ## This file adds no state
|
|
7250
7273
|
*
|
|
@@ -7621,14 +7644,21 @@ var RecordingConfigSchema = object({
|
|
|
7621
7644
|
/**
|
|
7622
7645
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7623
7646
|
*
|
|
7624
|
-
* One shape shared by the recorder
|
|
7625
|
-
*
|
|
7626
|
-
*
|
|
7627
|
-
*
|
|
7628
|
-
*
|
|
7629
|
-
|
|
7647
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7648
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7649
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7650
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7651
|
+
* addon surface.
|
|
7652
|
+
*/
|
|
7653
|
+
/**
|
|
7654
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7655
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7656
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7657
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7658
|
+
* runs at all.
|
|
7630
7659
|
*/
|
|
7631
7660
|
var RelocateJobStateSchema = _enum([
|
|
7661
|
+
"queued",
|
|
7632
7662
|
"running",
|
|
7633
7663
|
"done",
|
|
7634
7664
|
"failed",
|
|
@@ -7653,19 +7683,109 @@ var RelocateJobSchema = object({
|
|
|
7653
7683
|
finishedAt: number().nullable(),
|
|
7654
7684
|
error: string().nullable()
|
|
7655
7685
|
});
|
|
7686
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7687
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7688
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7656
7689
|
var RelocateFootageInputSchema = object({
|
|
7657
|
-
deviceId: number().optional(),
|
|
7658
7690
|
fromLocationId: string(),
|
|
7659
7691
|
toLocationId: string(),
|
|
7660
7692
|
entities: array(_enum(["segments"])).optional(),
|
|
7693
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7694
|
+
* pre-orchestration compatibility path. */
|
|
7695
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7696
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7697
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7698
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7699
|
+
deviceId: number().int().optional(),
|
|
7700
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7701
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7702
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7703
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7704
|
+
profiles: array(string()).optional(),
|
|
7661
7705
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7662
7706
|
* never allowed to starve live writers. */
|
|
7663
7707
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7664
7708
|
});
|
|
7665
|
-
|
|
7666
|
-
|
|
7709
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7710
|
+
* from persistent recording settings: a migration never changes
|
|
7711
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7712
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7713
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7714
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7667
7715
|
toLocationId: string(),
|
|
7668
7716
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7717
|
+
}).extend({ leaseId: string().min(1) });
|
|
7718
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7719
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7720
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7721
|
+
var StorageMigrationClassSchema = _enum([
|
|
7722
|
+
"recordings",
|
|
7723
|
+
"recordingsLow",
|
|
7724
|
+
"eventMedia"
|
|
7725
|
+
]);
|
|
7726
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7727
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7728
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7729
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7730
|
+
recordings: string().min(1).optional(),
|
|
7731
|
+
recordingsLow: string().min(1).optional(),
|
|
7732
|
+
eventMedia: string().min(1).optional()
|
|
7733
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7734
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7735
|
+
var StorageMigrationInputSchema = object({
|
|
7736
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7737
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7738
|
+
});
|
|
7739
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7740
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7741
|
+
* verified. */
|
|
7742
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7743
|
+
"planning",
|
|
7744
|
+
"pausing",
|
|
7745
|
+
"moving",
|
|
7746
|
+
"verifying",
|
|
7747
|
+
"repointing",
|
|
7748
|
+
"refreshing",
|
|
7749
|
+
"resuming",
|
|
7750
|
+
"done",
|
|
7751
|
+
"failed",
|
|
7752
|
+
"cancelled"
|
|
7753
|
+
]);
|
|
7754
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7755
|
+
"pipeline",
|
|
7756
|
+
"recorder",
|
|
7757
|
+
"analytics"
|
|
7758
|
+
]);
|
|
7759
|
+
var StorageMigrationMoveSchema = object({
|
|
7760
|
+
storageClass: StorageMigrationClassSchema,
|
|
7761
|
+
fromLocationId: string(),
|
|
7762
|
+
toLocationId: string(),
|
|
7763
|
+
moverJobId: string().nullable(),
|
|
7764
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7765
|
+
error: string().nullable()
|
|
7766
|
+
});
|
|
7767
|
+
var StorageMigrationJobSchema = object({
|
|
7768
|
+
jobId: string(),
|
|
7769
|
+
phase: StorageMigrationPhaseSchema,
|
|
7770
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7771
|
+
throttleMbps: number(),
|
|
7772
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7773
|
+
pauseLeaseId: string().nullable(),
|
|
7774
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7775
|
+
repointed: boolean(),
|
|
7776
|
+
cancelRequested: boolean(),
|
|
7777
|
+
startedAt: number(),
|
|
7778
|
+
updatedAt: number(),
|
|
7779
|
+
finishedAt: number().nullable(),
|
|
7780
|
+
error: string().nullable()
|
|
7781
|
+
});
|
|
7782
|
+
var StorageMigrationPlanSchema = object({
|
|
7783
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7784
|
+
moves: array(object({
|
|
7785
|
+
storageClass: StorageMigrationClassSchema,
|
|
7786
|
+
fromLocationId: string(),
|
|
7787
|
+
toLocationId: string()
|
|
7788
|
+
}))
|
|
7669
7789
|
});
|
|
7670
7790
|
/**
|
|
7671
7791
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7717,6 +7837,21 @@ var StorageLocationSchema = object({
|
|
|
7717
7837
|
nodeId: string().optional(),
|
|
7718
7838
|
isDefault: boolean().default(false),
|
|
7719
7839
|
isSystem: boolean().default(false),
|
|
7840
|
+
/**
|
|
7841
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7842
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7843
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7844
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7845
|
+
* extended to add the next consumer.
|
|
7846
|
+
*
|
|
7847
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7848
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7849
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7850
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7851
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7852
|
+
* always stamped `true`.
|
|
7853
|
+
*/
|
|
7854
|
+
enabled: boolean().optional(),
|
|
7720
7855
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7721
7856
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7722
7857
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12269,7 +12404,8 @@ method(object({
|
|
|
12269
12404
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12270
12405
|
/**
|
|
12271
12406
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12272
|
-
* filesystem
|
|
12407
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12408
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12273
12409
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12274
12410
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12275
12411
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14110,6 +14246,13 @@ var MaskGridDimsSchema = object({
|
|
|
14110
14246
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14111
14247
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14112
14248
|
* one trigger.
|
|
14249
|
+
*
|
|
14250
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14251
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14252
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14253
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14254
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14255
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14113
14256
|
*/
|
|
14114
14257
|
var NcDeliverySchema = _enum([
|
|
14115
14258
|
"immediate",
|
|
@@ -14124,15 +14267,32 @@ var NcDeliverySchema = _enum([
|
|
|
14124
14267
|
* depend on a provider's raw event name or payload shape.
|
|
14125
14268
|
*/
|
|
14126
14269
|
var NcSystemEventKindSchema = _enum([
|
|
14127
|
-
"
|
|
14128
|
-
"
|
|
14270
|
+
"device-online",
|
|
14271
|
+
"device-offline",
|
|
14272
|
+
"device-disabled",
|
|
14273
|
+
"device-enabled",
|
|
14129
14274
|
"stream-online",
|
|
14130
14275
|
"stream-offline",
|
|
14131
14276
|
"node-online",
|
|
14132
14277
|
"node-offline",
|
|
14133
14278
|
"addon-update-available",
|
|
14134
|
-
"server-update-available"
|
|
14279
|
+
"server-update-available",
|
|
14280
|
+
"alarm-triggered",
|
|
14281
|
+
"alarm-armed",
|
|
14282
|
+
"alarm-disarmed",
|
|
14283
|
+
"camera-online",
|
|
14284
|
+
"camera-offline",
|
|
14285
|
+
"camera-disabled",
|
|
14286
|
+
"camera-enabled"
|
|
14287
|
+
]);
|
|
14288
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14289
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14290
|
+
"camera-online",
|
|
14291
|
+
"camera-offline",
|
|
14292
|
+
"camera-disabled",
|
|
14293
|
+
"camera-enabled"
|
|
14135
14294
|
]);
|
|
14295
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14136
14296
|
/**
|
|
14137
14297
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14138
14298
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14141,6 +14301,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14141
14301
|
var NcSystemEventConditionSchema = object({
|
|
14142
14302
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14143
14303
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14304
|
+
/**
|
|
14305
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14306
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14307
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14308
|
+
*
|
|
14309
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14310
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14311
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14312
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14313
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14314
|
+
*/
|
|
14315
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14144
14316
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14145
14317
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14146
14318
|
});
|
|
@@ -14191,6 +14363,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14191
14363
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14192
14364
|
});
|
|
14193
14365
|
/**
|
|
14366
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14367
|
+
*
|
|
14368
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14369
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14370
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14371
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14372
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14373
|
+
*
|
|
14374
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14375
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14376
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14377
|
+
*
|
|
14378
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14379
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14380
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14381
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14382
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14383
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14384
|
+
* ZodEffects the cap path would have to special-case).
|
|
14385
|
+
*
|
|
14386
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14387
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14388
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14389
|
+
* `samplingSeconds` decorative.
|
|
14390
|
+
*
|
|
14391
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14392
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14393
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14394
|
+
* an operator who typed `dog` mean the same thing.
|
|
14395
|
+
*/
|
|
14396
|
+
var NcAudioConditionSchema = object({
|
|
14397
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14398
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14399
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14400
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14401
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14402
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14403
|
+
/** Length of the sampling window in seconds. */
|
|
14404
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14405
|
+
});
|
|
14406
|
+
/**
|
|
14194
14407
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14195
14408
|
*
|
|
14196
14409
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14463,7 +14676,33 @@ var NcConditionsSchema = object({
|
|
|
14463
14676
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14464
14677
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14465
14678
|
*/
|
|
14466
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14679
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14680
|
+
/**
|
|
14681
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14682
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14683
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14684
|
+
* a window that is not full yet, neither filter given). See
|
|
14685
|
+
* {@link NcAudioCondition}.
|
|
14686
|
+
*
|
|
14687
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14688
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14689
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14690
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14691
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14692
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14693
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14694
|
+
*
|
|
14695
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14696
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14697
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14698
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14699
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14700
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14701
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14702
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14703
|
+
* does an audio rule become authorable.
|
|
14704
|
+
*/
|
|
14705
|
+
audio: NcAudioConditionSchema.optional()
|
|
14467
14706
|
});
|
|
14468
14707
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14469
14708
|
var NcRuleTargetSchema = object({
|
|
@@ -14577,6 +14816,73 @@ var NcThrottleSchema = object({
|
|
|
14577
14816
|
*/
|
|
14578
14817
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14579
14818
|
});
|
|
14819
|
+
/**
|
|
14820
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14821
|
+
* it judges may be.
|
|
14822
|
+
*
|
|
14823
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14824
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14825
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14826
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14827
|
+
* tokens for pixels the model pools away.
|
|
14828
|
+
*/
|
|
14829
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14830
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14831
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14832
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14833
|
+
var NcConfirmExpectSchema = object({
|
|
14834
|
+
op: _enum([
|
|
14835
|
+
">=",
|
|
14836
|
+
">",
|
|
14837
|
+
"<=",
|
|
14838
|
+
"<",
|
|
14839
|
+
"=="
|
|
14840
|
+
]),
|
|
14841
|
+
count: number().int().min(0).max(1e3)
|
|
14842
|
+
});
|
|
14843
|
+
/**
|
|
14844
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14845
|
+
* to ship and says whether it agrees with the rule.
|
|
14846
|
+
*
|
|
14847
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14848
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14849
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14850
|
+
*
|
|
14851
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14852
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14853
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14854
|
+
* open looks in the log exactly like a gate that works.
|
|
14855
|
+
*
|
|
14856
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14857
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14858
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14859
|
+
* above rather than trusting a parse it may never have seen.
|
|
14860
|
+
*/
|
|
14861
|
+
var NcConfirmSchema = object({
|
|
14862
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14863
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14864
|
+
enabled: boolean().default(false),
|
|
14865
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14866
|
+
profileId: string().optional(),
|
|
14867
|
+
/**
|
|
14868
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14869
|
+
* from the rule (its class and its expectation).
|
|
14870
|
+
*
|
|
14871
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14872
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14873
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14874
|
+
* turn and only rule-authored words land here.
|
|
14875
|
+
*/
|
|
14876
|
+
prompt: string().max(1e3).optional(),
|
|
14877
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14878
|
+
* own boolean verdict decides. */
|
|
14879
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14880
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14881
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14882
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14883
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14884
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14885
|
+
});
|
|
14580
14886
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14581
14887
|
var NcRuleInputSchema = object({
|
|
14582
14888
|
name: string().min(1).max(200),
|
|
@@ -14637,7 +14943,13 @@ var NcRuleInputSchema = object({
|
|
|
14637
14943
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14638
14944
|
* shape as every other actuation.
|
|
14639
14945
|
*/
|
|
14640
|
-
actions: NcRuleActionsSchema.optional()
|
|
14946
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14947
|
+
/**
|
|
14948
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14949
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14950
|
+
* did, and absent is the only way to say that without a migration.
|
|
14951
|
+
*/
|
|
14952
|
+
confirm: NcConfirmSchema.optional()
|
|
14641
14953
|
});
|
|
14642
14954
|
/**
|
|
14643
14955
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14648,7 +14960,37 @@ var NcRuleInputSchema = object({
|
|
|
14648
14960
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14649
14961
|
* `updateRule` patch.
|
|
14650
14962
|
*/
|
|
14651
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14963
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14964
|
+
disabledTargetIds: array(string()).optional(),
|
|
14965
|
+
/**
|
|
14966
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14967
|
+
*
|
|
14968
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14969
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14970
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14971
|
+
* one — which made every partial edit destructive:
|
|
14972
|
+
*
|
|
14973
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14974
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14975
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14976
|
+
*
|
|
14977
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14978
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14979
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14980
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14981
|
+
* within a minute of a two-field patch.
|
|
14982
|
+
*
|
|
14983
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14984
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14985
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14986
|
+
* absent key is now genuinely absent.
|
|
14987
|
+
*/
|
|
14988
|
+
enabled: boolean().optional(),
|
|
14989
|
+
conditions: NcConditionsSchema.optional(),
|
|
14990
|
+
media: NcMediaPolicySchema.optional(),
|
|
14991
|
+
throttle: NcThrottleSchema.optional(),
|
|
14992
|
+
priority: number().int().min(1).max(5).optional()
|
|
14993
|
+
});
|
|
14652
14994
|
/** A persisted rule. */
|
|
14653
14995
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14654
14996
|
id: string(),
|
|
@@ -14949,6 +15291,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14949
15291
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14950
15292
|
* copy would lie the first time a rule is disabled.
|
|
14951
15293
|
*/
|
|
15294
|
+
/**
|
|
15295
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15296
|
+
*
|
|
15297
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15298
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15299
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15300
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15301
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15302
|
+
* with the switches the operator actually used.
|
|
15303
|
+
*/
|
|
15304
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15305
|
+
"muted",
|
|
15306
|
+
"detection-off",
|
|
15307
|
+
"offline"
|
|
15308
|
+
]);
|
|
15309
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15310
|
+
deviceId: number().int(),
|
|
15311
|
+
reason: NcAlarmSkipReasonSchema
|
|
15312
|
+
});
|
|
14952
15313
|
var NcAlarmModeCoverageSchema = object({
|
|
14953
15314
|
mode: AlarmArmModeSchema,
|
|
14954
15315
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14956,7 +15317,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14956
15317
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14957
15318
|
allDevices: boolean(),
|
|
14958
15319
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14959
|
-
deviceIds: array(number().int())
|
|
15320
|
+
deviceIds: array(number().int()),
|
|
15321
|
+
/**
|
|
15322
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15323
|
+
* excludes it.
|
|
15324
|
+
*
|
|
15325
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15326
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15327
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15328
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15329
|
+
* alarm tab.
|
|
15330
|
+
*/
|
|
15331
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14960
15332
|
});
|
|
14961
15333
|
var NcAlarmConfigSchema = object({
|
|
14962
15334
|
/**
|
|
@@ -16319,13 +16691,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16319
16691
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16320
16692
|
kind: "mutation",
|
|
16321
16693
|
auth: "admin"
|
|
16322
|
-
}), method(
|
|
16694
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16323
16695
|
kind: "mutation",
|
|
16324
16696
|
auth: "admin"
|
|
16325
|
-
}), method(object({
|
|
16326
|
-
kind: "
|
|
16697
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16698
|
+
kind: "mutation",
|
|
16327
16699
|
auth: "admin"
|
|
16328
|
-
}), method(
|
|
16700
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16701
|
+
kind: "mutation",
|
|
16702
|
+
auth: "admin"
|
|
16703
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16704
|
+
kind: "mutation",
|
|
16705
|
+
auth: "admin"
|
|
16706
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16329
16707
|
kind: "mutation",
|
|
16330
16708
|
auth: "admin"
|
|
16331
16709
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17782,9 +18160,16 @@ var CameraStatusSchema = object({
|
|
|
17782
18160
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17783
18161
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17784
18162
|
/**
|
|
17785
|
-
* Per-camera
|
|
18163
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17786
18164
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17787
18165
|
*
|
|
18166
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18167
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18168
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18169
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18170
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18171
|
+
* the difference between a camera being off and a camera being dead.
|
|
18172
|
+
*
|
|
17788
18173
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17789
18174
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17790
18175
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17855,7 +18240,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17855
18240
|
reachable: boolean(),
|
|
17856
18241
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17857
18242
|
});
|
|
17858
|
-
method(object({
|
|
18243
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18244
|
+
kind: "mutation",
|
|
18245
|
+
auth: "admin"
|
|
18246
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18247
|
+
kind: "mutation",
|
|
18248
|
+
auth: "admin"
|
|
18249
|
+
}), method(object({
|
|
17859
18250
|
deviceId: number(),
|
|
17860
18251
|
agentNodeId: string()
|
|
17861
18252
|
}), object({ success: literal(true) }), {
|
|
@@ -18385,24 +18776,28 @@ var snapshotCapability = {
|
|
|
18385
18776
|
*
|
|
18386
18777
|
* `getSnapshotOverview` is cache-only by contract: it answers from whatever
|
|
18387
18778
|
* the wrapper happens to hold and never captures. Under D93 the client
|
|
18388
|
-
* versions its image URL on that answer, and an image REQUEST
|
|
18389
|
-
*
|
|
18390
|
-
*
|
|
18391
|
-
*
|
|
18392
|
-
*
|
|
18393
|
-
*
|
|
18394
|
-
*
|
|
18395
|
-
*
|
|
18779
|
+
* versions its image URL on that answer, and an image REQUEST was the only
|
|
18780
|
+
* demand signal. Both of those are satisfiable by the client's own image
|
|
18781
|
+
* cache — `expo-image` is URL-keyed and never revalidates — so a URL painted
|
|
18782
|
+
* in a previous session comes off disk with no network, no demand, and no
|
|
18783
|
+
* capture. Measured on the live hub: reopening after two minutes idle
|
|
18784
|
+
* painted 15 of 16 tiles at **168 s old** with zero HTTP requests, and the
|
|
18785
|
+
* fleet only recovered because a later poll happened to observe a different
|
|
18786
|
+
* identity.
|
|
18396
18787
|
*
|
|
18397
18788
|
* ## The two properties that fix it
|
|
18398
18789
|
*
|
|
18399
18790
|
* **It is an RPC, so no client cache can answer it.** The demand signal
|
|
18400
|
-
* always reaches the wrapper. This method therefore
|
|
18401
|
-
*
|
|
18402
|
-
*
|
|
18403
|
-
*
|
|
18404
|
-
*
|
|
18405
|
-
*
|
|
18791
|
+
* always reaches the wrapper. This method therefore CAPTURES, where
|
|
18792
|
+
* `getSnapshotOverview` must never (D93) — the distinction is not "one is
|
|
18793
|
+
* newer" but that the overview poll is app-wide (a capturing overview would
|
|
18794
|
+
* dial every camera on the install) while this is called by a rendered
|
|
18795
|
+
* surface naming the tiles it is actually painting, at the width it is
|
|
18796
|
+
* painting them.
|
|
18797
|
+
*
|
|
18798
|
+
* Since 2026-08-11 this is the ONLY thing that refreshes a snapshot: the
|
|
18799
|
+
* server-side keep-warm loop was removed (operator directive — on-demand,
|
|
18800
|
+
* always), so a camera nobody is looking at costs nothing at all.
|
|
18406
18801
|
*
|
|
18407
18802
|
* **It waits, briefly and boundedly, for the capture it triggered.** The
|
|
18408
18803
|
* returned `capturedAt` is the frame the link will serve, not the frame the
|
|
@@ -18620,6 +19015,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18620
19015
|
locationId: string(),
|
|
18621
19016
|
targetBytes: number().int().positive()
|
|
18622
19017
|
}), EvictResultSchema, { kind: "mutation" });
|
|
19018
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
19019
|
+
kind: "mutation",
|
|
19020
|
+
auth: "admin"
|
|
19021
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
19022
|
+
kind: "mutation",
|
|
19023
|
+
auth: "admin"
|
|
19024
|
+
});
|
|
18623
19025
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18624
19026
|
providerId: string().min(1),
|
|
18625
19027
|
displayName: string().min(1),
|
|
@@ -18723,6 +19125,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18723
19125
|
label: string(),
|
|
18724
19126
|
description: string().optional()
|
|
18725
19127
|
});
|
|
19128
|
+
/**
|
|
19129
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19130
|
+
* an instance declares a camera.
|
|
19131
|
+
*/
|
|
19132
|
+
var TerminalInstanceInfoSchema = object({
|
|
19133
|
+
instanceId: string(),
|
|
19134
|
+
cameraStableId: string(),
|
|
19135
|
+
nodeId: string(),
|
|
19136
|
+
profileId: string(),
|
|
19137
|
+
profileLabel: string(),
|
|
19138
|
+
name: string(),
|
|
19139
|
+
enabled: boolean()
|
|
19140
|
+
});
|
|
19141
|
+
var TerminalLegacyCameraSchema = object({
|
|
19142
|
+
stableId: string(),
|
|
19143
|
+
nodeId: string(),
|
|
19144
|
+
profileId: string(),
|
|
19145
|
+
profileLabel: string(),
|
|
19146
|
+
name: string(),
|
|
19147
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19148
|
+
adoptable: boolean()
|
|
19149
|
+
});
|
|
18726
19150
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18727
19151
|
seq: number().int().positive(),
|
|
18728
19152
|
kind: literal("data"),
|
|
@@ -18739,7 +19163,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18739
19163
|
snapshot: string().optional(),
|
|
18740
19164
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18741
19165
|
});
|
|
18742
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19166
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19167
|
+
targetNodeId: string().min(1),
|
|
19168
|
+
profileId: string().min(1),
|
|
19169
|
+
name: string().trim().min(1).max(160).optional()
|
|
19170
|
+
}), TerminalInstanceInfoSchema, {
|
|
19171
|
+
kind: "mutation",
|
|
19172
|
+
auth: "admin"
|
|
19173
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19174
|
+
kind: "mutation",
|
|
19175
|
+
auth: "admin"
|
|
19176
|
+
}), method(object({
|
|
19177
|
+
instanceId: string().min(1),
|
|
19178
|
+
enabled: boolean()
|
|
19179
|
+
}), TerminalInstanceInfoSchema, {
|
|
19180
|
+
kind: "mutation",
|
|
19181
|
+
auth: "admin"
|
|
19182
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19183
|
+
stableId: string().min(1),
|
|
19184
|
+
name: string().trim().min(1).max(160).optional()
|
|
19185
|
+
}), TerminalInstanceInfoSchema, {
|
|
19186
|
+
kind: "mutation",
|
|
19187
|
+
auth: "admin"
|
|
19188
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18743
19189
|
profileId: string(),
|
|
18744
19190
|
cols: number().int().positive(),
|
|
18745
19191
|
rows: number().int().positive()
|
|
@@ -18756,7 +19202,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18756
19202
|
}), method(object({
|
|
18757
19203
|
sessionId: string(),
|
|
18758
19204
|
afterSeq: number().int().nonnegative(),
|
|
18759
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19205
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19206
|
+
/**
|
|
19207
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19208
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19209
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19210
|
+
*/
|
|
19211
|
+
waitForOutput: boolean().optional()
|
|
18760
19212
|
}), TerminalOutputBatchSchema, {
|
|
18761
19213
|
kind: "mutation",
|
|
18762
19214
|
auth: "admin",
|
|
@@ -21262,6 +21714,7 @@ var FaceInfoSchema = object({
|
|
|
21262
21714
|
var FaceFilterEnum = _enum([
|
|
21263
21715
|
"unassigned",
|
|
21264
21716
|
"recognized",
|
|
21717
|
+
"identified",
|
|
21265
21718
|
"all"
|
|
21266
21719
|
]);
|
|
21267
21720
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21290,6 +21743,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21290
21743
|
kind: "mutation",
|
|
21291
21744
|
auth: "admin"
|
|
21292
21745
|
}), method(object({
|
|
21746
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21747
|
+
deviceId: number().int().optional(),
|
|
21293
21748
|
limit: number().int().positive().optional(),
|
|
21294
21749
|
filter: FaceFilterEnum.optional(),
|
|
21295
21750
|
/**
|
|
@@ -23519,6 +23974,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23519
23974
|
capName: string().min(1).max(64),
|
|
23520
23975
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23521
23976
|
valuePath: string().min(1).max(64)
|
|
23977
|
+
}),
|
|
23978
|
+
object({
|
|
23979
|
+
kind: literal("latest-recognition"),
|
|
23980
|
+
recognition: _enum(["person", "plate"])
|
|
23522
23981
|
})
|
|
23523
23982
|
]);
|
|
23524
23983
|
var OsdSlotBindingSchema = object({
|
|
@@ -23624,6 +24083,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23624
24083
|
}), object({ success: literal(true) }), {
|
|
23625
24084
|
kind: "mutation",
|
|
23626
24085
|
auth: "admin"
|
|
24086
|
+
}), method(object({
|
|
24087
|
+
sourceDeviceId: number().int(),
|
|
24088
|
+
targetDeviceId: number().int()
|
|
24089
|
+
}), object({
|
|
24090
|
+
copied: number().int().nonnegative(),
|
|
24091
|
+
skipped: number().int().nonnegative()
|
|
24092
|
+
}), {
|
|
24093
|
+
kind: "mutation",
|
|
24094
|
+
auth: "admin"
|
|
23627
24095
|
}), method(object({
|
|
23628
24096
|
deviceId: number().int(),
|
|
23629
24097
|
slotId: string().min(1),
|
|
@@ -24546,7 +25014,19 @@ var RecordingManifestSchema = object({
|
|
|
24546
25014
|
* profiles/subtrees/locations on this node). */
|
|
24547
25015
|
var RecordingDeviceUsageSchema = object({
|
|
24548
25016
|
deviceId: number(),
|
|
24549
|
-
usedBytes: number()
|
|
25017
|
+
usedBytes: number(),
|
|
25018
|
+
/**
|
|
25019
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25020
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25021
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25022
|
+
*
|
|
25023
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25024
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25025
|
+
* field must keep validating that older provider's payload: the framework
|
|
25026
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25027
|
+
* the later of the two.
|
|
25028
|
+
*/
|
|
25029
|
+
oldestMs: number().nullable().optional()
|
|
24550
25030
|
});
|
|
24551
25031
|
/** Recording storage usage + capacity for one storage location. */
|
|
24552
25032
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24574,6 +25054,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24574
25054
|
locations: array(RecordingLocationUsageSchema)
|
|
24575
25055
|
});
|
|
24576
25056
|
/**
|
|
25057
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25058
|
+
*
|
|
25059
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25060
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25061
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25062
|
+
* location, run FIFO behind the single-flight mover.
|
|
25063
|
+
*
|
|
25064
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25065
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25066
|
+
* (empty on the plan).
|
|
25067
|
+
*/
|
|
25068
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25069
|
+
deviceId: number(),
|
|
25070
|
+
profile: string(),
|
|
25071
|
+
fromLocationId: string(),
|
|
25072
|
+
toLocationId: string(),
|
|
25073
|
+
bytes: number(),
|
|
25074
|
+
files: number().int()
|
|
25075
|
+
});
|
|
25076
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25077
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25078
|
+
* that had nothing to do. */
|
|
25079
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25080
|
+
"unassigned",
|
|
25081
|
+
"target-not-writable",
|
|
25082
|
+
"below-threshold",
|
|
25083
|
+
"no-headroom"
|
|
25084
|
+
]);
|
|
25085
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25086
|
+
deviceId: number(),
|
|
25087
|
+
profile: string(),
|
|
25088
|
+
fromLocationId: string(),
|
|
25089
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25090
|
+
toLocationId: string().nullable(),
|
|
25091
|
+
bytes: number(),
|
|
25092
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25093
|
+
});
|
|
25094
|
+
var RecordingRebalancePlanSchema = object({
|
|
25095
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25096
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25097
|
+
bytesToMove: number(),
|
|
25098
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25099
|
+
jobIds: array(string())
|
|
25100
|
+
});
|
|
25101
|
+
var RecordingRebalanceInputSchema = object({
|
|
25102
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25103
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25104
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25105
|
+
minMoveGb: number().min(0).optional()
|
|
25106
|
+
});
|
|
25107
|
+
/**
|
|
24577
25108
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24578
25109
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24579
25110
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24721,6 +25252,21 @@ method(object({
|
|
|
24721
25252
|
}), {
|
|
24722
25253
|
kind: "mutation",
|
|
24723
25254
|
auth: "admin"
|
|
25255
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25256
|
+
kind: "mutation",
|
|
25257
|
+
auth: "admin"
|
|
25258
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25259
|
+
kind: "mutation",
|
|
25260
|
+
auth: "admin"
|
|
25261
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25262
|
+
kind: "mutation",
|
|
25263
|
+
auth: "admin"
|
|
25264
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25265
|
+
kind: "mutation",
|
|
25266
|
+
auth: "admin"
|
|
25267
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25268
|
+
kind: "mutation",
|
|
25269
|
+
auth: "admin"
|
|
24724
25270
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24725
25271
|
kind: "mutation",
|
|
24726
25272
|
auth: "admin"
|
|
@@ -24730,9 +25276,15 @@ method(object({
|
|
|
24730
25276
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24731
25277
|
kind: "mutation",
|
|
24732
25278
|
auth: "admin"
|
|
25279
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25280
|
+
kind: "query",
|
|
25281
|
+
auth: "admin"
|
|
25282
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25283
|
+
kind: "mutation",
|
|
25284
|
+
auth: "admin"
|
|
24733
25285
|
});
|
|
24734
25286
|
/**
|
|
24735
|
-
* `
|
|
25287
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24736
25288
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24737
25289
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24738
25290
|
* delete-after-download.
|
|
@@ -24747,10 +25299,42 @@ method(object({
|
|
|
24747
25299
|
*/
|
|
24748
25300
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24749
25301
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25302
|
+
/**
|
|
25303
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25304
|
+
*
|
|
25305
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25306
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25307
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25308
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25309
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25310
|
+
*/
|
|
25311
|
+
var ExportDenseRangeSchema = object({
|
|
25312
|
+
fromSec: number().nonnegative(),
|
|
25313
|
+
toSec: number().nonnegative()
|
|
25314
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25315
|
+
/**
|
|
25316
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25317
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25318
|
+
*
|
|
25319
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25320
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25321
|
+
*/
|
|
25322
|
+
var ExportDenseSchema = object({
|
|
25323
|
+
everyMs: number().int().positive(),
|
|
25324
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25325
|
+
});
|
|
24750
25326
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24751
25327
|
var ExportTimelapseSchema = object({
|
|
24752
25328
|
everyMs: number().int().positive(),
|
|
24753
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25329
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25330
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25331
|
+
dense: ExportDenseSchema.optional()
|
|
25332
|
+
}).superRefine((v, ctx) => {
|
|
25333
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25334
|
+
code: ZodIssueCode.custom,
|
|
25335
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25336
|
+
path: ["dense", "everyMs"]
|
|
25337
|
+
});
|
|
24754
25338
|
});
|
|
24755
25339
|
/**
|
|
24756
25340
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24808,6 +25392,19 @@ var ExportDownloadSchema = object({
|
|
|
24808
25392
|
url: string(),
|
|
24809
25393
|
endpoints: array(string())
|
|
24810
25394
|
});
|
|
25395
|
+
/**
|
|
25396
|
+
* A finished export's bytes, inline.
|
|
25397
|
+
*
|
|
25398
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25399
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25400
|
+
*/
|
|
25401
|
+
var ExportBytesSchema = object({
|
|
25402
|
+
base64: string(),
|
|
25403
|
+
contentType: string(),
|
|
25404
|
+
/** Suggested filename, extension included. */
|
|
25405
|
+
name: string(),
|
|
25406
|
+
bytes: number().int().nonnegative()
|
|
25407
|
+
});
|
|
24811
25408
|
method(object({
|
|
24812
25409
|
deviceId: number(),
|
|
24813
25410
|
profile: string(),
|
|
@@ -24832,6 +25429,9 @@ method(object({
|
|
|
24832
25429
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24833
25430
|
kind: "query",
|
|
24834
25431
|
auth: "protected"
|
|
25432
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25433
|
+
kind: "query",
|
|
25434
|
+
auth: "protected"
|
|
24835
25435
|
});
|
|
24836
25436
|
/**
|
|
24837
25437
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30412,6 +31012,12 @@ Object.freeze({
|
|
|
30412
31012
|
addonId: null,
|
|
30413
31013
|
access: "delete"
|
|
30414
31014
|
},
|
|
31015
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31016
|
+
capName: "osd-manager",
|
|
31017
|
+
capScope: "system",
|
|
31018
|
+
addonId: null,
|
|
31019
|
+
access: "create"
|
|
31020
|
+
},
|
|
30415
31021
|
"osdManager.getConditionSupport": {
|
|
30416
31022
|
capName: "osd-manager",
|
|
30417
31023
|
capScope: "system",
|
|
@@ -30508,7 +31114,7 @@ Object.freeze({
|
|
|
30508
31114
|
addonId: null,
|
|
30509
31115
|
access: "create"
|
|
30510
31116
|
},
|
|
30511
|
-
"pipelineAnalytics.
|
|
31117
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30512
31118
|
capName: "pipeline-analytics",
|
|
30513
31119
|
capScope: "device",
|
|
30514
31120
|
addonId: null,
|
|
@@ -30580,12 +31186,6 @@ Object.freeze({
|
|
|
30580
31186
|
addonId: null,
|
|
30581
31187
|
access: "view"
|
|
30582
31188
|
},
|
|
30583
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30584
|
-
capName: "pipeline-analytics",
|
|
30585
|
-
capScope: "device",
|
|
30586
|
-
addonId: null,
|
|
30587
|
-
access: "view"
|
|
30588
|
-
},
|
|
30589
31189
|
"pipelineAnalytics.getMotionEvents": {
|
|
30590
31190
|
capName: "pipeline-analytics",
|
|
30591
31191
|
capScope: "device",
|
|
@@ -30622,6 +31222,12 @@ Object.freeze({
|
|
|
30622
31222
|
addonId: null,
|
|
30623
31223
|
access: "view"
|
|
30624
31224
|
},
|
|
31225
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31226
|
+
capName: "pipeline-analytics",
|
|
31227
|
+
capScope: "device",
|
|
31228
|
+
addonId: null,
|
|
31229
|
+
access: "view"
|
|
31230
|
+
},
|
|
30625
31231
|
"pipelineAnalytics.getTrack": {
|
|
30626
31232
|
capName: "pipeline-analytics",
|
|
30627
31233
|
capScope: "device",
|
|
@@ -30700,6 +31306,12 @@ Object.freeze({
|
|
|
30700
31306
|
addonId: null,
|
|
30701
31307
|
access: "view"
|
|
30702
31308
|
},
|
|
31309
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31310
|
+
capName: "pipeline-analytics",
|
|
31311
|
+
capScope: "device",
|
|
31312
|
+
addonId: null,
|
|
31313
|
+
access: "create"
|
|
31314
|
+
},
|
|
30703
31315
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30704
31316
|
capName: "pipeline-analytics",
|
|
30705
31317
|
capScope: "device",
|
|
@@ -30730,7 +31342,7 @@ Object.freeze({
|
|
|
30730
31342
|
addonId: null,
|
|
30731
31343
|
access: "create"
|
|
30732
31344
|
},
|
|
30733
|
-
"pipelineAnalytics.
|
|
31345
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30734
31346
|
capName: "pipeline-analytics",
|
|
30735
31347
|
capScope: "device",
|
|
30736
31348
|
addonId: null,
|
|
@@ -30742,6 +31354,12 @@ Object.freeze({
|
|
|
30742
31354
|
addonId: null,
|
|
30743
31355
|
access: "create"
|
|
30744
31356
|
},
|
|
31357
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31358
|
+
capName: "pipeline-analytics",
|
|
31359
|
+
capScope: "device",
|
|
31360
|
+
addonId: null,
|
|
31361
|
+
access: "create"
|
|
31362
|
+
},
|
|
30745
31363
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30746
31364
|
capName: "pipeline-analytics",
|
|
30747
31365
|
capScope: "device",
|
|
@@ -30766,6 +31384,12 @@ Object.freeze({
|
|
|
30766
31384
|
addonId: null,
|
|
30767
31385
|
access: "create"
|
|
30768
31386
|
},
|
|
31387
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31388
|
+
capName: "pipeline-analytics",
|
|
31389
|
+
capScope: "device",
|
|
31390
|
+
addonId: null,
|
|
31391
|
+
access: "create"
|
|
31392
|
+
},
|
|
30769
31393
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30770
31394
|
capName: "pipeline-analytics",
|
|
30771
31395
|
capScope: "device",
|
|
@@ -31132,6 +31756,12 @@ Object.freeze({
|
|
|
31132
31756
|
addonId: null,
|
|
31133
31757
|
access: "view"
|
|
31134
31758
|
},
|
|
31759
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31760
|
+
capName: "pipeline-orchestrator",
|
|
31761
|
+
capScope: "system",
|
|
31762
|
+
addonId: null,
|
|
31763
|
+
access: "create"
|
|
31764
|
+
},
|
|
31135
31765
|
"pipelineOrchestrator.rebalance": {
|
|
31136
31766
|
capName: "pipeline-orchestrator",
|
|
31137
31767
|
capScope: "system",
|
|
@@ -31156,6 +31786,12 @@ Object.freeze({
|
|
|
31156
31786
|
addonId: null,
|
|
31157
31787
|
access: "view"
|
|
31158
31788
|
},
|
|
31789
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31790
|
+
capName: "pipeline-orchestrator",
|
|
31791
|
+
capScope: "system",
|
|
31792
|
+
addonId: null,
|
|
31793
|
+
access: "create"
|
|
31794
|
+
},
|
|
31159
31795
|
"pipelineOrchestrator.saveTemplate": {
|
|
31160
31796
|
capName: "pipeline-orchestrator",
|
|
31161
31797
|
capScope: "system",
|
|
@@ -31552,7 +32188,13 @@ Object.freeze({
|
|
|
31552
32188
|
addonId: null,
|
|
31553
32189
|
access: "create"
|
|
31554
32190
|
},
|
|
31555
|
-
"recording.
|
|
32191
|
+
"recording.cancelRelocateJob": {
|
|
32192
|
+
capName: "recording",
|
|
32193
|
+
capScope: "system",
|
|
32194
|
+
addonId: null,
|
|
32195
|
+
access: "create"
|
|
32196
|
+
},
|
|
32197
|
+
"recording.cancelStorageMigrationMove": {
|
|
31556
32198
|
capName: "recording",
|
|
31557
32199
|
capScope: "system",
|
|
31558
32200
|
addonId: null,
|
|
@@ -31588,7 +32230,7 @@ Object.freeze({
|
|
|
31588
32230
|
addonId: null,
|
|
31589
32231
|
access: "view"
|
|
31590
32232
|
},
|
|
31591
|
-
"recording.
|
|
32233
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31592
32234
|
capName: "recording",
|
|
31593
32235
|
capScope: "system",
|
|
31594
32236
|
addonId: null,
|
|
@@ -31606,12 +32248,30 @@ Object.freeze({
|
|
|
31606
32248
|
addonId: null,
|
|
31607
32249
|
access: "view"
|
|
31608
32250
|
},
|
|
32251
|
+
"recording.listRelocateJobs": {
|
|
32252
|
+
capName: "recording",
|
|
32253
|
+
capScope: "system",
|
|
32254
|
+
addonId: null,
|
|
32255
|
+
access: "view"
|
|
32256
|
+
},
|
|
31609
32257
|
"recording.locateSegment": {
|
|
31610
32258
|
capName: "recording",
|
|
31611
32259
|
capScope: "system",
|
|
31612
32260
|
addonId: null,
|
|
31613
32261
|
access: "view"
|
|
31614
32262
|
},
|
|
32263
|
+
"recording.pauseForStorageMigration": {
|
|
32264
|
+
capName: "recording",
|
|
32265
|
+
capScope: "system",
|
|
32266
|
+
addonId: null,
|
|
32267
|
+
access: "create"
|
|
32268
|
+
},
|
|
32269
|
+
"recording.planStorageRebalance": {
|
|
32270
|
+
capName: "recording",
|
|
32271
|
+
capScope: "system",
|
|
32272
|
+
addonId: null,
|
|
32273
|
+
access: "view"
|
|
32274
|
+
},
|
|
31615
32275
|
"recording.pruneFootage": {
|
|
31616
32276
|
capName: "recording",
|
|
31617
32277
|
capScope: "system",
|
|
@@ -31630,6 +32290,12 @@ Object.freeze({
|
|
|
31630
32290
|
addonId: null,
|
|
31631
32291
|
access: "view"
|
|
31632
32292
|
},
|
|
32293
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32294
|
+
capName: "recording",
|
|
32295
|
+
capScope: "system",
|
|
32296
|
+
addonId: null,
|
|
32297
|
+
access: "create"
|
|
32298
|
+
},
|
|
31633
32299
|
"recording.relocateFootage": {
|
|
31634
32300
|
capName: "recording",
|
|
31635
32301
|
capScope: "system",
|
|
@@ -31654,44 +32320,68 @@ Object.freeze({
|
|
|
31654
32320
|
addonId: null,
|
|
31655
32321
|
access: "create"
|
|
31656
32322
|
},
|
|
32323
|
+
"recording.resumeForStorageMigration": {
|
|
32324
|
+
capName: "recording",
|
|
32325
|
+
capScope: "system",
|
|
32326
|
+
addonId: null,
|
|
32327
|
+
access: "create"
|
|
32328
|
+
},
|
|
31657
32329
|
"recording.setDeviceConfig": {
|
|
31658
32330
|
capName: "recording",
|
|
31659
32331
|
capScope: "system",
|
|
31660
32332
|
addonId: null,
|
|
31661
32333
|
access: "create"
|
|
31662
32334
|
},
|
|
32335
|
+
"recording.startStorageMigrationMove": {
|
|
32336
|
+
capName: "recording",
|
|
32337
|
+
capScope: "system",
|
|
32338
|
+
addonId: null,
|
|
32339
|
+
access: "create"
|
|
32340
|
+
},
|
|
32341
|
+
"recording.startStorageRebalance": {
|
|
32342
|
+
capName: "recording",
|
|
32343
|
+
capScope: "system",
|
|
32344
|
+
addonId: null,
|
|
32345
|
+
access: "create"
|
|
32346
|
+
},
|
|
31663
32347
|
"recordingExport.cancelExport": {
|
|
31664
|
-
capName: "
|
|
32348
|
+
capName: "recording-export",
|
|
31665
32349
|
capScope: "system",
|
|
31666
32350
|
addonId: null,
|
|
31667
32351
|
access: "create"
|
|
31668
32352
|
},
|
|
31669
32353
|
"recordingExport.createExport": {
|
|
31670
|
-
capName: "
|
|
32354
|
+
capName: "recording-export",
|
|
31671
32355
|
capScope: "system",
|
|
31672
32356
|
addonId: null,
|
|
31673
32357
|
access: "create"
|
|
31674
32358
|
},
|
|
31675
32359
|
"recordingExport.deleteExport": {
|
|
31676
|
-
capName: "
|
|
32360
|
+
capName: "recording-export",
|
|
31677
32361
|
capScope: "system",
|
|
31678
32362
|
addonId: null,
|
|
31679
32363
|
access: "delete"
|
|
31680
32364
|
},
|
|
31681
32365
|
"recordingExport.getDownloadUrl": {
|
|
31682
|
-
capName: "
|
|
32366
|
+
capName: "recording-export",
|
|
31683
32367
|
capScope: "system",
|
|
31684
32368
|
addonId: null,
|
|
31685
32369
|
access: "view"
|
|
31686
32370
|
},
|
|
31687
32371
|
"recordingExport.getExport": {
|
|
31688
|
-
capName: "
|
|
32372
|
+
capName: "recording-export",
|
|
31689
32373
|
capScope: "system",
|
|
31690
32374
|
addonId: null,
|
|
31691
32375
|
access: "view"
|
|
31692
32376
|
},
|
|
31693
32377
|
"recordingExport.listExports": {
|
|
31694
|
-
capName: "
|
|
32378
|
+
capName: "recording-export",
|
|
32379
|
+
capScope: "system",
|
|
32380
|
+
addonId: null,
|
|
32381
|
+
access: "view"
|
|
32382
|
+
},
|
|
32383
|
+
"recordingExport.readExportBytes": {
|
|
32384
|
+
capName: "recording-export",
|
|
31695
32385
|
capScope: "system",
|
|
31696
32386
|
addonId: null,
|
|
31697
32387
|
access: "view"
|
|
@@ -32050,6 +32740,30 @@ Object.freeze({
|
|
|
32050
32740
|
addonId: null,
|
|
32051
32741
|
access: "view"
|
|
32052
32742
|
},
|
|
32743
|
+
"storageMigration.cancel": {
|
|
32744
|
+
capName: "storage-migration",
|
|
32745
|
+
capScope: "system",
|
|
32746
|
+
addonId: null,
|
|
32747
|
+
access: "create"
|
|
32748
|
+
},
|
|
32749
|
+
"storageMigration.plan": {
|
|
32750
|
+
capName: "storage-migration",
|
|
32751
|
+
capScope: "system",
|
|
32752
|
+
addonId: null,
|
|
32753
|
+
access: "view"
|
|
32754
|
+
},
|
|
32755
|
+
"storageMigration.start": {
|
|
32756
|
+
capName: "storage-migration",
|
|
32757
|
+
capScope: "system",
|
|
32758
|
+
addonId: null,
|
|
32759
|
+
access: "create"
|
|
32760
|
+
},
|
|
32761
|
+
"storageMigration.status": {
|
|
32762
|
+
capName: "storage-migration",
|
|
32763
|
+
capScope: "system",
|
|
32764
|
+
addonId: null,
|
|
32765
|
+
access: "view"
|
|
32766
|
+
},
|
|
32053
32767
|
"storageProvider.abortUpload": {
|
|
32054
32768
|
capName: "storage-provider",
|
|
32055
32769
|
capScope: "system",
|
|
@@ -32428,12 +33142,42 @@ Object.freeze({
|
|
|
32428
33142
|
addonId: null,
|
|
32429
33143
|
access: "create"
|
|
32430
33144
|
},
|
|
33145
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33146
|
+
capName: "terminal-session",
|
|
33147
|
+
capScope: "system",
|
|
33148
|
+
addonId: null,
|
|
33149
|
+
access: "create"
|
|
33150
|
+
},
|
|
32431
33151
|
"terminalSession.close": {
|
|
32432
33152
|
capName: "terminal-session",
|
|
32433
33153
|
capScope: "system",
|
|
32434
33154
|
addonId: null,
|
|
32435
33155
|
access: "create"
|
|
32436
33156
|
},
|
|
33157
|
+
"terminalSession.createInstance": {
|
|
33158
|
+
capName: "terminal-session",
|
|
33159
|
+
capScope: "system",
|
|
33160
|
+
addonId: null,
|
|
33161
|
+
access: "create"
|
|
33162
|
+
},
|
|
33163
|
+
"terminalSession.deleteInstance": {
|
|
33164
|
+
capName: "terminal-session",
|
|
33165
|
+
capScope: "system",
|
|
33166
|
+
addonId: null,
|
|
33167
|
+
access: "delete"
|
|
33168
|
+
},
|
|
33169
|
+
"terminalSession.listInstances": {
|
|
33170
|
+
capName: "terminal-session",
|
|
33171
|
+
capScope: "system",
|
|
33172
|
+
addonId: null,
|
|
33173
|
+
access: "view"
|
|
33174
|
+
},
|
|
33175
|
+
"terminalSession.listLegacyCameras": {
|
|
33176
|
+
capName: "terminal-session",
|
|
33177
|
+
capScope: "system",
|
|
33178
|
+
addonId: null,
|
|
33179
|
+
access: "view"
|
|
33180
|
+
},
|
|
32437
33181
|
"terminalSession.listProfiles": {
|
|
32438
33182
|
capName: "terminal-session",
|
|
32439
33183
|
capScope: "system",
|
|
@@ -32464,6 +33208,12 @@ Object.freeze({
|
|
|
32464
33208
|
addonId: null,
|
|
32465
33209
|
access: "create"
|
|
32466
33210
|
},
|
|
33211
|
+
"terminalSession.setInstanceEnabled": {
|
|
33212
|
+
capName: "terminal-session",
|
|
33213
|
+
capScope: "system",
|
|
33214
|
+
addonId: null,
|
|
33215
|
+
access: "create"
|
|
33216
|
+
},
|
|
32467
33217
|
"terminalSession.writeInput": {
|
|
32468
33218
|
capName: "terminal-session",
|
|
32469
33219
|
capScope: "system",
|
|
@@ -33008,6 +33758,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33008
33758
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33009
33759
|
var PriorityField = number().int().min(1).max(5);
|
|
33010
33760
|
/**
|
|
33761
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33762
|
+
*
|
|
33763
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33764
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33765
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33766
|
+
*
|
|
33767
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33768
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33769
|
+
*
|
|
33770
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33771
|
+
*
|
|
33772
|
+
* 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.
|
|
33773
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33774
|
+
* and therefore the length of a quiet night, does not move.
|
|
33775
|
+
*
|
|
33776
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33777
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33778
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33779
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33780
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33781
|
+
*/
|
|
33782
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33783
|
+
/**
|
|
33784
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33785
|
+
*
|
|
33786
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33787
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33788
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33789
|
+
* that range every ~583 ms.
|
|
33790
|
+
*
|
|
33791
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33792
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33793
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33794
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33795
|
+
* schema change and are the tracked follow-up.
|
|
33796
|
+
*
|
|
33797
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33798
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33799
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33800
|
+
* happened.
|
|
33801
|
+
*/
|
|
33802
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33803
|
+
/**
|
|
33804
|
+
* Caption burned into the notification's preview frame.
|
|
33805
|
+
*
|
|
33806
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33807
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33808
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33809
|
+
*
|
|
33810
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33811
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33812
|
+
* the reason this is not `.min(1)`.
|
|
33813
|
+
*/
|
|
33814
|
+
var PreviewTextField = string().max(200);
|
|
33815
|
+
/**
|
|
33816
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33817
|
+
*
|
|
33818
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33819
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33820
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33821
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33822
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33823
|
+
* them.
|
|
33824
|
+
*
|
|
33825
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33826
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33827
|
+
* paying that on the deploy that shipped it.
|
|
33828
|
+
*
|
|
33829
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33830
|
+
*/
|
|
33831
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33832
|
+
/**
|
|
33833
|
+
* Which detection classes the notification reports counts for.
|
|
33834
|
+
*
|
|
33835
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33836
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33837
|
+
* class the window actually contained", which is what an operator who never
|
|
33838
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33839
|
+
* counts cars all night).
|
|
33840
|
+
*
|
|
33841
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33842
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33843
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33844
|
+
* not emit.
|
|
33845
|
+
*
|
|
33846
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33847
|
+
* - `{{detections}}` — total over the reported classes
|
|
33848
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33849
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33850
|
+
* one per class, `count_` + the class name
|
|
33851
|
+
*
|
|
33852
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33853
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33854
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33855
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33856
|
+
*/
|
|
33857
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33858
|
+
/**
|
|
33011
33859
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33012
33860
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33013
33861
|
* here (see the ownership note above).
|
|
@@ -33027,9 +33875,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33027
33875
|
cadenceSec: CadenceSecField.default(15),
|
|
33028
33876
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33029
33877
|
framerate: FramerateField.default(10),
|
|
33878
|
+
/**
|
|
33879
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33880
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33881
|
+
* field gets.
|
|
33882
|
+
*/
|
|
33883
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33884
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33885
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33030
33886
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33031
33887
|
targets: TargetsField,
|
|
33032
33888
|
template: TimelapseTemplateSchema.optional(),
|
|
33889
|
+
/**
|
|
33890
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33891
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33892
|
+
*
|
|
33893
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33894
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33895
|
+
* silently clear the caption too.
|
|
33896
|
+
*/
|
|
33897
|
+
previewText: PreviewTextField.optional(),
|
|
33898
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33899
|
+
previewMode: PreviewModeField.default("image"),
|
|
33900
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33901
|
+
reportClasses: ReportClassesField.optional(),
|
|
33033
33902
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33034
33903
|
priority: PriorityField.default(3)
|
|
33035
33904
|
});
|
|
@@ -33040,8 +33909,13 @@ object({
|
|
|
33040
33909
|
schedule: NcScheduleSchema.optional(),
|
|
33041
33910
|
cadenceSec: CadenceSecField.optional(),
|
|
33042
33911
|
framerate: FramerateField.optional(),
|
|
33912
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33913
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33043
33914
|
targets: TargetsField.optional(),
|
|
33044
33915
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33916
|
+
previewText: PreviewTextField.optional(),
|
|
33917
|
+
previewMode: PreviewModeField.optional(),
|
|
33918
|
+
reportClasses: ReportClassesField.optional(),
|
|
33045
33919
|
priority: PriorityField.optional()
|
|
33046
33920
|
});
|
|
33047
33921
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33053,10 +33927,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33053
33927
|
*/
|
|
33054
33928
|
ownerUserId: string().optional(),
|
|
33055
33929
|
/**
|
|
33056
|
-
* Epoch-ms of the
|
|
33057
|
-
*
|
|
33930
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33931
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33932
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33058
33933
|
*/
|
|
33059
33934
|
lastGeneratedAt: number().optional(),
|
|
33935
|
+
/**
|
|
33936
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33937
|
+
* re-generation guard's real durable state.
|
|
33938
|
+
*
|
|
33939
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33940
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33941
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33942
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33943
|
+
* come back.
|
|
33944
|
+
*
|
|
33945
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33946
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33947
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33948
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33949
|
+
* once, on the deploy that shipped the map.
|
|
33950
|
+
*/
|
|
33951
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33060
33952
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33061
33953
|
createdBy: string(),
|
|
33062
33954
|
createdAt: number(),
|