@camstack/addon-remote-storage 1.2.11 → 1.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/s3.addon.js +1 -1
- package/dist/s3.addon.mjs +1 -1
- package/dist/sftp.addon.js +1 -1
- package/dist/sftp.addon.mjs +1 -1
- package/dist/{shared-BwQMDLbh.js → shared-CgYcIB-Z.js} +936 -48
- package/dist/{shared-Dm3P5Qop.mjs → shared-saei9-aP.mjs} +936 -48
- package/dist/webdav.addon.js +1 -1
- package/dist/webdav.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -7190,8 +7190,31 @@ var AdoptionJobSchema = object({
|
|
|
7190
7190
|
error: string().nullable()
|
|
7191
7191
|
});
|
|
7192
7192
|
/**
|
|
7193
|
-
* Per-camera FUNCTION SWITCHES
|
|
7194
|
-
*
|
|
7193
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7194
|
+
*
|
|
7195
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7196
|
+
*
|
|
7197
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7198
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7199
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7200
|
+
* every function already had a settings page of its own, and a second place to
|
|
7201
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7202
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7203
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7204
|
+
* (which was always first-class; the switch was a veneer over
|
|
7205
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7206
|
+
* per-device setting, the two camera planes to their own components.
|
|
7207
|
+
*
|
|
7208
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7209
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7210
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7211
|
+
* never about a control panel.
|
|
7212
|
+
*
|
|
7213
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7214
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7215
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7216
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7217
|
+
* stop; nothing new may be built on it.
|
|
7195
7218
|
*
|
|
7196
7219
|
* ## This file adds no state
|
|
7197
7220
|
*
|
|
@@ -7536,14 +7559,21 @@ var RecordingConfigSchema = object({
|
|
|
7536
7559
|
/**
|
|
7537
7560
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7538
7561
|
*
|
|
7539
|
-
* One shape shared by the recorder
|
|
7540
|
-
*
|
|
7541
|
-
*
|
|
7542
|
-
*
|
|
7543
|
-
*
|
|
7544
|
-
|
|
7562
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7563
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7564
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7565
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7566
|
+
* addon surface.
|
|
7567
|
+
*/
|
|
7568
|
+
/**
|
|
7569
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7570
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7571
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7572
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7573
|
+
* runs at all.
|
|
7545
7574
|
*/
|
|
7546
7575
|
var RelocateJobStateSchema = _enum([
|
|
7576
|
+
"queued",
|
|
7547
7577
|
"running",
|
|
7548
7578
|
"done",
|
|
7549
7579
|
"failed",
|
|
@@ -7568,19 +7598,109 @@ var RelocateJobSchema = object({
|
|
|
7568
7598
|
finishedAt: number().nullable(),
|
|
7569
7599
|
error: string().nullable()
|
|
7570
7600
|
});
|
|
7601
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7602
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7603
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7571
7604
|
var RelocateFootageInputSchema = object({
|
|
7572
|
-
deviceId: number().optional(),
|
|
7573
7605
|
fromLocationId: string(),
|
|
7574
7606
|
toLocationId: string(),
|
|
7575
7607
|
entities: array(_enum(["segments"])).optional(),
|
|
7608
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7609
|
+
* pre-orchestration compatibility path. */
|
|
7610
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7611
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7612
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7613
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7614
|
+
deviceId: number().int().optional(),
|
|
7615
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7616
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7617
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7618
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7619
|
+
profiles: array(string()).optional(),
|
|
7576
7620
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7577
7621
|
* never allowed to starve live writers. */
|
|
7578
7622
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7579
7623
|
});
|
|
7580
|
-
|
|
7581
|
-
|
|
7624
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7625
|
+
* from persistent recording settings: a migration never changes
|
|
7626
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7627
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7628
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7629
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7582
7630
|
toLocationId: string(),
|
|
7583
7631
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7632
|
+
}).extend({ leaseId: string().min(1) });
|
|
7633
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7634
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7635
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7636
|
+
var StorageMigrationClassSchema = _enum([
|
|
7637
|
+
"recordings",
|
|
7638
|
+
"recordingsLow",
|
|
7639
|
+
"eventMedia"
|
|
7640
|
+
]);
|
|
7641
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7642
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7643
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7644
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7645
|
+
recordings: string().min(1).optional(),
|
|
7646
|
+
recordingsLow: string().min(1).optional(),
|
|
7647
|
+
eventMedia: string().min(1).optional()
|
|
7648
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7649
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7650
|
+
var StorageMigrationInputSchema = object({
|
|
7651
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7652
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7653
|
+
});
|
|
7654
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7655
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7656
|
+
* verified. */
|
|
7657
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7658
|
+
"planning",
|
|
7659
|
+
"pausing",
|
|
7660
|
+
"moving",
|
|
7661
|
+
"verifying",
|
|
7662
|
+
"repointing",
|
|
7663
|
+
"refreshing",
|
|
7664
|
+
"resuming",
|
|
7665
|
+
"done",
|
|
7666
|
+
"failed",
|
|
7667
|
+
"cancelled"
|
|
7668
|
+
]);
|
|
7669
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7670
|
+
"pipeline",
|
|
7671
|
+
"recorder",
|
|
7672
|
+
"analytics"
|
|
7673
|
+
]);
|
|
7674
|
+
var StorageMigrationMoveSchema = object({
|
|
7675
|
+
storageClass: StorageMigrationClassSchema,
|
|
7676
|
+
fromLocationId: string(),
|
|
7677
|
+
toLocationId: string(),
|
|
7678
|
+
moverJobId: string().nullable(),
|
|
7679
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7680
|
+
error: string().nullable()
|
|
7681
|
+
});
|
|
7682
|
+
var StorageMigrationJobSchema = object({
|
|
7683
|
+
jobId: string(),
|
|
7684
|
+
phase: StorageMigrationPhaseSchema,
|
|
7685
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7686
|
+
throttleMbps: number(),
|
|
7687
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7688
|
+
pauseLeaseId: string().nullable(),
|
|
7689
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7690
|
+
repointed: boolean(),
|
|
7691
|
+
cancelRequested: boolean(),
|
|
7692
|
+
startedAt: number(),
|
|
7693
|
+
updatedAt: number(),
|
|
7694
|
+
finishedAt: number().nullable(),
|
|
7695
|
+
error: string().nullable()
|
|
7696
|
+
});
|
|
7697
|
+
var StorageMigrationPlanSchema = object({
|
|
7698
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7699
|
+
moves: array(object({
|
|
7700
|
+
storageClass: StorageMigrationClassSchema,
|
|
7701
|
+
fromLocationId: string(),
|
|
7702
|
+
toLocationId: string()
|
|
7703
|
+
}))
|
|
7584
7704
|
});
|
|
7585
7705
|
/**
|
|
7586
7706
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7632,6 +7752,21 @@ var StorageLocationSchema = object({
|
|
|
7632
7752
|
nodeId: string().optional(),
|
|
7633
7753
|
isDefault: boolean().default(false),
|
|
7634
7754
|
isSystem: boolean().default(false),
|
|
7755
|
+
/**
|
|
7756
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7757
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7758
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7759
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7760
|
+
* extended to add the next consumer.
|
|
7761
|
+
*
|
|
7762
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7763
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7764
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7765
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7766
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7767
|
+
* always stamped `true`.
|
|
7768
|
+
*/
|
|
7769
|
+
enabled: boolean().optional(),
|
|
7635
7770
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7636
7771
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7637
7772
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -11934,7 +12069,8 @@ method(object({
|
|
|
11934
12069
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
11935
12070
|
/**
|
|
11936
12071
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
11937
|
-
* filesystem
|
|
12072
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12073
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
11938
12074
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
11939
12075
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
11940
12076
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13747,6 +13883,13 @@ var MaskGridDimsSchema = object({
|
|
|
13747
13883
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13748
13884
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13749
13885
|
* one trigger.
|
|
13886
|
+
*
|
|
13887
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13888
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13889
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13890
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13891
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13892
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13750
13893
|
*/
|
|
13751
13894
|
var NcDeliverySchema = _enum([
|
|
13752
13895
|
"immediate",
|
|
@@ -13761,15 +13904,32 @@ var NcDeliverySchema = _enum([
|
|
|
13761
13904
|
* depend on a provider's raw event name or payload shape.
|
|
13762
13905
|
*/
|
|
13763
13906
|
var NcSystemEventKindSchema = _enum([
|
|
13764
|
-
"
|
|
13765
|
-
"
|
|
13907
|
+
"device-online",
|
|
13908
|
+
"device-offline",
|
|
13909
|
+
"device-disabled",
|
|
13910
|
+
"device-enabled",
|
|
13766
13911
|
"stream-online",
|
|
13767
13912
|
"stream-offline",
|
|
13768
13913
|
"node-online",
|
|
13769
13914
|
"node-offline",
|
|
13770
13915
|
"addon-update-available",
|
|
13771
|
-
"server-update-available"
|
|
13916
|
+
"server-update-available",
|
|
13917
|
+
"alarm-triggered",
|
|
13918
|
+
"alarm-armed",
|
|
13919
|
+
"alarm-disarmed",
|
|
13920
|
+
"camera-online",
|
|
13921
|
+
"camera-offline",
|
|
13922
|
+
"camera-disabled",
|
|
13923
|
+
"camera-enabled"
|
|
13924
|
+
]);
|
|
13925
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13926
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13927
|
+
"camera-online",
|
|
13928
|
+
"camera-offline",
|
|
13929
|
+
"camera-disabled",
|
|
13930
|
+
"camera-enabled"
|
|
13772
13931
|
]);
|
|
13932
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13773
13933
|
/**
|
|
13774
13934
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13775
13935
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13778,6 +13938,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13778
13938
|
var NcSystemEventConditionSchema = object({
|
|
13779
13939
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13780
13940
|
deviceIds: array(number().int()).min(1).optional(),
|
|
13941
|
+
/**
|
|
13942
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
13943
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
13944
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
13945
|
+
*
|
|
13946
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
13947
|
+
* one reason: the intake cannot know which devices this household cares
|
|
13948
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
13949
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
13950
|
+
* does not carry) matches no `deviceTypes` list.
|
|
13951
|
+
*/
|
|
13952
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13781
13953
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13782
13954
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13783
13955
|
});
|
|
@@ -13828,6 +14000,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13828
14000
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13829
14001
|
});
|
|
13830
14002
|
/**
|
|
14003
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14004
|
+
*
|
|
14005
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14006
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14007
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14008
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14009
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14010
|
+
*
|
|
14011
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14012
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14013
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14014
|
+
*
|
|
14015
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14016
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14017
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14018
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14019
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14020
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14021
|
+
* ZodEffects the cap path would have to special-case).
|
|
14022
|
+
*
|
|
14023
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14024
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14025
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14026
|
+
* `samplingSeconds` decorative.
|
|
14027
|
+
*
|
|
14028
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14029
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14030
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14031
|
+
* an operator who typed `dog` mean the same thing.
|
|
14032
|
+
*/
|
|
14033
|
+
var NcAudioConditionSchema = object({
|
|
14034
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14035
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14036
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14037
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14038
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14039
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14040
|
+
/** Length of the sampling window in seconds. */
|
|
14041
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14042
|
+
});
|
|
14043
|
+
/**
|
|
13831
14044
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13832
14045
|
*
|
|
13833
14046
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14100,7 +14313,33 @@ var NcConditionsSchema = object({
|
|
|
14100
14313
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14101
14314
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14102
14315
|
*/
|
|
14103
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14316
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14317
|
+
/**
|
|
14318
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14319
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14320
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14321
|
+
* a window that is not full yet, neither filter given). See
|
|
14322
|
+
* {@link NcAudioCondition}.
|
|
14323
|
+
*
|
|
14324
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14325
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14326
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14327
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14328
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14329
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14330
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14331
|
+
*
|
|
14332
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14333
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14334
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14335
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14336
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14337
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14338
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14339
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14340
|
+
* does an audio rule become authorable.
|
|
14341
|
+
*/
|
|
14342
|
+
audio: NcAudioConditionSchema.optional()
|
|
14104
14343
|
});
|
|
14105
14344
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14106
14345
|
var NcRuleTargetSchema = object({
|
|
@@ -14214,6 +14453,73 @@ var NcThrottleSchema = object({
|
|
|
14214
14453
|
*/
|
|
14215
14454
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14216
14455
|
});
|
|
14456
|
+
/**
|
|
14457
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14458
|
+
* it judges may be.
|
|
14459
|
+
*
|
|
14460
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14461
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14462
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14463
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14464
|
+
* tokens for pixels the model pools away.
|
|
14465
|
+
*/
|
|
14466
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14467
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14468
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14469
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14470
|
+
var NcConfirmExpectSchema = object({
|
|
14471
|
+
op: _enum([
|
|
14472
|
+
">=",
|
|
14473
|
+
">",
|
|
14474
|
+
"<=",
|
|
14475
|
+
"<",
|
|
14476
|
+
"=="
|
|
14477
|
+
]),
|
|
14478
|
+
count: number().int().min(0).max(1e3)
|
|
14479
|
+
});
|
|
14480
|
+
/**
|
|
14481
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14482
|
+
* to ship and says whether it agrees with the rule.
|
|
14483
|
+
*
|
|
14484
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14485
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14486
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14487
|
+
*
|
|
14488
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14489
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14490
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14491
|
+
* open looks in the log exactly like a gate that works.
|
|
14492
|
+
*
|
|
14493
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14494
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14495
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14496
|
+
* above rather than trusting a parse it may never have seen.
|
|
14497
|
+
*/
|
|
14498
|
+
var NcConfirmSchema = object({
|
|
14499
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14500
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14501
|
+
enabled: boolean().default(false),
|
|
14502
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14503
|
+
profileId: string().optional(),
|
|
14504
|
+
/**
|
|
14505
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14506
|
+
* from the rule (its class and its expectation).
|
|
14507
|
+
*
|
|
14508
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14509
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14510
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14511
|
+
* turn and only rule-authored words land here.
|
|
14512
|
+
*/
|
|
14513
|
+
prompt: string().max(1e3).optional(),
|
|
14514
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14515
|
+
* own boolean verdict decides. */
|
|
14516
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14517
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14518
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14519
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14520
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14521
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14522
|
+
});
|
|
14217
14523
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14218
14524
|
var NcRuleInputSchema = object({
|
|
14219
14525
|
name: string().min(1).max(200),
|
|
@@ -14274,7 +14580,13 @@ var NcRuleInputSchema = object({
|
|
|
14274
14580
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14275
14581
|
* shape as every other actuation.
|
|
14276
14582
|
*/
|
|
14277
|
-
actions: NcRuleActionsSchema.optional()
|
|
14583
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14584
|
+
/**
|
|
14585
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14586
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14587
|
+
* did, and absent is the only way to say that without a migration.
|
|
14588
|
+
*/
|
|
14589
|
+
confirm: NcConfirmSchema.optional()
|
|
14278
14590
|
});
|
|
14279
14591
|
/**
|
|
14280
14592
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14285,7 +14597,37 @@ var NcRuleInputSchema = object({
|
|
|
14285
14597
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14286
14598
|
* `updateRule` patch.
|
|
14287
14599
|
*/
|
|
14288
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14600
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14601
|
+
disabledTargetIds: array(string()).optional(),
|
|
14602
|
+
/**
|
|
14603
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14604
|
+
*
|
|
14605
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14606
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14607
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14608
|
+
* one — which made every partial edit destructive:
|
|
14609
|
+
*
|
|
14610
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14611
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14612
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14613
|
+
*
|
|
14614
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14615
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14616
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14617
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14618
|
+
* within a minute of a two-field patch.
|
|
14619
|
+
*
|
|
14620
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14621
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14622
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14623
|
+
* absent key is now genuinely absent.
|
|
14624
|
+
*/
|
|
14625
|
+
enabled: boolean().optional(),
|
|
14626
|
+
conditions: NcConditionsSchema.optional(),
|
|
14627
|
+
media: NcMediaPolicySchema.optional(),
|
|
14628
|
+
throttle: NcThrottleSchema.optional(),
|
|
14629
|
+
priority: number().int().min(1).max(5).optional()
|
|
14630
|
+
});
|
|
14289
14631
|
/** A persisted rule. */
|
|
14290
14632
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14291
14633
|
id: string(),
|
|
@@ -14586,6 +14928,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14586
14928
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14587
14929
|
* copy would lie the first time a rule is disabled.
|
|
14588
14930
|
*/
|
|
14931
|
+
/**
|
|
14932
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
14933
|
+
*
|
|
14934
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
14935
|
+
* per-camera notification switch the Notification Center already owns,
|
|
14936
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
14937
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
14938
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
14939
|
+
* with the switches the operator actually used.
|
|
14940
|
+
*/
|
|
14941
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
14942
|
+
"muted",
|
|
14943
|
+
"detection-off",
|
|
14944
|
+
"offline"
|
|
14945
|
+
]);
|
|
14946
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
14947
|
+
deviceId: number().int(),
|
|
14948
|
+
reason: NcAlarmSkipReasonSchema
|
|
14949
|
+
});
|
|
14589
14950
|
var NcAlarmModeCoverageSchema = object({
|
|
14590
14951
|
mode: AlarmArmModeSchema,
|
|
14591
14952
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14593,7 +14954,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14593
14954
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14594
14955
|
allDevices: boolean(),
|
|
14595
14956
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14596
|
-
deviceIds: array(number().int())
|
|
14957
|
+
deviceIds: array(number().int()),
|
|
14958
|
+
/**
|
|
14959
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
14960
|
+
* excludes it.
|
|
14961
|
+
*
|
|
14962
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
14963
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
14964
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
14965
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
14966
|
+
* alarm tab.
|
|
14967
|
+
*/
|
|
14968
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14597
14969
|
});
|
|
14598
14970
|
var NcAlarmConfigSchema = object({
|
|
14599
14971
|
/**
|
|
@@ -15956,13 +16328,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15956
16328
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
15957
16329
|
kind: "mutation",
|
|
15958
16330
|
auth: "admin"
|
|
15959
|
-
}), method(
|
|
16331
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
15960
16332
|
kind: "mutation",
|
|
15961
16333
|
auth: "admin"
|
|
15962
|
-
}), method(object({
|
|
15963
|
-
kind: "
|
|
16334
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16335
|
+
kind: "mutation",
|
|
15964
16336
|
auth: "admin"
|
|
15965
|
-
}), method(
|
|
16337
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16338
|
+
kind: "mutation",
|
|
16339
|
+
auth: "admin"
|
|
16340
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16341
|
+
kind: "mutation",
|
|
16342
|
+
auth: "admin"
|
|
16343
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
15966
16344
|
kind: "mutation",
|
|
15967
16345
|
auth: "admin"
|
|
15968
16346
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17386,9 +17764,16 @@ var CameraStatusSchema = object({
|
|
|
17386
17764
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17387
17765
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17388
17766
|
/**
|
|
17389
|
-
* Per-camera
|
|
17767
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17390
17768
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17391
17769
|
*
|
|
17770
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17771
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17772
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17773
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17774
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17775
|
+
* the difference between a camera being off and a camera being dead.
|
|
17776
|
+
*
|
|
17392
17777
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17393
17778
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17394
17779
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17459,7 +17844,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17459
17844
|
reachable: boolean(),
|
|
17460
17845
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17461
17846
|
});
|
|
17462
|
-
method(object({
|
|
17847
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17848
|
+
kind: "mutation",
|
|
17849
|
+
auth: "admin"
|
|
17850
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17851
|
+
kind: "mutation",
|
|
17852
|
+
auth: "admin"
|
|
17853
|
+
}), method(object({
|
|
17463
17854
|
deviceId: number(),
|
|
17464
17855
|
agentNodeId: string()
|
|
17465
17856
|
}), object({ success: literal(true) }), {
|
|
@@ -18133,6 +18524,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18133
18524
|
locationId: string(),
|
|
18134
18525
|
targetBytes: number().int().positive()
|
|
18135
18526
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18527
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18528
|
+
kind: "mutation",
|
|
18529
|
+
auth: "admin"
|
|
18530
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18531
|
+
kind: "mutation",
|
|
18532
|
+
auth: "admin"
|
|
18533
|
+
});
|
|
18136
18534
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18137
18535
|
providerId: string().min(1),
|
|
18138
18536
|
displayName: string().min(1),
|
|
@@ -18281,6 +18679,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18281
18679
|
label: string(),
|
|
18282
18680
|
description: string().optional()
|
|
18283
18681
|
});
|
|
18682
|
+
/**
|
|
18683
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18684
|
+
* an instance declares a camera.
|
|
18685
|
+
*/
|
|
18686
|
+
var TerminalInstanceInfoSchema = object({
|
|
18687
|
+
instanceId: string(),
|
|
18688
|
+
cameraStableId: string(),
|
|
18689
|
+
nodeId: string(),
|
|
18690
|
+
profileId: string(),
|
|
18691
|
+
profileLabel: string(),
|
|
18692
|
+
name: string(),
|
|
18693
|
+
enabled: boolean()
|
|
18694
|
+
});
|
|
18695
|
+
var TerminalLegacyCameraSchema = object({
|
|
18696
|
+
stableId: string(),
|
|
18697
|
+
nodeId: string(),
|
|
18698
|
+
profileId: string(),
|
|
18699
|
+
profileLabel: string(),
|
|
18700
|
+
name: string(),
|
|
18701
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18702
|
+
adoptable: boolean()
|
|
18703
|
+
});
|
|
18284
18704
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18285
18705
|
seq: number().int().positive(),
|
|
18286
18706
|
kind: literal("data"),
|
|
@@ -18297,7 +18717,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18297
18717
|
snapshot: string().optional(),
|
|
18298
18718
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18299
18719
|
});
|
|
18300
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18720
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18721
|
+
targetNodeId: string().min(1),
|
|
18722
|
+
profileId: string().min(1),
|
|
18723
|
+
name: string().trim().min(1).max(160).optional()
|
|
18724
|
+
}), TerminalInstanceInfoSchema, {
|
|
18725
|
+
kind: "mutation",
|
|
18726
|
+
auth: "admin"
|
|
18727
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18728
|
+
kind: "mutation",
|
|
18729
|
+
auth: "admin"
|
|
18730
|
+
}), method(object({
|
|
18731
|
+
instanceId: string().min(1),
|
|
18732
|
+
enabled: boolean()
|
|
18733
|
+
}), TerminalInstanceInfoSchema, {
|
|
18734
|
+
kind: "mutation",
|
|
18735
|
+
auth: "admin"
|
|
18736
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18737
|
+
stableId: string().min(1),
|
|
18738
|
+
name: string().trim().min(1).max(160).optional()
|
|
18739
|
+
}), TerminalInstanceInfoSchema, {
|
|
18740
|
+
kind: "mutation",
|
|
18741
|
+
auth: "admin"
|
|
18742
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18301
18743
|
profileId: string(),
|
|
18302
18744
|
cols: number().int().positive(),
|
|
18303
18745
|
rows: number().int().positive()
|
|
@@ -18314,7 +18756,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18314
18756
|
}), method(object({
|
|
18315
18757
|
sessionId: string(),
|
|
18316
18758
|
afterSeq: number().int().nonnegative(),
|
|
18317
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18759
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18760
|
+
/**
|
|
18761
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18762
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18763
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18764
|
+
*/
|
|
18765
|
+
waitForOutput: boolean().optional()
|
|
18318
18766
|
}), TerminalOutputBatchSchema, {
|
|
18319
18767
|
kind: "mutation",
|
|
18320
18768
|
auth: "admin",
|
|
@@ -20255,6 +20703,7 @@ var FaceInfoSchema = object({
|
|
|
20255
20703
|
var FaceFilterEnum = _enum([
|
|
20256
20704
|
"unassigned",
|
|
20257
20705
|
"recognized",
|
|
20706
|
+
"identified",
|
|
20258
20707
|
"all"
|
|
20259
20708
|
]);
|
|
20260
20709
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20283,6 +20732,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20283
20732
|
kind: "mutation",
|
|
20284
20733
|
auth: "admin"
|
|
20285
20734
|
}), method(object({
|
|
20735
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20736
|
+
deviceId: number().int().optional(),
|
|
20286
20737
|
limit: number().int().positive().optional(),
|
|
20287
20738
|
filter: FaceFilterEnum.optional(),
|
|
20288
20739
|
/**
|
|
@@ -22048,6 +22499,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22048
22499
|
capName: string().min(1).max(64),
|
|
22049
22500
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22050
22501
|
valuePath: string().min(1).max(64)
|
|
22502
|
+
}),
|
|
22503
|
+
object({
|
|
22504
|
+
kind: literal("latest-recognition"),
|
|
22505
|
+
recognition: _enum(["person", "plate"])
|
|
22051
22506
|
})
|
|
22052
22507
|
]);
|
|
22053
22508
|
var OsdSlotBindingSchema = object({
|
|
@@ -22153,6 +22608,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22153
22608
|
}), object({ success: literal(true) }), {
|
|
22154
22609
|
kind: "mutation",
|
|
22155
22610
|
auth: "admin"
|
|
22611
|
+
}), method(object({
|
|
22612
|
+
sourceDeviceId: number().int(),
|
|
22613
|
+
targetDeviceId: number().int()
|
|
22614
|
+
}), object({
|
|
22615
|
+
copied: number().int().nonnegative(),
|
|
22616
|
+
skipped: number().int().nonnegative()
|
|
22617
|
+
}), {
|
|
22618
|
+
kind: "mutation",
|
|
22619
|
+
auth: "admin"
|
|
22156
22620
|
}), method(object({
|
|
22157
22621
|
deviceId: number().int(),
|
|
22158
22622
|
slotId: string().min(1),
|
|
@@ -22863,7 +23327,19 @@ var RecordingManifestSchema = object({
|
|
|
22863
23327
|
* profiles/subtrees/locations on this node). */
|
|
22864
23328
|
var RecordingDeviceUsageSchema = object({
|
|
22865
23329
|
deviceId: number(),
|
|
22866
|
-
usedBytes: number()
|
|
23330
|
+
usedBytes: number(),
|
|
23331
|
+
/**
|
|
23332
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23333
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23334
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23335
|
+
*
|
|
23336
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23337
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23338
|
+
* field must keep validating that older provider's payload: the framework
|
|
23339
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23340
|
+
* the later of the two.
|
|
23341
|
+
*/
|
|
23342
|
+
oldestMs: number().nullable().optional()
|
|
22867
23343
|
});
|
|
22868
23344
|
/** Recording storage usage + capacity for one storage location. */
|
|
22869
23345
|
var RecordingLocationUsageSchema = object({
|
|
@@ -22891,6 +23367,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
22891
23367
|
locations: array(RecordingLocationUsageSchema)
|
|
22892
23368
|
});
|
|
22893
23369
|
/**
|
|
23370
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23371
|
+
*
|
|
23372
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23373
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23374
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23375
|
+
* location, run FIFO behind the single-flight mover.
|
|
23376
|
+
*
|
|
23377
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23378
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23379
|
+
* (empty on the plan).
|
|
23380
|
+
*/
|
|
23381
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23382
|
+
deviceId: number(),
|
|
23383
|
+
profile: string(),
|
|
23384
|
+
fromLocationId: string(),
|
|
23385
|
+
toLocationId: string(),
|
|
23386
|
+
bytes: number(),
|
|
23387
|
+
files: number().int()
|
|
23388
|
+
});
|
|
23389
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23390
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23391
|
+
* that had nothing to do. */
|
|
23392
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23393
|
+
"unassigned",
|
|
23394
|
+
"target-not-writable",
|
|
23395
|
+
"below-threshold",
|
|
23396
|
+
"no-headroom"
|
|
23397
|
+
]);
|
|
23398
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23399
|
+
deviceId: number(),
|
|
23400
|
+
profile: string(),
|
|
23401
|
+
fromLocationId: string(),
|
|
23402
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23403
|
+
toLocationId: string().nullable(),
|
|
23404
|
+
bytes: number(),
|
|
23405
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23406
|
+
});
|
|
23407
|
+
var RecordingRebalancePlanSchema = object({
|
|
23408
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23409
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23410
|
+
bytesToMove: number(),
|
|
23411
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23412
|
+
jobIds: array(string())
|
|
23413
|
+
});
|
|
23414
|
+
var RecordingRebalanceInputSchema = object({
|
|
23415
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23416
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23417
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23418
|
+
minMoveGb: number().min(0).optional()
|
|
23419
|
+
});
|
|
23420
|
+
/**
|
|
22894
23421
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22895
23422
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22896
23423
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23038,6 +23565,21 @@ method(object({
|
|
|
23038
23565
|
}), {
|
|
23039
23566
|
kind: "mutation",
|
|
23040
23567
|
auth: "admin"
|
|
23568
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23569
|
+
kind: "mutation",
|
|
23570
|
+
auth: "admin"
|
|
23571
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23572
|
+
kind: "mutation",
|
|
23573
|
+
auth: "admin"
|
|
23574
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23575
|
+
kind: "mutation",
|
|
23576
|
+
auth: "admin"
|
|
23577
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23578
|
+
kind: "mutation",
|
|
23579
|
+
auth: "admin"
|
|
23580
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23581
|
+
kind: "mutation",
|
|
23582
|
+
auth: "admin"
|
|
23041
23583
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23042
23584
|
kind: "mutation",
|
|
23043
23585
|
auth: "admin"
|
|
@@ -23047,9 +23589,15 @@ method(object({
|
|
|
23047
23589
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23048
23590
|
kind: "mutation",
|
|
23049
23591
|
auth: "admin"
|
|
23592
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23593
|
+
kind: "query",
|
|
23594
|
+
auth: "admin"
|
|
23595
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23596
|
+
kind: "mutation",
|
|
23597
|
+
auth: "admin"
|
|
23050
23598
|
});
|
|
23051
23599
|
/**
|
|
23052
|
-
* `
|
|
23600
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23053
23601
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23054
23602
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23055
23603
|
* delete-after-download.
|
|
@@ -23064,10 +23612,42 @@ method(object({
|
|
|
23064
23612
|
*/
|
|
23065
23613
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23066
23614
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23615
|
+
/**
|
|
23616
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23617
|
+
*
|
|
23618
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23619
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23620
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23621
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23622
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23623
|
+
*/
|
|
23624
|
+
var ExportDenseRangeSchema = object({
|
|
23625
|
+
fromSec: number().nonnegative(),
|
|
23626
|
+
toSec: number().nonnegative()
|
|
23627
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23628
|
+
/**
|
|
23629
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23630
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23631
|
+
*
|
|
23632
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23633
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23634
|
+
*/
|
|
23635
|
+
var ExportDenseSchema = object({
|
|
23636
|
+
everyMs: number().int().positive(),
|
|
23637
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23638
|
+
});
|
|
23067
23639
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23068
23640
|
var ExportTimelapseSchema = object({
|
|
23069
23641
|
everyMs: number().int().positive(),
|
|
23070
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23642
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23643
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23644
|
+
dense: ExportDenseSchema.optional()
|
|
23645
|
+
}).superRefine((v, ctx) => {
|
|
23646
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23647
|
+
code: ZodIssueCode.custom,
|
|
23648
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23649
|
+
path: ["dense", "everyMs"]
|
|
23650
|
+
});
|
|
23071
23651
|
});
|
|
23072
23652
|
/**
|
|
23073
23653
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23125,6 +23705,19 @@ var ExportDownloadSchema = object({
|
|
|
23125
23705
|
url: string(),
|
|
23126
23706
|
endpoints: array(string())
|
|
23127
23707
|
});
|
|
23708
|
+
/**
|
|
23709
|
+
* A finished export's bytes, inline.
|
|
23710
|
+
*
|
|
23711
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23712
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23713
|
+
*/
|
|
23714
|
+
var ExportBytesSchema = object({
|
|
23715
|
+
base64: string(),
|
|
23716
|
+
contentType: string(),
|
|
23717
|
+
/** Suggested filename, extension included. */
|
|
23718
|
+
name: string(),
|
|
23719
|
+
bytes: number().int().nonnegative()
|
|
23720
|
+
});
|
|
23128
23721
|
method(object({
|
|
23129
23722
|
deviceId: number(),
|
|
23130
23723
|
profile: string(),
|
|
@@ -23149,6 +23742,9 @@ method(object({
|
|
|
23149
23742
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23150
23743
|
kind: "query",
|
|
23151
23744
|
auth: "protected"
|
|
23745
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23746
|
+
kind: "query",
|
|
23747
|
+
auth: "protected"
|
|
23152
23748
|
});
|
|
23153
23749
|
/**
|
|
23154
23750
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27166,6 +27762,12 @@ Object.freeze({
|
|
|
27166
27762
|
addonId: null,
|
|
27167
27763
|
access: "delete"
|
|
27168
27764
|
},
|
|
27765
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27766
|
+
capName: "osd-manager",
|
|
27767
|
+
capScope: "system",
|
|
27768
|
+
addonId: null,
|
|
27769
|
+
access: "create"
|
|
27770
|
+
},
|
|
27169
27771
|
"osdManager.getConditionSupport": {
|
|
27170
27772
|
capName: "osd-manager",
|
|
27171
27773
|
capScope: "system",
|
|
@@ -27262,7 +27864,7 @@ Object.freeze({
|
|
|
27262
27864
|
addonId: null,
|
|
27263
27865
|
access: "create"
|
|
27264
27866
|
},
|
|
27265
|
-
"pipelineAnalytics.
|
|
27867
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27266
27868
|
capName: "pipeline-analytics",
|
|
27267
27869
|
capScope: "device",
|
|
27268
27870
|
addonId: null,
|
|
@@ -27334,12 +27936,6 @@ Object.freeze({
|
|
|
27334
27936
|
addonId: null,
|
|
27335
27937
|
access: "view"
|
|
27336
27938
|
},
|
|
27337
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27338
|
-
capName: "pipeline-analytics",
|
|
27339
|
-
capScope: "device",
|
|
27340
|
-
addonId: null,
|
|
27341
|
-
access: "view"
|
|
27342
|
-
},
|
|
27343
27939
|
"pipelineAnalytics.getMotionEvents": {
|
|
27344
27940
|
capName: "pipeline-analytics",
|
|
27345
27941
|
capScope: "device",
|
|
@@ -27376,6 +27972,12 @@ Object.freeze({
|
|
|
27376
27972
|
addonId: null,
|
|
27377
27973
|
access: "view"
|
|
27378
27974
|
},
|
|
27975
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
27976
|
+
capName: "pipeline-analytics",
|
|
27977
|
+
capScope: "device",
|
|
27978
|
+
addonId: null,
|
|
27979
|
+
access: "view"
|
|
27980
|
+
},
|
|
27379
27981
|
"pipelineAnalytics.getTrack": {
|
|
27380
27982
|
capName: "pipeline-analytics",
|
|
27381
27983
|
capScope: "device",
|
|
@@ -27454,6 +28056,12 @@ Object.freeze({
|
|
|
27454
28056
|
addonId: null,
|
|
27455
28057
|
access: "view"
|
|
27456
28058
|
},
|
|
28059
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28060
|
+
capName: "pipeline-analytics",
|
|
28061
|
+
capScope: "device",
|
|
28062
|
+
addonId: null,
|
|
28063
|
+
access: "create"
|
|
28064
|
+
},
|
|
27457
28065
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27458
28066
|
capName: "pipeline-analytics",
|
|
27459
28067
|
capScope: "device",
|
|
@@ -27484,7 +28092,7 @@ Object.freeze({
|
|
|
27484
28092
|
addonId: null,
|
|
27485
28093
|
access: "create"
|
|
27486
28094
|
},
|
|
27487
|
-
"pipelineAnalytics.
|
|
28095
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27488
28096
|
capName: "pipeline-analytics",
|
|
27489
28097
|
capScope: "device",
|
|
27490
28098
|
addonId: null,
|
|
@@ -27496,6 +28104,12 @@ Object.freeze({
|
|
|
27496
28104
|
addonId: null,
|
|
27497
28105
|
access: "create"
|
|
27498
28106
|
},
|
|
28107
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28108
|
+
capName: "pipeline-analytics",
|
|
28109
|
+
capScope: "device",
|
|
28110
|
+
addonId: null,
|
|
28111
|
+
access: "create"
|
|
28112
|
+
},
|
|
27499
28113
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27500
28114
|
capName: "pipeline-analytics",
|
|
27501
28115
|
capScope: "device",
|
|
@@ -27520,6 +28134,12 @@ Object.freeze({
|
|
|
27520
28134
|
addonId: null,
|
|
27521
28135
|
access: "create"
|
|
27522
28136
|
},
|
|
28137
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28138
|
+
capName: "pipeline-analytics",
|
|
28139
|
+
capScope: "device",
|
|
28140
|
+
addonId: null,
|
|
28141
|
+
access: "create"
|
|
28142
|
+
},
|
|
27523
28143
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27524
28144
|
capName: "pipeline-analytics",
|
|
27525
28145
|
capScope: "device",
|
|
@@ -27886,6 +28506,12 @@ Object.freeze({
|
|
|
27886
28506
|
addonId: null,
|
|
27887
28507
|
access: "view"
|
|
27888
28508
|
},
|
|
28509
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28510
|
+
capName: "pipeline-orchestrator",
|
|
28511
|
+
capScope: "system",
|
|
28512
|
+
addonId: null,
|
|
28513
|
+
access: "create"
|
|
28514
|
+
},
|
|
27889
28515
|
"pipelineOrchestrator.rebalance": {
|
|
27890
28516
|
capName: "pipeline-orchestrator",
|
|
27891
28517
|
capScope: "system",
|
|
@@ -27910,6 +28536,12 @@ Object.freeze({
|
|
|
27910
28536
|
addonId: null,
|
|
27911
28537
|
access: "view"
|
|
27912
28538
|
},
|
|
28539
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28540
|
+
capName: "pipeline-orchestrator",
|
|
28541
|
+
capScope: "system",
|
|
28542
|
+
addonId: null,
|
|
28543
|
+
access: "create"
|
|
28544
|
+
},
|
|
27913
28545
|
"pipelineOrchestrator.saveTemplate": {
|
|
27914
28546
|
capName: "pipeline-orchestrator",
|
|
27915
28547
|
capScope: "system",
|
|
@@ -28306,7 +28938,13 @@ Object.freeze({
|
|
|
28306
28938
|
addonId: null,
|
|
28307
28939
|
access: "create"
|
|
28308
28940
|
},
|
|
28309
|
-
"recording.
|
|
28941
|
+
"recording.cancelRelocateJob": {
|
|
28942
|
+
capName: "recording",
|
|
28943
|
+
capScope: "system",
|
|
28944
|
+
addonId: null,
|
|
28945
|
+
access: "create"
|
|
28946
|
+
},
|
|
28947
|
+
"recording.cancelStorageMigrationMove": {
|
|
28310
28948
|
capName: "recording",
|
|
28311
28949
|
capScope: "system",
|
|
28312
28950
|
addonId: null,
|
|
@@ -28342,7 +28980,7 @@ Object.freeze({
|
|
|
28342
28980
|
addonId: null,
|
|
28343
28981
|
access: "view"
|
|
28344
28982
|
},
|
|
28345
|
-
"recording.
|
|
28983
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28346
28984
|
capName: "recording",
|
|
28347
28985
|
capScope: "system",
|
|
28348
28986
|
addonId: null,
|
|
@@ -28360,12 +28998,30 @@ Object.freeze({
|
|
|
28360
28998
|
addonId: null,
|
|
28361
28999
|
access: "view"
|
|
28362
29000
|
},
|
|
29001
|
+
"recording.listRelocateJobs": {
|
|
29002
|
+
capName: "recording",
|
|
29003
|
+
capScope: "system",
|
|
29004
|
+
addonId: null,
|
|
29005
|
+
access: "view"
|
|
29006
|
+
},
|
|
28363
29007
|
"recording.locateSegment": {
|
|
28364
29008
|
capName: "recording",
|
|
28365
29009
|
capScope: "system",
|
|
28366
29010
|
addonId: null,
|
|
28367
29011
|
access: "view"
|
|
28368
29012
|
},
|
|
29013
|
+
"recording.pauseForStorageMigration": {
|
|
29014
|
+
capName: "recording",
|
|
29015
|
+
capScope: "system",
|
|
29016
|
+
addonId: null,
|
|
29017
|
+
access: "create"
|
|
29018
|
+
},
|
|
29019
|
+
"recording.planStorageRebalance": {
|
|
29020
|
+
capName: "recording",
|
|
29021
|
+
capScope: "system",
|
|
29022
|
+
addonId: null,
|
|
29023
|
+
access: "view"
|
|
29024
|
+
},
|
|
28369
29025
|
"recording.pruneFootage": {
|
|
28370
29026
|
capName: "recording",
|
|
28371
29027
|
capScope: "system",
|
|
@@ -28384,6 +29040,12 @@ Object.freeze({
|
|
|
28384
29040
|
addonId: null,
|
|
28385
29041
|
access: "view"
|
|
28386
29042
|
},
|
|
29043
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29044
|
+
capName: "recording",
|
|
29045
|
+
capScope: "system",
|
|
29046
|
+
addonId: null,
|
|
29047
|
+
access: "create"
|
|
29048
|
+
},
|
|
28387
29049
|
"recording.relocateFootage": {
|
|
28388
29050
|
capName: "recording",
|
|
28389
29051
|
capScope: "system",
|
|
@@ -28408,44 +29070,68 @@ Object.freeze({
|
|
|
28408
29070
|
addonId: null,
|
|
28409
29071
|
access: "create"
|
|
28410
29072
|
},
|
|
29073
|
+
"recording.resumeForStorageMigration": {
|
|
29074
|
+
capName: "recording",
|
|
29075
|
+
capScope: "system",
|
|
29076
|
+
addonId: null,
|
|
29077
|
+
access: "create"
|
|
29078
|
+
},
|
|
28411
29079
|
"recording.setDeviceConfig": {
|
|
28412
29080
|
capName: "recording",
|
|
28413
29081
|
capScope: "system",
|
|
28414
29082
|
addonId: null,
|
|
28415
29083
|
access: "create"
|
|
28416
29084
|
},
|
|
29085
|
+
"recording.startStorageMigrationMove": {
|
|
29086
|
+
capName: "recording",
|
|
29087
|
+
capScope: "system",
|
|
29088
|
+
addonId: null,
|
|
29089
|
+
access: "create"
|
|
29090
|
+
},
|
|
29091
|
+
"recording.startStorageRebalance": {
|
|
29092
|
+
capName: "recording",
|
|
29093
|
+
capScope: "system",
|
|
29094
|
+
addonId: null,
|
|
29095
|
+
access: "create"
|
|
29096
|
+
},
|
|
28417
29097
|
"recordingExport.cancelExport": {
|
|
28418
|
-
capName: "
|
|
29098
|
+
capName: "recording-export",
|
|
28419
29099
|
capScope: "system",
|
|
28420
29100
|
addonId: null,
|
|
28421
29101
|
access: "create"
|
|
28422
29102
|
},
|
|
28423
29103
|
"recordingExport.createExport": {
|
|
28424
|
-
capName: "
|
|
29104
|
+
capName: "recording-export",
|
|
28425
29105
|
capScope: "system",
|
|
28426
29106
|
addonId: null,
|
|
28427
29107
|
access: "create"
|
|
28428
29108
|
},
|
|
28429
29109
|
"recordingExport.deleteExport": {
|
|
28430
|
-
capName: "
|
|
29110
|
+
capName: "recording-export",
|
|
28431
29111
|
capScope: "system",
|
|
28432
29112
|
addonId: null,
|
|
28433
29113
|
access: "delete"
|
|
28434
29114
|
},
|
|
28435
29115
|
"recordingExport.getDownloadUrl": {
|
|
28436
|
-
capName: "
|
|
29116
|
+
capName: "recording-export",
|
|
28437
29117
|
capScope: "system",
|
|
28438
29118
|
addonId: null,
|
|
28439
29119
|
access: "view"
|
|
28440
29120
|
},
|
|
28441
29121
|
"recordingExport.getExport": {
|
|
28442
|
-
capName: "
|
|
29122
|
+
capName: "recording-export",
|
|
28443
29123
|
capScope: "system",
|
|
28444
29124
|
addonId: null,
|
|
28445
29125
|
access: "view"
|
|
28446
29126
|
},
|
|
28447
29127
|
"recordingExport.listExports": {
|
|
28448
|
-
capName: "
|
|
29128
|
+
capName: "recording-export",
|
|
29129
|
+
capScope: "system",
|
|
29130
|
+
addonId: null,
|
|
29131
|
+
access: "view"
|
|
29132
|
+
},
|
|
29133
|
+
"recordingExport.readExportBytes": {
|
|
29134
|
+
capName: "recording-export",
|
|
28449
29135
|
capScope: "system",
|
|
28450
29136
|
addonId: null,
|
|
28451
29137
|
access: "view"
|
|
@@ -28804,6 +29490,30 @@ Object.freeze({
|
|
|
28804
29490
|
addonId: null,
|
|
28805
29491
|
access: "view"
|
|
28806
29492
|
},
|
|
29493
|
+
"storageMigration.cancel": {
|
|
29494
|
+
capName: "storage-migration",
|
|
29495
|
+
capScope: "system",
|
|
29496
|
+
addonId: null,
|
|
29497
|
+
access: "create"
|
|
29498
|
+
},
|
|
29499
|
+
"storageMigration.plan": {
|
|
29500
|
+
capName: "storage-migration",
|
|
29501
|
+
capScope: "system",
|
|
29502
|
+
addonId: null,
|
|
29503
|
+
access: "view"
|
|
29504
|
+
},
|
|
29505
|
+
"storageMigration.start": {
|
|
29506
|
+
capName: "storage-migration",
|
|
29507
|
+
capScope: "system",
|
|
29508
|
+
addonId: null,
|
|
29509
|
+
access: "create"
|
|
29510
|
+
},
|
|
29511
|
+
"storageMigration.status": {
|
|
29512
|
+
capName: "storage-migration",
|
|
29513
|
+
capScope: "system",
|
|
29514
|
+
addonId: null,
|
|
29515
|
+
access: "view"
|
|
29516
|
+
},
|
|
28807
29517
|
"storageProvider.abortUpload": {
|
|
28808
29518
|
capName: "storage-provider",
|
|
28809
29519
|
capScope: "system",
|
|
@@ -29182,12 +29892,42 @@ Object.freeze({
|
|
|
29182
29892
|
addonId: null,
|
|
29183
29893
|
access: "create"
|
|
29184
29894
|
},
|
|
29895
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29896
|
+
capName: "terminal-session",
|
|
29897
|
+
capScope: "system",
|
|
29898
|
+
addonId: null,
|
|
29899
|
+
access: "create"
|
|
29900
|
+
},
|
|
29185
29901
|
"terminalSession.close": {
|
|
29186
29902
|
capName: "terminal-session",
|
|
29187
29903
|
capScope: "system",
|
|
29188
29904
|
addonId: null,
|
|
29189
29905
|
access: "create"
|
|
29190
29906
|
},
|
|
29907
|
+
"terminalSession.createInstance": {
|
|
29908
|
+
capName: "terminal-session",
|
|
29909
|
+
capScope: "system",
|
|
29910
|
+
addonId: null,
|
|
29911
|
+
access: "create"
|
|
29912
|
+
},
|
|
29913
|
+
"terminalSession.deleteInstance": {
|
|
29914
|
+
capName: "terminal-session",
|
|
29915
|
+
capScope: "system",
|
|
29916
|
+
addonId: null,
|
|
29917
|
+
access: "delete"
|
|
29918
|
+
},
|
|
29919
|
+
"terminalSession.listInstances": {
|
|
29920
|
+
capName: "terminal-session",
|
|
29921
|
+
capScope: "system",
|
|
29922
|
+
addonId: null,
|
|
29923
|
+
access: "view"
|
|
29924
|
+
},
|
|
29925
|
+
"terminalSession.listLegacyCameras": {
|
|
29926
|
+
capName: "terminal-session",
|
|
29927
|
+
capScope: "system",
|
|
29928
|
+
addonId: null,
|
|
29929
|
+
access: "view"
|
|
29930
|
+
},
|
|
29191
29931
|
"terminalSession.listProfiles": {
|
|
29192
29932
|
capName: "terminal-session",
|
|
29193
29933
|
capScope: "system",
|
|
@@ -29218,6 +29958,12 @@ Object.freeze({
|
|
|
29218
29958
|
addonId: null,
|
|
29219
29959
|
access: "create"
|
|
29220
29960
|
},
|
|
29961
|
+
"terminalSession.setInstanceEnabled": {
|
|
29962
|
+
capName: "terminal-session",
|
|
29963
|
+
capScope: "system",
|
|
29964
|
+
addonId: null,
|
|
29965
|
+
access: "create"
|
|
29966
|
+
},
|
|
29221
29967
|
"terminalSession.writeInput": {
|
|
29222
29968
|
capName: "terminal-session",
|
|
29223
29969
|
capScope: "system",
|
|
@@ -29762,6 +30508,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29762
30508
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29763
30509
|
var PriorityField = number().int().min(1).max(5);
|
|
29764
30510
|
/**
|
|
30511
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30512
|
+
*
|
|
30513
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30514
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30515
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30516
|
+
*
|
|
30517
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30518
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30519
|
+
*
|
|
30520
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30521
|
+
*
|
|
30522
|
+
* 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.
|
|
30523
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30524
|
+
* and therefore the length of a quiet night, does not move.
|
|
30525
|
+
*
|
|
30526
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30527
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30528
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30529
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30530
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30531
|
+
*/
|
|
30532
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30533
|
+
/**
|
|
30534
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30535
|
+
*
|
|
30536
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30537
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30538
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30539
|
+
* that range every ~583 ms.
|
|
30540
|
+
*
|
|
30541
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30542
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30543
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30544
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30545
|
+
* schema change and are the tracked follow-up.
|
|
30546
|
+
*
|
|
30547
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30548
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30549
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30550
|
+
* happened.
|
|
30551
|
+
*/
|
|
30552
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30553
|
+
/**
|
|
30554
|
+
* Caption burned into the notification's preview frame.
|
|
30555
|
+
*
|
|
30556
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30557
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30558
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30559
|
+
*
|
|
30560
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30561
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30562
|
+
* the reason this is not `.min(1)`.
|
|
30563
|
+
*/
|
|
30564
|
+
var PreviewTextField = string().max(200);
|
|
30565
|
+
/**
|
|
30566
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30567
|
+
*
|
|
30568
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30569
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30570
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30571
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30572
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30573
|
+
* them.
|
|
30574
|
+
*
|
|
30575
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30576
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30577
|
+
* paying that on the deploy that shipped it.
|
|
30578
|
+
*
|
|
30579
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30580
|
+
*/
|
|
30581
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30582
|
+
/**
|
|
30583
|
+
* Which detection classes the notification reports counts for.
|
|
30584
|
+
*
|
|
30585
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30586
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30587
|
+
* class the window actually contained", which is what an operator who never
|
|
30588
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30589
|
+
* counts cars all night).
|
|
30590
|
+
*
|
|
30591
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30592
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30593
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30594
|
+
* not emit.
|
|
30595
|
+
*
|
|
30596
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30597
|
+
* - `{{detections}}` — total over the reported classes
|
|
30598
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30599
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30600
|
+
* one per class, `count_` + the class name
|
|
30601
|
+
*
|
|
30602
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30603
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30604
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30605
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30606
|
+
*/
|
|
30607
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30608
|
+
/**
|
|
29765
30609
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29766
30610
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29767
30611
|
* here (see the ownership note above).
|
|
@@ -29781,9 +30625,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29781
30625
|
cadenceSec: CadenceSecField.default(15),
|
|
29782
30626
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29783
30627
|
framerate: FramerateField.default(10),
|
|
30628
|
+
/**
|
|
30629
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30630
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30631
|
+
* field gets.
|
|
30632
|
+
*/
|
|
30633
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30634
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30635
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29784
30636
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29785
30637
|
targets: TargetsField,
|
|
29786
30638
|
template: TimelapseTemplateSchema.optional(),
|
|
30639
|
+
/**
|
|
30640
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30641
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30642
|
+
*
|
|
30643
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30644
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30645
|
+
* silently clear the caption too.
|
|
30646
|
+
*/
|
|
30647
|
+
previewText: PreviewTextField.optional(),
|
|
30648
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30649
|
+
previewMode: PreviewModeField.default("image"),
|
|
30650
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30651
|
+
reportClasses: ReportClassesField.optional(),
|
|
29787
30652
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29788
30653
|
priority: PriorityField.default(3)
|
|
29789
30654
|
});
|
|
@@ -29794,8 +30659,13 @@ object({
|
|
|
29794
30659
|
schedule: NcScheduleSchema.optional(),
|
|
29795
30660
|
cadenceSec: CadenceSecField.optional(),
|
|
29796
30661
|
framerate: FramerateField.optional(),
|
|
30662
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30663
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29797
30664
|
targets: TargetsField.optional(),
|
|
29798
30665
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30666
|
+
previewText: PreviewTextField.optional(),
|
|
30667
|
+
previewMode: PreviewModeField.optional(),
|
|
30668
|
+
reportClasses: ReportClassesField.optional(),
|
|
29799
30669
|
priority: PriorityField.optional()
|
|
29800
30670
|
});
|
|
29801
30671
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29807,10 +30677,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29807
30677
|
*/
|
|
29808
30678
|
ownerUserId: string().optional(),
|
|
29809
30679
|
/**
|
|
29810
|
-
* Epoch-ms of the
|
|
29811
|
-
*
|
|
30680
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30681
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30682
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29812
30683
|
*/
|
|
29813
30684
|
lastGeneratedAt: number().optional(),
|
|
30685
|
+
/**
|
|
30686
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30687
|
+
* re-generation guard's real durable state.
|
|
30688
|
+
*
|
|
30689
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30690
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30691
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30692
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30693
|
+
* come back.
|
|
30694
|
+
*
|
|
30695
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30696
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30697
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30698
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30699
|
+
* once, on the deploy that shipped the map.
|
|
30700
|
+
*/
|
|
30701
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29814
30702
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29815
30703
|
createdBy: string(),
|
|
29816
30704
|
createdAt: number(),
|