@camstack/addon-provider-rademacher 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +936 -48
- package/dist/addon.mjs +936 -48
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8204,8 +8204,31 @@ var AdoptionJobSchema = object({
|
|
|
8204
8204
|
error: string().nullable()
|
|
8205
8205
|
});
|
|
8206
8206
|
/**
|
|
8207
|
-
* Per-camera FUNCTION SWITCHES
|
|
8208
|
-
*
|
|
8207
|
+
* Per-camera FUNCTION SWITCHES.
|
|
8208
|
+
*
|
|
8209
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
8210
|
+
*
|
|
8211
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
8212
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
8213
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
8214
|
+
* every function already had a settings page of its own, and a second place to
|
|
8215
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
8216
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
8217
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
8218
|
+
* (which was always first-class; the switch was a veneer over
|
|
8219
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
8220
|
+
* per-device setting, the two camera planes to their own components.
|
|
8221
|
+
*
|
|
8222
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
8223
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
8224
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
8225
|
+
* never about a control panel.
|
|
8226
|
+
*
|
|
8227
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
8228
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
8229
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
8230
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
8231
|
+
* stop; nothing new may be built on it.
|
|
8209
8232
|
*
|
|
8210
8233
|
* ## This file adds no state
|
|
8211
8234
|
*
|
|
@@ -8550,14 +8573,21 @@ var RecordingConfigSchema = object({
|
|
|
8550
8573
|
/**
|
|
8551
8574
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8552
8575
|
*
|
|
8553
|
-
* One shape shared by the recorder
|
|
8554
|
-
*
|
|
8555
|
-
*
|
|
8556
|
-
*
|
|
8557
|
-
*
|
|
8558
|
-
|
|
8576
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
8577
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
8578
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
8579
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
8580
|
+
* addon surface.
|
|
8581
|
+
*/
|
|
8582
|
+
/**
|
|
8583
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
8584
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
8585
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
8586
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
8587
|
+
* runs at all.
|
|
8559
8588
|
*/
|
|
8560
8589
|
var RelocateJobStateSchema = _enum([
|
|
8590
|
+
"queued",
|
|
8561
8591
|
"running",
|
|
8562
8592
|
"done",
|
|
8563
8593
|
"failed",
|
|
@@ -8582,19 +8612,109 @@ var RelocateJobSchema = object({
|
|
|
8582
8612
|
finishedAt: number().nullable(),
|
|
8583
8613
|
error: string().nullable()
|
|
8584
8614
|
});
|
|
8615
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
8616
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
8617
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
8585
8618
|
var RelocateFootageInputSchema = object({
|
|
8586
|
-
deviceId: number().optional(),
|
|
8587
8619
|
fromLocationId: string(),
|
|
8588
8620
|
toLocationId: string(),
|
|
8589
8621
|
entities: array(_enum(["segments"])).optional(),
|
|
8622
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
8623
|
+
* pre-orchestration compatibility path. */
|
|
8624
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
8625
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
8626
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
8627
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
8628
|
+
deviceId: number().int().optional(),
|
|
8629
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
8630
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
8631
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
8632
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
8633
|
+
profiles: array(string()).optional(),
|
|
8590
8634
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
8591
8635
|
* never allowed to starve live writers. */
|
|
8592
8636
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
8593
8637
|
});
|
|
8594
|
-
|
|
8595
|
-
|
|
8638
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
8639
|
+
* from persistent recording settings: a migration never changes
|
|
8640
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
8641
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
8642
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
8643
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
8596
8644
|
toLocationId: string(),
|
|
8597
8645
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
8646
|
+
}).extend({ leaseId: string().min(1) });
|
|
8647
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
8648
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
8649
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
8650
|
+
var StorageMigrationClassSchema = _enum([
|
|
8651
|
+
"recordings",
|
|
8652
|
+
"recordingsLow",
|
|
8653
|
+
"eventMedia"
|
|
8654
|
+
]);
|
|
8655
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
8656
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
8657
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
8658
|
+
var StorageMigrationDestinationsSchema = object({
|
|
8659
|
+
recordings: string().min(1).optional(),
|
|
8660
|
+
recordingsLow: string().min(1).optional(),
|
|
8661
|
+
eventMedia: string().min(1).optional()
|
|
8662
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
8663
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
8664
|
+
var StorageMigrationInputSchema = object({
|
|
8665
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
8666
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8667
|
+
});
|
|
8668
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
8669
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
8670
|
+
* verified. */
|
|
8671
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
8672
|
+
"planning",
|
|
8673
|
+
"pausing",
|
|
8674
|
+
"moving",
|
|
8675
|
+
"verifying",
|
|
8676
|
+
"repointing",
|
|
8677
|
+
"refreshing",
|
|
8678
|
+
"resuming",
|
|
8679
|
+
"done",
|
|
8680
|
+
"failed",
|
|
8681
|
+
"cancelled"
|
|
8682
|
+
]);
|
|
8683
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
8684
|
+
"pipeline",
|
|
8685
|
+
"recorder",
|
|
8686
|
+
"analytics"
|
|
8687
|
+
]);
|
|
8688
|
+
var StorageMigrationMoveSchema = object({
|
|
8689
|
+
storageClass: StorageMigrationClassSchema,
|
|
8690
|
+
fromLocationId: string(),
|
|
8691
|
+
toLocationId: string(),
|
|
8692
|
+
moverJobId: string().nullable(),
|
|
8693
|
+
state: RelocateJobStateSchema.nullable(),
|
|
8694
|
+
error: string().nullable()
|
|
8695
|
+
});
|
|
8696
|
+
var StorageMigrationJobSchema = object({
|
|
8697
|
+
jobId: string(),
|
|
8698
|
+
phase: StorageMigrationPhaseSchema,
|
|
8699
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
8700
|
+
throttleMbps: number(),
|
|
8701
|
+
moves: array(StorageMigrationMoveSchema),
|
|
8702
|
+
pauseLeaseId: string().nullable(),
|
|
8703
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
8704
|
+
repointed: boolean(),
|
|
8705
|
+
cancelRequested: boolean(),
|
|
8706
|
+
startedAt: number(),
|
|
8707
|
+
updatedAt: number(),
|
|
8708
|
+
finishedAt: number().nullable(),
|
|
8709
|
+
error: string().nullable()
|
|
8710
|
+
});
|
|
8711
|
+
var StorageMigrationPlanSchema = object({
|
|
8712
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
8713
|
+
moves: array(object({
|
|
8714
|
+
storageClass: StorageMigrationClassSchema,
|
|
8715
|
+
fromLocationId: string(),
|
|
8716
|
+
toLocationId: string()
|
|
8717
|
+
}))
|
|
8598
8718
|
});
|
|
8599
8719
|
/**
|
|
8600
8720
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -8646,6 +8766,21 @@ var StorageLocationSchema = object({
|
|
|
8646
8766
|
nodeId: string().optional(),
|
|
8647
8767
|
isDefault: boolean().default(false),
|
|
8648
8768
|
isSystem: boolean().default(false),
|
|
8769
|
+
/**
|
|
8770
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
8771
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
8772
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
8773
|
+
* location rather than in any one addon's store — nothing has to be
|
|
8774
|
+
* extended to add the next consumer.
|
|
8775
|
+
*
|
|
8776
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
8777
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
8778
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
8779
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
8780
|
+
* disk must not silently start writing to it); the default of a type is
|
|
8781
|
+
* always stamped `true`.
|
|
8782
|
+
*/
|
|
8783
|
+
enabled: boolean().optional(),
|
|
8649
8784
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8650
8785
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8651
8786
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -13198,7 +13333,8 @@ method(object({
|
|
|
13198
13333
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
13199
13334
|
/**
|
|
13200
13335
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13201
|
-
* filesystem
|
|
13336
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13337
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
13202
13338
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
13203
13339
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
13204
13340
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -15039,6 +15175,13 @@ var MaskGridDimsSchema = object({
|
|
|
15039
15175
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
15040
15176
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
15041
15177
|
* one trigger.
|
|
15178
|
+
*
|
|
15179
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
15180
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
15181
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
15182
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
15183
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
15184
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
15042
15185
|
*/
|
|
15043
15186
|
var NcDeliverySchema = _enum([
|
|
15044
15187
|
"immediate",
|
|
@@ -15053,15 +15196,32 @@ var NcDeliverySchema = _enum([
|
|
|
15053
15196
|
* depend on a provider's raw event name or payload shape.
|
|
15054
15197
|
*/
|
|
15055
15198
|
var NcSystemEventKindSchema = _enum([
|
|
15056
|
-
"
|
|
15057
|
-
"
|
|
15199
|
+
"device-online",
|
|
15200
|
+
"device-offline",
|
|
15201
|
+
"device-disabled",
|
|
15202
|
+
"device-enabled",
|
|
15058
15203
|
"stream-online",
|
|
15059
15204
|
"stream-offline",
|
|
15060
15205
|
"node-online",
|
|
15061
15206
|
"node-offline",
|
|
15062
15207
|
"addon-update-available",
|
|
15063
|
-
"server-update-available"
|
|
15208
|
+
"server-update-available",
|
|
15209
|
+
"alarm-triggered",
|
|
15210
|
+
"alarm-armed",
|
|
15211
|
+
"alarm-disarmed",
|
|
15212
|
+
"camera-online",
|
|
15213
|
+
"camera-offline",
|
|
15214
|
+
"camera-disabled",
|
|
15215
|
+
"camera-enabled"
|
|
15216
|
+
]);
|
|
15217
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
15218
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
15219
|
+
"camera-online",
|
|
15220
|
+
"camera-offline",
|
|
15221
|
+
"camera-disabled",
|
|
15222
|
+
"camera-enabled"
|
|
15064
15223
|
]);
|
|
15224
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
15065
15225
|
/**
|
|
15066
15226
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
15067
15227
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -15070,6 +15230,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
15070
15230
|
var NcSystemEventConditionSchema = object({
|
|
15071
15231
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
15072
15232
|
deviceIds: array(number().int()).min(1).optional(),
|
|
15233
|
+
/**
|
|
15234
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
15235
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
15236
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
15237
|
+
*
|
|
15238
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
15239
|
+
* one reason: the intake cannot know which devices this household cares
|
|
15240
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
15241
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
15242
|
+
* does not carry) matches no `deviceTypes` list.
|
|
15243
|
+
*/
|
|
15244
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
15073
15245
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
15074
15246
|
packageNames: array(string().min(1)).min(1).optional()
|
|
15075
15247
|
});
|
|
@@ -15120,6 +15292,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
15120
15292
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
15121
15293
|
});
|
|
15122
15294
|
/**
|
|
15295
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
15296
|
+
*
|
|
15297
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
15298
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
15299
|
+
* they already know): a rule matches when, over a sampling window of
|
|
15300
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
15301
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
15302
|
+
*
|
|
15303
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
15304
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
15305
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
15306
|
+
*
|
|
15307
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
15308
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
15309
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
15310
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
15311
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
15312
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
15313
|
+
* ZodEffects the cap path would have to special-case).
|
|
15314
|
+
*
|
|
15315
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
15316
|
+
* must be FULL before it can match — a window that has been open for two
|
|
15317
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
15318
|
+
* `samplingSeconds` decorative.
|
|
15319
|
+
*
|
|
15320
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
15321
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
15322
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
15323
|
+
* an operator who typed `dog` mean the same thing.
|
|
15324
|
+
*/
|
|
15325
|
+
var NcAudioConditionSchema = object({
|
|
15326
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
15327
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
15328
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
15329
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
15330
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
15331
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
15332
|
+
/** Length of the sampling window in seconds. */
|
|
15333
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
15334
|
+
});
|
|
15335
|
+
/**
|
|
15123
15336
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
15124
15337
|
*
|
|
15125
15338
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -15392,7 +15605,33 @@ var NcConditionsSchema = object({
|
|
|
15392
15605
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
15393
15606
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
15394
15607
|
*/
|
|
15395
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
15608
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
15609
|
+
/**
|
|
15610
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
15611
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
15612
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
15613
|
+
* a window that is not full yet, neither filter given). See
|
|
15614
|
+
* {@link NcAudioCondition}.
|
|
15615
|
+
*
|
|
15616
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
15617
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
15618
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
15619
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
15620
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
15621
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
15622
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
15623
|
+
*
|
|
15624
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
15625
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
15626
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
15627
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
15628
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
15629
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
15630
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
15631
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
15632
|
+
* does an audio rule become authorable.
|
|
15633
|
+
*/
|
|
15634
|
+
audio: NcAudioConditionSchema.optional()
|
|
15396
15635
|
});
|
|
15397
15636
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
15398
15637
|
var NcRuleTargetSchema = object({
|
|
@@ -15506,6 +15745,73 @@ var NcThrottleSchema = object({
|
|
|
15506
15745
|
*/
|
|
15507
15746
|
granularity: NcThrottleGranularitySchema.optional()
|
|
15508
15747
|
});
|
|
15748
|
+
/**
|
|
15749
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
15750
|
+
* it judges may be.
|
|
15751
|
+
*
|
|
15752
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
15753
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
15754
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
15755
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
15756
|
+
* tokens for pixels the model pools away.
|
|
15757
|
+
*/
|
|
15758
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
15759
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
15760
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
15761
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
15762
|
+
var NcConfirmExpectSchema = object({
|
|
15763
|
+
op: _enum([
|
|
15764
|
+
">=",
|
|
15765
|
+
">",
|
|
15766
|
+
"<=",
|
|
15767
|
+
"<",
|
|
15768
|
+
"=="
|
|
15769
|
+
]),
|
|
15770
|
+
count: number().int().min(0).max(1e3)
|
|
15771
|
+
});
|
|
15772
|
+
/**
|
|
15773
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
15774
|
+
* to ship and says whether it agrees with the rule.
|
|
15775
|
+
*
|
|
15776
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
15777
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
15778
|
+
* on the operator's phone is not a verdict about this notification.
|
|
15779
|
+
*
|
|
15780
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
15781
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
15782
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
15783
|
+
* open looks in the log exactly like a gate that works.
|
|
15784
|
+
*
|
|
15785
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
15786
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
15787
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
15788
|
+
* above rather than trusting a parse it may never have seen.
|
|
15789
|
+
*/
|
|
15790
|
+
var NcConfirmSchema = object({
|
|
15791
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
15792
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
15793
|
+
enabled: boolean().default(false),
|
|
15794
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
15795
|
+
profileId: string().optional(),
|
|
15796
|
+
/**
|
|
15797
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
15798
|
+
* from the rule (its class and its expectation).
|
|
15799
|
+
*
|
|
15800
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
15801
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
15802
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
15803
|
+
* turn and only rule-authored words land here.
|
|
15804
|
+
*/
|
|
15805
|
+
prompt: string().max(1e3).optional(),
|
|
15806
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
15807
|
+
* own boolean verdict decides. */
|
|
15808
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
15809
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
15810
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
15811
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
15812
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
15813
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
15814
|
+
});
|
|
15509
15815
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
15510
15816
|
var NcRuleInputSchema = object({
|
|
15511
15817
|
name: string().min(1).max(200),
|
|
@@ -15566,7 +15872,13 @@ var NcRuleInputSchema = object({
|
|
|
15566
15872
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
15567
15873
|
* shape as every other actuation.
|
|
15568
15874
|
*/
|
|
15569
|
-
actions: NcRuleActionsSchema.optional()
|
|
15875
|
+
actions: NcRuleActionsSchema.optional(),
|
|
15876
|
+
/**
|
|
15877
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
15878
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
15879
|
+
* did, and absent is the only way to say that without a migration.
|
|
15880
|
+
*/
|
|
15881
|
+
confirm: NcConfirmSchema.optional()
|
|
15570
15882
|
});
|
|
15571
15883
|
/**
|
|
15572
15884
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -15577,7 +15889,37 @@ var NcRuleInputSchema = object({
|
|
|
15577
15889
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
15578
15890
|
* `updateRule` patch.
|
|
15579
15891
|
*/
|
|
15580
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15892
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15893
|
+
disabledTargetIds: array(string()).optional(),
|
|
15894
|
+
/**
|
|
15895
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
15896
|
+
*
|
|
15897
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
15898
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
15899
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
15900
|
+
* one — which made every partial edit destructive:
|
|
15901
|
+
*
|
|
15902
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
15903
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
15904
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
15905
|
+
*
|
|
15906
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
15907
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
15908
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
15909
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
15910
|
+
* within a minute of a two-field patch.
|
|
15911
|
+
*
|
|
15912
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
15913
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
15914
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
15915
|
+
* absent key is now genuinely absent.
|
|
15916
|
+
*/
|
|
15917
|
+
enabled: boolean().optional(),
|
|
15918
|
+
conditions: NcConditionsSchema.optional(),
|
|
15919
|
+
media: NcMediaPolicySchema.optional(),
|
|
15920
|
+
throttle: NcThrottleSchema.optional(),
|
|
15921
|
+
priority: number().int().min(1).max(5).optional()
|
|
15922
|
+
});
|
|
15581
15923
|
/** A persisted rule. */
|
|
15582
15924
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
15583
15925
|
id: string(),
|
|
@@ -15878,6 +16220,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
15878
16220
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
15879
16221
|
* copy would lie the first time a rule is disabled.
|
|
15880
16222
|
*/
|
|
16223
|
+
/**
|
|
16224
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
16225
|
+
*
|
|
16226
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
16227
|
+
* per-camera notification switch the Notification Center already owns,
|
|
16228
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
16229
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
16230
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
16231
|
+
* with the switches the operator actually used.
|
|
16232
|
+
*/
|
|
16233
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
16234
|
+
"muted",
|
|
16235
|
+
"detection-off",
|
|
16236
|
+
"offline"
|
|
16237
|
+
]);
|
|
16238
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
16239
|
+
deviceId: number().int(),
|
|
16240
|
+
reason: NcAlarmSkipReasonSchema
|
|
16241
|
+
});
|
|
15881
16242
|
var NcAlarmModeCoverageSchema = object({
|
|
15882
16243
|
mode: AlarmArmModeSchema,
|
|
15883
16244
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -15885,7 +16246,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
15885
16246
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
15886
16247
|
allDevices: boolean(),
|
|
15887
16248
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
15888
|
-
deviceIds: array(number().int())
|
|
16249
|
+
deviceIds: array(number().int()),
|
|
16250
|
+
/**
|
|
16251
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
16252
|
+
* excludes it.
|
|
16253
|
+
*
|
|
16254
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
16255
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
16256
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
16257
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
16258
|
+
* alarm tab.
|
|
16259
|
+
*/
|
|
16260
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
15889
16261
|
});
|
|
15890
16262
|
var NcAlarmConfigSchema = object({
|
|
15891
16263
|
/**
|
|
@@ -17248,13 +17620,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17248
17620
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
17249
17621
|
kind: "mutation",
|
|
17250
17622
|
auth: "admin"
|
|
17251
|
-
}), method(
|
|
17623
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17252
17624
|
kind: "mutation",
|
|
17253
17625
|
auth: "admin"
|
|
17254
|
-
}), method(object({
|
|
17255
|
-
kind: "
|
|
17626
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17627
|
+
kind: "mutation",
|
|
17256
17628
|
auth: "admin"
|
|
17257
|
-
}), method(
|
|
17629
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
17630
|
+
kind: "mutation",
|
|
17631
|
+
auth: "admin"
|
|
17632
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
17633
|
+
kind: "mutation",
|
|
17634
|
+
auth: "admin"
|
|
17635
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
17258
17636
|
kind: "mutation",
|
|
17259
17637
|
auth: "admin"
|
|
17260
17638
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -18711,9 +19089,16 @@ var CameraStatusSchema = object({
|
|
|
18711
19089
|
audio: CameraAudioStatusSchema.nullable(),
|
|
18712
19090
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
18713
19091
|
/**
|
|
18714
|
-
* Per-camera
|
|
19092
|
+
* Per-camera functions an OPERATOR has turned off
|
|
18715
19093
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
18716
19094
|
*
|
|
19095
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
19096
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
19097
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
19098
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
19099
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
19100
|
+
* the difference between a camera being off and a camera being dead.
|
|
19101
|
+
*
|
|
18717
19102
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
18718
19103
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
18719
19104
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -18784,7 +19169,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
18784
19169
|
reachable: boolean(),
|
|
18785
19170
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
18786
19171
|
});
|
|
18787
|
-
method(object({
|
|
19172
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
19173
|
+
kind: "mutation",
|
|
19174
|
+
auth: "admin"
|
|
19175
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
19176
|
+
kind: "mutation",
|
|
19177
|
+
auth: "admin"
|
|
19178
|
+
}), method(object({
|
|
18788
19179
|
deviceId: number(),
|
|
18789
19180
|
agentNodeId: string()
|
|
18790
19181
|
}), object({ success: literal(true) }), {
|
|
@@ -19458,6 +19849,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
19458
19849
|
locationId: string(),
|
|
19459
19850
|
targetBytes: number().int().positive()
|
|
19460
19851
|
}), EvictResultSchema, { kind: "mutation" });
|
|
19852
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
19853
|
+
kind: "mutation",
|
|
19854
|
+
auth: "admin"
|
|
19855
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
19856
|
+
kind: "mutation",
|
|
19857
|
+
auth: "admin"
|
|
19858
|
+
});
|
|
19461
19859
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
19462
19860
|
providerId: string().min(1),
|
|
19463
19861
|
displayName: string().min(1),
|
|
@@ -19561,6 +19959,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
19561
19959
|
label: string(),
|
|
19562
19960
|
description: string().optional()
|
|
19563
19961
|
});
|
|
19962
|
+
/**
|
|
19963
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19964
|
+
* an instance declares a camera.
|
|
19965
|
+
*/
|
|
19966
|
+
var TerminalInstanceInfoSchema = object({
|
|
19967
|
+
instanceId: string(),
|
|
19968
|
+
cameraStableId: string(),
|
|
19969
|
+
nodeId: string(),
|
|
19970
|
+
profileId: string(),
|
|
19971
|
+
profileLabel: string(),
|
|
19972
|
+
name: string(),
|
|
19973
|
+
enabled: boolean()
|
|
19974
|
+
});
|
|
19975
|
+
var TerminalLegacyCameraSchema = object({
|
|
19976
|
+
stableId: string(),
|
|
19977
|
+
nodeId: string(),
|
|
19978
|
+
profileId: string(),
|
|
19979
|
+
profileLabel: string(),
|
|
19980
|
+
name: string(),
|
|
19981
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19982
|
+
adoptable: boolean()
|
|
19983
|
+
});
|
|
19564
19984
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
19565
19985
|
seq: number().int().positive(),
|
|
19566
19986
|
kind: literal("data"),
|
|
@@ -19577,7 +19997,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
19577
19997
|
snapshot: string().optional(),
|
|
19578
19998
|
events: array(TerminalOutputEventSchema).readonly()
|
|
19579
19999
|
});
|
|
19580
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
20000
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
20001
|
+
targetNodeId: string().min(1),
|
|
20002
|
+
profileId: string().min(1),
|
|
20003
|
+
name: string().trim().min(1).max(160).optional()
|
|
20004
|
+
}), TerminalInstanceInfoSchema, {
|
|
20005
|
+
kind: "mutation",
|
|
20006
|
+
auth: "admin"
|
|
20007
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
20008
|
+
kind: "mutation",
|
|
20009
|
+
auth: "admin"
|
|
20010
|
+
}), method(object({
|
|
20011
|
+
instanceId: string().min(1),
|
|
20012
|
+
enabled: boolean()
|
|
20013
|
+
}), TerminalInstanceInfoSchema, {
|
|
20014
|
+
kind: "mutation",
|
|
20015
|
+
auth: "admin"
|
|
20016
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
20017
|
+
stableId: string().min(1),
|
|
20018
|
+
name: string().trim().min(1).max(160).optional()
|
|
20019
|
+
}), TerminalInstanceInfoSchema, {
|
|
20020
|
+
kind: "mutation",
|
|
20021
|
+
auth: "admin"
|
|
20022
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19581
20023
|
profileId: string(),
|
|
19582
20024
|
cols: number().int().positive(),
|
|
19583
20025
|
rows: number().int().positive()
|
|
@@ -19594,7 +20036,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
19594
20036
|
}), method(object({
|
|
19595
20037
|
sessionId: string(),
|
|
19596
20038
|
afterSeq: number().int().nonnegative(),
|
|
19597
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
20039
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
20040
|
+
/**
|
|
20041
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
20042
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
20043
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
20044
|
+
*/
|
|
20045
|
+
waitForOutput: boolean().optional()
|
|
19598
20046
|
}), TerminalOutputBatchSchema, {
|
|
19599
20047
|
kind: "mutation",
|
|
19600
20048
|
auth: "admin",
|
|
@@ -22092,6 +22540,7 @@ var FaceInfoSchema = object({
|
|
|
22092
22540
|
var FaceFilterEnum = _enum([
|
|
22093
22541
|
"unassigned",
|
|
22094
22542
|
"recognized",
|
|
22543
|
+
"identified",
|
|
22095
22544
|
"all"
|
|
22096
22545
|
]);
|
|
22097
22546
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -22120,6 +22569,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
22120
22569
|
kind: "mutation",
|
|
22121
22570
|
auth: "admin"
|
|
22122
22571
|
}), method(object({
|
|
22572
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
22573
|
+
deviceId: number().int().optional(),
|
|
22123
22574
|
limit: number().int().positive().optional(),
|
|
22124
22575
|
filter: FaceFilterEnum.optional(),
|
|
22125
22576
|
/**
|
|
@@ -24349,6 +24800,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
24349
24800
|
capName: string().min(1).max(64),
|
|
24350
24801
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
24351
24802
|
valuePath: string().min(1).max(64)
|
|
24803
|
+
}),
|
|
24804
|
+
object({
|
|
24805
|
+
kind: literal("latest-recognition"),
|
|
24806
|
+
recognition: _enum(["person", "plate"])
|
|
24352
24807
|
})
|
|
24353
24808
|
]);
|
|
24354
24809
|
var OsdSlotBindingSchema = object({
|
|
@@ -24454,6 +24909,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
24454
24909
|
}), object({ success: literal(true) }), {
|
|
24455
24910
|
kind: "mutation",
|
|
24456
24911
|
auth: "admin"
|
|
24912
|
+
}), method(object({
|
|
24913
|
+
sourceDeviceId: number().int(),
|
|
24914
|
+
targetDeviceId: number().int()
|
|
24915
|
+
}), object({
|
|
24916
|
+
copied: number().int().nonnegative(),
|
|
24917
|
+
skipped: number().int().nonnegative()
|
|
24918
|
+
}), {
|
|
24919
|
+
kind: "mutation",
|
|
24920
|
+
auth: "admin"
|
|
24457
24921
|
}), method(object({
|
|
24458
24922
|
deviceId: number().int(),
|
|
24459
24923
|
slotId: string().min(1),
|
|
@@ -25376,7 +25840,19 @@ var RecordingManifestSchema = object({
|
|
|
25376
25840
|
* profiles/subtrees/locations on this node). */
|
|
25377
25841
|
var RecordingDeviceUsageSchema = object({
|
|
25378
25842
|
deviceId: number(),
|
|
25379
|
-
usedBytes: number()
|
|
25843
|
+
usedBytes: number(),
|
|
25844
|
+
/**
|
|
25845
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25846
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25847
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25848
|
+
*
|
|
25849
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25850
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25851
|
+
* field must keep validating that older provider's payload: the framework
|
|
25852
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25853
|
+
* the later of the two.
|
|
25854
|
+
*/
|
|
25855
|
+
oldestMs: number().nullable().optional()
|
|
25380
25856
|
});
|
|
25381
25857
|
/** Recording storage usage + capacity for one storage location. */
|
|
25382
25858
|
var RecordingLocationUsageSchema = object({
|
|
@@ -25404,6 +25880,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
25404
25880
|
locations: array(RecordingLocationUsageSchema)
|
|
25405
25881
|
});
|
|
25406
25882
|
/**
|
|
25883
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25884
|
+
*
|
|
25885
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25886
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25887
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25888
|
+
* location, run FIFO behind the single-flight mover.
|
|
25889
|
+
*
|
|
25890
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25891
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25892
|
+
* (empty on the plan).
|
|
25893
|
+
*/
|
|
25894
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25895
|
+
deviceId: number(),
|
|
25896
|
+
profile: string(),
|
|
25897
|
+
fromLocationId: string(),
|
|
25898
|
+
toLocationId: string(),
|
|
25899
|
+
bytes: number(),
|
|
25900
|
+
files: number().int()
|
|
25901
|
+
});
|
|
25902
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25903
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25904
|
+
* that had nothing to do. */
|
|
25905
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25906
|
+
"unassigned",
|
|
25907
|
+
"target-not-writable",
|
|
25908
|
+
"below-threshold",
|
|
25909
|
+
"no-headroom"
|
|
25910
|
+
]);
|
|
25911
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25912
|
+
deviceId: number(),
|
|
25913
|
+
profile: string(),
|
|
25914
|
+
fromLocationId: string(),
|
|
25915
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25916
|
+
toLocationId: string().nullable(),
|
|
25917
|
+
bytes: number(),
|
|
25918
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25919
|
+
});
|
|
25920
|
+
var RecordingRebalancePlanSchema = object({
|
|
25921
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25922
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25923
|
+
bytesToMove: number(),
|
|
25924
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25925
|
+
jobIds: array(string())
|
|
25926
|
+
});
|
|
25927
|
+
var RecordingRebalanceInputSchema = object({
|
|
25928
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25929
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25930
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25931
|
+
minMoveGb: number().min(0).optional()
|
|
25932
|
+
});
|
|
25933
|
+
/**
|
|
25407
25934
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
25408
25935
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
25409
25936
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -25551,6 +26078,21 @@ method(object({
|
|
|
25551
26078
|
}), {
|
|
25552
26079
|
kind: "mutation",
|
|
25553
26080
|
auth: "admin"
|
|
26081
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
26082
|
+
kind: "mutation",
|
|
26083
|
+
auth: "admin"
|
|
26084
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
26085
|
+
kind: "mutation",
|
|
26086
|
+
auth: "admin"
|
|
26087
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
26088
|
+
kind: "mutation",
|
|
26089
|
+
auth: "admin"
|
|
26090
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
26091
|
+
kind: "mutation",
|
|
26092
|
+
auth: "admin"
|
|
26093
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26094
|
+
kind: "mutation",
|
|
26095
|
+
auth: "admin"
|
|
25554
26096
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
25555
26097
|
kind: "mutation",
|
|
25556
26098
|
auth: "admin"
|
|
@@ -25560,9 +26102,15 @@ method(object({
|
|
|
25560
26102
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25561
26103
|
kind: "mutation",
|
|
25562
26104
|
auth: "admin"
|
|
26105
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
26106
|
+
kind: "query",
|
|
26107
|
+
auth: "admin"
|
|
26108
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
26109
|
+
kind: "mutation",
|
|
26110
|
+
auth: "admin"
|
|
25563
26111
|
});
|
|
25564
26112
|
/**
|
|
25565
|
-
* `
|
|
26113
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
25566
26114
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
25567
26115
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
25568
26116
|
* delete-after-download.
|
|
@@ -25577,10 +26125,42 @@ method(object({
|
|
|
25577
26125
|
*/
|
|
25578
26126
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25579
26127
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
26128
|
+
/**
|
|
26129
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
26130
|
+
*
|
|
26131
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
26132
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
26133
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
26134
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
26135
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
26136
|
+
*/
|
|
26137
|
+
var ExportDenseRangeSchema = object({
|
|
26138
|
+
fromSec: number().nonnegative(),
|
|
26139
|
+
toSec: number().nonnegative()
|
|
26140
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
26141
|
+
/**
|
|
26142
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
26143
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
26144
|
+
*
|
|
26145
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
26146
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
26147
|
+
*/
|
|
26148
|
+
var ExportDenseSchema = object({
|
|
26149
|
+
everyMs: number().int().positive(),
|
|
26150
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
26151
|
+
});
|
|
25580
26152
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
25581
26153
|
var ExportTimelapseSchema = object({
|
|
25582
26154
|
everyMs: number().int().positive(),
|
|
25583
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
26155
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
26156
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
26157
|
+
dense: ExportDenseSchema.optional()
|
|
26158
|
+
}).superRefine((v, ctx) => {
|
|
26159
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
26160
|
+
code: ZodIssueCode.custom,
|
|
26161
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
26162
|
+
path: ["dense", "everyMs"]
|
|
26163
|
+
});
|
|
25584
26164
|
});
|
|
25585
26165
|
/**
|
|
25586
26166
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -25638,6 +26218,19 @@ var ExportDownloadSchema = object({
|
|
|
25638
26218
|
url: string(),
|
|
25639
26219
|
endpoints: array(string())
|
|
25640
26220
|
});
|
|
26221
|
+
/**
|
|
26222
|
+
* A finished export's bytes, inline.
|
|
26223
|
+
*
|
|
26224
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
26225
|
+
* against, so nobody has to infer it from the base64 length.
|
|
26226
|
+
*/
|
|
26227
|
+
var ExportBytesSchema = object({
|
|
26228
|
+
base64: string(),
|
|
26229
|
+
contentType: string(),
|
|
26230
|
+
/** Suggested filename, extension included. */
|
|
26231
|
+
name: string(),
|
|
26232
|
+
bytes: number().int().nonnegative()
|
|
26233
|
+
});
|
|
25641
26234
|
method(object({
|
|
25642
26235
|
deviceId: number(),
|
|
25643
26236
|
profile: string(),
|
|
@@ -25662,6 +26255,9 @@ method(object({
|
|
|
25662
26255
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
25663
26256
|
kind: "query",
|
|
25664
26257
|
auth: "protected"
|
|
26258
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
26259
|
+
kind: "query",
|
|
26260
|
+
auth: "protected"
|
|
25665
26261
|
});
|
|
25666
26262
|
/**
|
|
25667
26263
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -31163,6 +31759,12 @@ Object.freeze({
|
|
|
31163
31759
|
addonId: null,
|
|
31164
31760
|
access: "delete"
|
|
31165
31761
|
},
|
|
31762
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31763
|
+
capName: "osd-manager",
|
|
31764
|
+
capScope: "system",
|
|
31765
|
+
addonId: null,
|
|
31766
|
+
access: "create"
|
|
31767
|
+
},
|
|
31166
31768
|
"osdManager.getConditionSupport": {
|
|
31167
31769
|
capName: "osd-manager",
|
|
31168
31770
|
capScope: "system",
|
|
@@ -31259,7 +31861,7 @@ Object.freeze({
|
|
|
31259
31861
|
addonId: null,
|
|
31260
31862
|
access: "create"
|
|
31261
31863
|
},
|
|
31262
|
-
"pipelineAnalytics.
|
|
31864
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
31263
31865
|
capName: "pipeline-analytics",
|
|
31264
31866
|
capScope: "device",
|
|
31265
31867
|
addonId: null,
|
|
@@ -31331,12 +31933,6 @@ Object.freeze({
|
|
|
31331
31933
|
addonId: null,
|
|
31332
31934
|
access: "view"
|
|
31333
31935
|
},
|
|
31334
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
31335
|
-
capName: "pipeline-analytics",
|
|
31336
|
-
capScope: "device",
|
|
31337
|
-
addonId: null,
|
|
31338
|
-
access: "view"
|
|
31339
|
-
},
|
|
31340
31936
|
"pipelineAnalytics.getMotionEvents": {
|
|
31341
31937
|
capName: "pipeline-analytics",
|
|
31342
31938
|
capScope: "device",
|
|
@@ -31373,6 +31969,12 @@ Object.freeze({
|
|
|
31373
31969
|
addonId: null,
|
|
31374
31970
|
access: "view"
|
|
31375
31971
|
},
|
|
31972
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31973
|
+
capName: "pipeline-analytics",
|
|
31974
|
+
capScope: "device",
|
|
31975
|
+
addonId: null,
|
|
31976
|
+
access: "view"
|
|
31977
|
+
},
|
|
31376
31978
|
"pipelineAnalytics.getTrack": {
|
|
31377
31979
|
capName: "pipeline-analytics",
|
|
31378
31980
|
capScope: "device",
|
|
@@ -31451,6 +32053,12 @@ Object.freeze({
|
|
|
31451
32053
|
addonId: null,
|
|
31452
32054
|
access: "view"
|
|
31453
32055
|
},
|
|
32056
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
32057
|
+
capName: "pipeline-analytics",
|
|
32058
|
+
capScope: "device",
|
|
32059
|
+
addonId: null,
|
|
32060
|
+
access: "create"
|
|
32061
|
+
},
|
|
31454
32062
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
31455
32063
|
capName: "pipeline-analytics",
|
|
31456
32064
|
capScope: "device",
|
|
@@ -31481,7 +32089,7 @@ Object.freeze({
|
|
|
31481
32089
|
addonId: null,
|
|
31482
32090
|
access: "create"
|
|
31483
32091
|
},
|
|
31484
|
-
"pipelineAnalytics.
|
|
32092
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
31485
32093
|
capName: "pipeline-analytics",
|
|
31486
32094
|
capScope: "device",
|
|
31487
32095
|
addonId: null,
|
|
@@ -31493,6 +32101,12 @@ Object.freeze({
|
|
|
31493
32101
|
addonId: null,
|
|
31494
32102
|
access: "create"
|
|
31495
32103
|
},
|
|
32104
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
32105
|
+
capName: "pipeline-analytics",
|
|
32106
|
+
capScope: "device",
|
|
32107
|
+
addonId: null,
|
|
32108
|
+
access: "create"
|
|
32109
|
+
},
|
|
31496
32110
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
31497
32111
|
capName: "pipeline-analytics",
|
|
31498
32112
|
capScope: "device",
|
|
@@ -31517,6 +32131,12 @@ Object.freeze({
|
|
|
31517
32131
|
addonId: null,
|
|
31518
32132
|
access: "create"
|
|
31519
32133
|
},
|
|
32134
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
32135
|
+
capName: "pipeline-analytics",
|
|
32136
|
+
capScope: "device",
|
|
32137
|
+
addonId: null,
|
|
32138
|
+
access: "create"
|
|
32139
|
+
},
|
|
31520
32140
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
31521
32141
|
capName: "pipeline-analytics",
|
|
31522
32142
|
capScope: "device",
|
|
@@ -31883,6 +32503,12 @@ Object.freeze({
|
|
|
31883
32503
|
addonId: null,
|
|
31884
32504
|
access: "view"
|
|
31885
32505
|
},
|
|
32506
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
32507
|
+
capName: "pipeline-orchestrator",
|
|
32508
|
+
capScope: "system",
|
|
32509
|
+
addonId: null,
|
|
32510
|
+
access: "create"
|
|
32511
|
+
},
|
|
31886
32512
|
"pipelineOrchestrator.rebalance": {
|
|
31887
32513
|
capName: "pipeline-orchestrator",
|
|
31888
32514
|
capScope: "system",
|
|
@@ -31907,6 +32533,12 @@ Object.freeze({
|
|
|
31907
32533
|
addonId: null,
|
|
31908
32534
|
access: "view"
|
|
31909
32535
|
},
|
|
32536
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
32537
|
+
capName: "pipeline-orchestrator",
|
|
32538
|
+
capScope: "system",
|
|
32539
|
+
addonId: null,
|
|
32540
|
+
access: "create"
|
|
32541
|
+
},
|
|
31910
32542
|
"pipelineOrchestrator.saveTemplate": {
|
|
31911
32543
|
capName: "pipeline-orchestrator",
|
|
31912
32544
|
capScope: "system",
|
|
@@ -32303,7 +32935,13 @@ Object.freeze({
|
|
|
32303
32935
|
addonId: null,
|
|
32304
32936
|
access: "create"
|
|
32305
32937
|
},
|
|
32306
|
-
"recording.
|
|
32938
|
+
"recording.cancelRelocateJob": {
|
|
32939
|
+
capName: "recording",
|
|
32940
|
+
capScope: "system",
|
|
32941
|
+
addonId: null,
|
|
32942
|
+
access: "create"
|
|
32943
|
+
},
|
|
32944
|
+
"recording.cancelStorageMigrationMove": {
|
|
32307
32945
|
capName: "recording",
|
|
32308
32946
|
capScope: "system",
|
|
32309
32947
|
addonId: null,
|
|
@@ -32339,7 +32977,7 @@ Object.freeze({
|
|
|
32339
32977
|
addonId: null,
|
|
32340
32978
|
access: "view"
|
|
32341
32979
|
},
|
|
32342
|
-
"recording.
|
|
32980
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
32343
32981
|
capName: "recording",
|
|
32344
32982
|
capScope: "system",
|
|
32345
32983
|
addonId: null,
|
|
@@ -32357,12 +32995,30 @@ Object.freeze({
|
|
|
32357
32995
|
addonId: null,
|
|
32358
32996
|
access: "view"
|
|
32359
32997
|
},
|
|
32998
|
+
"recording.listRelocateJobs": {
|
|
32999
|
+
capName: "recording",
|
|
33000
|
+
capScope: "system",
|
|
33001
|
+
addonId: null,
|
|
33002
|
+
access: "view"
|
|
33003
|
+
},
|
|
32360
33004
|
"recording.locateSegment": {
|
|
32361
33005
|
capName: "recording",
|
|
32362
33006
|
capScope: "system",
|
|
32363
33007
|
addonId: null,
|
|
32364
33008
|
access: "view"
|
|
32365
33009
|
},
|
|
33010
|
+
"recording.pauseForStorageMigration": {
|
|
33011
|
+
capName: "recording",
|
|
33012
|
+
capScope: "system",
|
|
33013
|
+
addonId: null,
|
|
33014
|
+
access: "create"
|
|
33015
|
+
},
|
|
33016
|
+
"recording.planStorageRebalance": {
|
|
33017
|
+
capName: "recording",
|
|
33018
|
+
capScope: "system",
|
|
33019
|
+
addonId: null,
|
|
33020
|
+
access: "view"
|
|
33021
|
+
},
|
|
32366
33022
|
"recording.pruneFootage": {
|
|
32367
33023
|
capName: "recording",
|
|
32368
33024
|
capScope: "system",
|
|
@@ -32381,6 +33037,12 @@ Object.freeze({
|
|
|
32381
33037
|
addonId: null,
|
|
32382
33038
|
access: "view"
|
|
32383
33039
|
},
|
|
33040
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
33041
|
+
capName: "recording",
|
|
33042
|
+
capScope: "system",
|
|
33043
|
+
addonId: null,
|
|
33044
|
+
access: "create"
|
|
33045
|
+
},
|
|
32384
33046
|
"recording.relocateFootage": {
|
|
32385
33047
|
capName: "recording",
|
|
32386
33048
|
capScope: "system",
|
|
@@ -32405,44 +33067,68 @@ Object.freeze({
|
|
|
32405
33067
|
addonId: null,
|
|
32406
33068
|
access: "create"
|
|
32407
33069
|
},
|
|
33070
|
+
"recording.resumeForStorageMigration": {
|
|
33071
|
+
capName: "recording",
|
|
33072
|
+
capScope: "system",
|
|
33073
|
+
addonId: null,
|
|
33074
|
+
access: "create"
|
|
33075
|
+
},
|
|
32408
33076
|
"recording.setDeviceConfig": {
|
|
32409
33077
|
capName: "recording",
|
|
32410
33078
|
capScope: "system",
|
|
32411
33079
|
addonId: null,
|
|
32412
33080
|
access: "create"
|
|
32413
33081
|
},
|
|
33082
|
+
"recording.startStorageMigrationMove": {
|
|
33083
|
+
capName: "recording",
|
|
33084
|
+
capScope: "system",
|
|
33085
|
+
addonId: null,
|
|
33086
|
+
access: "create"
|
|
33087
|
+
},
|
|
33088
|
+
"recording.startStorageRebalance": {
|
|
33089
|
+
capName: "recording",
|
|
33090
|
+
capScope: "system",
|
|
33091
|
+
addonId: null,
|
|
33092
|
+
access: "create"
|
|
33093
|
+
},
|
|
32414
33094
|
"recordingExport.cancelExport": {
|
|
32415
|
-
capName: "
|
|
33095
|
+
capName: "recording-export",
|
|
32416
33096
|
capScope: "system",
|
|
32417
33097
|
addonId: null,
|
|
32418
33098
|
access: "create"
|
|
32419
33099
|
},
|
|
32420
33100
|
"recordingExport.createExport": {
|
|
32421
|
-
capName: "
|
|
33101
|
+
capName: "recording-export",
|
|
32422
33102
|
capScope: "system",
|
|
32423
33103
|
addonId: null,
|
|
32424
33104
|
access: "create"
|
|
32425
33105
|
},
|
|
32426
33106
|
"recordingExport.deleteExport": {
|
|
32427
|
-
capName: "
|
|
33107
|
+
capName: "recording-export",
|
|
32428
33108
|
capScope: "system",
|
|
32429
33109
|
addonId: null,
|
|
32430
33110
|
access: "delete"
|
|
32431
33111
|
},
|
|
32432
33112
|
"recordingExport.getDownloadUrl": {
|
|
32433
|
-
capName: "
|
|
33113
|
+
capName: "recording-export",
|
|
32434
33114
|
capScope: "system",
|
|
32435
33115
|
addonId: null,
|
|
32436
33116
|
access: "view"
|
|
32437
33117
|
},
|
|
32438
33118
|
"recordingExport.getExport": {
|
|
32439
|
-
capName: "
|
|
33119
|
+
capName: "recording-export",
|
|
32440
33120
|
capScope: "system",
|
|
32441
33121
|
addonId: null,
|
|
32442
33122
|
access: "view"
|
|
32443
33123
|
},
|
|
32444
33124
|
"recordingExport.listExports": {
|
|
32445
|
-
capName: "
|
|
33125
|
+
capName: "recording-export",
|
|
33126
|
+
capScope: "system",
|
|
33127
|
+
addonId: null,
|
|
33128
|
+
access: "view"
|
|
33129
|
+
},
|
|
33130
|
+
"recordingExport.readExportBytes": {
|
|
33131
|
+
capName: "recording-export",
|
|
32446
33132
|
capScope: "system",
|
|
32447
33133
|
addonId: null,
|
|
32448
33134
|
access: "view"
|
|
@@ -32801,6 +33487,30 @@ Object.freeze({
|
|
|
32801
33487
|
addonId: null,
|
|
32802
33488
|
access: "view"
|
|
32803
33489
|
},
|
|
33490
|
+
"storageMigration.cancel": {
|
|
33491
|
+
capName: "storage-migration",
|
|
33492
|
+
capScope: "system",
|
|
33493
|
+
addonId: null,
|
|
33494
|
+
access: "create"
|
|
33495
|
+
},
|
|
33496
|
+
"storageMigration.plan": {
|
|
33497
|
+
capName: "storage-migration",
|
|
33498
|
+
capScope: "system",
|
|
33499
|
+
addonId: null,
|
|
33500
|
+
access: "view"
|
|
33501
|
+
},
|
|
33502
|
+
"storageMigration.start": {
|
|
33503
|
+
capName: "storage-migration",
|
|
33504
|
+
capScope: "system",
|
|
33505
|
+
addonId: null,
|
|
33506
|
+
access: "create"
|
|
33507
|
+
},
|
|
33508
|
+
"storageMigration.status": {
|
|
33509
|
+
capName: "storage-migration",
|
|
33510
|
+
capScope: "system",
|
|
33511
|
+
addonId: null,
|
|
33512
|
+
access: "view"
|
|
33513
|
+
},
|
|
32804
33514
|
"storageProvider.abortUpload": {
|
|
32805
33515
|
capName: "storage-provider",
|
|
32806
33516
|
capScope: "system",
|
|
@@ -33179,12 +33889,42 @@ Object.freeze({
|
|
|
33179
33889
|
addonId: null,
|
|
33180
33890
|
access: "create"
|
|
33181
33891
|
},
|
|
33892
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33893
|
+
capName: "terminal-session",
|
|
33894
|
+
capScope: "system",
|
|
33895
|
+
addonId: null,
|
|
33896
|
+
access: "create"
|
|
33897
|
+
},
|
|
33182
33898
|
"terminalSession.close": {
|
|
33183
33899
|
capName: "terminal-session",
|
|
33184
33900
|
capScope: "system",
|
|
33185
33901
|
addonId: null,
|
|
33186
33902
|
access: "create"
|
|
33187
33903
|
},
|
|
33904
|
+
"terminalSession.createInstance": {
|
|
33905
|
+
capName: "terminal-session",
|
|
33906
|
+
capScope: "system",
|
|
33907
|
+
addonId: null,
|
|
33908
|
+
access: "create"
|
|
33909
|
+
},
|
|
33910
|
+
"terminalSession.deleteInstance": {
|
|
33911
|
+
capName: "terminal-session",
|
|
33912
|
+
capScope: "system",
|
|
33913
|
+
addonId: null,
|
|
33914
|
+
access: "delete"
|
|
33915
|
+
},
|
|
33916
|
+
"terminalSession.listInstances": {
|
|
33917
|
+
capName: "terminal-session",
|
|
33918
|
+
capScope: "system",
|
|
33919
|
+
addonId: null,
|
|
33920
|
+
access: "view"
|
|
33921
|
+
},
|
|
33922
|
+
"terminalSession.listLegacyCameras": {
|
|
33923
|
+
capName: "terminal-session",
|
|
33924
|
+
capScope: "system",
|
|
33925
|
+
addonId: null,
|
|
33926
|
+
access: "view"
|
|
33927
|
+
},
|
|
33188
33928
|
"terminalSession.listProfiles": {
|
|
33189
33929
|
capName: "terminal-session",
|
|
33190
33930
|
capScope: "system",
|
|
@@ -33215,6 +33955,12 @@ Object.freeze({
|
|
|
33215
33955
|
addonId: null,
|
|
33216
33956
|
access: "create"
|
|
33217
33957
|
},
|
|
33958
|
+
"terminalSession.setInstanceEnabled": {
|
|
33959
|
+
capName: "terminal-session",
|
|
33960
|
+
capScope: "system",
|
|
33961
|
+
addonId: null,
|
|
33962
|
+
access: "create"
|
|
33963
|
+
},
|
|
33218
33964
|
"terminalSession.writeInput": {
|
|
33219
33965
|
capName: "terminal-session",
|
|
33220
33966
|
capScope: "system",
|
|
@@ -33759,6 +34505,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33759
34505
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33760
34506
|
var PriorityField = number().int().min(1).max(5);
|
|
33761
34507
|
/**
|
|
34508
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
34509
|
+
*
|
|
34510
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
34511
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
34512
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
34513
|
+
*
|
|
34514
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
34515
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
34516
|
+
*
|
|
34517
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
34518
|
+
*
|
|
34519
|
+
* 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.
|
|
34520
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
34521
|
+
* and therefore the length of a quiet night, does not move.
|
|
34522
|
+
*
|
|
34523
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
34524
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
34525
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
34526
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
34527
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
34528
|
+
*/
|
|
34529
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
34530
|
+
/**
|
|
34531
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
34532
|
+
*
|
|
34533
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
34534
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
34535
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
34536
|
+
* that range every ~583 ms.
|
|
34537
|
+
*
|
|
34538
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
34539
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
34540
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
34541
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
34542
|
+
* schema change and are the tracked follow-up.
|
|
34543
|
+
*
|
|
34544
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
34545
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
34546
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
34547
|
+
* happened.
|
|
34548
|
+
*/
|
|
34549
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
34550
|
+
/**
|
|
34551
|
+
* Caption burned into the notification's preview frame.
|
|
34552
|
+
*
|
|
34553
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
34554
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
34555
|
+
* templating dialect for one field would be a second thing to explain.
|
|
34556
|
+
*
|
|
34557
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
34558
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
34559
|
+
* the reason this is not `.min(1)`.
|
|
34560
|
+
*/
|
|
34561
|
+
var PreviewTextField = string().max(200);
|
|
34562
|
+
/**
|
|
34563
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
34564
|
+
*
|
|
34565
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
34566
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
34567
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
34568
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
34569
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
34570
|
+
* them.
|
|
34571
|
+
*
|
|
34572
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
34573
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
34574
|
+
* paying that on the deploy that shipped it.
|
|
34575
|
+
*
|
|
34576
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
34577
|
+
*/
|
|
34578
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
34579
|
+
/**
|
|
34580
|
+
* Which detection classes the notification reports counts for.
|
|
34581
|
+
*
|
|
34582
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
34583
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
34584
|
+
* class the window actually contained", which is what an operator who never
|
|
34585
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
34586
|
+
* counts cars all night).
|
|
34587
|
+
*
|
|
34588
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
34589
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
34590
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
34591
|
+
* not emit.
|
|
34592
|
+
*
|
|
34593
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
34594
|
+
* - `{{detections}}` — total over the reported classes
|
|
34595
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
34596
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
34597
|
+
* one per class, `count_` + the class name
|
|
34598
|
+
*
|
|
34599
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
34600
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
34601
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
34602
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
34603
|
+
*/
|
|
34604
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
34605
|
+
/**
|
|
33762
34606
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33763
34607
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33764
34608
|
* here (see the ownership note above).
|
|
@@ -33778,9 +34622,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33778
34622
|
cadenceSec: CadenceSecField.default(15),
|
|
33779
34623
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33780
34624
|
framerate: FramerateField.default(10),
|
|
34625
|
+
/**
|
|
34626
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
34627
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
34628
|
+
* field gets.
|
|
34629
|
+
*/
|
|
34630
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34631
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
34632
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33781
34633
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33782
34634
|
targets: TargetsField,
|
|
33783
34635
|
template: TimelapseTemplateSchema.optional(),
|
|
34636
|
+
/**
|
|
34637
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
34638
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
34639
|
+
*
|
|
34640
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
34641
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
34642
|
+
* silently clear the caption too.
|
|
34643
|
+
*/
|
|
34644
|
+
previewText: PreviewTextField.optional(),
|
|
34645
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
34646
|
+
previewMode: PreviewModeField.default("image"),
|
|
34647
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
34648
|
+
reportClasses: ReportClassesField.optional(),
|
|
33784
34649
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33785
34650
|
priority: PriorityField.default(3)
|
|
33786
34651
|
});
|
|
@@ -33791,8 +34656,13 @@ object({
|
|
|
33791
34656
|
schedule: NcScheduleSchema.optional(),
|
|
33792
34657
|
cadenceSec: CadenceSecField.optional(),
|
|
33793
34658
|
framerate: FramerateField.optional(),
|
|
34659
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34660
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33794
34661
|
targets: TargetsField.optional(),
|
|
33795
34662
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
34663
|
+
previewText: PreviewTextField.optional(),
|
|
34664
|
+
previewMode: PreviewModeField.optional(),
|
|
34665
|
+
reportClasses: ReportClassesField.optional(),
|
|
33796
34666
|
priority: PriorityField.optional()
|
|
33797
34667
|
});
|
|
33798
34668
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33804,10 +34674,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33804
34674
|
*/
|
|
33805
34675
|
ownerUserId: string().optional(),
|
|
33806
34676
|
/**
|
|
33807
|
-
* Epoch-ms of the
|
|
33808
|
-
*
|
|
34677
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
34678
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
34679
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33809
34680
|
*/
|
|
33810
34681
|
lastGeneratedAt: number().optional(),
|
|
34682
|
+
/**
|
|
34683
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
34684
|
+
* re-generation guard's real durable state.
|
|
34685
|
+
*
|
|
34686
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
34687
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
34688
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
34689
|
+
* already done — and B's night is gone for good, because the window will not
|
|
34690
|
+
* come back.
|
|
34691
|
+
*
|
|
34692
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
34693
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
34694
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
34695
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
34696
|
+
* once, on the deploy that shipped the map.
|
|
34697
|
+
*/
|
|
34698
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33811
34699
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33812
34700
|
createdBy: string(),
|
|
33813
34701
|
createdAt: number(),
|