@camstack/addon-provider-homematic 1.2.13 → 1.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +936 -48
- package/dist/addon.mjs +936 -48
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -7229,8 +7229,31 @@ var AdoptionJobSchema = object({
|
|
|
7229
7229
|
error: string().nullable()
|
|
7230
7230
|
});
|
|
7231
7231
|
/**
|
|
7232
|
-
* Per-camera FUNCTION SWITCHES
|
|
7233
|
-
*
|
|
7232
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7233
|
+
*
|
|
7234
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7235
|
+
*
|
|
7236
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7237
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7238
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7239
|
+
* every function already had a settings page of its own, and a second place to
|
|
7240
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7241
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7242
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7243
|
+
* (which was always first-class; the switch was a veneer over
|
|
7244
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7245
|
+
* per-device setting, the two camera planes to their own components.
|
|
7246
|
+
*
|
|
7247
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7248
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7249
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7250
|
+
* never about a control panel.
|
|
7251
|
+
*
|
|
7252
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7253
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7254
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7255
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7256
|
+
* stop; nothing new may be built on it.
|
|
7234
7257
|
*
|
|
7235
7258
|
* ## This file adds no state
|
|
7236
7259
|
*
|
|
@@ -7575,14 +7598,21 @@ var RecordingConfigSchema = object({
|
|
|
7575
7598
|
/**
|
|
7576
7599
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7577
7600
|
*
|
|
7578
|
-
* One shape shared by the recorder
|
|
7579
|
-
*
|
|
7580
|
-
*
|
|
7581
|
-
*
|
|
7582
|
-
*
|
|
7583
|
-
|
|
7601
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7602
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7603
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7604
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7605
|
+
* addon surface.
|
|
7606
|
+
*/
|
|
7607
|
+
/**
|
|
7608
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7609
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7610
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7611
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7612
|
+
* runs at all.
|
|
7584
7613
|
*/
|
|
7585
7614
|
var RelocateJobStateSchema = _enum([
|
|
7615
|
+
"queued",
|
|
7586
7616
|
"running",
|
|
7587
7617
|
"done",
|
|
7588
7618
|
"failed",
|
|
@@ -7607,19 +7637,109 @@ var RelocateJobSchema = object({
|
|
|
7607
7637
|
finishedAt: number().nullable(),
|
|
7608
7638
|
error: string().nullable()
|
|
7609
7639
|
});
|
|
7640
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7641
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7642
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7610
7643
|
var RelocateFootageInputSchema = object({
|
|
7611
|
-
deviceId: number().optional(),
|
|
7612
7644
|
fromLocationId: string(),
|
|
7613
7645
|
toLocationId: string(),
|
|
7614
7646
|
entities: array(_enum(["segments"])).optional(),
|
|
7647
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7648
|
+
* pre-orchestration compatibility path. */
|
|
7649
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7650
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7651
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7652
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7653
|
+
deviceId: number().int().optional(),
|
|
7654
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7655
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7656
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7657
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7658
|
+
profiles: array(string()).optional(),
|
|
7615
7659
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7616
7660
|
* never allowed to starve live writers. */
|
|
7617
7661
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7618
7662
|
});
|
|
7619
|
-
|
|
7620
|
-
|
|
7663
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7664
|
+
* from persistent recording settings: a migration never changes
|
|
7665
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7666
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7667
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7668
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7621
7669
|
toLocationId: string(),
|
|
7622
7670
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7671
|
+
}).extend({ leaseId: string().min(1) });
|
|
7672
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7673
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7674
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7675
|
+
var StorageMigrationClassSchema = _enum([
|
|
7676
|
+
"recordings",
|
|
7677
|
+
"recordingsLow",
|
|
7678
|
+
"eventMedia"
|
|
7679
|
+
]);
|
|
7680
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7681
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7682
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7683
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7684
|
+
recordings: string().min(1).optional(),
|
|
7685
|
+
recordingsLow: string().min(1).optional(),
|
|
7686
|
+
eventMedia: string().min(1).optional()
|
|
7687
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7688
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7689
|
+
var StorageMigrationInputSchema = object({
|
|
7690
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7691
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7692
|
+
});
|
|
7693
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7694
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7695
|
+
* verified. */
|
|
7696
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7697
|
+
"planning",
|
|
7698
|
+
"pausing",
|
|
7699
|
+
"moving",
|
|
7700
|
+
"verifying",
|
|
7701
|
+
"repointing",
|
|
7702
|
+
"refreshing",
|
|
7703
|
+
"resuming",
|
|
7704
|
+
"done",
|
|
7705
|
+
"failed",
|
|
7706
|
+
"cancelled"
|
|
7707
|
+
]);
|
|
7708
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7709
|
+
"pipeline",
|
|
7710
|
+
"recorder",
|
|
7711
|
+
"analytics"
|
|
7712
|
+
]);
|
|
7713
|
+
var StorageMigrationMoveSchema = object({
|
|
7714
|
+
storageClass: StorageMigrationClassSchema,
|
|
7715
|
+
fromLocationId: string(),
|
|
7716
|
+
toLocationId: string(),
|
|
7717
|
+
moverJobId: string().nullable(),
|
|
7718
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7719
|
+
error: string().nullable()
|
|
7720
|
+
});
|
|
7721
|
+
var StorageMigrationJobSchema = object({
|
|
7722
|
+
jobId: string(),
|
|
7723
|
+
phase: StorageMigrationPhaseSchema,
|
|
7724
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7725
|
+
throttleMbps: number(),
|
|
7726
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7727
|
+
pauseLeaseId: string().nullable(),
|
|
7728
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7729
|
+
repointed: boolean(),
|
|
7730
|
+
cancelRequested: boolean(),
|
|
7731
|
+
startedAt: number(),
|
|
7732
|
+
updatedAt: number(),
|
|
7733
|
+
finishedAt: number().nullable(),
|
|
7734
|
+
error: string().nullable()
|
|
7735
|
+
});
|
|
7736
|
+
var StorageMigrationPlanSchema = object({
|
|
7737
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7738
|
+
moves: array(object({
|
|
7739
|
+
storageClass: StorageMigrationClassSchema,
|
|
7740
|
+
fromLocationId: string(),
|
|
7741
|
+
toLocationId: string()
|
|
7742
|
+
}))
|
|
7623
7743
|
});
|
|
7624
7744
|
/**
|
|
7625
7745
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7671,6 +7791,21 @@ var StorageLocationSchema = object({
|
|
|
7671
7791
|
nodeId: string().optional(),
|
|
7672
7792
|
isDefault: boolean().default(false),
|
|
7673
7793
|
isSystem: boolean().default(false),
|
|
7794
|
+
/**
|
|
7795
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7796
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7797
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7798
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7799
|
+
* extended to add the next consumer.
|
|
7800
|
+
*
|
|
7801
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7802
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7803
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7804
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7805
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7806
|
+
* always stamped `true`.
|
|
7807
|
+
*/
|
|
7808
|
+
enabled: boolean().optional(),
|
|
7674
7809
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7675
7810
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7676
7811
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12289,7 +12424,8 @@ method(object({
|
|
|
12289
12424
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12290
12425
|
/**
|
|
12291
12426
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12292
|
-
* filesystem
|
|
12427
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12428
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12293
12429
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12294
12430
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12295
12431
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14130,6 +14266,13 @@ var MaskGridDimsSchema = object({
|
|
|
14130
14266
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14131
14267
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14132
14268
|
* one trigger.
|
|
14269
|
+
*
|
|
14270
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14271
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14272
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14273
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14274
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14275
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14133
14276
|
*/
|
|
14134
14277
|
var NcDeliverySchema = _enum([
|
|
14135
14278
|
"immediate",
|
|
@@ -14144,15 +14287,32 @@ var NcDeliverySchema = _enum([
|
|
|
14144
14287
|
* depend on a provider's raw event name or payload shape.
|
|
14145
14288
|
*/
|
|
14146
14289
|
var NcSystemEventKindSchema = _enum([
|
|
14147
|
-
"
|
|
14148
|
-
"
|
|
14290
|
+
"device-online",
|
|
14291
|
+
"device-offline",
|
|
14292
|
+
"device-disabled",
|
|
14293
|
+
"device-enabled",
|
|
14149
14294
|
"stream-online",
|
|
14150
14295
|
"stream-offline",
|
|
14151
14296
|
"node-online",
|
|
14152
14297
|
"node-offline",
|
|
14153
14298
|
"addon-update-available",
|
|
14154
|
-
"server-update-available"
|
|
14299
|
+
"server-update-available",
|
|
14300
|
+
"alarm-triggered",
|
|
14301
|
+
"alarm-armed",
|
|
14302
|
+
"alarm-disarmed",
|
|
14303
|
+
"camera-online",
|
|
14304
|
+
"camera-offline",
|
|
14305
|
+
"camera-disabled",
|
|
14306
|
+
"camera-enabled"
|
|
14307
|
+
]);
|
|
14308
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14309
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14310
|
+
"camera-online",
|
|
14311
|
+
"camera-offline",
|
|
14312
|
+
"camera-disabled",
|
|
14313
|
+
"camera-enabled"
|
|
14155
14314
|
]);
|
|
14315
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14156
14316
|
/**
|
|
14157
14317
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14158
14318
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14161,6 +14321,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14161
14321
|
var NcSystemEventConditionSchema = object({
|
|
14162
14322
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14163
14323
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14324
|
+
/**
|
|
14325
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14326
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14327
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14328
|
+
*
|
|
14329
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14330
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14331
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14332
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14333
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14334
|
+
*/
|
|
14335
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14164
14336
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14165
14337
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14166
14338
|
});
|
|
@@ -14211,6 +14383,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14211
14383
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14212
14384
|
});
|
|
14213
14385
|
/**
|
|
14386
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14387
|
+
*
|
|
14388
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14389
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14390
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14391
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14392
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14393
|
+
*
|
|
14394
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14395
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14396
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14397
|
+
*
|
|
14398
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14399
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14400
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14401
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14402
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14403
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14404
|
+
* ZodEffects the cap path would have to special-case).
|
|
14405
|
+
*
|
|
14406
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14407
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14408
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14409
|
+
* `samplingSeconds` decorative.
|
|
14410
|
+
*
|
|
14411
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14412
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14413
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14414
|
+
* an operator who typed `dog` mean the same thing.
|
|
14415
|
+
*/
|
|
14416
|
+
var NcAudioConditionSchema = object({
|
|
14417
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14418
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14419
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14420
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14421
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14422
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14423
|
+
/** Length of the sampling window in seconds. */
|
|
14424
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14425
|
+
});
|
|
14426
|
+
/**
|
|
14214
14427
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14215
14428
|
*
|
|
14216
14429
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14483,7 +14696,33 @@ var NcConditionsSchema = object({
|
|
|
14483
14696
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14484
14697
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14485
14698
|
*/
|
|
14486
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14699
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14700
|
+
/**
|
|
14701
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14702
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14703
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14704
|
+
* a window that is not full yet, neither filter given). See
|
|
14705
|
+
* {@link NcAudioCondition}.
|
|
14706
|
+
*
|
|
14707
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14708
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14709
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14710
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14711
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14712
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14713
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14714
|
+
*
|
|
14715
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14716
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14717
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14718
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14719
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14720
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14721
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14722
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14723
|
+
* does an audio rule become authorable.
|
|
14724
|
+
*/
|
|
14725
|
+
audio: NcAudioConditionSchema.optional()
|
|
14487
14726
|
});
|
|
14488
14727
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14489
14728
|
var NcRuleTargetSchema = object({
|
|
@@ -14597,6 +14836,73 @@ var NcThrottleSchema = object({
|
|
|
14597
14836
|
*/
|
|
14598
14837
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14599
14838
|
});
|
|
14839
|
+
/**
|
|
14840
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14841
|
+
* it judges may be.
|
|
14842
|
+
*
|
|
14843
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14844
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14845
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14846
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14847
|
+
* tokens for pixels the model pools away.
|
|
14848
|
+
*/
|
|
14849
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14850
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14851
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14852
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14853
|
+
var NcConfirmExpectSchema = object({
|
|
14854
|
+
op: _enum([
|
|
14855
|
+
">=",
|
|
14856
|
+
">",
|
|
14857
|
+
"<=",
|
|
14858
|
+
"<",
|
|
14859
|
+
"=="
|
|
14860
|
+
]),
|
|
14861
|
+
count: number().int().min(0).max(1e3)
|
|
14862
|
+
});
|
|
14863
|
+
/**
|
|
14864
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14865
|
+
* to ship and says whether it agrees with the rule.
|
|
14866
|
+
*
|
|
14867
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14868
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14869
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14870
|
+
*
|
|
14871
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14872
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14873
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14874
|
+
* open looks in the log exactly like a gate that works.
|
|
14875
|
+
*
|
|
14876
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14877
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14878
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14879
|
+
* above rather than trusting a parse it may never have seen.
|
|
14880
|
+
*/
|
|
14881
|
+
var NcConfirmSchema = object({
|
|
14882
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14883
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14884
|
+
enabled: boolean().default(false),
|
|
14885
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14886
|
+
profileId: string().optional(),
|
|
14887
|
+
/**
|
|
14888
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14889
|
+
* from the rule (its class and its expectation).
|
|
14890
|
+
*
|
|
14891
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14892
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14893
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14894
|
+
* turn and only rule-authored words land here.
|
|
14895
|
+
*/
|
|
14896
|
+
prompt: string().max(1e3).optional(),
|
|
14897
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14898
|
+
* own boolean verdict decides. */
|
|
14899
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14900
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14901
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14902
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14903
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14904
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14905
|
+
});
|
|
14600
14906
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14601
14907
|
var NcRuleInputSchema = object({
|
|
14602
14908
|
name: string().min(1).max(200),
|
|
@@ -14657,7 +14963,13 @@ var NcRuleInputSchema = object({
|
|
|
14657
14963
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14658
14964
|
* shape as every other actuation.
|
|
14659
14965
|
*/
|
|
14660
|
-
actions: NcRuleActionsSchema.optional()
|
|
14966
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14967
|
+
/**
|
|
14968
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14969
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14970
|
+
* did, and absent is the only way to say that without a migration.
|
|
14971
|
+
*/
|
|
14972
|
+
confirm: NcConfirmSchema.optional()
|
|
14661
14973
|
});
|
|
14662
14974
|
/**
|
|
14663
14975
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14668,7 +14980,37 @@ var NcRuleInputSchema = object({
|
|
|
14668
14980
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14669
14981
|
* `updateRule` patch.
|
|
14670
14982
|
*/
|
|
14671
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14983
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14984
|
+
disabledTargetIds: array(string()).optional(),
|
|
14985
|
+
/**
|
|
14986
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14987
|
+
*
|
|
14988
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14989
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14990
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14991
|
+
* one — which made every partial edit destructive:
|
|
14992
|
+
*
|
|
14993
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14994
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14995
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14996
|
+
*
|
|
14997
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14998
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14999
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
15000
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
15001
|
+
* within a minute of a two-field patch.
|
|
15002
|
+
*
|
|
15003
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
15004
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
15005
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
15006
|
+
* absent key is now genuinely absent.
|
|
15007
|
+
*/
|
|
15008
|
+
enabled: boolean().optional(),
|
|
15009
|
+
conditions: NcConditionsSchema.optional(),
|
|
15010
|
+
media: NcMediaPolicySchema.optional(),
|
|
15011
|
+
throttle: NcThrottleSchema.optional(),
|
|
15012
|
+
priority: number().int().min(1).max(5).optional()
|
|
15013
|
+
});
|
|
14672
15014
|
/** A persisted rule. */
|
|
14673
15015
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14674
15016
|
id: string(),
|
|
@@ -14969,6 +15311,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14969
15311
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14970
15312
|
* copy would lie the first time a rule is disabled.
|
|
14971
15313
|
*/
|
|
15314
|
+
/**
|
|
15315
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15316
|
+
*
|
|
15317
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15318
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15319
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15320
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15321
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15322
|
+
* with the switches the operator actually used.
|
|
15323
|
+
*/
|
|
15324
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15325
|
+
"muted",
|
|
15326
|
+
"detection-off",
|
|
15327
|
+
"offline"
|
|
15328
|
+
]);
|
|
15329
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15330
|
+
deviceId: number().int(),
|
|
15331
|
+
reason: NcAlarmSkipReasonSchema
|
|
15332
|
+
});
|
|
14972
15333
|
var NcAlarmModeCoverageSchema = object({
|
|
14973
15334
|
mode: AlarmArmModeSchema,
|
|
14974
15335
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14976,7 +15337,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14976
15337
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14977
15338
|
allDevices: boolean(),
|
|
14978
15339
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14979
|
-
deviceIds: array(number().int())
|
|
15340
|
+
deviceIds: array(number().int()),
|
|
15341
|
+
/**
|
|
15342
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15343
|
+
* excludes it.
|
|
15344
|
+
*
|
|
15345
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15346
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15347
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15348
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15349
|
+
* alarm tab.
|
|
15350
|
+
*/
|
|
15351
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14980
15352
|
});
|
|
14981
15353
|
var NcAlarmConfigSchema = object({
|
|
14982
15354
|
/**
|
|
@@ -16339,13 +16711,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16339
16711
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16340
16712
|
kind: "mutation",
|
|
16341
16713
|
auth: "admin"
|
|
16342
|
-
}), method(
|
|
16714
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16343
16715
|
kind: "mutation",
|
|
16344
16716
|
auth: "admin"
|
|
16345
|
-
}), method(object({
|
|
16346
|
-
kind: "
|
|
16717
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16718
|
+
kind: "mutation",
|
|
16347
16719
|
auth: "admin"
|
|
16348
|
-
}), method(
|
|
16720
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16721
|
+
kind: "mutation",
|
|
16722
|
+
auth: "admin"
|
|
16723
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16724
|
+
kind: "mutation",
|
|
16725
|
+
auth: "admin"
|
|
16726
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16349
16727
|
kind: "mutation",
|
|
16350
16728
|
auth: "admin"
|
|
16351
16729
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17802,9 +18180,16 @@ var CameraStatusSchema = object({
|
|
|
17802
18180
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17803
18181
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17804
18182
|
/**
|
|
17805
|
-
* Per-camera
|
|
18183
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17806
18184
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17807
18185
|
*
|
|
18186
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18187
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18188
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18189
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18190
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18191
|
+
* the difference between a camera being off and a camera being dead.
|
|
18192
|
+
*
|
|
17808
18193
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17809
18194
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17810
18195
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17875,7 +18260,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17875
18260
|
reachable: boolean(),
|
|
17876
18261
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17877
18262
|
});
|
|
17878
|
-
method(object({
|
|
18263
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18264
|
+
kind: "mutation",
|
|
18265
|
+
auth: "admin"
|
|
18266
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18267
|
+
kind: "mutation",
|
|
18268
|
+
auth: "admin"
|
|
18269
|
+
}), method(object({
|
|
17879
18270
|
deviceId: number(),
|
|
17880
18271
|
agentNodeId: string()
|
|
17881
18272
|
}), object({ success: literal(true) }), {
|
|
@@ -18549,6 +18940,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18549
18940
|
locationId: string(),
|
|
18550
18941
|
targetBytes: number().int().positive()
|
|
18551
18942
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18943
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18944
|
+
kind: "mutation",
|
|
18945
|
+
auth: "admin"
|
|
18946
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18947
|
+
kind: "mutation",
|
|
18948
|
+
auth: "admin"
|
|
18949
|
+
});
|
|
18552
18950
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18553
18951
|
providerId: string().min(1),
|
|
18554
18952
|
displayName: string().min(1),
|
|
@@ -18652,6 +19050,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18652
19050
|
label: string(),
|
|
18653
19051
|
description: string().optional()
|
|
18654
19052
|
});
|
|
19053
|
+
/**
|
|
19054
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19055
|
+
* an instance declares a camera.
|
|
19056
|
+
*/
|
|
19057
|
+
var TerminalInstanceInfoSchema = object({
|
|
19058
|
+
instanceId: string(),
|
|
19059
|
+
cameraStableId: string(),
|
|
19060
|
+
nodeId: string(),
|
|
19061
|
+
profileId: string(),
|
|
19062
|
+
profileLabel: string(),
|
|
19063
|
+
name: string(),
|
|
19064
|
+
enabled: boolean()
|
|
19065
|
+
});
|
|
19066
|
+
var TerminalLegacyCameraSchema = object({
|
|
19067
|
+
stableId: string(),
|
|
19068
|
+
nodeId: string(),
|
|
19069
|
+
profileId: string(),
|
|
19070
|
+
profileLabel: string(),
|
|
19071
|
+
name: string(),
|
|
19072
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19073
|
+
adoptable: boolean()
|
|
19074
|
+
});
|
|
18655
19075
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18656
19076
|
seq: number().int().positive(),
|
|
18657
19077
|
kind: literal("data"),
|
|
@@ -18668,7 +19088,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18668
19088
|
snapshot: string().optional(),
|
|
18669
19089
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18670
19090
|
});
|
|
18671
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19091
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19092
|
+
targetNodeId: string().min(1),
|
|
19093
|
+
profileId: string().min(1),
|
|
19094
|
+
name: string().trim().min(1).max(160).optional()
|
|
19095
|
+
}), TerminalInstanceInfoSchema, {
|
|
19096
|
+
kind: "mutation",
|
|
19097
|
+
auth: "admin"
|
|
19098
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19099
|
+
kind: "mutation",
|
|
19100
|
+
auth: "admin"
|
|
19101
|
+
}), method(object({
|
|
19102
|
+
instanceId: string().min(1),
|
|
19103
|
+
enabled: boolean()
|
|
19104
|
+
}), TerminalInstanceInfoSchema, {
|
|
19105
|
+
kind: "mutation",
|
|
19106
|
+
auth: "admin"
|
|
19107
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19108
|
+
stableId: string().min(1),
|
|
19109
|
+
name: string().trim().min(1).max(160).optional()
|
|
19110
|
+
}), TerminalInstanceInfoSchema, {
|
|
19111
|
+
kind: "mutation",
|
|
19112
|
+
auth: "admin"
|
|
19113
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18672
19114
|
profileId: string(),
|
|
18673
19115
|
cols: number().int().positive(),
|
|
18674
19116
|
rows: number().int().positive()
|
|
@@ -18685,7 +19127,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18685
19127
|
}), method(object({
|
|
18686
19128
|
sessionId: string(),
|
|
18687
19129
|
afterSeq: number().int().nonnegative(),
|
|
18688
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19130
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19131
|
+
/**
|
|
19132
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19133
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19134
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19135
|
+
*/
|
|
19136
|
+
waitForOutput: boolean().optional()
|
|
18689
19137
|
}), TerminalOutputBatchSchema, {
|
|
18690
19138
|
kind: "mutation",
|
|
18691
19139
|
auth: "admin",
|
|
@@ -21183,6 +21631,7 @@ var FaceInfoSchema = object({
|
|
|
21183
21631
|
var FaceFilterEnum = _enum([
|
|
21184
21632
|
"unassigned",
|
|
21185
21633
|
"recognized",
|
|
21634
|
+
"identified",
|
|
21186
21635
|
"all"
|
|
21187
21636
|
]);
|
|
21188
21637
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21211,6 +21660,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21211
21660
|
kind: "mutation",
|
|
21212
21661
|
auth: "admin"
|
|
21213
21662
|
}), method(object({
|
|
21663
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21664
|
+
deviceId: number().int().optional(),
|
|
21214
21665
|
limit: number().int().positive().optional(),
|
|
21215
21666
|
filter: FaceFilterEnum.optional(),
|
|
21216
21667
|
/**
|
|
@@ -23440,6 +23891,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23440
23891
|
capName: string().min(1).max(64),
|
|
23441
23892
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23442
23893
|
valuePath: string().min(1).max(64)
|
|
23894
|
+
}),
|
|
23895
|
+
object({
|
|
23896
|
+
kind: literal("latest-recognition"),
|
|
23897
|
+
recognition: _enum(["person", "plate"])
|
|
23443
23898
|
})
|
|
23444
23899
|
]);
|
|
23445
23900
|
var OsdSlotBindingSchema = object({
|
|
@@ -23545,6 +24000,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23545
24000
|
}), object({ success: literal(true) }), {
|
|
23546
24001
|
kind: "mutation",
|
|
23547
24002
|
auth: "admin"
|
|
24003
|
+
}), method(object({
|
|
24004
|
+
sourceDeviceId: number().int(),
|
|
24005
|
+
targetDeviceId: number().int()
|
|
24006
|
+
}), object({
|
|
24007
|
+
copied: number().int().nonnegative(),
|
|
24008
|
+
skipped: number().int().nonnegative()
|
|
24009
|
+
}), {
|
|
24010
|
+
kind: "mutation",
|
|
24011
|
+
auth: "admin"
|
|
23548
24012
|
}), method(object({
|
|
23549
24013
|
deviceId: number().int(),
|
|
23550
24014
|
slotId: string().min(1),
|
|
@@ -24467,7 +24931,19 @@ var RecordingManifestSchema = object({
|
|
|
24467
24931
|
* profiles/subtrees/locations on this node). */
|
|
24468
24932
|
var RecordingDeviceUsageSchema = object({
|
|
24469
24933
|
deviceId: number(),
|
|
24470
|
-
usedBytes: number()
|
|
24934
|
+
usedBytes: number(),
|
|
24935
|
+
/**
|
|
24936
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
24937
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
24938
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
24939
|
+
*
|
|
24940
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
24941
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
24942
|
+
* field must keep validating that older provider's payload: the framework
|
|
24943
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
24944
|
+
* the later of the two.
|
|
24945
|
+
*/
|
|
24946
|
+
oldestMs: number().nullable().optional()
|
|
24471
24947
|
});
|
|
24472
24948
|
/** Recording storage usage + capacity for one storage location. */
|
|
24473
24949
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24495,6 +24971,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24495
24971
|
locations: array(RecordingLocationUsageSchema)
|
|
24496
24972
|
});
|
|
24497
24973
|
/**
|
|
24974
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
24975
|
+
*
|
|
24976
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
24977
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
24978
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
24979
|
+
* location, run FIFO behind the single-flight mover.
|
|
24980
|
+
*
|
|
24981
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
24982
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
24983
|
+
* (empty on the plan).
|
|
24984
|
+
*/
|
|
24985
|
+
var RecordingRebalanceMoveSchema = object({
|
|
24986
|
+
deviceId: number(),
|
|
24987
|
+
profile: string(),
|
|
24988
|
+
fromLocationId: string(),
|
|
24989
|
+
toLocationId: string(),
|
|
24990
|
+
bytes: number(),
|
|
24991
|
+
files: number().int()
|
|
24992
|
+
});
|
|
24993
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
24994
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
24995
|
+
* that had nothing to do. */
|
|
24996
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
24997
|
+
"unassigned",
|
|
24998
|
+
"target-not-writable",
|
|
24999
|
+
"below-threshold",
|
|
25000
|
+
"no-headroom"
|
|
25001
|
+
]);
|
|
25002
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25003
|
+
deviceId: number(),
|
|
25004
|
+
profile: string(),
|
|
25005
|
+
fromLocationId: string(),
|
|
25006
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25007
|
+
toLocationId: string().nullable(),
|
|
25008
|
+
bytes: number(),
|
|
25009
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25010
|
+
});
|
|
25011
|
+
var RecordingRebalancePlanSchema = object({
|
|
25012
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25013
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25014
|
+
bytesToMove: number(),
|
|
25015
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25016
|
+
jobIds: array(string())
|
|
25017
|
+
});
|
|
25018
|
+
var RecordingRebalanceInputSchema = object({
|
|
25019
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25020
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25021
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25022
|
+
minMoveGb: number().min(0).optional()
|
|
25023
|
+
});
|
|
25024
|
+
/**
|
|
24498
25025
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24499
25026
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24500
25027
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24642,6 +25169,21 @@ method(object({
|
|
|
24642
25169
|
}), {
|
|
24643
25170
|
kind: "mutation",
|
|
24644
25171
|
auth: "admin"
|
|
25172
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25173
|
+
kind: "mutation",
|
|
25174
|
+
auth: "admin"
|
|
25175
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25176
|
+
kind: "mutation",
|
|
25177
|
+
auth: "admin"
|
|
25178
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25179
|
+
kind: "mutation",
|
|
25180
|
+
auth: "admin"
|
|
25181
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25182
|
+
kind: "mutation",
|
|
25183
|
+
auth: "admin"
|
|
25184
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25185
|
+
kind: "mutation",
|
|
25186
|
+
auth: "admin"
|
|
24645
25187
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24646
25188
|
kind: "mutation",
|
|
24647
25189
|
auth: "admin"
|
|
@@ -24651,9 +25193,15 @@ method(object({
|
|
|
24651
25193
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24652
25194
|
kind: "mutation",
|
|
24653
25195
|
auth: "admin"
|
|
25196
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25197
|
+
kind: "query",
|
|
25198
|
+
auth: "admin"
|
|
25199
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25200
|
+
kind: "mutation",
|
|
25201
|
+
auth: "admin"
|
|
24654
25202
|
});
|
|
24655
25203
|
/**
|
|
24656
|
-
* `
|
|
25204
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24657
25205
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24658
25206
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24659
25207
|
* delete-after-download.
|
|
@@ -24668,10 +25216,42 @@ method(object({
|
|
|
24668
25216
|
*/
|
|
24669
25217
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24670
25218
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25219
|
+
/**
|
|
25220
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25221
|
+
*
|
|
25222
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25223
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25224
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25225
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25226
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25227
|
+
*/
|
|
25228
|
+
var ExportDenseRangeSchema = object({
|
|
25229
|
+
fromSec: number().nonnegative(),
|
|
25230
|
+
toSec: number().nonnegative()
|
|
25231
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25232
|
+
/**
|
|
25233
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25234
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25235
|
+
*
|
|
25236
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25237
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25238
|
+
*/
|
|
25239
|
+
var ExportDenseSchema = object({
|
|
25240
|
+
everyMs: number().int().positive(),
|
|
25241
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25242
|
+
});
|
|
24671
25243
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24672
25244
|
var ExportTimelapseSchema = object({
|
|
24673
25245
|
everyMs: number().int().positive(),
|
|
24674
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25246
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25247
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25248
|
+
dense: ExportDenseSchema.optional()
|
|
25249
|
+
}).superRefine((v, ctx) => {
|
|
25250
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25251
|
+
code: ZodIssueCode.custom,
|
|
25252
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25253
|
+
path: ["dense", "everyMs"]
|
|
25254
|
+
});
|
|
24675
25255
|
});
|
|
24676
25256
|
/**
|
|
24677
25257
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24729,6 +25309,19 @@ var ExportDownloadSchema = object({
|
|
|
24729
25309
|
url: string(),
|
|
24730
25310
|
endpoints: array(string())
|
|
24731
25311
|
});
|
|
25312
|
+
/**
|
|
25313
|
+
* A finished export's bytes, inline.
|
|
25314
|
+
*
|
|
25315
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25316
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25317
|
+
*/
|
|
25318
|
+
var ExportBytesSchema = object({
|
|
25319
|
+
base64: string(),
|
|
25320
|
+
contentType: string(),
|
|
25321
|
+
/** Suggested filename, extension included. */
|
|
25322
|
+
name: string(),
|
|
25323
|
+
bytes: number().int().nonnegative()
|
|
25324
|
+
});
|
|
24732
25325
|
method(object({
|
|
24733
25326
|
deviceId: number(),
|
|
24734
25327
|
profile: string(),
|
|
@@ -24753,6 +25346,9 @@ method(object({
|
|
|
24753
25346
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24754
25347
|
kind: "query",
|
|
24755
25348
|
auth: "protected"
|
|
25349
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25350
|
+
kind: "query",
|
|
25351
|
+
auth: "protected"
|
|
24756
25352
|
});
|
|
24757
25353
|
/**
|
|
24758
25354
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30254,6 +30850,12 @@ Object.freeze({
|
|
|
30254
30850
|
addonId: null,
|
|
30255
30851
|
access: "delete"
|
|
30256
30852
|
},
|
|
30853
|
+
"osdManager.copyDeviceConfiguration": {
|
|
30854
|
+
capName: "osd-manager",
|
|
30855
|
+
capScope: "system",
|
|
30856
|
+
addonId: null,
|
|
30857
|
+
access: "create"
|
|
30858
|
+
},
|
|
30257
30859
|
"osdManager.getConditionSupport": {
|
|
30258
30860
|
capName: "osd-manager",
|
|
30259
30861
|
capScope: "system",
|
|
@@ -30350,7 +30952,7 @@ Object.freeze({
|
|
|
30350
30952
|
addonId: null,
|
|
30351
30953
|
access: "create"
|
|
30352
30954
|
},
|
|
30353
|
-
"pipelineAnalytics.
|
|
30955
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30354
30956
|
capName: "pipeline-analytics",
|
|
30355
30957
|
capScope: "device",
|
|
30356
30958
|
addonId: null,
|
|
@@ -30422,12 +31024,6 @@ Object.freeze({
|
|
|
30422
31024
|
addonId: null,
|
|
30423
31025
|
access: "view"
|
|
30424
31026
|
},
|
|
30425
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30426
|
-
capName: "pipeline-analytics",
|
|
30427
|
-
capScope: "device",
|
|
30428
|
-
addonId: null,
|
|
30429
|
-
access: "view"
|
|
30430
|
-
},
|
|
30431
31027
|
"pipelineAnalytics.getMotionEvents": {
|
|
30432
31028
|
capName: "pipeline-analytics",
|
|
30433
31029
|
capScope: "device",
|
|
@@ -30464,6 +31060,12 @@ Object.freeze({
|
|
|
30464
31060
|
addonId: null,
|
|
30465
31061
|
access: "view"
|
|
30466
31062
|
},
|
|
31063
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31064
|
+
capName: "pipeline-analytics",
|
|
31065
|
+
capScope: "device",
|
|
31066
|
+
addonId: null,
|
|
31067
|
+
access: "view"
|
|
31068
|
+
},
|
|
30467
31069
|
"pipelineAnalytics.getTrack": {
|
|
30468
31070
|
capName: "pipeline-analytics",
|
|
30469
31071
|
capScope: "device",
|
|
@@ -30542,6 +31144,12 @@ Object.freeze({
|
|
|
30542
31144
|
addonId: null,
|
|
30543
31145
|
access: "view"
|
|
30544
31146
|
},
|
|
31147
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31148
|
+
capName: "pipeline-analytics",
|
|
31149
|
+
capScope: "device",
|
|
31150
|
+
addonId: null,
|
|
31151
|
+
access: "create"
|
|
31152
|
+
},
|
|
30545
31153
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30546
31154
|
capName: "pipeline-analytics",
|
|
30547
31155
|
capScope: "device",
|
|
@@ -30572,7 +31180,7 @@ Object.freeze({
|
|
|
30572
31180
|
addonId: null,
|
|
30573
31181
|
access: "create"
|
|
30574
31182
|
},
|
|
30575
|
-
"pipelineAnalytics.
|
|
31183
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30576
31184
|
capName: "pipeline-analytics",
|
|
30577
31185
|
capScope: "device",
|
|
30578
31186
|
addonId: null,
|
|
@@ -30584,6 +31192,12 @@ Object.freeze({
|
|
|
30584
31192
|
addonId: null,
|
|
30585
31193
|
access: "create"
|
|
30586
31194
|
},
|
|
31195
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31196
|
+
capName: "pipeline-analytics",
|
|
31197
|
+
capScope: "device",
|
|
31198
|
+
addonId: null,
|
|
31199
|
+
access: "create"
|
|
31200
|
+
},
|
|
30587
31201
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30588
31202
|
capName: "pipeline-analytics",
|
|
30589
31203
|
capScope: "device",
|
|
@@ -30608,6 +31222,12 @@ Object.freeze({
|
|
|
30608
31222
|
addonId: null,
|
|
30609
31223
|
access: "create"
|
|
30610
31224
|
},
|
|
31225
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31226
|
+
capName: "pipeline-analytics",
|
|
31227
|
+
capScope: "device",
|
|
31228
|
+
addonId: null,
|
|
31229
|
+
access: "create"
|
|
31230
|
+
},
|
|
30611
31231
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30612
31232
|
capName: "pipeline-analytics",
|
|
30613
31233
|
capScope: "device",
|
|
@@ -30974,6 +31594,12 @@ Object.freeze({
|
|
|
30974
31594
|
addonId: null,
|
|
30975
31595
|
access: "view"
|
|
30976
31596
|
},
|
|
31597
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31598
|
+
capName: "pipeline-orchestrator",
|
|
31599
|
+
capScope: "system",
|
|
31600
|
+
addonId: null,
|
|
31601
|
+
access: "create"
|
|
31602
|
+
},
|
|
30977
31603
|
"pipelineOrchestrator.rebalance": {
|
|
30978
31604
|
capName: "pipeline-orchestrator",
|
|
30979
31605
|
capScope: "system",
|
|
@@ -30998,6 +31624,12 @@ Object.freeze({
|
|
|
30998
31624
|
addonId: null,
|
|
30999
31625
|
access: "view"
|
|
31000
31626
|
},
|
|
31627
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31628
|
+
capName: "pipeline-orchestrator",
|
|
31629
|
+
capScope: "system",
|
|
31630
|
+
addonId: null,
|
|
31631
|
+
access: "create"
|
|
31632
|
+
},
|
|
31001
31633
|
"pipelineOrchestrator.saveTemplate": {
|
|
31002
31634
|
capName: "pipeline-orchestrator",
|
|
31003
31635
|
capScope: "system",
|
|
@@ -31394,7 +32026,13 @@ Object.freeze({
|
|
|
31394
32026
|
addonId: null,
|
|
31395
32027
|
access: "create"
|
|
31396
32028
|
},
|
|
31397
|
-
"recording.
|
|
32029
|
+
"recording.cancelRelocateJob": {
|
|
32030
|
+
capName: "recording",
|
|
32031
|
+
capScope: "system",
|
|
32032
|
+
addonId: null,
|
|
32033
|
+
access: "create"
|
|
32034
|
+
},
|
|
32035
|
+
"recording.cancelStorageMigrationMove": {
|
|
31398
32036
|
capName: "recording",
|
|
31399
32037
|
capScope: "system",
|
|
31400
32038
|
addonId: null,
|
|
@@ -31430,7 +32068,7 @@ Object.freeze({
|
|
|
31430
32068
|
addonId: null,
|
|
31431
32069
|
access: "view"
|
|
31432
32070
|
},
|
|
31433
|
-
"recording.
|
|
32071
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31434
32072
|
capName: "recording",
|
|
31435
32073
|
capScope: "system",
|
|
31436
32074
|
addonId: null,
|
|
@@ -31448,12 +32086,30 @@ Object.freeze({
|
|
|
31448
32086
|
addonId: null,
|
|
31449
32087
|
access: "view"
|
|
31450
32088
|
},
|
|
32089
|
+
"recording.listRelocateJobs": {
|
|
32090
|
+
capName: "recording",
|
|
32091
|
+
capScope: "system",
|
|
32092
|
+
addonId: null,
|
|
32093
|
+
access: "view"
|
|
32094
|
+
},
|
|
31451
32095
|
"recording.locateSegment": {
|
|
31452
32096
|
capName: "recording",
|
|
31453
32097
|
capScope: "system",
|
|
31454
32098
|
addonId: null,
|
|
31455
32099
|
access: "view"
|
|
31456
32100
|
},
|
|
32101
|
+
"recording.pauseForStorageMigration": {
|
|
32102
|
+
capName: "recording",
|
|
32103
|
+
capScope: "system",
|
|
32104
|
+
addonId: null,
|
|
32105
|
+
access: "create"
|
|
32106
|
+
},
|
|
32107
|
+
"recording.planStorageRebalance": {
|
|
32108
|
+
capName: "recording",
|
|
32109
|
+
capScope: "system",
|
|
32110
|
+
addonId: null,
|
|
32111
|
+
access: "view"
|
|
32112
|
+
},
|
|
31457
32113
|
"recording.pruneFootage": {
|
|
31458
32114
|
capName: "recording",
|
|
31459
32115
|
capScope: "system",
|
|
@@ -31472,6 +32128,12 @@ Object.freeze({
|
|
|
31472
32128
|
addonId: null,
|
|
31473
32129
|
access: "view"
|
|
31474
32130
|
},
|
|
32131
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32132
|
+
capName: "recording",
|
|
32133
|
+
capScope: "system",
|
|
32134
|
+
addonId: null,
|
|
32135
|
+
access: "create"
|
|
32136
|
+
},
|
|
31475
32137
|
"recording.relocateFootage": {
|
|
31476
32138
|
capName: "recording",
|
|
31477
32139
|
capScope: "system",
|
|
@@ -31496,44 +32158,68 @@ Object.freeze({
|
|
|
31496
32158
|
addonId: null,
|
|
31497
32159
|
access: "create"
|
|
31498
32160
|
},
|
|
32161
|
+
"recording.resumeForStorageMigration": {
|
|
32162
|
+
capName: "recording",
|
|
32163
|
+
capScope: "system",
|
|
32164
|
+
addonId: null,
|
|
32165
|
+
access: "create"
|
|
32166
|
+
},
|
|
31499
32167
|
"recording.setDeviceConfig": {
|
|
31500
32168
|
capName: "recording",
|
|
31501
32169
|
capScope: "system",
|
|
31502
32170
|
addonId: null,
|
|
31503
32171
|
access: "create"
|
|
31504
32172
|
},
|
|
32173
|
+
"recording.startStorageMigrationMove": {
|
|
32174
|
+
capName: "recording",
|
|
32175
|
+
capScope: "system",
|
|
32176
|
+
addonId: null,
|
|
32177
|
+
access: "create"
|
|
32178
|
+
},
|
|
32179
|
+
"recording.startStorageRebalance": {
|
|
32180
|
+
capName: "recording",
|
|
32181
|
+
capScope: "system",
|
|
32182
|
+
addonId: null,
|
|
32183
|
+
access: "create"
|
|
32184
|
+
},
|
|
31505
32185
|
"recordingExport.cancelExport": {
|
|
31506
|
-
capName: "
|
|
32186
|
+
capName: "recording-export",
|
|
31507
32187
|
capScope: "system",
|
|
31508
32188
|
addonId: null,
|
|
31509
32189
|
access: "create"
|
|
31510
32190
|
},
|
|
31511
32191
|
"recordingExport.createExport": {
|
|
31512
|
-
capName: "
|
|
32192
|
+
capName: "recording-export",
|
|
31513
32193
|
capScope: "system",
|
|
31514
32194
|
addonId: null,
|
|
31515
32195
|
access: "create"
|
|
31516
32196
|
},
|
|
31517
32197
|
"recordingExport.deleteExport": {
|
|
31518
|
-
capName: "
|
|
32198
|
+
capName: "recording-export",
|
|
31519
32199
|
capScope: "system",
|
|
31520
32200
|
addonId: null,
|
|
31521
32201
|
access: "delete"
|
|
31522
32202
|
},
|
|
31523
32203
|
"recordingExport.getDownloadUrl": {
|
|
31524
|
-
capName: "
|
|
32204
|
+
capName: "recording-export",
|
|
31525
32205
|
capScope: "system",
|
|
31526
32206
|
addonId: null,
|
|
31527
32207
|
access: "view"
|
|
31528
32208
|
},
|
|
31529
32209
|
"recordingExport.getExport": {
|
|
31530
|
-
capName: "
|
|
32210
|
+
capName: "recording-export",
|
|
31531
32211
|
capScope: "system",
|
|
31532
32212
|
addonId: null,
|
|
31533
32213
|
access: "view"
|
|
31534
32214
|
},
|
|
31535
32215
|
"recordingExport.listExports": {
|
|
31536
|
-
capName: "
|
|
32216
|
+
capName: "recording-export",
|
|
32217
|
+
capScope: "system",
|
|
32218
|
+
addonId: null,
|
|
32219
|
+
access: "view"
|
|
32220
|
+
},
|
|
32221
|
+
"recordingExport.readExportBytes": {
|
|
32222
|
+
capName: "recording-export",
|
|
31537
32223
|
capScope: "system",
|
|
31538
32224
|
addonId: null,
|
|
31539
32225
|
access: "view"
|
|
@@ -31892,6 +32578,30 @@ Object.freeze({
|
|
|
31892
32578
|
addonId: null,
|
|
31893
32579
|
access: "view"
|
|
31894
32580
|
},
|
|
32581
|
+
"storageMigration.cancel": {
|
|
32582
|
+
capName: "storage-migration",
|
|
32583
|
+
capScope: "system",
|
|
32584
|
+
addonId: null,
|
|
32585
|
+
access: "create"
|
|
32586
|
+
},
|
|
32587
|
+
"storageMigration.plan": {
|
|
32588
|
+
capName: "storage-migration",
|
|
32589
|
+
capScope: "system",
|
|
32590
|
+
addonId: null,
|
|
32591
|
+
access: "view"
|
|
32592
|
+
},
|
|
32593
|
+
"storageMigration.start": {
|
|
32594
|
+
capName: "storage-migration",
|
|
32595
|
+
capScope: "system",
|
|
32596
|
+
addonId: null,
|
|
32597
|
+
access: "create"
|
|
32598
|
+
},
|
|
32599
|
+
"storageMigration.status": {
|
|
32600
|
+
capName: "storage-migration",
|
|
32601
|
+
capScope: "system",
|
|
32602
|
+
addonId: null,
|
|
32603
|
+
access: "view"
|
|
32604
|
+
},
|
|
31895
32605
|
"storageProvider.abortUpload": {
|
|
31896
32606
|
capName: "storage-provider",
|
|
31897
32607
|
capScope: "system",
|
|
@@ -32270,12 +32980,42 @@ Object.freeze({
|
|
|
32270
32980
|
addonId: null,
|
|
32271
32981
|
access: "create"
|
|
32272
32982
|
},
|
|
32983
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
32984
|
+
capName: "terminal-session",
|
|
32985
|
+
capScope: "system",
|
|
32986
|
+
addonId: null,
|
|
32987
|
+
access: "create"
|
|
32988
|
+
},
|
|
32273
32989
|
"terminalSession.close": {
|
|
32274
32990
|
capName: "terminal-session",
|
|
32275
32991
|
capScope: "system",
|
|
32276
32992
|
addonId: null,
|
|
32277
32993
|
access: "create"
|
|
32278
32994
|
},
|
|
32995
|
+
"terminalSession.createInstance": {
|
|
32996
|
+
capName: "terminal-session",
|
|
32997
|
+
capScope: "system",
|
|
32998
|
+
addonId: null,
|
|
32999
|
+
access: "create"
|
|
33000
|
+
},
|
|
33001
|
+
"terminalSession.deleteInstance": {
|
|
33002
|
+
capName: "terminal-session",
|
|
33003
|
+
capScope: "system",
|
|
33004
|
+
addonId: null,
|
|
33005
|
+
access: "delete"
|
|
33006
|
+
},
|
|
33007
|
+
"terminalSession.listInstances": {
|
|
33008
|
+
capName: "terminal-session",
|
|
33009
|
+
capScope: "system",
|
|
33010
|
+
addonId: null,
|
|
33011
|
+
access: "view"
|
|
33012
|
+
},
|
|
33013
|
+
"terminalSession.listLegacyCameras": {
|
|
33014
|
+
capName: "terminal-session",
|
|
33015
|
+
capScope: "system",
|
|
33016
|
+
addonId: null,
|
|
33017
|
+
access: "view"
|
|
33018
|
+
},
|
|
32279
33019
|
"terminalSession.listProfiles": {
|
|
32280
33020
|
capName: "terminal-session",
|
|
32281
33021
|
capScope: "system",
|
|
@@ -32306,6 +33046,12 @@ Object.freeze({
|
|
|
32306
33046
|
addonId: null,
|
|
32307
33047
|
access: "create"
|
|
32308
33048
|
},
|
|
33049
|
+
"terminalSession.setInstanceEnabled": {
|
|
33050
|
+
capName: "terminal-session",
|
|
33051
|
+
capScope: "system",
|
|
33052
|
+
addonId: null,
|
|
33053
|
+
access: "create"
|
|
33054
|
+
},
|
|
32309
33055
|
"terminalSession.writeInput": {
|
|
32310
33056
|
capName: "terminal-session",
|
|
32311
33057
|
capScope: "system",
|
|
@@ -32850,6 +33596,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
32850
33596
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
32851
33597
|
var PriorityField = number().int().min(1).max(5);
|
|
32852
33598
|
/**
|
|
33599
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33600
|
+
*
|
|
33601
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33602
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33603
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33604
|
+
*
|
|
33605
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33606
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33607
|
+
*
|
|
33608
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33609
|
+
*
|
|
33610
|
+
* 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.
|
|
33611
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33612
|
+
* and therefore the length of a quiet night, does not move.
|
|
33613
|
+
*
|
|
33614
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33615
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33616
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33617
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33618
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33619
|
+
*/
|
|
33620
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33621
|
+
/**
|
|
33622
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33623
|
+
*
|
|
33624
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33625
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33626
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33627
|
+
* that range every ~583 ms.
|
|
33628
|
+
*
|
|
33629
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33630
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33631
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33632
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33633
|
+
* schema change and are the tracked follow-up.
|
|
33634
|
+
*
|
|
33635
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33636
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33637
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33638
|
+
* happened.
|
|
33639
|
+
*/
|
|
33640
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33641
|
+
/**
|
|
33642
|
+
* Caption burned into the notification's preview frame.
|
|
33643
|
+
*
|
|
33644
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33645
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33646
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33647
|
+
*
|
|
33648
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33649
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33650
|
+
* the reason this is not `.min(1)`.
|
|
33651
|
+
*/
|
|
33652
|
+
var PreviewTextField = string().max(200);
|
|
33653
|
+
/**
|
|
33654
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33655
|
+
*
|
|
33656
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33657
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33658
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33659
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33660
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33661
|
+
* them.
|
|
33662
|
+
*
|
|
33663
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33664
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33665
|
+
* paying that on the deploy that shipped it.
|
|
33666
|
+
*
|
|
33667
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33668
|
+
*/
|
|
33669
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33670
|
+
/**
|
|
33671
|
+
* Which detection classes the notification reports counts for.
|
|
33672
|
+
*
|
|
33673
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33674
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33675
|
+
* class the window actually contained", which is what an operator who never
|
|
33676
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33677
|
+
* counts cars all night).
|
|
33678
|
+
*
|
|
33679
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33680
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33681
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33682
|
+
* not emit.
|
|
33683
|
+
*
|
|
33684
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33685
|
+
* - `{{detections}}` — total over the reported classes
|
|
33686
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33687
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33688
|
+
* one per class, `count_` + the class name
|
|
33689
|
+
*
|
|
33690
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33691
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33692
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33693
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33694
|
+
*/
|
|
33695
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33696
|
+
/**
|
|
32853
33697
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
32854
33698
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
32855
33699
|
* here (see the ownership note above).
|
|
@@ -32869,9 +33713,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
32869
33713
|
cadenceSec: CadenceSecField.default(15),
|
|
32870
33714
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
32871
33715
|
framerate: FramerateField.default(10),
|
|
33716
|
+
/**
|
|
33717
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33718
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33719
|
+
* field gets.
|
|
33720
|
+
*/
|
|
33721
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33722
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33723
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32872
33724
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
32873
33725
|
targets: TargetsField,
|
|
32874
33726
|
template: TimelapseTemplateSchema.optional(),
|
|
33727
|
+
/**
|
|
33728
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33729
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33730
|
+
*
|
|
33731
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33732
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33733
|
+
* silently clear the caption too.
|
|
33734
|
+
*/
|
|
33735
|
+
previewText: PreviewTextField.optional(),
|
|
33736
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33737
|
+
previewMode: PreviewModeField.default("image"),
|
|
33738
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33739
|
+
reportClasses: ReportClassesField.optional(),
|
|
32875
33740
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32876
33741
|
priority: PriorityField.default(3)
|
|
32877
33742
|
});
|
|
@@ -32882,8 +33747,13 @@ object({
|
|
|
32882
33747
|
schedule: NcScheduleSchema.optional(),
|
|
32883
33748
|
cadenceSec: CadenceSecField.optional(),
|
|
32884
33749
|
framerate: FramerateField.optional(),
|
|
33750
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33751
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32885
33752
|
targets: TargetsField.optional(),
|
|
32886
33753
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33754
|
+
previewText: PreviewTextField.optional(),
|
|
33755
|
+
previewMode: PreviewModeField.optional(),
|
|
33756
|
+
reportClasses: ReportClassesField.optional(),
|
|
32887
33757
|
priority: PriorityField.optional()
|
|
32888
33758
|
});
|
|
32889
33759
|
TimelapseRuleInputSchema.extend({
|
|
@@ -32895,10 +33765,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
32895
33765
|
*/
|
|
32896
33766
|
ownerUserId: string().optional(),
|
|
32897
33767
|
/**
|
|
32898
|
-
* Epoch-ms of the
|
|
32899
|
-
*
|
|
33768
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33769
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33770
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
32900
33771
|
*/
|
|
32901
33772
|
lastGeneratedAt: number().optional(),
|
|
33773
|
+
/**
|
|
33774
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33775
|
+
* re-generation guard's real durable state.
|
|
33776
|
+
*
|
|
33777
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33778
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33779
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33780
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33781
|
+
* come back.
|
|
33782
|
+
*
|
|
33783
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33784
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33785
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33786
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33787
|
+
* once, on the deploy that shipped the map.
|
|
33788
|
+
*/
|
|
33789
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
32902
33790
|
/** userId of the caller who created the rule (server-stamped). */
|
|
32903
33791
|
createdBy: string(),
|
|
32904
33792
|
createdAt: number(),
|