@camstack/addon-agent-ui 1.2.12 → 1.2.14
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 +937 -49
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7199,8 +7199,31 @@ var AdoptionJobSchema = object({
|
|
|
7199
7199
|
error: string().nullable()
|
|
7200
7200
|
});
|
|
7201
7201
|
/**
|
|
7202
|
-
* Per-camera FUNCTION SWITCHES
|
|
7203
|
-
*
|
|
7202
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7203
|
+
*
|
|
7204
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7205
|
+
*
|
|
7206
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7207
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7208
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7209
|
+
* every function already had a settings page of its own, and a second place to
|
|
7210
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7211
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7212
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7213
|
+
* (which was always first-class; the switch was a veneer over
|
|
7214
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7215
|
+
* per-device setting, the two camera planes to their own components.
|
|
7216
|
+
*
|
|
7217
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7218
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7219
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7220
|
+
* never about a control panel.
|
|
7221
|
+
*
|
|
7222
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7223
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7224
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7225
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7226
|
+
* stop; nothing new may be built on it.
|
|
7204
7227
|
*
|
|
7205
7228
|
* ## This file adds no state
|
|
7206
7229
|
*
|
|
@@ -7545,14 +7568,21 @@ var RecordingConfigSchema = object({
|
|
|
7545
7568
|
/**
|
|
7546
7569
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7547
7570
|
*
|
|
7548
|
-
* One shape shared by the recorder
|
|
7549
|
-
*
|
|
7550
|
-
*
|
|
7551
|
-
*
|
|
7552
|
-
*
|
|
7553
|
-
|
|
7571
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7572
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7573
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7574
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7575
|
+
* addon surface.
|
|
7576
|
+
*/
|
|
7577
|
+
/**
|
|
7578
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7579
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7580
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7581
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7582
|
+
* runs at all.
|
|
7554
7583
|
*/
|
|
7555
7584
|
var RelocateJobStateSchema = _enum([
|
|
7585
|
+
"queued",
|
|
7556
7586
|
"running",
|
|
7557
7587
|
"done",
|
|
7558
7588
|
"failed",
|
|
@@ -7577,19 +7607,109 @@ var RelocateJobSchema = object({
|
|
|
7577
7607
|
finishedAt: number().nullable(),
|
|
7578
7608
|
error: string().nullable()
|
|
7579
7609
|
});
|
|
7610
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7611
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7612
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7580
7613
|
var RelocateFootageInputSchema = object({
|
|
7581
|
-
deviceId: number().optional(),
|
|
7582
7614
|
fromLocationId: string(),
|
|
7583
7615
|
toLocationId: string(),
|
|
7584
7616
|
entities: array(_enum(["segments"])).optional(),
|
|
7617
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7618
|
+
* pre-orchestration compatibility path. */
|
|
7619
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7620
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7621
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7622
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7623
|
+
deviceId: number().int().optional(),
|
|
7624
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7625
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7626
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7627
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7628
|
+
profiles: array(string()).optional(),
|
|
7585
7629
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7586
7630
|
* never allowed to starve live writers. */
|
|
7587
7631
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7588
7632
|
});
|
|
7589
|
-
|
|
7590
|
-
|
|
7633
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7634
|
+
* from persistent recording settings: a migration never changes
|
|
7635
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7636
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7637
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7638
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7591
7639
|
toLocationId: string(),
|
|
7592
7640
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7641
|
+
}).extend({ leaseId: string().min(1) });
|
|
7642
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7643
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7644
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7645
|
+
var StorageMigrationClassSchema = _enum([
|
|
7646
|
+
"recordings",
|
|
7647
|
+
"recordingsLow",
|
|
7648
|
+
"eventMedia"
|
|
7649
|
+
]);
|
|
7650
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7651
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7652
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7653
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7654
|
+
recordings: string().min(1).optional(),
|
|
7655
|
+
recordingsLow: string().min(1).optional(),
|
|
7656
|
+
eventMedia: string().min(1).optional()
|
|
7657
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7658
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7659
|
+
var StorageMigrationInputSchema = object({
|
|
7660
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7661
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7662
|
+
});
|
|
7663
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7664
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7665
|
+
* verified. */
|
|
7666
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7667
|
+
"planning",
|
|
7668
|
+
"pausing",
|
|
7669
|
+
"moving",
|
|
7670
|
+
"verifying",
|
|
7671
|
+
"repointing",
|
|
7672
|
+
"refreshing",
|
|
7673
|
+
"resuming",
|
|
7674
|
+
"done",
|
|
7675
|
+
"failed",
|
|
7676
|
+
"cancelled"
|
|
7677
|
+
]);
|
|
7678
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7679
|
+
"pipeline",
|
|
7680
|
+
"recorder",
|
|
7681
|
+
"analytics"
|
|
7682
|
+
]);
|
|
7683
|
+
var StorageMigrationMoveSchema = object({
|
|
7684
|
+
storageClass: StorageMigrationClassSchema,
|
|
7685
|
+
fromLocationId: string(),
|
|
7686
|
+
toLocationId: string(),
|
|
7687
|
+
moverJobId: string().nullable(),
|
|
7688
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7689
|
+
error: string().nullable()
|
|
7690
|
+
});
|
|
7691
|
+
var StorageMigrationJobSchema = object({
|
|
7692
|
+
jobId: string(),
|
|
7693
|
+
phase: StorageMigrationPhaseSchema,
|
|
7694
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7695
|
+
throttleMbps: number(),
|
|
7696
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7697
|
+
pauseLeaseId: string().nullable(),
|
|
7698
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7699
|
+
repointed: boolean(),
|
|
7700
|
+
cancelRequested: boolean(),
|
|
7701
|
+
startedAt: number(),
|
|
7702
|
+
updatedAt: number(),
|
|
7703
|
+
finishedAt: number().nullable(),
|
|
7704
|
+
error: string().nullable()
|
|
7705
|
+
});
|
|
7706
|
+
var StorageMigrationPlanSchema = object({
|
|
7707
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7708
|
+
moves: array(object({
|
|
7709
|
+
storageClass: StorageMigrationClassSchema,
|
|
7710
|
+
fromLocationId: string(),
|
|
7711
|
+
toLocationId: string()
|
|
7712
|
+
}))
|
|
7593
7713
|
});
|
|
7594
7714
|
/**
|
|
7595
7715
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7641,6 +7761,21 @@ var StorageLocationSchema = object({
|
|
|
7641
7761
|
nodeId: string().optional(),
|
|
7642
7762
|
isDefault: boolean().default(false),
|
|
7643
7763
|
isSystem: boolean().default(false),
|
|
7764
|
+
/**
|
|
7765
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7766
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7767
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7768
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7769
|
+
* extended to add the next consumer.
|
|
7770
|
+
*
|
|
7771
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7772
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7773
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7774
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7775
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7776
|
+
* always stamped `true`.
|
|
7777
|
+
*/
|
|
7778
|
+
enabled: boolean().optional(),
|
|
7644
7779
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7645
7780
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7646
7781
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -11943,7 +12078,8 @@ method(object({
|
|
|
11943
12078
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
11944
12079
|
/**
|
|
11945
12080
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
11946
|
-
* filesystem
|
|
12081
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12082
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
11947
12083
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
11948
12084
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
11949
12085
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13756,6 +13892,13 @@ var MaskGridDimsSchema = object({
|
|
|
13756
13892
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13757
13893
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13758
13894
|
* one trigger.
|
|
13895
|
+
*
|
|
13896
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13897
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13898
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13899
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13900
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13901
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13759
13902
|
*/
|
|
13760
13903
|
var NcDeliverySchema = _enum([
|
|
13761
13904
|
"immediate",
|
|
@@ -13770,15 +13913,32 @@ var NcDeliverySchema = _enum([
|
|
|
13770
13913
|
* depend on a provider's raw event name or payload shape.
|
|
13771
13914
|
*/
|
|
13772
13915
|
var NcSystemEventKindSchema = _enum([
|
|
13773
|
-
"
|
|
13774
|
-
"
|
|
13916
|
+
"device-online",
|
|
13917
|
+
"device-offline",
|
|
13918
|
+
"device-disabled",
|
|
13919
|
+
"device-enabled",
|
|
13775
13920
|
"stream-online",
|
|
13776
13921
|
"stream-offline",
|
|
13777
13922
|
"node-online",
|
|
13778
13923
|
"node-offline",
|
|
13779
13924
|
"addon-update-available",
|
|
13780
|
-
"server-update-available"
|
|
13925
|
+
"server-update-available",
|
|
13926
|
+
"alarm-triggered",
|
|
13927
|
+
"alarm-armed",
|
|
13928
|
+
"alarm-disarmed",
|
|
13929
|
+
"camera-online",
|
|
13930
|
+
"camera-offline",
|
|
13931
|
+
"camera-disabled",
|
|
13932
|
+
"camera-enabled"
|
|
13933
|
+
]);
|
|
13934
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13935
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13936
|
+
"camera-online",
|
|
13937
|
+
"camera-offline",
|
|
13938
|
+
"camera-disabled",
|
|
13939
|
+
"camera-enabled"
|
|
13781
13940
|
]);
|
|
13941
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13782
13942
|
/**
|
|
13783
13943
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13784
13944
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13787,6 +13947,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13787
13947
|
var NcSystemEventConditionSchema = object({
|
|
13788
13948
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13789
13949
|
deviceIds: array(number().int()).min(1).optional(),
|
|
13950
|
+
/**
|
|
13951
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
13952
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
13953
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
13954
|
+
*
|
|
13955
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
13956
|
+
* one reason: the intake cannot know which devices this household cares
|
|
13957
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
13958
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
13959
|
+
* does not carry) matches no `deviceTypes` list.
|
|
13960
|
+
*/
|
|
13961
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13790
13962
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13791
13963
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13792
13964
|
});
|
|
@@ -13837,6 +14009,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13837
14009
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13838
14010
|
});
|
|
13839
14011
|
/**
|
|
14012
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14013
|
+
*
|
|
14014
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14015
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14016
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14017
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14018
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14019
|
+
*
|
|
14020
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14021
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14022
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14023
|
+
*
|
|
14024
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14025
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14026
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14027
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14028
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14029
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14030
|
+
* ZodEffects the cap path would have to special-case).
|
|
14031
|
+
*
|
|
14032
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14033
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14034
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14035
|
+
* `samplingSeconds` decorative.
|
|
14036
|
+
*
|
|
14037
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14038
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14039
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14040
|
+
* an operator who typed `dog` mean the same thing.
|
|
14041
|
+
*/
|
|
14042
|
+
var NcAudioConditionSchema = object({
|
|
14043
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14044
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14045
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14046
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14047
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14048
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14049
|
+
/** Length of the sampling window in seconds. */
|
|
14050
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14051
|
+
});
|
|
14052
|
+
/**
|
|
13840
14053
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13841
14054
|
*
|
|
13842
14055
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14109,7 +14322,33 @@ var NcConditionsSchema = object({
|
|
|
14109
14322
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14110
14323
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14111
14324
|
*/
|
|
14112
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14325
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14326
|
+
/**
|
|
14327
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14328
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14329
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14330
|
+
* a window that is not full yet, neither filter given). See
|
|
14331
|
+
* {@link NcAudioCondition}.
|
|
14332
|
+
*
|
|
14333
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14334
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14335
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14336
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14337
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14338
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14339
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14340
|
+
*
|
|
14341
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14342
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14343
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14344
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14345
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14346
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14347
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14348
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14349
|
+
* does an audio rule become authorable.
|
|
14350
|
+
*/
|
|
14351
|
+
audio: NcAudioConditionSchema.optional()
|
|
14113
14352
|
});
|
|
14114
14353
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14115
14354
|
var NcRuleTargetSchema = object({
|
|
@@ -14223,6 +14462,73 @@ var NcThrottleSchema = object({
|
|
|
14223
14462
|
*/
|
|
14224
14463
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14225
14464
|
});
|
|
14465
|
+
/**
|
|
14466
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14467
|
+
* it judges may be.
|
|
14468
|
+
*
|
|
14469
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14470
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14471
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14472
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14473
|
+
* tokens for pixels the model pools away.
|
|
14474
|
+
*/
|
|
14475
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14476
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14477
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14478
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14479
|
+
var NcConfirmExpectSchema = object({
|
|
14480
|
+
op: _enum([
|
|
14481
|
+
">=",
|
|
14482
|
+
">",
|
|
14483
|
+
"<=",
|
|
14484
|
+
"<",
|
|
14485
|
+
"=="
|
|
14486
|
+
]),
|
|
14487
|
+
count: number().int().min(0).max(1e3)
|
|
14488
|
+
});
|
|
14489
|
+
/**
|
|
14490
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14491
|
+
* to ship and says whether it agrees with the rule.
|
|
14492
|
+
*
|
|
14493
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14494
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14495
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14496
|
+
*
|
|
14497
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14498
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14499
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14500
|
+
* open looks in the log exactly like a gate that works.
|
|
14501
|
+
*
|
|
14502
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14503
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14504
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14505
|
+
* above rather than trusting a parse it may never have seen.
|
|
14506
|
+
*/
|
|
14507
|
+
var NcConfirmSchema = object({
|
|
14508
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14509
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14510
|
+
enabled: boolean().default(false),
|
|
14511
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14512
|
+
profileId: string().optional(),
|
|
14513
|
+
/**
|
|
14514
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14515
|
+
* from the rule (its class and its expectation).
|
|
14516
|
+
*
|
|
14517
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14518
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14519
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14520
|
+
* turn and only rule-authored words land here.
|
|
14521
|
+
*/
|
|
14522
|
+
prompt: string().max(1e3).optional(),
|
|
14523
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14524
|
+
* own boolean verdict decides. */
|
|
14525
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14526
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14527
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14528
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14529
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14530
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14531
|
+
});
|
|
14226
14532
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14227
14533
|
var NcRuleInputSchema = object({
|
|
14228
14534
|
name: string().min(1).max(200),
|
|
@@ -14283,7 +14589,13 @@ var NcRuleInputSchema = object({
|
|
|
14283
14589
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14284
14590
|
* shape as every other actuation.
|
|
14285
14591
|
*/
|
|
14286
|
-
actions: NcRuleActionsSchema.optional()
|
|
14592
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14593
|
+
/**
|
|
14594
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14595
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14596
|
+
* did, and absent is the only way to say that without a migration.
|
|
14597
|
+
*/
|
|
14598
|
+
confirm: NcConfirmSchema.optional()
|
|
14287
14599
|
});
|
|
14288
14600
|
/**
|
|
14289
14601
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14294,7 +14606,37 @@ var NcRuleInputSchema = object({
|
|
|
14294
14606
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14295
14607
|
* `updateRule` patch.
|
|
14296
14608
|
*/
|
|
14297
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14609
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14610
|
+
disabledTargetIds: array(string()).optional(),
|
|
14611
|
+
/**
|
|
14612
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14613
|
+
*
|
|
14614
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14615
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14616
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14617
|
+
* one — which made every partial edit destructive:
|
|
14618
|
+
*
|
|
14619
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14620
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14621
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14622
|
+
*
|
|
14623
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14624
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14625
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14626
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14627
|
+
* within a minute of a two-field patch.
|
|
14628
|
+
*
|
|
14629
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14630
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14631
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14632
|
+
* absent key is now genuinely absent.
|
|
14633
|
+
*/
|
|
14634
|
+
enabled: boolean().optional(),
|
|
14635
|
+
conditions: NcConditionsSchema.optional(),
|
|
14636
|
+
media: NcMediaPolicySchema.optional(),
|
|
14637
|
+
throttle: NcThrottleSchema.optional(),
|
|
14638
|
+
priority: number().int().min(1).max(5).optional()
|
|
14639
|
+
});
|
|
14298
14640
|
/** A persisted rule. */
|
|
14299
14641
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14300
14642
|
id: string(),
|
|
@@ -14595,6 +14937,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14595
14937
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14596
14938
|
* copy would lie the first time a rule is disabled.
|
|
14597
14939
|
*/
|
|
14940
|
+
/**
|
|
14941
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
14942
|
+
*
|
|
14943
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
14944
|
+
* per-camera notification switch the Notification Center already owns,
|
|
14945
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
14946
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
14947
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
14948
|
+
* with the switches the operator actually used.
|
|
14949
|
+
*/
|
|
14950
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
14951
|
+
"muted",
|
|
14952
|
+
"detection-off",
|
|
14953
|
+
"offline"
|
|
14954
|
+
]);
|
|
14955
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
14956
|
+
deviceId: number().int(),
|
|
14957
|
+
reason: NcAlarmSkipReasonSchema
|
|
14958
|
+
});
|
|
14598
14959
|
var NcAlarmModeCoverageSchema = object({
|
|
14599
14960
|
mode: AlarmArmModeSchema,
|
|
14600
14961
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14602,7 +14963,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14602
14963
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14603
14964
|
allDevices: boolean(),
|
|
14604
14965
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14605
|
-
deviceIds: array(number().int())
|
|
14966
|
+
deviceIds: array(number().int()),
|
|
14967
|
+
/**
|
|
14968
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
14969
|
+
* excludes it.
|
|
14970
|
+
*
|
|
14971
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
14972
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
14973
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
14974
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
14975
|
+
* alarm tab.
|
|
14976
|
+
*/
|
|
14977
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14606
14978
|
});
|
|
14607
14979
|
var NcAlarmConfigSchema = object({
|
|
14608
14980
|
/**
|
|
@@ -15965,13 +16337,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15965
16337
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
15966
16338
|
kind: "mutation",
|
|
15967
16339
|
auth: "admin"
|
|
15968
|
-
}), method(
|
|
16340
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
15969
16341
|
kind: "mutation",
|
|
15970
16342
|
auth: "admin"
|
|
15971
|
-
}), method(object({
|
|
15972
|
-
kind: "
|
|
16343
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16344
|
+
kind: "mutation",
|
|
15973
16345
|
auth: "admin"
|
|
15974
|
-
}), method(
|
|
16346
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16347
|
+
kind: "mutation",
|
|
16348
|
+
auth: "admin"
|
|
16349
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16350
|
+
kind: "mutation",
|
|
16351
|
+
auth: "admin"
|
|
16352
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
15975
16353
|
kind: "mutation",
|
|
15976
16354
|
auth: "admin"
|
|
15977
16355
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17395,9 +17773,16 @@ var CameraStatusSchema = object({
|
|
|
17395
17773
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17396
17774
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17397
17775
|
/**
|
|
17398
|
-
* Per-camera
|
|
17776
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17399
17777
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17400
17778
|
*
|
|
17779
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17780
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17781
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17782
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17783
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17784
|
+
* the difference between a camera being off and a camera being dead.
|
|
17785
|
+
*
|
|
17401
17786
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17402
17787
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17403
17788
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17468,7 +17853,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17468
17853
|
reachable: boolean(),
|
|
17469
17854
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17470
17855
|
});
|
|
17471
|
-
method(object({
|
|
17856
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17857
|
+
kind: "mutation",
|
|
17858
|
+
auth: "admin"
|
|
17859
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17860
|
+
kind: "mutation",
|
|
17861
|
+
auth: "admin"
|
|
17862
|
+
}), method(object({
|
|
17472
17863
|
deviceId: number(),
|
|
17473
17864
|
agentNodeId: string()
|
|
17474
17865
|
}), object({ success: literal(true) }), {
|
|
@@ -18142,6 +18533,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18142
18533
|
locationId: string(),
|
|
18143
18534
|
targetBytes: number().int().positive()
|
|
18144
18535
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18536
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18537
|
+
kind: "mutation",
|
|
18538
|
+
auth: "admin"
|
|
18539
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18540
|
+
kind: "mutation",
|
|
18541
|
+
auth: "admin"
|
|
18542
|
+
});
|
|
18145
18543
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18146
18544
|
providerId: string().min(1),
|
|
18147
18545
|
displayName: string().min(1),
|
|
@@ -18245,6 +18643,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18245
18643
|
label: string(),
|
|
18246
18644
|
description: string().optional()
|
|
18247
18645
|
});
|
|
18646
|
+
/**
|
|
18647
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18648
|
+
* an instance declares a camera.
|
|
18649
|
+
*/
|
|
18650
|
+
var TerminalInstanceInfoSchema = object({
|
|
18651
|
+
instanceId: string(),
|
|
18652
|
+
cameraStableId: string(),
|
|
18653
|
+
nodeId: string(),
|
|
18654
|
+
profileId: string(),
|
|
18655
|
+
profileLabel: string(),
|
|
18656
|
+
name: string(),
|
|
18657
|
+
enabled: boolean()
|
|
18658
|
+
});
|
|
18659
|
+
var TerminalLegacyCameraSchema = object({
|
|
18660
|
+
stableId: string(),
|
|
18661
|
+
nodeId: string(),
|
|
18662
|
+
profileId: string(),
|
|
18663
|
+
profileLabel: string(),
|
|
18664
|
+
name: string(),
|
|
18665
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18666
|
+
adoptable: boolean()
|
|
18667
|
+
});
|
|
18248
18668
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18249
18669
|
seq: number().int().positive(),
|
|
18250
18670
|
kind: literal("data"),
|
|
@@ -18261,7 +18681,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18261
18681
|
snapshot: string().optional(),
|
|
18262
18682
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18263
18683
|
});
|
|
18264
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18684
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18685
|
+
targetNodeId: string().min(1),
|
|
18686
|
+
profileId: string().min(1),
|
|
18687
|
+
name: string().trim().min(1).max(160).optional()
|
|
18688
|
+
}), TerminalInstanceInfoSchema, {
|
|
18689
|
+
kind: "mutation",
|
|
18690
|
+
auth: "admin"
|
|
18691
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18692
|
+
kind: "mutation",
|
|
18693
|
+
auth: "admin"
|
|
18694
|
+
}), method(object({
|
|
18695
|
+
instanceId: string().min(1),
|
|
18696
|
+
enabled: boolean()
|
|
18697
|
+
}), TerminalInstanceInfoSchema, {
|
|
18698
|
+
kind: "mutation",
|
|
18699
|
+
auth: "admin"
|
|
18700
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18701
|
+
stableId: string().min(1),
|
|
18702
|
+
name: string().trim().min(1).max(160).optional()
|
|
18703
|
+
}), TerminalInstanceInfoSchema, {
|
|
18704
|
+
kind: "mutation",
|
|
18705
|
+
auth: "admin"
|
|
18706
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18265
18707
|
profileId: string(),
|
|
18266
18708
|
cols: number().int().positive(),
|
|
18267
18709
|
rows: number().int().positive()
|
|
@@ -18278,7 +18720,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18278
18720
|
}), method(object({
|
|
18279
18721
|
sessionId: string(),
|
|
18280
18722
|
afterSeq: number().int().nonnegative(),
|
|
18281
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18723
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18724
|
+
/**
|
|
18725
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18726
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18727
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18728
|
+
*/
|
|
18729
|
+
waitForOutput: boolean().optional()
|
|
18282
18730
|
}), TerminalOutputBatchSchema, {
|
|
18283
18731
|
kind: "mutation",
|
|
18284
18732
|
auth: "admin",
|
|
@@ -20219,6 +20667,7 @@ var FaceInfoSchema = object({
|
|
|
20219
20667
|
var FaceFilterEnum = _enum([
|
|
20220
20668
|
"unassigned",
|
|
20221
20669
|
"recognized",
|
|
20670
|
+
"identified",
|
|
20222
20671
|
"all"
|
|
20223
20672
|
]);
|
|
20224
20673
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20247,6 +20696,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20247
20696
|
kind: "mutation",
|
|
20248
20697
|
auth: "admin"
|
|
20249
20698
|
}), method(object({
|
|
20699
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20700
|
+
deviceId: number().int().optional(),
|
|
20250
20701
|
limit: number().int().positive().optional(),
|
|
20251
20702
|
filter: FaceFilterEnum.optional(),
|
|
20252
20703
|
/**
|
|
@@ -22012,6 +22463,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22012
22463
|
capName: string().min(1).max(64),
|
|
22013
22464
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22014
22465
|
valuePath: string().min(1).max(64)
|
|
22466
|
+
}),
|
|
22467
|
+
object({
|
|
22468
|
+
kind: literal("latest-recognition"),
|
|
22469
|
+
recognition: _enum(["person", "plate"])
|
|
22015
22470
|
})
|
|
22016
22471
|
]);
|
|
22017
22472
|
var OsdSlotBindingSchema = object({
|
|
@@ -22117,6 +22572,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22117
22572
|
}), object({ success: literal(true) }), {
|
|
22118
22573
|
kind: "mutation",
|
|
22119
22574
|
auth: "admin"
|
|
22575
|
+
}), method(object({
|
|
22576
|
+
sourceDeviceId: number().int(),
|
|
22577
|
+
targetDeviceId: number().int()
|
|
22578
|
+
}), object({
|
|
22579
|
+
copied: number().int().nonnegative(),
|
|
22580
|
+
skipped: number().int().nonnegative()
|
|
22581
|
+
}), {
|
|
22582
|
+
kind: "mutation",
|
|
22583
|
+
auth: "admin"
|
|
22120
22584
|
}), method(object({
|
|
22121
22585
|
deviceId: number().int(),
|
|
22122
22586
|
slotId: string().min(1),
|
|
@@ -22827,7 +23291,19 @@ var RecordingManifestSchema = object({
|
|
|
22827
23291
|
* profiles/subtrees/locations on this node). */
|
|
22828
23292
|
var RecordingDeviceUsageSchema = object({
|
|
22829
23293
|
deviceId: number(),
|
|
22830
|
-
usedBytes: number()
|
|
23294
|
+
usedBytes: number(),
|
|
23295
|
+
/**
|
|
23296
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23297
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23298
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23299
|
+
*
|
|
23300
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23301
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23302
|
+
* field must keep validating that older provider's payload: the framework
|
|
23303
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23304
|
+
* the later of the two.
|
|
23305
|
+
*/
|
|
23306
|
+
oldestMs: number().nullable().optional()
|
|
22831
23307
|
});
|
|
22832
23308
|
/** Recording storage usage + capacity for one storage location. */
|
|
22833
23309
|
var RecordingLocationUsageSchema = object({
|
|
@@ -22855,6 +23331,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
22855
23331
|
locations: array(RecordingLocationUsageSchema)
|
|
22856
23332
|
});
|
|
22857
23333
|
/**
|
|
23334
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23335
|
+
*
|
|
23336
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23337
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23338
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23339
|
+
* location, run FIFO behind the single-flight mover.
|
|
23340
|
+
*
|
|
23341
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23342
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23343
|
+
* (empty on the plan).
|
|
23344
|
+
*/
|
|
23345
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23346
|
+
deviceId: number(),
|
|
23347
|
+
profile: string(),
|
|
23348
|
+
fromLocationId: string(),
|
|
23349
|
+
toLocationId: string(),
|
|
23350
|
+
bytes: number(),
|
|
23351
|
+
files: number().int()
|
|
23352
|
+
});
|
|
23353
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23354
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23355
|
+
* that had nothing to do. */
|
|
23356
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23357
|
+
"unassigned",
|
|
23358
|
+
"target-not-writable",
|
|
23359
|
+
"below-threshold",
|
|
23360
|
+
"no-headroom"
|
|
23361
|
+
]);
|
|
23362
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23363
|
+
deviceId: number(),
|
|
23364
|
+
profile: string(),
|
|
23365
|
+
fromLocationId: string(),
|
|
23366
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23367
|
+
toLocationId: string().nullable(),
|
|
23368
|
+
bytes: number(),
|
|
23369
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23370
|
+
});
|
|
23371
|
+
var RecordingRebalancePlanSchema = object({
|
|
23372
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23373
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23374
|
+
bytesToMove: number(),
|
|
23375
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23376
|
+
jobIds: array(string())
|
|
23377
|
+
});
|
|
23378
|
+
var RecordingRebalanceInputSchema = object({
|
|
23379
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23380
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23381
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23382
|
+
minMoveGb: number().min(0).optional()
|
|
23383
|
+
});
|
|
23384
|
+
/**
|
|
22858
23385
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22859
23386
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22860
23387
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23002,6 +23529,21 @@ method(object({
|
|
|
23002
23529
|
}), {
|
|
23003
23530
|
kind: "mutation",
|
|
23004
23531
|
auth: "admin"
|
|
23532
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23533
|
+
kind: "mutation",
|
|
23534
|
+
auth: "admin"
|
|
23535
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23536
|
+
kind: "mutation",
|
|
23537
|
+
auth: "admin"
|
|
23538
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23539
|
+
kind: "mutation",
|
|
23540
|
+
auth: "admin"
|
|
23541
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23542
|
+
kind: "mutation",
|
|
23543
|
+
auth: "admin"
|
|
23544
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23545
|
+
kind: "mutation",
|
|
23546
|
+
auth: "admin"
|
|
23005
23547
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23006
23548
|
kind: "mutation",
|
|
23007
23549
|
auth: "admin"
|
|
@@ -23011,9 +23553,15 @@ method(object({
|
|
|
23011
23553
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23012
23554
|
kind: "mutation",
|
|
23013
23555
|
auth: "admin"
|
|
23556
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23557
|
+
kind: "query",
|
|
23558
|
+
auth: "admin"
|
|
23559
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23560
|
+
kind: "mutation",
|
|
23561
|
+
auth: "admin"
|
|
23014
23562
|
});
|
|
23015
23563
|
/**
|
|
23016
|
-
* `
|
|
23564
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23017
23565
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23018
23566
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23019
23567
|
* delete-after-download.
|
|
@@ -23028,10 +23576,42 @@ method(object({
|
|
|
23028
23576
|
*/
|
|
23029
23577
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23030
23578
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23579
|
+
/**
|
|
23580
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23581
|
+
*
|
|
23582
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23583
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23584
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23585
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23586
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23587
|
+
*/
|
|
23588
|
+
var ExportDenseRangeSchema = object({
|
|
23589
|
+
fromSec: number().nonnegative(),
|
|
23590
|
+
toSec: number().nonnegative()
|
|
23591
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23592
|
+
/**
|
|
23593
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23594
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23595
|
+
*
|
|
23596
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23597
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23598
|
+
*/
|
|
23599
|
+
var ExportDenseSchema = object({
|
|
23600
|
+
everyMs: number().int().positive(),
|
|
23601
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23602
|
+
});
|
|
23031
23603
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23032
23604
|
var ExportTimelapseSchema = object({
|
|
23033
23605
|
everyMs: number().int().positive(),
|
|
23034
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23606
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23607
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23608
|
+
dense: ExportDenseSchema.optional()
|
|
23609
|
+
}).superRefine((v, ctx) => {
|
|
23610
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23611
|
+
code: ZodIssueCode.custom,
|
|
23612
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23613
|
+
path: ["dense", "everyMs"]
|
|
23614
|
+
});
|
|
23035
23615
|
});
|
|
23036
23616
|
/**
|
|
23037
23617
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23089,6 +23669,19 @@ var ExportDownloadSchema = object({
|
|
|
23089
23669
|
url: string(),
|
|
23090
23670
|
endpoints: array(string())
|
|
23091
23671
|
});
|
|
23672
|
+
/**
|
|
23673
|
+
* A finished export's bytes, inline.
|
|
23674
|
+
*
|
|
23675
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23676
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23677
|
+
*/
|
|
23678
|
+
var ExportBytesSchema = object({
|
|
23679
|
+
base64: string(),
|
|
23680
|
+
contentType: string(),
|
|
23681
|
+
/** Suggested filename, extension included. */
|
|
23682
|
+
name: string(),
|
|
23683
|
+
bytes: number().int().nonnegative()
|
|
23684
|
+
});
|
|
23092
23685
|
method(object({
|
|
23093
23686
|
deviceId: number(),
|
|
23094
23687
|
profile: string(),
|
|
@@ -23113,6 +23706,9 @@ method(object({
|
|
|
23113
23706
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23114
23707
|
kind: "query",
|
|
23115
23708
|
auth: "protected"
|
|
23709
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23710
|
+
kind: "query",
|
|
23711
|
+
auth: "protected"
|
|
23116
23712
|
});
|
|
23117
23713
|
/**
|
|
23118
23714
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27130,6 +27726,12 @@ Object.freeze({
|
|
|
27130
27726
|
addonId: null,
|
|
27131
27727
|
access: "delete"
|
|
27132
27728
|
},
|
|
27729
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27730
|
+
capName: "osd-manager",
|
|
27731
|
+
capScope: "system",
|
|
27732
|
+
addonId: null,
|
|
27733
|
+
access: "create"
|
|
27734
|
+
},
|
|
27133
27735
|
"osdManager.getConditionSupport": {
|
|
27134
27736
|
capName: "osd-manager",
|
|
27135
27737
|
capScope: "system",
|
|
@@ -27226,7 +27828,7 @@ Object.freeze({
|
|
|
27226
27828
|
addonId: null,
|
|
27227
27829
|
access: "create"
|
|
27228
27830
|
},
|
|
27229
|
-
"pipelineAnalytics.
|
|
27831
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27230
27832
|
capName: "pipeline-analytics",
|
|
27231
27833
|
capScope: "device",
|
|
27232
27834
|
addonId: null,
|
|
@@ -27298,12 +27900,6 @@ Object.freeze({
|
|
|
27298
27900
|
addonId: null,
|
|
27299
27901
|
access: "view"
|
|
27300
27902
|
},
|
|
27301
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27302
|
-
capName: "pipeline-analytics",
|
|
27303
|
-
capScope: "device",
|
|
27304
|
-
addonId: null,
|
|
27305
|
-
access: "view"
|
|
27306
|
-
},
|
|
27307
27903
|
"pipelineAnalytics.getMotionEvents": {
|
|
27308
27904
|
capName: "pipeline-analytics",
|
|
27309
27905
|
capScope: "device",
|
|
@@ -27340,6 +27936,12 @@ Object.freeze({
|
|
|
27340
27936
|
addonId: null,
|
|
27341
27937
|
access: "view"
|
|
27342
27938
|
},
|
|
27939
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
27940
|
+
capName: "pipeline-analytics",
|
|
27941
|
+
capScope: "device",
|
|
27942
|
+
addonId: null,
|
|
27943
|
+
access: "view"
|
|
27944
|
+
},
|
|
27343
27945
|
"pipelineAnalytics.getTrack": {
|
|
27344
27946
|
capName: "pipeline-analytics",
|
|
27345
27947
|
capScope: "device",
|
|
@@ -27418,6 +28020,12 @@ Object.freeze({
|
|
|
27418
28020
|
addonId: null,
|
|
27419
28021
|
access: "view"
|
|
27420
28022
|
},
|
|
28023
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28024
|
+
capName: "pipeline-analytics",
|
|
28025
|
+
capScope: "device",
|
|
28026
|
+
addonId: null,
|
|
28027
|
+
access: "create"
|
|
28028
|
+
},
|
|
27421
28029
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27422
28030
|
capName: "pipeline-analytics",
|
|
27423
28031
|
capScope: "device",
|
|
@@ -27448,7 +28056,7 @@ Object.freeze({
|
|
|
27448
28056
|
addonId: null,
|
|
27449
28057
|
access: "create"
|
|
27450
28058
|
},
|
|
27451
|
-
"pipelineAnalytics.
|
|
28059
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27452
28060
|
capName: "pipeline-analytics",
|
|
27453
28061
|
capScope: "device",
|
|
27454
28062
|
addonId: null,
|
|
@@ -27460,6 +28068,12 @@ Object.freeze({
|
|
|
27460
28068
|
addonId: null,
|
|
27461
28069
|
access: "create"
|
|
27462
28070
|
},
|
|
28071
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28072
|
+
capName: "pipeline-analytics",
|
|
28073
|
+
capScope: "device",
|
|
28074
|
+
addonId: null,
|
|
28075
|
+
access: "create"
|
|
28076
|
+
},
|
|
27463
28077
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27464
28078
|
capName: "pipeline-analytics",
|
|
27465
28079
|
capScope: "device",
|
|
@@ -27484,6 +28098,12 @@ Object.freeze({
|
|
|
27484
28098
|
addonId: null,
|
|
27485
28099
|
access: "create"
|
|
27486
28100
|
},
|
|
28101
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28102
|
+
capName: "pipeline-analytics",
|
|
28103
|
+
capScope: "device",
|
|
28104
|
+
addonId: null,
|
|
28105
|
+
access: "create"
|
|
28106
|
+
},
|
|
27487
28107
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27488
28108
|
capName: "pipeline-analytics",
|
|
27489
28109
|
capScope: "device",
|
|
@@ -27850,6 +28470,12 @@ Object.freeze({
|
|
|
27850
28470
|
addonId: null,
|
|
27851
28471
|
access: "view"
|
|
27852
28472
|
},
|
|
28473
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28474
|
+
capName: "pipeline-orchestrator",
|
|
28475
|
+
capScope: "system",
|
|
28476
|
+
addonId: null,
|
|
28477
|
+
access: "create"
|
|
28478
|
+
},
|
|
27853
28479
|
"pipelineOrchestrator.rebalance": {
|
|
27854
28480
|
capName: "pipeline-orchestrator",
|
|
27855
28481
|
capScope: "system",
|
|
@@ -27874,6 +28500,12 @@ Object.freeze({
|
|
|
27874
28500
|
addonId: null,
|
|
27875
28501
|
access: "view"
|
|
27876
28502
|
},
|
|
28503
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28504
|
+
capName: "pipeline-orchestrator",
|
|
28505
|
+
capScope: "system",
|
|
28506
|
+
addonId: null,
|
|
28507
|
+
access: "create"
|
|
28508
|
+
},
|
|
27877
28509
|
"pipelineOrchestrator.saveTemplate": {
|
|
27878
28510
|
capName: "pipeline-orchestrator",
|
|
27879
28511
|
capScope: "system",
|
|
@@ -28270,7 +28902,13 @@ Object.freeze({
|
|
|
28270
28902
|
addonId: null,
|
|
28271
28903
|
access: "create"
|
|
28272
28904
|
},
|
|
28273
|
-
"recording.
|
|
28905
|
+
"recording.cancelRelocateJob": {
|
|
28906
|
+
capName: "recording",
|
|
28907
|
+
capScope: "system",
|
|
28908
|
+
addonId: null,
|
|
28909
|
+
access: "create"
|
|
28910
|
+
},
|
|
28911
|
+
"recording.cancelStorageMigrationMove": {
|
|
28274
28912
|
capName: "recording",
|
|
28275
28913
|
capScope: "system",
|
|
28276
28914
|
addonId: null,
|
|
@@ -28306,7 +28944,7 @@ Object.freeze({
|
|
|
28306
28944
|
addonId: null,
|
|
28307
28945
|
access: "view"
|
|
28308
28946
|
},
|
|
28309
|
-
"recording.
|
|
28947
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28310
28948
|
capName: "recording",
|
|
28311
28949
|
capScope: "system",
|
|
28312
28950
|
addonId: null,
|
|
@@ -28324,12 +28962,30 @@ Object.freeze({
|
|
|
28324
28962
|
addonId: null,
|
|
28325
28963
|
access: "view"
|
|
28326
28964
|
},
|
|
28965
|
+
"recording.listRelocateJobs": {
|
|
28966
|
+
capName: "recording",
|
|
28967
|
+
capScope: "system",
|
|
28968
|
+
addonId: null,
|
|
28969
|
+
access: "view"
|
|
28970
|
+
},
|
|
28327
28971
|
"recording.locateSegment": {
|
|
28328
28972
|
capName: "recording",
|
|
28329
28973
|
capScope: "system",
|
|
28330
28974
|
addonId: null,
|
|
28331
28975
|
access: "view"
|
|
28332
28976
|
},
|
|
28977
|
+
"recording.pauseForStorageMigration": {
|
|
28978
|
+
capName: "recording",
|
|
28979
|
+
capScope: "system",
|
|
28980
|
+
addonId: null,
|
|
28981
|
+
access: "create"
|
|
28982
|
+
},
|
|
28983
|
+
"recording.planStorageRebalance": {
|
|
28984
|
+
capName: "recording",
|
|
28985
|
+
capScope: "system",
|
|
28986
|
+
addonId: null,
|
|
28987
|
+
access: "view"
|
|
28988
|
+
},
|
|
28333
28989
|
"recording.pruneFootage": {
|
|
28334
28990
|
capName: "recording",
|
|
28335
28991
|
capScope: "system",
|
|
@@ -28348,6 +29004,12 @@ Object.freeze({
|
|
|
28348
29004
|
addonId: null,
|
|
28349
29005
|
access: "view"
|
|
28350
29006
|
},
|
|
29007
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29008
|
+
capName: "recording",
|
|
29009
|
+
capScope: "system",
|
|
29010
|
+
addonId: null,
|
|
29011
|
+
access: "create"
|
|
29012
|
+
},
|
|
28351
29013
|
"recording.relocateFootage": {
|
|
28352
29014
|
capName: "recording",
|
|
28353
29015
|
capScope: "system",
|
|
@@ -28372,44 +29034,68 @@ Object.freeze({
|
|
|
28372
29034
|
addonId: null,
|
|
28373
29035
|
access: "create"
|
|
28374
29036
|
},
|
|
29037
|
+
"recording.resumeForStorageMigration": {
|
|
29038
|
+
capName: "recording",
|
|
29039
|
+
capScope: "system",
|
|
29040
|
+
addonId: null,
|
|
29041
|
+
access: "create"
|
|
29042
|
+
},
|
|
28375
29043
|
"recording.setDeviceConfig": {
|
|
28376
29044
|
capName: "recording",
|
|
28377
29045
|
capScope: "system",
|
|
28378
29046
|
addonId: null,
|
|
28379
29047
|
access: "create"
|
|
28380
29048
|
},
|
|
29049
|
+
"recording.startStorageMigrationMove": {
|
|
29050
|
+
capName: "recording",
|
|
29051
|
+
capScope: "system",
|
|
29052
|
+
addonId: null,
|
|
29053
|
+
access: "create"
|
|
29054
|
+
},
|
|
29055
|
+
"recording.startStorageRebalance": {
|
|
29056
|
+
capName: "recording",
|
|
29057
|
+
capScope: "system",
|
|
29058
|
+
addonId: null,
|
|
29059
|
+
access: "create"
|
|
29060
|
+
},
|
|
28381
29061
|
"recordingExport.cancelExport": {
|
|
28382
|
-
capName: "
|
|
29062
|
+
capName: "recording-export",
|
|
28383
29063
|
capScope: "system",
|
|
28384
29064
|
addonId: null,
|
|
28385
29065
|
access: "create"
|
|
28386
29066
|
},
|
|
28387
29067
|
"recordingExport.createExport": {
|
|
28388
|
-
capName: "
|
|
29068
|
+
capName: "recording-export",
|
|
28389
29069
|
capScope: "system",
|
|
28390
29070
|
addonId: null,
|
|
28391
29071
|
access: "create"
|
|
28392
29072
|
},
|
|
28393
29073
|
"recordingExport.deleteExport": {
|
|
28394
|
-
capName: "
|
|
29074
|
+
capName: "recording-export",
|
|
28395
29075
|
capScope: "system",
|
|
28396
29076
|
addonId: null,
|
|
28397
29077
|
access: "delete"
|
|
28398
29078
|
},
|
|
28399
29079
|
"recordingExport.getDownloadUrl": {
|
|
28400
|
-
capName: "
|
|
29080
|
+
capName: "recording-export",
|
|
28401
29081
|
capScope: "system",
|
|
28402
29082
|
addonId: null,
|
|
28403
29083
|
access: "view"
|
|
28404
29084
|
},
|
|
28405
29085
|
"recordingExport.getExport": {
|
|
28406
|
-
capName: "
|
|
29086
|
+
capName: "recording-export",
|
|
28407
29087
|
capScope: "system",
|
|
28408
29088
|
addonId: null,
|
|
28409
29089
|
access: "view"
|
|
28410
29090
|
},
|
|
28411
29091
|
"recordingExport.listExports": {
|
|
28412
|
-
capName: "
|
|
29092
|
+
capName: "recording-export",
|
|
29093
|
+
capScope: "system",
|
|
29094
|
+
addonId: null,
|
|
29095
|
+
access: "view"
|
|
29096
|
+
},
|
|
29097
|
+
"recordingExport.readExportBytes": {
|
|
29098
|
+
capName: "recording-export",
|
|
28413
29099
|
capScope: "system",
|
|
28414
29100
|
addonId: null,
|
|
28415
29101
|
access: "view"
|
|
@@ -28768,6 +29454,30 @@ Object.freeze({
|
|
|
28768
29454
|
addonId: null,
|
|
28769
29455
|
access: "view"
|
|
28770
29456
|
},
|
|
29457
|
+
"storageMigration.cancel": {
|
|
29458
|
+
capName: "storage-migration",
|
|
29459
|
+
capScope: "system",
|
|
29460
|
+
addonId: null,
|
|
29461
|
+
access: "create"
|
|
29462
|
+
},
|
|
29463
|
+
"storageMigration.plan": {
|
|
29464
|
+
capName: "storage-migration",
|
|
29465
|
+
capScope: "system",
|
|
29466
|
+
addonId: null,
|
|
29467
|
+
access: "view"
|
|
29468
|
+
},
|
|
29469
|
+
"storageMigration.start": {
|
|
29470
|
+
capName: "storage-migration",
|
|
29471
|
+
capScope: "system",
|
|
29472
|
+
addonId: null,
|
|
29473
|
+
access: "create"
|
|
29474
|
+
},
|
|
29475
|
+
"storageMigration.status": {
|
|
29476
|
+
capName: "storage-migration",
|
|
29477
|
+
capScope: "system",
|
|
29478
|
+
addonId: null,
|
|
29479
|
+
access: "view"
|
|
29480
|
+
},
|
|
28771
29481
|
"storageProvider.abortUpload": {
|
|
28772
29482
|
capName: "storage-provider",
|
|
28773
29483
|
capScope: "system",
|
|
@@ -29146,12 +29856,42 @@ Object.freeze({
|
|
|
29146
29856
|
addonId: null,
|
|
29147
29857
|
access: "create"
|
|
29148
29858
|
},
|
|
29859
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29860
|
+
capName: "terminal-session",
|
|
29861
|
+
capScope: "system",
|
|
29862
|
+
addonId: null,
|
|
29863
|
+
access: "create"
|
|
29864
|
+
},
|
|
29149
29865
|
"terminalSession.close": {
|
|
29150
29866
|
capName: "terminal-session",
|
|
29151
29867
|
capScope: "system",
|
|
29152
29868
|
addonId: null,
|
|
29153
29869
|
access: "create"
|
|
29154
29870
|
},
|
|
29871
|
+
"terminalSession.createInstance": {
|
|
29872
|
+
capName: "terminal-session",
|
|
29873
|
+
capScope: "system",
|
|
29874
|
+
addonId: null,
|
|
29875
|
+
access: "create"
|
|
29876
|
+
},
|
|
29877
|
+
"terminalSession.deleteInstance": {
|
|
29878
|
+
capName: "terminal-session",
|
|
29879
|
+
capScope: "system",
|
|
29880
|
+
addonId: null,
|
|
29881
|
+
access: "delete"
|
|
29882
|
+
},
|
|
29883
|
+
"terminalSession.listInstances": {
|
|
29884
|
+
capName: "terminal-session",
|
|
29885
|
+
capScope: "system",
|
|
29886
|
+
addonId: null,
|
|
29887
|
+
access: "view"
|
|
29888
|
+
},
|
|
29889
|
+
"terminalSession.listLegacyCameras": {
|
|
29890
|
+
capName: "terminal-session",
|
|
29891
|
+
capScope: "system",
|
|
29892
|
+
addonId: null,
|
|
29893
|
+
access: "view"
|
|
29894
|
+
},
|
|
29155
29895
|
"terminalSession.listProfiles": {
|
|
29156
29896
|
capName: "terminal-session",
|
|
29157
29897
|
capScope: "system",
|
|
@@ -29182,6 +29922,12 @@ Object.freeze({
|
|
|
29182
29922
|
addonId: null,
|
|
29183
29923
|
access: "create"
|
|
29184
29924
|
},
|
|
29925
|
+
"terminalSession.setInstanceEnabled": {
|
|
29926
|
+
capName: "terminal-session",
|
|
29927
|
+
capScope: "system",
|
|
29928
|
+
addonId: null,
|
|
29929
|
+
access: "create"
|
|
29930
|
+
},
|
|
29185
29931
|
"terminalSession.writeInput": {
|
|
29186
29932
|
capName: "terminal-session",
|
|
29187
29933
|
capScope: "system",
|
|
@@ -29726,6 +30472,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29726
30472
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29727
30473
|
var PriorityField = number().int().min(1).max(5);
|
|
29728
30474
|
/**
|
|
30475
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30476
|
+
*
|
|
30477
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30478
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30479
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30480
|
+
*
|
|
30481
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30482
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30483
|
+
*
|
|
30484
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30485
|
+
*
|
|
30486
|
+
* 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.
|
|
30487
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30488
|
+
* and therefore the length of a quiet night, does not move.
|
|
30489
|
+
*
|
|
30490
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30491
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30492
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30493
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30494
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30495
|
+
*/
|
|
30496
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30497
|
+
/**
|
|
30498
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30499
|
+
*
|
|
30500
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30501
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30502
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30503
|
+
* that range every ~583 ms.
|
|
30504
|
+
*
|
|
30505
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30506
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30507
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30508
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30509
|
+
* schema change and are the tracked follow-up.
|
|
30510
|
+
*
|
|
30511
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30512
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30513
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30514
|
+
* happened.
|
|
30515
|
+
*/
|
|
30516
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30517
|
+
/**
|
|
30518
|
+
* Caption burned into the notification's preview frame.
|
|
30519
|
+
*
|
|
30520
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30521
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30522
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30523
|
+
*
|
|
30524
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30525
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30526
|
+
* the reason this is not `.min(1)`.
|
|
30527
|
+
*/
|
|
30528
|
+
var PreviewTextField = string().max(200);
|
|
30529
|
+
/**
|
|
30530
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30531
|
+
*
|
|
30532
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30533
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30534
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30535
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30536
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30537
|
+
* them.
|
|
30538
|
+
*
|
|
30539
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30540
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30541
|
+
* paying that on the deploy that shipped it.
|
|
30542
|
+
*
|
|
30543
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30544
|
+
*/
|
|
30545
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30546
|
+
/**
|
|
30547
|
+
* Which detection classes the notification reports counts for.
|
|
30548
|
+
*
|
|
30549
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30550
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30551
|
+
* class the window actually contained", which is what an operator who never
|
|
30552
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30553
|
+
* counts cars all night).
|
|
30554
|
+
*
|
|
30555
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30556
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30557
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30558
|
+
* not emit.
|
|
30559
|
+
*
|
|
30560
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30561
|
+
* - `{{detections}}` — total over the reported classes
|
|
30562
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30563
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30564
|
+
* one per class, `count_` + the class name
|
|
30565
|
+
*
|
|
30566
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30567
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30568
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30569
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30570
|
+
*/
|
|
30571
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30572
|
+
/**
|
|
29729
30573
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29730
30574
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29731
30575
|
* here (see the ownership note above).
|
|
@@ -29745,9 +30589,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29745
30589
|
cadenceSec: CadenceSecField.default(15),
|
|
29746
30590
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29747
30591
|
framerate: FramerateField.default(10),
|
|
30592
|
+
/**
|
|
30593
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30594
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30595
|
+
* field gets.
|
|
30596
|
+
*/
|
|
30597
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30598
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30599
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29748
30600
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29749
30601
|
targets: TargetsField,
|
|
29750
30602
|
template: TimelapseTemplateSchema.optional(),
|
|
30603
|
+
/**
|
|
30604
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30605
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30606
|
+
*
|
|
30607
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30608
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30609
|
+
* silently clear the caption too.
|
|
30610
|
+
*/
|
|
30611
|
+
previewText: PreviewTextField.optional(),
|
|
30612
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30613
|
+
previewMode: PreviewModeField.default("image"),
|
|
30614
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30615
|
+
reportClasses: ReportClassesField.optional(),
|
|
29751
30616
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29752
30617
|
priority: PriorityField.default(3)
|
|
29753
30618
|
});
|
|
@@ -29758,8 +30623,13 @@ object({
|
|
|
29758
30623
|
schedule: NcScheduleSchema.optional(),
|
|
29759
30624
|
cadenceSec: CadenceSecField.optional(),
|
|
29760
30625
|
framerate: FramerateField.optional(),
|
|
30626
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30627
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29761
30628
|
targets: TargetsField.optional(),
|
|
29762
30629
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30630
|
+
previewText: PreviewTextField.optional(),
|
|
30631
|
+
previewMode: PreviewModeField.optional(),
|
|
30632
|
+
reportClasses: ReportClassesField.optional(),
|
|
29763
30633
|
priority: PriorityField.optional()
|
|
29764
30634
|
});
|
|
29765
30635
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29771,10 +30641,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29771
30641
|
*/
|
|
29772
30642
|
ownerUserId: string().optional(),
|
|
29773
30643
|
/**
|
|
29774
|
-
* Epoch-ms of the
|
|
29775
|
-
*
|
|
30644
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30645
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30646
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29776
30647
|
*/
|
|
29777
30648
|
lastGeneratedAt: number().optional(),
|
|
30649
|
+
/**
|
|
30650
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30651
|
+
* re-generation guard's real durable state.
|
|
30652
|
+
*
|
|
30653
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30654
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30655
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30656
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30657
|
+
* come back.
|
|
30658
|
+
*
|
|
30659
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30660
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30661
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30662
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30663
|
+
* once, on the deploy that shipped the map.
|
|
30664
|
+
*/
|
|
30665
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29778
30666
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29779
30667
|
createdBy: string(),
|
|
29780
30668
|
createdAt: number(),
|
|
@@ -29907,7 +30795,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
29907
30795
|
capability: adminUiCapability,
|
|
29908
30796
|
provider: {
|
|
29909
30797
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
29910
|
-
getVersion: async () => ({ version: "1.2.
|
|
30798
|
+
getVersion: async () => ({ version: "1.2.14" })
|
|
29911
30799
|
}
|
|
29912
30800
|
}];
|
|
29913
30801
|
}
|