@camstack/addon-provider-dreame 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +936 -48
- package/dist/addon.mjs +936 -48
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -57724,8 +57724,31 @@ var AdoptionJobSchema = object({
|
|
|
57724
57724
|
error: string().nullable()
|
|
57725
57725
|
});
|
|
57726
57726
|
/**
|
|
57727
|
-
* Per-camera FUNCTION SWITCHES
|
|
57728
|
-
*
|
|
57727
|
+
* Per-camera FUNCTION SWITCHES.
|
|
57728
|
+
*
|
|
57729
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
57730
|
+
*
|
|
57731
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
57732
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
57733
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
57734
|
+
* every function already had a settings page of its own, and a second place to
|
|
57735
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
57736
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
57737
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
57738
|
+
* (which was always first-class; the switch was a veneer over
|
|
57739
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
57740
|
+
* per-device setting, the two camera planes to their own components.
|
|
57741
|
+
*
|
|
57742
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
57743
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
57744
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
57745
|
+
* never about a control panel.
|
|
57746
|
+
*
|
|
57747
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
57748
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
57749
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
57750
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
57751
|
+
* stop; nothing new may be built on it.
|
|
57729
57752
|
*
|
|
57730
57753
|
* ## This file adds no state
|
|
57731
57754
|
*
|
|
@@ -58070,14 +58093,21 @@ var RecordingConfigSchema = object({
|
|
|
58070
58093
|
/**
|
|
58071
58094
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
58072
58095
|
*
|
|
58073
|
-
* One shape shared by the recorder
|
|
58074
|
-
*
|
|
58075
|
-
*
|
|
58076
|
-
*
|
|
58077
|
-
*
|
|
58078
|
-
|
|
58096
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
58097
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
58098
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
58099
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
58100
|
+
* addon surface.
|
|
58101
|
+
*/
|
|
58102
|
+
/**
|
|
58103
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
58104
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
58105
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
58106
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
58107
|
+
* runs at all.
|
|
58079
58108
|
*/
|
|
58080
58109
|
var RelocateJobStateSchema = _enum([
|
|
58110
|
+
"queued",
|
|
58081
58111
|
"running",
|
|
58082
58112
|
"done",
|
|
58083
58113
|
"failed",
|
|
@@ -58102,19 +58132,109 @@ var RelocateJobSchema = object({
|
|
|
58102
58132
|
finishedAt: number().nullable(),
|
|
58103
58133
|
error: string().nullable()
|
|
58104
58134
|
});
|
|
58135
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
58136
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
58137
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
58105
58138
|
var RelocateFootageInputSchema = object({
|
|
58106
|
-
deviceId: number().optional(),
|
|
58107
58139
|
fromLocationId: string(),
|
|
58108
58140
|
toLocationId: string(),
|
|
58109
58141
|
entities: array(_enum(["segments"])).optional(),
|
|
58142
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
58143
|
+
* pre-orchestration compatibility path. */
|
|
58144
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
58145
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
58146
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
58147
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
58148
|
+
deviceId: number().int().optional(),
|
|
58149
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
58150
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
58151
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
58152
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
58153
|
+
profiles: array(string()).optional(),
|
|
58110
58154
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
58111
58155
|
* never allowed to starve live writers. */
|
|
58112
58156
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
58113
58157
|
});
|
|
58114
|
-
|
|
58115
|
-
|
|
58158
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
58159
|
+
* from persistent recording settings: a migration never changes
|
|
58160
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
58161
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
58162
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
58163
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
58116
58164
|
toLocationId: string(),
|
|
58117
58165
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
58166
|
+
}).extend({ leaseId: string().min(1) });
|
|
58167
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
58168
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
58169
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
58170
|
+
var StorageMigrationClassSchema = _enum([
|
|
58171
|
+
"recordings",
|
|
58172
|
+
"recordingsLow",
|
|
58173
|
+
"eventMedia"
|
|
58174
|
+
]);
|
|
58175
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
58176
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
58177
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
58178
|
+
var StorageMigrationDestinationsSchema = object({
|
|
58179
|
+
recordings: string().min(1).optional(),
|
|
58180
|
+
recordingsLow: string().min(1).optional(),
|
|
58181
|
+
eventMedia: string().min(1).optional()
|
|
58182
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
58183
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
58184
|
+
var StorageMigrationInputSchema = object({
|
|
58185
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
58186
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
58187
|
+
});
|
|
58188
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
58189
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
58190
|
+
* verified. */
|
|
58191
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
58192
|
+
"planning",
|
|
58193
|
+
"pausing",
|
|
58194
|
+
"moving",
|
|
58195
|
+
"verifying",
|
|
58196
|
+
"repointing",
|
|
58197
|
+
"refreshing",
|
|
58198
|
+
"resuming",
|
|
58199
|
+
"done",
|
|
58200
|
+
"failed",
|
|
58201
|
+
"cancelled"
|
|
58202
|
+
]);
|
|
58203
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
58204
|
+
"pipeline",
|
|
58205
|
+
"recorder",
|
|
58206
|
+
"analytics"
|
|
58207
|
+
]);
|
|
58208
|
+
var StorageMigrationMoveSchema = object({
|
|
58209
|
+
storageClass: StorageMigrationClassSchema,
|
|
58210
|
+
fromLocationId: string(),
|
|
58211
|
+
toLocationId: string(),
|
|
58212
|
+
moverJobId: string().nullable(),
|
|
58213
|
+
state: RelocateJobStateSchema.nullable(),
|
|
58214
|
+
error: string().nullable()
|
|
58215
|
+
});
|
|
58216
|
+
var StorageMigrationJobSchema = object({
|
|
58217
|
+
jobId: string(),
|
|
58218
|
+
phase: StorageMigrationPhaseSchema,
|
|
58219
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
58220
|
+
throttleMbps: number(),
|
|
58221
|
+
moves: array(StorageMigrationMoveSchema),
|
|
58222
|
+
pauseLeaseId: string().nullable(),
|
|
58223
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
58224
|
+
repointed: boolean(),
|
|
58225
|
+
cancelRequested: boolean(),
|
|
58226
|
+
startedAt: number(),
|
|
58227
|
+
updatedAt: number(),
|
|
58228
|
+
finishedAt: number().nullable(),
|
|
58229
|
+
error: string().nullable()
|
|
58230
|
+
});
|
|
58231
|
+
var StorageMigrationPlanSchema = object({
|
|
58232
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
58233
|
+
moves: array(object({
|
|
58234
|
+
storageClass: StorageMigrationClassSchema,
|
|
58235
|
+
fromLocationId: string(),
|
|
58236
|
+
toLocationId: string()
|
|
58237
|
+
}))
|
|
58118
58238
|
});
|
|
58119
58239
|
/**
|
|
58120
58240
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -58166,6 +58286,21 @@ var StorageLocationSchema = object({
|
|
|
58166
58286
|
nodeId: string().optional(),
|
|
58167
58287
|
isDefault: boolean().default(false),
|
|
58168
58288
|
isSystem: boolean().default(false),
|
|
58289
|
+
/**
|
|
58290
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
58291
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
58292
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
58293
|
+
* location rather than in any one addon's store — nothing has to be
|
|
58294
|
+
* extended to add the next consumer.
|
|
58295
|
+
*
|
|
58296
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
58297
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
58298
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
58299
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
58300
|
+
* disk must not silently start writing to it); the default of a type is
|
|
58301
|
+
* always stamped `true`.
|
|
58302
|
+
*/
|
|
58303
|
+
enabled: boolean().optional(),
|
|
58169
58304
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
58170
58305
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
58171
58306
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -62735,7 +62870,8 @@ method(object({
|
|
|
62735
62870
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
62736
62871
|
/**
|
|
62737
62872
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
62738
|
-
* filesystem
|
|
62873
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
62874
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
62739
62875
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
62740
62876
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
62741
62877
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -64576,6 +64712,13 @@ var MaskGridDimsSchema = object({
|
|
|
64576
64712
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
64577
64713
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
64578
64714
|
* one trigger.
|
|
64715
|
+
*
|
|
64716
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
64717
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
64718
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
64719
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
64720
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
64721
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
64579
64722
|
*/
|
|
64580
64723
|
var NcDeliverySchema = _enum([
|
|
64581
64724
|
"immediate",
|
|
@@ -64590,15 +64733,32 @@ var NcDeliverySchema = _enum([
|
|
|
64590
64733
|
* depend on a provider's raw event name or payload shape.
|
|
64591
64734
|
*/
|
|
64592
64735
|
var NcSystemEventKindSchema = _enum([
|
|
64593
|
-
"
|
|
64594
|
-
"
|
|
64736
|
+
"device-online",
|
|
64737
|
+
"device-offline",
|
|
64738
|
+
"device-disabled",
|
|
64739
|
+
"device-enabled",
|
|
64595
64740
|
"stream-online",
|
|
64596
64741
|
"stream-offline",
|
|
64597
64742
|
"node-online",
|
|
64598
64743
|
"node-offline",
|
|
64599
64744
|
"addon-update-available",
|
|
64600
|
-
"server-update-available"
|
|
64745
|
+
"server-update-available",
|
|
64746
|
+
"alarm-triggered",
|
|
64747
|
+
"alarm-armed",
|
|
64748
|
+
"alarm-disarmed",
|
|
64749
|
+
"camera-online",
|
|
64750
|
+
"camera-offline",
|
|
64751
|
+
"camera-disabled",
|
|
64752
|
+
"camera-enabled"
|
|
64601
64753
|
]);
|
|
64754
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
64755
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
64756
|
+
"camera-online",
|
|
64757
|
+
"camera-offline",
|
|
64758
|
+
"camera-disabled",
|
|
64759
|
+
"camera-enabled"
|
|
64760
|
+
]);
|
|
64761
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
64602
64762
|
/**
|
|
64603
64763
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
64604
64764
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -64607,6 +64767,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
64607
64767
|
var NcSystemEventConditionSchema = object({
|
|
64608
64768
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
64609
64769
|
deviceIds: array(number().int()).min(1).optional(),
|
|
64770
|
+
/**
|
|
64771
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
64772
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
64773
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
64774
|
+
*
|
|
64775
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
64776
|
+
* one reason: the intake cannot know which devices this household cares
|
|
64777
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
64778
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
64779
|
+
* does not carry) matches no `deviceTypes` list.
|
|
64780
|
+
*/
|
|
64781
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
64610
64782
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
64611
64783
|
packageNames: array(string().min(1)).min(1).optional()
|
|
64612
64784
|
});
|
|
@@ -64657,6 +64829,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
64657
64829
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
64658
64830
|
});
|
|
64659
64831
|
/**
|
|
64832
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
64833
|
+
*
|
|
64834
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
64835
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
64836
|
+
* they already know): a rule matches when, over a sampling window of
|
|
64837
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
64838
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
64839
|
+
*
|
|
64840
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
64841
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
64842
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
64843
|
+
*
|
|
64844
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
64845
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
64846
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
64847
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
64848
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
64849
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
64850
|
+
* ZodEffects the cap path would have to special-case).
|
|
64851
|
+
*
|
|
64852
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
64853
|
+
* must be FULL before it can match — a window that has been open for two
|
|
64854
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
64855
|
+
* `samplingSeconds` decorative.
|
|
64856
|
+
*
|
|
64857
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
64858
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
64859
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
64860
|
+
* an operator who typed `dog` mean the same thing.
|
|
64861
|
+
*/
|
|
64862
|
+
var NcAudioConditionSchema = object({
|
|
64863
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
64864
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
64865
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
64866
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
64867
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
64868
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
64869
|
+
/** Length of the sampling window in seconds. */
|
|
64870
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
64871
|
+
});
|
|
64872
|
+
/**
|
|
64660
64873
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
64661
64874
|
*
|
|
64662
64875
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -64929,7 +65142,33 @@ var NcConditionsSchema = object({
|
|
|
64929
65142
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
64930
65143
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
64931
65144
|
*/
|
|
64932
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
65145
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
65146
|
+
/**
|
|
65147
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
65148
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
65149
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
65150
|
+
* a window that is not full yet, neither filter given). See
|
|
65151
|
+
* {@link NcAudioCondition}.
|
|
65152
|
+
*
|
|
65153
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
65154
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
65155
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
65156
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
65157
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
65158
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
65159
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
65160
|
+
*
|
|
65161
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
65162
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
65163
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
65164
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
65165
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
65166
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
65167
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
65168
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
65169
|
+
* does an audio rule become authorable.
|
|
65170
|
+
*/
|
|
65171
|
+
audio: NcAudioConditionSchema.optional()
|
|
64933
65172
|
});
|
|
64934
65173
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
64935
65174
|
var NcRuleTargetSchema = object({
|
|
@@ -65043,6 +65282,73 @@ var NcThrottleSchema = object({
|
|
|
65043
65282
|
*/
|
|
65044
65283
|
granularity: NcThrottleGranularitySchema.optional()
|
|
65045
65284
|
});
|
|
65285
|
+
/**
|
|
65286
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
65287
|
+
* it judges may be.
|
|
65288
|
+
*
|
|
65289
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
65290
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
65291
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
65292
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
65293
|
+
* tokens for pixels the model pools away.
|
|
65294
|
+
*/
|
|
65295
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
65296
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
65297
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
65298
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
65299
|
+
var NcConfirmExpectSchema = object({
|
|
65300
|
+
op: _enum([
|
|
65301
|
+
">=",
|
|
65302
|
+
">",
|
|
65303
|
+
"<=",
|
|
65304
|
+
"<",
|
|
65305
|
+
"=="
|
|
65306
|
+
]),
|
|
65307
|
+
count: number().int().min(0).max(1e3)
|
|
65308
|
+
});
|
|
65309
|
+
/**
|
|
65310
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
65311
|
+
* to ship and says whether it agrees with the rule.
|
|
65312
|
+
*
|
|
65313
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
65314
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
65315
|
+
* on the operator's phone is not a verdict about this notification.
|
|
65316
|
+
*
|
|
65317
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
65318
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
65319
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
65320
|
+
* open looks in the log exactly like a gate that works.
|
|
65321
|
+
*
|
|
65322
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
65323
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
65324
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
65325
|
+
* above rather than trusting a parse it may never have seen.
|
|
65326
|
+
*/
|
|
65327
|
+
var NcConfirmSchema = object({
|
|
65328
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
65329
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
65330
|
+
enabled: boolean().default(false),
|
|
65331
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
65332
|
+
profileId: string().optional(),
|
|
65333
|
+
/**
|
|
65334
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
65335
|
+
* from the rule (its class and its expectation).
|
|
65336
|
+
*
|
|
65337
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
65338
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
65339
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
65340
|
+
* turn and only rule-authored words land here.
|
|
65341
|
+
*/
|
|
65342
|
+
prompt: string().max(1e3).optional(),
|
|
65343
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
65344
|
+
* own boolean verdict decides. */
|
|
65345
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
65346
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
65347
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
65348
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
65349
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
65350
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
65351
|
+
});
|
|
65046
65352
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
65047
65353
|
var NcRuleInputSchema = object({
|
|
65048
65354
|
name: string().min(1).max(200),
|
|
@@ -65103,7 +65409,13 @@ var NcRuleInputSchema = object({
|
|
|
65103
65409
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
65104
65410
|
* shape as every other actuation.
|
|
65105
65411
|
*/
|
|
65106
|
-
actions: NcRuleActionsSchema.optional()
|
|
65412
|
+
actions: NcRuleActionsSchema.optional(),
|
|
65413
|
+
/**
|
|
65414
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
65415
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
65416
|
+
* did, and absent is the only way to say that without a migration.
|
|
65417
|
+
*/
|
|
65418
|
+
confirm: NcConfirmSchema.optional()
|
|
65107
65419
|
});
|
|
65108
65420
|
/**
|
|
65109
65421
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -65114,7 +65426,37 @@ var NcRuleInputSchema = object({
|
|
|
65114
65426
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
65115
65427
|
* `updateRule` patch.
|
|
65116
65428
|
*/
|
|
65117
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
65429
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
65430
|
+
disabledTargetIds: array(string()).optional(),
|
|
65431
|
+
/**
|
|
65432
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
65433
|
+
*
|
|
65434
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
65435
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
65436
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
65437
|
+
* one — which made every partial edit destructive:
|
|
65438
|
+
*
|
|
65439
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
65440
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
65441
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
65442
|
+
*
|
|
65443
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
65444
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
65445
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
65446
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
65447
|
+
* within a minute of a two-field patch.
|
|
65448
|
+
*
|
|
65449
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
65450
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
65451
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
65452
|
+
* absent key is now genuinely absent.
|
|
65453
|
+
*/
|
|
65454
|
+
enabled: boolean().optional(),
|
|
65455
|
+
conditions: NcConditionsSchema.optional(),
|
|
65456
|
+
media: NcMediaPolicySchema.optional(),
|
|
65457
|
+
throttle: NcThrottleSchema.optional(),
|
|
65458
|
+
priority: number().int().min(1).max(5).optional()
|
|
65459
|
+
});
|
|
65118
65460
|
/** A persisted rule. */
|
|
65119
65461
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
65120
65462
|
id: string(),
|
|
@@ -65415,6 +65757,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
65415
65757
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
65416
65758
|
* copy would lie the first time a rule is disabled.
|
|
65417
65759
|
*/
|
|
65760
|
+
/**
|
|
65761
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
65762
|
+
*
|
|
65763
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
65764
|
+
* per-camera notification switch the Notification Center already owns,
|
|
65765
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
65766
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
65767
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
65768
|
+
* with the switches the operator actually used.
|
|
65769
|
+
*/
|
|
65770
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
65771
|
+
"muted",
|
|
65772
|
+
"detection-off",
|
|
65773
|
+
"offline"
|
|
65774
|
+
]);
|
|
65775
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
65776
|
+
deviceId: number().int(),
|
|
65777
|
+
reason: NcAlarmSkipReasonSchema
|
|
65778
|
+
});
|
|
65418
65779
|
var NcAlarmModeCoverageSchema = object({
|
|
65419
65780
|
mode: AlarmArmModeSchema,
|
|
65420
65781
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -65422,7 +65783,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
65422
65783
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
65423
65784
|
allDevices: boolean(),
|
|
65424
65785
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
65425
|
-
deviceIds: array(number().int())
|
|
65786
|
+
deviceIds: array(number().int()),
|
|
65787
|
+
/**
|
|
65788
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
65789
|
+
* excludes it.
|
|
65790
|
+
*
|
|
65791
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
65792
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
65793
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
65794
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
65795
|
+
* alarm tab.
|
|
65796
|
+
*/
|
|
65797
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
65426
65798
|
});
|
|
65427
65799
|
var NcAlarmConfigSchema = object({
|
|
65428
65800
|
/**
|
|
@@ -66785,13 +67157,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
66785
67157
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
66786
67158
|
kind: "mutation",
|
|
66787
67159
|
auth: "admin"
|
|
66788
|
-
}), method(
|
|
67160
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
66789
67161
|
kind: "mutation",
|
|
66790
67162
|
auth: "admin"
|
|
66791
|
-
}), method(object({
|
|
66792
|
-
kind: "
|
|
67163
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
67164
|
+
kind: "mutation",
|
|
66793
67165
|
auth: "admin"
|
|
66794
|
-
}), method(
|
|
67166
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
67167
|
+
kind: "mutation",
|
|
67168
|
+
auth: "admin"
|
|
67169
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
67170
|
+
kind: "mutation",
|
|
67171
|
+
auth: "admin"
|
|
67172
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
66795
67173
|
kind: "mutation",
|
|
66796
67174
|
auth: "admin"
|
|
66797
67175
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -68248,9 +68626,16 @@ var CameraStatusSchema = object({
|
|
|
68248
68626
|
audio: CameraAudioStatusSchema.nullable(),
|
|
68249
68627
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
68250
68628
|
/**
|
|
68251
|
-
* Per-camera
|
|
68629
|
+
* Per-camera functions an OPERATOR has turned off
|
|
68252
68630
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
68253
68631
|
*
|
|
68632
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
68633
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
68634
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
68635
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
68636
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
68637
|
+
* the difference between a camera being off and a camera being dead.
|
|
68638
|
+
*
|
|
68254
68639
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
68255
68640
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
68256
68641
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -68321,7 +68706,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
68321
68706
|
reachable: boolean(),
|
|
68322
68707
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
68323
68708
|
});
|
|
68324
|
-
method(object({
|
|
68709
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
68710
|
+
kind: "mutation",
|
|
68711
|
+
auth: "admin"
|
|
68712
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
68713
|
+
kind: "mutation",
|
|
68714
|
+
auth: "admin"
|
|
68715
|
+
}), method(object({
|
|
68325
68716
|
deviceId: number(),
|
|
68326
68717
|
agentNodeId: string()
|
|
68327
68718
|
}), object({ success: literal(true) }), {
|
|
@@ -68995,6 +69386,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
68995
69386
|
locationId: string(),
|
|
68996
69387
|
targetBytes: number().int().positive()
|
|
68997
69388
|
}), EvictResultSchema, { kind: "mutation" });
|
|
69389
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
69390
|
+
kind: "mutation",
|
|
69391
|
+
auth: "admin"
|
|
69392
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
69393
|
+
kind: "mutation",
|
|
69394
|
+
auth: "admin"
|
|
69395
|
+
});
|
|
68998
69396
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
68999
69397
|
providerId: string().min(1),
|
|
69000
69398
|
displayName: string().min(1),
|
|
@@ -69098,6 +69496,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
69098
69496
|
label: string(),
|
|
69099
69497
|
description: string().optional()
|
|
69100
69498
|
});
|
|
69499
|
+
/**
|
|
69500
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
69501
|
+
* an instance declares a camera.
|
|
69502
|
+
*/
|
|
69503
|
+
var TerminalInstanceInfoSchema = object({
|
|
69504
|
+
instanceId: string(),
|
|
69505
|
+
cameraStableId: string(),
|
|
69506
|
+
nodeId: string(),
|
|
69507
|
+
profileId: string(),
|
|
69508
|
+
profileLabel: string(),
|
|
69509
|
+
name: string(),
|
|
69510
|
+
enabled: boolean()
|
|
69511
|
+
});
|
|
69512
|
+
var TerminalLegacyCameraSchema = object({
|
|
69513
|
+
stableId: string(),
|
|
69514
|
+
nodeId: string(),
|
|
69515
|
+
profileId: string(),
|
|
69516
|
+
profileLabel: string(),
|
|
69517
|
+
name: string(),
|
|
69518
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
69519
|
+
adoptable: boolean()
|
|
69520
|
+
});
|
|
69101
69521
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
69102
69522
|
seq: number().int().positive(),
|
|
69103
69523
|
kind: literal("data"),
|
|
@@ -69114,7 +69534,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
69114
69534
|
snapshot: string().optional(),
|
|
69115
69535
|
events: array(TerminalOutputEventSchema).readonly()
|
|
69116
69536
|
});
|
|
69117
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
69537
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
69538
|
+
targetNodeId: string().min(1),
|
|
69539
|
+
profileId: string().min(1),
|
|
69540
|
+
name: string().trim().min(1).max(160).optional()
|
|
69541
|
+
}), TerminalInstanceInfoSchema, {
|
|
69542
|
+
kind: "mutation",
|
|
69543
|
+
auth: "admin"
|
|
69544
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
69545
|
+
kind: "mutation",
|
|
69546
|
+
auth: "admin"
|
|
69547
|
+
}), method(object({
|
|
69548
|
+
instanceId: string().min(1),
|
|
69549
|
+
enabled: boolean()
|
|
69550
|
+
}), TerminalInstanceInfoSchema, {
|
|
69551
|
+
kind: "mutation",
|
|
69552
|
+
auth: "admin"
|
|
69553
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
69554
|
+
stableId: string().min(1),
|
|
69555
|
+
name: string().trim().min(1).max(160).optional()
|
|
69556
|
+
}), TerminalInstanceInfoSchema, {
|
|
69557
|
+
kind: "mutation",
|
|
69558
|
+
auth: "admin"
|
|
69559
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
69118
69560
|
profileId: string(),
|
|
69119
69561
|
cols: number().int().positive(),
|
|
69120
69562
|
rows: number().int().positive()
|
|
@@ -69131,7 +69573,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
69131
69573
|
}), method(object({
|
|
69132
69574
|
sessionId: string(),
|
|
69133
69575
|
afterSeq: number().int().nonnegative(),
|
|
69134
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
69576
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
69577
|
+
/**
|
|
69578
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
69579
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
69580
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
69581
|
+
*/
|
|
69582
|
+
waitForOutput: boolean().optional()
|
|
69135
69583
|
}), TerminalOutputBatchSchema, {
|
|
69136
69584
|
kind: "mutation",
|
|
69137
69585
|
auth: "admin",
|
|
@@ -71654,6 +72102,7 @@ var FaceInfoSchema = object({
|
|
|
71654
72102
|
var FaceFilterEnum = _enum([
|
|
71655
72103
|
"unassigned",
|
|
71656
72104
|
"recognized",
|
|
72105
|
+
"identified",
|
|
71657
72106
|
"all"
|
|
71658
72107
|
]);
|
|
71659
72108
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -71682,6 +72131,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
71682
72131
|
kind: "mutation",
|
|
71683
72132
|
auth: "admin"
|
|
71684
72133
|
}), method(object({
|
|
72134
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
72135
|
+
deviceId: number().int().optional(),
|
|
71685
72136
|
limit: number().int().positive().optional(),
|
|
71686
72137
|
filter: FaceFilterEnum.optional(),
|
|
71687
72138
|
/**
|
|
@@ -73911,6 +74362,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
73911
74362
|
capName: string().min(1).max(64),
|
|
73912
74363
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
73913
74364
|
valuePath: string().min(1).max(64)
|
|
74365
|
+
}),
|
|
74366
|
+
object({
|
|
74367
|
+
kind: literal("latest-recognition"),
|
|
74368
|
+
recognition: _enum(["person", "plate"])
|
|
73914
74369
|
})
|
|
73915
74370
|
]);
|
|
73916
74371
|
var OsdSlotBindingSchema = object({
|
|
@@ -74016,6 +74471,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
74016
74471
|
}), object({ success: literal(true) }), {
|
|
74017
74472
|
kind: "mutation",
|
|
74018
74473
|
auth: "admin"
|
|
74474
|
+
}), method(object({
|
|
74475
|
+
sourceDeviceId: number().int(),
|
|
74476
|
+
targetDeviceId: number().int()
|
|
74477
|
+
}), object({
|
|
74478
|
+
copied: number().int().nonnegative(),
|
|
74479
|
+
skipped: number().int().nonnegative()
|
|
74480
|
+
}), {
|
|
74481
|
+
kind: "mutation",
|
|
74482
|
+
auth: "admin"
|
|
74019
74483
|
}), method(object({
|
|
74020
74484
|
deviceId: number().int(),
|
|
74021
74485
|
slotId: string().min(1),
|
|
@@ -74938,7 +75402,19 @@ var RecordingManifestSchema = object({
|
|
|
74938
75402
|
* profiles/subtrees/locations on this node). */
|
|
74939
75403
|
var RecordingDeviceUsageSchema = object({
|
|
74940
75404
|
deviceId: number(),
|
|
74941
|
-
usedBytes: number()
|
|
75405
|
+
usedBytes: number(),
|
|
75406
|
+
/**
|
|
75407
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
75408
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
75409
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
75410
|
+
*
|
|
75411
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
75412
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
75413
|
+
* field must keep validating that older provider's payload: the framework
|
|
75414
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
75415
|
+
* the later of the two.
|
|
75416
|
+
*/
|
|
75417
|
+
oldestMs: number().nullable().optional()
|
|
74942
75418
|
});
|
|
74943
75419
|
/** Recording storage usage + capacity for one storage location. */
|
|
74944
75420
|
var RecordingLocationUsageSchema = object({
|
|
@@ -74966,6 +75442,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
74966
75442
|
locations: array(RecordingLocationUsageSchema)
|
|
74967
75443
|
});
|
|
74968
75444
|
/**
|
|
75445
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
75446
|
+
*
|
|
75447
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
75448
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
75449
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
75450
|
+
* location, run FIFO behind the single-flight mover.
|
|
75451
|
+
*
|
|
75452
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
75453
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
75454
|
+
* (empty on the plan).
|
|
75455
|
+
*/
|
|
75456
|
+
var RecordingRebalanceMoveSchema = object({
|
|
75457
|
+
deviceId: number(),
|
|
75458
|
+
profile: string(),
|
|
75459
|
+
fromLocationId: string(),
|
|
75460
|
+
toLocationId: string(),
|
|
75461
|
+
bytes: number(),
|
|
75462
|
+
files: number().int()
|
|
75463
|
+
});
|
|
75464
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
75465
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
75466
|
+
* that had nothing to do. */
|
|
75467
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
75468
|
+
"unassigned",
|
|
75469
|
+
"target-not-writable",
|
|
75470
|
+
"below-threshold",
|
|
75471
|
+
"no-headroom"
|
|
75472
|
+
]);
|
|
75473
|
+
var RecordingRebalanceSkipSchema = object({
|
|
75474
|
+
deviceId: number(),
|
|
75475
|
+
profile: string(),
|
|
75476
|
+
fromLocationId: string(),
|
|
75477
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
75478
|
+
toLocationId: string().nullable(),
|
|
75479
|
+
bytes: number(),
|
|
75480
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
75481
|
+
});
|
|
75482
|
+
var RecordingRebalancePlanSchema = object({
|
|
75483
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
75484
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
75485
|
+
bytesToMove: number(),
|
|
75486
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
75487
|
+
jobIds: array(string())
|
|
75488
|
+
});
|
|
75489
|
+
var RecordingRebalanceInputSchema = object({
|
|
75490
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
75491
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
75492
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
75493
|
+
minMoveGb: number().min(0).optional()
|
|
75494
|
+
});
|
|
75495
|
+
/**
|
|
74969
75496
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
74970
75497
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
74971
75498
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -75113,6 +75640,21 @@ method(object({
|
|
|
75113
75640
|
}), {
|
|
75114
75641
|
kind: "mutation",
|
|
75115
75642
|
auth: "admin"
|
|
75643
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
75644
|
+
kind: "mutation",
|
|
75645
|
+
auth: "admin"
|
|
75646
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
75647
|
+
kind: "mutation",
|
|
75648
|
+
auth: "admin"
|
|
75649
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
75650
|
+
kind: "mutation",
|
|
75651
|
+
auth: "admin"
|
|
75652
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
75653
|
+
kind: "mutation",
|
|
75654
|
+
auth: "admin"
|
|
75655
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
75656
|
+
kind: "mutation",
|
|
75657
|
+
auth: "admin"
|
|
75116
75658
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
75117
75659
|
kind: "mutation",
|
|
75118
75660
|
auth: "admin"
|
|
@@ -75122,9 +75664,15 @@ method(object({
|
|
|
75122
75664
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
75123
75665
|
kind: "mutation",
|
|
75124
75666
|
auth: "admin"
|
|
75667
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
75668
|
+
kind: "query",
|
|
75669
|
+
auth: "admin"
|
|
75670
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
75671
|
+
kind: "mutation",
|
|
75672
|
+
auth: "admin"
|
|
75125
75673
|
});
|
|
75126
75674
|
/**
|
|
75127
|
-
* `
|
|
75675
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
75128
75676
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
75129
75677
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
75130
75678
|
* delete-after-download.
|
|
@@ -75139,10 +75687,42 @@ method(object({
|
|
|
75139
75687
|
*/
|
|
75140
75688
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
75141
75689
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
75690
|
+
/**
|
|
75691
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
75692
|
+
*
|
|
75693
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
75694
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
75695
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
75696
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
75697
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
75698
|
+
*/
|
|
75699
|
+
var ExportDenseRangeSchema = object({
|
|
75700
|
+
fromSec: number().nonnegative(),
|
|
75701
|
+
toSec: number().nonnegative()
|
|
75702
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
75703
|
+
/**
|
|
75704
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
75705
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
75706
|
+
*
|
|
75707
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
75708
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
75709
|
+
*/
|
|
75710
|
+
var ExportDenseSchema = object({
|
|
75711
|
+
everyMs: number().int().positive(),
|
|
75712
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
75713
|
+
});
|
|
75142
75714
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
75143
75715
|
var ExportTimelapseSchema = object({
|
|
75144
75716
|
everyMs: number().int().positive(),
|
|
75145
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
75717
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
75718
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
75719
|
+
dense: ExportDenseSchema.optional()
|
|
75720
|
+
}).superRefine((v, ctx) => {
|
|
75721
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
75722
|
+
code: ZodIssueCode.custom,
|
|
75723
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
75724
|
+
path: ["dense", "everyMs"]
|
|
75725
|
+
});
|
|
75146
75726
|
});
|
|
75147
75727
|
/**
|
|
75148
75728
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -75200,6 +75780,19 @@ var ExportDownloadSchema = object({
|
|
|
75200
75780
|
url: string(),
|
|
75201
75781
|
endpoints: array(string())
|
|
75202
75782
|
});
|
|
75783
|
+
/**
|
|
75784
|
+
* A finished export's bytes, inline.
|
|
75785
|
+
*
|
|
75786
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
75787
|
+
* against, so nobody has to infer it from the base64 length.
|
|
75788
|
+
*/
|
|
75789
|
+
var ExportBytesSchema = object({
|
|
75790
|
+
base64: string(),
|
|
75791
|
+
contentType: string(),
|
|
75792
|
+
/** Suggested filename, extension included. */
|
|
75793
|
+
name: string(),
|
|
75794
|
+
bytes: number().int().nonnegative()
|
|
75795
|
+
});
|
|
75203
75796
|
method(object({
|
|
75204
75797
|
deviceId: number(),
|
|
75205
75798
|
profile: string(),
|
|
@@ -75224,6 +75817,9 @@ method(object({
|
|
|
75224
75817
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
75225
75818
|
kind: "query",
|
|
75226
75819
|
auth: "protected"
|
|
75820
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
75821
|
+
kind: "query",
|
|
75822
|
+
auth: "protected"
|
|
75227
75823
|
});
|
|
75228
75824
|
/**
|
|
75229
75825
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -80725,6 +81321,12 @@ Object.freeze({
|
|
|
80725
81321
|
addonId: null,
|
|
80726
81322
|
access: "delete"
|
|
80727
81323
|
},
|
|
81324
|
+
"osdManager.copyDeviceConfiguration": {
|
|
81325
|
+
capName: "osd-manager",
|
|
81326
|
+
capScope: "system",
|
|
81327
|
+
addonId: null,
|
|
81328
|
+
access: "create"
|
|
81329
|
+
},
|
|
80728
81330
|
"osdManager.getConditionSupport": {
|
|
80729
81331
|
capName: "osd-manager",
|
|
80730
81332
|
capScope: "system",
|
|
@@ -80821,7 +81423,7 @@ Object.freeze({
|
|
|
80821
81423
|
addonId: null,
|
|
80822
81424
|
access: "create"
|
|
80823
81425
|
},
|
|
80824
|
-
"pipelineAnalytics.
|
|
81426
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
80825
81427
|
capName: "pipeline-analytics",
|
|
80826
81428
|
capScope: "device",
|
|
80827
81429
|
addonId: null,
|
|
@@ -80893,12 +81495,6 @@ Object.freeze({
|
|
|
80893
81495
|
addonId: null,
|
|
80894
81496
|
access: "view"
|
|
80895
81497
|
},
|
|
80896
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
80897
|
-
capName: "pipeline-analytics",
|
|
80898
|
-
capScope: "device",
|
|
80899
|
-
addonId: null,
|
|
80900
|
-
access: "view"
|
|
80901
|
-
},
|
|
80902
81498
|
"pipelineAnalytics.getMotionEvents": {
|
|
80903
81499
|
capName: "pipeline-analytics",
|
|
80904
81500
|
capScope: "device",
|
|
@@ -80935,6 +81531,12 @@ Object.freeze({
|
|
|
80935
81531
|
addonId: null,
|
|
80936
81532
|
access: "view"
|
|
80937
81533
|
},
|
|
81534
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
81535
|
+
capName: "pipeline-analytics",
|
|
81536
|
+
capScope: "device",
|
|
81537
|
+
addonId: null,
|
|
81538
|
+
access: "view"
|
|
81539
|
+
},
|
|
80938
81540
|
"pipelineAnalytics.getTrack": {
|
|
80939
81541
|
capName: "pipeline-analytics",
|
|
80940
81542
|
capScope: "device",
|
|
@@ -81013,6 +81615,12 @@ Object.freeze({
|
|
|
81013
81615
|
addonId: null,
|
|
81014
81616
|
access: "view"
|
|
81015
81617
|
},
|
|
81618
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
81619
|
+
capName: "pipeline-analytics",
|
|
81620
|
+
capScope: "device",
|
|
81621
|
+
addonId: null,
|
|
81622
|
+
access: "create"
|
|
81623
|
+
},
|
|
81016
81624
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
81017
81625
|
capName: "pipeline-analytics",
|
|
81018
81626
|
capScope: "device",
|
|
@@ -81043,7 +81651,7 @@ Object.freeze({
|
|
|
81043
81651
|
addonId: null,
|
|
81044
81652
|
access: "create"
|
|
81045
81653
|
},
|
|
81046
|
-
"pipelineAnalytics.
|
|
81654
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
81047
81655
|
capName: "pipeline-analytics",
|
|
81048
81656
|
capScope: "device",
|
|
81049
81657
|
addonId: null,
|
|
@@ -81055,6 +81663,12 @@ Object.freeze({
|
|
|
81055
81663
|
addonId: null,
|
|
81056
81664
|
access: "create"
|
|
81057
81665
|
},
|
|
81666
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
81667
|
+
capName: "pipeline-analytics",
|
|
81668
|
+
capScope: "device",
|
|
81669
|
+
addonId: null,
|
|
81670
|
+
access: "create"
|
|
81671
|
+
},
|
|
81058
81672
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
81059
81673
|
capName: "pipeline-analytics",
|
|
81060
81674
|
capScope: "device",
|
|
@@ -81079,6 +81693,12 @@ Object.freeze({
|
|
|
81079
81693
|
addonId: null,
|
|
81080
81694
|
access: "create"
|
|
81081
81695
|
},
|
|
81696
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
81697
|
+
capName: "pipeline-analytics",
|
|
81698
|
+
capScope: "device",
|
|
81699
|
+
addonId: null,
|
|
81700
|
+
access: "create"
|
|
81701
|
+
},
|
|
81082
81702
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
81083
81703
|
capName: "pipeline-analytics",
|
|
81084
81704
|
capScope: "device",
|
|
@@ -81445,6 +82065,12 @@ Object.freeze({
|
|
|
81445
82065
|
addonId: null,
|
|
81446
82066
|
access: "view"
|
|
81447
82067
|
},
|
|
82068
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
82069
|
+
capName: "pipeline-orchestrator",
|
|
82070
|
+
capScope: "system",
|
|
82071
|
+
addonId: null,
|
|
82072
|
+
access: "create"
|
|
82073
|
+
},
|
|
81448
82074
|
"pipelineOrchestrator.rebalance": {
|
|
81449
82075
|
capName: "pipeline-orchestrator",
|
|
81450
82076
|
capScope: "system",
|
|
@@ -81469,6 +82095,12 @@ Object.freeze({
|
|
|
81469
82095
|
addonId: null,
|
|
81470
82096
|
access: "view"
|
|
81471
82097
|
},
|
|
82098
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
82099
|
+
capName: "pipeline-orchestrator",
|
|
82100
|
+
capScope: "system",
|
|
82101
|
+
addonId: null,
|
|
82102
|
+
access: "create"
|
|
82103
|
+
},
|
|
81472
82104
|
"pipelineOrchestrator.saveTemplate": {
|
|
81473
82105
|
capName: "pipeline-orchestrator",
|
|
81474
82106
|
capScope: "system",
|
|
@@ -81865,7 +82497,13 @@ Object.freeze({
|
|
|
81865
82497
|
addonId: null,
|
|
81866
82498
|
access: "create"
|
|
81867
82499
|
},
|
|
81868
|
-
"recording.
|
|
82500
|
+
"recording.cancelRelocateJob": {
|
|
82501
|
+
capName: "recording",
|
|
82502
|
+
capScope: "system",
|
|
82503
|
+
addonId: null,
|
|
82504
|
+
access: "create"
|
|
82505
|
+
},
|
|
82506
|
+
"recording.cancelStorageMigrationMove": {
|
|
81869
82507
|
capName: "recording",
|
|
81870
82508
|
capScope: "system",
|
|
81871
82509
|
addonId: null,
|
|
@@ -81901,7 +82539,7 @@ Object.freeze({
|
|
|
81901
82539
|
addonId: null,
|
|
81902
82540
|
access: "view"
|
|
81903
82541
|
},
|
|
81904
|
-
"recording.
|
|
82542
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
81905
82543
|
capName: "recording",
|
|
81906
82544
|
capScope: "system",
|
|
81907
82545
|
addonId: null,
|
|
@@ -81919,12 +82557,30 @@ Object.freeze({
|
|
|
81919
82557
|
addonId: null,
|
|
81920
82558
|
access: "view"
|
|
81921
82559
|
},
|
|
82560
|
+
"recording.listRelocateJobs": {
|
|
82561
|
+
capName: "recording",
|
|
82562
|
+
capScope: "system",
|
|
82563
|
+
addonId: null,
|
|
82564
|
+
access: "view"
|
|
82565
|
+
},
|
|
81922
82566
|
"recording.locateSegment": {
|
|
81923
82567
|
capName: "recording",
|
|
81924
82568
|
capScope: "system",
|
|
81925
82569
|
addonId: null,
|
|
81926
82570
|
access: "view"
|
|
81927
82571
|
},
|
|
82572
|
+
"recording.pauseForStorageMigration": {
|
|
82573
|
+
capName: "recording",
|
|
82574
|
+
capScope: "system",
|
|
82575
|
+
addonId: null,
|
|
82576
|
+
access: "create"
|
|
82577
|
+
},
|
|
82578
|
+
"recording.planStorageRebalance": {
|
|
82579
|
+
capName: "recording",
|
|
82580
|
+
capScope: "system",
|
|
82581
|
+
addonId: null,
|
|
82582
|
+
access: "view"
|
|
82583
|
+
},
|
|
81928
82584
|
"recording.pruneFootage": {
|
|
81929
82585
|
capName: "recording",
|
|
81930
82586
|
capScope: "system",
|
|
@@ -81943,6 +82599,12 @@ Object.freeze({
|
|
|
81943
82599
|
addonId: null,
|
|
81944
82600
|
access: "view"
|
|
81945
82601
|
},
|
|
82602
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
82603
|
+
capName: "recording",
|
|
82604
|
+
capScope: "system",
|
|
82605
|
+
addonId: null,
|
|
82606
|
+
access: "create"
|
|
82607
|
+
},
|
|
81946
82608
|
"recording.relocateFootage": {
|
|
81947
82609
|
capName: "recording",
|
|
81948
82610
|
capScope: "system",
|
|
@@ -81967,44 +82629,68 @@ Object.freeze({
|
|
|
81967
82629
|
addonId: null,
|
|
81968
82630
|
access: "create"
|
|
81969
82631
|
},
|
|
82632
|
+
"recording.resumeForStorageMigration": {
|
|
82633
|
+
capName: "recording",
|
|
82634
|
+
capScope: "system",
|
|
82635
|
+
addonId: null,
|
|
82636
|
+
access: "create"
|
|
82637
|
+
},
|
|
81970
82638
|
"recording.setDeviceConfig": {
|
|
81971
82639
|
capName: "recording",
|
|
81972
82640
|
capScope: "system",
|
|
81973
82641
|
addonId: null,
|
|
81974
82642
|
access: "create"
|
|
81975
82643
|
},
|
|
82644
|
+
"recording.startStorageMigrationMove": {
|
|
82645
|
+
capName: "recording",
|
|
82646
|
+
capScope: "system",
|
|
82647
|
+
addonId: null,
|
|
82648
|
+
access: "create"
|
|
82649
|
+
},
|
|
82650
|
+
"recording.startStorageRebalance": {
|
|
82651
|
+
capName: "recording",
|
|
82652
|
+
capScope: "system",
|
|
82653
|
+
addonId: null,
|
|
82654
|
+
access: "create"
|
|
82655
|
+
},
|
|
81976
82656
|
"recordingExport.cancelExport": {
|
|
81977
|
-
capName: "
|
|
82657
|
+
capName: "recording-export",
|
|
81978
82658
|
capScope: "system",
|
|
81979
82659
|
addonId: null,
|
|
81980
82660
|
access: "create"
|
|
81981
82661
|
},
|
|
81982
82662
|
"recordingExport.createExport": {
|
|
81983
|
-
capName: "
|
|
82663
|
+
capName: "recording-export",
|
|
81984
82664
|
capScope: "system",
|
|
81985
82665
|
addonId: null,
|
|
81986
82666
|
access: "create"
|
|
81987
82667
|
},
|
|
81988
82668
|
"recordingExport.deleteExport": {
|
|
81989
|
-
capName: "
|
|
82669
|
+
capName: "recording-export",
|
|
81990
82670
|
capScope: "system",
|
|
81991
82671
|
addonId: null,
|
|
81992
82672
|
access: "delete"
|
|
81993
82673
|
},
|
|
81994
82674
|
"recordingExport.getDownloadUrl": {
|
|
81995
|
-
capName: "
|
|
82675
|
+
capName: "recording-export",
|
|
81996
82676
|
capScope: "system",
|
|
81997
82677
|
addonId: null,
|
|
81998
82678
|
access: "view"
|
|
81999
82679
|
},
|
|
82000
82680
|
"recordingExport.getExport": {
|
|
82001
|
-
capName: "
|
|
82681
|
+
capName: "recording-export",
|
|
82002
82682
|
capScope: "system",
|
|
82003
82683
|
addonId: null,
|
|
82004
82684
|
access: "view"
|
|
82005
82685
|
},
|
|
82006
82686
|
"recordingExport.listExports": {
|
|
82007
|
-
capName: "
|
|
82687
|
+
capName: "recording-export",
|
|
82688
|
+
capScope: "system",
|
|
82689
|
+
addonId: null,
|
|
82690
|
+
access: "view"
|
|
82691
|
+
},
|
|
82692
|
+
"recordingExport.readExportBytes": {
|
|
82693
|
+
capName: "recording-export",
|
|
82008
82694
|
capScope: "system",
|
|
82009
82695
|
addonId: null,
|
|
82010
82696
|
access: "view"
|
|
@@ -82363,6 +83049,30 @@ Object.freeze({
|
|
|
82363
83049
|
addonId: null,
|
|
82364
83050
|
access: "view"
|
|
82365
83051
|
},
|
|
83052
|
+
"storageMigration.cancel": {
|
|
83053
|
+
capName: "storage-migration",
|
|
83054
|
+
capScope: "system",
|
|
83055
|
+
addonId: null,
|
|
83056
|
+
access: "create"
|
|
83057
|
+
},
|
|
83058
|
+
"storageMigration.plan": {
|
|
83059
|
+
capName: "storage-migration",
|
|
83060
|
+
capScope: "system",
|
|
83061
|
+
addonId: null,
|
|
83062
|
+
access: "view"
|
|
83063
|
+
},
|
|
83064
|
+
"storageMigration.start": {
|
|
83065
|
+
capName: "storage-migration",
|
|
83066
|
+
capScope: "system",
|
|
83067
|
+
addonId: null,
|
|
83068
|
+
access: "create"
|
|
83069
|
+
},
|
|
83070
|
+
"storageMigration.status": {
|
|
83071
|
+
capName: "storage-migration",
|
|
83072
|
+
capScope: "system",
|
|
83073
|
+
addonId: null,
|
|
83074
|
+
access: "view"
|
|
83075
|
+
},
|
|
82366
83076
|
"storageProvider.abortUpload": {
|
|
82367
83077
|
capName: "storage-provider",
|
|
82368
83078
|
capScope: "system",
|
|
@@ -82741,12 +83451,42 @@ Object.freeze({
|
|
|
82741
83451
|
addonId: null,
|
|
82742
83452
|
access: "create"
|
|
82743
83453
|
},
|
|
83454
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
83455
|
+
capName: "terminal-session",
|
|
83456
|
+
capScope: "system",
|
|
83457
|
+
addonId: null,
|
|
83458
|
+
access: "create"
|
|
83459
|
+
},
|
|
82744
83460
|
"terminalSession.close": {
|
|
82745
83461
|
capName: "terminal-session",
|
|
82746
83462
|
capScope: "system",
|
|
82747
83463
|
addonId: null,
|
|
82748
83464
|
access: "create"
|
|
82749
83465
|
},
|
|
83466
|
+
"terminalSession.createInstance": {
|
|
83467
|
+
capName: "terminal-session",
|
|
83468
|
+
capScope: "system",
|
|
83469
|
+
addonId: null,
|
|
83470
|
+
access: "create"
|
|
83471
|
+
},
|
|
83472
|
+
"terminalSession.deleteInstance": {
|
|
83473
|
+
capName: "terminal-session",
|
|
83474
|
+
capScope: "system",
|
|
83475
|
+
addonId: null,
|
|
83476
|
+
access: "delete"
|
|
83477
|
+
},
|
|
83478
|
+
"terminalSession.listInstances": {
|
|
83479
|
+
capName: "terminal-session",
|
|
83480
|
+
capScope: "system",
|
|
83481
|
+
addonId: null,
|
|
83482
|
+
access: "view"
|
|
83483
|
+
},
|
|
83484
|
+
"terminalSession.listLegacyCameras": {
|
|
83485
|
+
capName: "terminal-session",
|
|
83486
|
+
capScope: "system",
|
|
83487
|
+
addonId: null,
|
|
83488
|
+
access: "view"
|
|
83489
|
+
},
|
|
82750
83490
|
"terminalSession.listProfiles": {
|
|
82751
83491
|
capName: "terminal-session",
|
|
82752
83492
|
capScope: "system",
|
|
@@ -82777,6 +83517,12 @@ Object.freeze({
|
|
|
82777
83517
|
addonId: null,
|
|
82778
83518
|
access: "create"
|
|
82779
83519
|
},
|
|
83520
|
+
"terminalSession.setInstanceEnabled": {
|
|
83521
|
+
capName: "terminal-session",
|
|
83522
|
+
capScope: "system",
|
|
83523
|
+
addonId: null,
|
|
83524
|
+
access: "create"
|
|
83525
|
+
},
|
|
82780
83526
|
"terminalSession.writeInput": {
|
|
82781
83527
|
capName: "terminal-session",
|
|
82782
83528
|
capScope: "system",
|
|
@@ -83321,6 +84067,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
83321
84067
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
83322
84068
|
var PriorityField = number().int().min(1).max(5);
|
|
83323
84069
|
/**
|
|
84070
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
84071
|
+
*
|
|
84072
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
84073
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
84074
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
84075
|
+
*
|
|
84076
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
84077
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
84078
|
+
*
|
|
84079
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
84080
|
+
*
|
|
84081
|
+
* 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.
|
|
84082
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
84083
|
+
* and therefore the length of a quiet night, does not move.
|
|
84084
|
+
*
|
|
84085
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
84086
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
84087
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
84088
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
84089
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
84090
|
+
*/
|
|
84091
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
84092
|
+
/**
|
|
84093
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
84094
|
+
*
|
|
84095
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
84096
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
84097
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
84098
|
+
* that range every ~583 ms.
|
|
84099
|
+
*
|
|
84100
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
84101
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
84102
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
84103
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
84104
|
+
* schema change and are the tracked follow-up.
|
|
84105
|
+
*
|
|
84106
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
84107
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
84108
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
84109
|
+
* happened.
|
|
84110
|
+
*/
|
|
84111
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
84112
|
+
/**
|
|
84113
|
+
* Caption burned into the notification's preview frame.
|
|
84114
|
+
*
|
|
84115
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
84116
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
84117
|
+
* templating dialect for one field would be a second thing to explain.
|
|
84118
|
+
*
|
|
84119
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
84120
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
84121
|
+
* the reason this is not `.min(1)`.
|
|
84122
|
+
*/
|
|
84123
|
+
var PreviewTextField = string().max(200);
|
|
84124
|
+
/**
|
|
84125
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
84126
|
+
*
|
|
84127
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
84128
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
84129
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
84130
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
84131
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
84132
|
+
* them.
|
|
84133
|
+
*
|
|
84134
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
84135
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
84136
|
+
* paying that on the deploy that shipped it.
|
|
84137
|
+
*
|
|
84138
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
84139
|
+
*/
|
|
84140
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
84141
|
+
/**
|
|
84142
|
+
* Which detection classes the notification reports counts for.
|
|
84143
|
+
*
|
|
84144
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
84145
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
84146
|
+
* class the window actually contained", which is what an operator who never
|
|
84147
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
84148
|
+
* counts cars all night).
|
|
84149
|
+
*
|
|
84150
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
84151
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
84152
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
84153
|
+
* not emit.
|
|
84154
|
+
*
|
|
84155
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
84156
|
+
* - `{{detections}}` — total over the reported classes
|
|
84157
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
84158
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
84159
|
+
* one per class, `count_` + the class name
|
|
84160
|
+
*
|
|
84161
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
84162
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
84163
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
84164
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
84165
|
+
*/
|
|
84166
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
84167
|
+
/**
|
|
83324
84168
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
83325
84169
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
83326
84170
|
* here (see the ownership note above).
|
|
@@ -83340,9 +84184,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
83340
84184
|
cadenceSec: CadenceSecField.default(15),
|
|
83341
84185
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
83342
84186
|
framerate: FramerateField.default(10),
|
|
84187
|
+
/**
|
|
84188
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
84189
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
84190
|
+
* field gets.
|
|
84191
|
+
*/
|
|
84192
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
84193
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
84194
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
83343
84195
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
83344
84196
|
targets: TargetsField,
|
|
83345
84197
|
template: TimelapseTemplateSchema.optional(),
|
|
84198
|
+
/**
|
|
84199
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
84200
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
84201
|
+
*
|
|
84202
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
84203
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
84204
|
+
* silently clear the caption too.
|
|
84205
|
+
*/
|
|
84206
|
+
previewText: PreviewTextField.optional(),
|
|
84207
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
84208
|
+
previewMode: PreviewModeField.default("image"),
|
|
84209
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
84210
|
+
reportClasses: ReportClassesField.optional(),
|
|
83346
84211
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
83347
84212
|
priority: PriorityField.default(3)
|
|
83348
84213
|
});
|
|
@@ -83353,8 +84218,13 @@ object({
|
|
|
83353
84218
|
schedule: NcScheduleSchema.optional(),
|
|
83354
84219
|
cadenceSec: CadenceSecField.optional(),
|
|
83355
84220
|
framerate: FramerateField.optional(),
|
|
84221
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
84222
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
83356
84223
|
targets: TargetsField.optional(),
|
|
83357
84224
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
84225
|
+
previewText: PreviewTextField.optional(),
|
|
84226
|
+
previewMode: PreviewModeField.optional(),
|
|
84227
|
+
reportClasses: ReportClassesField.optional(),
|
|
83358
84228
|
priority: PriorityField.optional()
|
|
83359
84229
|
});
|
|
83360
84230
|
TimelapseRuleInputSchema.extend({
|
|
@@ -83366,10 +84236,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
83366
84236
|
*/
|
|
83367
84237
|
ownerUserId: string().optional(),
|
|
83368
84238
|
/**
|
|
83369
|
-
* Epoch-ms of the
|
|
83370
|
-
*
|
|
84239
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
84240
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
84241
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
83371
84242
|
*/
|
|
83372
84243
|
lastGeneratedAt: number().optional(),
|
|
84244
|
+
/**
|
|
84245
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
84246
|
+
* re-generation guard's real durable state.
|
|
84247
|
+
*
|
|
84248
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
84249
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
84250
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
84251
|
+
* already done — and B's night is gone for good, because the window will not
|
|
84252
|
+
* come back.
|
|
84253
|
+
*
|
|
84254
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
84255
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
84256
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
84257
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
84258
|
+
* once, on the deploy that shipped the map.
|
|
84259
|
+
*/
|
|
84260
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
83373
84261
|
/** userId of the caller who created the rule (server-stamped). */
|
|
83374
84262
|
createdBy: string(),
|
|
83375
84263
|
createdAt: number(),
|