@camstack/addon-provider-unraid 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",
|
|
@@ -21123,6 +21571,7 @@ var FaceInfoSchema = object({
|
|
|
21123
21571
|
var FaceFilterEnum = _enum([
|
|
21124
21572
|
"unassigned",
|
|
21125
21573
|
"recognized",
|
|
21574
|
+
"identified",
|
|
21126
21575
|
"all"
|
|
21127
21576
|
]);
|
|
21128
21577
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21151,6 +21600,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21151
21600
|
kind: "mutation",
|
|
21152
21601
|
auth: "admin"
|
|
21153
21602
|
}), method(object({
|
|
21603
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21604
|
+
deviceId: number().int().optional(),
|
|
21154
21605
|
limit: number().int().positive().optional(),
|
|
21155
21606
|
filter: FaceFilterEnum.optional(),
|
|
21156
21607
|
/**
|
|
@@ -23380,6 +23831,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23380
23831
|
capName: string().min(1).max(64),
|
|
23381
23832
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23382
23833
|
valuePath: string().min(1).max(64)
|
|
23834
|
+
}),
|
|
23835
|
+
object({
|
|
23836
|
+
kind: literal("latest-recognition"),
|
|
23837
|
+
recognition: _enum(["person", "plate"])
|
|
23383
23838
|
})
|
|
23384
23839
|
]);
|
|
23385
23840
|
var OsdSlotBindingSchema = object({
|
|
@@ -23485,6 +23940,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23485
23940
|
}), object({ success: literal(true) }), {
|
|
23486
23941
|
kind: "mutation",
|
|
23487
23942
|
auth: "admin"
|
|
23943
|
+
}), method(object({
|
|
23944
|
+
sourceDeviceId: number().int(),
|
|
23945
|
+
targetDeviceId: number().int()
|
|
23946
|
+
}), object({
|
|
23947
|
+
copied: number().int().nonnegative(),
|
|
23948
|
+
skipped: number().int().nonnegative()
|
|
23949
|
+
}), {
|
|
23950
|
+
kind: "mutation",
|
|
23951
|
+
auth: "admin"
|
|
23488
23952
|
}), method(object({
|
|
23489
23953
|
deviceId: number().int(),
|
|
23490
23954
|
slotId: string().min(1),
|
|
@@ -24407,7 +24871,19 @@ var RecordingManifestSchema = object({
|
|
|
24407
24871
|
* profiles/subtrees/locations on this node). */
|
|
24408
24872
|
var RecordingDeviceUsageSchema = object({
|
|
24409
24873
|
deviceId: number(),
|
|
24410
|
-
usedBytes: number()
|
|
24874
|
+
usedBytes: number(),
|
|
24875
|
+
/**
|
|
24876
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
24877
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
24878
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
24879
|
+
*
|
|
24880
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
24881
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
24882
|
+
* field must keep validating that older provider's payload: the framework
|
|
24883
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
24884
|
+
* the later of the two.
|
|
24885
|
+
*/
|
|
24886
|
+
oldestMs: number().nullable().optional()
|
|
24411
24887
|
});
|
|
24412
24888
|
/** Recording storage usage + capacity for one storage location. */
|
|
24413
24889
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24435,6 +24911,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24435
24911
|
locations: array(RecordingLocationUsageSchema)
|
|
24436
24912
|
});
|
|
24437
24913
|
/**
|
|
24914
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
24915
|
+
*
|
|
24916
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
24917
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
24918
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
24919
|
+
* location, run FIFO behind the single-flight mover.
|
|
24920
|
+
*
|
|
24921
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
24922
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
24923
|
+
* (empty on the plan).
|
|
24924
|
+
*/
|
|
24925
|
+
var RecordingRebalanceMoveSchema = object({
|
|
24926
|
+
deviceId: number(),
|
|
24927
|
+
profile: string(),
|
|
24928
|
+
fromLocationId: string(),
|
|
24929
|
+
toLocationId: string(),
|
|
24930
|
+
bytes: number(),
|
|
24931
|
+
files: number().int()
|
|
24932
|
+
});
|
|
24933
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
24934
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
24935
|
+
* that had nothing to do. */
|
|
24936
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
24937
|
+
"unassigned",
|
|
24938
|
+
"target-not-writable",
|
|
24939
|
+
"below-threshold",
|
|
24940
|
+
"no-headroom"
|
|
24941
|
+
]);
|
|
24942
|
+
var RecordingRebalanceSkipSchema = object({
|
|
24943
|
+
deviceId: number(),
|
|
24944
|
+
profile: string(),
|
|
24945
|
+
fromLocationId: string(),
|
|
24946
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
24947
|
+
toLocationId: string().nullable(),
|
|
24948
|
+
bytes: number(),
|
|
24949
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
24950
|
+
});
|
|
24951
|
+
var RecordingRebalancePlanSchema = object({
|
|
24952
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
24953
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
24954
|
+
bytesToMove: number(),
|
|
24955
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
24956
|
+
jobIds: array(string())
|
|
24957
|
+
});
|
|
24958
|
+
var RecordingRebalanceInputSchema = object({
|
|
24959
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
24960
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
24961
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
24962
|
+
minMoveGb: number().min(0).optional()
|
|
24963
|
+
});
|
|
24964
|
+
/**
|
|
24438
24965
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24439
24966
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24440
24967
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24582,6 +25109,21 @@ method(object({
|
|
|
24582
25109
|
}), {
|
|
24583
25110
|
kind: "mutation",
|
|
24584
25111
|
auth: "admin"
|
|
25112
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25113
|
+
kind: "mutation",
|
|
25114
|
+
auth: "admin"
|
|
25115
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25116
|
+
kind: "mutation",
|
|
25117
|
+
auth: "admin"
|
|
25118
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25119
|
+
kind: "mutation",
|
|
25120
|
+
auth: "admin"
|
|
25121
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25122
|
+
kind: "mutation",
|
|
25123
|
+
auth: "admin"
|
|
25124
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25125
|
+
kind: "mutation",
|
|
25126
|
+
auth: "admin"
|
|
24585
25127
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24586
25128
|
kind: "mutation",
|
|
24587
25129
|
auth: "admin"
|
|
@@ -24591,9 +25133,15 @@ method(object({
|
|
|
24591
25133
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24592
25134
|
kind: "mutation",
|
|
24593
25135
|
auth: "admin"
|
|
25136
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25137
|
+
kind: "query",
|
|
25138
|
+
auth: "admin"
|
|
25139
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25140
|
+
kind: "mutation",
|
|
25141
|
+
auth: "admin"
|
|
24594
25142
|
});
|
|
24595
25143
|
/**
|
|
24596
|
-
* `
|
|
25144
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24597
25145
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24598
25146
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24599
25147
|
* delete-after-download.
|
|
@@ -24608,10 +25156,42 @@ method(object({
|
|
|
24608
25156
|
*/
|
|
24609
25157
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24610
25158
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25159
|
+
/**
|
|
25160
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25161
|
+
*
|
|
25162
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25163
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25164
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25165
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25166
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25167
|
+
*/
|
|
25168
|
+
var ExportDenseRangeSchema = object({
|
|
25169
|
+
fromSec: number().nonnegative(),
|
|
25170
|
+
toSec: number().nonnegative()
|
|
25171
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25172
|
+
/**
|
|
25173
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25174
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25175
|
+
*
|
|
25176
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25177
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25178
|
+
*/
|
|
25179
|
+
var ExportDenseSchema = object({
|
|
25180
|
+
everyMs: number().int().positive(),
|
|
25181
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25182
|
+
});
|
|
24611
25183
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24612
25184
|
var ExportTimelapseSchema = object({
|
|
24613
25185
|
everyMs: number().int().positive(),
|
|
24614
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25186
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25187
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25188
|
+
dense: ExportDenseSchema.optional()
|
|
25189
|
+
}).superRefine((v, ctx) => {
|
|
25190
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25191
|
+
code: ZodIssueCode.custom,
|
|
25192
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25193
|
+
path: ["dense", "everyMs"]
|
|
25194
|
+
});
|
|
24615
25195
|
});
|
|
24616
25196
|
/**
|
|
24617
25197
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24669,6 +25249,19 @@ var ExportDownloadSchema = object({
|
|
|
24669
25249
|
url: string(),
|
|
24670
25250
|
endpoints: array(string())
|
|
24671
25251
|
});
|
|
25252
|
+
/**
|
|
25253
|
+
* A finished export's bytes, inline.
|
|
25254
|
+
*
|
|
25255
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25256
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25257
|
+
*/
|
|
25258
|
+
var ExportBytesSchema = object({
|
|
25259
|
+
base64: string(),
|
|
25260
|
+
contentType: string(),
|
|
25261
|
+
/** Suggested filename, extension included. */
|
|
25262
|
+
name: string(),
|
|
25263
|
+
bytes: number().int().nonnegative()
|
|
25264
|
+
});
|
|
24672
25265
|
method(object({
|
|
24673
25266
|
deviceId: number(),
|
|
24674
25267
|
profile: string(),
|
|
@@ -24693,6 +25286,9 @@ method(object({
|
|
|
24693
25286
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24694
25287
|
kind: "query",
|
|
24695
25288
|
auth: "protected"
|
|
25289
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25290
|
+
kind: "query",
|
|
25291
|
+
auth: "protected"
|
|
24696
25292
|
});
|
|
24697
25293
|
/**
|
|
24698
25294
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30194,6 +30790,12 @@ Object.freeze({
|
|
|
30194
30790
|
addonId: null,
|
|
30195
30791
|
access: "delete"
|
|
30196
30792
|
},
|
|
30793
|
+
"osdManager.copyDeviceConfiguration": {
|
|
30794
|
+
capName: "osd-manager",
|
|
30795
|
+
capScope: "system",
|
|
30796
|
+
addonId: null,
|
|
30797
|
+
access: "create"
|
|
30798
|
+
},
|
|
30197
30799
|
"osdManager.getConditionSupport": {
|
|
30198
30800
|
capName: "osd-manager",
|
|
30199
30801
|
capScope: "system",
|
|
@@ -30290,7 +30892,7 @@ Object.freeze({
|
|
|
30290
30892
|
addonId: null,
|
|
30291
30893
|
access: "create"
|
|
30292
30894
|
},
|
|
30293
|
-
"pipelineAnalytics.
|
|
30895
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30294
30896
|
capName: "pipeline-analytics",
|
|
30295
30897
|
capScope: "device",
|
|
30296
30898
|
addonId: null,
|
|
@@ -30362,12 +30964,6 @@ Object.freeze({
|
|
|
30362
30964
|
addonId: null,
|
|
30363
30965
|
access: "view"
|
|
30364
30966
|
},
|
|
30365
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30366
|
-
capName: "pipeline-analytics",
|
|
30367
|
-
capScope: "device",
|
|
30368
|
-
addonId: null,
|
|
30369
|
-
access: "view"
|
|
30370
|
-
},
|
|
30371
30967
|
"pipelineAnalytics.getMotionEvents": {
|
|
30372
30968
|
capName: "pipeline-analytics",
|
|
30373
30969
|
capScope: "device",
|
|
@@ -30404,6 +31000,12 @@ Object.freeze({
|
|
|
30404
31000
|
addonId: null,
|
|
30405
31001
|
access: "view"
|
|
30406
31002
|
},
|
|
31003
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31004
|
+
capName: "pipeline-analytics",
|
|
31005
|
+
capScope: "device",
|
|
31006
|
+
addonId: null,
|
|
31007
|
+
access: "view"
|
|
31008
|
+
},
|
|
30407
31009
|
"pipelineAnalytics.getTrack": {
|
|
30408
31010
|
capName: "pipeline-analytics",
|
|
30409
31011
|
capScope: "device",
|
|
@@ -30482,6 +31084,12 @@ Object.freeze({
|
|
|
30482
31084
|
addonId: null,
|
|
30483
31085
|
access: "view"
|
|
30484
31086
|
},
|
|
31087
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31088
|
+
capName: "pipeline-analytics",
|
|
31089
|
+
capScope: "device",
|
|
31090
|
+
addonId: null,
|
|
31091
|
+
access: "create"
|
|
31092
|
+
},
|
|
30485
31093
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30486
31094
|
capName: "pipeline-analytics",
|
|
30487
31095
|
capScope: "device",
|
|
@@ -30512,7 +31120,7 @@ Object.freeze({
|
|
|
30512
31120
|
addonId: null,
|
|
30513
31121
|
access: "create"
|
|
30514
31122
|
},
|
|
30515
|
-
"pipelineAnalytics.
|
|
31123
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30516
31124
|
capName: "pipeline-analytics",
|
|
30517
31125
|
capScope: "device",
|
|
30518
31126
|
addonId: null,
|
|
@@ -30524,6 +31132,12 @@ Object.freeze({
|
|
|
30524
31132
|
addonId: null,
|
|
30525
31133
|
access: "create"
|
|
30526
31134
|
},
|
|
31135
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31136
|
+
capName: "pipeline-analytics",
|
|
31137
|
+
capScope: "device",
|
|
31138
|
+
addonId: null,
|
|
31139
|
+
access: "create"
|
|
31140
|
+
},
|
|
30527
31141
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30528
31142
|
capName: "pipeline-analytics",
|
|
30529
31143
|
capScope: "device",
|
|
@@ -30548,6 +31162,12 @@ Object.freeze({
|
|
|
30548
31162
|
addonId: null,
|
|
30549
31163
|
access: "create"
|
|
30550
31164
|
},
|
|
31165
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31166
|
+
capName: "pipeline-analytics",
|
|
31167
|
+
capScope: "device",
|
|
31168
|
+
addonId: null,
|
|
31169
|
+
access: "create"
|
|
31170
|
+
},
|
|
30551
31171
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30552
31172
|
capName: "pipeline-analytics",
|
|
30553
31173
|
capScope: "device",
|
|
@@ -30914,6 +31534,12 @@ Object.freeze({
|
|
|
30914
31534
|
addonId: null,
|
|
30915
31535
|
access: "view"
|
|
30916
31536
|
},
|
|
31537
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31538
|
+
capName: "pipeline-orchestrator",
|
|
31539
|
+
capScope: "system",
|
|
31540
|
+
addonId: null,
|
|
31541
|
+
access: "create"
|
|
31542
|
+
},
|
|
30917
31543
|
"pipelineOrchestrator.rebalance": {
|
|
30918
31544
|
capName: "pipeline-orchestrator",
|
|
30919
31545
|
capScope: "system",
|
|
@@ -30938,6 +31564,12 @@ Object.freeze({
|
|
|
30938
31564
|
addonId: null,
|
|
30939
31565
|
access: "view"
|
|
30940
31566
|
},
|
|
31567
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31568
|
+
capName: "pipeline-orchestrator",
|
|
31569
|
+
capScope: "system",
|
|
31570
|
+
addonId: null,
|
|
31571
|
+
access: "create"
|
|
31572
|
+
},
|
|
30941
31573
|
"pipelineOrchestrator.saveTemplate": {
|
|
30942
31574
|
capName: "pipeline-orchestrator",
|
|
30943
31575
|
capScope: "system",
|
|
@@ -31334,7 +31966,13 @@ Object.freeze({
|
|
|
31334
31966
|
addonId: null,
|
|
31335
31967
|
access: "create"
|
|
31336
31968
|
},
|
|
31337
|
-
"recording.
|
|
31969
|
+
"recording.cancelRelocateJob": {
|
|
31970
|
+
capName: "recording",
|
|
31971
|
+
capScope: "system",
|
|
31972
|
+
addonId: null,
|
|
31973
|
+
access: "create"
|
|
31974
|
+
},
|
|
31975
|
+
"recording.cancelStorageMigrationMove": {
|
|
31338
31976
|
capName: "recording",
|
|
31339
31977
|
capScope: "system",
|
|
31340
31978
|
addonId: null,
|
|
@@ -31370,7 +32008,7 @@ Object.freeze({
|
|
|
31370
32008
|
addonId: null,
|
|
31371
32009
|
access: "view"
|
|
31372
32010
|
},
|
|
31373
|
-
"recording.
|
|
32011
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31374
32012
|
capName: "recording",
|
|
31375
32013
|
capScope: "system",
|
|
31376
32014
|
addonId: null,
|
|
@@ -31388,12 +32026,30 @@ Object.freeze({
|
|
|
31388
32026
|
addonId: null,
|
|
31389
32027
|
access: "view"
|
|
31390
32028
|
},
|
|
32029
|
+
"recording.listRelocateJobs": {
|
|
32030
|
+
capName: "recording",
|
|
32031
|
+
capScope: "system",
|
|
32032
|
+
addonId: null,
|
|
32033
|
+
access: "view"
|
|
32034
|
+
},
|
|
31391
32035
|
"recording.locateSegment": {
|
|
31392
32036
|
capName: "recording",
|
|
31393
32037
|
capScope: "system",
|
|
31394
32038
|
addonId: null,
|
|
31395
32039
|
access: "view"
|
|
31396
32040
|
},
|
|
32041
|
+
"recording.pauseForStorageMigration": {
|
|
32042
|
+
capName: "recording",
|
|
32043
|
+
capScope: "system",
|
|
32044
|
+
addonId: null,
|
|
32045
|
+
access: "create"
|
|
32046
|
+
},
|
|
32047
|
+
"recording.planStorageRebalance": {
|
|
32048
|
+
capName: "recording",
|
|
32049
|
+
capScope: "system",
|
|
32050
|
+
addonId: null,
|
|
32051
|
+
access: "view"
|
|
32052
|
+
},
|
|
31397
32053
|
"recording.pruneFootage": {
|
|
31398
32054
|
capName: "recording",
|
|
31399
32055
|
capScope: "system",
|
|
@@ -31412,6 +32068,12 @@ Object.freeze({
|
|
|
31412
32068
|
addonId: null,
|
|
31413
32069
|
access: "view"
|
|
31414
32070
|
},
|
|
32071
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32072
|
+
capName: "recording",
|
|
32073
|
+
capScope: "system",
|
|
32074
|
+
addonId: null,
|
|
32075
|
+
access: "create"
|
|
32076
|
+
},
|
|
31415
32077
|
"recording.relocateFootage": {
|
|
31416
32078
|
capName: "recording",
|
|
31417
32079
|
capScope: "system",
|
|
@@ -31436,44 +32098,68 @@ Object.freeze({
|
|
|
31436
32098
|
addonId: null,
|
|
31437
32099
|
access: "create"
|
|
31438
32100
|
},
|
|
32101
|
+
"recording.resumeForStorageMigration": {
|
|
32102
|
+
capName: "recording",
|
|
32103
|
+
capScope: "system",
|
|
32104
|
+
addonId: null,
|
|
32105
|
+
access: "create"
|
|
32106
|
+
},
|
|
31439
32107
|
"recording.setDeviceConfig": {
|
|
31440
32108
|
capName: "recording",
|
|
31441
32109
|
capScope: "system",
|
|
31442
32110
|
addonId: null,
|
|
31443
32111
|
access: "create"
|
|
31444
32112
|
},
|
|
32113
|
+
"recording.startStorageMigrationMove": {
|
|
32114
|
+
capName: "recording",
|
|
32115
|
+
capScope: "system",
|
|
32116
|
+
addonId: null,
|
|
32117
|
+
access: "create"
|
|
32118
|
+
},
|
|
32119
|
+
"recording.startStorageRebalance": {
|
|
32120
|
+
capName: "recording",
|
|
32121
|
+
capScope: "system",
|
|
32122
|
+
addonId: null,
|
|
32123
|
+
access: "create"
|
|
32124
|
+
},
|
|
31445
32125
|
"recordingExport.cancelExport": {
|
|
31446
|
-
capName: "
|
|
32126
|
+
capName: "recording-export",
|
|
31447
32127
|
capScope: "system",
|
|
31448
32128
|
addonId: null,
|
|
31449
32129
|
access: "create"
|
|
31450
32130
|
},
|
|
31451
32131
|
"recordingExport.createExport": {
|
|
31452
|
-
capName: "
|
|
32132
|
+
capName: "recording-export",
|
|
31453
32133
|
capScope: "system",
|
|
31454
32134
|
addonId: null,
|
|
31455
32135
|
access: "create"
|
|
31456
32136
|
},
|
|
31457
32137
|
"recordingExport.deleteExport": {
|
|
31458
|
-
capName: "
|
|
32138
|
+
capName: "recording-export",
|
|
31459
32139
|
capScope: "system",
|
|
31460
32140
|
addonId: null,
|
|
31461
32141
|
access: "delete"
|
|
31462
32142
|
},
|
|
31463
32143
|
"recordingExport.getDownloadUrl": {
|
|
31464
|
-
capName: "
|
|
32144
|
+
capName: "recording-export",
|
|
31465
32145
|
capScope: "system",
|
|
31466
32146
|
addonId: null,
|
|
31467
32147
|
access: "view"
|
|
31468
32148
|
},
|
|
31469
32149
|
"recordingExport.getExport": {
|
|
31470
|
-
capName: "
|
|
32150
|
+
capName: "recording-export",
|
|
31471
32151
|
capScope: "system",
|
|
31472
32152
|
addonId: null,
|
|
31473
32153
|
access: "view"
|
|
31474
32154
|
},
|
|
31475
32155
|
"recordingExport.listExports": {
|
|
31476
|
-
capName: "
|
|
32156
|
+
capName: "recording-export",
|
|
32157
|
+
capScope: "system",
|
|
32158
|
+
addonId: null,
|
|
32159
|
+
access: "view"
|
|
32160
|
+
},
|
|
32161
|
+
"recordingExport.readExportBytes": {
|
|
32162
|
+
capName: "recording-export",
|
|
31477
32163
|
capScope: "system",
|
|
31478
32164
|
addonId: null,
|
|
31479
32165
|
access: "view"
|
|
@@ -31832,6 +32518,30 @@ Object.freeze({
|
|
|
31832
32518
|
addonId: null,
|
|
31833
32519
|
access: "view"
|
|
31834
32520
|
},
|
|
32521
|
+
"storageMigration.cancel": {
|
|
32522
|
+
capName: "storage-migration",
|
|
32523
|
+
capScope: "system",
|
|
32524
|
+
addonId: null,
|
|
32525
|
+
access: "create"
|
|
32526
|
+
},
|
|
32527
|
+
"storageMigration.plan": {
|
|
32528
|
+
capName: "storage-migration",
|
|
32529
|
+
capScope: "system",
|
|
32530
|
+
addonId: null,
|
|
32531
|
+
access: "view"
|
|
32532
|
+
},
|
|
32533
|
+
"storageMigration.start": {
|
|
32534
|
+
capName: "storage-migration",
|
|
32535
|
+
capScope: "system",
|
|
32536
|
+
addonId: null,
|
|
32537
|
+
access: "create"
|
|
32538
|
+
},
|
|
32539
|
+
"storageMigration.status": {
|
|
32540
|
+
capName: "storage-migration",
|
|
32541
|
+
capScope: "system",
|
|
32542
|
+
addonId: null,
|
|
32543
|
+
access: "view"
|
|
32544
|
+
},
|
|
31835
32545
|
"storageProvider.abortUpload": {
|
|
31836
32546
|
capName: "storage-provider",
|
|
31837
32547
|
capScope: "system",
|
|
@@ -32210,12 +32920,42 @@ Object.freeze({
|
|
|
32210
32920
|
addonId: null,
|
|
32211
32921
|
access: "create"
|
|
32212
32922
|
},
|
|
32923
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
32924
|
+
capName: "terminal-session",
|
|
32925
|
+
capScope: "system",
|
|
32926
|
+
addonId: null,
|
|
32927
|
+
access: "create"
|
|
32928
|
+
},
|
|
32213
32929
|
"terminalSession.close": {
|
|
32214
32930
|
capName: "terminal-session",
|
|
32215
32931
|
capScope: "system",
|
|
32216
32932
|
addonId: null,
|
|
32217
32933
|
access: "create"
|
|
32218
32934
|
},
|
|
32935
|
+
"terminalSession.createInstance": {
|
|
32936
|
+
capName: "terminal-session",
|
|
32937
|
+
capScope: "system",
|
|
32938
|
+
addonId: null,
|
|
32939
|
+
access: "create"
|
|
32940
|
+
},
|
|
32941
|
+
"terminalSession.deleteInstance": {
|
|
32942
|
+
capName: "terminal-session",
|
|
32943
|
+
capScope: "system",
|
|
32944
|
+
addonId: null,
|
|
32945
|
+
access: "delete"
|
|
32946
|
+
},
|
|
32947
|
+
"terminalSession.listInstances": {
|
|
32948
|
+
capName: "terminal-session",
|
|
32949
|
+
capScope: "system",
|
|
32950
|
+
addonId: null,
|
|
32951
|
+
access: "view"
|
|
32952
|
+
},
|
|
32953
|
+
"terminalSession.listLegacyCameras": {
|
|
32954
|
+
capName: "terminal-session",
|
|
32955
|
+
capScope: "system",
|
|
32956
|
+
addonId: null,
|
|
32957
|
+
access: "view"
|
|
32958
|
+
},
|
|
32219
32959
|
"terminalSession.listProfiles": {
|
|
32220
32960
|
capName: "terminal-session",
|
|
32221
32961
|
capScope: "system",
|
|
@@ -32246,6 +32986,12 @@ Object.freeze({
|
|
|
32246
32986
|
addonId: null,
|
|
32247
32987
|
access: "create"
|
|
32248
32988
|
},
|
|
32989
|
+
"terminalSession.setInstanceEnabled": {
|
|
32990
|
+
capName: "terminal-session",
|
|
32991
|
+
capScope: "system",
|
|
32992
|
+
addonId: null,
|
|
32993
|
+
access: "create"
|
|
32994
|
+
},
|
|
32249
32995
|
"terminalSession.writeInput": {
|
|
32250
32996
|
capName: "terminal-session",
|
|
32251
32997
|
capScope: "system",
|
|
@@ -32790,6 +33536,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
32790
33536
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
32791
33537
|
var PriorityField = number().int().min(1).max(5);
|
|
32792
33538
|
/**
|
|
33539
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33540
|
+
*
|
|
33541
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33542
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33543
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33544
|
+
*
|
|
33545
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33546
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33547
|
+
*
|
|
33548
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33549
|
+
*
|
|
33550
|
+
* 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.
|
|
33551
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33552
|
+
* and therefore the length of a quiet night, does not move.
|
|
33553
|
+
*
|
|
33554
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33555
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33556
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33557
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33558
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33559
|
+
*/
|
|
33560
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33561
|
+
/**
|
|
33562
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33563
|
+
*
|
|
33564
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33565
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33566
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33567
|
+
* that range every ~583 ms.
|
|
33568
|
+
*
|
|
33569
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33570
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33571
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33572
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33573
|
+
* schema change and are the tracked follow-up.
|
|
33574
|
+
*
|
|
33575
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33576
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33577
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33578
|
+
* happened.
|
|
33579
|
+
*/
|
|
33580
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33581
|
+
/**
|
|
33582
|
+
* Caption burned into the notification's preview frame.
|
|
33583
|
+
*
|
|
33584
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33585
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33586
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33587
|
+
*
|
|
33588
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33589
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33590
|
+
* the reason this is not `.min(1)`.
|
|
33591
|
+
*/
|
|
33592
|
+
var PreviewTextField = string().max(200);
|
|
33593
|
+
/**
|
|
33594
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33595
|
+
*
|
|
33596
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33597
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33598
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33599
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33600
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33601
|
+
* them.
|
|
33602
|
+
*
|
|
33603
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33604
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33605
|
+
* paying that on the deploy that shipped it.
|
|
33606
|
+
*
|
|
33607
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33608
|
+
*/
|
|
33609
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33610
|
+
/**
|
|
33611
|
+
* Which detection classes the notification reports counts for.
|
|
33612
|
+
*
|
|
33613
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33614
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33615
|
+
* class the window actually contained", which is what an operator who never
|
|
33616
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33617
|
+
* counts cars all night).
|
|
33618
|
+
*
|
|
33619
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33620
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33621
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33622
|
+
* not emit.
|
|
33623
|
+
*
|
|
33624
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33625
|
+
* - `{{detections}}` — total over the reported classes
|
|
33626
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33627
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33628
|
+
* one per class, `count_` + the class name
|
|
33629
|
+
*
|
|
33630
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33631
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33632
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33633
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33634
|
+
*/
|
|
33635
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33636
|
+
/**
|
|
32793
33637
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
32794
33638
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
32795
33639
|
* here (see the ownership note above).
|
|
@@ -32809,9 +33653,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
32809
33653
|
cadenceSec: CadenceSecField.default(15),
|
|
32810
33654
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
32811
33655
|
framerate: FramerateField.default(10),
|
|
33656
|
+
/**
|
|
33657
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33658
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33659
|
+
* field gets.
|
|
33660
|
+
*/
|
|
33661
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33662
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33663
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32812
33664
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
32813
33665
|
targets: TargetsField,
|
|
32814
33666
|
template: TimelapseTemplateSchema.optional(),
|
|
33667
|
+
/**
|
|
33668
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33669
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33670
|
+
*
|
|
33671
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33672
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33673
|
+
* silently clear the caption too.
|
|
33674
|
+
*/
|
|
33675
|
+
previewText: PreviewTextField.optional(),
|
|
33676
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33677
|
+
previewMode: PreviewModeField.default("image"),
|
|
33678
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33679
|
+
reportClasses: ReportClassesField.optional(),
|
|
32815
33680
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32816
33681
|
priority: PriorityField.default(3)
|
|
32817
33682
|
});
|
|
@@ -32822,8 +33687,13 @@ object({
|
|
|
32822
33687
|
schedule: NcScheduleSchema.optional(),
|
|
32823
33688
|
cadenceSec: CadenceSecField.optional(),
|
|
32824
33689
|
framerate: FramerateField.optional(),
|
|
33690
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33691
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32825
33692
|
targets: TargetsField.optional(),
|
|
32826
33693
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33694
|
+
previewText: PreviewTextField.optional(),
|
|
33695
|
+
previewMode: PreviewModeField.optional(),
|
|
33696
|
+
reportClasses: ReportClassesField.optional(),
|
|
32827
33697
|
priority: PriorityField.optional()
|
|
32828
33698
|
});
|
|
32829
33699
|
TimelapseRuleInputSchema.extend({
|
|
@@ -32835,10 +33705,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
32835
33705
|
*/
|
|
32836
33706
|
ownerUserId: string().optional(),
|
|
32837
33707
|
/**
|
|
32838
|
-
* Epoch-ms of the
|
|
32839
|
-
*
|
|
33708
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33709
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33710
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
32840
33711
|
*/
|
|
32841
33712
|
lastGeneratedAt: number().optional(),
|
|
33713
|
+
/**
|
|
33714
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33715
|
+
* re-generation guard's real durable state.
|
|
33716
|
+
*
|
|
33717
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33718
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33719
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33720
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33721
|
+
* come back.
|
|
33722
|
+
*
|
|
33723
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33724
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33725
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33726
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33727
|
+
* once, on the deploy that shipped the map.
|
|
33728
|
+
*/
|
|
33729
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
32842
33730
|
/** userId of the caller who created the rule (server-stamped). */
|
|
32843
33731
|
createdBy: string(),
|
|
32844
33732
|
createdAt: number(),
|