@camstack/addon-provider-wyze 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 +954 -62
- package/dist/addon.mjs +954 -62
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -7215,8 +7215,31 @@ var AdoptionJobSchema = object({
|
|
|
7215
7215
|
error: string().nullable()
|
|
7216
7216
|
});
|
|
7217
7217
|
/**
|
|
7218
|
-
* Per-camera FUNCTION SWITCHES
|
|
7219
|
-
*
|
|
7218
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7219
|
+
*
|
|
7220
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7221
|
+
*
|
|
7222
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7223
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7224
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7225
|
+
* every function already had a settings page of its own, and a second place to
|
|
7226
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7227
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7228
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7229
|
+
* (which was always first-class; the switch was a veneer over
|
|
7230
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7231
|
+
* per-device setting, the two camera planes to their own components.
|
|
7232
|
+
*
|
|
7233
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7234
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7235
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7236
|
+
* never about a control panel.
|
|
7237
|
+
*
|
|
7238
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7239
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7240
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7241
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7242
|
+
* stop; nothing new may be built on it.
|
|
7220
7243
|
*
|
|
7221
7244
|
* ## This file adds no state
|
|
7222
7245
|
*
|
|
@@ -7561,14 +7584,21 @@ var RecordingConfigSchema = object({
|
|
|
7561
7584
|
/**
|
|
7562
7585
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7563
7586
|
*
|
|
7564
|
-
* One shape shared by the recorder
|
|
7565
|
-
*
|
|
7566
|
-
*
|
|
7567
|
-
*
|
|
7568
|
-
*
|
|
7569
|
-
|
|
7587
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7588
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7589
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7590
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7591
|
+
* addon surface.
|
|
7592
|
+
*/
|
|
7593
|
+
/**
|
|
7594
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7595
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7596
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7597
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7598
|
+
* runs at all.
|
|
7570
7599
|
*/
|
|
7571
7600
|
var RelocateJobStateSchema = _enum([
|
|
7601
|
+
"queued",
|
|
7572
7602
|
"running",
|
|
7573
7603
|
"done",
|
|
7574
7604
|
"failed",
|
|
@@ -7593,19 +7623,109 @@ var RelocateJobSchema = object({
|
|
|
7593
7623
|
finishedAt: number().nullable(),
|
|
7594
7624
|
error: string().nullable()
|
|
7595
7625
|
});
|
|
7626
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7627
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7628
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7596
7629
|
var RelocateFootageInputSchema = object({
|
|
7597
|
-
deviceId: number().optional(),
|
|
7598
7630
|
fromLocationId: string(),
|
|
7599
7631
|
toLocationId: string(),
|
|
7600
7632
|
entities: array(_enum(["segments"])).optional(),
|
|
7633
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7634
|
+
* pre-orchestration compatibility path. */
|
|
7635
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7636
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7637
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7638
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7639
|
+
deviceId: number().int().optional(),
|
|
7640
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7641
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7642
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7643
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7644
|
+
profiles: array(string()).optional(),
|
|
7601
7645
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7602
7646
|
* never allowed to starve live writers. */
|
|
7603
7647
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7604
7648
|
});
|
|
7605
|
-
|
|
7606
|
-
|
|
7649
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7650
|
+
* from persistent recording settings: a migration never changes
|
|
7651
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7652
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7653
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7654
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7607
7655
|
toLocationId: string(),
|
|
7608
7656
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7657
|
+
}).extend({ leaseId: string().min(1) });
|
|
7658
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7659
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7660
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7661
|
+
var StorageMigrationClassSchema = _enum([
|
|
7662
|
+
"recordings",
|
|
7663
|
+
"recordingsLow",
|
|
7664
|
+
"eventMedia"
|
|
7665
|
+
]);
|
|
7666
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7667
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7668
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7669
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7670
|
+
recordings: string().min(1).optional(),
|
|
7671
|
+
recordingsLow: string().min(1).optional(),
|
|
7672
|
+
eventMedia: string().min(1).optional()
|
|
7673
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7674
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7675
|
+
var StorageMigrationInputSchema = object({
|
|
7676
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7677
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7678
|
+
});
|
|
7679
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7680
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7681
|
+
* verified. */
|
|
7682
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7683
|
+
"planning",
|
|
7684
|
+
"pausing",
|
|
7685
|
+
"moving",
|
|
7686
|
+
"verifying",
|
|
7687
|
+
"repointing",
|
|
7688
|
+
"refreshing",
|
|
7689
|
+
"resuming",
|
|
7690
|
+
"done",
|
|
7691
|
+
"failed",
|
|
7692
|
+
"cancelled"
|
|
7693
|
+
]);
|
|
7694
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7695
|
+
"pipeline",
|
|
7696
|
+
"recorder",
|
|
7697
|
+
"analytics"
|
|
7698
|
+
]);
|
|
7699
|
+
var StorageMigrationMoveSchema = object({
|
|
7700
|
+
storageClass: StorageMigrationClassSchema,
|
|
7701
|
+
fromLocationId: string(),
|
|
7702
|
+
toLocationId: string(),
|
|
7703
|
+
moverJobId: string().nullable(),
|
|
7704
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7705
|
+
error: string().nullable()
|
|
7706
|
+
});
|
|
7707
|
+
var StorageMigrationJobSchema = object({
|
|
7708
|
+
jobId: string(),
|
|
7709
|
+
phase: StorageMigrationPhaseSchema,
|
|
7710
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7711
|
+
throttleMbps: number(),
|
|
7712
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7713
|
+
pauseLeaseId: string().nullable(),
|
|
7714
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7715
|
+
repointed: boolean(),
|
|
7716
|
+
cancelRequested: boolean(),
|
|
7717
|
+
startedAt: number(),
|
|
7718
|
+
updatedAt: number(),
|
|
7719
|
+
finishedAt: number().nullable(),
|
|
7720
|
+
error: string().nullable()
|
|
7721
|
+
});
|
|
7722
|
+
var StorageMigrationPlanSchema = object({
|
|
7723
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7724
|
+
moves: array(object({
|
|
7725
|
+
storageClass: StorageMigrationClassSchema,
|
|
7726
|
+
fromLocationId: string(),
|
|
7727
|
+
toLocationId: string()
|
|
7728
|
+
}))
|
|
7609
7729
|
});
|
|
7610
7730
|
/**
|
|
7611
7731
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7657,6 +7777,21 @@ var StorageLocationSchema = object({
|
|
|
7657
7777
|
nodeId: string().optional(),
|
|
7658
7778
|
isDefault: boolean().default(false),
|
|
7659
7779
|
isSystem: boolean().default(false),
|
|
7780
|
+
/**
|
|
7781
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7782
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7783
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7784
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7785
|
+
* extended to add the next consumer.
|
|
7786
|
+
*
|
|
7787
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7788
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7789
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7790
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7791
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7792
|
+
* always stamped `true`.
|
|
7793
|
+
*/
|
|
7794
|
+
enabled: boolean().optional(),
|
|
7660
7795
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7661
7796
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7662
7797
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12226,7 +12361,8 @@ method(object({
|
|
|
12226
12361
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12227
12362
|
/**
|
|
12228
12363
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12229
|
-
* filesystem
|
|
12364
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12365
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12230
12366
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12231
12367
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12232
12368
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14067,6 +14203,13 @@ var MaskGridDimsSchema = object({
|
|
|
14067
14203
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14068
14204
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14069
14205
|
* one trigger.
|
|
14206
|
+
*
|
|
14207
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14208
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14209
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14210
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14211
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14212
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14070
14213
|
*/
|
|
14071
14214
|
var NcDeliverySchema = _enum([
|
|
14072
14215
|
"immediate",
|
|
@@ -14081,15 +14224,32 @@ var NcDeliverySchema = _enum([
|
|
|
14081
14224
|
* depend on a provider's raw event name or payload shape.
|
|
14082
14225
|
*/
|
|
14083
14226
|
var NcSystemEventKindSchema = _enum([
|
|
14084
|
-
"
|
|
14085
|
-
"
|
|
14227
|
+
"device-online",
|
|
14228
|
+
"device-offline",
|
|
14229
|
+
"device-disabled",
|
|
14230
|
+
"device-enabled",
|
|
14086
14231
|
"stream-online",
|
|
14087
14232
|
"stream-offline",
|
|
14088
14233
|
"node-online",
|
|
14089
14234
|
"node-offline",
|
|
14090
14235
|
"addon-update-available",
|
|
14091
|
-
"server-update-available"
|
|
14236
|
+
"server-update-available",
|
|
14237
|
+
"alarm-triggered",
|
|
14238
|
+
"alarm-armed",
|
|
14239
|
+
"alarm-disarmed",
|
|
14240
|
+
"camera-online",
|
|
14241
|
+
"camera-offline",
|
|
14242
|
+
"camera-disabled",
|
|
14243
|
+
"camera-enabled"
|
|
14244
|
+
]);
|
|
14245
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14246
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14247
|
+
"camera-online",
|
|
14248
|
+
"camera-offline",
|
|
14249
|
+
"camera-disabled",
|
|
14250
|
+
"camera-enabled"
|
|
14092
14251
|
]);
|
|
14252
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14093
14253
|
/**
|
|
14094
14254
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14095
14255
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14098,6 +14258,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14098
14258
|
var NcSystemEventConditionSchema = object({
|
|
14099
14259
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14100
14260
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14261
|
+
/**
|
|
14262
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14263
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14264
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14265
|
+
*
|
|
14266
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14267
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14268
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14269
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14270
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14271
|
+
*/
|
|
14272
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14101
14273
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14102
14274
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14103
14275
|
});
|
|
@@ -14148,6 +14320,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14148
14320
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14149
14321
|
});
|
|
14150
14322
|
/**
|
|
14323
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14324
|
+
*
|
|
14325
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14326
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14327
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14328
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14329
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14330
|
+
*
|
|
14331
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14332
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14333
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14334
|
+
*
|
|
14335
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14336
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14337
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14338
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14339
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14340
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14341
|
+
* ZodEffects the cap path would have to special-case).
|
|
14342
|
+
*
|
|
14343
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14344
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14345
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14346
|
+
* `samplingSeconds` decorative.
|
|
14347
|
+
*
|
|
14348
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14349
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14350
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14351
|
+
* an operator who typed `dog` mean the same thing.
|
|
14352
|
+
*/
|
|
14353
|
+
var NcAudioConditionSchema = object({
|
|
14354
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14355
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14356
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14357
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14358
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14359
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14360
|
+
/** Length of the sampling window in seconds. */
|
|
14361
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14362
|
+
});
|
|
14363
|
+
/**
|
|
14151
14364
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14152
14365
|
*
|
|
14153
14366
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14420,7 +14633,33 @@ var NcConditionsSchema = object({
|
|
|
14420
14633
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14421
14634
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14422
14635
|
*/
|
|
14423
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14636
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14637
|
+
/**
|
|
14638
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14639
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14640
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14641
|
+
* a window that is not full yet, neither filter given). See
|
|
14642
|
+
* {@link NcAudioCondition}.
|
|
14643
|
+
*
|
|
14644
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14645
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14646
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14647
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14648
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14649
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14650
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14651
|
+
*
|
|
14652
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14653
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14654
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14655
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14656
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14657
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14658
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14659
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14660
|
+
* does an audio rule become authorable.
|
|
14661
|
+
*/
|
|
14662
|
+
audio: NcAudioConditionSchema.optional()
|
|
14424
14663
|
});
|
|
14425
14664
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14426
14665
|
var NcRuleTargetSchema = object({
|
|
@@ -14534,6 +14773,73 @@ var NcThrottleSchema = object({
|
|
|
14534
14773
|
*/
|
|
14535
14774
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14536
14775
|
});
|
|
14776
|
+
/**
|
|
14777
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14778
|
+
* it judges may be.
|
|
14779
|
+
*
|
|
14780
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14781
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14782
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14783
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14784
|
+
* tokens for pixels the model pools away.
|
|
14785
|
+
*/
|
|
14786
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14787
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14788
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14789
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14790
|
+
var NcConfirmExpectSchema = object({
|
|
14791
|
+
op: _enum([
|
|
14792
|
+
">=",
|
|
14793
|
+
">",
|
|
14794
|
+
"<=",
|
|
14795
|
+
"<",
|
|
14796
|
+
"=="
|
|
14797
|
+
]),
|
|
14798
|
+
count: number().int().min(0).max(1e3)
|
|
14799
|
+
});
|
|
14800
|
+
/**
|
|
14801
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14802
|
+
* to ship and says whether it agrees with the rule.
|
|
14803
|
+
*
|
|
14804
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14805
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14806
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14807
|
+
*
|
|
14808
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14809
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14810
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14811
|
+
* open looks in the log exactly like a gate that works.
|
|
14812
|
+
*
|
|
14813
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14814
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14815
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14816
|
+
* above rather than trusting a parse it may never have seen.
|
|
14817
|
+
*/
|
|
14818
|
+
var NcConfirmSchema = object({
|
|
14819
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14820
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14821
|
+
enabled: boolean().default(false),
|
|
14822
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14823
|
+
profileId: string().optional(),
|
|
14824
|
+
/**
|
|
14825
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14826
|
+
* from the rule (its class and its expectation).
|
|
14827
|
+
*
|
|
14828
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14829
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14830
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14831
|
+
* turn and only rule-authored words land here.
|
|
14832
|
+
*/
|
|
14833
|
+
prompt: string().max(1e3).optional(),
|
|
14834
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14835
|
+
* own boolean verdict decides. */
|
|
14836
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14837
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14838
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14839
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14840
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14841
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14842
|
+
});
|
|
14537
14843
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14538
14844
|
var NcRuleInputSchema = object({
|
|
14539
14845
|
name: string().min(1).max(200),
|
|
@@ -14594,7 +14900,13 @@ var NcRuleInputSchema = object({
|
|
|
14594
14900
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14595
14901
|
* shape as every other actuation.
|
|
14596
14902
|
*/
|
|
14597
|
-
actions: NcRuleActionsSchema.optional()
|
|
14903
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14904
|
+
/**
|
|
14905
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14906
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14907
|
+
* did, and absent is the only way to say that without a migration.
|
|
14908
|
+
*/
|
|
14909
|
+
confirm: NcConfirmSchema.optional()
|
|
14598
14910
|
});
|
|
14599
14911
|
/**
|
|
14600
14912
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14605,7 +14917,37 @@ var NcRuleInputSchema = object({
|
|
|
14605
14917
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14606
14918
|
* `updateRule` patch.
|
|
14607
14919
|
*/
|
|
14608
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14920
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14921
|
+
disabledTargetIds: array(string()).optional(),
|
|
14922
|
+
/**
|
|
14923
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14924
|
+
*
|
|
14925
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14926
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14927
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14928
|
+
* one — which made every partial edit destructive:
|
|
14929
|
+
*
|
|
14930
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14931
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14932
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14933
|
+
*
|
|
14934
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14935
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14936
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14937
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14938
|
+
* within a minute of a two-field patch.
|
|
14939
|
+
*
|
|
14940
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14941
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14942
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14943
|
+
* absent key is now genuinely absent.
|
|
14944
|
+
*/
|
|
14945
|
+
enabled: boolean().optional(),
|
|
14946
|
+
conditions: NcConditionsSchema.optional(),
|
|
14947
|
+
media: NcMediaPolicySchema.optional(),
|
|
14948
|
+
throttle: NcThrottleSchema.optional(),
|
|
14949
|
+
priority: number().int().min(1).max(5).optional()
|
|
14950
|
+
});
|
|
14609
14951
|
/** A persisted rule. */
|
|
14610
14952
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14611
14953
|
id: string(),
|
|
@@ -14906,6 +15248,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14906
15248
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14907
15249
|
* copy would lie the first time a rule is disabled.
|
|
14908
15250
|
*/
|
|
15251
|
+
/**
|
|
15252
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15253
|
+
*
|
|
15254
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15255
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15256
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15257
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15258
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15259
|
+
* with the switches the operator actually used.
|
|
15260
|
+
*/
|
|
15261
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15262
|
+
"muted",
|
|
15263
|
+
"detection-off",
|
|
15264
|
+
"offline"
|
|
15265
|
+
]);
|
|
15266
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15267
|
+
deviceId: number().int(),
|
|
15268
|
+
reason: NcAlarmSkipReasonSchema
|
|
15269
|
+
});
|
|
14909
15270
|
var NcAlarmModeCoverageSchema = object({
|
|
14910
15271
|
mode: AlarmArmModeSchema,
|
|
14911
15272
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14913,7 +15274,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14913
15274
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14914
15275
|
allDevices: boolean(),
|
|
14915
15276
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14916
|
-
deviceIds: array(number().int())
|
|
15277
|
+
deviceIds: array(number().int()),
|
|
15278
|
+
/**
|
|
15279
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15280
|
+
* excludes it.
|
|
15281
|
+
*
|
|
15282
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15283
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15284
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15285
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15286
|
+
* alarm tab.
|
|
15287
|
+
*/
|
|
15288
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14917
15289
|
});
|
|
14918
15290
|
var NcAlarmConfigSchema = object({
|
|
14919
15291
|
/**
|
|
@@ -16276,13 +16648,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16276
16648
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16277
16649
|
kind: "mutation",
|
|
16278
16650
|
auth: "admin"
|
|
16279
|
-
}), method(
|
|
16651
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16280
16652
|
kind: "mutation",
|
|
16281
16653
|
auth: "admin"
|
|
16282
|
-
}), method(object({
|
|
16283
|
-
kind: "
|
|
16654
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16655
|
+
kind: "mutation",
|
|
16284
16656
|
auth: "admin"
|
|
16285
|
-
}), method(
|
|
16657
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16658
|
+
kind: "mutation",
|
|
16659
|
+
auth: "admin"
|
|
16660
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16661
|
+
kind: "mutation",
|
|
16662
|
+
auth: "admin"
|
|
16663
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16286
16664
|
kind: "mutation",
|
|
16287
16665
|
auth: "admin"
|
|
16288
16666
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17739,9 +18117,16 @@ var CameraStatusSchema = object({
|
|
|
17739
18117
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17740
18118
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17741
18119
|
/**
|
|
17742
|
-
* Per-camera
|
|
18120
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17743
18121
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17744
18122
|
*
|
|
18123
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18124
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18125
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18126
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18127
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18128
|
+
* the difference between a camera being off and a camera being dead.
|
|
18129
|
+
*
|
|
17745
18130
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17746
18131
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17747
18132
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17812,7 +18197,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17812
18197
|
reachable: boolean(),
|
|
17813
18198
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17814
18199
|
});
|
|
17815
|
-
method(object({
|
|
18200
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18201
|
+
kind: "mutation",
|
|
18202
|
+
auth: "admin"
|
|
18203
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18204
|
+
kind: "mutation",
|
|
18205
|
+
auth: "admin"
|
|
18206
|
+
}), method(object({
|
|
17816
18207
|
deviceId: number(),
|
|
17817
18208
|
agentNodeId: string()
|
|
17818
18209
|
}), object({ success: literal(true) }), {
|
|
@@ -18342,24 +18733,28 @@ var snapshotCapability = {
|
|
|
18342
18733
|
*
|
|
18343
18734
|
* `getSnapshotOverview` is cache-only by contract: it answers from whatever
|
|
18344
18735
|
* the wrapper happens to hold and never captures. Under D93 the client
|
|
18345
|
-
* versions its image URL on that answer, and an image REQUEST
|
|
18346
|
-
*
|
|
18347
|
-
*
|
|
18348
|
-
*
|
|
18349
|
-
*
|
|
18350
|
-
*
|
|
18351
|
-
*
|
|
18352
|
-
*
|
|
18736
|
+
* versions its image URL on that answer, and an image REQUEST was the only
|
|
18737
|
+
* demand signal. Both of those are satisfiable by the client's own image
|
|
18738
|
+
* cache — `expo-image` is URL-keyed and never revalidates — so a URL painted
|
|
18739
|
+
* in a previous session comes off disk with no network, no demand, and no
|
|
18740
|
+
* capture. Measured on the live hub: reopening after two minutes idle
|
|
18741
|
+
* painted 15 of 16 tiles at **168 s old** with zero HTTP requests, and the
|
|
18742
|
+
* fleet only recovered because a later poll happened to observe a different
|
|
18743
|
+
* identity.
|
|
18353
18744
|
*
|
|
18354
18745
|
* ## The two properties that fix it
|
|
18355
18746
|
*
|
|
18356
18747
|
* **It is an RPC, so no client cache can answer it.** The demand signal
|
|
18357
|
-
* always reaches the wrapper. This method therefore
|
|
18358
|
-
*
|
|
18359
|
-
*
|
|
18360
|
-
*
|
|
18361
|
-
*
|
|
18362
|
-
*
|
|
18748
|
+
* always reaches the wrapper. This method therefore CAPTURES, where
|
|
18749
|
+
* `getSnapshotOverview` must never (D93) — the distinction is not "one is
|
|
18750
|
+
* newer" but that the overview poll is app-wide (a capturing overview would
|
|
18751
|
+
* dial every camera on the install) while this is called by a rendered
|
|
18752
|
+
* surface naming the tiles it is actually painting, at the width it is
|
|
18753
|
+
* painting them.
|
|
18754
|
+
*
|
|
18755
|
+
* Since 2026-08-11 this is the ONLY thing that refreshes a snapshot: the
|
|
18756
|
+
* server-side keep-warm loop was removed (operator directive — on-demand,
|
|
18757
|
+
* always), so a camera nobody is looking at costs nothing at all.
|
|
18363
18758
|
*
|
|
18364
18759
|
* **It waits, briefly and boundedly, for the capture it triggered.** The
|
|
18365
18760
|
* returned `capturedAt` is the frame the link will serve, not the frame the
|
|
@@ -18577,6 +18972,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18577
18972
|
locationId: string(),
|
|
18578
18973
|
targetBytes: number().int().positive()
|
|
18579
18974
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18975
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18976
|
+
kind: "mutation",
|
|
18977
|
+
auth: "admin"
|
|
18978
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18979
|
+
kind: "mutation",
|
|
18980
|
+
auth: "admin"
|
|
18981
|
+
});
|
|
18580
18982
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18581
18983
|
providerId: string().min(1),
|
|
18582
18984
|
displayName: string().min(1),
|
|
@@ -18680,6 +19082,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18680
19082
|
label: string(),
|
|
18681
19083
|
description: string().optional()
|
|
18682
19084
|
});
|
|
19085
|
+
/**
|
|
19086
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19087
|
+
* an instance declares a camera.
|
|
19088
|
+
*/
|
|
19089
|
+
var TerminalInstanceInfoSchema = object({
|
|
19090
|
+
instanceId: string(),
|
|
19091
|
+
cameraStableId: string(),
|
|
19092
|
+
nodeId: string(),
|
|
19093
|
+
profileId: string(),
|
|
19094
|
+
profileLabel: string(),
|
|
19095
|
+
name: string(),
|
|
19096
|
+
enabled: boolean()
|
|
19097
|
+
});
|
|
19098
|
+
var TerminalLegacyCameraSchema = object({
|
|
19099
|
+
stableId: string(),
|
|
19100
|
+
nodeId: string(),
|
|
19101
|
+
profileId: string(),
|
|
19102
|
+
profileLabel: string(),
|
|
19103
|
+
name: string(),
|
|
19104
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19105
|
+
adoptable: boolean()
|
|
19106
|
+
});
|
|
18683
19107
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18684
19108
|
seq: number().int().positive(),
|
|
18685
19109
|
kind: literal("data"),
|
|
@@ -18696,7 +19120,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18696
19120
|
snapshot: string().optional(),
|
|
18697
19121
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18698
19122
|
});
|
|
18699
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19123
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19124
|
+
targetNodeId: string().min(1),
|
|
19125
|
+
profileId: string().min(1),
|
|
19126
|
+
name: string().trim().min(1).max(160).optional()
|
|
19127
|
+
}), TerminalInstanceInfoSchema, {
|
|
19128
|
+
kind: "mutation",
|
|
19129
|
+
auth: "admin"
|
|
19130
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19131
|
+
kind: "mutation",
|
|
19132
|
+
auth: "admin"
|
|
19133
|
+
}), method(object({
|
|
19134
|
+
instanceId: string().min(1),
|
|
19135
|
+
enabled: boolean()
|
|
19136
|
+
}), TerminalInstanceInfoSchema, {
|
|
19137
|
+
kind: "mutation",
|
|
19138
|
+
auth: "admin"
|
|
19139
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19140
|
+
stableId: string().min(1),
|
|
19141
|
+
name: string().trim().min(1).max(160).optional()
|
|
19142
|
+
}), TerminalInstanceInfoSchema, {
|
|
19143
|
+
kind: "mutation",
|
|
19144
|
+
auth: "admin"
|
|
19145
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18700
19146
|
profileId: string(),
|
|
18701
19147
|
cols: number().int().positive(),
|
|
18702
19148
|
rows: number().int().positive()
|
|
@@ -18713,7 +19159,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18713
19159
|
}), method(object({
|
|
18714
19160
|
sessionId: string(),
|
|
18715
19161
|
afterSeq: number().int().nonnegative(),
|
|
18716
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19162
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19163
|
+
/**
|
|
19164
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19165
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19166
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19167
|
+
*/
|
|
19168
|
+
waitForOutput: boolean().optional()
|
|
18717
19169
|
}), TerminalOutputBatchSchema, {
|
|
18718
19170
|
kind: "mutation",
|
|
18719
19171
|
auth: "admin",
|
|
@@ -21211,6 +21663,7 @@ var FaceInfoSchema = object({
|
|
|
21211
21663
|
var FaceFilterEnum = _enum([
|
|
21212
21664
|
"unassigned",
|
|
21213
21665
|
"recognized",
|
|
21666
|
+
"identified",
|
|
21214
21667
|
"all"
|
|
21215
21668
|
]);
|
|
21216
21669
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21239,6 +21692,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21239
21692
|
kind: "mutation",
|
|
21240
21693
|
auth: "admin"
|
|
21241
21694
|
}), method(object({
|
|
21695
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21696
|
+
deviceId: number().int().optional(),
|
|
21242
21697
|
limit: number().int().positive().optional(),
|
|
21243
21698
|
filter: FaceFilterEnum.optional(),
|
|
21244
21699
|
/**
|
|
@@ -23519,6 +23974,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23519
23974
|
capName: string().min(1).max(64),
|
|
23520
23975
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23521
23976
|
valuePath: string().min(1).max(64)
|
|
23977
|
+
}),
|
|
23978
|
+
object({
|
|
23979
|
+
kind: literal("latest-recognition"),
|
|
23980
|
+
recognition: _enum(["person", "plate"])
|
|
23522
23981
|
})
|
|
23523
23982
|
]);
|
|
23524
23983
|
var OsdSlotBindingSchema = object({
|
|
@@ -23624,6 +24083,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23624
24083
|
}), object({ success: literal(true) }), {
|
|
23625
24084
|
kind: "mutation",
|
|
23626
24085
|
auth: "admin"
|
|
24086
|
+
}), method(object({
|
|
24087
|
+
sourceDeviceId: number().int(),
|
|
24088
|
+
targetDeviceId: number().int()
|
|
24089
|
+
}), object({
|
|
24090
|
+
copied: number().int().nonnegative(),
|
|
24091
|
+
skipped: number().int().nonnegative()
|
|
24092
|
+
}), {
|
|
24093
|
+
kind: "mutation",
|
|
24094
|
+
auth: "admin"
|
|
23627
24095
|
}), method(object({
|
|
23628
24096
|
deviceId: number().int(),
|
|
23629
24097
|
slotId: string().min(1),
|
|
@@ -24546,7 +25014,19 @@ var RecordingManifestSchema = object({
|
|
|
24546
25014
|
* profiles/subtrees/locations on this node). */
|
|
24547
25015
|
var RecordingDeviceUsageSchema = object({
|
|
24548
25016
|
deviceId: number(),
|
|
24549
|
-
usedBytes: number()
|
|
25017
|
+
usedBytes: number(),
|
|
25018
|
+
/**
|
|
25019
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25020
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25021
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25022
|
+
*
|
|
25023
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25024
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25025
|
+
* field must keep validating that older provider's payload: the framework
|
|
25026
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25027
|
+
* the later of the two.
|
|
25028
|
+
*/
|
|
25029
|
+
oldestMs: number().nullable().optional()
|
|
24550
25030
|
});
|
|
24551
25031
|
/** Recording storage usage + capacity for one storage location. */
|
|
24552
25032
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24574,6 +25054,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24574
25054
|
locations: array(RecordingLocationUsageSchema)
|
|
24575
25055
|
});
|
|
24576
25056
|
/**
|
|
25057
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25058
|
+
*
|
|
25059
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25060
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25061
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25062
|
+
* location, run FIFO behind the single-flight mover.
|
|
25063
|
+
*
|
|
25064
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25065
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25066
|
+
* (empty on the plan).
|
|
25067
|
+
*/
|
|
25068
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25069
|
+
deviceId: number(),
|
|
25070
|
+
profile: string(),
|
|
25071
|
+
fromLocationId: string(),
|
|
25072
|
+
toLocationId: string(),
|
|
25073
|
+
bytes: number(),
|
|
25074
|
+
files: number().int()
|
|
25075
|
+
});
|
|
25076
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25077
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25078
|
+
* that had nothing to do. */
|
|
25079
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25080
|
+
"unassigned",
|
|
25081
|
+
"target-not-writable",
|
|
25082
|
+
"below-threshold",
|
|
25083
|
+
"no-headroom"
|
|
25084
|
+
]);
|
|
25085
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25086
|
+
deviceId: number(),
|
|
25087
|
+
profile: string(),
|
|
25088
|
+
fromLocationId: string(),
|
|
25089
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25090
|
+
toLocationId: string().nullable(),
|
|
25091
|
+
bytes: number(),
|
|
25092
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25093
|
+
});
|
|
25094
|
+
var RecordingRebalancePlanSchema = object({
|
|
25095
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25096
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25097
|
+
bytesToMove: number(),
|
|
25098
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25099
|
+
jobIds: array(string())
|
|
25100
|
+
});
|
|
25101
|
+
var RecordingRebalanceInputSchema = object({
|
|
25102
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25103
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25104
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25105
|
+
minMoveGb: number().min(0).optional()
|
|
25106
|
+
});
|
|
25107
|
+
/**
|
|
24577
25108
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24578
25109
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24579
25110
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24721,6 +25252,21 @@ method(object({
|
|
|
24721
25252
|
}), {
|
|
24722
25253
|
kind: "mutation",
|
|
24723
25254
|
auth: "admin"
|
|
25255
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25256
|
+
kind: "mutation",
|
|
25257
|
+
auth: "admin"
|
|
25258
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25259
|
+
kind: "mutation",
|
|
25260
|
+
auth: "admin"
|
|
25261
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25262
|
+
kind: "mutation",
|
|
25263
|
+
auth: "admin"
|
|
25264
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25265
|
+
kind: "mutation",
|
|
25266
|
+
auth: "admin"
|
|
25267
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25268
|
+
kind: "mutation",
|
|
25269
|
+
auth: "admin"
|
|
24724
25270
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24725
25271
|
kind: "mutation",
|
|
24726
25272
|
auth: "admin"
|
|
@@ -24730,9 +25276,15 @@ method(object({
|
|
|
24730
25276
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24731
25277
|
kind: "mutation",
|
|
24732
25278
|
auth: "admin"
|
|
25279
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25280
|
+
kind: "query",
|
|
25281
|
+
auth: "admin"
|
|
25282
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25283
|
+
kind: "mutation",
|
|
25284
|
+
auth: "admin"
|
|
24733
25285
|
});
|
|
24734
25286
|
/**
|
|
24735
|
-
* `
|
|
25287
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24736
25288
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24737
25289
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24738
25290
|
* delete-after-download.
|
|
@@ -24747,10 +25299,42 @@ method(object({
|
|
|
24747
25299
|
*/
|
|
24748
25300
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24749
25301
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25302
|
+
/**
|
|
25303
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25304
|
+
*
|
|
25305
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25306
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25307
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25308
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25309
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25310
|
+
*/
|
|
25311
|
+
var ExportDenseRangeSchema = object({
|
|
25312
|
+
fromSec: number().nonnegative(),
|
|
25313
|
+
toSec: number().nonnegative()
|
|
25314
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25315
|
+
/**
|
|
25316
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25317
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25318
|
+
*
|
|
25319
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25320
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25321
|
+
*/
|
|
25322
|
+
var ExportDenseSchema = object({
|
|
25323
|
+
everyMs: number().int().positive(),
|
|
25324
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25325
|
+
});
|
|
24750
25326
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24751
25327
|
var ExportTimelapseSchema = object({
|
|
24752
25328
|
everyMs: number().int().positive(),
|
|
24753
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25329
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25330
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25331
|
+
dense: ExportDenseSchema.optional()
|
|
25332
|
+
}).superRefine((v, ctx) => {
|
|
25333
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25334
|
+
code: ZodIssueCode.custom,
|
|
25335
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25336
|
+
path: ["dense", "everyMs"]
|
|
25337
|
+
});
|
|
24754
25338
|
});
|
|
24755
25339
|
/**
|
|
24756
25340
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24808,6 +25392,19 @@ var ExportDownloadSchema = object({
|
|
|
24808
25392
|
url: string(),
|
|
24809
25393
|
endpoints: array(string())
|
|
24810
25394
|
});
|
|
25395
|
+
/**
|
|
25396
|
+
* A finished export's bytes, inline.
|
|
25397
|
+
*
|
|
25398
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25399
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25400
|
+
*/
|
|
25401
|
+
var ExportBytesSchema = object({
|
|
25402
|
+
base64: string(),
|
|
25403
|
+
contentType: string(),
|
|
25404
|
+
/** Suggested filename, extension included. */
|
|
25405
|
+
name: string(),
|
|
25406
|
+
bytes: number().int().nonnegative()
|
|
25407
|
+
});
|
|
24811
25408
|
method(object({
|
|
24812
25409
|
deviceId: number(),
|
|
24813
25410
|
profile: string(),
|
|
@@ -24832,6 +25429,9 @@ method(object({
|
|
|
24832
25429
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24833
25430
|
kind: "query",
|
|
24834
25431
|
auth: "protected"
|
|
25432
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25433
|
+
kind: "query",
|
|
25434
|
+
auth: "protected"
|
|
24835
25435
|
});
|
|
24836
25436
|
/**
|
|
24837
25437
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30346,6 +30946,12 @@ Object.freeze({
|
|
|
30346
30946
|
addonId: null,
|
|
30347
30947
|
access: "delete"
|
|
30348
30948
|
},
|
|
30949
|
+
"osdManager.copyDeviceConfiguration": {
|
|
30950
|
+
capName: "osd-manager",
|
|
30951
|
+
capScope: "system",
|
|
30952
|
+
addonId: null,
|
|
30953
|
+
access: "create"
|
|
30954
|
+
},
|
|
30349
30955
|
"osdManager.getConditionSupport": {
|
|
30350
30956
|
capName: "osd-manager",
|
|
30351
30957
|
capScope: "system",
|
|
@@ -30442,7 +31048,7 @@ Object.freeze({
|
|
|
30442
31048
|
addonId: null,
|
|
30443
31049
|
access: "create"
|
|
30444
31050
|
},
|
|
30445
|
-
"pipelineAnalytics.
|
|
31051
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30446
31052
|
capName: "pipeline-analytics",
|
|
30447
31053
|
capScope: "device",
|
|
30448
31054
|
addonId: null,
|
|
@@ -30514,12 +31120,6 @@ Object.freeze({
|
|
|
30514
31120
|
addonId: null,
|
|
30515
31121
|
access: "view"
|
|
30516
31122
|
},
|
|
30517
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30518
|
-
capName: "pipeline-analytics",
|
|
30519
|
-
capScope: "device",
|
|
30520
|
-
addonId: null,
|
|
30521
|
-
access: "view"
|
|
30522
|
-
},
|
|
30523
31123
|
"pipelineAnalytics.getMotionEvents": {
|
|
30524
31124
|
capName: "pipeline-analytics",
|
|
30525
31125
|
capScope: "device",
|
|
@@ -30556,6 +31156,12 @@ Object.freeze({
|
|
|
30556
31156
|
addonId: null,
|
|
30557
31157
|
access: "view"
|
|
30558
31158
|
},
|
|
31159
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31160
|
+
capName: "pipeline-analytics",
|
|
31161
|
+
capScope: "device",
|
|
31162
|
+
addonId: null,
|
|
31163
|
+
access: "view"
|
|
31164
|
+
},
|
|
30559
31165
|
"pipelineAnalytics.getTrack": {
|
|
30560
31166
|
capName: "pipeline-analytics",
|
|
30561
31167
|
capScope: "device",
|
|
@@ -30634,6 +31240,12 @@ Object.freeze({
|
|
|
30634
31240
|
addonId: null,
|
|
30635
31241
|
access: "view"
|
|
30636
31242
|
},
|
|
31243
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31244
|
+
capName: "pipeline-analytics",
|
|
31245
|
+
capScope: "device",
|
|
31246
|
+
addonId: null,
|
|
31247
|
+
access: "create"
|
|
31248
|
+
},
|
|
30637
31249
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30638
31250
|
capName: "pipeline-analytics",
|
|
30639
31251
|
capScope: "device",
|
|
@@ -30664,7 +31276,7 @@ Object.freeze({
|
|
|
30664
31276
|
addonId: null,
|
|
30665
31277
|
access: "create"
|
|
30666
31278
|
},
|
|
30667
|
-
"pipelineAnalytics.
|
|
31279
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30668
31280
|
capName: "pipeline-analytics",
|
|
30669
31281
|
capScope: "device",
|
|
30670
31282
|
addonId: null,
|
|
@@ -30676,6 +31288,12 @@ Object.freeze({
|
|
|
30676
31288
|
addonId: null,
|
|
30677
31289
|
access: "create"
|
|
30678
31290
|
},
|
|
31291
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31292
|
+
capName: "pipeline-analytics",
|
|
31293
|
+
capScope: "device",
|
|
31294
|
+
addonId: null,
|
|
31295
|
+
access: "create"
|
|
31296
|
+
},
|
|
30679
31297
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30680
31298
|
capName: "pipeline-analytics",
|
|
30681
31299
|
capScope: "device",
|
|
@@ -30700,6 +31318,12 @@ Object.freeze({
|
|
|
30700
31318
|
addonId: null,
|
|
30701
31319
|
access: "create"
|
|
30702
31320
|
},
|
|
31321
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31322
|
+
capName: "pipeline-analytics",
|
|
31323
|
+
capScope: "device",
|
|
31324
|
+
addonId: null,
|
|
31325
|
+
access: "create"
|
|
31326
|
+
},
|
|
30703
31327
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30704
31328
|
capName: "pipeline-analytics",
|
|
30705
31329
|
capScope: "device",
|
|
@@ -31066,6 +31690,12 @@ Object.freeze({
|
|
|
31066
31690
|
addonId: null,
|
|
31067
31691
|
access: "view"
|
|
31068
31692
|
},
|
|
31693
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31694
|
+
capName: "pipeline-orchestrator",
|
|
31695
|
+
capScope: "system",
|
|
31696
|
+
addonId: null,
|
|
31697
|
+
access: "create"
|
|
31698
|
+
},
|
|
31069
31699
|
"pipelineOrchestrator.rebalance": {
|
|
31070
31700
|
capName: "pipeline-orchestrator",
|
|
31071
31701
|
capScope: "system",
|
|
@@ -31090,6 +31720,12 @@ Object.freeze({
|
|
|
31090
31720
|
addonId: null,
|
|
31091
31721
|
access: "view"
|
|
31092
31722
|
},
|
|
31723
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31724
|
+
capName: "pipeline-orchestrator",
|
|
31725
|
+
capScope: "system",
|
|
31726
|
+
addonId: null,
|
|
31727
|
+
access: "create"
|
|
31728
|
+
},
|
|
31093
31729
|
"pipelineOrchestrator.saveTemplate": {
|
|
31094
31730
|
capName: "pipeline-orchestrator",
|
|
31095
31731
|
capScope: "system",
|
|
@@ -31486,7 +32122,13 @@ Object.freeze({
|
|
|
31486
32122
|
addonId: null,
|
|
31487
32123
|
access: "create"
|
|
31488
32124
|
},
|
|
31489
|
-
"recording.
|
|
32125
|
+
"recording.cancelRelocateJob": {
|
|
32126
|
+
capName: "recording",
|
|
32127
|
+
capScope: "system",
|
|
32128
|
+
addonId: null,
|
|
32129
|
+
access: "create"
|
|
32130
|
+
},
|
|
32131
|
+
"recording.cancelStorageMigrationMove": {
|
|
31490
32132
|
capName: "recording",
|
|
31491
32133
|
capScope: "system",
|
|
31492
32134
|
addonId: null,
|
|
@@ -31522,7 +32164,7 @@ Object.freeze({
|
|
|
31522
32164
|
addonId: null,
|
|
31523
32165
|
access: "view"
|
|
31524
32166
|
},
|
|
31525
|
-
"recording.
|
|
32167
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31526
32168
|
capName: "recording",
|
|
31527
32169
|
capScope: "system",
|
|
31528
32170
|
addonId: null,
|
|
@@ -31540,12 +32182,30 @@ Object.freeze({
|
|
|
31540
32182
|
addonId: null,
|
|
31541
32183
|
access: "view"
|
|
31542
32184
|
},
|
|
32185
|
+
"recording.listRelocateJobs": {
|
|
32186
|
+
capName: "recording",
|
|
32187
|
+
capScope: "system",
|
|
32188
|
+
addonId: null,
|
|
32189
|
+
access: "view"
|
|
32190
|
+
},
|
|
31543
32191
|
"recording.locateSegment": {
|
|
31544
32192
|
capName: "recording",
|
|
31545
32193
|
capScope: "system",
|
|
31546
32194
|
addonId: null,
|
|
31547
32195
|
access: "view"
|
|
31548
32196
|
},
|
|
32197
|
+
"recording.pauseForStorageMigration": {
|
|
32198
|
+
capName: "recording",
|
|
32199
|
+
capScope: "system",
|
|
32200
|
+
addonId: null,
|
|
32201
|
+
access: "create"
|
|
32202
|
+
},
|
|
32203
|
+
"recording.planStorageRebalance": {
|
|
32204
|
+
capName: "recording",
|
|
32205
|
+
capScope: "system",
|
|
32206
|
+
addonId: null,
|
|
32207
|
+
access: "view"
|
|
32208
|
+
},
|
|
31549
32209
|
"recording.pruneFootage": {
|
|
31550
32210
|
capName: "recording",
|
|
31551
32211
|
capScope: "system",
|
|
@@ -31564,6 +32224,12 @@ Object.freeze({
|
|
|
31564
32224
|
addonId: null,
|
|
31565
32225
|
access: "view"
|
|
31566
32226
|
},
|
|
32227
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32228
|
+
capName: "recording",
|
|
32229
|
+
capScope: "system",
|
|
32230
|
+
addonId: null,
|
|
32231
|
+
access: "create"
|
|
32232
|
+
},
|
|
31567
32233
|
"recording.relocateFootage": {
|
|
31568
32234
|
capName: "recording",
|
|
31569
32235
|
capScope: "system",
|
|
@@ -31588,44 +32254,68 @@ Object.freeze({
|
|
|
31588
32254
|
addonId: null,
|
|
31589
32255
|
access: "create"
|
|
31590
32256
|
},
|
|
32257
|
+
"recording.resumeForStorageMigration": {
|
|
32258
|
+
capName: "recording",
|
|
32259
|
+
capScope: "system",
|
|
32260
|
+
addonId: null,
|
|
32261
|
+
access: "create"
|
|
32262
|
+
},
|
|
31591
32263
|
"recording.setDeviceConfig": {
|
|
31592
32264
|
capName: "recording",
|
|
31593
32265
|
capScope: "system",
|
|
31594
32266
|
addonId: null,
|
|
31595
32267
|
access: "create"
|
|
31596
32268
|
},
|
|
32269
|
+
"recording.startStorageMigrationMove": {
|
|
32270
|
+
capName: "recording",
|
|
32271
|
+
capScope: "system",
|
|
32272
|
+
addonId: null,
|
|
32273
|
+
access: "create"
|
|
32274
|
+
},
|
|
32275
|
+
"recording.startStorageRebalance": {
|
|
32276
|
+
capName: "recording",
|
|
32277
|
+
capScope: "system",
|
|
32278
|
+
addonId: null,
|
|
32279
|
+
access: "create"
|
|
32280
|
+
},
|
|
31597
32281
|
"recordingExport.cancelExport": {
|
|
31598
|
-
capName: "
|
|
32282
|
+
capName: "recording-export",
|
|
31599
32283
|
capScope: "system",
|
|
31600
32284
|
addonId: null,
|
|
31601
32285
|
access: "create"
|
|
31602
32286
|
},
|
|
31603
32287
|
"recordingExport.createExport": {
|
|
31604
|
-
capName: "
|
|
32288
|
+
capName: "recording-export",
|
|
31605
32289
|
capScope: "system",
|
|
31606
32290
|
addonId: null,
|
|
31607
32291
|
access: "create"
|
|
31608
32292
|
},
|
|
31609
32293
|
"recordingExport.deleteExport": {
|
|
31610
|
-
capName: "
|
|
32294
|
+
capName: "recording-export",
|
|
31611
32295
|
capScope: "system",
|
|
31612
32296
|
addonId: null,
|
|
31613
32297
|
access: "delete"
|
|
31614
32298
|
},
|
|
31615
32299
|
"recordingExport.getDownloadUrl": {
|
|
31616
|
-
capName: "
|
|
32300
|
+
capName: "recording-export",
|
|
31617
32301
|
capScope: "system",
|
|
31618
32302
|
addonId: null,
|
|
31619
32303
|
access: "view"
|
|
31620
32304
|
},
|
|
31621
32305
|
"recordingExport.getExport": {
|
|
31622
|
-
capName: "
|
|
32306
|
+
capName: "recording-export",
|
|
31623
32307
|
capScope: "system",
|
|
31624
32308
|
addonId: null,
|
|
31625
32309
|
access: "view"
|
|
31626
32310
|
},
|
|
31627
32311
|
"recordingExport.listExports": {
|
|
31628
|
-
capName: "
|
|
32312
|
+
capName: "recording-export",
|
|
32313
|
+
capScope: "system",
|
|
32314
|
+
addonId: null,
|
|
32315
|
+
access: "view"
|
|
32316
|
+
},
|
|
32317
|
+
"recordingExport.readExportBytes": {
|
|
32318
|
+
capName: "recording-export",
|
|
31629
32319
|
capScope: "system",
|
|
31630
32320
|
addonId: null,
|
|
31631
32321
|
access: "view"
|
|
@@ -31984,6 +32674,30 @@ Object.freeze({
|
|
|
31984
32674
|
addonId: null,
|
|
31985
32675
|
access: "view"
|
|
31986
32676
|
},
|
|
32677
|
+
"storageMigration.cancel": {
|
|
32678
|
+
capName: "storage-migration",
|
|
32679
|
+
capScope: "system",
|
|
32680
|
+
addonId: null,
|
|
32681
|
+
access: "create"
|
|
32682
|
+
},
|
|
32683
|
+
"storageMigration.plan": {
|
|
32684
|
+
capName: "storage-migration",
|
|
32685
|
+
capScope: "system",
|
|
32686
|
+
addonId: null,
|
|
32687
|
+
access: "view"
|
|
32688
|
+
},
|
|
32689
|
+
"storageMigration.start": {
|
|
32690
|
+
capName: "storage-migration",
|
|
32691
|
+
capScope: "system",
|
|
32692
|
+
addonId: null,
|
|
32693
|
+
access: "create"
|
|
32694
|
+
},
|
|
32695
|
+
"storageMigration.status": {
|
|
32696
|
+
capName: "storage-migration",
|
|
32697
|
+
capScope: "system",
|
|
32698
|
+
addonId: null,
|
|
32699
|
+
access: "view"
|
|
32700
|
+
},
|
|
31987
32701
|
"storageProvider.abortUpload": {
|
|
31988
32702
|
capName: "storage-provider",
|
|
31989
32703
|
capScope: "system",
|
|
@@ -32362,12 +33076,42 @@ Object.freeze({
|
|
|
32362
33076
|
addonId: null,
|
|
32363
33077
|
access: "create"
|
|
32364
33078
|
},
|
|
33079
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33080
|
+
capName: "terminal-session",
|
|
33081
|
+
capScope: "system",
|
|
33082
|
+
addonId: null,
|
|
33083
|
+
access: "create"
|
|
33084
|
+
},
|
|
32365
33085
|
"terminalSession.close": {
|
|
32366
33086
|
capName: "terminal-session",
|
|
32367
33087
|
capScope: "system",
|
|
32368
33088
|
addonId: null,
|
|
32369
33089
|
access: "create"
|
|
32370
33090
|
},
|
|
33091
|
+
"terminalSession.createInstance": {
|
|
33092
|
+
capName: "terminal-session",
|
|
33093
|
+
capScope: "system",
|
|
33094
|
+
addonId: null,
|
|
33095
|
+
access: "create"
|
|
33096
|
+
},
|
|
33097
|
+
"terminalSession.deleteInstance": {
|
|
33098
|
+
capName: "terminal-session",
|
|
33099
|
+
capScope: "system",
|
|
33100
|
+
addonId: null,
|
|
33101
|
+
access: "delete"
|
|
33102
|
+
},
|
|
33103
|
+
"terminalSession.listInstances": {
|
|
33104
|
+
capName: "terminal-session",
|
|
33105
|
+
capScope: "system",
|
|
33106
|
+
addonId: null,
|
|
33107
|
+
access: "view"
|
|
33108
|
+
},
|
|
33109
|
+
"terminalSession.listLegacyCameras": {
|
|
33110
|
+
capName: "terminal-session",
|
|
33111
|
+
capScope: "system",
|
|
33112
|
+
addonId: null,
|
|
33113
|
+
access: "view"
|
|
33114
|
+
},
|
|
32371
33115
|
"terminalSession.listProfiles": {
|
|
32372
33116
|
capName: "terminal-session",
|
|
32373
33117
|
capScope: "system",
|
|
@@ -32398,6 +33142,12 @@ Object.freeze({
|
|
|
32398
33142
|
addonId: null,
|
|
32399
33143
|
access: "create"
|
|
32400
33144
|
},
|
|
33145
|
+
"terminalSession.setInstanceEnabled": {
|
|
33146
|
+
capName: "terminal-session",
|
|
33147
|
+
capScope: "system",
|
|
33148
|
+
addonId: null,
|
|
33149
|
+
access: "create"
|
|
33150
|
+
},
|
|
32401
33151
|
"terminalSession.writeInput": {
|
|
32402
33152
|
capName: "terminal-session",
|
|
32403
33153
|
capScope: "system",
|
|
@@ -32942,6 +33692,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
32942
33692
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
32943
33693
|
var PriorityField = number().int().min(1).max(5);
|
|
32944
33694
|
/**
|
|
33695
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33696
|
+
*
|
|
33697
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33698
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33699
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33700
|
+
*
|
|
33701
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33702
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33703
|
+
*
|
|
33704
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33705
|
+
*
|
|
33706
|
+
* 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.
|
|
33707
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33708
|
+
* and therefore the length of a quiet night, does not move.
|
|
33709
|
+
*
|
|
33710
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33711
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33712
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33713
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33714
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33715
|
+
*/
|
|
33716
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33717
|
+
/**
|
|
33718
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33719
|
+
*
|
|
33720
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33721
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33722
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33723
|
+
* that range every ~583 ms.
|
|
33724
|
+
*
|
|
33725
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33726
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33727
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33728
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33729
|
+
* schema change and are the tracked follow-up.
|
|
33730
|
+
*
|
|
33731
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33732
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33733
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33734
|
+
* happened.
|
|
33735
|
+
*/
|
|
33736
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33737
|
+
/**
|
|
33738
|
+
* Caption burned into the notification's preview frame.
|
|
33739
|
+
*
|
|
33740
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33741
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33742
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33743
|
+
*
|
|
33744
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33745
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33746
|
+
* the reason this is not `.min(1)`.
|
|
33747
|
+
*/
|
|
33748
|
+
var PreviewTextField = string().max(200);
|
|
33749
|
+
/**
|
|
33750
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33751
|
+
*
|
|
33752
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33753
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33754
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33755
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33756
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33757
|
+
* them.
|
|
33758
|
+
*
|
|
33759
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33760
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33761
|
+
* paying that on the deploy that shipped it.
|
|
33762
|
+
*
|
|
33763
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33764
|
+
*/
|
|
33765
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33766
|
+
/**
|
|
33767
|
+
* Which detection classes the notification reports counts for.
|
|
33768
|
+
*
|
|
33769
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33770
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33771
|
+
* class the window actually contained", which is what an operator who never
|
|
33772
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33773
|
+
* counts cars all night).
|
|
33774
|
+
*
|
|
33775
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33776
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33777
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33778
|
+
* not emit.
|
|
33779
|
+
*
|
|
33780
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33781
|
+
* - `{{detections}}` — total over the reported classes
|
|
33782
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33783
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33784
|
+
* one per class, `count_` + the class name
|
|
33785
|
+
*
|
|
33786
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33787
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33788
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33789
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33790
|
+
*/
|
|
33791
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33792
|
+
/**
|
|
32945
33793
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
32946
33794
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
32947
33795
|
* here (see the ownership note above).
|
|
@@ -32961,9 +33809,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
32961
33809
|
cadenceSec: CadenceSecField.default(15),
|
|
32962
33810
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
32963
33811
|
framerate: FramerateField.default(10),
|
|
33812
|
+
/**
|
|
33813
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33814
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33815
|
+
* field gets.
|
|
33816
|
+
*/
|
|
33817
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33818
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33819
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32964
33820
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
32965
33821
|
targets: TargetsField,
|
|
32966
33822
|
template: TimelapseTemplateSchema.optional(),
|
|
33823
|
+
/**
|
|
33824
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33825
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33826
|
+
*
|
|
33827
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33828
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33829
|
+
* silently clear the caption too.
|
|
33830
|
+
*/
|
|
33831
|
+
previewText: PreviewTextField.optional(),
|
|
33832
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33833
|
+
previewMode: PreviewModeField.default("image"),
|
|
33834
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33835
|
+
reportClasses: ReportClassesField.optional(),
|
|
32967
33836
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32968
33837
|
priority: PriorityField.default(3)
|
|
32969
33838
|
});
|
|
@@ -32974,8 +33843,13 @@ object({
|
|
|
32974
33843
|
schedule: NcScheduleSchema.optional(),
|
|
32975
33844
|
cadenceSec: CadenceSecField.optional(),
|
|
32976
33845
|
framerate: FramerateField.optional(),
|
|
33846
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33847
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32977
33848
|
targets: TargetsField.optional(),
|
|
32978
33849
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33850
|
+
previewText: PreviewTextField.optional(),
|
|
33851
|
+
previewMode: PreviewModeField.optional(),
|
|
33852
|
+
reportClasses: ReportClassesField.optional(),
|
|
32979
33853
|
priority: PriorityField.optional()
|
|
32980
33854
|
});
|
|
32981
33855
|
TimelapseRuleInputSchema.extend({
|
|
@@ -32987,10 +33861,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
32987
33861
|
*/
|
|
32988
33862
|
ownerUserId: string().optional(),
|
|
32989
33863
|
/**
|
|
32990
|
-
* Epoch-ms of the
|
|
32991
|
-
*
|
|
33864
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33865
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33866
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
32992
33867
|
*/
|
|
32993
33868
|
lastGeneratedAt: number().optional(),
|
|
33869
|
+
/**
|
|
33870
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33871
|
+
* re-generation guard's real durable state.
|
|
33872
|
+
*
|
|
33873
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33874
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33875
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33876
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33877
|
+
* come back.
|
|
33878
|
+
*
|
|
33879
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33880
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33881
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33882
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33883
|
+
* once, on the deploy that shipped the map.
|
|
33884
|
+
*/
|
|
33885
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
32994
33886
|
/** userId of the caller who created the rule (server-stamped). */
|
|
32995
33887
|
createdBy: string(),
|
|
32996
33888
|
createdAt: number(),
|