@camstack/addon-provider-velux 0.2.12 → 0.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 +936 -48
- package/dist/addon.mjs +936 -48
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -7218,8 +7218,31 @@ var AdoptionJobSchema = object({
|
|
|
7218
7218
|
error: string().nullable()
|
|
7219
7219
|
});
|
|
7220
7220
|
/**
|
|
7221
|
-
* Per-camera FUNCTION SWITCHES
|
|
7222
|
-
*
|
|
7221
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7222
|
+
*
|
|
7223
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7224
|
+
*
|
|
7225
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7226
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7227
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7228
|
+
* every function already had a settings page of its own, and a second place to
|
|
7229
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7230
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7231
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7232
|
+
* (which was always first-class; the switch was a veneer over
|
|
7233
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7234
|
+
* per-device setting, the two camera planes to their own components.
|
|
7235
|
+
*
|
|
7236
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7237
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7238
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7239
|
+
* never about a control panel.
|
|
7240
|
+
*
|
|
7241
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7242
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7243
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7244
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7245
|
+
* stop; nothing new may be built on it.
|
|
7223
7246
|
*
|
|
7224
7247
|
* ## This file adds no state
|
|
7225
7248
|
*
|
|
@@ -7564,14 +7587,21 @@ var RecordingConfigSchema = object({
|
|
|
7564
7587
|
/**
|
|
7565
7588
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7566
7589
|
*
|
|
7567
|
-
* One shape shared by the recorder
|
|
7568
|
-
*
|
|
7569
|
-
*
|
|
7570
|
-
*
|
|
7571
|
-
*
|
|
7572
|
-
|
|
7590
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7591
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7592
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7593
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7594
|
+
* addon surface.
|
|
7595
|
+
*/
|
|
7596
|
+
/**
|
|
7597
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7598
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7599
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7600
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7601
|
+
* runs at all.
|
|
7573
7602
|
*/
|
|
7574
7603
|
var RelocateJobStateSchema = _enum([
|
|
7604
|
+
"queued",
|
|
7575
7605
|
"running",
|
|
7576
7606
|
"done",
|
|
7577
7607
|
"failed",
|
|
@@ -7596,19 +7626,109 @@ var RelocateJobSchema = object({
|
|
|
7596
7626
|
finishedAt: number().nullable(),
|
|
7597
7627
|
error: string().nullable()
|
|
7598
7628
|
});
|
|
7629
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7630
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7631
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7599
7632
|
var RelocateFootageInputSchema = object({
|
|
7600
|
-
deviceId: number().optional(),
|
|
7601
7633
|
fromLocationId: string(),
|
|
7602
7634
|
toLocationId: string(),
|
|
7603
7635
|
entities: array(_enum(["segments"])).optional(),
|
|
7636
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7637
|
+
* pre-orchestration compatibility path. */
|
|
7638
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7639
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7640
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7641
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7642
|
+
deviceId: number().int().optional(),
|
|
7643
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7644
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7645
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7646
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7647
|
+
profiles: array(string()).optional(),
|
|
7604
7648
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7605
7649
|
* never allowed to starve live writers. */
|
|
7606
7650
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7607
7651
|
});
|
|
7608
|
-
|
|
7609
|
-
|
|
7652
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7653
|
+
* from persistent recording settings: a migration never changes
|
|
7654
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7655
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7656
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7657
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7610
7658
|
toLocationId: string(),
|
|
7611
7659
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7660
|
+
}).extend({ leaseId: string().min(1) });
|
|
7661
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7662
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7663
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7664
|
+
var StorageMigrationClassSchema = _enum([
|
|
7665
|
+
"recordings",
|
|
7666
|
+
"recordingsLow",
|
|
7667
|
+
"eventMedia"
|
|
7668
|
+
]);
|
|
7669
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7670
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7671
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7672
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7673
|
+
recordings: string().min(1).optional(),
|
|
7674
|
+
recordingsLow: string().min(1).optional(),
|
|
7675
|
+
eventMedia: string().min(1).optional()
|
|
7676
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7677
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7678
|
+
var StorageMigrationInputSchema = object({
|
|
7679
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7680
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7681
|
+
});
|
|
7682
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7683
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7684
|
+
* verified. */
|
|
7685
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7686
|
+
"planning",
|
|
7687
|
+
"pausing",
|
|
7688
|
+
"moving",
|
|
7689
|
+
"verifying",
|
|
7690
|
+
"repointing",
|
|
7691
|
+
"refreshing",
|
|
7692
|
+
"resuming",
|
|
7693
|
+
"done",
|
|
7694
|
+
"failed",
|
|
7695
|
+
"cancelled"
|
|
7696
|
+
]);
|
|
7697
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7698
|
+
"pipeline",
|
|
7699
|
+
"recorder",
|
|
7700
|
+
"analytics"
|
|
7701
|
+
]);
|
|
7702
|
+
var StorageMigrationMoveSchema = object({
|
|
7703
|
+
storageClass: StorageMigrationClassSchema,
|
|
7704
|
+
fromLocationId: string(),
|
|
7705
|
+
toLocationId: string(),
|
|
7706
|
+
moverJobId: string().nullable(),
|
|
7707
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7708
|
+
error: string().nullable()
|
|
7709
|
+
});
|
|
7710
|
+
var StorageMigrationJobSchema = object({
|
|
7711
|
+
jobId: string(),
|
|
7712
|
+
phase: StorageMigrationPhaseSchema,
|
|
7713
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7714
|
+
throttleMbps: number(),
|
|
7715
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7716
|
+
pauseLeaseId: string().nullable(),
|
|
7717
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7718
|
+
repointed: boolean(),
|
|
7719
|
+
cancelRequested: boolean(),
|
|
7720
|
+
startedAt: number(),
|
|
7721
|
+
updatedAt: number(),
|
|
7722
|
+
finishedAt: number().nullable(),
|
|
7723
|
+
error: string().nullable()
|
|
7724
|
+
});
|
|
7725
|
+
var StorageMigrationPlanSchema = object({
|
|
7726
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7727
|
+
moves: array(object({
|
|
7728
|
+
storageClass: StorageMigrationClassSchema,
|
|
7729
|
+
fromLocationId: string(),
|
|
7730
|
+
toLocationId: string()
|
|
7731
|
+
}))
|
|
7612
7732
|
});
|
|
7613
7733
|
/**
|
|
7614
7734
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7660,6 +7780,21 @@ var StorageLocationSchema = object({
|
|
|
7660
7780
|
nodeId: string().optional(),
|
|
7661
7781
|
isDefault: boolean().default(false),
|
|
7662
7782
|
isSystem: boolean().default(false),
|
|
7783
|
+
/**
|
|
7784
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7785
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7786
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7787
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7788
|
+
* extended to add the next consumer.
|
|
7789
|
+
*
|
|
7790
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7791
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7792
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7793
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7794
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7795
|
+
* always stamped `true`.
|
|
7796
|
+
*/
|
|
7797
|
+
enabled: boolean().optional(),
|
|
7663
7798
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7664
7799
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7665
7800
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12212,7 +12347,8 @@ method(object({
|
|
|
12212
12347
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12213
12348
|
/**
|
|
12214
12349
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12215
|
-
* filesystem
|
|
12350
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12351
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12216
12352
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12217
12353
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12218
12354
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14053,6 +14189,13 @@ var MaskGridDimsSchema = object({
|
|
|
14053
14189
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14054
14190
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14055
14191
|
* one trigger.
|
|
14192
|
+
*
|
|
14193
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14194
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14195
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14196
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14197
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14198
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14056
14199
|
*/
|
|
14057
14200
|
var NcDeliverySchema = _enum([
|
|
14058
14201
|
"immediate",
|
|
@@ -14067,15 +14210,32 @@ var NcDeliverySchema = _enum([
|
|
|
14067
14210
|
* depend on a provider's raw event name or payload shape.
|
|
14068
14211
|
*/
|
|
14069
14212
|
var NcSystemEventKindSchema = _enum([
|
|
14070
|
-
"
|
|
14071
|
-
"
|
|
14213
|
+
"device-online",
|
|
14214
|
+
"device-offline",
|
|
14215
|
+
"device-disabled",
|
|
14216
|
+
"device-enabled",
|
|
14072
14217
|
"stream-online",
|
|
14073
14218
|
"stream-offline",
|
|
14074
14219
|
"node-online",
|
|
14075
14220
|
"node-offline",
|
|
14076
14221
|
"addon-update-available",
|
|
14077
|
-
"server-update-available"
|
|
14222
|
+
"server-update-available",
|
|
14223
|
+
"alarm-triggered",
|
|
14224
|
+
"alarm-armed",
|
|
14225
|
+
"alarm-disarmed",
|
|
14226
|
+
"camera-online",
|
|
14227
|
+
"camera-offline",
|
|
14228
|
+
"camera-disabled",
|
|
14229
|
+
"camera-enabled"
|
|
14230
|
+
]);
|
|
14231
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14232
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14233
|
+
"camera-online",
|
|
14234
|
+
"camera-offline",
|
|
14235
|
+
"camera-disabled",
|
|
14236
|
+
"camera-enabled"
|
|
14078
14237
|
]);
|
|
14238
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14079
14239
|
/**
|
|
14080
14240
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14081
14241
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14084,6 +14244,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14084
14244
|
var NcSystemEventConditionSchema = object({
|
|
14085
14245
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14086
14246
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14247
|
+
/**
|
|
14248
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14249
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14250
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14251
|
+
*
|
|
14252
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14253
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14254
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14255
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14256
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14257
|
+
*/
|
|
14258
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14087
14259
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14088
14260
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14089
14261
|
});
|
|
@@ -14134,6 +14306,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14134
14306
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14135
14307
|
});
|
|
14136
14308
|
/**
|
|
14309
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14310
|
+
*
|
|
14311
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14312
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14313
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14314
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14315
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14316
|
+
*
|
|
14317
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14318
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14319
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14320
|
+
*
|
|
14321
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14322
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14323
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14324
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14325
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14326
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14327
|
+
* ZodEffects the cap path would have to special-case).
|
|
14328
|
+
*
|
|
14329
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14330
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14331
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14332
|
+
* `samplingSeconds` decorative.
|
|
14333
|
+
*
|
|
14334
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14335
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14336
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14337
|
+
* an operator who typed `dog` mean the same thing.
|
|
14338
|
+
*/
|
|
14339
|
+
var NcAudioConditionSchema = object({
|
|
14340
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14341
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14342
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14343
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14344
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14345
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14346
|
+
/** Length of the sampling window in seconds. */
|
|
14347
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14348
|
+
});
|
|
14349
|
+
/**
|
|
14137
14350
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14138
14351
|
*
|
|
14139
14352
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14406,7 +14619,33 @@ var NcConditionsSchema = object({
|
|
|
14406
14619
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14407
14620
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14408
14621
|
*/
|
|
14409
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14622
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14623
|
+
/**
|
|
14624
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14625
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14626
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14627
|
+
* a window that is not full yet, neither filter given). See
|
|
14628
|
+
* {@link NcAudioCondition}.
|
|
14629
|
+
*
|
|
14630
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14631
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14632
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14633
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14634
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14635
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14636
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14637
|
+
*
|
|
14638
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14639
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14640
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14641
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14642
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14643
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14644
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14645
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14646
|
+
* does an audio rule become authorable.
|
|
14647
|
+
*/
|
|
14648
|
+
audio: NcAudioConditionSchema.optional()
|
|
14410
14649
|
});
|
|
14411
14650
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14412
14651
|
var NcRuleTargetSchema = object({
|
|
@@ -14520,6 +14759,73 @@ var NcThrottleSchema = object({
|
|
|
14520
14759
|
*/
|
|
14521
14760
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14522
14761
|
});
|
|
14762
|
+
/**
|
|
14763
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14764
|
+
* it judges may be.
|
|
14765
|
+
*
|
|
14766
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14767
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14768
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14769
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14770
|
+
* tokens for pixels the model pools away.
|
|
14771
|
+
*/
|
|
14772
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14773
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14774
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14775
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14776
|
+
var NcConfirmExpectSchema = object({
|
|
14777
|
+
op: _enum([
|
|
14778
|
+
">=",
|
|
14779
|
+
">",
|
|
14780
|
+
"<=",
|
|
14781
|
+
"<",
|
|
14782
|
+
"=="
|
|
14783
|
+
]),
|
|
14784
|
+
count: number().int().min(0).max(1e3)
|
|
14785
|
+
});
|
|
14786
|
+
/**
|
|
14787
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14788
|
+
* to ship and says whether it agrees with the rule.
|
|
14789
|
+
*
|
|
14790
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14791
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14792
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14793
|
+
*
|
|
14794
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14795
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14796
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14797
|
+
* open looks in the log exactly like a gate that works.
|
|
14798
|
+
*
|
|
14799
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14800
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14801
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14802
|
+
* above rather than trusting a parse it may never have seen.
|
|
14803
|
+
*/
|
|
14804
|
+
var NcConfirmSchema = object({
|
|
14805
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14806
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14807
|
+
enabled: boolean().default(false),
|
|
14808
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14809
|
+
profileId: string().optional(),
|
|
14810
|
+
/**
|
|
14811
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14812
|
+
* from the rule (its class and its expectation).
|
|
14813
|
+
*
|
|
14814
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14815
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14816
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14817
|
+
* turn and only rule-authored words land here.
|
|
14818
|
+
*/
|
|
14819
|
+
prompt: string().max(1e3).optional(),
|
|
14820
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14821
|
+
* own boolean verdict decides. */
|
|
14822
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14823
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14824
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14825
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14826
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14827
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14828
|
+
});
|
|
14523
14829
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14524
14830
|
var NcRuleInputSchema = object({
|
|
14525
14831
|
name: string().min(1).max(200),
|
|
@@ -14580,7 +14886,13 @@ var NcRuleInputSchema = object({
|
|
|
14580
14886
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14581
14887
|
* shape as every other actuation.
|
|
14582
14888
|
*/
|
|
14583
|
-
actions: NcRuleActionsSchema.optional()
|
|
14889
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14890
|
+
/**
|
|
14891
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14892
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14893
|
+
* did, and absent is the only way to say that without a migration.
|
|
14894
|
+
*/
|
|
14895
|
+
confirm: NcConfirmSchema.optional()
|
|
14584
14896
|
});
|
|
14585
14897
|
/**
|
|
14586
14898
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14591,7 +14903,37 @@ var NcRuleInputSchema = object({
|
|
|
14591
14903
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14592
14904
|
* `updateRule` patch.
|
|
14593
14905
|
*/
|
|
14594
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14906
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14907
|
+
disabledTargetIds: array(string()).optional(),
|
|
14908
|
+
/**
|
|
14909
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14910
|
+
*
|
|
14911
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14912
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14913
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14914
|
+
* one — which made every partial edit destructive:
|
|
14915
|
+
*
|
|
14916
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14917
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14918
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14919
|
+
*
|
|
14920
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14921
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14922
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14923
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14924
|
+
* within a minute of a two-field patch.
|
|
14925
|
+
*
|
|
14926
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14927
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14928
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14929
|
+
* absent key is now genuinely absent.
|
|
14930
|
+
*/
|
|
14931
|
+
enabled: boolean().optional(),
|
|
14932
|
+
conditions: NcConditionsSchema.optional(),
|
|
14933
|
+
media: NcMediaPolicySchema.optional(),
|
|
14934
|
+
throttle: NcThrottleSchema.optional(),
|
|
14935
|
+
priority: number().int().min(1).max(5).optional()
|
|
14936
|
+
});
|
|
14595
14937
|
/** A persisted rule. */
|
|
14596
14938
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14597
14939
|
id: string(),
|
|
@@ -14892,6 +15234,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14892
15234
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14893
15235
|
* copy would lie the first time a rule is disabled.
|
|
14894
15236
|
*/
|
|
15237
|
+
/**
|
|
15238
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15239
|
+
*
|
|
15240
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15241
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15242
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15243
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15244
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15245
|
+
* with the switches the operator actually used.
|
|
15246
|
+
*/
|
|
15247
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15248
|
+
"muted",
|
|
15249
|
+
"detection-off",
|
|
15250
|
+
"offline"
|
|
15251
|
+
]);
|
|
15252
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15253
|
+
deviceId: number().int(),
|
|
15254
|
+
reason: NcAlarmSkipReasonSchema
|
|
15255
|
+
});
|
|
14895
15256
|
var NcAlarmModeCoverageSchema = object({
|
|
14896
15257
|
mode: AlarmArmModeSchema,
|
|
14897
15258
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14899,7 +15260,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14899
15260
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14900
15261
|
allDevices: boolean(),
|
|
14901
15262
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14902
|
-
deviceIds: array(number().int())
|
|
15263
|
+
deviceIds: array(number().int()),
|
|
15264
|
+
/**
|
|
15265
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15266
|
+
* excludes it.
|
|
15267
|
+
*
|
|
15268
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15269
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15270
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15271
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15272
|
+
* alarm tab.
|
|
15273
|
+
*/
|
|
15274
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14903
15275
|
});
|
|
14904
15276
|
var NcAlarmConfigSchema = object({
|
|
14905
15277
|
/**
|
|
@@ -16262,13 +16634,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16262
16634
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16263
16635
|
kind: "mutation",
|
|
16264
16636
|
auth: "admin"
|
|
16265
|
-
}), method(
|
|
16637
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16266
16638
|
kind: "mutation",
|
|
16267
16639
|
auth: "admin"
|
|
16268
|
-
}), method(object({
|
|
16269
|
-
kind: "
|
|
16640
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16641
|
+
kind: "mutation",
|
|
16270
16642
|
auth: "admin"
|
|
16271
|
-
}), method(
|
|
16643
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16644
|
+
kind: "mutation",
|
|
16645
|
+
auth: "admin"
|
|
16646
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16647
|
+
kind: "mutation",
|
|
16648
|
+
auth: "admin"
|
|
16649
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16272
16650
|
kind: "mutation",
|
|
16273
16651
|
auth: "admin"
|
|
16274
16652
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17725,9 +18103,16 @@ var CameraStatusSchema = object({
|
|
|
17725
18103
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17726
18104
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17727
18105
|
/**
|
|
17728
|
-
* Per-camera
|
|
18106
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17729
18107
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17730
18108
|
*
|
|
18109
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18110
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18111
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18112
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18113
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18114
|
+
* the difference between a camera being off and a camera being dead.
|
|
18115
|
+
*
|
|
17731
18116
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17732
18117
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17733
18118
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17798,7 +18183,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17798
18183
|
reachable: boolean(),
|
|
17799
18184
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17800
18185
|
});
|
|
17801
|
-
method(object({
|
|
18186
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18187
|
+
kind: "mutation",
|
|
18188
|
+
auth: "admin"
|
|
18189
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18190
|
+
kind: "mutation",
|
|
18191
|
+
auth: "admin"
|
|
18192
|
+
}), method(object({
|
|
17802
18193
|
deviceId: number(),
|
|
17803
18194
|
agentNodeId: string()
|
|
17804
18195
|
}), object({ success: literal(true) }), {
|
|
@@ -18472,6 +18863,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18472
18863
|
locationId: string(),
|
|
18473
18864
|
targetBytes: number().int().positive()
|
|
18474
18865
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18866
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18867
|
+
kind: "mutation",
|
|
18868
|
+
auth: "admin"
|
|
18869
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18870
|
+
kind: "mutation",
|
|
18871
|
+
auth: "admin"
|
|
18872
|
+
});
|
|
18475
18873
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18476
18874
|
providerId: string().min(1),
|
|
18477
18875
|
displayName: string().min(1),
|
|
@@ -18575,6 +18973,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18575
18973
|
label: string(),
|
|
18576
18974
|
description: string().optional()
|
|
18577
18975
|
});
|
|
18976
|
+
/**
|
|
18977
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18978
|
+
* an instance declares a camera.
|
|
18979
|
+
*/
|
|
18980
|
+
var TerminalInstanceInfoSchema = object({
|
|
18981
|
+
instanceId: string(),
|
|
18982
|
+
cameraStableId: string(),
|
|
18983
|
+
nodeId: string(),
|
|
18984
|
+
profileId: string(),
|
|
18985
|
+
profileLabel: string(),
|
|
18986
|
+
name: string(),
|
|
18987
|
+
enabled: boolean()
|
|
18988
|
+
});
|
|
18989
|
+
var TerminalLegacyCameraSchema = object({
|
|
18990
|
+
stableId: string(),
|
|
18991
|
+
nodeId: string(),
|
|
18992
|
+
profileId: string(),
|
|
18993
|
+
profileLabel: string(),
|
|
18994
|
+
name: string(),
|
|
18995
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18996
|
+
adoptable: boolean()
|
|
18997
|
+
});
|
|
18578
18998
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18579
18999
|
seq: number().int().positive(),
|
|
18580
19000
|
kind: literal("data"),
|
|
@@ -18591,7 +19011,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18591
19011
|
snapshot: string().optional(),
|
|
18592
19012
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18593
19013
|
});
|
|
18594
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19014
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19015
|
+
targetNodeId: string().min(1),
|
|
19016
|
+
profileId: string().min(1),
|
|
19017
|
+
name: string().trim().min(1).max(160).optional()
|
|
19018
|
+
}), TerminalInstanceInfoSchema, {
|
|
19019
|
+
kind: "mutation",
|
|
19020
|
+
auth: "admin"
|
|
19021
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19022
|
+
kind: "mutation",
|
|
19023
|
+
auth: "admin"
|
|
19024
|
+
}), method(object({
|
|
19025
|
+
instanceId: string().min(1),
|
|
19026
|
+
enabled: boolean()
|
|
19027
|
+
}), TerminalInstanceInfoSchema, {
|
|
19028
|
+
kind: "mutation",
|
|
19029
|
+
auth: "admin"
|
|
19030
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19031
|
+
stableId: string().min(1),
|
|
19032
|
+
name: string().trim().min(1).max(160).optional()
|
|
19033
|
+
}), TerminalInstanceInfoSchema, {
|
|
19034
|
+
kind: "mutation",
|
|
19035
|
+
auth: "admin"
|
|
19036
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18595
19037
|
profileId: string(),
|
|
18596
19038
|
cols: number().int().positive(),
|
|
18597
19039
|
rows: number().int().positive()
|
|
@@ -18608,7 +19050,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18608
19050
|
}), method(object({
|
|
18609
19051
|
sessionId: string(),
|
|
18610
19052
|
afterSeq: number().int().nonnegative(),
|
|
18611
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19053
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19054
|
+
/**
|
|
19055
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19056
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19057
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19058
|
+
*/
|
|
19059
|
+
waitForOutput: boolean().optional()
|
|
18612
19060
|
}), TerminalOutputBatchSchema, {
|
|
18613
19061
|
kind: "mutation",
|
|
18614
19062
|
auth: "admin",
|
|
@@ -21106,6 +21554,7 @@ var FaceInfoSchema = object({
|
|
|
21106
21554
|
var FaceFilterEnum = _enum([
|
|
21107
21555
|
"unassigned",
|
|
21108
21556
|
"recognized",
|
|
21557
|
+
"identified",
|
|
21109
21558
|
"all"
|
|
21110
21559
|
]);
|
|
21111
21560
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21134,6 +21583,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21134
21583
|
kind: "mutation",
|
|
21135
21584
|
auth: "admin"
|
|
21136
21585
|
}), method(object({
|
|
21586
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21587
|
+
deviceId: number().int().optional(),
|
|
21137
21588
|
limit: number().int().positive().optional(),
|
|
21138
21589
|
filter: FaceFilterEnum.optional(),
|
|
21139
21590
|
/**
|
|
@@ -23363,6 +23814,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23363
23814
|
capName: string().min(1).max(64),
|
|
23364
23815
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23365
23816
|
valuePath: string().min(1).max(64)
|
|
23817
|
+
}),
|
|
23818
|
+
object({
|
|
23819
|
+
kind: literal("latest-recognition"),
|
|
23820
|
+
recognition: _enum(["person", "plate"])
|
|
23366
23821
|
})
|
|
23367
23822
|
]);
|
|
23368
23823
|
var OsdSlotBindingSchema = object({
|
|
@@ -23468,6 +23923,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23468
23923
|
}), object({ success: literal(true) }), {
|
|
23469
23924
|
kind: "mutation",
|
|
23470
23925
|
auth: "admin"
|
|
23926
|
+
}), method(object({
|
|
23927
|
+
sourceDeviceId: number().int(),
|
|
23928
|
+
targetDeviceId: number().int()
|
|
23929
|
+
}), object({
|
|
23930
|
+
copied: number().int().nonnegative(),
|
|
23931
|
+
skipped: number().int().nonnegative()
|
|
23932
|
+
}), {
|
|
23933
|
+
kind: "mutation",
|
|
23934
|
+
auth: "admin"
|
|
23471
23935
|
}), method(object({
|
|
23472
23936
|
deviceId: number().int(),
|
|
23473
23937
|
slotId: string().min(1),
|
|
@@ -24390,7 +24854,19 @@ var RecordingManifestSchema = object({
|
|
|
24390
24854
|
* profiles/subtrees/locations on this node). */
|
|
24391
24855
|
var RecordingDeviceUsageSchema = object({
|
|
24392
24856
|
deviceId: number(),
|
|
24393
|
-
usedBytes: number()
|
|
24857
|
+
usedBytes: number(),
|
|
24858
|
+
/**
|
|
24859
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
24860
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
24861
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
24862
|
+
*
|
|
24863
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
24864
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
24865
|
+
* field must keep validating that older provider's payload: the framework
|
|
24866
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
24867
|
+
* the later of the two.
|
|
24868
|
+
*/
|
|
24869
|
+
oldestMs: number().nullable().optional()
|
|
24394
24870
|
});
|
|
24395
24871
|
/** Recording storage usage + capacity for one storage location. */
|
|
24396
24872
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24418,6 +24894,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24418
24894
|
locations: array(RecordingLocationUsageSchema)
|
|
24419
24895
|
});
|
|
24420
24896
|
/**
|
|
24897
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
24898
|
+
*
|
|
24899
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
24900
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
24901
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
24902
|
+
* location, run FIFO behind the single-flight mover.
|
|
24903
|
+
*
|
|
24904
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
24905
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
24906
|
+
* (empty on the plan).
|
|
24907
|
+
*/
|
|
24908
|
+
var RecordingRebalanceMoveSchema = object({
|
|
24909
|
+
deviceId: number(),
|
|
24910
|
+
profile: string(),
|
|
24911
|
+
fromLocationId: string(),
|
|
24912
|
+
toLocationId: string(),
|
|
24913
|
+
bytes: number(),
|
|
24914
|
+
files: number().int()
|
|
24915
|
+
});
|
|
24916
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
24917
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
24918
|
+
* that had nothing to do. */
|
|
24919
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
24920
|
+
"unassigned",
|
|
24921
|
+
"target-not-writable",
|
|
24922
|
+
"below-threshold",
|
|
24923
|
+
"no-headroom"
|
|
24924
|
+
]);
|
|
24925
|
+
var RecordingRebalanceSkipSchema = object({
|
|
24926
|
+
deviceId: number(),
|
|
24927
|
+
profile: string(),
|
|
24928
|
+
fromLocationId: string(),
|
|
24929
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
24930
|
+
toLocationId: string().nullable(),
|
|
24931
|
+
bytes: number(),
|
|
24932
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
24933
|
+
});
|
|
24934
|
+
var RecordingRebalancePlanSchema = object({
|
|
24935
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
24936
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
24937
|
+
bytesToMove: number(),
|
|
24938
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
24939
|
+
jobIds: array(string())
|
|
24940
|
+
});
|
|
24941
|
+
var RecordingRebalanceInputSchema = object({
|
|
24942
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
24943
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
24944
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
24945
|
+
minMoveGb: number().min(0).optional()
|
|
24946
|
+
});
|
|
24947
|
+
/**
|
|
24421
24948
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24422
24949
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24423
24950
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24565,6 +25092,21 @@ method(object({
|
|
|
24565
25092
|
}), {
|
|
24566
25093
|
kind: "mutation",
|
|
24567
25094
|
auth: "admin"
|
|
25095
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25096
|
+
kind: "mutation",
|
|
25097
|
+
auth: "admin"
|
|
25098
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25099
|
+
kind: "mutation",
|
|
25100
|
+
auth: "admin"
|
|
25101
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25102
|
+
kind: "mutation",
|
|
25103
|
+
auth: "admin"
|
|
25104
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25105
|
+
kind: "mutation",
|
|
25106
|
+
auth: "admin"
|
|
25107
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25108
|
+
kind: "mutation",
|
|
25109
|
+
auth: "admin"
|
|
24568
25110
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24569
25111
|
kind: "mutation",
|
|
24570
25112
|
auth: "admin"
|
|
@@ -24574,9 +25116,15 @@ method(object({
|
|
|
24574
25116
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24575
25117
|
kind: "mutation",
|
|
24576
25118
|
auth: "admin"
|
|
25119
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25120
|
+
kind: "query",
|
|
25121
|
+
auth: "admin"
|
|
25122
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25123
|
+
kind: "mutation",
|
|
25124
|
+
auth: "admin"
|
|
24577
25125
|
});
|
|
24578
25126
|
/**
|
|
24579
|
-
* `
|
|
25127
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24580
25128
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24581
25129
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24582
25130
|
* delete-after-download.
|
|
@@ -24591,10 +25139,42 @@ method(object({
|
|
|
24591
25139
|
*/
|
|
24592
25140
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24593
25141
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25142
|
+
/**
|
|
25143
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25144
|
+
*
|
|
25145
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25146
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25147
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25148
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25149
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25150
|
+
*/
|
|
25151
|
+
var ExportDenseRangeSchema = object({
|
|
25152
|
+
fromSec: number().nonnegative(),
|
|
25153
|
+
toSec: number().nonnegative()
|
|
25154
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25155
|
+
/**
|
|
25156
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25157
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25158
|
+
*
|
|
25159
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25160
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25161
|
+
*/
|
|
25162
|
+
var ExportDenseSchema = object({
|
|
25163
|
+
everyMs: number().int().positive(),
|
|
25164
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25165
|
+
});
|
|
24594
25166
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24595
25167
|
var ExportTimelapseSchema = object({
|
|
24596
25168
|
everyMs: number().int().positive(),
|
|
24597
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25169
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25170
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25171
|
+
dense: ExportDenseSchema.optional()
|
|
25172
|
+
}).superRefine((v, ctx) => {
|
|
25173
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25174
|
+
code: ZodIssueCode.custom,
|
|
25175
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25176
|
+
path: ["dense", "everyMs"]
|
|
25177
|
+
});
|
|
24598
25178
|
});
|
|
24599
25179
|
/**
|
|
24600
25180
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24652,6 +25232,19 @@ var ExportDownloadSchema = object({
|
|
|
24652
25232
|
url: string(),
|
|
24653
25233
|
endpoints: array(string())
|
|
24654
25234
|
});
|
|
25235
|
+
/**
|
|
25236
|
+
* A finished export's bytes, inline.
|
|
25237
|
+
*
|
|
25238
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25239
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25240
|
+
*/
|
|
25241
|
+
var ExportBytesSchema = object({
|
|
25242
|
+
base64: string(),
|
|
25243
|
+
contentType: string(),
|
|
25244
|
+
/** Suggested filename, extension included. */
|
|
25245
|
+
name: string(),
|
|
25246
|
+
bytes: number().int().nonnegative()
|
|
25247
|
+
});
|
|
24655
25248
|
method(object({
|
|
24656
25249
|
deviceId: number(),
|
|
24657
25250
|
profile: string(),
|
|
@@ -24676,6 +25269,9 @@ method(object({
|
|
|
24676
25269
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24677
25270
|
kind: "query",
|
|
24678
25271
|
auth: "protected"
|
|
25272
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25273
|
+
kind: "query",
|
|
25274
|
+
auth: "protected"
|
|
24679
25275
|
});
|
|
24680
25276
|
/**
|
|
24681
25277
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30177,6 +30773,12 @@ Object.freeze({
|
|
|
30177
30773
|
addonId: null,
|
|
30178
30774
|
access: "delete"
|
|
30179
30775
|
},
|
|
30776
|
+
"osdManager.copyDeviceConfiguration": {
|
|
30777
|
+
capName: "osd-manager",
|
|
30778
|
+
capScope: "system",
|
|
30779
|
+
addonId: null,
|
|
30780
|
+
access: "create"
|
|
30781
|
+
},
|
|
30180
30782
|
"osdManager.getConditionSupport": {
|
|
30181
30783
|
capName: "osd-manager",
|
|
30182
30784
|
capScope: "system",
|
|
@@ -30273,7 +30875,7 @@ Object.freeze({
|
|
|
30273
30875
|
addonId: null,
|
|
30274
30876
|
access: "create"
|
|
30275
30877
|
},
|
|
30276
|
-
"pipelineAnalytics.
|
|
30878
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30277
30879
|
capName: "pipeline-analytics",
|
|
30278
30880
|
capScope: "device",
|
|
30279
30881
|
addonId: null,
|
|
@@ -30345,12 +30947,6 @@ Object.freeze({
|
|
|
30345
30947
|
addonId: null,
|
|
30346
30948
|
access: "view"
|
|
30347
30949
|
},
|
|
30348
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30349
|
-
capName: "pipeline-analytics",
|
|
30350
|
-
capScope: "device",
|
|
30351
|
-
addonId: null,
|
|
30352
|
-
access: "view"
|
|
30353
|
-
},
|
|
30354
30950
|
"pipelineAnalytics.getMotionEvents": {
|
|
30355
30951
|
capName: "pipeline-analytics",
|
|
30356
30952
|
capScope: "device",
|
|
@@ -30387,6 +30983,12 @@ Object.freeze({
|
|
|
30387
30983
|
addonId: null,
|
|
30388
30984
|
access: "view"
|
|
30389
30985
|
},
|
|
30986
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
30987
|
+
capName: "pipeline-analytics",
|
|
30988
|
+
capScope: "device",
|
|
30989
|
+
addonId: null,
|
|
30990
|
+
access: "view"
|
|
30991
|
+
},
|
|
30390
30992
|
"pipelineAnalytics.getTrack": {
|
|
30391
30993
|
capName: "pipeline-analytics",
|
|
30392
30994
|
capScope: "device",
|
|
@@ -30465,6 +31067,12 @@ Object.freeze({
|
|
|
30465
31067
|
addonId: null,
|
|
30466
31068
|
access: "view"
|
|
30467
31069
|
},
|
|
31070
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31071
|
+
capName: "pipeline-analytics",
|
|
31072
|
+
capScope: "device",
|
|
31073
|
+
addonId: null,
|
|
31074
|
+
access: "create"
|
|
31075
|
+
},
|
|
30468
31076
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30469
31077
|
capName: "pipeline-analytics",
|
|
30470
31078
|
capScope: "device",
|
|
@@ -30495,7 +31103,7 @@ Object.freeze({
|
|
|
30495
31103
|
addonId: null,
|
|
30496
31104
|
access: "create"
|
|
30497
31105
|
},
|
|
30498
|
-
"pipelineAnalytics.
|
|
31106
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30499
31107
|
capName: "pipeline-analytics",
|
|
30500
31108
|
capScope: "device",
|
|
30501
31109
|
addonId: null,
|
|
@@ -30507,6 +31115,12 @@ Object.freeze({
|
|
|
30507
31115
|
addonId: null,
|
|
30508
31116
|
access: "create"
|
|
30509
31117
|
},
|
|
31118
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31119
|
+
capName: "pipeline-analytics",
|
|
31120
|
+
capScope: "device",
|
|
31121
|
+
addonId: null,
|
|
31122
|
+
access: "create"
|
|
31123
|
+
},
|
|
30510
31124
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30511
31125
|
capName: "pipeline-analytics",
|
|
30512
31126
|
capScope: "device",
|
|
@@ -30531,6 +31145,12 @@ Object.freeze({
|
|
|
30531
31145
|
addonId: null,
|
|
30532
31146
|
access: "create"
|
|
30533
31147
|
},
|
|
31148
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31149
|
+
capName: "pipeline-analytics",
|
|
31150
|
+
capScope: "device",
|
|
31151
|
+
addonId: null,
|
|
31152
|
+
access: "create"
|
|
31153
|
+
},
|
|
30534
31154
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30535
31155
|
capName: "pipeline-analytics",
|
|
30536
31156
|
capScope: "device",
|
|
@@ -30897,6 +31517,12 @@ Object.freeze({
|
|
|
30897
31517
|
addonId: null,
|
|
30898
31518
|
access: "view"
|
|
30899
31519
|
},
|
|
31520
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31521
|
+
capName: "pipeline-orchestrator",
|
|
31522
|
+
capScope: "system",
|
|
31523
|
+
addonId: null,
|
|
31524
|
+
access: "create"
|
|
31525
|
+
},
|
|
30900
31526
|
"pipelineOrchestrator.rebalance": {
|
|
30901
31527
|
capName: "pipeline-orchestrator",
|
|
30902
31528
|
capScope: "system",
|
|
@@ -30921,6 +31547,12 @@ Object.freeze({
|
|
|
30921
31547
|
addonId: null,
|
|
30922
31548
|
access: "view"
|
|
30923
31549
|
},
|
|
31550
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31551
|
+
capName: "pipeline-orchestrator",
|
|
31552
|
+
capScope: "system",
|
|
31553
|
+
addonId: null,
|
|
31554
|
+
access: "create"
|
|
31555
|
+
},
|
|
30924
31556
|
"pipelineOrchestrator.saveTemplate": {
|
|
30925
31557
|
capName: "pipeline-orchestrator",
|
|
30926
31558
|
capScope: "system",
|
|
@@ -31317,7 +31949,13 @@ Object.freeze({
|
|
|
31317
31949
|
addonId: null,
|
|
31318
31950
|
access: "create"
|
|
31319
31951
|
},
|
|
31320
|
-
"recording.
|
|
31952
|
+
"recording.cancelRelocateJob": {
|
|
31953
|
+
capName: "recording",
|
|
31954
|
+
capScope: "system",
|
|
31955
|
+
addonId: null,
|
|
31956
|
+
access: "create"
|
|
31957
|
+
},
|
|
31958
|
+
"recording.cancelStorageMigrationMove": {
|
|
31321
31959
|
capName: "recording",
|
|
31322
31960
|
capScope: "system",
|
|
31323
31961
|
addonId: null,
|
|
@@ -31353,7 +31991,7 @@ Object.freeze({
|
|
|
31353
31991
|
addonId: null,
|
|
31354
31992
|
access: "view"
|
|
31355
31993
|
},
|
|
31356
|
-
"recording.
|
|
31994
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31357
31995
|
capName: "recording",
|
|
31358
31996
|
capScope: "system",
|
|
31359
31997
|
addonId: null,
|
|
@@ -31371,12 +32009,30 @@ Object.freeze({
|
|
|
31371
32009
|
addonId: null,
|
|
31372
32010
|
access: "view"
|
|
31373
32011
|
},
|
|
32012
|
+
"recording.listRelocateJobs": {
|
|
32013
|
+
capName: "recording",
|
|
32014
|
+
capScope: "system",
|
|
32015
|
+
addonId: null,
|
|
32016
|
+
access: "view"
|
|
32017
|
+
},
|
|
31374
32018
|
"recording.locateSegment": {
|
|
31375
32019
|
capName: "recording",
|
|
31376
32020
|
capScope: "system",
|
|
31377
32021
|
addonId: null,
|
|
31378
32022
|
access: "view"
|
|
31379
32023
|
},
|
|
32024
|
+
"recording.pauseForStorageMigration": {
|
|
32025
|
+
capName: "recording",
|
|
32026
|
+
capScope: "system",
|
|
32027
|
+
addonId: null,
|
|
32028
|
+
access: "create"
|
|
32029
|
+
},
|
|
32030
|
+
"recording.planStorageRebalance": {
|
|
32031
|
+
capName: "recording",
|
|
32032
|
+
capScope: "system",
|
|
32033
|
+
addonId: null,
|
|
32034
|
+
access: "view"
|
|
32035
|
+
},
|
|
31380
32036
|
"recording.pruneFootage": {
|
|
31381
32037
|
capName: "recording",
|
|
31382
32038
|
capScope: "system",
|
|
@@ -31395,6 +32051,12 @@ Object.freeze({
|
|
|
31395
32051
|
addonId: null,
|
|
31396
32052
|
access: "view"
|
|
31397
32053
|
},
|
|
32054
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32055
|
+
capName: "recording",
|
|
32056
|
+
capScope: "system",
|
|
32057
|
+
addonId: null,
|
|
32058
|
+
access: "create"
|
|
32059
|
+
},
|
|
31398
32060
|
"recording.relocateFootage": {
|
|
31399
32061
|
capName: "recording",
|
|
31400
32062
|
capScope: "system",
|
|
@@ -31419,44 +32081,68 @@ Object.freeze({
|
|
|
31419
32081
|
addonId: null,
|
|
31420
32082
|
access: "create"
|
|
31421
32083
|
},
|
|
32084
|
+
"recording.resumeForStorageMigration": {
|
|
32085
|
+
capName: "recording",
|
|
32086
|
+
capScope: "system",
|
|
32087
|
+
addonId: null,
|
|
32088
|
+
access: "create"
|
|
32089
|
+
},
|
|
31422
32090
|
"recording.setDeviceConfig": {
|
|
31423
32091
|
capName: "recording",
|
|
31424
32092
|
capScope: "system",
|
|
31425
32093
|
addonId: null,
|
|
31426
32094
|
access: "create"
|
|
31427
32095
|
},
|
|
32096
|
+
"recording.startStorageMigrationMove": {
|
|
32097
|
+
capName: "recording",
|
|
32098
|
+
capScope: "system",
|
|
32099
|
+
addonId: null,
|
|
32100
|
+
access: "create"
|
|
32101
|
+
},
|
|
32102
|
+
"recording.startStorageRebalance": {
|
|
32103
|
+
capName: "recording",
|
|
32104
|
+
capScope: "system",
|
|
32105
|
+
addonId: null,
|
|
32106
|
+
access: "create"
|
|
32107
|
+
},
|
|
31428
32108
|
"recordingExport.cancelExport": {
|
|
31429
|
-
capName: "
|
|
32109
|
+
capName: "recording-export",
|
|
31430
32110
|
capScope: "system",
|
|
31431
32111
|
addonId: null,
|
|
31432
32112
|
access: "create"
|
|
31433
32113
|
},
|
|
31434
32114
|
"recordingExport.createExport": {
|
|
31435
|
-
capName: "
|
|
32115
|
+
capName: "recording-export",
|
|
31436
32116
|
capScope: "system",
|
|
31437
32117
|
addonId: null,
|
|
31438
32118
|
access: "create"
|
|
31439
32119
|
},
|
|
31440
32120
|
"recordingExport.deleteExport": {
|
|
31441
|
-
capName: "
|
|
32121
|
+
capName: "recording-export",
|
|
31442
32122
|
capScope: "system",
|
|
31443
32123
|
addonId: null,
|
|
31444
32124
|
access: "delete"
|
|
31445
32125
|
},
|
|
31446
32126
|
"recordingExport.getDownloadUrl": {
|
|
31447
|
-
capName: "
|
|
32127
|
+
capName: "recording-export",
|
|
31448
32128
|
capScope: "system",
|
|
31449
32129
|
addonId: null,
|
|
31450
32130
|
access: "view"
|
|
31451
32131
|
},
|
|
31452
32132
|
"recordingExport.getExport": {
|
|
31453
|
-
capName: "
|
|
32133
|
+
capName: "recording-export",
|
|
31454
32134
|
capScope: "system",
|
|
31455
32135
|
addonId: null,
|
|
31456
32136
|
access: "view"
|
|
31457
32137
|
},
|
|
31458
32138
|
"recordingExport.listExports": {
|
|
31459
|
-
capName: "
|
|
32139
|
+
capName: "recording-export",
|
|
32140
|
+
capScope: "system",
|
|
32141
|
+
addonId: null,
|
|
32142
|
+
access: "view"
|
|
32143
|
+
},
|
|
32144
|
+
"recordingExport.readExportBytes": {
|
|
32145
|
+
capName: "recording-export",
|
|
31460
32146
|
capScope: "system",
|
|
31461
32147
|
addonId: null,
|
|
31462
32148
|
access: "view"
|
|
@@ -31815,6 +32501,30 @@ Object.freeze({
|
|
|
31815
32501
|
addonId: null,
|
|
31816
32502
|
access: "view"
|
|
31817
32503
|
},
|
|
32504
|
+
"storageMigration.cancel": {
|
|
32505
|
+
capName: "storage-migration",
|
|
32506
|
+
capScope: "system",
|
|
32507
|
+
addonId: null,
|
|
32508
|
+
access: "create"
|
|
32509
|
+
},
|
|
32510
|
+
"storageMigration.plan": {
|
|
32511
|
+
capName: "storage-migration",
|
|
32512
|
+
capScope: "system",
|
|
32513
|
+
addonId: null,
|
|
32514
|
+
access: "view"
|
|
32515
|
+
},
|
|
32516
|
+
"storageMigration.start": {
|
|
32517
|
+
capName: "storage-migration",
|
|
32518
|
+
capScope: "system",
|
|
32519
|
+
addonId: null,
|
|
32520
|
+
access: "create"
|
|
32521
|
+
},
|
|
32522
|
+
"storageMigration.status": {
|
|
32523
|
+
capName: "storage-migration",
|
|
32524
|
+
capScope: "system",
|
|
32525
|
+
addonId: null,
|
|
32526
|
+
access: "view"
|
|
32527
|
+
},
|
|
31818
32528
|
"storageProvider.abortUpload": {
|
|
31819
32529
|
capName: "storage-provider",
|
|
31820
32530
|
capScope: "system",
|
|
@@ -32193,12 +32903,42 @@ Object.freeze({
|
|
|
32193
32903
|
addonId: null,
|
|
32194
32904
|
access: "create"
|
|
32195
32905
|
},
|
|
32906
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
32907
|
+
capName: "terminal-session",
|
|
32908
|
+
capScope: "system",
|
|
32909
|
+
addonId: null,
|
|
32910
|
+
access: "create"
|
|
32911
|
+
},
|
|
32196
32912
|
"terminalSession.close": {
|
|
32197
32913
|
capName: "terminal-session",
|
|
32198
32914
|
capScope: "system",
|
|
32199
32915
|
addonId: null,
|
|
32200
32916
|
access: "create"
|
|
32201
32917
|
},
|
|
32918
|
+
"terminalSession.createInstance": {
|
|
32919
|
+
capName: "terminal-session",
|
|
32920
|
+
capScope: "system",
|
|
32921
|
+
addonId: null,
|
|
32922
|
+
access: "create"
|
|
32923
|
+
},
|
|
32924
|
+
"terminalSession.deleteInstance": {
|
|
32925
|
+
capName: "terminal-session",
|
|
32926
|
+
capScope: "system",
|
|
32927
|
+
addonId: null,
|
|
32928
|
+
access: "delete"
|
|
32929
|
+
},
|
|
32930
|
+
"terminalSession.listInstances": {
|
|
32931
|
+
capName: "terminal-session",
|
|
32932
|
+
capScope: "system",
|
|
32933
|
+
addonId: null,
|
|
32934
|
+
access: "view"
|
|
32935
|
+
},
|
|
32936
|
+
"terminalSession.listLegacyCameras": {
|
|
32937
|
+
capName: "terminal-session",
|
|
32938
|
+
capScope: "system",
|
|
32939
|
+
addonId: null,
|
|
32940
|
+
access: "view"
|
|
32941
|
+
},
|
|
32202
32942
|
"terminalSession.listProfiles": {
|
|
32203
32943
|
capName: "terminal-session",
|
|
32204
32944
|
capScope: "system",
|
|
@@ -32229,6 +32969,12 @@ Object.freeze({
|
|
|
32229
32969
|
addonId: null,
|
|
32230
32970
|
access: "create"
|
|
32231
32971
|
},
|
|
32972
|
+
"terminalSession.setInstanceEnabled": {
|
|
32973
|
+
capName: "terminal-session",
|
|
32974
|
+
capScope: "system",
|
|
32975
|
+
addonId: null,
|
|
32976
|
+
access: "create"
|
|
32977
|
+
},
|
|
32232
32978
|
"terminalSession.writeInput": {
|
|
32233
32979
|
capName: "terminal-session",
|
|
32234
32980
|
capScope: "system",
|
|
@@ -32773,6 +33519,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
32773
33519
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
32774
33520
|
var PriorityField = number().int().min(1).max(5);
|
|
32775
33521
|
/**
|
|
33522
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33523
|
+
*
|
|
33524
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33525
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33526
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33527
|
+
*
|
|
33528
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33529
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33530
|
+
*
|
|
33531
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33532
|
+
*
|
|
33533
|
+
* 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.
|
|
33534
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33535
|
+
* and therefore the length of a quiet night, does not move.
|
|
33536
|
+
*
|
|
33537
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33538
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33539
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33540
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33541
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33542
|
+
*/
|
|
33543
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33544
|
+
/**
|
|
33545
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33546
|
+
*
|
|
33547
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33548
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33549
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33550
|
+
* that range every ~583 ms.
|
|
33551
|
+
*
|
|
33552
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33553
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33554
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33555
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33556
|
+
* schema change and are the tracked follow-up.
|
|
33557
|
+
*
|
|
33558
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33559
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33560
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33561
|
+
* happened.
|
|
33562
|
+
*/
|
|
33563
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33564
|
+
/**
|
|
33565
|
+
* Caption burned into the notification's preview frame.
|
|
33566
|
+
*
|
|
33567
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33568
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33569
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33570
|
+
*
|
|
33571
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33572
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33573
|
+
* the reason this is not `.min(1)`.
|
|
33574
|
+
*/
|
|
33575
|
+
var PreviewTextField = string().max(200);
|
|
33576
|
+
/**
|
|
33577
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33578
|
+
*
|
|
33579
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33580
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33581
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33582
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33583
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33584
|
+
* them.
|
|
33585
|
+
*
|
|
33586
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33587
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33588
|
+
* paying that on the deploy that shipped it.
|
|
33589
|
+
*
|
|
33590
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33591
|
+
*/
|
|
33592
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33593
|
+
/**
|
|
33594
|
+
* Which detection classes the notification reports counts for.
|
|
33595
|
+
*
|
|
33596
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33597
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33598
|
+
* class the window actually contained", which is what an operator who never
|
|
33599
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33600
|
+
* counts cars all night).
|
|
33601
|
+
*
|
|
33602
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33603
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33604
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33605
|
+
* not emit.
|
|
33606
|
+
*
|
|
33607
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33608
|
+
* - `{{detections}}` — total over the reported classes
|
|
33609
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33610
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33611
|
+
* one per class, `count_` + the class name
|
|
33612
|
+
*
|
|
33613
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33614
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33615
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33616
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33617
|
+
*/
|
|
33618
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33619
|
+
/**
|
|
32776
33620
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
32777
33621
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
32778
33622
|
* here (see the ownership note above).
|
|
@@ -32792,9 +33636,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
32792
33636
|
cadenceSec: CadenceSecField.default(15),
|
|
32793
33637
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
32794
33638
|
framerate: FramerateField.default(10),
|
|
33639
|
+
/**
|
|
33640
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33641
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33642
|
+
* field gets.
|
|
33643
|
+
*/
|
|
33644
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33645
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33646
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32795
33647
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
32796
33648
|
targets: TargetsField,
|
|
32797
33649
|
template: TimelapseTemplateSchema.optional(),
|
|
33650
|
+
/**
|
|
33651
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33652
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33653
|
+
*
|
|
33654
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33655
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33656
|
+
* silently clear the caption too.
|
|
33657
|
+
*/
|
|
33658
|
+
previewText: PreviewTextField.optional(),
|
|
33659
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33660
|
+
previewMode: PreviewModeField.default("image"),
|
|
33661
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33662
|
+
reportClasses: ReportClassesField.optional(),
|
|
32798
33663
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32799
33664
|
priority: PriorityField.default(3)
|
|
32800
33665
|
});
|
|
@@ -32805,8 +33670,13 @@ object({
|
|
|
32805
33670
|
schedule: NcScheduleSchema.optional(),
|
|
32806
33671
|
cadenceSec: CadenceSecField.optional(),
|
|
32807
33672
|
framerate: FramerateField.optional(),
|
|
33673
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33674
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32808
33675
|
targets: TargetsField.optional(),
|
|
32809
33676
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33677
|
+
previewText: PreviewTextField.optional(),
|
|
33678
|
+
previewMode: PreviewModeField.optional(),
|
|
33679
|
+
reportClasses: ReportClassesField.optional(),
|
|
32810
33680
|
priority: PriorityField.optional()
|
|
32811
33681
|
});
|
|
32812
33682
|
TimelapseRuleInputSchema.extend({
|
|
@@ -32818,10 +33688,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
32818
33688
|
*/
|
|
32819
33689
|
ownerUserId: string().optional(),
|
|
32820
33690
|
/**
|
|
32821
|
-
* Epoch-ms of the
|
|
32822
|
-
*
|
|
33691
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33692
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33693
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
32823
33694
|
*/
|
|
32824
33695
|
lastGeneratedAt: number().optional(),
|
|
33696
|
+
/**
|
|
33697
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33698
|
+
* re-generation guard's real durable state.
|
|
33699
|
+
*
|
|
33700
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33701
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33702
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33703
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33704
|
+
* come back.
|
|
33705
|
+
*
|
|
33706
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33707
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33708
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33709
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33710
|
+
* once, on the deploy that shipped the map.
|
|
33711
|
+
*/
|
|
33712
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
32825
33713
|
/** userId of the caller who created the rule (server-stamped). */
|
|
32826
33714
|
createdBy: string(),
|
|
32827
33715
|
createdAt: number(),
|