@camstack/addon-smtp-nodemailer 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/smtp.addon.js +936 -48
- package/dist/smtp.addon.mjs +936 -48
- package/package.json +1 -1
package/dist/smtp.addon.mjs
CHANGED
|
@@ -7224,8 +7224,31 @@ var AdoptionJobSchema = object({
|
|
|
7224
7224
|
error: string().nullable()
|
|
7225
7225
|
});
|
|
7226
7226
|
/**
|
|
7227
|
-
* Per-camera FUNCTION SWITCHES
|
|
7228
|
-
*
|
|
7227
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7228
|
+
*
|
|
7229
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7230
|
+
*
|
|
7231
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7232
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7233
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7234
|
+
* every function already had a settings page of its own, and a second place to
|
|
7235
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7236
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7237
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7238
|
+
* (which was always first-class; the switch was a veneer over
|
|
7239
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7240
|
+
* per-device setting, the two camera planes to their own components.
|
|
7241
|
+
*
|
|
7242
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7243
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7244
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7245
|
+
* never about a control panel.
|
|
7246
|
+
*
|
|
7247
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7248
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7249
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7250
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7251
|
+
* stop; nothing new may be built on it.
|
|
7229
7252
|
*
|
|
7230
7253
|
* ## This file adds no state
|
|
7231
7254
|
*
|
|
@@ -7570,14 +7593,21 @@ var RecordingConfigSchema = object({
|
|
|
7570
7593
|
/**
|
|
7571
7594
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7572
7595
|
*
|
|
7573
|
-
* One shape shared by the recorder
|
|
7574
|
-
*
|
|
7575
|
-
*
|
|
7576
|
-
*
|
|
7577
|
-
*
|
|
7578
|
-
|
|
7596
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7597
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7598
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7599
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7600
|
+
* addon surface.
|
|
7601
|
+
*/
|
|
7602
|
+
/**
|
|
7603
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7604
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7605
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7606
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7607
|
+
* runs at all.
|
|
7579
7608
|
*/
|
|
7580
7609
|
var RelocateJobStateSchema = _enum([
|
|
7610
|
+
"queued",
|
|
7581
7611
|
"running",
|
|
7582
7612
|
"done",
|
|
7583
7613
|
"failed",
|
|
@@ -7602,19 +7632,109 @@ var RelocateJobSchema = object({
|
|
|
7602
7632
|
finishedAt: number().nullable(),
|
|
7603
7633
|
error: string().nullable()
|
|
7604
7634
|
});
|
|
7635
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7636
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7637
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7605
7638
|
var RelocateFootageInputSchema = object({
|
|
7606
|
-
deviceId: number().optional(),
|
|
7607
7639
|
fromLocationId: string(),
|
|
7608
7640
|
toLocationId: string(),
|
|
7609
7641
|
entities: array(_enum(["segments"])).optional(),
|
|
7642
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7643
|
+
* pre-orchestration compatibility path. */
|
|
7644
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7645
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7646
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7647
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7648
|
+
deviceId: number().int().optional(),
|
|
7649
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7650
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7651
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7652
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7653
|
+
profiles: array(string()).optional(),
|
|
7610
7654
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7611
7655
|
* never allowed to starve live writers. */
|
|
7612
7656
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7613
7657
|
});
|
|
7614
|
-
|
|
7615
|
-
|
|
7658
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7659
|
+
* from persistent recording settings: a migration never changes
|
|
7660
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7661
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7662
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7663
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7616
7664
|
toLocationId: string(),
|
|
7617
7665
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7666
|
+
}).extend({ leaseId: string().min(1) });
|
|
7667
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7668
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7669
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7670
|
+
var StorageMigrationClassSchema = _enum([
|
|
7671
|
+
"recordings",
|
|
7672
|
+
"recordingsLow",
|
|
7673
|
+
"eventMedia"
|
|
7674
|
+
]);
|
|
7675
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7676
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7677
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7678
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7679
|
+
recordings: string().min(1).optional(),
|
|
7680
|
+
recordingsLow: string().min(1).optional(),
|
|
7681
|
+
eventMedia: string().min(1).optional()
|
|
7682
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7683
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7684
|
+
var StorageMigrationInputSchema = object({
|
|
7685
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7686
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7687
|
+
});
|
|
7688
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7689
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7690
|
+
* verified. */
|
|
7691
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7692
|
+
"planning",
|
|
7693
|
+
"pausing",
|
|
7694
|
+
"moving",
|
|
7695
|
+
"verifying",
|
|
7696
|
+
"repointing",
|
|
7697
|
+
"refreshing",
|
|
7698
|
+
"resuming",
|
|
7699
|
+
"done",
|
|
7700
|
+
"failed",
|
|
7701
|
+
"cancelled"
|
|
7702
|
+
]);
|
|
7703
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7704
|
+
"pipeline",
|
|
7705
|
+
"recorder",
|
|
7706
|
+
"analytics"
|
|
7707
|
+
]);
|
|
7708
|
+
var StorageMigrationMoveSchema = object({
|
|
7709
|
+
storageClass: StorageMigrationClassSchema,
|
|
7710
|
+
fromLocationId: string(),
|
|
7711
|
+
toLocationId: string(),
|
|
7712
|
+
moverJobId: string().nullable(),
|
|
7713
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7714
|
+
error: string().nullable()
|
|
7715
|
+
});
|
|
7716
|
+
var StorageMigrationJobSchema = object({
|
|
7717
|
+
jobId: string(),
|
|
7718
|
+
phase: StorageMigrationPhaseSchema,
|
|
7719
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7720
|
+
throttleMbps: number(),
|
|
7721
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7722
|
+
pauseLeaseId: string().nullable(),
|
|
7723
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7724
|
+
repointed: boolean(),
|
|
7725
|
+
cancelRequested: boolean(),
|
|
7726
|
+
startedAt: number(),
|
|
7727
|
+
updatedAt: number(),
|
|
7728
|
+
finishedAt: number().nullable(),
|
|
7729
|
+
error: string().nullable()
|
|
7730
|
+
});
|
|
7731
|
+
var StorageMigrationPlanSchema = object({
|
|
7732
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7733
|
+
moves: array(object({
|
|
7734
|
+
storageClass: StorageMigrationClassSchema,
|
|
7735
|
+
fromLocationId: string(),
|
|
7736
|
+
toLocationId: string()
|
|
7737
|
+
}))
|
|
7618
7738
|
});
|
|
7619
7739
|
/**
|
|
7620
7740
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7666,6 +7786,21 @@ var StorageLocationSchema = object({
|
|
|
7666
7786
|
nodeId: string().optional(),
|
|
7667
7787
|
isDefault: boolean().default(false),
|
|
7668
7788
|
isSystem: boolean().default(false),
|
|
7789
|
+
/**
|
|
7790
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7791
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7792
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7793
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7794
|
+
* extended to add the next consumer.
|
|
7795
|
+
*
|
|
7796
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7797
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7798
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7799
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7800
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7801
|
+
* always stamped `true`.
|
|
7802
|
+
*/
|
|
7803
|
+
enabled: boolean().optional(),
|
|
7669
7804
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7670
7805
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7671
7806
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -11968,7 +12103,8 @@ method(object({
|
|
|
11968
12103
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
11969
12104
|
/**
|
|
11970
12105
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
11971
|
-
* filesystem
|
|
12106
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12107
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
11972
12108
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
11973
12109
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
11974
12110
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13781,6 +13917,13 @@ var MaskGridDimsSchema = object({
|
|
|
13781
13917
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13782
13918
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13783
13919
|
* one trigger.
|
|
13920
|
+
*
|
|
13921
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13922
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13923
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13924
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13925
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13926
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13784
13927
|
*/
|
|
13785
13928
|
var NcDeliverySchema = _enum([
|
|
13786
13929
|
"immediate",
|
|
@@ -13795,15 +13938,32 @@ var NcDeliverySchema = _enum([
|
|
|
13795
13938
|
* depend on a provider's raw event name or payload shape.
|
|
13796
13939
|
*/
|
|
13797
13940
|
var NcSystemEventKindSchema = _enum([
|
|
13798
|
-
"
|
|
13799
|
-
"
|
|
13941
|
+
"device-online",
|
|
13942
|
+
"device-offline",
|
|
13943
|
+
"device-disabled",
|
|
13944
|
+
"device-enabled",
|
|
13800
13945
|
"stream-online",
|
|
13801
13946
|
"stream-offline",
|
|
13802
13947
|
"node-online",
|
|
13803
13948
|
"node-offline",
|
|
13804
13949
|
"addon-update-available",
|
|
13805
|
-
"server-update-available"
|
|
13950
|
+
"server-update-available",
|
|
13951
|
+
"alarm-triggered",
|
|
13952
|
+
"alarm-armed",
|
|
13953
|
+
"alarm-disarmed",
|
|
13954
|
+
"camera-online",
|
|
13955
|
+
"camera-offline",
|
|
13956
|
+
"camera-disabled",
|
|
13957
|
+
"camera-enabled"
|
|
13958
|
+
]);
|
|
13959
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13960
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13961
|
+
"camera-online",
|
|
13962
|
+
"camera-offline",
|
|
13963
|
+
"camera-disabled",
|
|
13964
|
+
"camera-enabled"
|
|
13806
13965
|
]);
|
|
13966
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13807
13967
|
/**
|
|
13808
13968
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13809
13969
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13812,6 +13972,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13812
13972
|
var NcSystemEventConditionSchema = object({
|
|
13813
13973
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13814
13974
|
deviceIds: array(number().int()).min(1).optional(),
|
|
13975
|
+
/**
|
|
13976
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
13977
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
13978
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
13979
|
+
*
|
|
13980
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
13981
|
+
* one reason: the intake cannot know which devices this household cares
|
|
13982
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
13983
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
13984
|
+
* does not carry) matches no `deviceTypes` list.
|
|
13985
|
+
*/
|
|
13986
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13815
13987
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13816
13988
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13817
13989
|
});
|
|
@@ -13862,6 +14034,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13862
14034
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13863
14035
|
});
|
|
13864
14036
|
/**
|
|
14037
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14038
|
+
*
|
|
14039
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14040
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14041
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14042
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14043
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14044
|
+
*
|
|
14045
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14046
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14047
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14048
|
+
*
|
|
14049
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14050
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14051
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14052
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14053
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14054
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14055
|
+
* ZodEffects the cap path would have to special-case).
|
|
14056
|
+
*
|
|
14057
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14058
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14059
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14060
|
+
* `samplingSeconds` decorative.
|
|
14061
|
+
*
|
|
14062
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14063
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14064
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14065
|
+
* an operator who typed `dog` mean the same thing.
|
|
14066
|
+
*/
|
|
14067
|
+
var NcAudioConditionSchema = object({
|
|
14068
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14069
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14070
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14071
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14072
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14073
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14074
|
+
/** Length of the sampling window in seconds. */
|
|
14075
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14076
|
+
});
|
|
14077
|
+
/**
|
|
13865
14078
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13866
14079
|
*
|
|
13867
14080
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14134,7 +14347,33 @@ var NcConditionsSchema = object({
|
|
|
14134
14347
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14135
14348
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14136
14349
|
*/
|
|
14137
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14350
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14351
|
+
/**
|
|
14352
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14353
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14354
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14355
|
+
* a window that is not full yet, neither filter given). See
|
|
14356
|
+
* {@link NcAudioCondition}.
|
|
14357
|
+
*
|
|
14358
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14359
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14360
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14361
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14362
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14363
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14364
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14365
|
+
*
|
|
14366
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14367
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14368
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14369
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14370
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14371
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14372
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14373
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14374
|
+
* does an audio rule become authorable.
|
|
14375
|
+
*/
|
|
14376
|
+
audio: NcAudioConditionSchema.optional()
|
|
14138
14377
|
});
|
|
14139
14378
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14140
14379
|
var NcRuleTargetSchema = object({
|
|
@@ -14248,6 +14487,73 @@ var NcThrottleSchema = object({
|
|
|
14248
14487
|
*/
|
|
14249
14488
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14250
14489
|
});
|
|
14490
|
+
/**
|
|
14491
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14492
|
+
* it judges may be.
|
|
14493
|
+
*
|
|
14494
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14495
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14496
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14497
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14498
|
+
* tokens for pixels the model pools away.
|
|
14499
|
+
*/
|
|
14500
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14501
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14502
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14503
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14504
|
+
var NcConfirmExpectSchema = object({
|
|
14505
|
+
op: _enum([
|
|
14506
|
+
">=",
|
|
14507
|
+
">",
|
|
14508
|
+
"<=",
|
|
14509
|
+
"<",
|
|
14510
|
+
"=="
|
|
14511
|
+
]),
|
|
14512
|
+
count: number().int().min(0).max(1e3)
|
|
14513
|
+
});
|
|
14514
|
+
/**
|
|
14515
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14516
|
+
* to ship and says whether it agrees with the rule.
|
|
14517
|
+
*
|
|
14518
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14519
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14520
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14521
|
+
*
|
|
14522
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14523
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14524
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14525
|
+
* open looks in the log exactly like a gate that works.
|
|
14526
|
+
*
|
|
14527
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14528
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14529
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14530
|
+
* above rather than trusting a parse it may never have seen.
|
|
14531
|
+
*/
|
|
14532
|
+
var NcConfirmSchema = object({
|
|
14533
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14534
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14535
|
+
enabled: boolean().default(false),
|
|
14536
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14537
|
+
profileId: string().optional(),
|
|
14538
|
+
/**
|
|
14539
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14540
|
+
* from the rule (its class and its expectation).
|
|
14541
|
+
*
|
|
14542
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14543
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14544
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14545
|
+
* turn and only rule-authored words land here.
|
|
14546
|
+
*/
|
|
14547
|
+
prompt: string().max(1e3).optional(),
|
|
14548
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14549
|
+
* own boolean verdict decides. */
|
|
14550
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14551
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14552
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14553
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14554
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14555
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14556
|
+
});
|
|
14251
14557
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14252
14558
|
var NcRuleInputSchema = object({
|
|
14253
14559
|
name: string().min(1).max(200),
|
|
@@ -14308,7 +14614,13 @@ var NcRuleInputSchema = object({
|
|
|
14308
14614
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14309
14615
|
* shape as every other actuation.
|
|
14310
14616
|
*/
|
|
14311
|
-
actions: NcRuleActionsSchema.optional()
|
|
14617
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14618
|
+
/**
|
|
14619
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14620
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14621
|
+
* did, and absent is the only way to say that without a migration.
|
|
14622
|
+
*/
|
|
14623
|
+
confirm: NcConfirmSchema.optional()
|
|
14312
14624
|
});
|
|
14313
14625
|
/**
|
|
14314
14626
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14319,7 +14631,37 @@ var NcRuleInputSchema = object({
|
|
|
14319
14631
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14320
14632
|
* `updateRule` patch.
|
|
14321
14633
|
*/
|
|
14322
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14634
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14635
|
+
disabledTargetIds: array(string()).optional(),
|
|
14636
|
+
/**
|
|
14637
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14638
|
+
*
|
|
14639
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14640
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14641
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14642
|
+
* one — which made every partial edit destructive:
|
|
14643
|
+
*
|
|
14644
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14645
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14646
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14647
|
+
*
|
|
14648
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14649
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14650
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14651
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14652
|
+
* within a minute of a two-field patch.
|
|
14653
|
+
*
|
|
14654
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14655
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14656
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14657
|
+
* absent key is now genuinely absent.
|
|
14658
|
+
*/
|
|
14659
|
+
enabled: boolean().optional(),
|
|
14660
|
+
conditions: NcConditionsSchema.optional(),
|
|
14661
|
+
media: NcMediaPolicySchema.optional(),
|
|
14662
|
+
throttle: NcThrottleSchema.optional(),
|
|
14663
|
+
priority: number().int().min(1).max(5).optional()
|
|
14664
|
+
});
|
|
14323
14665
|
/** A persisted rule. */
|
|
14324
14666
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14325
14667
|
id: string(),
|
|
@@ -14620,6 +14962,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14620
14962
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14621
14963
|
* copy would lie the first time a rule is disabled.
|
|
14622
14964
|
*/
|
|
14965
|
+
/**
|
|
14966
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
14967
|
+
*
|
|
14968
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
14969
|
+
* per-camera notification switch the Notification Center already owns,
|
|
14970
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
14971
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
14972
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
14973
|
+
* with the switches the operator actually used.
|
|
14974
|
+
*/
|
|
14975
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
14976
|
+
"muted",
|
|
14977
|
+
"detection-off",
|
|
14978
|
+
"offline"
|
|
14979
|
+
]);
|
|
14980
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
14981
|
+
deviceId: number().int(),
|
|
14982
|
+
reason: NcAlarmSkipReasonSchema
|
|
14983
|
+
});
|
|
14623
14984
|
var NcAlarmModeCoverageSchema = object({
|
|
14624
14985
|
mode: AlarmArmModeSchema,
|
|
14625
14986
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14627,7 +14988,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14627
14988
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14628
14989
|
allDevices: boolean(),
|
|
14629
14990
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14630
|
-
deviceIds: array(number().int())
|
|
14991
|
+
deviceIds: array(number().int()),
|
|
14992
|
+
/**
|
|
14993
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
14994
|
+
* excludes it.
|
|
14995
|
+
*
|
|
14996
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
14997
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
14998
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
14999
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15000
|
+
* alarm tab.
|
|
15001
|
+
*/
|
|
15002
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14631
15003
|
});
|
|
14632
15004
|
var NcAlarmConfigSchema = object({
|
|
14633
15005
|
/**
|
|
@@ -15990,13 +16362,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15990
16362
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
15991
16363
|
kind: "mutation",
|
|
15992
16364
|
auth: "admin"
|
|
15993
|
-
}), method(
|
|
16365
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
15994
16366
|
kind: "mutation",
|
|
15995
16367
|
auth: "admin"
|
|
15996
|
-
}), method(object({
|
|
15997
|
-
kind: "
|
|
16368
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16369
|
+
kind: "mutation",
|
|
15998
16370
|
auth: "admin"
|
|
15999
|
-
}), method(
|
|
16371
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16372
|
+
kind: "mutation",
|
|
16373
|
+
auth: "admin"
|
|
16374
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16375
|
+
kind: "mutation",
|
|
16376
|
+
auth: "admin"
|
|
16377
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16000
16378
|
kind: "mutation",
|
|
16001
16379
|
auth: "admin"
|
|
16002
16380
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17420,9 +17798,16 @@ var CameraStatusSchema = object({
|
|
|
17420
17798
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17421
17799
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17422
17800
|
/**
|
|
17423
|
-
* Per-camera
|
|
17801
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17424
17802
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17425
17803
|
*
|
|
17804
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17805
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17806
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17807
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17808
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17809
|
+
* the difference between a camera being off and a camera being dead.
|
|
17810
|
+
*
|
|
17426
17811
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17427
17812
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17428
17813
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17493,7 +17878,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17493
17878
|
reachable: boolean(),
|
|
17494
17879
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17495
17880
|
});
|
|
17496
|
-
method(object({
|
|
17881
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17882
|
+
kind: "mutation",
|
|
17883
|
+
auth: "admin"
|
|
17884
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17885
|
+
kind: "mutation",
|
|
17886
|
+
auth: "admin"
|
|
17887
|
+
}), method(object({
|
|
17497
17888
|
deviceId: number(),
|
|
17498
17889
|
agentNodeId: string()
|
|
17499
17890
|
}), object({ success: literal(true) }), {
|
|
@@ -18180,6 +18571,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18180
18571
|
locationId: string(),
|
|
18181
18572
|
targetBytes: number().int().positive()
|
|
18182
18573
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18574
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18575
|
+
kind: "mutation",
|
|
18576
|
+
auth: "admin"
|
|
18577
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18578
|
+
kind: "mutation",
|
|
18579
|
+
auth: "admin"
|
|
18580
|
+
});
|
|
18183
18581
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18184
18582
|
providerId: string().min(1),
|
|
18185
18583
|
displayName: string().min(1),
|
|
@@ -18283,6 +18681,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18283
18681
|
label: string(),
|
|
18284
18682
|
description: string().optional()
|
|
18285
18683
|
});
|
|
18684
|
+
/**
|
|
18685
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18686
|
+
* an instance declares a camera.
|
|
18687
|
+
*/
|
|
18688
|
+
var TerminalInstanceInfoSchema = object({
|
|
18689
|
+
instanceId: string(),
|
|
18690
|
+
cameraStableId: string(),
|
|
18691
|
+
nodeId: string(),
|
|
18692
|
+
profileId: string(),
|
|
18693
|
+
profileLabel: string(),
|
|
18694
|
+
name: string(),
|
|
18695
|
+
enabled: boolean()
|
|
18696
|
+
});
|
|
18697
|
+
var TerminalLegacyCameraSchema = object({
|
|
18698
|
+
stableId: string(),
|
|
18699
|
+
nodeId: string(),
|
|
18700
|
+
profileId: string(),
|
|
18701
|
+
profileLabel: string(),
|
|
18702
|
+
name: string(),
|
|
18703
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18704
|
+
adoptable: boolean()
|
|
18705
|
+
});
|
|
18286
18706
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18287
18707
|
seq: number().int().positive(),
|
|
18288
18708
|
kind: literal("data"),
|
|
@@ -18299,7 +18719,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18299
18719
|
snapshot: string().optional(),
|
|
18300
18720
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18301
18721
|
});
|
|
18302
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18722
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18723
|
+
targetNodeId: string().min(1),
|
|
18724
|
+
profileId: string().min(1),
|
|
18725
|
+
name: string().trim().min(1).max(160).optional()
|
|
18726
|
+
}), TerminalInstanceInfoSchema, {
|
|
18727
|
+
kind: "mutation",
|
|
18728
|
+
auth: "admin"
|
|
18729
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18730
|
+
kind: "mutation",
|
|
18731
|
+
auth: "admin"
|
|
18732
|
+
}), method(object({
|
|
18733
|
+
instanceId: string().min(1),
|
|
18734
|
+
enabled: boolean()
|
|
18735
|
+
}), TerminalInstanceInfoSchema, {
|
|
18736
|
+
kind: "mutation",
|
|
18737
|
+
auth: "admin"
|
|
18738
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18739
|
+
stableId: string().min(1),
|
|
18740
|
+
name: string().trim().min(1).max(160).optional()
|
|
18741
|
+
}), TerminalInstanceInfoSchema, {
|
|
18742
|
+
kind: "mutation",
|
|
18743
|
+
auth: "admin"
|
|
18744
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18303
18745
|
profileId: string(),
|
|
18304
18746
|
cols: number().int().positive(),
|
|
18305
18747
|
rows: number().int().positive()
|
|
@@ -18316,7 +18758,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18316
18758
|
}), method(object({
|
|
18317
18759
|
sessionId: string(),
|
|
18318
18760
|
afterSeq: number().int().nonnegative(),
|
|
18319
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18761
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18762
|
+
/**
|
|
18763
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18764
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18765
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18766
|
+
*/
|
|
18767
|
+
waitForOutput: boolean().optional()
|
|
18320
18768
|
}), TerminalOutputBatchSchema, {
|
|
18321
18769
|
kind: "mutation",
|
|
18322
18770
|
auth: "admin",
|
|
@@ -20257,6 +20705,7 @@ var FaceInfoSchema = object({
|
|
|
20257
20705
|
var FaceFilterEnum = _enum([
|
|
20258
20706
|
"unassigned",
|
|
20259
20707
|
"recognized",
|
|
20708
|
+
"identified",
|
|
20260
20709
|
"all"
|
|
20261
20710
|
]);
|
|
20262
20711
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20285,6 +20734,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20285
20734
|
kind: "mutation",
|
|
20286
20735
|
auth: "admin"
|
|
20287
20736
|
}), method(object({
|
|
20737
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20738
|
+
deviceId: number().int().optional(),
|
|
20288
20739
|
limit: number().int().positive().optional(),
|
|
20289
20740
|
filter: FaceFilterEnum.optional(),
|
|
20290
20741
|
/**
|
|
@@ -22050,6 +22501,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22050
22501
|
capName: string().min(1).max(64),
|
|
22051
22502
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22052
22503
|
valuePath: string().min(1).max(64)
|
|
22504
|
+
}),
|
|
22505
|
+
object({
|
|
22506
|
+
kind: literal("latest-recognition"),
|
|
22507
|
+
recognition: _enum(["person", "plate"])
|
|
22053
22508
|
})
|
|
22054
22509
|
]);
|
|
22055
22510
|
var OsdSlotBindingSchema = object({
|
|
@@ -22155,6 +22610,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22155
22610
|
}), object({ success: literal(true) }), {
|
|
22156
22611
|
kind: "mutation",
|
|
22157
22612
|
auth: "admin"
|
|
22613
|
+
}), method(object({
|
|
22614
|
+
sourceDeviceId: number().int(),
|
|
22615
|
+
targetDeviceId: number().int()
|
|
22616
|
+
}), object({
|
|
22617
|
+
copied: number().int().nonnegative(),
|
|
22618
|
+
skipped: number().int().nonnegative()
|
|
22619
|
+
}), {
|
|
22620
|
+
kind: "mutation",
|
|
22621
|
+
auth: "admin"
|
|
22158
22622
|
}), method(object({
|
|
22159
22623
|
deviceId: number().int(),
|
|
22160
22624
|
slotId: string().min(1),
|
|
@@ -22865,7 +23329,19 @@ var RecordingManifestSchema = object({
|
|
|
22865
23329
|
* profiles/subtrees/locations on this node). */
|
|
22866
23330
|
var RecordingDeviceUsageSchema = object({
|
|
22867
23331
|
deviceId: number(),
|
|
22868
|
-
usedBytes: number()
|
|
23332
|
+
usedBytes: number(),
|
|
23333
|
+
/**
|
|
23334
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23335
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23336
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23337
|
+
*
|
|
23338
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23339
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23340
|
+
* field must keep validating that older provider's payload: the framework
|
|
23341
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23342
|
+
* the later of the two.
|
|
23343
|
+
*/
|
|
23344
|
+
oldestMs: number().nullable().optional()
|
|
22869
23345
|
});
|
|
22870
23346
|
/** Recording storage usage + capacity for one storage location. */
|
|
22871
23347
|
var RecordingLocationUsageSchema = object({
|
|
@@ -22893,6 +23369,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
22893
23369
|
locations: array(RecordingLocationUsageSchema)
|
|
22894
23370
|
});
|
|
22895
23371
|
/**
|
|
23372
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23373
|
+
*
|
|
23374
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23375
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23376
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23377
|
+
* location, run FIFO behind the single-flight mover.
|
|
23378
|
+
*
|
|
23379
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23380
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23381
|
+
* (empty on the plan).
|
|
23382
|
+
*/
|
|
23383
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23384
|
+
deviceId: number(),
|
|
23385
|
+
profile: string(),
|
|
23386
|
+
fromLocationId: string(),
|
|
23387
|
+
toLocationId: string(),
|
|
23388
|
+
bytes: number(),
|
|
23389
|
+
files: number().int()
|
|
23390
|
+
});
|
|
23391
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23392
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23393
|
+
* that had nothing to do. */
|
|
23394
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23395
|
+
"unassigned",
|
|
23396
|
+
"target-not-writable",
|
|
23397
|
+
"below-threshold",
|
|
23398
|
+
"no-headroom"
|
|
23399
|
+
]);
|
|
23400
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23401
|
+
deviceId: number(),
|
|
23402
|
+
profile: string(),
|
|
23403
|
+
fromLocationId: string(),
|
|
23404
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23405
|
+
toLocationId: string().nullable(),
|
|
23406
|
+
bytes: number(),
|
|
23407
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23408
|
+
});
|
|
23409
|
+
var RecordingRebalancePlanSchema = object({
|
|
23410
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23411
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23412
|
+
bytesToMove: number(),
|
|
23413
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23414
|
+
jobIds: array(string())
|
|
23415
|
+
});
|
|
23416
|
+
var RecordingRebalanceInputSchema = object({
|
|
23417
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23418
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23419
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23420
|
+
minMoveGb: number().min(0).optional()
|
|
23421
|
+
});
|
|
23422
|
+
/**
|
|
22896
23423
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22897
23424
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22898
23425
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23040,6 +23567,21 @@ method(object({
|
|
|
23040
23567
|
}), {
|
|
23041
23568
|
kind: "mutation",
|
|
23042
23569
|
auth: "admin"
|
|
23570
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23571
|
+
kind: "mutation",
|
|
23572
|
+
auth: "admin"
|
|
23573
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23574
|
+
kind: "mutation",
|
|
23575
|
+
auth: "admin"
|
|
23576
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23577
|
+
kind: "mutation",
|
|
23578
|
+
auth: "admin"
|
|
23579
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23580
|
+
kind: "mutation",
|
|
23581
|
+
auth: "admin"
|
|
23582
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23583
|
+
kind: "mutation",
|
|
23584
|
+
auth: "admin"
|
|
23043
23585
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23044
23586
|
kind: "mutation",
|
|
23045
23587
|
auth: "admin"
|
|
@@ -23049,9 +23591,15 @@ method(object({
|
|
|
23049
23591
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23050
23592
|
kind: "mutation",
|
|
23051
23593
|
auth: "admin"
|
|
23594
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23595
|
+
kind: "query",
|
|
23596
|
+
auth: "admin"
|
|
23597
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23598
|
+
kind: "mutation",
|
|
23599
|
+
auth: "admin"
|
|
23052
23600
|
});
|
|
23053
23601
|
/**
|
|
23054
|
-
* `
|
|
23602
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23055
23603
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23056
23604
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23057
23605
|
* delete-after-download.
|
|
@@ -23066,10 +23614,42 @@ method(object({
|
|
|
23066
23614
|
*/
|
|
23067
23615
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23068
23616
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23617
|
+
/**
|
|
23618
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23619
|
+
*
|
|
23620
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23621
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23622
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23623
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23624
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23625
|
+
*/
|
|
23626
|
+
var ExportDenseRangeSchema = object({
|
|
23627
|
+
fromSec: number().nonnegative(),
|
|
23628
|
+
toSec: number().nonnegative()
|
|
23629
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23630
|
+
/**
|
|
23631
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23632
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23633
|
+
*
|
|
23634
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23635
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23636
|
+
*/
|
|
23637
|
+
var ExportDenseSchema = object({
|
|
23638
|
+
everyMs: number().int().positive(),
|
|
23639
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23640
|
+
});
|
|
23069
23641
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23070
23642
|
var ExportTimelapseSchema = object({
|
|
23071
23643
|
everyMs: number().int().positive(),
|
|
23072
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23644
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23645
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23646
|
+
dense: ExportDenseSchema.optional()
|
|
23647
|
+
}).superRefine((v, ctx) => {
|
|
23648
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23649
|
+
code: ZodIssueCode.custom,
|
|
23650
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23651
|
+
path: ["dense", "everyMs"]
|
|
23652
|
+
});
|
|
23073
23653
|
});
|
|
23074
23654
|
/**
|
|
23075
23655
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23127,6 +23707,19 @@ var ExportDownloadSchema = object({
|
|
|
23127
23707
|
url: string(),
|
|
23128
23708
|
endpoints: array(string())
|
|
23129
23709
|
});
|
|
23710
|
+
/**
|
|
23711
|
+
* A finished export's bytes, inline.
|
|
23712
|
+
*
|
|
23713
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23714
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23715
|
+
*/
|
|
23716
|
+
var ExportBytesSchema = object({
|
|
23717
|
+
base64: string(),
|
|
23718
|
+
contentType: string(),
|
|
23719
|
+
/** Suggested filename, extension included. */
|
|
23720
|
+
name: string(),
|
|
23721
|
+
bytes: number().int().nonnegative()
|
|
23722
|
+
});
|
|
23130
23723
|
method(object({
|
|
23131
23724
|
deviceId: number(),
|
|
23132
23725
|
profile: string(),
|
|
@@ -23151,6 +23744,9 @@ method(object({
|
|
|
23151
23744
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23152
23745
|
kind: "query",
|
|
23153
23746
|
auth: "protected"
|
|
23747
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23748
|
+
kind: "query",
|
|
23749
|
+
auth: "protected"
|
|
23154
23750
|
});
|
|
23155
23751
|
/**
|
|
23156
23752
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27168,6 +27764,12 @@ Object.freeze({
|
|
|
27168
27764
|
addonId: null,
|
|
27169
27765
|
access: "delete"
|
|
27170
27766
|
},
|
|
27767
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27768
|
+
capName: "osd-manager",
|
|
27769
|
+
capScope: "system",
|
|
27770
|
+
addonId: null,
|
|
27771
|
+
access: "create"
|
|
27772
|
+
},
|
|
27171
27773
|
"osdManager.getConditionSupport": {
|
|
27172
27774
|
capName: "osd-manager",
|
|
27173
27775
|
capScope: "system",
|
|
@@ -27264,7 +27866,7 @@ Object.freeze({
|
|
|
27264
27866
|
addonId: null,
|
|
27265
27867
|
access: "create"
|
|
27266
27868
|
},
|
|
27267
|
-
"pipelineAnalytics.
|
|
27869
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27268
27870
|
capName: "pipeline-analytics",
|
|
27269
27871
|
capScope: "device",
|
|
27270
27872
|
addonId: null,
|
|
@@ -27336,12 +27938,6 @@ Object.freeze({
|
|
|
27336
27938
|
addonId: null,
|
|
27337
27939
|
access: "view"
|
|
27338
27940
|
},
|
|
27339
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27340
|
-
capName: "pipeline-analytics",
|
|
27341
|
-
capScope: "device",
|
|
27342
|
-
addonId: null,
|
|
27343
|
-
access: "view"
|
|
27344
|
-
},
|
|
27345
27941
|
"pipelineAnalytics.getMotionEvents": {
|
|
27346
27942
|
capName: "pipeline-analytics",
|
|
27347
27943
|
capScope: "device",
|
|
@@ -27378,6 +27974,12 @@ Object.freeze({
|
|
|
27378
27974
|
addonId: null,
|
|
27379
27975
|
access: "view"
|
|
27380
27976
|
},
|
|
27977
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
27978
|
+
capName: "pipeline-analytics",
|
|
27979
|
+
capScope: "device",
|
|
27980
|
+
addonId: null,
|
|
27981
|
+
access: "view"
|
|
27982
|
+
},
|
|
27381
27983
|
"pipelineAnalytics.getTrack": {
|
|
27382
27984
|
capName: "pipeline-analytics",
|
|
27383
27985
|
capScope: "device",
|
|
@@ -27456,6 +28058,12 @@ Object.freeze({
|
|
|
27456
28058
|
addonId: null,
|
|
27457
28059
|
access: "view"
|
|
27458
28060
|
},
|
|
28061
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28062
|
+
capName: "pipeline-analytics",
|
|
28063
|
+
capScope: "device",
|
|
28064
|
+
addonId: null,
|
|
28065
|
+
access: "create"
|
|
28066
|
+
},
|
|
27459
28067
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27460
28068
|
capName: "pipeline-analytics",
|
|
27461
28069
|
capScope: "device",
|
|
@@ -27486,7 +28094,7 @@ Object.freeze({
|
|
|
27486
28094
|
addonId: null,
|
|
27487
28095
|
access: "create"
|
|
27488
28096
|
},
|
|
27489
|
-
"pipelineAnalytics.
|
|
28097
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27490
28098
|
capName: "pipeline-analytics",
|
|
27491
28099
|
capScope: "device",
|
|
27492
28100
|
addonId: null,
|
|
@@ -27498,6 +28106,12 @@ Object.freeze({
|
|
|
27498
28106
|
addonId: null,
|
|
27499
28107
|
access: "create"
|
|
27500
28108
|
},
|
|
28109
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28110
|
+
capName: "pipeline-analytics",
|
|
28111
|
+
capScope: "device",
|
|
28112
|
+
addonId: null,
|
|
28113
|
+
access: "create"
|
|
28114
|
+
},
|
|
27501
28115
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27502
28116
|
capName: "pipeline-analytics",
|
|
27503
28117
|
capScope: "device",
|
|
@@ -27522,6 +28136,12 @@ Object.freeze({
|
|
|
27522
28136
|
addonId: null,
|
|
27523
28137
|
access: "create"
|
|
27524
28138
|
},
|
|
28139
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28140
|
+
capName: "pipeline-analytics",
|
|
28141
|
+
capScope: "device",
|
|
28142
|
+
addonId: null,
|
|
28143
|
+
access: "create"
|
|
28144
|
+
},
|
|
27525
28145
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27526
28146
|
capName: "pipeline-analytics",
|
|
27527
28147
|
capScope: "device",
|
|
@@ -27888,6 +28508,12 @@ Object.freeze({
|
|
|
27888
28508
|
addonId: null,
|
|
27889
28509
|
access: "view"
|
|
27890
28510
|
},
|
|
28511
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28512
|
+
capName: "pipeline-orchestrator",
|
|
28513
|
+
capScope: "system",
|
|
28514
|
+
addonId: null,
|
|
28515
|
+
access: "create"
|
|
28516
|
+
},
|
|
27891
28517
|
"pipelineOrchestrator.rebalance": {
|
|
27892
28518
|
capName: "pipeline-orchestrator",
|
|
27893
28519
|
capScope: "system",
|
|
@@ -27912,6 +28538,12 @@ Object.freeze({
|
|
|
27912
28538
|
addonId: null,
|
|
27913
28539
|
access: "view"
|
|
27914
28540
|
},
|
|
28541
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28542
|
+
capName: "pipeline-orchestrator",
|
|
28543
|
+
capScope: "system",
|
|
28544
|
+
addonId: null,
|
|
28545
|
+
access: "create"
|
|
28546
|
+
},
|
|
27915
28547
|
"pipelineOrchestrator.saveTemplate": {
|
|
27916
28548
|
capName: "pipeline-orchestrator",
|
|
27917
28549
|
capScope: "system",
|
|
@@ -28308,7 +28940,13 @@ Object.freeze({
|
|
|
28308
28940
|
addonId: null,
|
|
28309
28941
|
access: "create"
|
|
28310
28942
|
},
|
|
28311
|
-
"recording.
|
|
28943
|
+
"recording.cancelRelocateJob": {
|
|
28944
|
+
capName: "recording",
|
|
28945
|
+
capScope: "system",
|
|
28946
|
+
addonId: null,
|
|
28947
|
+
access: "create"
|
|
28948
|
+
},
|
|
28949
|
+
"recording.cancelStorageMigrationMove": {
|
|
28312
28950
|
capName: "recording",
|
|
28313
28951
|
capScope: "system",
|
|
28314
28952
|
addonId: null,
|
|
@@ -28344,7 +28982,7 @@ Object.freeze({
|
|
|
28344
28982
|
addonId: null,
|
|
28345
28983
|
access: "view"
|
|
28346
28984
|
},
|
|
28347
|
-
"recording.
|
|
28985
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28348
28986
|
capName: "recording",
|
|
28349
28987
|
capScope: "system",
|
|
28350
28988
|
addonId: null,
|
|
@@ -28362,12 +29000,30 @@ Object.freeze({
|
|
|
28362
29000
|
addonId: null,
|
|
28363
29001
|
access: "view"
|
|
28364
29002
|
},
|
|
29003
|
+
"recording.listRelocateJobs": {
|
|
29004
|
+
capName: "recording",
|
|
29005
|
+
capScope: "system",
|
|
29006
|
+
addonId: null,
|
|
29007
|
+
access: "view"
|
|
29008
|
+
},
|
|
28365
29009
|
"recording.locateSegment": {
|
|
28366
29010
|
capName: "recording",
|
|
28367
29011
|
capScope: "system",
|
|
28368
29012
|
addonId: null,
|
|
28369
29013
|
access: "view"
|
|
28370
29014
|
},
|
|
29015
|
+
"recording.pauseForStorageMigration": {
|
|
29016
|
+
capName: "recording",
|
|
29017
|
+
capScope: "system",
|
|
29018
|
+
addonId: null,
|
|
29019
|
+
access: "create"
|
|
29020
|
+
},
|
|
29021
|
+
"recording.planStorageRebalance": {
|
|
29022
|
+
capName: "recording",
|
|
29023
|
+
capScope: "system",
|
|
29024
|
+
addonId: null,
|
|
29025
|
+
access: "view"
|
|
29026
|
+
},
|
|
28371
29027
|
"recording.pruneFootage": {
|
|
28372
29028
|
capName: "recording",
|
|
28373
29029
|
capScope: "system",
|
|
@@ -28386,6 +29042,12 @@ Object.freeze({
|
|
|
28386
29042
|
addonId: null,
|
|
28387
29043
|
access: "view"
|
|
28388
29044
|
},
|
|
29045
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29046
|
+
capName: "recording",
|
|
29047
|
+
capScope: "system",
|
|
29048
|
+
addonId: null,
|
|
29049
|
+
access: "create"
|
|
29050
|
+
},
|
|
28389
29051
|
"recording.relocateFootage": {
|
|
28390
29052
|
capName: "recording",
|
|
28391
29053
|
capScope: "system",
|
|
@@ -28410,44 +29072,68 @@ Object.freeze({
|
|
|
28410
29072
|
addonId: null,
|
|
28411
29073
|
access: "create"
|
|
28412
29074
|
},
|
|
29075
|
+
"recording.resumeForStorageMigration": {
|
|
29076
|
+
capName: "recording",
|
|
29077
|
+
capScope: "system",
|
|
29078
|
+
addonId: null,
|
|
29079
|
+
access: "create"
|
|
29080
|
+
},
|
|
28413
29081
|
"recording.setDeviceConfig": {
|
|
28414
29082
|
capName: "recording",
|
|
28415
29083
|
capScope: "system",
|
|
28416
29084
|
addonId: null,
|
|
28417
29085
|
access: "create"
|
|
28418
29086
|
},
|
|
29087
|
+
"recording.startStorageMigrationMove": {
|
|
29088
|
+
capName: "recording",
|
|
29089
|
+
capScope: "system",
|
|
29090
|
+
addonId: null,
|
|
29091
|
+
access: "create"
|
|
29092
|
+
},
|
|
29093
|
+
"recording.startStorageRebalance": {
|
|
29094
|
+
capName: "recording",
|
|
29095
|
+
capScope: "system",
|
|
29096
|
+
addonId: null,
|
|
29097
|
+
access: "create"
|
|
29098
|
+
},
|
|
28419
29099
|
"recordingExport.cancelExport": {
|
|
28420
|
-
capName: "
|
|
29100
|
+
capName: "recording-export",
|
|
28421
29101
|
capScope: "system",
|
|
28422
29102
|
addonId: null,
|
|
28423
29103
|
access: "create"
|
|
28424
29104
|
},
|
|
28425
29105
|
"recordingExport.createExport": {
|
|
28426
|
-
capName: "
|
|
29106
|
+
capName: "recording-export",
|
|
28427
29107
|
capScope: "system",
|
|
28428
29108
|
addonId: null,
|
|
28429
29109
|
access: "create"
|
|
28430
29110
|
},
|
|
28431
29111
|
"recordingExport.deleteExport": {
|
|
28432
|
-
capName: "
|
|
29112
|
+
capName: "recording-export",
|
|
28433
29113
|
capScope: "system",
|
|
28434
29114
|
addonId: null,
|
|
28435
29115
|
access: "delete"
|
|
28436
29116
|
},
|
|
28437
29117
|
"recordingExport.getDownloadUrl": {
|
|
28438
|
-
capName: "
|
|
29118
|
+
capName: "recording-export",
|
|
28439
29119
|
capScope: "system",
|
|
28440
29120
|
addonId: null,
|
|
28441
29121
|
access: "view"
|
|
28442
29122
|
},
|
|
28443
29123
|
"recordingExport.getExport": {
|
|
28444
|
-
capName: "
|
|
29124
|
+
capName: "recording-export",
|
|
28445
29125
|
capScope: "system",
|
|
28446
29126
|
addonId: null,
|
|
28447
29127
|
access: "view"
|
|
28448
29128
|
},
|
|
28449
29129
|
"recordingExport.listExports": {
|
|
28450
|
-
capName: "
|
|
29130
|
+
capName: "recording-export",
|
|
29131
|
+
capScope: "system",
|
|
29132
|
+
addonId: null,
|
|
29133
|
+
access: "view"
|
|
29134
|
+
},
|
|
29135
|
+
"recordingExport.readExportBytes": {
|
|
29136
|
+
capName: "recording-export",
|
|
28451
29137
|
capScope: "system",
|
|
28452
29138
|
addonId: null,
|
|
28453
29139
|
access: "view"
|
|
@@ -28806,6 +29492,30 @@ Object.freeze({
|
|
|
28806
29492
|
addonId: null,
|
|
28807
29493
|
access: "view"
|
|
28808
29494
|
},
|
|
29495
|
+
"storageMigration.cancel": {
|
|
29496
|
+
capName: "storage-migration",
|
|
29497
|
+
capScope: "system",
|
|
29498
|
+
addonId: null,
|
|
29499
|
+
access: "create"
|
|
29500
|
+
},
|
|
29501
|
+
"storageMigration.plan": {
|
|
29502
|
+
capName: "storage-migration",
|
|
29503
|
+
capScope: "system",
|
|
29504
|
+
addonId: null,
|
|
29505
|
+
access: "view"
|
|
29506
|
+
},
|
|
29507
|
+
"storageMigration.start": {
|
|
29508
|
+
capName: "storage-migration",
|
|
29509
|
+
capScope: "system",
|
|
29510
|
+
addonId: null,
|
|
29511
|
+
access: "create"
|
|
29512
|
+
},
|
|
29513
|
+
"storageMigration.status": {
|
|
29514
|
+
capName: "storage-migration",
|
|
29515
|
+
capScope: "system",
|
|
29516
|
+
addonId: null,
|
|
29517
|
+
access: "view"
|
|
29518
|
+
},
|
|
28809
29519
|
"storageProvider.abortUpload": {
|
|
28810
29520
|
capName: "storage-provider",
|
|
28811
29521
|
capScope: "system",
|
|
@@ -29184,12 +29894,42 @@ Object.freeze({
|
|
|
29184
29894
|
addonId: null,
|
|
29185
29895
|
access: "create"
|
|
29186
29896
|
},
|
|
29897
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29898
|
+
capName: "terminal-session",
|
|
29899
|
+
capScope: "system",
|
|
29900
|
+
addonId: null,
|
|
29901
|
+
access: "create"
|
|
29902
|
+
},
|
|
29187
29903
|
"terminalSession.close": {
|
|
29188
29904
|
capName: "terminal-session",
|
|
29189
29905
|
capScope: "system",
|
|
29190
29906
|
addonId: null,
|
|
29191
29907
|
access: "create"
|
|
29192
29908
|
},
|
|
29909
|
+
"terminalSession.createInstance": {
|
|
29910
|
+
capName: "terminal-session",
|
|
29911
|
+
capScope: "system",
|
|
29912
|
+
addonId: null,
|
|
29913
|
+
access: "create"
|
|
29914
|
+
},
|
|
29915
|
+
"terminalSession.deleteInstance": {
|
|
29916
|
+
capName: "terminal-session",
|
|
29917
|
+
capScope: "system",
|
|
29918
|
+
addonId: null,
|
|
29919
|
+
access: "delete"
|
|
29920
|
+
},
|
|
29921
|
+
"terminalSession.listInstances": {
|
|
29922
|
+
capName: "terminal-session",
|
|
29923
|
+
capScope: "system",
|
|
29924
|
+
addonId: null,
|
|
29925
|
+
access: "view"
|
|
29926
|
+
},
|
|
29927
|
+
"terminalSession.listLegacyCameras": {
|
|
29928
|
+
capName: "terminal-session",
|
|
29929
|
+
capScope: "system",
|
|
29930
|
+
addonId: null,
|
|
29931
|
+
access: "view"
|
|
29932
|
+
},
|
|
29193
29933
|
"terminalSession.listProfiles": {
|
|
29194
29934
|
capName: "terminal-session",
|
|
29195
29935
|
capScope: "system",
|
|
@@ -29220,6 +29960,12 @@ Object.freeze({
|
|
|
29220
29960
|
addonId: null,
|
|
29221
29961
|
access: "create"
|
|
29222
29962
|
},
|
|
29963
|
+
"terminalSession.setInstanceEnabled": {
|
|
29964
|
+
capName: "terminal-session",
|
|
29965
|
+
capScope: "system",
|
|
29966
|
+
addonId: null,
|
|
29967
|
+
access: "create"
|
|
29968
|
+
},
|
|
29223
29969
|
"terminalSession.writeInput": {
|
|
29224
29970
|
capName: "terminal-session",
|
|
29225
29971
|
capScope: "system",
|
|
@@ -29764,6 +30510,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29764
30510
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29765
30511
|
var PriorityField = number().int().min(1).max(5);
|
|
29766
30512
|
/**
|
|
30513
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30514
|
+
*
|
|
30515
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30516
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30517
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30518
|
+
*
|
|
30519
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30520
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30521
|
+
*
|
|
30522
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30523
|
+
*
|
|
30524
|
+
* 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.
|
|
30525
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30526
|
+
* and therefore the length of a quiet night, does not move.
|
|
30527
|
+
*
|
|
30528
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30529
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30530
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30531
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30532
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30533
|
+
*/
|
|
30534
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30535
|
+
/**
|
|
30536
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30537
|
+
*
|
|
30538
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30539
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30540
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30541
|
+
* that range every ~583 ms.
|
|
30542
|
+
*
|
|
30543
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30544
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30545
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30546
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30547
|
+
* schema change and are the tracked follow-up.
|
|
30548
|
+
*
|
|
30549
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30550
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30551
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30552
|
+
* happened.
|
|
30553
|
+
*/
|
|
30554
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30555
|
+
/**
|
|
30556
|
+
* Caption burned into the notification's preview frame.
|
|
30557
|
+
*
|
|
30558
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30559
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30560
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30561
|
+
*
|
|
30562
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30563
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30564
|
+
* the reason this is not `.min(1)`.
|
|
30565
|
+
*/
|
|
30566
|
+
var PreviewTextField = string().max(200);
|
|
30567
|
+
/**
|
|
30568
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30569
|
+
*
|
|
30570
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30571
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30572
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30573
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30574
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30575
|
+
* them.
|
|
30576
|
+
*
|
|
30577
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30578
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30579
|
+
* paying that on the deploy that shipped it.
|
|
30580
|
+
*
|
|
30581
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30582
|
+
*/
|
|
30583
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30584
|
+
/**
|
|
30585
|
+
* Which detection classes the notification reports counts for.
|
|
30586
|
+
*
|
|
30587
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30588
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30589
|
+
* class the window actually contained", which is what an operator who never
|
|
30590
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30591
|
+
* counts cars all night).
|
|
30592
|
+
*
|
|
30593
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30594
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30595
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30596
|
+
* not emit.
|
|
30597
|
+
*
|
|
30598
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30599
|
+
* - `{{detections}}` — total over the reported classes
|
|
30600
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30601
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30602
|
+
* one per class, `count_` + the class name
|
|
30603
|
+
*
|
|
30604
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30605
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30606
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30607
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30608
|
+
*/
|
|
30609
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30610
|
+
/**
|
|
29767
30611
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29768
30612
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29769
30613
|
* here (see the ownership note above).
|
|
@@ -29783,9 +30627,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29783
30627
|
cadenceSec: CadenceSecField.default(15),
|
|
29784
30628
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29785
30629
|
framerate: FramerateField.default(10),
|
|
30630
|
+
/**
|
|
30631
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30632
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30633
|
+
* field gets.
|
|
30634
|
+
*/
|
|
30635
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30636
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30637
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29786
30638
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29787
30639
|
targets: TargetsField,
|
|
29788
30640
|
template: TimelapseTemplateSchema.optional(),
|
|
30641
|
+
/**
|
|
30642
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30643
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30644
|
+
*
|
|
30645
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30646
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30647
|
+
* silently clear the caption too.
|
|
30648
|
+
*/
|
|
30649
|
+
previewText: PreviewTextField.optional(),
|
|
30650
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30651
|
+
previewMode: PreviewModeField.default("image"),
|
|
30652
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30653
|
+
reportClasses: ReportClassesField.optional(),
|
|
29789
30654
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29790
30655
|
priority: PriorityField.default(3)
|
|
29791
30656
|
});
|
|
@@ -29796,8 +30661,13 @@ object({
|
|
|
29796
30661
|
schedule: NcScheduleSchema.optional(),
|
|
29797
30662
|
cadenceSec: CadenceSecField.optional(),
|
|
29798
30663
|
framerate: FramerateField.optional(),
|
|
30664
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30665
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29799
30666
|
targets: TargetsField.optional(),
|
|
29800
30667
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30668
|
+
previewText: PreviewTextField.optional(),
|
|
30669
|
+
previewMode: PreviewModeField.optional(),
|
|
30670
|
+
reportClasses: ReportClassesField.optional(),
|
|
29801
30671
|
priority: PriorityField.optional()
|
|
29802
30672
|
});
|
|
29803
30673
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29809,10 +30679,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29809
30679
|
*/
|
|
29810
30680
|
ownerUserId: string().optional(),
|
|
29811
30681
|
/**
|
|
29812
|
-
* Epoch-ms of the
|
|
29813
|
-
*
|
|
30682
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30683
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30684
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29814
30685
|
*/
|
|
29815
30686
|
lastGeneratedAt: number().optional(),
|
|
30687
|
+
/**
|
|
30688
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30689
|
+
* re-generation guard's real durable state.
|
|
30690
|
+
*
|
|
30691
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30692
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30693
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30694
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30695
|
+
* come back.
|
|
30696
|
+
*
|
|
30697
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30698
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30699
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30700
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30701
|
+
* once, on the deploy that shipped the map.
|
|
30702
|
+
*/
|
|
30703
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29816
30704
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29817
30705
|
createdBy: string(),
|
|
29818
30706
|
createdAt: number(),
|