@camstack/addon-provider-hikvision 1.2.15 → 1.2.17
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
|
@@ -7201,8 +7201,31 @@ var AdoptionJobSchema = object({
|
|
|
7201
7201
|
error: string().nullable()
|
|
7202
7202
|
});
|
|
7203
7203
|
/**
|
|
7204
|
-
* Per-camera FUNCTION SWITCHES
|
|
7205
|
-
*
|
|
7204
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7205
|
+
*
|
|
7206
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7207
|
+
*
|
|
7208
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7209
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7210
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7211
|
+
* every function already had a settings page of its own, and a second place to
|
|
7212
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7213
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7214
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7215
|
+
* (which was always first-class; the switch was a veneer over
|
|
7216
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7217
|
+
* per-device setting, the two camera planes to their own components.
|
|
7218
|
+
*
|
|
7219
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7220
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7221
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7222
|
+
* never about a control panel.
|
|
7223
|
+
*
|
|
7224
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7225
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7226
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7227
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7228
|
+
* stop; nothing new may be built on it.
|
|
7206
7229
|
*
|
|
7207
7230
|
* ## This file adds no state
|
|
7208
7231
|
*
|
|
@@ -7547,14 +7570,21 @@ var RecordingConfigSchema = object({
|
|
|
7547
7570
|
/**
|
|
7548
7571
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7549
7572
|
*
|
|
7550
|
-
* One shape shared by the recorder
|
|
7551
|
-
*
|
|
7552
|
-
*
|
|
7553
|
-
*
|
|
7554
|
-
*
|
|
7555
|
-
|
|
7573
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7574
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7575
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7576
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7577
|
+
* addon surface.
|
|
7578
|
+
*/
|
|
7579
|
+
/**
|
|
7580
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7581
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7582
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7583
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7584
|
+
* runs at all.
|
|
7556
7585
|
*/
|
|
7557
7586
|
var RelocateJobStateSchema = _enum([
|
|
7587
|
+
"queued",
|
|
7558
7588
|
"running",
|
|
7559
7589
|
"done",
|
|
7560
7590
|
"failed",
|
|
@@ -7579,19 +7609,109 @@ var RelocateJobSchema = object({
|
|
|
7579
7609
|
finishedAt: number().nullable(),
|
|
7580
7610
|
error: string().nullable()
|
|
7581
7611
|
});
|
|
7612
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7613
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7614
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7582
7615
|
var RelocateFootageInputSchema = object({
|
|
7583
|
-
deviceId: number().optional(),
|
|
7584
7616
|
fromLocationId: string(),
|
|
7585
7617
|
toLocationId: string(),
|
|
7586
7618
|
entities: array(_enum(["segments"])).optional(),
|
|
7619
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7620
|
+
* pre-orchestration compatibility path. */
|
|
7621
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7622
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7623
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7624
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7625
|
+
deviceId: number().int().optional(),
|
|
7626
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7627
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7628
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7629
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7630
|
+
profiles: array(string()).optional(),
|
|
7587
7631
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7588
7632
|
* never allowed to starve live writers. */
|
|
7589
7633
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7590
7634
|
});
|
|
7591
|
-
|
|
7592
|
-
|
|
7635
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7636
|
+
* from persistent recording settings: a migration never changes
|
|
7637
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7638
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7639
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7640
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7593
7641
|
toLocationId: string(),
|
|
7594
7642
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7643
|
+
}).extend({ leaseId: string().min(1) });
|
|
7644
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7645
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7646
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7647
|
+
var StorageMigrationClassSchema = _enum([
|
|
7648
|
+
"recordings",
|
|
7649
|
+
"recordingsLow",
|
|
7650
|
+
"eventMedia"
|
|
7651
|
+
]);
|
|
7652
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7653
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7654
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7655
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7656
|
+
recordings: string().min(1).optional(),
|
|
7657
|
+
recordingsLow: string().min(1).optional(),
|
|
7658
|
+
eventMedia: string().min(1).optional()
|
|
7659
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7660
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7661
|
+
var StorageMigrationInputSchema = object({
|
|
7662
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7663
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7664
|
+
});
|
|
7665
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7666
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7667
|
+
* verified. */
|
|
7668
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7669
|
+
"planning",
|
|
7670
|
+
"pausing",
|
|
7671
|
+
"moving",
|
|
7672
|
+
"verifying",
|
|
7673
|
+
"repointing",
|
|
7674
|
+
"refreshing",
|
|
7675
|
+
"resuming",
|
|
7676
|
+
"done",
|
|
7677
|
+
"failed",
|
|
7678
|
+
"cancelled"
|
|
7679
|
+
]);
|
|
7680
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7681
|
+
"pipeline",
|
|
7682
|
+
"recorder",
|
|
7683
|
+
"analytics"
|
|
7684
|
+
]);
|
|
7685
|
+
var StorageMigrationMoveSchema = object({
|
|
7686
|
+
storageClass: StorageMigrationClassSchema,
|
|
7687
|
+
fromLocationId: string(),
|
|
7688
|
+
toLocationId: string(),
|
|
7689
|
+
moverJobId: string().nullable(),
|
|
7690
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7691
|
+
error: string().nullable()
|
|
7692
|
+
});
|
|
7693
|
+
var StorageMigrationJobSchema = object({
|
|
7694
|
+
jobId: string(),
|
|
7695
|
+
phase: StorageMigrationPhaseSchema,
|
|
7696
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7697
|
+
throttleMbps: number(),
|
|
7698
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7699
|
+
pauseLeaseId: string().nullable(),
|
|
7700
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7701
|
+
repointed: boolean(),
|
|
7702
|
+
cancelRequested: boolean(),
|
|
7703
|
+
startedAt: number(),
|
|
7704
|
+
updatedAt: number(),
|
|
7705
|
+
finishedAt: number().nullable(),
|
|
7706
|
+
error: string().nullable()
|
|
7707
|
+
});
|
|
7708
|
+
var StorageMigrationPlanSchema = object({
|
|
7709
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7710
|
+
moves: array(object({
|
|
7711
|
+
storageClass: StorageMigrationClassSchema,
|
|
7712
|
+
fromLocationId: string(),
|
|
7713
|
+
toLocationId: string()
|
|
7714
|
+
}))
|
|
7595
7715
|
});
|
|
7596
7716
|
/**
|
|
7597
7717
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7643,6 +7763,21 @@ var StorageLocationSchema = object({
|
|
|
7643
7763
|
nodeId: string().optional(),
|
|
7644
7764
|
isDefault: boolean().default(false),
|
|
7645
7765
|
isSystem: boolean().default(false),
|
|
7766
|
+
/**
|
|
7767
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7768
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7769
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7770
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7771
|
+
* extended to add the next consumer.
|
|
7772
|
+
*
|
|
7773
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7774
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7775
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7776
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7777
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7778
|
+
* always stamped `true`.
|
|
7779
|
+
*/
|
|
7780
|
+
enabled: boolean().optional(),
|
|
7646
7781
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7647
7782
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7648
7783
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12382,7 +12517,8 @@ method(object({
|
|
|
12382
12517
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12383
12518
|
/**
|
|
12384
12519
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12385
|
-
* filesystem
|
|
12520
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12521
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12386
12522
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12387
12523
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12388
12524
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14223,6 +14359,13 @@ var MaskGridDimsSchema = object({
|
|
|
14223
14359
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14224
14360
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14225
14361
|
* one trigger.
|
|
14362
|
+
*
|
|
14363
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14364
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14365
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14366
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14367
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14368
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14226
14369
|
*/
|
|
14227
14370
|
var NcDeliverySchema = _enum([
|
|
14228
14371
|
"immediate",
|
|
@@ -14237,15 +14380,32 @@ var NcDeliverySchema = _enum([
|
|
|
14237
14380
|
* depend on a provider's raw event name or payload shape.
|
|
14238
14381
|
*/
|
|
14239
14382
|
var NcSystemEventKindSchema = _enum([
|
|
14240
|
-
"
|
|
14241
|
-
"
|
|
14383
|
+
"device-online",
|
|
14384
|
+
"device-offline",
|
|
14385
|
+
"device-disabled",
|
|
14386
|
+
"device-enabled",
|
|
14242
14387
|
"stream-online",
|
|
14243
14388
|
"stream-offline",
|
|
14244
14389
|
"node-online",
|
|
14245
14390
|
"node-offline",
|
|
14246
14391
|
"addon-update-available",
|
|
14247
|
-
"server-update-available"
|
|
14392
|
+
"server-update-available",
|
|
14393
|
+
"alarm-triggered",
|
|
14394
|
+
"alarm-armed",
|
|
14395
|
+
"alarm-disarmed",
|
|
14396
|
+
"camera-online",
|
|
14397
|
+
"camera-offline",
|
|
14398
|
+
"camera-disabled",
|
|
14399
|
+
"camera-enabled"
|
|
14400
|
+
]);
|
|
14401
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14402
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14403
|
+
"camera-online",
|
|
14404
|
+
"camera-offline",
|
|
14405
|
+
"camera-disabled",
|
|
14406
|
+
"camera-enabled"
|
|
14248
14407
|
]);
|
|
14408
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14249
14409
|
/**
|
|
14250
14410
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14251
14411
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14254,6 +14414,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14254
14414
|
var NcSystemEventConditionSchema = object({
|
|
14255
14415
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14256
14416
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14417
|
+
/**
|
|
14418
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14419
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14420
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14421
|
+
*
|
|
14422
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14423
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14424
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14425
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14426
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14427
|
+
*/
|
|
14428
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14257
14429
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14258
14430
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14259
14431
|
});
|
|
@@ -14304,6 +14476,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14304
14476
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14305
14477
|
});
|
|
14306
14478
|
/**
|
|
14479
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14480
|
+
*
|
|
14481
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14482
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14483
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14484
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14485
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14486
|
+
*
|
|
14487
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14488
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14489
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14490
|
+
*
|
|
14491
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14492
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14493
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14494
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14495
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14496
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14497
|
+
* ZodEffects the cap path would have to special-case).
|
|
14498
|
+
*
|
|
14499
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14500
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14501
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14502
|
+
* `samplingSeconds` decorative.
|
|
14503
|
+
*
|
|
14504
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14505
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14506
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14507
|
+
* an operator who typed `dog` mean the same thing.
|
|
14508
|
+
*/
|
|
14509
|
+
var NcAudioConditionSchema = object({
|
|
14510
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14511
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14512
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14513
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14514
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14515
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14516
|
+
/** Length of the sampling window in seconds. */
|
|
14517
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14518
|
+
});
|
|
14519
|
+
/**
|
|
14307
14520
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14308
14521
|
*
|
|
14309
14522
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14576,7 +14789,33 @@ var NcConditionsSchema = object({
|
|
|
14576
14789
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14577
14790
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14578
14791
|
*/
|
|
14579
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14792
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14793
|
+
/**
|
|
14794
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14795
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14796
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14797
|
+
* a window that is not full yet, neither filter given). See
|
|
14798
|
+
* {@link NcAudioCondition}.
|
|
14799
|
+
*
|
|
14800
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14801
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14802
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14803
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14804
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14805
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14806
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14807
|
+
*
|
|
14808
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14809
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14810
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14811
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14812
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14813
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14814
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14815
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14816
|
+
* does an audio rule become authorable.
|
|
14817
|
+
*/
|
|
14818
|
+
audio: NcAudioConditionSchema.optional()
|
|
14580
14819
|
});
|
|
14581
14820
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14582
14821
|
var NcRuleTargetSchema = object({
|
|
@@ -14690,6 +14929,73 @@ var NcThrottleSchema = object({
|
|
|
14690
14929
|
*/
|
|
14691
14930
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14692
14931
|
});
|
|
14932
|
+
/**
|
|
14933
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14934
|
+
* it judges may be.
|
|
14935
|
+
*
|
|
14936
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14937
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14938
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14939
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14940
|
+
* tokens for pixels the model pools away.
|
|
14941
|
+
*/
|
|
14942
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14943
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14944
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14945
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14946
|
+
var NcConfirmExpectSchema = object({
|
|
14947
|
+
op: _enum([
|
|
14948
|
+
">=",
|
|
14949
|
+
">",
|
|
14950
|
+
"<=",
|
|
14951
|
+
"<",
|
|
14952
|
+
"=="
|
|
14953
|
+
]),
|
|
14954
|
+
count: number().int().min(0).max(1e3)
|
|
14955
|
+
});
|
|
14956
|
+
/**
|
|
14957
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14958
|
+
* to ship and says whether it agrees with the rule.
|
|
14959
|
+
*
|
|
14960
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14961
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14962
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14963
|
+
*
|
|
14964
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14965
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14966
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14967
|
+
* open looks in the log exactly like a gate that works.
|
|
14968
|
+
*
|
|
14969
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14970
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14971
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14972
|
+
* above rather than trusting a parse it may never have seen.
|
|
14973
|
+
*/
|
|
14974
|
+
var NcConfirmSchema = object({
|
|
14975
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14976
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14977
|
+
enabled: boolean().default(false),
|
|
14978
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14979
|
+
profileId: string().optional(),
|
|
14980
|
+
/**
|
|
14981
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14982
|
+
* from the rule (its class and its expectation).
|
|
14983
|
+
*
|
|
14984
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14985
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14986
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14987
|
+
* turn and only rule-authored words land here.
|
|
14988
|
+
*/
|
|
14989
|
+
prompt: string().max(1e3).optional(),
|
|
14990
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14991
|
+
* own boolean verdict decides. */
|
|
14992
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14993
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14994
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14995
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14996
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14997
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14998
|
+
});
|
|
14693
14999
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14694
15000
|
var NcRuleInputSchema = object({
|
|
14695
15001
|
name: string().min(1).max(200),
|
|
@@ -14750,7 +15056,13 @@ var NcRuleInputSchema = object({
|
|
|
14750
15056
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14751
15057
|
* shape as every other actuation.
|
|
14752
15058
|
*/
|
|
14753
|
-
actions: NcRuleActionsSchema.optional()
|
|
15059
|
+
actions: NcRuleActionsSchema.optional(),
|
|
15060
|
+
/**
|
|
15061
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
15062
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
15063
|
+
* did, and absent is the only way to say that without a migration.
|
|
15064
|
+
*/
|
|
15065
|
+
confirm: NcConfirmSchema.optional()
|
|
14754
15066
|
});
|
|
14755
15067
|
/**
|
|
14756
15068
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14761,7 +15073,37 @@ var NcRuleInputSchema = object({
|
|
|
14761
15073
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14762
15074
|
* `updateRule` patch.
|
|
14763
15075
|
*/
|
|
14764
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15076
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15077
|
+
disabledTargetIds: array(string()).optional(),
|
|
15078
|
+
/**
|
|
15079
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
15080
|
+
*
|
|
15081
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
15082
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
15083
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
15084
|
+
* one — which made every partial edit destructive:
|
|
15085
|
+
*
|
|
15086
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
15087
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
15088
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
15089
|
+
*
|
|
15090
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
15091
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
15092
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
15093
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
15094
|
+
* within a minute of a two-field patch.
|
|
15095
|
+
*
|
|
15096
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
15097
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
15098
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
15099
|
+
* absent key is now genuinely absent.
|
|
15100
|
+
*/
|
|
15101
|
+
enabled: boolean().optional(),
|
|
15102
|
+
conditions: NcConditionsSchema.optional(),
|
|
15103
|
+
media: NcMediaPolicySchema.optional(),
|
|
15104
|
+
throttle: NcThrottleSchema.optional(),
|
|
15105
|
+
priority: number().int().min(1).max(5).optional()
|
|
15106
|
+
});
|
|
14765
15107
|
/** A persisted rule. */
|
|
14766
15108
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14767
15109
|
id: string(),
|
|
@@ -15062,6 +15404,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
15062
15404
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
15063
15405
|
* copy would lie the first time a rule is disabled.
|
|
15064
15406
|
*/
|
|
15407
|
+
/**
|
|
15408
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15409
|
+
*
|
|
15410
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15411
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15412
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15413
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15414
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15415
|
+
* with the switches the operator actually used.
|
|
15416
|
+
*/
|
|
15417
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15418
|
+
"muted",
|
|
15419
|
+
"detection-off",
|
|
15420
|
+
"offline"
|
|
15421
|
+
]);
|
|
15422
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15423
|
+
deviceId: number().int(),
|
|
15424
|
+
reason: NcAlarmSkipReasonSchema
|
|
15425
|
+
});
|
|
15065
15426
|
var NcAlarmModeCoverageSchema = object({
|
|
15066
15427
|
mode: AlarmArmModeSchema,
|
|
15067
15428
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -15069,7 +15430,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
15069
15430
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
15070
15431
|
allDevices: boolean(),
|
|
15071
15432
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
15072
|
-
deviceIds: array(number().int())
|
|
15433
|
+
deviceIds: array(number().int()),
|
|
15434
|
+
/**
|
|
15435
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15436
|
+
* excludes it.
|
|
15437
|
+
*
|
|
15438
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15439
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15440
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15441
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15442
|
+
* alarm tab.
|
|
15443
|
+
*/
|
|
15444
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
15073
15445
|
});
|
|
15074
15446
|
var NcAlarmConfigSchema = object({
|
|
15075
15447
|
/**
|
|
@@ -16432,13 +16804,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16432
16804
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16433
16805
|
kind: "mutation",
|
|
16434
16806
|
auth: "admin"
|
|
16435
|
-
}), method(
|
|
16807
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16436
16808
|
kind: "mutation",
|
|
16437
16809
|
auth: "admin"
|
|
16438
|
-
}), method(object({
|
|
16439
|
-
kind: "
|
|
16810
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16811
|
+
kind: "mutation",
|
|
16440
16812
|
auth: "admin"
|
|
16441
|
-
}), method(
|
|
16813
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16814
|
+
kind: "mutation",
|
|
16815
|
+
auth: "admin"
|
|
16816
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16817
|
+
kind: "mutation",
|
|
16818
|
+
auth: "admin"
|
|
16819
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16442
16820
|
kind: "mutation",
|
|
16443
16821
|
auth: "admin"
|
|
16444
16822
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17895,9 +18273,16 @@ var CameraStatusSchema = object({
|
|
|
17895
18273
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17896
18274
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17897
18275
|
/**
|
|
17898
|
-
* Per-camera
|
|
18276
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17899
18277
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17900
18278
|
*
|
|
18279
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18280
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18281
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18282
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18283
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18284
|
+
* the difference between a camera being off and a camera being dead.
|
|
18285
|
+
*
|
|
17901
18286
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17902
18287
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17903
18288
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17968,7 +18353,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17968
18353
|
reachable: boolean(),
|
|
17969
18354
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17970
18355
|
});
|
|
17971
|
-
method(object({
|
|
18356
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18357
|
+
kind: "mutation",
|
|
18358
|
+
auth: "admin"
|
|
18359
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18360
|
+
kind: "mutation",
|
|
18361
|
+
auth: "admin"
|
|
18362
|
+
}), method(object({
|
|
17972
18363
|
deviceId: number(),
|
|
17973
18364
|
agentNodeId: string()
|
|
17974
18365
|
}), object({ success: literal(true) }), {
|
|
@@ -18498,24 +18889,28 @@ var snapshotCapability = {
|
|
|
18498
18889
|
*
|
|
18499
18890
|
* `getSnapshotOverview` is cache-only by contract: it answers from whatever
|
|
18500
18891
|
* the wrapper happens to hold and never captures. Under D93 the client
|
|
18501
|
-
* versions its image URL on that answer, and an image REQUEST
|
|
18502
|
-
*
|
|
18503
|
-
*
|
|
18504
|
-
*
|
|
18505
|
-
*
|
|
18506
|
-
*
|
|
18507
|
-
*
|
|
18508
|
-
*
|
|
18892
|
+
* versions its image URL on that answer, and an image REQUEST was the only
|
|
18893
|
+
* demand signal. Both of those are satisfiable by the client's own image
|
|
18894
|
+
* cache — `expo-image` is URL-keyed and never revalidates — so a URL painted
|
|
18895
|
+
* in a previous session comes off disk with no network, no demand, and no
|
|
18896
|
+
* capture. Measured on the live hub: reopening after two minutes idle
|
|
18897
|
+
* painted 15 of 16 tiles at **168 s old** with zero HTTP requests, and the
|
|
18898
|
+
* fleet only recovered because a later poll happened to observe a different
|
|
18899
|
+
* identity.
|
|
18509
18900
|
*
|
|
18510
18901
|
* ## The two properties that fix it
|
|
18511
18902
|
*
|
|
18512
18903
|
* **It is an RPC, so no client cache can answer it.** The demand signal
|
|
18513
|
-
* always reaches the wrapper. This method therefore
|
|
18514
|
-
*
|
|
18515
|
-
*
|
|
18516
|
-
*
|
|
18517
|
-
*
|
|
18518
|
-
*
|
|
18904
|
+
* always reaches the wrapper. This method therefore CAPTURES, where
|
|
18905
|
+
* `getSnapshotOverview` must never (D93) — the distinction is not "one is
|
|
18906
|
+
* newer" but that the overview poll is app-wide (a capturing overview would
|
|
18907
|
+
* dial every camera on the install) while this is called by a rendered
|
|
18908
|
+
* surface naming the tiles it is actually painting, at the width it is
|
|
18909
|
+
* painting them.
|
|
18910
|
+
*
|
|
18911
|
+
* Since 2026-08-11 this is the ONLY thing that refreshes a snapshot: the
|
|
18912
|
+
* server-side keep-warm loop was removed (operator directive — on-demand,
|
|
18913
|
+
* always), so a camera nobody is looking at costs nothing at all.
|
|
18519
18914
|
*
|
|
18520
18915
|
* **It waits, briefly and boundedly, for the capture it triggered.** The
|
|
18521
18916
|
* returned `capturedAt` is the frame the link will serve, not the frame the
|
|
@@ -18733,6 +19128,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18733
19128
|
locationId: string(),
|
|
18734
19129
|
targetBytes: number().int().positive()
|
|
18735
19130
|
}), EvictResultSchema, { kind: "mutation" });
|
|
19131
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
19132
|
+
kind: "mutation",
|
|
19133
|
+
auth: "admin"
|
|
19134
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
19135
|
+
kind: "mutation",
|
|
19136
|
+
auth: "admin"
|
|
19137
|
+
});
|
|
18736
19138
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18737
19139
|
providerId: string().min(1),
|
|
18738
19140
|
displayName: string().min(1),
|
|
@@ -18836,6 +19238,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18836
19238
|
label: string(),
|
|
18837
19239
|
description: string().optional()
|
|
18838
19240
|
});
|
|
19241
|
+
/**
|
|
19242
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19243
|
+
* an instance declares a camera.
|
|
19244
|
+
*/
|
|
19245
|
+
var TerminalInstanceInfoSchema = object({
|
|
19246
|
+
instanceId: string(),
|
|
19247
|
+
cameraStableId: string(),
|
|
19248
|
+
nodeId: string(),
|
|
19249
|
+
profileId: string(),
|
|
19250
|
+
profileLabel: string(),
|
|
19251
|
+
name: string(),
|
|
19252
|
+
enabled: boolean()
|
|
19253
|
+
});
|
|
19254
|
+
var TerminalLegacyCameraSchema = object({
|
|
19255
|
+
stableId: string(),
|
|
19256
|
+
nodeId: string(),
|
|
19257
|
+
profileId: string(),
|
|
19258
|
+
profileLabel: string(),
|
|
19259
|
+
name: string(),
|
|
19260
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19261
|
+
adoptable: boolean()
|
|
19262
|
+
});
|
|
18839
19263
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18840
19264
|
seq: number().int().positive(),
|
|
18841
19265
|
kind: literal("data"),
|
|
@@ -18852,7 +19276,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18852
19276
|
snapshot: string().optional(),
|
|
18853
19277
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18854
19278
|
});
|
|
18855
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19279
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19280
|
+
targetNodeId: string().min(1),
|
|
19281
|
+
profileId: string().min(1),
|
|
19282
|
+
name: string().trim().min(1).max(160).optional()
|
|
19283
|
+
}), TerminalInstanceInfoSchema, {
|
|
19284
|
+
kind: "mutation",
|
|
19285
|
+
auth: "admin"
|
|
19286
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19287
|
+
kind: "mutation",
|
|
19288
|
+
auth: "admin"
|
|
19289
|
+
}), method(object({
|
|
19290
|
+
instanceId: string().min(1),
|
|
19291
|
+
enabled: boolean()
|
|
19292
|
+
}), TerminalInstanceInfoSchema, {
|
|
19293
|
+
kind: "mutation",
|
|
19294
|
+
auth: "admin"
|
|
19295
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19296
|
+
stableId: string().min(1),
|
|
19297
|
+
name: string().trim().min(1).max(160).optional()
|
|
19298
|
+
}), TerminalInstanceInfoSchema, {
|
|
19299
|
+
kind: "mutation",
|
|
19300
|
+
auth: "admin"
|
|
19301
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18856
19302
|
profileId: string(),
|
|
18857
19303
|
cols: number().int().positive(),
|
|
18858
19304
|
rows: number().int().positive()
|
|
@@ -18869,7 +19315,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18869
19315
|
}), method(object({
|
|
18870
19316
|
sessionId: string(),
|
|
18871
19317
|
afterSeq: number().int().nonnegative(),
|
|
18872
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19318
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19319
|
+
/**
|
|
19320
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19321
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19322
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19323
|
+
*/
|
|
19324
|
+
waitForOutput: boolean().optional()
|
|
18873
19325
|
}), TerminalOutputBatchSchema, {
|
|
18874
19326
|
kind: "mutation",
|
|
18875
19327
|
auth: "admin",
|
|
@@ -21367,6 +21819,7 @@ var FaceInfoSchema = object({
|
|
|
21367
21819
|
var FaceFilterEnum = _enum([
|
|
21368
21820
|
"unassigned",
|
|
21369
21821
|
"recognized",
|
|
21822
|
+
"identified",
|
|
21370
21823
|
"all"
|
|
21371
21824
|
]);
|
|
21372
21825
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21395,6 +21848,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21395
21848
|
kind: "mutation",
|
|
21396
21849
|
auth: "admin"
|
|
21397
21850
|
}), method(object({
|
|
21851
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21852
|
+
deviceId: number().int().optional(),
|
|
21398
21853
|
limit: number().int().positive().optional(),
|
|
21399
21854
|
filter: FaceFilterEnum.optional(),
|
|
21400
21855
|
/**
|
|
@@ -23721,6 +24176,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23721
24176
|
capName: string().min(1).max(64),
|
|
23722
24177
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23723
24178
|
valuePath: string().min(1).max(64)
|
|
24179
|
+
}),
|
|
24180
|
+
object({
|
|
24181
|
+
kind: literal("latest-recognition"),
|
|
24182
|
+
recognition: _enum(["person", "plate"])
|
|
23724
24183
|
})
|
|
23725
24184
|
]);
|
|
23726
24185
|
var OsdSlotBindingSchema = object({
|
|
@@ -23826,6 +24285,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23826
24285
|
}), object({ success: literal(true) }), {
|
|
23827
24286
|
kind: "mutation",
|
|
23828
24287
|
auth: "admin"
|
|
24288
|
+
}), method(object({
|
|
24289
|
+
sourceDeviceId: number().int(),
|
|
24290
|
+
targetDeviceId: number().int()
|
|
24291
|
+
}), object({
|
|
24292
|
+
copied: number().int().nonnegative(),
|
|
24293
|
+
skipped: number().int().nonnegative()
|
|
24294
|
+
}), {
|
|
24295
|
+
kind: "mutation",
|
|
24296
|
+
auth: "admin"
|
|
23829
24297
|
}), method(object({
|
|
23830
24298
|
deviceId: number().int(),
|
|
23831
24299
|
slotId: string().min(1),
|
|
@@ -24835,7 +25303,19 @@ var RecordingManifestSchema = object({
|
|
|
24835
25303
|
* profiles/subtrees/locations on this node). */
|
|
24836
25304
|
var RecordingDeviceUsageSchema = object({
|
|
24837
25305
|
deviceId: number(),
|
|
24838
|
-
usedBytes: number()
|
|
25306
|
+
usedBytes: number(),
|
|
25307
|
+
/**
|
|
25308
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25309
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25310
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25311
|
+
*
|
|
25312
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25313
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25314
|
+
* field must keep validating that older provider's payload: the framework
|
|
25315
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25316
|
+
* the later of the two.
|
|
25317
|
+
*/
|
|
25318
|
+
oldestMs: number().nullable().optional()
|
|
24839
25319
|
});
|
|
24840
25320
|
/** Recording storage usage + capacity for one storage location. */
|
|
24841
25321
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24863,6 +25343,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24863
25343
|
locations: array(RecordingLocationUsageSchema)
|
|
24864
25344
|
});
|
|
24865
25345
|
/**
|
|
25346
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25347
|
+
*
|
|
25348
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25349
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25350
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25351
|
+
* location, run FIFO behind the single-flight mover.
|
|
25352
|
+
*
|
|
25353
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25354
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25355
|
+
* (empty on the plan).
|
|
25356
|
+
*/
|
|
25357
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25358
|
+
deviceId: number(),
|
|
25359
|
+
profile: string(),
|
|
25360
|
+
fromLocationId: string(),
|
|
25361
|
+
toLocationId: string(),
|
|
25362
|
+
bytes: number(),
|
|
25363
|
+
files: number().int()
|
|
25364
|
+
});
|
|
25365
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25366
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25367
|
+
* that had nothing to do. */
|
|
25368
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25369
|
+
"unassigned",
|
|
25370
|
+
"target-not-writable",
|
|
25371
|
+
"below-threshold",
|
|
25372
|
+
"no-headroom"
|
|
25373
|
+
]);
|
|
25374
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25375
|
+
deviceId: number(),
|
|
25376
|
+
profile: string(),
|
|
25377
|
+
fromLocationId: string(),
|
|
25378
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25379
|
+
toLocationId: string().nullable(),
|
|
25380
|
+
bytes: number(),
|
|
25381
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25382
|
+
});
|
|
25383
|
+
var RecordingRebalancePlanSchema = object({
|
|
25384
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25385
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25386
|
+
bytesToMove: number(),
|
|
25387
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25388
|
+
jobIds: array(string())
|
|
25389
|
+
});
|
|
25390
|
+
var RecordingRebalanceInputSchema = object({
|
|
25391
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25392
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25393
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25394
|
+
minMoveGb: number().min(0).optional()
|
|
25395
|
+
});
|
|
25396
|
+
/**
|
|
24866
25397
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24867
25398
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24868
25399
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -25010,6 +25541,21 @@ method(object({
|
|
|
25010
25541
|
}), {
|
|
25011
25542
|
kind: "mutation",
|
|
25012
25543
|
auth: "admin"
|
|
25544
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25545
|
+
kind: "mutation",
|
|
25546
|
+
auth: "admin"
|
|
25547
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25548
|
+
kind: "mutation",
|
|
25549
|
+
auth: "admin"
|
|
25550
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25551
|
+
kind: "mutation",
|
|
25552
|
+
auth: "admin"
|
|
25553
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25554
|
+
kind: "mutation",
|
|
25555
|
+
auth: "admin"
|
|
25556
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25557
|
+
kind: "mutation",
|
|
25558
|
+
auth: "admin"
|
|
25013
25559
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
25014
25560
|
kind: "mutation",
|
|
25015
25561
|
auth: "admin"
|
|
@@ -25019,9 +25565,15 @@ method(object({
|
|
|
25019
25565
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25020
25566
|
kind: "mutation",
|
|
25021
25567
|
auth: "admin"
|
|
25568
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25569
|
+
kind: "query",
|
|
25570
|
+
auth: "admin"
|
|
25571
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25572
|
+
kind: "mutation",
|
|
25573
|
+
auth: "admin"
|
|
25022
25574
|
});
|
|
25023
25575
|
/**
|
|
25024
|
-
* `
|
|
25576
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
25025
25577
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
25026
25578
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
25027
25579
|
* delete-after-download.
|
|
@@ -25036,10 +25588,42 @@ method(object({
|
|
|
25036
25588
|
*/
|
|
25037
25589
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25038
25590
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25591
|
+
/**
|
|
25592
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25593
|
+
*
|
|
25594
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25595
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25596
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25597
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25598
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25599
|
+
*/
|
|
25600
|
+
var ExportDenseRangeSchema = object({
|
|
25601
|
+
fromSec: number().nonnegative(),
|
|
25602
|
+
toSec: number().nonnegative()
|
|
25603
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25604
|
+
/**
|
|
25605
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25606
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25607
|
+
*
|
|
25608
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25609
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25610
|
+
*/
|
|
25611
|
+
var ExportDenseSchema = object({
|
|
25612
|
+
everyMs: number().int().positive(),
|
|
25613
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25614
|
+
});
|
|
25039
25615
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
25040
25616
|
var ExportTimelapseSchema = object({
|
|
25041
25617
|
everyMs: number().int().positive(),
|
|
25042
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25618
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25619
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25620
|
+
dense: ExportDenseSchema.optional()
|
|
25621
|
+
}).superRefine((v, ctx) => {
|
|
25622
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25623
|
+
code: ZodIssueCode.custom,
|
|
25624
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25625
|
+
path: ["dense", "everyMs"]
|
|
25626
|
+
});
|
|
25043
25627
|
});
|
|
25044
25628
|
/**
|
|
25045
25629
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -25097,6 +25681,19 @@ var ExportDownloadSchema = object({
|
|
|
25097
25681
|
url: string(),
|
|
25098
25682
|
endpoints: array(string())
|
|
25099
25683
|
});
|
|
25684
|
+
/**
|
|
25685
|
+
* A finished export's bytes, inline.
|
|
25686
|
+
*
|
|
25687
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25688
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25689
|
+
*/
|
|
25690
|
+
var ExportBytesSchema = object({
|
|
25691
|
+
base64: string(),
|
|
25692
|
+
contentType: string(),
|
|
25693
|
+
/** Suggested filename, extension included. */
|
|
25694
|
+
name: string(),
|
|
25695
|
+
bytes: number().int().nonnegative()
|
|
25696
|
+
});
|
|
25100
25697
|
method(object({
|
|
25101
25698
|
deviceId: number(),
|
|
25102
25699
|
profile: string(),
|
|
@@ -25121,6 +25718,9 @@ method(object({
|
|
|
25121
25718
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
25122
25719
|
kind: "query",
|
|
25123
25720
|
auth: "protected"
|
|
25721
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25722
|
+
kind: "query",
|
|
25723
|
+
auth: "protected"
|
|
25124
25724
|
});
|
|
25125
25725
|
/**
|
|
25126
25726
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30979,6 +31579,12 @@ Object.freeze({
|
|
|
30979
31579
|
addonId: null,
|
|
30980
31580
|
access: "delete"
|
|
30981
31581
|
},
|
|
31582
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31583
|
+
capName: "osd-manager",
|
|
31584
|
+
capScope: "system",
|
|
31585
|
+
addonId: null,
|
|
31586
|
+
access: "create"
|
|
31587
|
+
},
|
|
30982
31588
|
"osdManager.getConditionSupport": {
|
|
30983
31589
|
capName: "osd-manager",
|
|
30984
31590
|
capScope: "system",
|
|
@@ -31075,7 +31681,7 @@ Object.freeze({
|
|
|
31075
31681
|
addonId: null,
|
|
31076
31682
|
access: "create"
|
|
31077
31683
|
},
|
|
31078
|
-
"pipelineAnalytics.
|
|
31684
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
31079
31685
|
capName: "pipeline-analytics",
|
|
31080
31686
|
capScope: "device",
|
|
31081
31687
|
addonId: null,
|
|
@@ -31147,12 +31753,6 @@ Object.freeze({
|
|
|
31147
31753
|
addonId: null,
|
|
31148
31754
|
access: "view"
|
|
31149
31755
|
},
|
|
31150
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
31151
|
-
capName: "pipeline-analytics",
|
|
31152
|
-
capScope: "device",
|
|
31153
|
-
addonId: null,
|
|
31154
|
-
access: "view"
|
|
31155
|
-
},
|
|
31156
31756
|
"pipelineAnalytics.getMotionEvents": {
|
|
31157
31757
|
capName: "pipeline-analytics",
|
|
31158
31758
|
capScope: "device",
|
|
@@ -31189,6 +31789,12 @@ Object.freeze({
|
|
|
31189
31789
|
addonId: null,
|
|
31190
31790
|
access: "view"
|
|
31191
31791
|
},
|
|
31792
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31793
|
+
capName: "pipeline-analytics",
|
|
31794
|
+
capScope: "device",
|
|
31795
|
+
addonId: null,
|
|
31796
|
+
access: "view"
|
|
31797
|
+
},
|
|
31192
31798
|
"pipelineAnalytics.getTrack": {
|
|
31193
31799
|
capName: "pipeline-analytics",
|
|
31194
31800
|
capScope: "device",
|
|
@@ -31267,6 +31873,12 @@ Object.freeze({
|
|
|
31267
31873
|
addonId: null,
|
|
31268
31874
|
access: "view"
|
|
31269
31875
|
},
|
|
31876
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31877
|
+
capName: "pipeline-analytics",
|
|
31878
|
+
capScope: "device",
|
|
31879
|
+
addonId: null,
|
|
31880
|
+
access: "create"
|
|
31881
|
+
},
|
|
31270
31882
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
31271
31883
|
capName: "pipeline-analytics",
|
|
31272
31884
|
capScope: "device",
|
|
@@ -31297,7 +31909,7 @@ Object.freeze({
|
|
|
31297
31909
|
addonId: null,
|
|
31298
31910
|
access: "create"
|
|
31299
31911
|
},
|
|
31300
|
-
"pipelineAnalytics.
|
|
31912
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
31301
31913
|
capName: "pipeline-analytics",
|
|
31302
31914
|
capScope: "device",
|
|
31303
31915
|
addonId: null,
|
|
@@ -31309,6 +31921,12 @@ Object.freeze({
|
|
|
31309
31921
|
addonId: null,
|
|
31310
31922
|
access: "create"
|
|
31311
31923
|
},
|
|
31924
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31925
|
+
capName: "pipeline-analytics",
|
|
31926
|
+
capScope: "device",
|
|
31927
|
+
addonId: null,
|
|
31928
|
+
access: "create"
|
|
31929
|
+
},
|
|
31312
31930
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
31313
31931
|
capName: "pipeline-analytics",
|
|
31314
31932
|
capScope: "device",
|
|
@@ -31333,6 +31951,12 @@ Object.freeze({
|
|
|
31333
31951
|
addonId: null,
|
|
31334
31952
|
access: "create"
|
|
31335
31953
|
},
|
|
31954
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31955
|
+
capName: "pipeline-analytics",
|
|
31956
|
+
capScope: "device",
|
|
31957
|
+
addonId: null,
|
|
31958
|
+
access: "create"
|
|
31959
|
+
},
|
|
31336
31960
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
31337
31961
|
capName: "pipeline-analytics",
|
|
31338
31962
|
capScope: "device",
|
|
@@ -31699,6 +32323,12 @@ Object.freeze({
|
|
|
31699
32323
|
addonId: null,
|
|
31700
32324
|
access: "view"
|
|
31701
32325
|
},
|
|
32326
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
32327
|
+
capName: "pipeline-orchestrator",
|
|
32328
|
+
capScope: "system",
|
|
32329
|
+
addonId: null,
|
|
32330
|
+
access: "create"
|
|
32331
|
+
},
|
|
31702
32332
|
"pipelineOrchestrator.rebalance": {
|
|
31703
32333
|
capName: "pipeline-orchestrator",
|
|
31704
32334
|
capScope: "system",
|
|
@@ -31723,6 +32353,12 @@ Object.freeze({
|
|
|
31723
32353
|
addonId: null,
|
|
31724
32354
|
access: "view"
|
|
31725
32355
|
},
|
|
32356
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
32357
|
+
capName: "pipeline-orchestrator",
|
|
32358
|
+
capScope: "system",
|
|
32359
|
+
addonId: null,
|
|
32360
|
+
access: "create"
|
|
32361
|
+
},
|
|
31726
32362
|
"pipelineOrchestrator.saveTemplate": {
|
|
31727
32363
|
capName: "pipeline-orchestrator",
|
|
31728
32364
|
capScope: "system",
|
|
@@ -32119,7 +32755,13 @@ Object.freeze({
|
|
|
32119
32755
|
addonId: null,
|
|
32120
32756
|
access: "create"
|
|
32121
32757
|
},
|
|
32122
|
-
"recording.
|
|
32758
|
+
"recording.cancelRelocateJob": {
|
|
32759
|
+
capName: "recording",
|
|
32760
|
+
capScope: "system",
|
|
32761
|
+
addonId: null,
|
|
32762
|
+
access: "create"
|
|
32763
|
+
},
|
|
32764
|
+
"recording.cancelStorageMigrationMove": {
|
|
32123
32765
|
capName: "recording",
|
|
32124
32766
|
capScope: "system",
|
|
32125
32767
|
addonId: null,
|
|
@@ -32155,7 +32797,7 @@ Object.freeze({
|
|
|
32155
32797
|
addonId: null,
|
|
32156
32798
|
access: "view"
|
|
32157
32799
|
},
|
|
32158
|
-
"recording.
|
|
32800
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
32159
32801
|
capName: "recording",
|
|
32160
32802
|
capScope: "system",
|
|
32161
32803
|
addonId: null,
|
|
@@ -32173,12 +32815,30 @@ Object.freeze({
|
|
|
32173
32815
|
addonId: null,
|
|
32174
32816
|
access: "view"
|
|
32175
32817
|
},
|
|
32818
|
+
"recording.listRelocateJobs": {
|
|
32819
|
+
capName: "recording",
|
|
32820
|
+
capScope: "system",
|
|
32821
|
+
addonId: null,
|
|
32822
|
+
access: "view"
|
|
32823
|
+
},
|
|
32176
32824
|
"recording.locateSegment": {
|
|
32177
32825
|
capName: "recording",
|
|
32178
32826
|
capScope: "system",
|
|
32179
32827
|
addonId: null,
|
|
32180
32828
|
access: "view"
|
|
32181
32829
|
},
|
|
32830
|
+
"recording.pauseForStorageMigration": {
|
|
32831
|
+
capName: "recording",
|
|
32832
|
+
capScope: "system",
|
|
32833
|
+
addonId: null,
|
|
32834
|
+
access: "create"
|
|
32835
|
+
},
|
|
32836
|
+
"recording.planStorageRebalance": {
|
|
32837
|
+
capName: "recording",
|
|
32838
|
+
capScope: "system",
|
|
32839
|
+
addonId: null,
|
|
32840
|
+
access: "view"
|
|
32841
|
+
},
|
|
32182
32842
|
"recording.pruneFootage": {
|
|
32183
32843
|
capName: "recording",
|
|
32184
32844
|
capScope: "system",
|
|
@@ -32197,6 +32857,12 @@ Object.freeze({
|
|
|
32197
32857
|
addonId: null,
|
|
32198
32858
|
access: "view"
|
|
32199
32859
|
},
|
|
32860
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32861
|
+
capName: "recording",
|
|
32862
|
+
capScope: "system",
|
|
32863
|
+
addonId: null,
|
|
32864
|
+
access: "create"
|
|
32865
|
+
},
|
|
32200
32866
|
"recording.relocateFootage": {
|
|
32201
32867
|
capName: "recording",
|
|
32202
32868
|
capScope: "system",
|
|
@@ -32221,44 +32887,68 @@ Object.freeze({
|
|
|
32221
32887
|
addonId: null,
|
|
32222
32888
|
access: "create"
|
|
32223
32889
|
},
|
|
32890
|
+
"recording.resumeForStorageMigration": {
|
|
32891
|
+
capName: "recording",
|
|
32892
|
+
capScope: "system",
|
|
32893
|
+
addonId: null,
|
|
32894
|
+
access: "create"
|
|
32895
|
+
},
|
|
32224
32896
|
"recording.setDeviceConfig": {
|
|
32225
32897
|
capName: "recording",
|
|
32226
32898
|
capScope: "system",
|
|
32227
32899
|
addonId: null,
|
|
32228
32900
|
access: "create"
|
|
32229
32901
|
},
|
|
32902
|
+
"recording.startStorageMigrationMove": {
|
|
32903
|
+
capName: "recording",
|
|
32904
|
+
capScope: "system",
|
|
32905
|
+
addonId: null,
|
|
32906
|
+
access: "create"
|
|
32907
|
+
},
|
|
32908
|
+
"recording.startStorageRebalance": {
|
|
32909
|
+
capName: "recording",
|
|
32910
|
+
capScope: "system",
|
|
32911
|
+
addonId: null,
|
|
32912
|
+
access: "create"
|
|
32913
|
+
},
|
|
32230
32914
|
"recordingExport.cancelExport": {
|
|
32231
|
-
capName: "
|
|
32915
|
+
capName: "recording-export",
|
|
32232
32916
|
capScope: "system",
|
|
32233
32917
|
addonId: null,
|
|
32234
32918
|
access: "create"
|
|
32235
32919
|
},
|
|
32236
32920
|
"recordingExport.createExport": {
|
|
32237
|
-
capName: "
|
|
32921
|
+
capName: "recording-export",
|
|
32238
32922
|
capScope: "system",
|
|
32239
32923
|
addonId: null,
|
|
32240
32924
|
access: "create"
|
|
32241
32925
|
},
|
|
32242
32926
|
"recordingExport.deleteExport": {
|
|
32243
|
-
capName: "
|
|
32927
|
+
capName: "recording-export",
|
|
32244
32928
|
capScope: "system",
|
|
32245
32929
|
addonId: null,
|
|
32246
32930
|
access: "delete"
|
|
32247
32931
|
},
|
|
32248
32932
|
"recordingExport.getDownloadUrl": {
|
|
32249
|
-
capName: "
|
|
32933
|
+
capName: "recording-export",
|
|
32250
32934
|
capScope: "system",
|
|
32251
32935
|
addonId: null,
|
|
32252
32936
|
access: "view"
|
|
32253
32937
|
},
|
|
32254
32938
|
"recordingExport.getExport": {
|
|
32255
|
-
capName: "
|
|
32939
|
+
capName: "recording-export",
|
|
32256
32940
|
capScope: "system",
|
|
32257
32941
|
addonId: null,
|
|
32258
32942
|
access: "view"
|
|
32259
32943
|
},
|
|
32260
32944
|
"recordingExport.listExports": {
|
|
32261
|
-
capName: "
|
|
32945
|
+
capName: "recording-export",
|
|
32946
|
+
capScope: "system",
|
|
32947
|
+
addonId: null,
|
|
32948
|
+
access: "view"
|
|
32949
|
+
},
|
|
32950
|
+
"recordingExport.readExportBytes": {
|
|
32951
|
+
capName: "recording-export",
|
|
32262
32952
|
capScope: "system",
|
|
32263
32953
|
addonId: null,
|
|
32264
32954
|
access: "view"
|
|
@@ -32617,6 +33307,30 @@ Object.freeze({
|
|
|
32617
33307
|
addonId: null,
|
|
32618
33308
|
access: "view"
|
|
32619
33309
|
},
|
|
33310
|
+
"storageMigration.cancel": {
|
|
33311
|
+
capName: "storage-migration",
|
|
33312
|
+
capScope: "system",
|
|
33313
|
+
addonId: null,
|
|
33314
|
+
access: "create"
|
|
33315
|
+
},
|
|
33316
|
+
"storageMigration.plan": {
|
|
33317
|
+
capName: "storage-migration",
|
|
33318
|
+
capScope: "system",
|
|
33319
|
+
addonId: null,
|
|
33320
|
+
access: "view"
|
|
33321
|
+
},
|
|
33322
|
+
"storageMigration.start": {
|
|
33323
|
+
capName: "storage-migration",
|
|
33324
|
+
capScope: "system",
|
|
33325
|
+
addonId: null,
|
|
33326
|
+
access: "create"
|
|
33327
|
+
},
|
|
33328
|
+
"storageMigration.status": {
|
|
33329
|
+
capName: "storage-migration",
|
|
33330
|
+
capScope: "system",
|
|
33331
|
+
addonId: null,
|
|
33332
|
+
access: "view"
|
|
33333
|
+
},
|
|
32620
33334
|
"storageProvider.abortUpload": {
|
|
32621
33335
|
capName: "storage-provider",
|
|
32622
33336
|
capScope: "system",
|
|
@@ -32995,12 +33709,42 @@ Object.freeze({
|
|
|
32995
33709
|
addonId: null,
|
|
32996
33710
|
access: "create"
|
|
32997
33711
|
},
|
|
33712
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33713
|
+
capName: "terminal-session",
|
|
33714
|
+
capScope: "system",
|
|
33715
|
+
addonId: null,
|
|
33716
|
+
access: "create"
|
|
33717
|
+
},
|
|
32998
33718
|
"terminalSession.close": {
|
|
32999
33719
|
capName: "terminal-session",
|
|
33000
33720
|
capScope: "system",
|
|
33001
33721
|
addonId: null,
|
|
33002
33722
|
access: "create"
|
|
33003
33723
|
},
|
|
33724
|
+
"terminalSession.createInstance": {
|
|
33725
|
+
capName: "terminal-session",
|
|
33726
|
+
capScope: "system",
|
|
33727
|
+
addonId: null,
|
|
33728
|
+
access: "create"
|
|
33729
|
+
},
|
|
33730
|
+
"terminalSession.deleteInstance": {
|
|
33731
|
+
capName: "terminal-session",
|
|
33732
|
+
capScope: "system",
|
|
33733
|
+
addonId: null,
|
|
33734
|
+
access: "delete"
|
|
33735
|
+
},
|
|
33736
|
+
"terminalSession.listInstances": {
|
|
33737
|
+
capName: "terminal-session",
|
|
33738
|
+
capScope: "system",
|
|
33739
|
+
addonId: null,
|
|
33740
|
+
access: "view"
|
|
33741
|
+
},
|
|
33742
|
+
"terminalSession.listLegacyCameras": {
|
|
33743
|
+
capName: "terminal-session",
|
|
33744
|
+
capScope: "system",
|
|
33745
|
+
addonId: null,
|
|
33746
|
+
access: "view"
|
|
33747
|
+
},
|
|
33004
33748
|
"terminalSession.listProfiles": {
|
|
33005
33749
|
capName: "terminal-session",
|
|
33006
33750
|
capScope: "system",
|
|
@@ -33031,6 +33775,12 @@ Object.freeze({
|
|
|
33031
33775
|
addonId: null,
|
|
33032
33776
|
access: "create"
|
|
33033
33777
|
},
|
|
33778
|
+
"terminalSession.setInstanceEnabled": {
|
|
33779
|
+
capName: "terminal-session",
|
|
33780
|
+
capScope: "system",
|
|
33781
|
+
addonId: null,
|
|
33782
|
+
access: "create"
|
|
33783
|
+
},
|
|
33034
33784
|
"terminalSession.writeInput": {
|
|
33035
33785
|
capName: "terminal-session",
|
|
33036
33786
|
capScope: "system",
|
|
@@ -33575,6 +34325,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33575
34325
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33576
34326
|
var PriorityField = number().int().min(1).max(5);
|
|
33577
34327
|
/**
|
|
34328
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
34329
|
+
*
|
|
34330
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
34331
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
34332
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
34333
|
+
*
|
|
34334
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
34335
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
34336
|
+
*
|
|
34337
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
34338
|
+
*
|
|
34339
|
+
* 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.
|
|
34340
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
34341
|
+
* and therefore the length of a quiet night, does not move.
|
|
34342
|
+
*
|
|
34343
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
34344
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
34345
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
34346
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
34347
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
34348
|
+
*/
|
|
34349
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
34350
|
+
/**
|
|
34351
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
34352
|
+
*
|
|
34353
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
34354
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
34355
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
34356
|
+
* that range every ~583 ms.
|
|
34357
|
+
*
|
|
34358
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
34359
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
34360
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
34361
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
34362
|
+
* schema change and are the tracked follow-up.
|
|
34363
|
+
*
|
|
34364
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
34365
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
34366
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
34367
|
+
* happened.
|
|
34368
|
+
*/
|
|
34369
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
34370
|
+
/**
|
|
34371
|
+
* Caption burned into the notification's preview frame.
|
|
34372
|
+
*
|
|
34373
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
34374
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
34375
|
+
* templating dialect for one field would be a second thing to explain.
|
|
34376
|
+
*
|
|
34377
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
34378
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
34379
|
+
* the reason this is not `.min(1)`.
|
|
34380
|
+
*/
|
|
34381
|
+
var PreviewTextField = string().max(200);
|
|
34382
|
+
/**
|
|
34383
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
34384
|
+
*
|
|
34385
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
34386
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
34387
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
34388
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
34389
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
34390
|
+
* them.
|
|
34391
|
+
*
|
|
34392
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
34393
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
34394
|
+
* paying that on the deploy that shipped it.
|
|
34395
|
+
*
|
|
34396
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
34397
|
+
*/
|
|
34398
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
34399
|
+
/**
|
|
34400
|
+
* Which detection classes the notification reports counts for.
|
|
34401
|
+
*
|
|
34402
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
34403
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
34404
|
+
* class the window actually contained", which is what an operator who never
|
|
34405
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
34406
|
+
* counts cars all night).
|
|
34407
|
+
*
|
|
34408
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
34409
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
34410
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
34411
|
+
* not emit.
|
|
34412
|
+
*
|
|
34413
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
34414
|
+
* - `{{detections}}` — total over the reported classes
|
|
34415
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
34416
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
34417
|
+
* one per class, `count_` + the class name
|
|
34418
|
+
*
|
|
34419
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
34420
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
34421
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
34422
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
34423
|
+
*/
|
|
34424
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
34425
|
+
/**
|
|
33578
34426
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33579
34427
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33580
34428
|
* here (see the ownership note above).
|
|
@@ -33594,9 +34442,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33594
34442
|
cadenceSec: CadenceSecField.default(15),
|
|
33595
34443
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33596
34444
|
framerate: FramerateField.default(10),
|
|
34445
|
+
/**
|
|
34446
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
34447
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
34448
|
+
* field gets.
|
|
34449
|
+
*/
|
|
34450
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34451
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
34452
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33597
34453
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33598
34454
|
targets: TargetsField,
|
|
33599
34455
|
template: TimelapseTemplateSchema.optional(),
|
|
34456
|
+
/**
|
|
34457
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
34458
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
34459
|
+
*
|
|
34460
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
34461
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
34462
|
+
* silently clear the caption too.
|
|
34463
|
+
*/
|
|
34464
|
+
previewText: PreviewTextField.optional(),
|
|
34465
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
34466
|
+
previewMode: PreviewModeField.default("image"),
|
|
34467
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
34468
|
+
reportClasses: ReportClassesField.optional(),
|
|
33600
34469
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33601
34470
|
priority: PriorityField.default(3)
|
|
33602
34471
|
});
|
|
@@ -33607,8 +34476,13 @@ object({
|
|
|
33607
34476
|
schedule: NcScheduleSchema.optional(),
|
|
33608
34477
|
cadenceSec: CadenceSecField.optional(),
|
|
33609
34478
|
framerate: FramerateField.optional(),
|
|
34479
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34480
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33610
34481
|
targets: TargetsField.optional(),
|
|
33611
34482
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
34483
|
+
previewText: PreviewTextField.optional(),
|
|
34484
|
+
previewMode: PreviewModeField.optional(),
|
|
34485
|
+
reportClasses: ReportClassesField.optional(),
|
|
33612
34486
|
priority: PriorityField.optional()
|
|
33613
34487
|
});
|
|
33614
34488
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33620,10 +34494,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33620
34494
|
*/
|
|
33621
34495
|
ownerUserId: string().optional(),
|
|
33622
34496
|
/**
|
|
33623
|
-
* Epoch-ms of the
|
|
33624
|
-
*
|
|
34497
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
34498
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
34499
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33625
34500
|
*/
|
|
33626
34501
|
lastGeneratedAt: number().optional(),
|
|
34502
|
+
/**
|
|
34503
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
34504
|
+
* re-generation guard's real durable state.
|
|
34505
|
+
*
|
|
34506
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
34507
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
34508
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
34509
|
+
* already done — and B's night is gone for good, because the window will not
|
|
34510
|
+
* come back.
|
|
34511
|
+
*
|
|
34512
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
34513
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
34514
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
34515
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
34516
|
+
* once, on the deploy that shipped the map.
|
|
34517
|
+
*/
|
|
34518
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33627
34519
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33628
34520
|
createdBy: string(),
|
|
33629
34521
|
createdAt: number(),
|