@camstack/addon-import-alexa 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +936 -48
- package/dist/addon.mjs +936 -48
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7377,8 +7377,31 @@ var AdoptionJobSchema = object({
|
|
|
7377
7377
|
error: string().nullable()
|
|
7378
7378
|
});
|
|
7379
7379
|
/**
|
|
7380
|
-
* Per-camera FUNCTION SWITCHES
|
|
7381
|
-
*
|
|
7380
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7381
|
+
*
|
|
7382
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7383
|
+
*
|
|
7384
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7385
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7386
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7387
|
+
* every function already had a settings page of its own, and a second place to
|
|
7388
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7389
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7390
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7391
|
+
* (which was always first-class; the switch was a veneer over
|
|
7392
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7393
|
+
* per-device setting, the two camera planes to their own components.
|
|
7394
|
+
*
|
|
7395
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7396
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7397
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7398
|
+
* never about a control panel.
|
|
7399
|
+
*
|
|
7400
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7401
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7402
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7403
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7404
|
+
* stop; nothing new may be built on it.
|
|
7382
7405
|
*
|
|
7383
7406
|
* ## This file adds no state
|
|
7384
7407
|
*
|
|
@@ -7723,14 +7746,21 @@ var RecordingConfigSchema = object({
|
|
|
7723
7746
|
/**
|
|
7724
7747
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7725
7748
|
*
|
|
7726
|
-
* One shape shared by the recorder
|
|
7727
|
-
*
|
|
7728
|
-
*
|
|
7729
|
-
*
|
|
7730
|
-
*
|
|
7731
|
-
|
|
7749
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7750
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7751
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7752
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7753
|
+
* addon surface.
|
|
7754
|
+
*/
|
|
7755
|
+
/**
|
|
7756
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7757
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7758
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7759
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7760
|
+
* runs at all.
|
|
7732
7761
|
*/
|
|
7733
7762
|
var RelocateJobStateSchema = _enum([
|
|
7763
|
+
"queued",
|
|
7734
7764
|
"running",
|
|
7735
7765
|
"done",
|
|
7736
7766
|
"failed",
|
|
@@ -7755,19 +7785,109 @@ var RelocateJobSchema = object({
|
|
|
7755
7785
|
finishedAt: number().nullable(),
|
|
7756
7786
|
error: string().nullable()
|
|
7757
7787
|
});
|
|
7788
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7789
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7790
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7758
7791
|
var RelocateFootageInputSchema = object({
|
|
7759
|
-
deviceId: number().optional(),
|
|
7760
7792
|
fromLocationId: string(),
|
|
7761
7793
|
toLocationId: string(),
|
|
7762
7794
|
entities: array(_enum(["segments"])).optional(),
|
|
7795
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7796
|
+
* pre-orchestration compatibility path. */
|
|
7797
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7798
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7799
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7800
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7801
|
+
deviceId: number().int().optional(),
|
|
7802
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7803
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7804
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7805
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7806
|
+
profiles: array(string()).optional(),
|
|
7763
7807
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7764
7808
|
* never allowed to starve live writers. */
|
|
7765
7809
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7766
7810
|
});
|
|
7767
|
-
|
|
7768
|
-
|
|
7811
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7812
|
+
* from persistent recording settings: a migration never changes
|
|
7813
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7814
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7815
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7816
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7769
7817
|
toLocationId: string(),
|
|
7770
7818
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7819
|
+
}).extend({ leaseId: string().min(1) });
|
|
7820
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7821
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7822
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7823
|
+
var StorageMigrationClassSchema = _enum([
|
|
7824
|
+
"recordings",
|
|
7825
|
+
"recordingsLow",
|
|
7826
|
+
"eventMedia"
|
|
7827
|
+
]);
|
|
7828
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7829
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7830
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7831
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7832
|
+
recordings: string().min(1).optional(),
|
|
7833
|
+
recordingsLow: string().min(1).optional(),
|
|
7834
|
+
eventMedia: string().min(1).optional()
|
|
7835
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7836
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7837
|
+
var StorageMigrationInputSchema = object({
|
|
7838
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7839
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7840
|
+
});
|
|
7841
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7842
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7843
|
+
* verified. */
|
|
7844
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7845
|
+
"planning",
|
|
7846
|
+
"pausing",
|
|
7847
|
+
"moving",
|
|
7848
|
+
"verifying",
|
|
7849
|
+
"repointing",
|
|
7850
|
+
"refreshing",
|
|
7851
|
+
"resuming",
|
|
7852
|
+
"done",
|
|
7853
|
+
"failed",
|
|
7854
|
+
"cancelled"
|
|
7855
|
+
]);
|
|
7856
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7857
|
+
"pipeline",
|
|
7858
|
+
"recorder",
|
|
7859
|
+
"analytics"
|
|
7860
|
+
]);
|
|
7861
|
+
var StorageMigrationMoveSchema = object({
|
|
7862
|
+
storageClass: StorageMigrationClassSchema,
|
|
7863
|
+
fromLocationId: string(),
|
|
7864
|
+
toLocationId: string(),
|
|
7865
|
+
moverJobId: string().nullable(),
|
|
7866
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7867
|
+
error: string().nullable()
|
|
7868
|
+
});
|
|
7869
|
+
var StorageMigrationJobSchema = object({
|
|
7870
|
+
jobId: string(),
|
|
7871
|
+
phase: StorageMigrationPhaseSchema,
|
|
7872
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7873
|
+
throttleMbps: number(),
|
|
7874
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7875
|
+
pauseLeaseId: string().nullable(),
|
|
7876
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7877
|
+
repointed: boolean(),
|
|
7878
|
+
cancelRequested: boolean(),
|
|
7879
|
+
startedAt: number(),
|
|
7880
|
+
updatedAt: number(),
|
|
7881
|
+
finishedAt: number().nullable(),
|
|
7882
|
+
error: string().nullable()
|
|
7883
|
+
});
|
|
7884
|
+
var StorageMigrationPlanSchema = object({
|
|
7885
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7886
|
+
moves: array(object({
|
|
7887
|
+
storageClass: StorageMigrationClassSchema,
|
|
7888
|
+
fromLocationId: string(),
|
|
7889
|
+
toLocationId: string()
|
|
7890
|
+
}))
|
|
7771
7891
|
});
|
|
7772
7892
|
/**
|
|
7773
7893
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7819,6 +7939,21 @@ var StorageLocationSchema = object({
|
|
|
7819
7939
|
nodeId: string().optional(),
|
|
7820
7940
|
isDefault: boolean().default(false),
|
|
7821
7941
|
isSystem: boolean().default(false),
|
|
7942
|
+
/**
|
|
7943
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7944
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7945
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7946
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7947
|
+
* extended to add the next consumer.
|
|
7948
|
+
*
|
|
7949
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7950
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7951
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7952
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7953
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7954
|
+
* always stamped `true`.
|
|
7955
|
+
*/
|
|
7956
|
+
enabled: boolean().optional(),
|
|
7822
7957
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7823
7958
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7824
7959
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12456,7 +12591,8 @@ method(object({
|
|
|
12456
12591
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12457
12592
|
/**
|
|
12458
12593
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12459
|
-
* filesystem
|
|
12594
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12595
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12460
12596
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12461
12597
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12462
12598
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14297,6 +14433,13 @@ var MaskGridDimsSchema = object({
|
|
|
14297
14433
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14298
14434
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14299
14435
|
* one trigger.
|
|
14436
|
+
*
|
|
14437
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14438
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14439
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14440
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14441
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14442
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14300
14443
|
*/
|
|
14301
14444
|
var NcDeliverySchema = _enum([
|
|
14302
14445
|
"immediate",
|
|
@@ -14311,15 +14454,32 @@ var NcDeliverySchema = _enum([
|
|
|
14311
14454
|
* depend on a provider's raw event name or payload shape.
|
|
14312
14455
|
*/
|
|
14313
14456
|
var NcSystemEventKindSchema = _enum([
|
|
14314
|
-
"
|
|
14315
|
-
"
|
|
14457
|
+
"device-online",
|
|
14458
|
+
"device-offline",
|
|
14459
|
+
"device-disabled",
|
|
14460
|
+
"device-enabled",
|
|
14316
14461
|
"stream-online",
|
|
14317
14462
|
"stream-offline",
|
|
14318
14463
|
"node-online",
|
|
14319
14464
|
"node-offline",
|
|
14320
14465
|
"addon-update-available",
|
|
14321
|
-
"server-update-available"
|
|
14466
|
+
"server-update-available",
|
|
14467
|
+
"alarm-triggered",
|
|
14468
|
+
"alarm-armed",
|
|
14469
|
+
"alarm-disarmed",
|
|
14470
|
+
"camera-online",
|
|
14471
|
+
"camera-offline",
|
|
14472
|
+
"camera-disabled",
|
|
14473
|
+
"camera-enabled"
|
|
14322
14474
|
]);
|
|
14475
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14476
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14477
|
+
"camera-online",
|
|
14478
|
+
"camera-offline",
|
|
14479
|
+
"camera-disabled",
|
|
14480
|
+
"camera-enabled"
|
|
14481
|
+
]);
|
|
14482
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14323
14483
|
/**
|
|
14324
14484
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14325
14485
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14328,6 +14488,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14328
14488
|
var NcSystemEventConditionSchema = object({
|
|
14329
14489
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14330
14490
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14491
|
+
/**
|
|
14492
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14493
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14494
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14495
|
+
*
|
|
14496
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14497
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14498
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14499
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14500
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14501
|
+
*/
|
|
14502
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14331
14503
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14332
14504
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14333
14505
|
});
|
|
@@ -14378,6 +14550,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14378
14550
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14379
14551
|
});
|
|
14380
14552
|
/**
|
|
14553
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14554
|
+
*
|
|
14555
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14556
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14557
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14558
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14559
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14560
|
+
*
|
|
14561
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14562
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14563
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14564
|
+
*
|
|
14565
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14566
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14567
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14568
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14569
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14570
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14571
|
+
* ZodEffects the cap path would have to special-case).
|
|
14572
|
+
*
|
|
14573
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14574
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14575
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14576
|
+
* `samplingSeconds` decorative.
|
|
14577
|
+
*
|
|
14578
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14579
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14580
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14581
|
+
* an operator who typed `dog` mean the same thing.
|
|
14582
|
+
*/
|
|
14583
|
+
var NcAudioConditionSchema = object({
|
|
14584
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14585
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14586
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14587
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14588
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14589
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14590
|
+
/** Length of the sampling window in seconds. */
|
|
14591
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14592
|
+
});
|
|
14593
|
+
/**
|
|
14381
14594
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14382
14595
|
*
|
|
14383
14596
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14650,7 +14863,33 @@ var NcConditionsSchema = object({
|
|
|
14650
14863
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14651
14864
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14652
14865
|
*/
|
|
14653
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14866
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14867
|
+
/**
|
|
14868
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14869
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14870
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14871
|
+
* a window that is not full yet, neither filter given). See
|
|
14872
|
+
* {@link NcAudioCondition}.
|
|
14873
|
+
*
|
|
14874
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14875
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14876
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14877
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14878
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14879
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14880
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14881
|
+
*
|
|
14882
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14883
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14884
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14885
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14886
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14887
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14888
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14889
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14890
|
+
* does an audio rule become authorable.
|
|
14891
|
+
*/
|
|
14892
|
+
audio: NcAudioConditionSchema.optional()
|
|
14654
14893
|
});
|
|
14655
14894
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14656
14895
|
var NcRuleTargetSchema = object({
|
|
@@ -14764,6 +15003,73 @@ var NcThrottleSchema = object({
|
|
|
14764
15003
|
*/
|
|
14765
15004
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14766
15005
|
});
|
|
15006
|
+
/**
|
|
15007
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
15008
|
+
* it judges may be.
|
|
15009
|
+
*
|
|
15010
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
15011
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
15012
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
15013
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
15014
|
+
* tokens for pixels the model pools away.
|
|
15015
|
+
*/
|
|
15016
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
15017
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
15018
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
15019
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
15020
|
+
var NcConfirmExpectSchema = object({
|
|
15021
|
+
op: _enum([
|
|
15022
|
+
">=",
|
|
15023
|
+
">",
|
|
15024
|
+
"<=",
|
|
15025
|
+
"<",
|
|
15026
|
+
"=="
|
|
15027
|
+
]),
|
|
15028
|
+
count: number().int().min(0).max(1e3)
|
|
15029
|
+
});
|
|
15030
|
+
/**
|
|
15031
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
15032
|
+
* to ship and says whether it agrees with the rule.
|
|
15033
|
+
*
|
|
15034
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
15035
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
15036
|
+
* on the operator's phone is not a verdict about this notification.
|
|
15037
|
+
*
|
|
15038
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
15039
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
15040
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
15041
|
+
* open looks in the log exactly like a gate that works.
|
|
15042
|
+
*
|
|
15043
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
15044
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
15045
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
15046
|
+
* above rather than trusting a parse it may never have seen.
|
|
15047
|
+
*/
|
|
15048
|
+
var NcConfirmSchema = object({
|
|
15049
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
15050
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
15051
|
+
enabled: boolean().default(false),
|
|
15052
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
15053
|
+
profileId: string().optional(),
|
|
15054
|
+
/**
|
|
15055
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
15056
|
+
* from the rule (its class and its expectation).
|
|
15057
|
+
*
|
|
15058
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
15059
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
15060
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
15061
|
+
* turn and only rule-authored words land here.
|
|
15062
|
+
*/
|
|
15063
|
+
prompt: string().max(1e3).optional(),
|
|
15064
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
15065
|
+
* own boolean verdict decides. */
|
|
15066
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
15067
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
15068
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
15069
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
15070
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
15071
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
15072
|
+
});
|
|
14767
15073
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14768
15074
|
var NcRuleInputSchema = object({
|
|
14769
15075
|
name: string().min(1).max(200),
|
|
@@ -14824,7 +15130,13 @@ var NcRuleInputSchema = object({
|
|
|
14824
15130
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14825
15131
|
* shape as every other actuation.
|
|
14826
15132
|
*/
|
|
14827
|
-
actions: NcRuleActionsSchema.optional()
|
|
15133
|
+
actions: NcRuleActionsSchema.optional(),
|
|
15134
|
+
/**
|
|
15135
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
15136
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
15137
|
+
* did, and absent is the only way to say that without a migration.
|
|
15138
|
+
*/
|
|
15139
|
+
confirm: NcConfirmSchema.optional()
|
|
14828
15140
|
});
|
|
14829
15141
|
/**
|
|
14830
15142
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14835,7 +15147,37 @@ var NcRuleInputSchema = object({
|
|
|
14835
15147
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14836
15148
|
* `updateRule` patch.
|
|
14837
15149
|
*/
|
|
14838
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15150
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15151
|
+
disabledTargetIds: array(string()).optional(),
|
|
15152
|
+
/**
|
|
15153
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
15154
|
+
*
|
|
15155
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
15156
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
15157
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
15158
|
+
* one — which made every partial edit destructive:
|
|
15159
|
+
*
|
|
15160
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
15161
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
15162
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
15163
|
+
*
|
|
15164
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
15165
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
15166
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
15167
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
15168
|
+
* within a minute of a two-field patch.
|
|
15169
|
+
*
|
|
15170
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
15171
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
15172
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
15173
|
+
* absent key is now genuinely absent.
|
|
15174
|
+
*/
|
|
15175
|
+
enabled: boolean().optional(),
|
|
15176
|
+
conditions: NcConditionsSchema.optional(),
|
|
15177
|
+
media: NcMediaPolicySchema.optional(),
|
|
15178
|
+
throttle: NcThrottleSchema.optional(),
|
|
15179
|
+
priority: number().int().min(1).max(5).optional()
|
|
15180
|
+
});
|
|
14839
15181
|
/** A persisted rule. */
|
|
14840
15182
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14841
15183
|
id: string(),
|
|
@@ -15136,6 +15478,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
15136
15478
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
15137
15479
|
* copy would lie the first time a rule is disabled.
|
|
15138
15480
|
*/
|
|
15481
|
+
/**
|
|
15482
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15483
|
+
*
|
|
15484
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15485
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15486
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15487
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15488
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15489
|
+
* with the switches the operator actually used.
|
|
15490
|
+
*/
|
|
15491
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15492
|
+
"muted",
|
|
15493
|
+
"detection-off",
|
|
15494
|
+
"offline"
|
|
15495
|
+
]);
|
|
15496
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15497
|
+
deviceId: number().int(),
|
|
15498
|
+
reason: NcAlarmSkipReasonSchema
|
|
15499
|
+
});
|
|
15139
15500
|
var NcAlarmModeCoverageSchema = object({
|
|
15140
15501
|
mode: AlarmArmModeSchema,
|
|
15141
15502
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -15143,7 +15504,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
15143
15504
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
15144
15505
|
allDevices: boolean(),
|
|
15145
15506
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
15146
|
-
deviceIds: array(number().int())
|
|
15507
|
+
deviceIds: array(number().int()),
|
|
15508
|
+
/**
|
|
15509
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15510
|
+
* excludes it.
|
|
15511
|
+
*
|
|
15512
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15513
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15514
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15515
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15516
|
+
* alarm tab.
|
|
15517
|
+
*/
|
|
15518
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
15147
15519
|
});
|
|
15148
15520
|
var NcAlarmConfigSchema = object({
|
|
15149
15521
|
/**
|
|
@@ -16506,13 +16878,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16506
16878
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16507
16879
|
kind: "mutation",
|
|
16508
16880
|
auth: "admin"
|
|
16509
|
-
}), method(
|
|
16881
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16510
16882
|
kind: "mutation",
|
|
16511
16883
|
auth: "admin"
|
|
16512
|
-
}), method(object({
|
|
16513
|
-
kind: "
|
|
16884
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16885
|
+
kind: "mutation",
|
|
16514
16886
|
auth: "admin"
|
|
16515
|
-
}), method(
|
|
16887
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16888
|
+
kind: "mutation",
|
|
16889
|
+
auth: "admin"
|
|
16890
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16891
|
+
kind: "mutation",
|
|
16892
|
+
auth: "admin"
|
|
16893
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16516
16894
|
kind: "mutation",
|
|
16517
16895
|
auth: "admin"
|
|
16518
16896
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17969,9 +18347,16 @@ var CameraStatusSchema = object({
|
|
|
17969
18347
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17970
18348
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17971
18349
|
/**
|
|
17972
|
-
* Per-camera
|
|
18350
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17973
18351
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17974
18352
|
*
|
|
18353
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18354
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18355
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18356
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18357
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18358
|
+
* the difference between a camera being off and a camera being dead.
|
|
18359
|
+
*
|
|
17975
18360
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17976
18361
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17977
18362
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -18042,7 +18427,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
18042
18427
|
reachable: boolean(),
|
|
18043
18428
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
18044
18429
|
});
|
|
18045
|
-
method(object({
|
|
18430
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18431
|
+
kind: "mutation",
|
|
18432
|
+
auth: "admin"
|
|
18433
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18434
|
+
kind: "mutation",
|
|
18435
|
+
auth: "admin"
|
|
18436
|
+
}), method(object({
|
|
18046
18437
|
deviceId: number(),
|
|
18047
18438
|
agentNodeId: string()
|
|
18048
18439
|
}), object({ success: literal(true) }), {
|
|
@@ -18716,6 +19107,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18716
19107
|
locationId: string(),
|
|
18717
19108
|
targetBytes: number().int().positive()
|
|
18718
19109
|
}), EvictResultSchema, { kind: "mutation" });
|
|
19110
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
19111
|
+
kind: "mutation",
|
|
19112
|
+
auth: "admin"
|
|
19113
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
19114
|
+
kind: "mutation",
|
|
19115
|
+
auth: "admin"
|
|
19116
|
+
});
|
|
18719
19117
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18720
19118
|
providerId: string().min(1),
|
|
18721
19119
|
displayName: string().min(1),
|
|
@@ -18819,6 +19217,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18819
19217
|
label: string(),
|
|
18820
19218
|
description: string().optional()
|
|
18821
19219
|
});
|
|
19220
|
+
/**
|
|
19221
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19222
|
+
* an instance declares a camera.
|
|
19223
|
+
*/
|
|
19224
|
+
var TerminalInstanceInfoSchema = object({
|
|
19225
|
+
instanceId: string(),
|
|
19226
|
+
cameraStableId: string(),
|
|
19227
|
+
nodeId: string(),
|
|
19228
|
+
profileId: string(),
|
|
19229
|
+
profileLabel: string(),
|
|
19230
|
+
name: string(),
|
|
19231
|
+
enabled: boolean()
|
|
19232
|
+
});
|
|
19233
|
+
var TerminalLegacyCameraSchema = object({
|
|
19234
|
+
stableId: string(),
|
|
19235
|
+
nodeId: string(),
|
|
19236
|
+
profileId: string(),
|
|
19237
|
+
profileLabel: string(),
|
|
19238
|
+
name: string(),
|
|
19239
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19240
|
+
adoptable: boolean()
|
|
19241
|
+
});
|
|
18822
19242
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18823
19243
|
seq: number().int().positive(),
|
|
18824
19244
|
kind: literal("data"),
|
|
@@ -18835,7 +19255,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18835
19255
|
snapshot: string().optional(),
|
|
18836
19256
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18837
19257
|
});
|
|
18838
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19258
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19259
|
+
targetNodeId: string().min(1),
|
|
19260
|
+
profileId: string().min(1),
|
|
19261
|
+
name: string().trim().min(1).max(160).optional()
|
|
19262
|
+
}), TerminalInstanceInfoSchema, {
|
|
19263
|
+
kind: "mutation",
|
|
19264
|
+
auth: "admin"
|
|
19265
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19266
|
+
kind: "mutation",
|
|
19267
|
+
auth: "admin"
|
|
19268
|
+
}), method(object({
|
|
19269
|
+
instanceId: string().min(1),
|
|
19270
|
+
enabled: boolean()
|
|
19271
|
+
}), TerminalInstanceInfoSchema, {
|
|
19272
|
+
kind: "mutation",
|
|
19273
|
+
auth: "admin"
|
|
19274
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19275
|
+
stableId: string().min(1),
|
|
19276
|
+
name: string().trim().min(1).max(160).optional()
|
|
19277
|
+
}), TerminalInstanceInfoSchema, {
|
|
19278
|
+
kind: "mutation",
|
|
19279
|
+
auth: "admin"
|
|
19280
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18839
19281
|
profileId: string(),
|
|
18840
19282
|
cols: number().int().positive(),
|
|
18841
19283
|
rows: number().int().positive()
|
|
@@ -18852,7 +19294,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18852
19294
|
}), method(object({
|
|
18853
19295
|
sessionId: string(),
|
|
18854
19296
|
afterSeq: number().int().nonnegative(),
|
|
18855
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19297
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19298
|
+
/**
|
|
19299
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19300
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19301
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19302
|
+
*/
|
|
19303
|
+
waitForOutput: boolean().optional()
|
|
18856
19304
|
}), TerminalOutputBatchSchema, {
|
|
18857
19305
|
kind: "mutation",
|
|
18858
19306
|
auth: "admin",
|
|
@@ -21367,6 +21815,7 @@ var FaceInfoSchema = object({
|
|
|
21367
21815
|
var FaceFilterEnum = _enum([
|
|
21368
21816
|
"unassigned",
|
|
21369
21817
|
"recognized",
|
|
21818
|
+
"identified",
|
|
21370
21819
|
"all"
|
|
21371
21820
|
]);
|
|
21372
21821
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21395,6 +21844,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21395
21844
|
kind: "mutation",
|
|
21396
21845
|
auth: "admin"
|
|
21397
21846
|
}), method(object({
|
|
21847
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21848
|
+
deviceId: number().int().optional(),
|
|
21398
21849
|
limit: number().int().positive().optional(),
|
|
21399
21850
|
filter: FaceFilterEnum.optional(),
|
|
21400
21851
|
/**
|
|
@@ -23624,6 +24075,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23624
24075
|
capName: string().min(1).max(64),
|
|
23625
24076
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23626
24077
|
valuePath: string().min(1).max(64)
|
|
24078
|
+
}),
|
|
24079
|
+
object({
|
|
24080
|
+
kind: literal("latest-recognition"),
|
|
24081
|
+
recognition: _enum(["person", "plate"])
|
|
23627
24082
|
})
|
|
23628
24083
|
]);
|
|
23629
24084
|
var OsdSlotBindingSchema = object({
|
|
@@ -23729,6 +24184,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23729
24184
|
}), object({ success: literal(true) }), {
|
|
23730
24185
|
kind: "mutation",
|
|
23731
24186
|
auth: "admin"
|
|
24187
|
+
}), method(object({
|
|
24188
|
+
sourceDeviceId: number().int(),
|
|
24189
|
+
targetDeviceId: number().int()
|
|
24190
|
+
}), object({
|
|
24191
|
+
copied: number().int().nonnegative(),
|
|
24192
|
+
skipped: number().int().nonnegative()
|
|
24193
|
+
}), {
|
|
24194
|
+
kind: "mutation",
|
|
24195
|
+
auth: "admin"
|
|
23732
24196
|
}), method(object({
|
|
23733
24197
|
deviceId: number().int(),
|
|
23734
24198
|
slotId: string().min(1),
|
|
@@ -24651,7 +25115,19 @@ var RecordingManifestSchema = object({
|
|
|
24651
25115
|
* profiles/subtrees/locations on this node). */
|
|
24652
25116
|
var RecordingDeviceUsageSchema = object({
|
|
24653
25117
|
deviceId: number(),
|
|
24654
|
-
usedBytes: number()
|
|
25118
|
+
usedBytes: number(),
|
|
25119
|
+
/**
|
|
25120
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25121
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25122
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25123
|
+
*
|
|
25124
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25125
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25126
|
+
* field must keep validating that older provider's payload: the framework
|
|
25127
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25128
|
+
* the later of the two.
|
|
25129
|
+
*/
|
|
25130
|
+
oldestMs: number().nullable().optional()
|
|
24655
25131
|
});
|
|
24656
25132
|
/** Recording storage usage + capacity for one storage location. */
|
|
24657
25133
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24679,6 +25155,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24679
25155
|
locations: array(RecordingLocationUsageSchema)
|
|
24680
25156
|
});
|
|
24681
25157
|
/**
|
|
25158
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25159
|
+
*
|
|
25160
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25161
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25162
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25163
|
+
* location, run FIFO behind the single-flight mover.
|
|
25164
|
+
*
|
|
25165
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25166
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25167
|
+
* (empty on the plan).
|
|
25168
|
+
*/
|
|
25169
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25170
|
+
deviceId: number(),
|
|
25171
|
+
profile: string(),
|
|
25172
|
+
fromLocationId: string(),
|
|
25173
|
+
toLocationId: string(),
|
|
25174
|
+
bytes: number(),
|
|
25175
|
+
files: number().int()
|
|
25176
|
+
});
|
|
25177
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25178
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25179
|
+
* that had nothing to do. */
|
|
25180
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25181
|
+
"unassigned",
|
|
25182
|
+
"target-not-writable",
|
|
25183
|
+
"below-threshold",
|
|
25184
|
+
"no-headroom"
|
|
25185
|
+
]);
|
|
25186
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25187
|
+
deviceId: number(),
|
|
25188
|
+
profile: string(),
|
|
25189
|
+
fromLocationId: string(),
|
|
25190
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25191
|
+
toLocationId: string().nullable(),
|
|
25192
|
+
bytes: number(),
|
|
25193
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25194
|
+
});
|
|
25195
|
+
var RecordingRebalancePlanSchema = object({
|
|
25196
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25197
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25198
|
+
bytesToMove: number(),
|
|
25199
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25200
|
+
jobIds: array(string())
|
|
25201
|
+
});
|
|
25202
|
+
var RecordingRebalanceInputSchema = object({
|
|
25203
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25204
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25205
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25206
|
+
minMoveGb: number().min(0).optional()
|
|
25207
|
+
});
|
|
25208
|
+
/**
|
|
24682
25209
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24683
25210
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24684
25211
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24826,6 +25353,21 @@ method(object({
|
|
|
24826
25353
|
}), {
|
|
24827
25354
|
kind: "mutation",
|
|
24828
25355
|
auth: "admin"
|
|
25356
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25357
|
+
kind: "mutation",
|
|
25358
|
+
auth: "admin"
|
|
25359
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25360
|
+
kind: "mutation",
|
|
25361
|
+
auth: "admin"
|
|
25362
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25363
|
+
kind: "mutation",
|
|
25364
|
+
auth: "admin"
|
|
25365
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25366
|
+
kind: "mutation",
|
|
25367
|
+
auth: "admin"
|
|
25368
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25369
|
+
kind: "mutation",
|
|
25370
|
+
auth: "admin"
|
|
24829
25371
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24830
25372
|
kind: "mutation",
|
|
24831
25373
|
auth: "admin"
|
|
@@ -24835,9 +25377,15 @@ method(object({
|
|
|
24835
25377
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24836
25378
|
kind: "mutation",
|
|
24837
25379
|
auth: "admin"
|
|
25380
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25381
|
+
kind: "query",
|
|
25382
|
+
auth: "admin"
|
|
25383
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25384
|
+
kind: "mutation",
|
|
25385
|
+
auth: "admin"
|
|
24838
25386
|
});
|
|
24839
25387
|
/**
|
|
24840
|
-
* `
|
|
25388
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24841
25389
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24842
25390
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24843
25391
|
* delete-after-download.
|
|
@@ -24852,10 +25400,42 @@ method(object({
|
|
|
24852
25400
|
*/
|
|
24853
25401
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24854
25402
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25403
|
+
/**
|
|
25404
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25405
|
+
*
|
|
25406
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25407
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25408
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25409
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25410
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25411
|
+
*/
|
|
25412
|
+
var ExportDenseRangeSchema = object({
|
|
25413
|
+
fromSec: number().nonnegative(),
|
|
25414
|
+
toSec: number().nonnegative()
|
|
25415
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25416
|
+
/**
|
|
25417
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25418
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25419
|
+
*
|
|
25420
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25421
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25422
|
+
*/
|
|
25423
|
+
var ExportDenseSchema = object({
|
|
25424
|
+
everyMs: number().int().positive(),
|
|
25425
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25426
|
+
});
|
|
24855
25427
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24856
25428
|
var ExportTimelapseSchema = object({
|
|
24857
25429
|
everyMs: number().int().positive(),
|
|
24858
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25430
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25431
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25432
|
+
dense: ExportDenseSchema.optional()
|
|
25433
|
+
}).superRefine((v, ctx) => {
|
|
25434
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25435
|
+
code: ZodIssueCode.custom,
|
|
25436
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25437
|
+
path: ["dense", "everyMs"]
|
|
25438
|
+
});
|
|
24859
25439
|
});
|
|
24860
25440
|
/**
|
|
24861
25441
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24913,6 +25493,19 @@ var ExportDownloadSchema = object({
|
|
|
24913
25493
|
url: string(),
|
|
24914
25494
|
endpoints: array(string())
|
|
24915
25495
|
});
|
|
25496
|
+
/**
|
|
25497
|
+
* A finished export's bytes, inline.
|
|
25498
|
+
*
|
|
25499
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25500
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25501
|
+
*/
|
|
25502
|
+
var ExportBytesSchema = object({
|
|
25503
|
+
base64: string(),
|
|
25504
|
+
contentType: string(),
|
|
25505
|
+
/** Suggested filename, extension included. */
|
|
25506
|
+
name: string(),
|
|
25507
|
+
bytes: number().int().nonnegative()
|
|
25508
|
+
});
|
|
24916
25509
|
method(object({
|
|
24917
25510
|
deviceId: number(),
|
|
24918
25511
|
profile: string(),
|
|
@@ -24937,6 +25530,9 @@ method(object({
|
|
|
24937
25530
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24938
25531
|
kind: "query",
|
|
24939
25532
|
auth: "protected"
|
|
25533
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25534
|
+
kind: "query",
|
|
25535
|
+
auth: "protected"
|
|
24940
25536
|
});
|
|
24941
25537
|
/**
|
|
24942
25538
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30438,6 +31034,12 @@ Object.freeze({
|
|
|
30438
31034
|
addonId: null,
|
|
30439
31035
|
access: "delete"
|
|
30440
31036
|
},
|
|
31037
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31038
|
+
capName: "osd-manager",
|
|
31039
|
+
capScope: "system",
|
|
31040
|
+
addonId: null,
|
|
31041
|
+
access: "create"
|
|
31042
|
+
},
|
|
30441
31043
|
"osdManager.getConditionSupport": {
|
|
30442
31044
|
capName: "osd-manager",
|
|
30443
31045
|
capScope: "system",
|
|
@@ -30534,7 +31136,7 @@ Object.freeze({
|
|
|
30534
31136
|
addonId: null,
|
|
30535
31137
|
access: "create"
|
|
30536
31138
|
},
|
|
30537
|
-
"pipelineAnalytics.
|
|
31139
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30538
31140
|
capName: "pipeline-analytics",
|
|
30539
31141
|
capScope: "device",
|
|
30540
31142
|
addonId: null,
|
|
@@ -30606,12 +31208,6 @@ Object.freeze({
|
|
|
30606
31208
|
addonId: null,
|
|
30607
31209
|
access: "view"
|
|
30608
31210
|
},
|
|
30609
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30610
|
-
capName: "pipeline-analytics",
|
|
30611
|
-
capScope: "device",
|
|
30612
|
-
addonId: null,
|
|
30613
|
-
access: "view"
|
|
30614
|
-
},
|
|
30615
31211
|
"pipelineAnalytics.getMotionEvents": {
|
|
30616
31212
|
capName: "pipeline-analytics",
|
|
30617
31213
|
capScope: "device",
|
|
@@ -30648,6 +31244,12 @@ Object.freeze({
|
|
|
30648
31244
|
addonId: null,
|
|
30649
31245
|
access: "view"
|
|
30650
31246
|
},
|
|
31247
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31248
|
+
capName: "pipeline-analytics",
|
|
31249
|
+
capScope: "device",
|
|
31250
|
+
addonId: null,
|
|
31251
|
+
access: "view"
|
|
31252
|
+
},
|
|
30651
31253
|
"pipelineAnalytics.getTrack": {
|
|
30652
31254
|
capName: "pipeline-analytics",
|
|
30653
31255
|
capScope: "device",
|
|
@@ -30726,6 +31328,12 @@ Object.freeze({
|
|
|
30726
31328
|
addonId: null,
|
|
30727
31329
|
access: "view"
|
|
30728
31330
|
},
|
|
31331
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31332
|
+
capName: "pipeline-analytics",
|
|
31333
|
+
capScope: "device",
|
|
31334
|
+
addonId: null,
|
|
31335
|
+
access: "create"
|
|
31336
|
+
},
|
|
30729
31337
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30730
31338
|
capName: "pipeline-analytics",
|
|
30731
31339
|
capScope: "device",
|
|
@@ -30756,7 +31364,7 @@ Object.freeze({
|
|
|
30756
31364
|
addonId: null,
|
|
30757
31365
|
access: "create"
|
|
30758
31366
|
},
|
|
30759
|
-
"pipelineAnalytics.
|
|
31367
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30760
31368
|
capName: "pipeline-analytics",
|
|
30761
31369
|
capScope: "device",
|
|
30762
31370
|
addonId: null,
|
|
@@ -30768,6 +31376,12 @@ Object.freeze({
|
|
|
30768
31376
|
addonId: null,
|
|
30769
31377
|
access: "create"
|
|
30770
31378
|
},
|
|
31379
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31380
|
+
capName: "pipeline-analytics",
|
|
31381
|
+
capScope: "device",
|
|
31382
|
+
addonId: null,
|
|
31383
|
+
access: "create"
|
|
31384
|
+
},
|
|
30771
31385
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30772
31386
|
capName: "pipeline-analytics",
|
|
30773
31387
|
capScope: "device",
|
|
@@ -30792,6 +31406,12 @@ Object.freeze({
|
|
|
30792
31406
|
addonId: null,
|
|
30793
31407
|
access: "create"
|
|
30794
31408
|
},
|
|
31409
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31410
|
+
capName: "pipeline-analytics",
|
|
31411
|
+
capScope: "device",
|
|
31412
|
+
addonId: null,
|
|
31413
|
+
access: "create"
|
|
31414
|
+
},
|
|
30795
31415
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30796
31416
|
capName: "pipeline-analytics",
|
|
30797
31417
|
capScope: "device",
|
|
@@ -31158,6 +31778,12 @@ Object.freeze({
|
|
|
31158
31778
|
addonId: null,
|
|
31159
31779
|
access: "view"
|
|
31160
31780
|
},
|
|
31781
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31782
|
+
capName: "pipeline-orchestrator",
|
|
31783
|
+
capScope: "system",
|
|
31784
|
+
addonId: null,
|
|
31785
|
+
access: "create"
|
|
31786
|
+
},
|
|
31161
31787
|
"pipelineOrchestrator.rebalance": {
|
|
31162
31788
|
capName: "pipeline-orchestrator",
|
|
31163
31789
|
capScope: "system",
|
|
@@ -31182,6 +31808,12 @@ Object.freeze({
|
|
|
31182
31808
|
addonId: null,
|
|
31183
31809
|
access: "view"
|
|
31184
31810
|
},
|
|
31811
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31812
|
+
capName: "pipeline-orchestrator",
|
|
31813
|
+
capScope: "system",
|
|
31814
|
+
addonId: null,
|
|
31815
|
+
access: "create"
|
|
31816
|
+
},
|
|
31185
31817
|
"pipelineOrchestrator.saveTemplate": {
|
|
31186
31818
|
capName: "pipeline-orchestrator",
|
|
31187
31819
|
capScope: "system",
|
|
@@ -31578,7 +32210,13 @@ Object.freeze({
|
|
|
31578
32210
|
addonId: null,
|
|
31579
32211
|
access: "create"
|
|
31580
32212
|
},
|
|
31581
|
-
"recording.
|
|
32213
|
+
"recording.cancelRelocateJob": {
|
|
32214
|
+
capName: "recording",
|
|
32215
|
+
capScope: "system",
|
|
32216
|
+
addonId: null,
|
|
32217
|
+
access: "create"
|
|
32218
|
+
},
|
|
32219
|
+
"recording.cancelStorageMigrationMove": {
|
|
31582
32220
|
capName: "recording",
|
|
31583
32221
|
capScope: "system",
|
|
31584
32222
|
addonId: null,
|
|
@@ -31614,7 +32252,7 @@ Object.freeze({
|
|
|
31614
32252
|
addonId: null,
|
|
31615
32253
|
access: "view"
|
|
31616
32254
|
},
|
|
31617
|
-
"recording.
|
|
32255
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31618
32256
|
capName: "recording",
|
|
31619
32257
|
capScope: "system",
|
|
31620
32258
|
addonId: null,
|
|
@@ -31632,12 +32270,30 @@ Object.freeze({
|
|
|
31632
32270
|
addonId: null,
|
|
31633
32271
|
access: "view"
|
|
31634
32272
|
},
|
|
32273
|
+
"recording.listRelocateJobs": {
|
|
32274
|
+
capName: "recording",
|
|
32275
|
+
capScope: "system",
|
|
32276
|
+
addonId: null,
|
|
32277
|
+
access: "view"
|
|
32278
|
+
},
|
|
31635
32279
|
"recording.locateSegment": {
|
|
31636
32280
|
capName: "recording",
|
|
31637
32281
|
capScope: "system",
|
|
31638
32282
|
addonId: null,
|
|
31639
32283
|
access: "view"
|
|
31640
32284
|
},
|
|
32285
|
+
"recording.pauseForStorageMigration": {
|
|
32286
|
+
capName: "recording",
|
|
32287
|
+
capScope: "system",
|
|
32288
|
+
addonId: null,
|
|
32289
|
+
access: "create"
|
|
32290
|
+
},
|
|
32291
|
+
"recording.planStorageRebalance": {
|
|
32292
|
+
capName: "recording",
|
|
32293
|
+
capScope: "system",
|
|
32294
|
+
addonId: null,
|
|
32295
|
+
access: "view"
|
|
32296
|
+
},
|
|
31641
32297
|
"recording.pruneFootage": {
|
|
31642
32298
|
capName: "recording",
|
|
31643
32299
|
capScope: "system",
|
|
@@ -31656,6 +32312,12 @@ Object.freeze({
|
|
|
31656
32312
|
addonId: null,
|
|
31657
32313
|
access: "view"
|
|
31658
32314
|
},
|
|
32315
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32316
|
+
capName: "recording",
|
|
32317
|
+
capScope: "system",
|
|
32318
|
+
addonId: null,
|
|
32319
|
+
access: "create"
|
|
32320
|
+
},
|
|
31659
32321
|
"recording.relocateFootage": {
|
|
31660
32322
|
capName: "recording",
|
|
31661
32323
|
capScope: "system",
|
|
@@ -31680,44 +32342,68 @@ Object.freeze({
|
|
|
31680
32342
|
addonId: null,
|
|
31681
32343
|
access: "create"
|
|
31682
32344
|
},
|
|
32345
|
+
"recording.resumeForStorageMigration": {
|
|
32346
|
+
capName: "recording",
|
|
32347
|
+
capScope: "system",
|
|
32348
|
+
addonId: null,
|
|
32349
|
+
access: "create"
|
|
32350
|
+
},
|
|
31683
32351
|
"recording.setDeviceConfig": {
|
|
31684
32352
|
capName: "recording",
|
|
31685
32353
|
capScope: "system",
|
|
31686
32354
|
addonId: null,
|
|
31687
32355
|
access: "create"
|
|
31688
32356
|
},
|
|
32357
|
+
"recording.startStorageMigrationMove": {
|
|
32358
|
+
capName: "recording",
|
|
32359
|
+
capScope: "system",
|
|
32360
|
+
addonId: null,
|
|
32361
|
+
access: "create"
|
|
32362
|
+
},
|
|
32363
|
+
"recording.startStorageRebalance": {
|
|
32364
|
+
capName: "recording",
|
|
32365
|
+
capScope: "system",
|
|
32366
|
+
addonId: null,
|
|
32367
|
+
access: "create"
|
|
32368
|
+
},
|
|
31689
32369
|
"recordingExport.cancelExport": {
|
|
31690
|
-
capName: "
|
|
32370
|
+
capName: "recording-export",
|
|
31691
32371
|
capScope: "system",
|
|
31692
32372
|
addonId: null,
|
|
31693
32373
|
access: "create"
|
|
31694
32374
|
},
|
|
31695
32375
|
"recordingExport.createExport": {
|
|
31696
|
-
capName: "
|
|
32376
|
+
capName: "recording-export",
|
|
31697
32377
|
capScope: "system",
|
|
31698
32378
|
addonId: null,
|
|
31699
32379
|
access: "create"
|
|
31700
32380
|
},
|
|
31701
32381
|
"recordingExport.deleteExport": {
|
|
31702
|
-
capName: "
|
|
32382
|
+
capName: "recording-export",
|
|
31703
32383
|
capScope: "system",
|
|
31704
32384
|
addonId: null,
|
|
31705
32385
|
access: "delete"
|
|
31706
32386
|
},
|
|
31707
32387
|
"recordingExport.getDownloadUrl": {
|
|
31708
|
-
capName: "
|
|
32388
|
+
capName: "recording-export",
|
|
31709
32389
|
capScope: "system",
|
|
31710
32390
|
addonId: null,
|
|
31711
32391
|
access: "view"
|
|
31712
32392
|
},
|
|
31713
32393
|
"recordingExport.getExport": {
|
|
31714
|
-
capName: "
|
|
32394
|
+
capName: "recording-export",
|
|
31715
32395
|
capScope: "system",
|
|
31716
32396
|
addonId: null,
|
|
31717
32397
|
access: "view"
|
|
31718
32398
|
},
|
|
31719
32399
|
"recordingExport.listExports": {
|
|
31720
|
-
capName: "
|
|
32400
|
+
capName: "recording-export",
|
|
32401
|
+
capScope: "system",
|
|
32402
|
+
addonId: null,
|
|
32403
|
+
access: "view"
|
|
32404
|
+
},
|
|
32405
|
+
"recordingExport.readExportBytes": {
|
|
32406
|
+
capName: "recording-export",
|
|
31721
32407
|
capScope: "system",
|
|
31722
32408
|
addonId: null,
|
|
31723
32409
|
access: "view"
|
|
@@ -32076,6 +32762,30 @@ Object.freeze({
|
|
|
32076
32762
|
addonId: null,
|
|
32077
32763
|
access: "view"
|
|
32078
32764
|
},
|
|
32765
|
+
"storageMigration.cancel": {
|
|
32766
|
+
capName: "storage-migration",
|
|
32767
|
+
capScope: "system",
|
|
32768
|
+
addonId: null,
|
|
32769
|
+
access: "create"
|
|
32770
|
+
},
|
|
32771
|
+
"storageMigration.plan": {
|
|
32772
|
+
capName: "storage-migration",
|
|
32773
|
+
capScope: "system",
|
|
32774
|
+
addonId: null,
|
|
32775
|
+
access: "view"
|
|
32776
|
+
},
|
|
32777
|
+
"storageMigration.start": {
|
|
32778
|
+
capName: "storage-migration",
|
|
32779
|
+
capScope: "system",
|
|
32780
|
+
addonId: null,
|
|
32781
|
+
access: "create"
|
|
32782
|
+
},
|
|
32783
|
+
"storageMigration.status": {
|
|
32784
|
+
capName: "storage-migration",
|
|
32785
|
+
capScope: "system",
|
|
32786
|
+
addonId: null,
|
|
32787
|
+
access: "view"
|
|
32788
|
+
},
|
|
32079
32789
|
"storageProvider.abortUpload": {
|
|
32080
32790
|
capName: "storage-provider",
|
|
32081
32791
|
capScope: "system",
|
|
@@ -32454,12 +33164,42 @@ Object.freeze({
|
|
|
32454
33164
|
addonId: null,
|
|
32455
33165
|
access: "create"
|
|
32456
33166
|
},
|
|
33167
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33168
|
+
capName: "terminal-session",
|
|
33169
|
+
capScope: "system",
|
|
33170
|
+
addonId: null,
|
|
33171
|
+
access: "create"
|
|
33172
|
+
},
|
|
32457
33173
|
"terminalSession.close": {
|
|
32458
33174
|
capName: "terminal-session",
|
|
32459
33175
|
capScope: "system",
|
|
32460
33176
|
addonId: null,
|
|
32461
33177
|
access: "create"
|
|
32462
33178
|
},
|
|
33179
|
+
"terminalSession.createInstance": {
|
|
33180
|
+
capName: "terminal-session",
|
|
33181
|
+
capScope: "system",
|
|
33182
|
+
addonId: null,
|
|
33183
|
+
access: "create"
|
|
33184
|
+
},
|
|
33185
|
+
"terminalSession.deleteInstance": {
|
|
33186
|
+
capName: "terminal-session",
|
|
33187
|
+
capScope: "system",
|
|
33188
|
+
addonId: null,
|
|
33189
|
+
access: "delete"
|
|
33190
|
+
},
|
|
33191
|
+
"terminalSession.listInstances": {
|
|
33192
|
+
capName: "terminal-session",
|
|
33193
|
+
capScope: "system",
|
|
33194
|
+
addonId: null,
|
|
33195
|
+
access: "view"
|
|
33196
|
+
},
|
|
33197
|
+
"terminalSession.listLegacyCameras": {
|
|
33198
|
+
capName: "terminal-session",
|
|
33199
|
+
capScope: "system",
|
|
33200
|
+
addonId: null,
|
|
33201
|
+
access: "view"
|
|
33202
|
+
},
|
|
32463
33203
|
"terminalSession.listProfiles": {
|
|
32464
33204
|
capName: "terminal-session",
|
|
32465
33205
|
capScope: "system",
|
|
@@ -32490,6 +33230,12 @@ Object.freeze({
|
|
|
32490
33230
|
addonId: null,
|
|
32491
33231
|
access: "create"
|
|
32492
33232
|
},
|
|
33233
|
+
"terminalSession.setInstanceEnabled": {
|
|
33234
|
+
capName: "terminal-session",
|
|
33235
|
+
capScope: "system",
|
|
33236
|
+
addonId: null,
|
|
33237
|
+
access: "create"
|
|
33238
|
+
},
|
|
32493
33239
|
"terminalSession.writeInput": {
|
|
32494
33240
|
capName: "terminal-session",
|
|
32495
33241
|
capScope: "system",
|
|
@@ -33034,6 +33780,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33034
33780
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33035
33781
|
var PriorityField = number().int().min(1).max(5);
|
|
33036
33782
|
/**
|
|
33783
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33784
|
+
*
|
|
33785
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33786
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33787
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33788
|
+
*
|
|
33789
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33790
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33791
|
+
*
|
|
33792
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33793
|
+
*
|
|
33794
|
+
* 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.
|
|
33795
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33796
|
+
* and therefore the length of a quiet night, does not move.
|
|
33797
|
+
*
|
|
33798
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33799
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33800
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33801
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33802
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33803
|
+
*/
|
|
33804
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33805
|
+
/**
|
|
33806
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33807
|
+
*
|
|
33808
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33809
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33810
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33811
|
+
* that range every ~583 ms.
|
|
33812
|
+
*
|
|
33813
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33814
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33815
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33816
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33817
|
+
* schema change and are the tracked follow-up.
|
|
33818
|
+
*
|
|
33819
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33820
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33821
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33822
|
+
* happened.
|
|
33823
|
+
*/
|
|
33824
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33825
|
+
/**
|
|
33826
|
+
* Caption burned into the notification's preview frame.
|
|
33827
|
+
*
|
|
33828
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33829
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33830
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33831
|
+
*
|
|
33832
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33833
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33834
|
+
* the reason this is not `.min(1)`.
|
|
33835
|
+
*/
|
|
33836
|
+
var PreviewTextField = string().max(200);
|
|
33837
|
+
/**
|
|
33838
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33839
|
+
*
|
|
33840
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33841
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33842
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33843
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33844
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33845
|
+
* them.
|
|
33846
|
+
*
|
|
33847
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33848
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33849
|
+
* paying that on the deploy that shipped it.
|
|
33850
|
+
*
|
|
33851
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33852
|
+
*/
|
|
33853
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33854
|
+
/**
|
|
33855
|
+
* Which detection classes the notification reports counts for.
|
|
33856
|
+
*
|
|
33857
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33858
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33859
|
+
* class the window actually contained", which is what an operator who never
|
|
33860
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33861
|
+
* counts cars all night).
|
|
33862
|
+
*
|
|
33863
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33864
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33865
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33866
|
+
* not emit.
|
|
33867
|
+
*
|
|
33868
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33869
|
+
* - `{{detections}}` — total over the reported classes
|
|
33870
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33871
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33872
|
+
* one per class, `count_` + the class name
|
|
33873
|
+
*
|
|
33874
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33875
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33876
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33877
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33878
|
+
*/
|
|
33879
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33880
|
+
/**
|
|
33037
33881
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33038
33882
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33039
33883
|
* here (see the ownership note above).
|
|
@@ -33053,9 +33897,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33053
33897
|
cadenceSec: CadenceSecField.default(15),
|
|
33054
33898
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33055
33899
|
framerate: FramerateField.default(10),
|
|
33900
|
+
/**
|
|
33901
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33902
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33903
|
+
* field gets.
|
|
33904
|
+
*/
|
|
33905
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33906
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33907
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33056
33908
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33057
33909
|
targets: TargetsField,
|
|
33058
33910
|
template: TimelapseTemplateSchema.optional(),
|
|
33911
|
+
/**
|
|
33912
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33913
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33914
|
+
*
|
|
33915
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33916
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33917
|
+
* silently clear the caption too.
|
|
33918
|
+
*/
|
|
33919
|
+
previewText: PreviewTextField.optional(),
|
|
33920
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33921
|
+
previewMode: PreviewModeField.default("image"),
|
|
33922
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33923
|
+
reportClasses: ReportClassesField.optional(),
|
|
33059
33924
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33060
33925
|
priority: PriorityField.default(3)
|
|
33061
33926
|
});
|
|
@@ -33066,8 +33931,13 @@ object({
|
|
|
33066
33931
|
schedule: NcScheduleSchema.optional(),
|
|
33067
33932
|
cadenceSec: CadenceSecField.optional(),
|
|
33068
33933
|
framerate: FramerateField.optional(),
|
|
33934
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33935
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33069
33936
|
targets: TargetsField.optional(),
|
|
33070
33937
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33938
|
+
previewText: PreviewTextField.optional(),
|
|
33939
|
+
previewMode: PreviewModeField.optional(),
|
|
33940
|
+
reportClasses: ReportClassesField.optional(),
|
|
33071
33941
|
priority: PriorityField.optional()
|
|
33072
33942
|
});
|
|
33073
33943
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33079,10 +33949,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33079
33949
|
*/
|
|
33080
33950
|
ownerUserId: string().optional(),
|
|
33081
33951
|
/**
|
|
33082
|
-
* Epoch-ms of the
|
|
33083
|
-
*
|
|
33952
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33953
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33954
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33084
33955
|
*/
|
|
33085
33956
|
lastGeneratedAt: number().optional(),
|
|
33957
|
+
/**
|
|
33958
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33959
|
+
* re-generation guard's real durable state.
|
|
33960
|
+
*
|
|
33961
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33962
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33963
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33964
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33965
|
+
* come back.
|
|
33966
|
+
*
|
|
33967
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33968
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33969
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33970
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33971
|
+
* once, on the deploy that shipped the map.
|
|
33972
|
+
*/
|
|
33973
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33086
33974
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33087
33975
|
createdBy: string(),
|
|
33088
33976
|
createdAt: number(),
|