@camstack/addon-decoder-ffmpeg 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/index.js +936 -48
- package/dist/index.mjs +936 -48
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7206,8 +7206,31 @@ var AdoptionJobSchema = object({
|
|
|
7206
7206
|
error: string().nullable()
|
|
7207
7207
|
});
|
|
7208
7208
|
/**
|
|
7209
|
-
* Per-camera FUNCTION SWITCHES
|
|
7210
|
-
*
|
|
7209
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7210
|
+
*
|
|
7211
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7212
|
+
*
|
|
7213
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7214
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7215
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7216
|
+
* every function already had a settings page of its own, and a second place to
|
|
7217
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7218
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7219
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7220
|
+
* (which was always first-class; the switch was a veneer over
|
|
7221
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7222
|
+
* per-device setting, the two camera planes to their own components.
|
|
7223
|
+
*
|
|
7224
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7225
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7226
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7227
|
+
* never about a control panel.
|
|
7228
|
+
*
|
|
7229
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7230
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7231
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7232
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7233
|
+
* stop; nothing new may be built on it.
|
|
7211
7234
|
*
|
|
7212
7235
|
* ## This file adds no state
|
|
7213
7236
|
*
|
|
@@ -7552,14 +7575,21 @@ var RecordingConfigSchema = object({
|
|
|
7552
7575
|
/**
|
|
7553
7576
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7554
7577
|
*
|
|
7555
|
-
* One shape shared by the recorder
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
*
|
|
7559
|
-
*
|
|
7560
|
-
|
|
7578
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7579
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7580
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7581
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7582
|
+
* addon surface.
|
|
7583
|
+
*/
|
|
7584
|
+
/**
|
|
7585
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7586
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7587
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7588
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7589
|
+
* runs at all.
|
|
7561
7590
|
*/
|
|
7562
7591
|
var RelocateJobStateSchema = _enum([
|
|
7592
|
+
"queued",
|
|
7563
7593
|
"running",
|
|
7564
7594
|
"done",
|
|
7565
7595
|
"failed",
|
|
@@ -7584,19 +7614,109 @@ var RelocateJobSchema = object({
|
|
|
7584
7614
|
finishedAt: number().nullable(),
|
|
7585
7615
|
error: string().nullable()
|
|
7586
7616
|
});
|
|
7617
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7618
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7619
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7587
7620
|
var RelocateFootageInputSchema = object({
|
|
7588
|
-
deviceId: number().optional(),
|
|
7589
7621
|
fromLocationId: string(),
|
|
7590
7622
|
toLocationId: string(),
|
|
7591
7623
|
entities: array(_enum(["segments"])).optional(),
|
|
7624
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7625
|
+
* pre-orchestration compatibility path. */
|
|
7626
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7627
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7628
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7629
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7630
|
+
deviceId: number().int().optional(),
|
|
7631
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7632
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7633
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7634
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7635
|
+
profiles: array(string()).optional(),
|
|
7592
7636
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7593
7637
|
* never allowed to starve live writers. */
|
|
7594
7638
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7595
7639
|
});
|
|
7596
|
-
|
|
7597
|
-
|
|
7640
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7641
|
+
* from persistent recording settings: a migration never changes
|
|
7642
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7643
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7644
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7645
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7598
7646
|
toLocationId: string(),
|
|
7599
7647
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7648
|
+
}).extend({ leaseId: string().min(1) });
|
|
7649
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7650
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7651
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7652
|
+
var StorageMigrationClassSchema = _enum([
|
|
7653
|
+
"recordings",
|
|
7654
|
+
"recordingsLow",
|
|
7655
|
+
"eventMedia"
|
|
7656
|
+
]);
|
|
7657
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7658
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7659
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7660
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7661
|
+
recordings: string().min(1).optional(),
|
|
7662
|
+
recordingsLow: string().min(1).optional(),
|
|
7663
|
+
eventMedia: string().min(1).optional()
|
|
7664
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7665
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7666
|
+
var StorageMigrationInputSchema = object({
|
|
7667
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7668
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7669
|
+
});
|
|
7670
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7671
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7672
|
+
* verified. */
|
|
7673
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7674
|
+
"planning",
|
|
7675
|
+
"pausing",
|
|
7676
|
+
"moving",
|
|
7677
|
+
"verifying",
|
|
7678
|
+
"repointing",
|
|
7679
|
+
"refreshing",
|
|
7680
|
+
"resuming",
|
|
7681
|
+
"done",
|
|
7682
|
+
"failed",
|
|
7683
|
+
"cancelled"
|
|
7684
|
+
]);
|
|
7685
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7686
|
+
"pipeline",
|
|
7687
|
+
"recorder",
|
|
7688
|
+
"analytics"
|
|
7689
|
+
]);
|
|
7690
|
+
var StorageMigrationMoveSchema = object({
|
|
7691
|
+
storageClass: StorageMigrationClassSchema,
|
|
7692
|
+
fromLocationId: string(),
|
|
7693
|
+
toLocationId: string(),
|
|
7694
|
+
moverJobId: string().nullable(),
|
|
7695
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7696
|
+
error: string().nullable()
|
|
7697
|
+
});
|
|
7698
|
+
var StorageMigrationJobSchema = object({
|
|
7699
|
+
jobId: string(),
|
|
7700
|
+
phase: StorageMigrationPhaseSchema,
|
|
7701
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7702
|
+
throttleMbps: number(),
|
|
7703
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7704
|
+
pauseLeaseId: string().nullable(),
|
|
7705
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7706
|
+
repointed: boolean(),
|
|
7707
|
+
cancelRequested: boolean(),
|
|
7708
|
+
startedAt: number(),
|
|
7709
|
+
updatedAt: number(),
|
|
7710
|
+
finishedAt: number().nullable(),
|
|
7711
|
+
error: string().nullable()
|
|
7712
|
+
});
|
|
7713
|
+
var StorageMigrationPlanSchema = object({
|
|
7714
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7715
|
+
moves: array(object({
|
|
7716
|
+
storageClass: StorageMigrationClassSchema,
|
|
7717
|
+
fromLocationId: string(),
|
|
7718
|
+
toLocationId: string()
|
|
7719
|
+
}))
|
|
7600
7720
|
});
|
|
7601
7721
|
/**
|
|
7602
7722
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7648,6 +7768,21 @@ var StorageLocationSchema = object({
|
|
|
7648
7768
|
nodeId: string().optional(),
|
|
7649
7769
|
isDefault: boolean().default(false),
|
|
7650
7770
|
isSystem: boolean().default(false),
|
|
7771
|
+
/**
|
|
7772
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7773
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7774
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7775
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7776
|
+
* extended to add the next consumer.
|
|
7777
|
+
*
|
|
7778
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7779
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7780
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7781
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7782
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7783
|
+
* always stamped `true`.
|
|
7784
|
+
*/
|
|
7785
|
+
enabled: boolean().optional(),
|
|
7651
7786
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7652
7787
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7653
7788
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12080,7 +12215,8 @@ method(object({
|
|
|
12080
12215
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12081
12216
|
/**
|
|
12082
12217
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12083
|
-
* filesystem
|
|
12218
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12219
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12084
12220
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12085
12221
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12086
12222
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13893,6 +14029,13 @@ var MaskGridDimsSchema = object({
|
|
|
13893
14029
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13894
14030
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13895
14031
|
* one trigger.
|
|
14032
|
+
*
|
|
14033
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14034
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14035
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14036
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14037
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14038
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13896
14039
|
*/
|
|
13897
14040
|
var NcDeliverySchema = _enum([
|
|
13898
14041
|
"immediate",
|
|
@@ -13907,15 +14050,32 @@ var NcDeliverySchema = _enum([
|
|
|
13907
14050
|
* depend on a provider's raw event name or payload shape.
|
|
13908
14051
|
*/
|
|
13909
14052
|
var NcSystemEventKindSchema = _enum([
|
|
13910
|
-
"
|
|
13911
|
-
"
|
|
14053
|
+
"device-online",
|
|
14054
|
+
"device-offline",
|
|
14055
|
+
"device-disabled",
|
|
14056
|
+
"device-enabled",
|
|
13912
14057
|
"stream-online",
|
|
13913
14058
|
"stream-offline",
|
|
13914
14059
|
"node-online",
|
|
13915
14060
|
"node-offline",
|
|
13916
14061
|
"addon-update-available",
|
|
13917
|
-
"server-update-available"
|
|
14062
|
+
"server-update-available",
|
|
14063
|
+
"alarm-triggered",
|
|
14064
|
+
"alarm-armed",
|
|
14065
|
+
"alarm-disarmed",
|
|
14066
|
+
"camera-online",
|
|
14067
|
+
"camera-offline",
|
|
14068
|
+
"camera-disabled",
|
|
14069
|
+
"camera-enabled"
|
|
14070
|
+
]);
|
|
14071
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14072
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14073
|
+
"camera-online",
|
|
14074
|
+
"camera-offline",
|
|
14075
|
+
"camera-disabled",
|
|
14076
|
+
"camera-enabled"
|
|
13918
14077
|
]);
|
|
14078
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13919
14079
|
/**
|
|
13920
14080
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13921
14081
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13924,6 +14084,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13924
14084
|
var NcSystemEventConditionSchema = object({
|
|
13925
14085
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13926
14086
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14087
|
+
/**
|
|
14088
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14089
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14090
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14091
|
+
*
|
|
14092
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14093
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14094
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14095
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14096
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14097
|
+
*/
|
|
14098
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13927
14099
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13928
14100
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13929
14101
|
});
|
|
@@ -13974,6 +14146,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13974
14146
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13975
14147
|
});
|
|
13976
14148
|
/**
|
|
14149
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14150
|
+
*
|
|
14151
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14152
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14153
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14154
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14155
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14156
|
+
*
|
|
14157
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14158
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14159
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14160
|
+
*
|
|
14161
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14162
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14163
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14164
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14165
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14166
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14167
|
+
* ZodEffects the cap path would have to special-case).
|
|
14168
|
+
*
|
|
14169
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14170
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14171
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14172
|
+
* `samplingSeconds` decorative.
|
|
14173
|
+
*
|
|
14174
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14175
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14176
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14177
|
+
* an operator who typed `dog` mean the same thing.
|
|
14178
|
+
*/
|
|
14179
|
+
var NcAudioConditionSchema = object({
|
|
14180
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14181
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14182
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14183
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14184
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14185
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14186
|
+
/** Length of the sampling window in seconds. */
|
|
14187
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14188
|
+
});
|
|
14189
|
+
/**
|
|
13977
14190
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13978
14191
|
*
|
|
13979
14192
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14246,7 +14459,33 @@ var NcConditionsSchema = object({
|
|
|
14246
14459
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14247
14460
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14248
14461
|
*/
|
|
14249
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14462
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14463
|
+
/**
|
|
14464
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14465
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14466
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14467
|
+
* a window that is not full yet, neither filter given). See
|
|
14468
|
+
* {@link NcAudioCondition}.
|
|
14469
|
+
*
|
|
14470
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14471
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14472
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14473
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14474
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14475
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14476
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14477
|
+
*
|
|
14478
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14479
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14480
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14481
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14482
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14483
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14484
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14485
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14486
|
+
* does an audio rule become authorable.
|
|
14487
|
+
*/
|
|
14488
|
+
audio: NcAudioConditionSchema.optional()
|
|
14250
14489
|
});
|
|
14251
14490
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14252
14491
|
var NcRuleTargetSchema = object({
|
|
@@ -14360,6 +14599,73 @@ var NcThrottleSchema = object({
|
|
|
14360
14599
|
*/
|
|
14361
14600
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14362
14601
|
});
|
|
14602
|
+
/**
|
|
14603
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14604
|
+
* it judges may be.
|
|
14605
|
+
*
|
|
14606
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14607
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14608
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14609
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14610
|
+
* tokens for pixels the model pools away.
|
|
14611
|
+
*/
|
|
14612
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14613
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14614
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14615
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14616
|
+
var NcConfirmExpectSchema = object({
|
|
14617
|
+
op: _enum([
|
|
14618
|
+
">=",
|
|
14619
|
+
">",
|
|
14620
|
+
"<=",
|
|
14621
|
+
"<",
|
|
14622
|
+
"=="
|
|
14623
|
+
]),
|
|
14624
|
+
count: number().int().min(0).max(1e3)
|
|
14625
|
+
});
|
|
14626
|
+
/**
|
|
14627
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14628
|
+
* to ship and says whether it agrees with the rule.
|
|
14629
|
+
*
|
|
14630
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14631
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14632
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14633
|
+
*
|
|
14634
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14635
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14636
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14637
|
+
* open looks in the log exactly like a gate that works.
|
|
14638
|
+
*
|
|
14639
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14640
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14641
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14642
|
+
* above rather than trusting a parse it may never have seen.
|
|
14643
|
+
*/
|
|
14644
|
+
var NcConfirmSchema = object({
|
|
14645
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14646
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14647
|
+
enabled: boolean().default(false),
|
|
14648
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14649
|
+
profileId: string().optional(),
|
|
14650
|
+
/**
|
|
14651
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14652
|
+
* from the rule (its class and its expectation).
|
|
14653
|
+
*
|
|
14654
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14655
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14656
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14657
|
+
* turn and only rule-authored words land here.
|
|
14658
|
+
*/
|
|
14659
|
+
prompt: string().max(1e3).optional(),
|
|
14660
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14661
|
+
* own boolean verdict decides. */
|
|
14662
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14663
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14664
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14665
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14666
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14667
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14668
|
+
});
|
|
14363
14669
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14364
14670
|
var NcRuleInputSchema = object({
|
|
14365
14671
|
name: string().min(1).max(200),
|
|
@@ -14420,7 +14726,13 @@ var NcRuleInputSchema = object({
|
|
|
14420
14726
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14421
14727
|
* shape as every other actuation.
|
|
14422
14728
|
*/
|
|
14423
|
-
actions: NcRuleActionsSchema.optional()
|
|
14729
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14730
|
+
/**
|
|
14731
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14732
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14733
|
+
* did, and absent is the only way to say that without a migration.
|
|
14734
|
+
*/
|
|
14735
|
+
confirm: NcConfirmSchema.optional()
|
|
14424
14736
|
});
|
|
14425
14737
|
/**
|
|
14426
14738
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14431,7 +14743,37 @@ var NcRuleInputSchema = object({
|
|
|
14431
14743
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14432
14744
|
* `updateRule` patch.
|
|
14433
14745
|
*/
|
|
14434
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14746
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14747
|
+
disabledTargetIds: array(string()).optional(),
|
|
14748
|
+
/**
|
|
14749
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14750
|
+
*
|
|
14751
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14752
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14753
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14754
|
+
* one — which made every partial edit destructive:
|
|
14755
|
+
*
|
|
14756
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14757
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14758
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14759
|
+
*
|
|
14760
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14761
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14762
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14763
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14764
|
+
* within a minute of a two-field patch.
|
|
14765
|
+
*
|
|
14766
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14767
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14768
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14769
|
+
* absent key is now genuinely absent.
|
|
14770
|
+
*/
|
|
14771
|
+
enabled: boolean().optional(),
|
|
14772
|
+
conditions: NcConditionsSchema.optional(),
|
|
14773
|
+
media: NcMediaPolicySchema.optional(),
|
|
14774
|
+
throttle: NcThrottleSchema.optional(),
|
|
14775
|
+
priority: number().int().min(1).max(5).optional()
|
|
14776
|
+
});
|
|
14435
14777
|
/** A persisted rule. */
|
|
14436
14778
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14437
14779
|
id: string(),
|
|
@@ -14732,6 +15074,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14732
15074
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14733
15075
|
* copy would lie the first time a rule is disabled.
|
|
14734
15076
|
*/
|
|
15077
|
+
/**
|
|
15078
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15079
|
+
*
|
|
15080
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15081
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15082
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15083
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15084
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15085
|
+
* with the switches the operator actually used.
|
|
15086
|
+
*/
|
|
15087
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15088
|
+
"muted",
|
|
15089
|
+
"detection-off",
|
|
15090
|
+
"offline"
|
|
15091
|
+
]);
|
|
15092
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15093
|
+
deviceId: number().int(),
|
|
15094
|
+
reason: NcAlarmSkipReasonSchema
|
|
15095
|
+
});
|
|
14735
15096
|
var NcAlarmModeCoverageSchema = object({
|
|
14736
15097
|
mode: AlarmArmModeSchema,
|
|
14737
15098
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14739,7 +15100,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14739
15100
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14740
15101
|
allDevices: boolean(),
|
|
14741
15102
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14742
|
-
deviceIds: array(number().int())
|
|
15103
|
+
deviceIds: array(number().int()),
|
|
15104
|
+
/**
|
|
15105
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15106
|
+
* excludes it.
|
|
15107
|
+
*
|
|
15108
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15109
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15110
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15111
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15112
|
+
* alarm tab.
|
|
15113
|
+
*/
|
|
15114
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14743
15115
|
});
|
|
14744
15116
|
var NcAlarmConfigSchema = object({
|
|
14745
15117
|
/**
|
|
@@ -16102,13 +16474,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16102
16474
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16103
16475
|
kind: "mutation",
|
|
16104
16476
|
auth: "admin"
|
|
16105
|
-
}), method(
|
|
16477
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16106
16478
|
kind: "mutation",
|
|
16107
16479
|
auth: "admin"
|
|
16108
|
-
}), method(object({
|
|
16109
|
-
kind: "
|
|
16480
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16481
|
+
kind: "mutation",
|
|
16110
16482
|
auth: "admin"
|
|
16111
|
-
}), method(
|
|
16483
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16484
|
+
kind: "mutation",
|
|
16485
|
+
auth: "admin"
|
|
16486
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16487
|
+
kind: "mutation",
|
|
16488
|
+
auth: "admin"
|
|
16489
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16112
16490
|
kind: "mutation",
|
|
16113
16491
|
auth: "admin"
|
|
16114
16492
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17532,9 +17910,16 @@ var CameraStatusSchema = object({
|
|
|
17532
17910
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17533
17911
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17534
17912
|
/**
|
|
17535
|
-
* Per-camera
|
|
17913
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17536
17914
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17537
17915
|
*
|
|
17916
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17917
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17918
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17919
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17920
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17921
|
+
* the difference between a camera being off and a camera being dead.
|
|
17922
|
+
*
|
|
17538
17923
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17539
17924
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17540
17925
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17605,7 +17990,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17605
17990
|
reachable: boolean(),
|
|
17606
17991
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17607
17992
|
});
|
|
17608
|
-
method(object({
|
|
17993
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17994
|
+
kind: "mutation",
|
|
17995
|
+
auth: "admin"
|
|
17996
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17997
|
+
kind: "mutation",
|
|
17998
|
+
auth: "admin"
|
|
17999
|
+
}), method(object({
|
|
17609
18000
|
deviceId: number(),
|
|
17610
18001
|
agentNodeId: string()
|
|
17611
18002
|
}), object({ success: literal(true) }), {
|
|
@@ -18279,6 +18670,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18279
18670
|
locationId: string(),
|
|
18280
18671
|
targetBytes: number().int().positive()
|
|
18281
18672
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18673
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18674
|
+
kind: "mutation",
|
|
18675
|
+
auth: "admin"
|
|
18676
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18677
|
+
kind: "mutation",
|
|
18678
|
+
auth: "admin"
|
|
18679
|
+
});
|
|
18282
18680
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18283
18681
|
providerId: string().min(1),
|
|
18284
18682
|
displayName: string().min(1),
|
|
@@ -18382,6 +18780,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18382
18780
|
label: string(),
|
|
18383
18781
|
description: string().optional()
|
|
18384
18782
|
});
|
|
18783
|
+
/**
|
|
18784
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18785
|
+
* an instance declares a camera.
|
|
18786
|
+
*/
|
|
18787
|
+
var TerminalInstanceInfoSchema = object({
|
|
18788
|
+
instanceId: string(),
|
|
18789
|
+
cameraStableId: string(),
|
|
18790
|
+
nodeId: string(),
|
|
18791
|
+
profileId: string(),
|
|
18792
|
+
profileLabel: string(),
|
|
18793
|
+
name: string(),
|
|
18794
|
+
enabled: boolean()
|
|
18795
|
+
});
|
|
18796
|
+
var TerminalLegacyCameraSchema = object({
|
|
18797
|
+
stableId: string(),
|
|
18798
|
+
nodeId: string(),
|
|
18799
|
+
profileId: string(),
|
|
18800
|
+
profileLabel: string(),
|
|
18801
|
+
name: string(),
|
|
18802
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18803
|
+
adoptable: boolean()
|
|
18804
|
+
});
|
|
18385
18805
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18386
18806
|
seq: number().int().positive(),
|
|
18387
18807
|
kind: literal("data"),
|
|
@@ -18398,7 +18818,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18398
18818
|
snapshot: string().optional(),
|
|
18399
18819
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18400
18820
|
});
|
|
18401
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18821
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18822
|
+
targetNodeId: string().min(1),
|
|
18823
|
+
profileId: string().min(1),
|
|
18824
|
+
name: string().trim().min(1).max(160).optional()
|
|
18825
|
+
}), TerminalInstanceInfoSchema, {
|
|
18826
|
+
kind: "mutation",
|
|
18827
|
+
auth: "admin"
|
|
18828
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18829
|
+
kind: "mutation",
|
|
18830
|
+
auth: "admin"
|
|
18831
|
+
}), method(object({
|
|
18832
|
+
instanceId: string().min(1),
|
|
18833
|
+
enabled: boolean()
|
|
18834
|
+
}), TerminalInstanceInfoSchema, {
|
|
18835
|
+
kind: "mutation",
|
|
18836
|
+
auth: "admin"
|
|
18837
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18838
|
+
stableId: string().min(1),
|
|
18839
|
+
name: string().trim().min(1).max(160).optional()
|
|
18840
|
+
}), TerminalInstanceInfoSchema, {
|
|
18841
|
+
kind: "mutation",
|
|
18842
|
+
auth: "admin"
|
|
18843
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18402
18844
|
profileId: string(),
|
|
18403
18845
|
cols: number().int().positive(),
|
|
18404
18846
|
rows: number().int().positive()
|
|
@@ -18415,7 +18857,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18415
18857
|
}), method(object({
|
|
18416
18858
|
sessionId: string(),
|
|
18417
18859
|
afterSeq: number().int().nonnegative(),
|
|
18418
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18860
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18861
|
+
/**
|
|
18862
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18863
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18864
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18865
|
+
*/
|
|
18866
|
+
waitForOutput: boolean().optional()
|
|
18419
18867
|
}), TerminalOutputBatchSchema, {
|
|
18420
18868
|
kind: "mutation",
|
|
18421
18869
|
auth: "admin",
|
|
@@ -20356,6 +20804,7 @@ var FaceInfoSchema = object({
|
|
|
20356
20804
|
var FaceFilterEnum = _enum([
|
|
20357
20805
|
"unassigned",
|
|
20358
20806
|
"recognized",
|
|
20807
|
+
"identified",
|
|
20359
20808
|
"all"
|
|
20360
20809
|
]);
|
|
20361
20810
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20384,6 +20833,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20384
20833
|
kind: "mutation",
|
|
20385
20834
|
auth: "admin"
|
|
20386
20835
|
}), method(object({
|
|
20836
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20837
|
+
deviceId: number().int().optional(),
|
|
20387
20838
|
limit: number().int().positive().optional(),
|
|
20388
20839
|
filter: FaceFilterEnum.optional(),
|
|
20389
20840
|
/**
|
|
@@ -22149,6 +22600,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22149
22600
|
capName: string().min(1).max(64),
|
|
22150
22601
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22151
22602
|
valuePath: string().min(1).max(64)
|
|
22603
|
+
}),
|
|
22604
|
+
object({
|
|
22605
|
+
kind: literal("latest-recognition"),
|
|
22606
|
+
recognition: _enum(["person", "plate"])
|
|
22152
22607
|
})
|
|
22153
22608
|
]);
|
|
22154
22609
|
var OsdSlotBindingSchema = object({
|
|
@@ -22254,6 +22709,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22254
22709
|
}), object({ success: literal(true) }), {
|
|
22255
22710
|
kind: "mutation",
|
|
22256
22711
|
auth: "admin"
|
|
22712
|
+
}), method(object({
|
|
22713
|
+
sourceDeviceId: number().int(),
|
|
22714
|
+
targetDeviceId: number().int()
|
|
22715
|
+
}), object({
|
|
22716
|
+
copied: number().int().nonnegative(),
|
|
22717
|
+
skipped: number().int().nonnegative()
|
|
22718
|
+
}), {
|
|
22719
|
+
kind: "mutation",
|
|
22720
|
+
auth: "admin"
|
|
22257
22721
|
}), method(object({
|
|
22258
22722
|
deviceId: number().int(),
|
|
22259
22723
|
slotId: string().min(1),
|
|
@@ -22964,7 +23428,19 @@ var RecordingManifestSchema = object({
|
|
|
22964
23428
|
* profiles/subtrees/locations on this node). */
|
|
22965
23429
|
var RecordingDeviceUsageSchema = object({
|
|
22966
23430
|
deviceId: number(),
|
|
22967
|
-
usedBytes: number()
|
|
23431
|
+
usedBytes: number(),
|
|
23432
|
+
/**
|
|
23433
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23434
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23435
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23436
|
+
*
|
|
23437
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23438
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23439
|
+
* field must keep validating that older provider's payload: the framework
|
|
23440
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23441
|
+
* the later of the two.
|
|
23442
|
+
*/
|
|
23443
|
+
oldestMs: number().nullable().optional()
|
|
22968
23444
|
});
|
|
22969
23445
|
/** Recording storage usage + capacity for one storage location. */
|
|
22970
23446
|
var RecordingLocationUsageSchema = object({
|
|
@@ -22992,6 +23468,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
22992
23468
|
locations: array(RecordingLocationUsageSchema)
|
|
22993
23469
|
});
|
|
22994
23470
|
/**
|
|
23471
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23472
|
+
*
|
|
23473
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23474
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23475
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23476
|
+
* location, run FIFO behind the single-flight mover.
|
|
23477
|
+
*
|
|
23478
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23479
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23480
|
+
* (empty on the plan).
|
|
23481
|
+
*/
|
|
23482
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23483
|
+
deviceId: number(),
|
|
23484
|
+
profile: string(),
|
|
23485
|
+
fromLocationId: string(),
|
|
23486
|
+
toLocationId: string(),
|
|
23487
|
+
bytes: number(),
|
|
23488
|
+
files: number().int()
|
|
23489
|
+
});
|
|
23490
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23491
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23492
|
+
* that had nothing to do. */
|
|
23493
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23494
|
+
"unassigned",
|
|
23495
|
+
"target-not-writable",
|
|
23496
|
+
"below-threshold",
|
|
23497
|
+
"no-headroom"
|
|
23498
|
+
]);
|
|
23499
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23500
|
+
deviceId: number(),
|
|
23501
|
+
profile: string(),
|
|
23502
|
+
fromLocationId: string(),
|
|
23503
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23504
|
+
toLocationId: string().nullable(),
|
|
23505
|
+
bytes: number(),
|
|
23506
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23507
|
+
});
|
|
23508
|
+
var RecordingRebalancePlanSchema = object({
|
|
23509
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23510
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23511
|
+
bytesToMove: number(),
|
|
23512
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23513
|
+
jobIds: array(string())
|
|
23514
|
+
});
|
|
23515
|
+
var RecordingRebalanceInputSchema = object({
|
|
23516
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23517
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23518
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23519
|
+
minMoveGb: number().min(0).optional()
|
|
23520
|
+
});
|
|
23521
|
+
/**
|
|
22995
23522
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22996
23523
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22997
23524
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23139,6 +23666,21 @@ method(object({
|
|
|
23139
23666
|
}), {
|
|
23140
23667
|
kind: "mutation",
|
|
23141
23668
|
auth: "admin"
|
|
23669
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23670
|
+
kind: "mutation",
|
|
23671
|
+
auth: "admin"
|
|
23672
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23673
|
+
kind: "mutation",
|
|
23674
|
+
auth: "admin"
|
|
23675
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23676
|
+
kind: "mutation",
|
|
23677
|
+
auth: "admin"
|
|
23678
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23679
|
+
kind: "mutation",
|
|
23680
|
+
auth: "admin"
|
|
23681
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23682
|
+
kind: "mutation",
|
|
23683
|
+
auth: "admin"
|
|
23142
23684
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23143
23685
|
kind: "mutation",
|
|
23144
23686
|
auth: "admin"
|
|
@@ -23148,9 +23690,15 @@ method(object({
|
|
|
23148
23690
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23149
23691
|
kind: "mutation",
|
|
23150
23692
|
auth: "admin"
|
|
23693
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23694
|
+
kind: "query",
|
|
23695
|
+
auth: "admin"
|
|
23696
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23697
|
+
kind: "mutation",
|
|
23698
|
+
auth: "admin"
|
|
23151
23699
|
});
|
|
23152
23700
|
/**
|
|
23153
|
-
* `
|
|
23701
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23154
23702
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23155
23703
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23156
23704
|
* delete-after-download.
|
|
@@ -23165,10 +23713,42 @@ method(object({
|
|
|
23165
23713
|
*/
|
|
23166
23714
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23167
23715
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23716
|
+
/**
|
|
23717
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23718
|
+
*
|
|
23719
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23720
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23721
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23722
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23723
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23724
|
+
*/
|
|
23725
|
+
var ExportDenseRangeSchema = object({
|
|
23726
|
+
fromSec: number().nonnegative(),
|
|
23727
|
+
toSec: number().nonnegative()
|
|
23728
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23729
|
+
/**
|
|
23730
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23731
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23732
|
+
*
|
|
23733
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23734
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23735
|
+
*/
|
|
23736
|
+
var ExportDenseSchema = object({
|
|
23737
|
+
everyMs: number().int().positive(),
|
|
23738
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23739
|
+
});
|
|
23168
23740
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23169
23741
|
var ExportTimelapseSchema = object({
|
|
23170
23742
|
everyMs: number().int().positive(),
|
|
23171
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23743
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23744
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23745
|
+
dense: ExportDenseSchema.optional()
|
|
23746
|
+
}).superRefine((v, ctx) => {
|
|
23747
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23748
|
+
code: ZodIssueCode.custom,
|
|
23749
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23750
|
+
path: ["dense", "everyMs"]
|
|
23751
|
+
});
|
|
23172
23752
|
});
|
|
23173
23753
|
/**
|
|
23174
23754
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23226,6 +23806,19 @@ var ExportDownloadSchema = object({
|
|
|
23226
23806
|
url: string(),
|
|
23227
23807
|
endpoints: array(string())
|
|
23228
23808
|
});
|
|
23809
|
+
/**
|
|
23810
|
+
* A finished export's bytes, inline.
|
|
23811
|
+
*
|
|
23812
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23813
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23814
|
+
*/
|
|
23815
|
+
var ExportBytesSchema = object({
|
|
23816
|
+
base64: string(),
|
|
23817
|
+
contentType: string(),
|
|
23818
|
+
/** Suggested filename, extension included. */
|
|
23819
|
+
name: string(),
|
|
23820
|
+
bytes: number().int().nonnegative()
|
|
23821
|
+
});
|
|
23229
23822
|
method(object({
|
|
23230
23823
|
deviceId: number(),
|
|
23231
23824
|
profile: string(),
|
|
@@ -23250,6 +23843,9 @@ method(object({
|
|
|
23250
23843
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23251
23844
|
kind: "query",
|
|
23252
23845
|
auth: "protected"
|
|
23846
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23847
|
+
kind: "query",
|
|
23848
|
+
auth: "protected"
|
|
23253
23849
|
});
|
|
23254
23850
|
/**
|
|
23255
23851
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27267,6 +27863,12 @@ Object.freeze({
|
|
|
27267
27863
|
addonId: null,
|
|
27268
27864
|
access: "delete"
|
|
27269
27865
|
},
|
|
27866
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27867
|
+
capName: "osd-manager",
|
|
27868
|
+
capScope: "system",
|
|
27869
|
+
addonId: null,
|
|
27870
|
+
access: "create"
|
|
27871
|
+
},
|
|
27270
27872
|
"osdManager.getConditionSupport": {
|
|
27271
27873
|
capName: "osd-manager",
|
|
27272
27874
|
capScope: "system",
|
|
@@ -27363,7 +27965,7 @@ Object.freeze({
|
|
|
27363
27965
|
addonId: null,
|
|
27364
27966
|
access: "create"
|
|
27365
27967
|
},
|
|
27366
|
-
"pipelineAnalytics.
|
|
27968
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27367
27969
|
capName: "pipeline-analytics",
|
|
27368
27970
|
capScope: "device",
|
|
27369
27971
|
addonId: null,
|
|
@@ -27435,12 +28037,6 @@ Object.freeze({
|
|
|
27435
28037
|
addonId: null,
|
|
27436
28038
|
access: "view"
|
|
27437
28039
|
},
|
|
27438
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27439
|
-
capName: "pipeline-analytics",
|
|
27440
|
-
capScope: "device",
|
|
27441
|
-
addonId: null,
|
|
27442
|
-
access: "view"
|
|
27443
|
-
},
|
|
27444
28040
|
"pipelineAnalytics.getMotionEvents": {
|
|
27445
28041
|
capName: "pipeline-analytics",
|
|
27446
28042
|
capScope: "device",
|
|
@@ -27477,6 +28073,12 @@ Object.freeze({
|
|
|
27477
28073
|
addonId: null,
|
|
27478
28074
|
access: "view"
|
|
27479
28075
|
},
|
|
28076
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
28077
|
+
capName: "pipeline-analytics",
|
|
28078
|
+
capScope: "device",
|
|
28079
|
+
addonId: null,
|
|
28080
|
+
access: "view"
|
|
28081
|
+
},
|
|
27480
28082
|
"pipelineAnalytics.getTrack": {
|
|
27481
28083
|
capName: "pipeline-analytics",
|
|
27482
28084
|
capScope: "device",
|
|
@@ -27555,6 +28157,12 @@ Object.freeze({
|
|
|
27555
28157
|
addonId: null,
|
|
27556
28158
|
access: "view"
|
|
27557
28159
|
},
|
|
28160
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28161
|
+
capName: "pipeline-analytics",
|
|
28162
|
+
capScope: "device",
|
|
28163
|
+
addonId: null,
|
|
28164
|
+
access: "create"
|
|
28165
|
+
},
|
|
27558
28166
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27559
28167
|
capName: "pipeline-analytics",
|
|
27560
28168
|
capScope: "device",
|
|
@@ -27585,7 +28193,7 @@ Object.freeze({
|
|
|
27585
28193
|
addonId: null,
|
|
27586
28194
|
access: "create"
|
|
27587
28195
|
},
|
|
27588
|
-
"pipelineAnalytics.
|
|
28196
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27589
28197
|
capName: "pipeline-analytics",
|
|
27590
28198
|
capScope: "device",
|
|
27591
28199
|
addonId: null,
|
|
@@ -27597,6 +28205,12 @@ Object.freeze({
|
|
|
27597
28205
|
addonId: null,
|
|
27598
28206
|
access: "create"
|
|
27599
28207
|
},
|
|
28208
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28209
|
+
capName: "pipeline-analytics",
|
|
28210
|
+
capScope: "device",
|
|
28211
|
+
addonId: null,
|
|
28212
|
+
access: "create"
|
|
28213
|
+
},
|
|
27600
28214
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27601
28215
|
capName: "pipeline-analytics",
|
|
27602
28216
|
capScope: "device",
|
|
@@ -27621,6 +28235,12 @@ Object.freeze({
|
|
|
27621
28235
|
addonId: null,
|
|
27622
28236
|
access: "create"
|
|
27623
28237
|
},
|
|
28238
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28239
|
+
capName: "pipeline-analytics",
|
|
28240
|
+
capScope: "device",
|
|
28241
|
+
addonId: null,
|
|
28242
|
+
access: "create"
|
|
28243
|
+
},
|
|
27624
28244
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27625
28245
|
capName: "pipeline-analytics",
|
|
27626
28246
|
capScope: "device",
|
|
@@ -27987,6 +28607,12 @@ Object.freeze({
|
|
|
27987
28607
|
addonId: null,
|
|
27988
28608
|
access: "view"
|
|
27989
28609
|
},
|
|
28610
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28611
|
+
capName: "pipeline-orchestrator",
|
|
28612
|
+
capScope: "system",
|
|
28613
|
+
addonId: null,
|
|
28614
|
+
access: "create"
|
|
28615
|
+
},
|
|
27990
28616
|
"pipelineOrchestrator.rebalance": {
|
|
27991
28617
|
capName: "pipeline-orchestrator",
|
|
27992
28618
|
capScope: "system",
|
|
@@ -28011,6 +28637,12 @@ Object.freeze({
|
|
|
28011
28637
|
addonId: null,
|
|
28012
28638
|
access: "view"
|
|
28013
28639
|
},
|
|
28640
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28641
|
+
capName: "pipeline-orchestrator",
|
|
28642
|
+
capScope: "system",
|
|
28643
|
+
addonId: null,
|
|
28644
|
+
access: "create"
|
|
28645
|
+
},
|
|
28014
28646
|
"pipelineOrchestrator.saveTemplate": {
|
|
28015
28647
|
capName: "pipeline-orchestrator",
|
|
28016
28648
|
capScope: "system",
|
|
@@ -28407,7 +29039,13 @@ Object.freeze({
|
|
|
28407
29039
|
addonId: null,
|
|
28408
29040
|
access: "create"
|
|
28409
29041
|
},
|
|
28410
|
-
"recording.
|
|
29042
|
+
"recording.cancelRelocateJob": {
|
|
29043
|
+
capName: "recording",
|
|
29044
|
+
capScope: "system",
|
|
29045
|
+
addonId: null,
|
|
29046
|
+
access: "create"
|
|
29047
|
+
},
|
|
29048
|
+
"recording.cancelStorageMigrationMove": {
|
|
28411
29049
|
capName: "recording",
|
|
28412
29050
|
capScope: "system",
|
|
28413
29051
|
addonId: null,
|
|
@@ -28443,7 +29081,7 @@ Object.freeze({
|
|
|
28443
29081
|
addonId: null,
|
|
28444
29082
|
access: "view"
|
|
28445
29083
|
},
|
|
28446
|
-
"recording.
|
|
29084
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28447
29085
|
capName: "recording",
|
|
28448
29086
|
capScope: "system",
|
|
28449
29087
|
addonId: null,
|
|
@@ -28461,12 +29099,30 @@ Object.freeze({
|
|
|
28461
29099
|
addonId: null,
|
|
28462
29100
|
access: "view"
|
|
28463
29101
|
},
|
|
29102
|
+
"recording.listRelocateJobs": {
|
|
29103
|
+
capName: "recording",
|
|
29104
|
+
capScope: "system",
|
|
29105
|
+
addonId: null,
|
|
29106
|
+
access: "view"
|
|
29107
|
+
},
|
|
28464
29108
|
"recording.locateSegment": {
|
|
28465
29109
|
capName: "recording",
|
|
28466
29110
|
capScope: "system",
|
|
28467
29111
|
addonId: null,
|
|
28468
29112
|
access: "view"
|
|
28469
29113
|
},
|
|
29114
|
+
"recording.pauseForStorageMigration": {
|
|
29115
|
+
capName: "recording",
|
|
29116
|
+
capScope: "system",
|
|
29117
|
+
addonId: null,
|
|
29118
|
+
access: "create"
|
|
29119
|
+
},
|
|
29120
|
+
"recording.planStorageRebalance": {
|
|
29121
|
+
capName: "recording",
|
|
29122
|
+
capScope: "system",
|
|
29123
|
+
addonId: null,
|
|
29124
|
+
access: "view"
|
|
29125
|
+
},
|
|
28470
29126
|
"recording.pruneFootage": {
|
|
28471
29127
|
capName: "recording",
|
|
28472
29128
|
capScope: "system",
|
|
@@ -28485,6 +29141,12 @@ Object.freeze({
|
|
|
28485
29141
|
addonId: null,
|
|
28486
29142
|
access: "view"
|
|
28487
29143
|
},
|
|
29144
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29145
|
+
capName: "recording",
|
|
29146
|
+
capScope: "system",
|
|
29147
|
+
addonId: null,
|
|
29148
|
+
access: "create"
|
|
29149
|
+
},
|
|
28488
29150
|
"recording.relocateFootage": {
|
|
28489
29151
|
capName: "recording",
|
|
28490
29152
|
capScope: "system",
|
|
@@ -28509,44 +29171,68 @@ Object.freeze({
|
|
|
28509
29171
|
addonId: null,
|
|
28510
29172
|
access: "create"
|
|
28511
29173
|
},
|
|
29174
|
+
"recording.resumeForStorageMigration": {
|
|
29175
|
+
capName: "recording",
|
|
29176
|
+
capScope: "system",
|
|
29177
|
+
addonId: null,
|
|
29178
|
+
access: "create"
|
|
29179
|
+
},
|
|
28512
29180
|
"recording.setDeviceConfig": {
|
|
28513
29181
|
capName: "recording",
|
|
28514
29182
|
capScope: "system",
|
|
28515
29183
|
addonId: null,
|
|
28516
29184
|
access: "create"
|
|
28517
29185
|
},
|
|
29186
|
+
"recording.startStorageMigrationMove": {
|
|
29187
|
+
capName: "recording",
|
|
29188
|
+
capScope: "system",
|
|
29189
|
+
addonId: null,
|
|
29190
|
+
access: "create"
|
|
29191
|
+
},
|
|
29192
|
+
"recording.startStorageRebalance": {
|
|
29193
|
+
capName: "recording",
|
|
29194
|
+
capScope: "system",
|
|
29195
|
+
addonId: null,
|
|
29196
|
+
access: "create"
|
|
29197
|
+
},
|
|
28518
29198
|
"recordingExport.cancelExport": {
|
|
28519
|
-
capName: "
|
|
29199
|
+
capName: "recording-export",
|
|
28520
29200
|
capScope: "system",
|
|
28521
29201
|
addonId: null,
|
|
28522
29202
|
access: "create"
|
|
28523
29203
|
},
|
|
28524
29204
|
"recordingExport.createExport": {
|
|
28525
|
-
capName: "
|
|
29205
|
+
capName: "recording-export",
|
|
28526
29206
|
capScope: "system",
|
|
28527
29207
|
addonId: null,
|
|
28528
29208
|
access: "create"
|
|
28529
29209
|
},
|
|
28530
29210
|
"recordingExport.deleteExport": {
|
|
28531
|
-
capName: "
|
|
29211
|
+
capName: "recording-export",
|
|
28532
29212
|
capScope: "system",
|
|
28533
29213
|
addonId: null,
|
|
28534
29214
|
access: "delete"
|
|
28535
29215
|
},
|
|
28536
29216
|
"recordingExport.getDownloadUrl": {
|
|
28537
|
-
capName: "
|
|
29217
|
+
capName: "recording-export",
|
|
28538
29218
|
capScope: "system",
|
|
28539
29219
|
addonId: null,
|
|
28540
29220
|
access: "view"
|
|
28541
29221
|
},
|
|
28542
29222
|
"recordingExport.getExport": {
|
|
28543
|
-
capName: "
|
|
29223
|
+
capName: "recording-export",
|
|
28544
29224
|
capScope: "system",
|
|
28545
29225
|
addonId: null,
|
|
28546
29226
|
access: "view"
|
|
28547
29227
|
},
|
|
28548
29228
|
"recordingExport.listExports": {
|
|
28549
|
-
capName: "
|
|
29229
|
+
capName: "recording-export",
|
|
29230
|
+
capScope: "system",
|
|
29231
|
+
addonId: null,
|
|
29232
|
+
access: "view"
|
|
29233
|
+
},
|
|
29234
|
+
"recordingExport.readExportBytes": {
|
|
29235
|
+
capName: "recording-export",
|
|
28550
29236
|
capScope: "system",
|
|
28551
29237
|
addonId: null,
|
|
28552
29238
|
access: "view"
|
|
@@ -28905,6 +29591,30 @@ Object.freeze({
|
|
|
28905
29591
|
addonId: null,
|
|
28906
29592
|
access: "view"
|
|
28907
29593
|
},
|
|
29594
|
+
"storageMigration.cancel": {
|
|
29595
|
+
capName: "storage-migration",
|
|
29596
|
+
capScope: "system",
|
|
29597
|
+
addonId: null,
|
|
29598
|
+
access: "create"
|
|
29599
|
+
},
|
|
29600
|
+
"storageMigration.plan": {
|
|
29601
|
+
capName: "storage-migration",
|
|
29602
|
+
capScope: "system",
|
|
29603
|
+
addonId: null,
|
|
29604
|
+
access: "view"
|
|
29605
|
+
},
|
|
29606
|
+
"storageMigration.start": {
|
|
29607
|
+
capName: "storage-migration",
|
|
29608
|
+
capScope: "system",
|
|
29609
|
+
addonId: null,
|
|
29610
|
+
access: "create"
|
|
29611
|
+
},
|
|
29612
|
+
"storageMigration.status": {
|
|
29613
|
+
capName: "storage-migration",
|
|
29614
|
+
capScope: "system",
|
|
29615
|
+
addonId: null,
|
|
29616
|
+
access: "view"
|
|
29617
|
+
},
|
|
28908
29618
|
"storageProvider.abortUpload": {
|
|
28909
29619
|
capName: "storage-provider",
|
|
28910
29620
|
capScope: "system",
|
|
@@ -29283,12 +29993,42 @@ Object.freeze({
|
|
|
29283
29993
|
addonId: null,
|
|
29284
29994
|
access: "create"
|
|
29285
29995
|
},
|
|
29996
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29997
|
+
capName: "terminal-session",
|
|
29998
|
+
capScope: "system",
|
|
29999
|
+
addonId: null,
|
|
30000
|
+
access: "create"
|
|
30001
|
+
},
|
|
29286
30002
|
"terminalSession.close": {
|
|
29287
30003
|
capName: "terminal-session",
|
|
29288
30004
|
capScope: "system",
|
|
29289
30005
|
addonId: null,
|
|
29290
30006
|
access: "create"
|
|
29291
30007
|
},
|
|
30008
|
+
"terminalSession.createInstance": {
|
|
30009
|
+
capName: "terminal-session",
|
|
30010
|
+
capScope: "system",
|
|
30011
|
+
addonId: null,
|
|
30012
|
+
access: "create"
|
|
30013
|
+
},
|
|
30014
|
+
"terminalSession.deleteInstance": {
|
|
30015
|
+
capName: "terminal-session",
|
|
30016
|
+
capScope: "system",
|
|
30017
|
+
addonId: null,
|
|
30018
|
+
access: "delete"
|
|
30019
|
+
},
|
|
30020
|
+
"terminalSession.listInstances": {
|
|
30021
|
+
capName: "terminal-session",
|
|
30022
|
+
capScope: "system",
|
|
30023
|
+
addonId: null,
|
|
30024
|
+
access: "view"
|
|
30025
|
+
},
|
|
30026
|
+
"terminalSession.listLegacyCameras": {
|
|
30027
|
+
capName: "terminal-session",
|
|
30028
|
+
capScope: "system",
|
|
30029
|
+
addonId: null,
|
|
30030
|
+
access: "view"
|
|
30031
|
+
},
|
|
29292
30032
|
"terminalSession.listProfiles": {
|
|
29293
30033
|
capName: "terminal-session",
|
|
29294
30034
|
capScope: "system",
|
|
@@ -29319,6 +30059,12 @@ Object.freeze({
|
|
|
29319
30059
|
addonId: null,
|
|
29320
30060
|
access: "create"
|
|
29321
30061
|
},
|
|
30062
|
+
"terminalSession.setInstanceEnabled": {
|
|
30063
|
+
capName: "terminal-session",
|
|
30064
|
+
capScope: "system",
|
|
30065
|
+
addonId: null,
|
|
30066
|
+
access: "create"
|
|
30067
|
+
},
|
|
29322
30068
|
"terminalSession.writeInput": {
|
|
29323
30069
|
capName: "terminal-session",
|
|
29324
30070
|
capScope: "system",
|
|
@@ -29863,6 +30609,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29863
30609
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29864
30610
|
var PriorityField = number().int().min(1).max(5);
|
|
29865
30611
|
/**
|
|
30612
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30613
|
+
*
|
|
30614
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30615
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30616
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30617
|
+
*
|
|
30618
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30619
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30620
|
+
*
|
|
30621
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30622
|
+
*
|
|
30623
|
+
* 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.
|
|
30624
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30625
|
+
* and therefore the length of a quiet night, does not move.
|
|
30626
|
+
*
|
|
30627
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30628
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30629
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30630
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30631
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30632
|
+
*/
|
|
30633
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30634
|
+
/**
|
|
30635
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30636
|
+
*
|
|
30637
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30638
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30639
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30640
|
+
* that range every ~583 ms.
|
|
30641
|
+
*
|
|
30642
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30643
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30644
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30645
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30646
|
+
* schema change and are the tracked follow-up.
|
|
30647
|
+
*
|
|
30648
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30649
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30650
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30651
|
+
* happened.
|
|
30652
|
+
*/
|
|
30653
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30654
|
+
/**
|
|
30655
|
+
* Caption burned into the notification's preview frame.
|
|
30656
|
+
*
|
|
30657
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30658
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30659
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30660
|
+
*
|
|
30661
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30662
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30663
|
+
* the reason this is not `.min(1)`.
|
|
30664
|
+
*/
|
|
30665
|
+
var PreviewTextField = string().max(200);
|
|
30666
|
+
/**
|
|
30667
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30668
|
+
*
|
|
30669
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30670
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30671
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30672
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30673
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30674
|
+
* them.
|
|
30675
|
+
*
|
|
30676
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30677
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30678
|
+
* paying that on the deploy that shipped it.
|
|
30679
|
+
*
|
|
30680
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30681
|
+
*/
|
|
30682
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30683
|
+
/**
|
|
30684
|
+
* Which detection classes the notification reports counts for.
|
|
30685
|
+
*
|
|
30686
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30687
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30688
|
+
* class the window actually contained", which is what an operator who never
|
|
30689
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30690
|
+
* counts cars all night).
|
|
30691
|
+
*
|
|
30692
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30693
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30694
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30695
|
+
* not emit.
|
|
30696
|
+
*
|
|
30697
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30698
|
+
* - `{{detections}}` — total over the reported classes
|
|
30699
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30700
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30701
|
+
* one per class, `count_` + the class name
|
|
30702
|
+
*
|
|
30703
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30704
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30705
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30706
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30707
|
+
*/
|
|
30708
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30709
|
+
/**
|
|
29866
30710
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29867
30711
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29868
30712
|
* here (see the ownership note above).
|
|
@@ -29882,9 +30726,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29882
30726
|
cadenceSec: CadenceSecField.default(15),
|
|
29883
30727
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29884
30728
|
framerate: FramerateField.default(10),
|
|
30729
|
+
/**
|
|
30730
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30731
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30732
|
+
* field gets.
|
|
30733
|
+
*/
|
|
30734
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30735
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30736
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29885
30737
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29886
30738
|
targets: TargetsField,
|
|
29887
30739
|
template: TimelapseTemplateSchema.optional(),
|
|
30740
|
+
/**
|
|
30741
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30742
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30743
|
+
*
|
|
30744
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30745
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30746
|
+
* silently clear the caption too.
|
|
30747
|
+
*/
|
|
30748
|
+
previewText: PreviewTextField.optional(),
|
|
30749
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30750
|
+
previewMode: PreviewModeField.default("image"),
|
|
30751
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30752
|
+
reportClasses: ReportClassesField.optional(),
|
|
29888
30753
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29889
30754
|
priority: PriorityField.default(3)
|
|
29890
30755
|
});
|
|
@@ -29895,8 +30760,13 @@ object({
|
|
|
29895
30760
|
schedule: NcScheduleSchema.optional(),
|
|
29896
30761
|
cadenceSec: CadenceSecField.optional(),
|
|
29897
30762
|
framerate: FramerateField.optional(),
|
|
30763
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30764
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29898
30765
|
targets: TargetsField.optional(),
|
|
29899
30766
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30767
|
+
previewText: PreviewTextField.optional(),
|
|
30768
|
+
previewMode: PreviewModeField.optional(),
|
|
30769
|
+
reportClasses: ReportClassesField.optional(),
|
|
29900
30770
|
priority: PriorityField.optional()
|
|
29901
30771
|
});
|
|
29902
30772
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29908,10 +30778,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29908
30778
|
*/
|
|
29909
30779
|
ownerUserId: string().optional(),
|
|
29910
30780
|
/**
|
|
29911
|
-
* Epoch-ms of the
|
|
29912
|
-
*
|
|
30781
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30782
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30783
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29913
30784
|
*/
|
|
29914
30785
|
lastGeneratedAt: number().optional(),
|
|
30786
|
+
/**
|
|
30787
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30788
|
+
* re-generation guard's real durable state.
|
|
30789
|
+
*
|
|
30790
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30791
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30792
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30793
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30794
|
+
* come back.
|
|
30795
|
+
*
|
|
30796
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30797
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30798
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30799
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30800
|
+
* once, on the deploy that shipped the map.
|
|
30801
|
+
*/
|
|
30802
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29915
30803
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29916
30804
|
createdBy: string(),
|
|
29917
30805
|
createdAt: number(),
|