@camstack/addon-provider-amcrest 0.2.13 → 0.2.15
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 +954 -62
- package/dist/addon.mjs +954 -62
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7198,8 +7198,31 @@ var AdoptionJobSchema = object({
|
|
|
7198
7198
|
error: string().nullable()
|
|
7199
7199
|
});
|
|
7200
7200
|
/**
|
|
7201
|
-
* Per-camera FUNCTION SWITCHES
|
|
7202
|
-
*
|
|
7201
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7202
|
+
*
|
|
7203
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7204
|
+
*
|
|
7205
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7206
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7207
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7208
|
+
* every function already had a settings page of its own, and a second place to
|
|
7209
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7210
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7211
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7212
|
+
* (which was always first-class; the switch was a veneer over
|
|
7213
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7214
|
+
* per-device setting, the two camera planes to their own components.
|
|
7215
|
+
*
|
|
7216
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7217
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7218
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7219
|
+
* never about a control panel.
|
|
7220
|
+
*
|
|
7221
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7222
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7223
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7224
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7225
|
+
* stop; nothing new may be built on it.
|
|
7203
7226
|
*
|
|
7204
7227
|
* ## This file adds no state
|
|
7205
7228
|
*
|
|
@@ -7544,14 +7567,21 @@ var RecordingConfigSchema = object({
|
|
|
7544
7567
|
/**
|
|
7545
7568
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7546
7569
|
*
|
|
7547
|
-
* One shape shared by the recorder
|
|
7548
|
-
*
|
|
7549
|
-
*
|
|
7550
|
-
*
|
|
7551
|
-
*
|
|
7552
|
-
|
|
7570
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7571
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7572
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7573
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7574
|
+
* addon surface.
|
|
7575
|
+
*/
|
|
7576
|
+
/**
|
|
7577
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7578
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7579
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7580
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7581
|
+
* runs at all.
|
|
7553
7582
|
*/
|
|
7554
7583
|
var RelocateJobStateSchema = _enum([
|
|
7584
|
+
"queued",
|
|
7555
7585
|
"running",
|
|
7556
7586
|
"done",
|
|
7557
7587
|
"failed",
|
|
@@ -7576,19 +7606,109 @@ var RelocateJobSchema = object({
|
|
|
7576
7606
|
finishedAt: number().nullable(),
|
|
7577
7607
|
error: string().nullable()
|
|
7578
7608
|
});
|
|
7609
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7610
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7611
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7579
7612
|
var RelocateFootageInputSchema = object({
|
|
7580
|
-
deviceId: number().optional(),
|
|
7581
7613
|
fromLocationId: string(),
|
|
7582
7614
|
toLocationId: string(),
|
|
7583
7615
|
entities: array(_enum(["segments"])).optional(),
|
|
7616
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7617
|
+
* pre-orchestration compatibility path. */
|
|
7618
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7619
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7620
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7621
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7622
|
+
deviceId: number().int().optional(),
|
|
7623
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7624
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7625
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7626
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7627
|
+
profiles: array(string()).optional(),
|
|
7584
7628
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7585
7629
|
* never allowed to starve live writers. */
|
|
7586
7630
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7587
7631
|
});
|
|
7588
|
-
|
|
7589
|
-
|
|
7632
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7633
|
+
* from persistent recording settings: a migration never changes
|
|
7634
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7635
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7636
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7637
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7590
7638
|
toLocationId: string(),
|
|
7591
7639
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7640
|
+
}).extend({ leaseId: string().min(1) });
|
|
7641
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7642
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7643
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7644
|
+
var StorageMigrationClassSchema = _enum([
|
|
7645
|
+
"recordings",
|
|
7646
|
+
"recordingsLow",
|
|
7647
|
+
"eventMedia"
|
|
7648
|
+
]);
|
|
7649
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7650
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7651
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7652
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7653
|
+
recordings: string().min(1).optional(),
|
|
7654
|
+
recordingsLow: string().min(1).optional(),
|
|
7655
|
+
eventMedia: string().min(1).optional()
|
|
7656
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7657
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7658
|
+
var StorageMigrationInputSchema = object({
|
|
7659
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7660
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7661
|
+
});
|
|
7662
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7663
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7664
|
+
* verified. */
|
|
7665
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7666
|
+
"planning",
|
|
7667
|
+
"pausing",
|
|
7668
|
+
"moving",
|
|
7669
|
+
"verifying",
|
|
7670
|
+
"repointing",
|
|
7671
|
+
"refreshing",
|
|
7672
|
+
"resuming",
|
|
7673
|
+
"done",
|
|
7674
|
+
"failed",
|
|
7675
|
+
"cancelled"
|
|
7676
|
+
]);
|
|
7677
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7678
|
+
"pipeline",
|
|
7679
|
+
"recorder",
|
|
7680
|
+
"analytics"
|
|
7681
|
+
]);
|
|
7682
|
+
var StorageMigrationMoveSchema = object({
|
|
7683
|
+
storageClass: StorageMigrationClassSchema,
|
|
7684
|
+
fromLocationId: string(),
|
|
7685
|
+
toLocationId: string(),
|
|
7686
|
+
moverJobId: string().nullable(),
|
|
7687
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7688
|
+
error: string().nullable()
|
|
7689
|
+
});
|
|
7690
|
+
var StorageMigrationJobSchema = object({
|
|
7691
|
+
jobId: string(),
|
|
7692
|
+
phase: StorageMigrationPhaseSchema,
|
|
7693
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7694
|
+
throttleMbps: number(),
|
|
7695
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7696
|
+
pauseLeaseId: string().nullable(),
|
|
7697
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7698
|
+
repointed: boolean(),
|
|
7699
|
+
cancelRequested: boolean(),
|
|
7700
|
+
startedAt: number(),
|
|
7701
|
+
updatedAt: number(),
|
|
7702
|
+
finishedAt: number().nullable(),
|
|
7703
|
+
error: string().nullable()
|
|
7704
|
+
});
|
|
7705
|
+
var StorageMigrationPlanSchema = object({
|
|
7706
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7707
|
+
moves: array(object({
|
|
7708
|
+
storageClass: StorageMigrationClassSchema,
|
|
7709
|
+
fromLocationId: string(),
|
|
7710
|
+
toLocationId: string()
|
|
7711
|
+
}))
|
|
7592
7712
|
});
|
|
7593
7713
|
/**
|
|
7594
7714
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7640,6 +7760,21 @@ var StorageLocationSchema = object({
|
|
|
7640
7760
|
nodeId: string().optional(),
|
|
7641
7761
|
isDefault: boolean().default(false),
|
|
7642
7762
|
isSystem: boolean().default(false),
|
|
7763
|
+
/**
|
|
7764
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7765
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7766
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7767
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7768
|
+
* extended to add the next consumer.
|
|
7769
|
+
*
|
|
7770
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7771
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7772
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7773
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7774
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7775
|
+
* always stamped `true`.
|
|
7776
|
+
*/
|
|
7777
|
+
enabled: boolean().optional(),
|
|
7643
7778
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7644
7779
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7645
7780
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12192,7 +12327,8 @@ method(object({
|
|
|
12192
12327
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12193
12328
|
/**
|
|
12194
12329
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12195
|
-
* filesystem
|
|
12330
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12331
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12196
12332
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12197
12333
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12198
12334
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14033,6 +14169,13 @@ var MaskGridDimsSchema = object({
|
|
|
14033
14169
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14034
14170
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14035
14171
|
* one trigger.
|
|
14172
|
+
*
|
|
14173
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14174
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14175
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14176
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14177
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14178
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14036
14179
|
*/
|
|
14037
14180
|
var NcDeliverySchema = _enum([
|
|
14038
14181
|
"immediate",
|
|
@@ -14047,15 +14190,32 @@ var NcDeliverySchema = _enum([
|
|
|
14047
14190
|
* depend on a provider's raw event name or payload shape.
|
|
14048
14191
|
*/
|
|
14049
14192
|
var NcSystemEventKindSchema = _enum([
|
|
14050
|
-
"
|
|
14051
|
-
"
|
|
14193
|
+
"device-online",
|
|
14194
|
+
"device-offline",
|
|
14195
|
+
"device-disabled",
|
|
14196
|
+
"device-enabled",
|
|
14052
14197
|
"stream-online",
|
|
14053
14198
|
"stream-offline",
|
|
14054
14199
|
"node-online",
|
|
14055
14200
|
"node-offline",
|
|
14056
14201
|
"addon-update-available",
|
|
14057
|
-
"server-update-available"
|
|
14202
|
+
"server-update-available",
|
|
14203
|
+
"alarm-triggered",
|
|
14204
|
+
"alarm-armed",
|
|
14205
|
+
"alarm-disarmed",
|
|
14206
|
+
"camera-online",
|
|
14207
|
+
"camera-offline",
|
|
14208
|
+
"camera-disabled",
|
|
14209
|
+
"camera-enabled"
|
|
14210
|
+
]);
|
|
14211
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14212
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14213
|
+
"camera-online",
|
|
14214
|
+
"camera-offline",
|
|
14215
|
+
"camera-disabled",
|
|
14216
|
+
"camera-enabled"
|
|
14058
14217
|
]);
|
|
14218
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14059
14219
|
/**
|
|
14060
14220
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14061
14221
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14064,6 +14224,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14064
14224
|
var NcSystemEventConditionSchema = object({
|
|
14065
14225
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14066
14226
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14227
|
+
/**
|
|
14228
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14229
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14230
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14231
|
+
*
|
|
14232
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14233
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14234
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14235
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14236
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14237
|
+
*/
|
|
14238
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14067
14239
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14068
14240
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14069
14241
|
});
|
|
@@ -14114,6 +14286,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14114
14286
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14115
14287
|
});
|
|
14116
14288
|
/**
|
|
14289
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14290
|
+
*
|
|
14291
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14292
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14293
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14294
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14295
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14296
|
+
*
|
|
14297
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14298
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14299
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14300
|
+
*
|
|
14301
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14302
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14303
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14304
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14305
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14306
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14307
|
+
* ZodEffects the cap path would have to special-case).
|
|
14308
|
+
*
|
|
14309
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14310
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14311
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14312
|
+
* `samplingSeconds` decorative.
|
|
14313
|
+
*
|
|
14314
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14315
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14316
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14317
|
+
* an operator who typed `dog` mean the same thing.
|
|
14318
|
+
*/
|
|
14319
|
+
var NcAudioConditionSchema = object({
|
|
14320
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14321
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14322
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14323
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14324
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14325
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14326
|
+
/** Length of the sampling window in seconds. */
|
|
14327
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14328
|
+
});
|
|
14329
|
+
/**
|
|
14117
14330
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14118
14331
|
*
|
|
14119
14332
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14386,7 +14599,33 @@ var NcConditionsSchema = object({
|
|
|
14386
14599
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14387
14600
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14388
14601
|
*/
|
|
14389
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14602
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14603
|
+
/**
|
|
14604
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14605
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14606
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14607
|
+
* a window that is not full yet, neither filter given). See
|
|
14608
|
+
* {@link NcAudioCondition}.
|
|
14609
|
+
*
|
|
14610
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14611
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14612
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14613
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14614
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14615
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14616
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14617
|
+
*
|
|
14618
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14619
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14620
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14621
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14622
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14623
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14624
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14625
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14626
|
+
* does an audio rule become authorable.
|
|
14627
|
+
*/
|
|
14628
|
+
audio: NcAudioConditionSchema.optional()
|
|
14390
14629
|
});
|
|
14391
14630
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14392
14631
|
var NcRuleTargetSchema = object({
|
|
@@ -14500,6 +14739,73 @@ var NcThrottleSchema = object({
|
|
|
14500
14739
|
*/
|
|
14501
14740
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14502
14741
|
});
|
|
14742
|
+
/**
|
|
14743
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14744
|
+
* it judges may be.
|
|
14745
|
+
*
|
|
14746
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14747
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14748
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14749
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14750
|
+
* tokens for pixels the model pools away.
|
|
14751
|
+
*/
|
|
14752
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14753
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14754
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14755
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14756
|
+
var NcConfirmExpectSchema = object({
|
|
14757
|
+
op: _enum([
|
|
14758
|
+
">=",
|
|
14759
|
+
">",
|
|
14760
|
+
"<=",
|
|
14761
|
+
"<",
|
|
14762
|
+
"=="
|
|
14763
|
+
]),
|
|
14764
|
+
count: number().int().min(0).max(1e3)
|
|
14765
|
+
});
|
|
14766
|
+
/**
|
|
14767
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14768
|
+
* to ship and says whether it agrees with the rule.
|
|
14769
|
+
*
|
|
14770
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14771
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14772
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14773
|
+
*
|
|
14774
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14775
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14776
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14777
|
+
* open looks in the log exactly like a gate that works.
|
|
14778
|
+
*
|
|
14779
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14780
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14781
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14782
|
+
* above rather than trusting a parse it may never have seen.
|
|
14783
|
+
*/
|
|
14784
|
+
var NcConfirmSchema = object({
|
|
14785
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14786
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14787
|
+
enabled: boolean().default(false),
|
|
14788
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14789
|
+
profileId: string().optional(),
|
|
14790
|
+
/**
|
|
14791
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14792
|
+
* from the rule (its class and its expectation).
|
|
14793
|
+
*
|
|
14794
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14795
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14796
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14797
|
+
* turn and only rule-authored words land here.
|
|
14798
|
+
*/
|
|
14799
|
+
prompt: string().max(1e3).optional(),
|
|
14800
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14801
|
+
* own boolean verdict decides. */
|
|
14802
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14803
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14804
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14805
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14806
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14807
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14808
|
+
});
|
|
14503
14809
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14504
14810
|
var NcRuleInputSchema = object({
|
|
14505
14811
|
name: string().min(1).max(200),
|
|
@@ -14560,7 +14866,13 @@ var NcRuleInputSchema = object({
|
|
|
14560
14866
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14561
14867
|
* shape as every other actuation.
|
|
14562
14868
|
*/
|
|
14563
|
-
actions: NcRuleActionsSchema.optional()
|
|
14869
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14870
|
+
/**
|
|
14871
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14872
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14873
|
+
* did, and absent is the only way to say that without a migration.
|
|
14874
|
+
*/
|
|
14875
|
+
confirm: NcConfirmSchema.optional()
|
|
14564
14876
|
});
|
|
14565
14877
|
/**
|
|
14566
14878
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14571,7 +14883,37 @@ var NcRuleInputSchema = object({
|
|
|
14571
14883
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14572
14884
|
* `updateRule` patch.
|
|
14573
14885
|
*/
|
|
14574
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14886
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14887
|
+
disabledTargetIds: array(string()).optional(),
|
|
14888
|
+
/**
|
|
14889
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14890
|
+
*
|
|
14891
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14892
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14893
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14894
|
+
* one — which made every partial edit destructive:
|
|
14895
|
+
*
|
|
14896
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14897
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14898
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14899
|
+
*
|
|
14900
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14901
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14902
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14903
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14904
|
+
* within a minute of a two-field patch.
|
|
14905
|
+
*
|
|
14906
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14907
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14908
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14909
|
+
* absent key is now genuinely absent.
|
|
14910
|
+
*/
|
|
14911
|
+
enabled: boolean().optional(),
|
|
14912
|
+
conditions: NcConditionsSchema.optional(),
|
|
14913
|
+
media: NcMediaPolicySchema.optional(),
|
|
14914
|
+
throttle: NcThrottleSchema.optional(),
|
|
14915
|
+
priority: number().int().min(1).max(5).optional()
|
|
14916
|
+
});
|
|
14575
14917
|
/** A persisted rule. */
|
|
14576
14918
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14577
14919
|
id: string(),
|
|
@@ -14872,6 +15214,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14872
15214
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14873
15215
|
* copy would lie the first time a rule is disabled.
|
|
14874
15216
|
*/
|
|
15217
|
+
/**
|
|
15218
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15219
|
+
*
|
|
15220
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15221
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15222
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15223
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15224
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15225
|
+
* with the switches the operator actually used.
|
|
15226
|
+
*/
|
|
15227
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15228
|
+
"muted",
|
|
15229
|
+
"detection-off",
|
|
15230
|
+
"offline"
|
|
15231
|
+
]);
|
|
15232
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15233
|
+
deviceId: number().int(),
|
|
15234
|
+
reason: NcAlarmSkipReasonSchema
|
|
15235
|
+
});
|
|
14875
15236
|
var NcAlarmModeCoverageSchema = object({
|
|
14876
15237
|
mode: AlarmArmModeSchema,
|
|
14877
15238
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14879,7 +15240,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14879
15240
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14880
15241
|
allDevices: boolean(),
|
|
14881
15242
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14882
|
-
deviceIds: array(number().int())
|
|
15243
|
+
deviceIds: array(number().int()),
|
|
15244
|
+
/**
|
|
15245
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15246
|
+
* excludes it.
|
|
15247
|
+
*
|
|
15248
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15249
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15250
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15251
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15252
|
+
* alarm tab.
|
|
15253
|
+
*/
|
|
15254
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14883
15255
|
});
|
|
14884
15256
|
var NcAlarmConfigSchema = object({
|
|
14885
15257
|
/**
|
|
@@ -16242,13 +16614,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16242
16614
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16243
16615
|
kind: "mutation",
|
|
16244
16616
|
auth: "admin"
|
|
16245
|
-
}), method(
|
|
16617
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16246
16618
|
kind: "mutation",
|
|
16247
16619
|
auth: "admin"
|
|
16248
|
-
}), method(object({
|
|
16249
|
-
kind: "
|
|
16620
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16621
|
+
kind: "mutation",
|
|
16250
16622
|
auth: "admin"
|
|
16251
|
-
}), method(
|
|
16623
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16624
|
+
kind: "mutation",
|
|
16625
|
+
auth: "admin"
|
|
16626
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16627
|
+
kind: "mutation",
|
|
16628
|
+
auth: "admin"
|
|
16629
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16252
16630
|
kind: "mutation",
|
|
16253
16631
|
auth: "admin"
|
|
16254
16632
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17705,9 +18083,16 @@ var CameraStatusSchema = object({
|
|
|
17705
18083
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17706
18084
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17707
18085
|
/**
|
|
17708
|
-
* Per-camera
|
|
18086
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17709
18087
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17710
18088
|
*
|
|
18089
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18090
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18091
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18092
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18093
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18094
|
+
* the difference between a camera being off and a camera being dead.
|
|
18095
|
+
*
|
|
17711
18096
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17712
18097
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17713
18098
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17778,7 +18163,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17778
18163
|
reachable: boolean(),
|
|
17779
18164
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17780
18165
|
});
|
|
17781
|
-
method(object({
|
|
18166
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18167
|
+
kind: "mutation",
|
|
18168
|
+
auth: "admin"
|
|
18169
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18170
|
+
kind: "mutation",
|
|
18171
|
+
auth: "admin"
|
|
18172
|
+
}), method(object({
|
|
17782
18173
|
deviceId: number(),
|
|
17783
18174
|
agentNodeId: string()
|
|
17784
18175
|
}), object({ success: literal(true) }), {
|
|
@@ -18308,24 +18699,28 @@ var snapshotCapability = {
|
|
|
18308
18699
|
*
|
|
18309
18700
|
* `getSnapshotOverview` is cache-only by contract: it answers from whatever
|
|
18310
18701
|
* the wrapper happens to hold and never captures. Under D93 the client
|
|
18311
|
-
* versions its image URL on that answer, and an image REQUEST
|
|
18312
|
-
*
|
|
18313
|
-
*
|
|
18314
|
-
*
|
|
18315
|
-
*
|
|
18316
|
-
*
|
|
18317
|
-
*
|
|
18318
|
-
*
|
|
18702
|
+
* versions its image URL on that answer, and an image REQUEST was the only
|
|
18703
|
+
* demand signal. Both of those are satisfiable by the client's own image
|
|
18704
|
+
* cache — `expo-image` is URL-keyed and never revalidates — so a URL painted
|
|
18705
|
+
* in a previous session comes off disk with no network, no demand, and no
|
|
18706
|
+
* capture. Measured on the live hub: reopening after two minutes idle
|
|
18707
|
+
* painted 15 of 16 tiles at **168 s old** with zero HTTP requests, and the
|
|
18708
|
+
* fleet only recovered because a later poll happened to observe a different
|
|
18709
|
+
* identity.
|
|
18319
18710
|
*
|
|
18320
18711
|
* ## The two properties that fix it
|
|
18321
18712
|
*
|
|
18322
18713
|
* **It is an RPC, so no client cache can answer it.** The demand signal
|
|
18323
|
-
* always reaches the wrapper. This method therefore
|
|
18324
|
-
*
|
|
18325
|
-
*
|
|
18326
|
-
*
|
|
18327
|
-
*
|
|
18328
|
-
*
|
|
18714
|
+
* always reaches the wrapper. This method therefore CAPTURES, where
|
|
18715
|
+
* `getSnapshotOverview` must never (D93) — the distinction is not "one is
|
|
18716
|
+
* newer" but that the overview poll is app-wide (a capturing overview would
|
|
18717
|
+
* dial every camera on the install) while this is called by a rendered
|
|
18718
|
+
* surface naming the tiles it is actually painting, at the width it is
|
|
18719
|
+
* painting them.
|
|
18720
|
+
*
|
|
18721
|
+
* Since 2026-08-11 this is the ONLY thing that refreshes a snapshot: the
|
|
18722
|
+
* server-side keep-warm loop was removed (operator directive — on-demand,
|
|
18723
|
+
* always), so a camera nobody is looking at costs nothing at all.
|
|
18329
18724
|
*
|
|
18330
18725
|
* **It waits, briefly and boundedly, for the capture it triggered.** The
|
|
18331
18726
|
* returned `capturedAt` is the frame the link will serve, not the frame the
|
|
@@ -18543,6 +18938,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18543
18938
|
locationId: string(),
|
|
18544
18939
|
targetBytes: number().int().positive()
|
|
18545
18940
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18941
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18942
|
+
kind: "mutation",
|
|
18943
|
+
auth: "admin"
|
|
18944
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18945
|
+
kind: "mutation",
|
|
18946
|
+
auth: "admin"
|
|
18947
|
+
});
|
|
18546
18948
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18547
18949
|
providerId: string().min(1),
|
|
18548
18950
|
displayName: string().min(1),
|
|
@@ -18646,6 +19048,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18646
19048
|
label: string(),
|
|
18647
19049
|
description: string().optional()
|
|
18648
19050
|
});
|
|
19051
|
+
/**
|
|
19052
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19053
|
+
* an instance declares a camera.
|
|
19054
|
+
*/
|
|
19055
|
+
var TerminalInstanceInfoSchema = object({
|
|
19056
|
+
instanceId: string(),
|
|
19057
|
+
cameraStableId: string(),
|
|
19058
|
+
nodeId: string(),
|
|
19059
|
+
profileId: string(),
|
|
19060
|
+
profileLabel: string(),
|
|
19061
|
+
name: string(),
|
|
19062
|
+
enabled: boolean()
|
|
19063
|
+
});
|
|
19064
|
+
var TerminalLegacyCameraSchema = object({
|
|
19065
|
+
stableId: string(),
|
|
19066
|
+
nodeId: string(),
|
|
19067
|
+
profileId: string(),
|
|
19068
|
+
profileLabel: string(),
|
|
19069
|
+
name: string(),
|
|
19070
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19071
|
+
adoptable: boolean()
|
|
19072
|
+
});
|
|
18649
19073
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18650
19074
|
seq: number().int().positive(),
|
|
18651
19075
|
kind: literal("data"),
|
|
@@ -18662,7 +19086,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18662
19086
|
snapshot: string().optional(),
|
|
18663
19087
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18664
19088
|
});
|
|
18665
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19089
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19090
|
+
targetNodeId: string().min(1),
|
|
19091
|
+
profileId: string().min(1),
|
|
19092
|
+
name: string().trim().min(1).max(160).optional()
|
|
19093
|
+
}), TerminalInstanceInfoSchema, {
|
|
19094
|
+
kind: "mutation",
|
|
19095
|
+
auth: "admin"
|
|
19096
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19097
|
+
kind: "mutation",
|
|
19098
|
+
auth: "admin"
|
|
19099
|
+
}), method(object({
|
|
19100
|
+
instanceId: string().min(1),
|
|
19101
|
+
enabled: boolean()
|
|
19102
|
+
}), TerminalInstanceInfoSchema, {
|
|
19103
|
+
kind: "mutation",
|
|
19104
|
+
auth: "admin"
|
|
19105
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19106
|
+
stableId: string().min(1),
|
|
19107
|
+
name: string().trim().min(1).max(160).optional()
|
|
19108
|
+
}), TerminalInstanceInfoSchema, {
|
|
19109
|
+
kind: "mutation",
|
|
19110
|
+
auth: "admin"
|
|
19111
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18666
19112
|
profileId: string(),
|
|
18667
19113
|
cols: number().int().positive(),
|
|
18668
19114
|
rows: number().int().positive()
|
|
@@ -18679,7 +19125,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18679
19125
|
}), method(object({
|
|
18680
19126
|
sessionId: string(),
|
|
18681
19127
|
afterSeq: number().int().nonnegative(),
|
|
18682
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19128
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19129
|
+
/**
|
|
19130
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19131
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19132
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19133
|
+
*/
|
|
19134
|
+
waitForOutput: boolean().optional()
|
|
18683
19135
|
}), TerminalOutputBatchSchema, {
|
|
18684
19136
|
kind: "mutation",
|
|
18685
19137
|
auth: "admin",
|
|
@@ -21177,6 +21629,7 @@ var FaceInfoSchema = object({
|
|
|
21177
21629
|
var FaceFilterEnum = _enum([
|
|
21178
21630
|
"unassigned",
|
|
21179
21631
|
"recognized",
|
|
21632
|
+
"identified",
|
|
21180
21633
|
"all"
|
|
21181
21634
|
]);
|
|
21182
21635
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21205,6 +21658,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21205
21658
|
kind: "mutation",
|
|
21206
21659
|
auth: "admin"
|
|
21207
21660
|
}), method(object({
|
|
21661
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21662
|
+
deviceId: number().int().optional(),
|
|
21208
21663
|
limit: number().int().positive().optional(),
|
|
21209
21664
|
filter: FaceFilterEnum.optional(),
|
|
21210
21665
|
/**
|
|
@@ -23480,6 +23935,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23480
23935
|
capName: string().min(1).max(64),
|
|
23481
23936
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23482
23937
|
valuePath: string().min(1).max(64)
|
|
23938
|
+
}),
|
|
23939
|
+
object({
|
|
23940
|
+
kind: literal("latest-recognition"),
|
|
23941
|
+
recognition: _enum(["person", "plate"])
|
|
23483
23942
|
})
|
|
23484
23943
|
]);
|
|
23485
23944
|
var OsdSlotBindingSchema = object({
|
|
@@ -23585,6 +24044,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23585
24044
|
}), object({ success: literal(true) }), {
|
|
23586
24045
|
kind: "mutation",
|
|
23587
24046
|
auth: "admin"
|
|
24047
|
+
}), method(object({
|
|
24048
|
+
sourceDeviceId: number().int(),
|
|
24049
|
+
targetDeviceId: number().int()
|
|
24050
|
+
}), object({
|
|
24051
|
+
copied: number().int().nonnegative(),
|
|
24052
|
+
skipped: number().int().nonnegative()
|
|
24053
|
+
}), {
|
|
24054
|
+
kind: "mutation",
|
|
24055
|
+
auth: "admin"
|
|
23588
24056
|
}), method(object({
|
|
23589
24057
|
deviceId: number().int(),
|
|
23590
24058
|
slotId: string().min(1),
|
|
@@ -24549,7 +25017,19 @@ var RecordingManifestSchema = object({
|
|
|
24549
25017
|
* profiles/subtrees/locations on this node). */
|
|
24550
25018
|
var RecordingDeviceUsageSchema = object({
|
|
24551
25019
|
deviceId: number(),
|
|
24552
|
-
usedBytes: number()
|
|
25020
|
+
usedBytes: number(),
|
|
25021
|
+
/**
|
|
25022
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25023
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25024
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25025
|
+
*
|
|
25026
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25027
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25028
|
+
* field must keep validating that older provider's payload: the framework
|
|
25029
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25030
|
+
* the later of the two.
|
|
25031
|
+
*/
|
|
25032
|
+
oldestMs: number().nullable().optional()
|
|
24553
25033
|
});
|
|
24554
25034
|
/** Recording storage usage + capacity for one storage location. */
|
|
24555
25035
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24577,6 +25057,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24577
25057
|
locations: array(RecordingLocationUsageSchema)
|
|
24578
25058
|
});
|
|
24579
25059
|
/**
|
|
25060
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25061
|
+
*
|
|
25062
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25063
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25064
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25065
|
+
* location, run FIFO behind the single-flight mover.
|
|
25066
|
+
*
|
|
25067
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25068
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25069
|
+
* (empty on the plan).
|
|
25070
|
+
*/
|
|
25071
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25072
|
+
deviceId: number(),
|
|
25073
|
+
profile: string(),
|
|
25074
|
+
fromLocationId: string(),
|
|
25075
|
+
toLocationId: string(),
|
|
25076
|
+
bytes: number(),
|
|
25077
|
+
files: number().int()
|
|
25078
|
+
});
|
|
25079
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25080
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25081
|
+
* that had nothing to do. */
|
|
25082
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25083
|
+
"unassigned",
|
|
25084
|
+
"target-not-writable",
|
|
25085
|
+
"below-threshold",
|
|
25086
|
+
"no-headroom"
|
|
25087
|
+
]);
|
|
25088
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25089
|
+
deviceId: number(),
|
|
25090
|
+
profile: string(),
|
|
25091
|
+
fromLocationId: string(),
|
|
25092
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25093
|
+
toLocationId: string().nullable(),
|
|
25094
|
+
bytes: number(),
|
|
25095
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25096
|
+
});
|
|
25097
|
+
var RecordingRebalancePlanSchema = object({
|
|
25098
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25099
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25100
|
+
bytesToMove: number(),
|
|
25101
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25102
|
+
jobIds: array(string())
|
|
25103
|
+
});
|
|
25104
|
+
var RecordingRebalanceInputSchema = object({
|
|
25105
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25106
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25107
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25108
|
+
minMoveGb: number().min(0).optional()
|
|
25109
|
+
});
|
|
25110
|
+
/**
|
|
24580
25111
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24581
25112
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24582
25113
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24724,6 +25255,21 @@ method(object({
|
|
|
24724
25255
|
}), {
|
|
24725
25256
|
kind: "mutation",
|
|
24726
25257
|
auth: "admin"
|
|
25258
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25259
|
+
kind: "mutation",
|
|
25260
|
+
auth: "admin"
|
|
25261
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25262
|
+
kind: "mutation",
|
|
25263
|
+
auth: "admin"
|
|
25264
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25265
|
+
kind: "mutation",
|
|
25266
|
+
auth: "admin"
|
|
25267
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25268
|
+
kind: "mutation",
|
|
25269
|
+
auth: "admin"
|
|
25270
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25271
|
+
kind: "mutation",
|
|
25272
|
+
auth: "admin"
|
|
24727
25273
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24728
25274
|
kind: "mutation",
|
|
24729
25275
|
auth: "admin"
|
|
@@ -24733,9 +25279,15 @@ method(object({
|
|
|
24733
25279
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24734
25280
|
kind: "mutation",
|
|
24735
25281
|
auth: "admin"
|
|
25282
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25283
|
+
kind: "query",
|
|
25284
|
+
auth: "admin"
|
|
25285
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25286
|
+
kind: "mutation",
|
|
25287
|
+
auth: "admin"
|
|
24736
25288
|
});
|
|
24737
25289
|
/**
|
|
24738
|
-
* `
|
|
25290
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24739
25291
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24740
25292
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24741
25293
|
* delete-after-download.
|
|
@@ -24750,10 +25302,42 @@ method(object({
|
|
|
24750
25302
|
*/
|
|
24751
25303
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24752
25304
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25305
|
+
/**
|
|
25306
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25307
|
+
*
|
|
25308
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25309
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25310
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25311
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25312
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25313
|
+
*/
|
|
25314
|
+
var ExportDenseRangeSchema = object({
|
|
25315
|
+
fromSec: number().nonnegative(),
|
|
25316
|
+
toSec: number().nonnegative()
|
|
25317
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25318
|
+
/**
|
|
25319
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25320
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25321
|
+
*
|
|
25322
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25323
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25324
|
+
*/
|
|
25325
|
+
var ExportDenseSchema = object({
|
|
25326
|
+
everyMs: number().int().positive(),
|
|
25327
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25328
|
+
});
|
|
24753
25329
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24754
25330
|
var ExportTimelapseSchema = object({
|
|
24755
25331
|
everyMs: number().int().positive(),
|
|
24756
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25332
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25333
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25334
|
+
dense: ExportDenseSchema.optional()
|
|
25335
|
+
}).superRefine((v, ctx) => {
|
|
25336
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25337
|
+
code: ZodIssueCode.custom,
|
|
25338
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25339
|
+
path: ["dense", "everyMs"]
|
|
25340
|
+
});
|
|
24757
25341
|
});
|
|
24758
25342
|
/**
|
|
24759
25343
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24811,6 +25395,19 @@ var ExportDownloadSchema = object({
|
|
|
24811
25395
|
url: string(),
|
|
24812
25396
|
endpoints: array(string())
|
|
24813
25397
|
});
|
|
25398
|
+
/**
|
|
25399
|
+
* A finished export's bytes, inline.
|
|
25400
|
+
*
|
|
25401
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25402
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25403
|
+
*/
|
|
25404
|
+
var ExportBytesSchema = object({
|
|
25405
|
+
base64: string(),
|
|
25406
|
+
contentType: string(),
|
|
25407
|
+
/** Suggested filename, extension included. */
|
|
25408
|
+
name: string(),
|
|
25409
|
+
bytes: number().int().nonnegative()
|
|
25410
|
+
});
|
|
24814
25411
|
method(object({
|
|
24815
25412
|
deviceId: number(),
|
|
24816
25413
|
profile: string(),
|
|
@@ -24835,6 +25432,9 @@ method(object({
|
|
|
24835
25432
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24836
25433
|
kind: "query",
|
|
24837
25434
|
auth: "protected"
|
|
25435
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25436
|
+
kind: "query",
|
|
25437
|
+
auth: "protected"
|
|
24838
25438
|
});
|
|
24839
25439
|
/**
|
|
24840
25440
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30678,6 +31278,12 @@ Object.freeze({
|
|
|
30678
31278
|
addonId: null,
|
|
30679
31279
|
access: "delete"
|
|
30680
31280
|
},
|
|
31281
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31282
|
+
capName: "osd-manager",
|
|
31283
|
+
capScope: "system",
|
|
31284
|
+
addonId: null,
|
|
31285
|
+
access: "create"
|
|
31286
|
+
},
|
|
30681
31287
|
"osdManager.getConditionSupport": {
|
|
30682
31288
|
capName: "osd-manager",
|
|
30683
31289
|
capScope: "system",
|
|
@@ -30774,7 +31380,7 @@ Object.freeze({
|
|
|
30774
31380
|
addonId: null,
|
|
30775
31381
|
access: "create"
|
|
30776
31382
|
},
|
|
30777
|
-
"pipelineAnalytics.
|
|
31383
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30778
31384
|
capName: "pipeline-analytics",
|
|
30779
31385
|
capScope: "device",
|
|
30780
31386
|
addonId: null,
|
|
@@ -30846,12 +31452,6 @@ Object.freeze({
|
|
|
30846
31452
|
addonId: null,
|
|
30847
31453
|
access: "view"
|
|
30848
31454
|
},
|
|
30849
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30850
|
-
capName: "pipeline-analytics",
|
|
30851
|
-
capScope: "device",
|
|
30852
|
-
addonId: null,
|
|
30853
|
-
access: "view"
|
|
30854
|
-
},
|
|
30855
31455
|
"pipelineAnalytics.getMotionEvents": {
|
|
30856
31456
|
capName: "pipeline-analytics",
|
|
30857
31457
|
capScope: "device",
|
|
@@ -30888,6 +31488,12 @@ Object.freeze({
|
|
|
30888
31488
|
addonId: null,
|
|
30889
31489
|
access: "view"
|
|
30890
31490
|
},
|
|
31491
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31492
|
+
capName: "pipeline-analytics",
|
|
31493
|
+
capScope: "device",
|
|
31494
|
+
addonId: null,
|
|
31495
|
+
access: "view"
|
|
31496
|
+
},
|
|
30891
31497
|
"pipelineAnalytics.getTrack": {
|
|
30892
31498
|
capName: "pipeline-analytics",
|
|
30893
31499
|
capScope: "device",
|
|
@@ -30966,6 +31572,12 @@ Object.freeze({
|
|
|
30966
31572
|
addonId: null,
|
|
30967
31573
|
access: "view"
|
|
30968
31574
|
},
|
|
31575
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31576
|
+
capName: "pipeline-analytics",
|
|
31577
|
+
capScope: "device",
|
|
31578
|
+
addonId: null,
|
|
31579
|
+
access: "create"
|
|
31580
|
+
},
|
|
30969
31581
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30970
31582
|
capName: "pipeline-analytics",
|
|
30971
31583
|
capScope: "device",
|
|
@@ -30996,7 +31608,7 @@ Object.freeze({
|
|
|
30996
31608
|
addonId: null,
|
|
30997
31609
|
access: "create"
|
|
30998
31610
|
},
|
|
30999
|
-
"pipelineAnalytics.
|
|
31611
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
31000
31612
|
capName: "pipeline-analytics",
|
|
31001
31613
|
capScope: "device",
|
|
31002
31614
|
addonId: null,
|
|
@@ -31008,6 +31620,12 @@ Object.freeze({
|
|
|
31008
31620
|
addonId: null,
|
|
31009
31621
|
access: "create"
|
|
31010
31622
|
},
|
|
31623
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31624
|
+
capName: "pipeline-analytics",
|
|
31625
|
+
capScope: "device",
|
|
31626
|
+
addonId: null,
|
|
31627
|
+
access: "create"
|
|
31628
|
+
},
|
|
31011
31629
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
31012
31630
|
capName: "pipeline-analytics",
|
|
31013
31631
|
capScope: "device",
|
|
@@ -31032,6 +31650,12 @@ Object.freeze({
|
|
|
31032
31650
|
addonId: null,
|
|
31033
31651
|
access: "create"
|
|
31034
31652
|
},
|
|
31653
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31654
|
+
capName: "pipeline-analytics",
|
|
31655
|
+
capScope: "device",
|
|
31656
|
+
addonId: null,
|
|
31657
|
+
access: "create"
|
|
31658
|
+
},
|
|
31035
31659
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
31036
31660
|
capName: "pipeline-analytics",
|
|
31037
31661
|
capScope: "device",
|
|
@@ -31398,6 +32022,12 @@ Object.freeze({
|
|
|
31398
32022
|
addonId: null,
|
|
31399
32023
|
access: "view"
|
|
31400
32024
|
},
|
|
32025
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
32026
|
+
capName: "pipeline-orchestrator",
|
|
32027
|
+
capScope: "system",
|
|
32028
|
+
addonId: null,
|
|
32029
|
+
access: "create"
|
|
32030
|
+
},
|
|
31401
32031
|
"pipelineOrchestrator.rebalance": {
|
|
31402
32032
|
capName: "pipeline-orchestrator",
|
|
31403
32033
|
capScope: "system",
|
|
@@ -31422,6 +32052,12 @@ Object.freeze({
|
|
|
31422
32052
|
addonId: null,
|
|
31423
32053
|
access: "view"
|
|
31424
32054
|
},
|
|
32055
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
32056
|
+
capName: "pipeline-orchestrator",
|
|
32057
|
+
capScope: "system",
|
|
32058
|
+
addonId: null,
|
|
32059
|
+
access: "create"
|
|
32060
|
+
},
|
|
31425
32061
|
"pipelineOrchestrator.saveTemplate": {
|
|
31426
32062
|
capName: "pipeline-orchestrator",
|
|
31427
32063
|
capScope: "system",
|
|
@@ -31818,7 +32454,13 @@ Object.freeze({
|
|
|
31818
32454
|
addonId: null,
|
|
31819
32455
|
access: "create"
|
|
31820
32456
|
},
|
|
31821
|
-
"recording.
|
|
32457
|
+
"recording.cancelRelocateJob": {
|
|
32458
|
+
capName: "recording",
|
|
32459
|
+
capScope: "system",
|
|
32460
|
+
addonId: null,
|
|
32461
|
+
access: "create"
|
|
32462
|
+
},
|
|
32463
|
+
"recording.cancelStorageMigrationMove": {
|
|
31822
32464
|
capName: "recording",
|
|
31823
32465
|
capScope: "system",
|
|
31824
32466
|
addonId: null,
|
|
@@ -31854,7 +32496,7 @@ Object.freeze({
|
|
|
31854
32496
|
addonId: null,
|
|
31855
32497
|
access: "view"
|
|
31856
32498
|
},
|
|
31857
|
-
"recording.
|
|
32499
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31858
32500
|
capName: "recording",
|
|
31859
32501
|
capScope: "system",
|
|
31860
32502
|
addonId: null,
|
|
@@ -31872,12 +32514,30 @@ Object.freeze({
|
|
|
31872
32514
|
addonId: null,
|
|
31873
32515
|
access: "view"
|
|
31874
32516
|
},
|
|
32517
|
+
"recording.listRelocateJobs": {
|
|
32518
|
+
capName: "recording",
|
|
32519
|
+
capScope: "system",
|
|
32520
|
+
addonId: null,
|
|
32521
|
+
access: "view"
|
|
32522
|
+
},
|
|
31875
32523
|
"recording.locateSegment": {
|
|
31876
32524
|
capName: "recording",
|
|
31877
32525
|
capScope: "system",
|
|
31878
32526
|
addonId: null,
|
|
31879
32527
|
access: "view"
|
|
31880
32528
|
},
|
|
32529
|
+
"recording.pauseForStorageMigration": {
|
|
32530
|
+
capName: "recording",
|
|
32531
|
+
capScope: "system",
|
|
32532
|
+
addonId: null,
|
|
32533
|
+
access: "create"
|
|
32534
|
+
},
|
|
32535
|
+
"recording.planStorageRebalance": {
|
|
32536
|
+
capName: "recording",
|
|
32537
|
+
capScope: "system",
|
|
32538
|
+
addonId: null,
|
|
32539
|
+
access: "view"
|
|
32540
|
+
},
|
|
31881
32541
|
"recording.pruneFootage": {
|
|
31882
32542
|
capName: "recording",
|
|
31883
32543
|
capScope: "system",
|
|
@@ -31896,6 +32556,12 @@ Object.freeze({
|
|
|
31896
32556
|
addonId: null,
|
|
31897
32557
|
access: "view"
|
|
31898
32558
|
},
|
|
32559
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32560
|
+
capName: "recording",
|
|
32561
|
+
capScope: "system",
|
|
32562
|
+
addonId: null,
|
|
32563
|
+
access: "create"
|
|
32564
|
+
},
|
|
31899
32565
|
"recording.relocateFootage": {
|
|
31900
32566
|
capName: "recording",
|
|
31901
32567
|
capScope: "system",
|
|
@@ -31920,44 +32586,68 @@ Object.freeze({
|
|
|
31920
32586
|
addonId: null,
|
|
31921
32587
|
access: "create"
|
|
31922
32588
|
},
|
|
32589
|
+
"recording.resumeForStorageMigration": {
|
|
32590
|
+
capName: "recording",
|
|
32591
|
+
capScope: "system",
|
|
32592
|
+
addonId: null,
|
|
32593
|
+
access: "create"
|
|
32594
|
+
},
|
|
31923
32595
|
"recording.setDeviceConfig": {
|
|
31924
32596
|
capName: "recording",
|
|
31925
32597
|
capScope: "system",
|
|
31926
32598
|
addonId: null,
|
|
31927
32599
|
access: "create"
|
|
31928
32600
|
},
|
|
32601
|
+
"recording.startStorageMigrationMove": {
|
|
32602
|
+
capName: "recording",
|
|
32603
|
+
capScope: "system",
|
|
32604
|
+
addonId: null,
|
|
32605
|
+
access: "create"
|
|
32606
|
+
},
|
|
32607
|
+
"recording.startStorageRebalance": {
|
|
32608
|
+
capName: "recording",
|
|
32609
|
+
capScope: "system",
|
|
32610
|
+
addonId: null,
|
|
32611
|
+
access: "create"
|
|
32612
|
+
},
|
|
31929
32613
|
"recordingExport.cancelExport": {
|
|
31930
|
-
capName: "
|
|
32614
|
+
capName: "recording-export",
|
|
31931
32615
|
capScope: "system",
|
|
31932
32616
|
addonId: null,
|
|
31933
32617
|
access: "create"
|
|
31934
32618
|
},
|
|
31935
32619
|
"recordingExport.createExport": {
|
|
31936
|
-
capName: "
|
|
32620
|
+
capName: "recording-export",
|
|
31937
32621
|
capScope: "system",
|
|
31938
32622
|
addonId: null,
|
|
31939
32623
|
access: "create"
|
|
31940
32624
|
},
|
|
31941
32625
|
"recordingExport.deleteExport": {
|
|
31942
|
-
capName: "
|
|
32626
|
+
capName: "recording-export",
|
|
31943
32627
|
capScope: "system",
|
|
31944
32628
|
addonId: null,
|
|
31945
32629
|
access: "delete"
|
|
31946
32630
|
},
|
|
31947
32631
|
"recordingExport.getDownloadUrl": {
|
|
31948
|
-
capName: "
|
|
32632
|
+
capName: "recording-export",
|
|
31949
32633
|
capScope: "system",
|
|
31950
32634
|
addonId: null,
|
|
31951
32635
|
access: "view"
|
|
31952
32636
|
},
|
|
31953
32637
|
"recordingExport.getExport": {
|
|
31954
|
-
capName: "
|
|
32638
|
+
capName: "recording-export",
|
|
31955
32639
|
capScope: "system",
|
|
31956
32640
|
addonId: null,
|
|
31957
32641
|
access: "view"
|
|
31958
32642
|
},
|
|
31959
32643
|
"recordingExport.listExports": {
|
|
31960
|
-
capName: "
|
|
32644
|
+
capName: "recording-export",
|
|
32645
|
+
capScope: "system",
|
|
32646
|
+
addonId: null,
|
|
32647
|
+
access: "view"
|
|
32648
|
+
},
|
|
32649
|
+
"recordingExport.readExportBytes": {
|
|
32650
|
+
capName: "recording-export",
|
|
31961
32651
|
capScope: "system",
|
|
31962
32652
|
addonId: null,
|
|
31963
32653
|
access: "view"
|
|
@@ -32316,6 +33006,30 @@ Object.freeze({
|
|
|
32316
33006
|
addonId: null,
|
|
32317
33007
|
access: "view"
|
|
32318
33008
|
},
|
|
33009
|
+
"storageMigration.cancel": {
|
|
33010
|
+
capName: "storage-migration",
|
|
33011
|
+
capScope: "system",
|
|
33012
|
+
addonId: null,
|
|
33013
|
+
access: "create"
|
|
33014
|
+
},
|
|
33015
|
+
"storageMigration.plan": {
|
|
33016
|
+
capName: "storage-migration",
|
|
33017
|
+
capScope: "system",
|
|
33018
|
+
addonId: null,
|
|
33019
|
+
access: "view"
|
|
33020
|
+
},
|
|
33021
|
+
"storageMigration.start": {
|
|
33022
|
+
capName: "storage-migration",
|
|
33023
|
+
capScope: "system",
|
|
33024
|
+
addonId: null,
|
|
33025
|
+
access: "create"
|
|
33026
|
+
},
|
|
33027
|
+
"storageMigration.status": {
|
|
33028
|
+
capName: "storage-migration",
|
|
33029
|
+
capScope: "system",
|
|
33030
|
+
addonId: null,
|
|
33031
|
+
access: "view"
|
|
33032
|
+
},
|
|
32319
33033
|
"storageProvider.abortUpload": {
|
|
32320
33034
|
capName: "storage-provider",
|
|
32321
33035
|
capScope: "system",
|
|
@@ -32694,12 +33408,42 @@ Object.freeze({
|
|
|
32694
33408
|
addonId: null,
|
|
32695
33409
|
access: "create"
|
|
32696
33410
|
},
|
|
33411
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33412
|
+
capName: "terminal-session",
|
|
33413
|
+
capScope: "system",
|
|
33414
|
+
addonId: null,
|
|
33415
|
+
access: "create"
|
|
33416
|
+
},
|
|
32697
33417
|
"terminalSession.close": {
|
|
32698
33418
|
capName: "terminal-session",
|
|
32699
33419
|
capScope: "system",
|
|
32700
33420
|
addonId: null,
|
|
32701
33421
|
access: "create"
|
|
32702
33422
|
},
|
|
33423
|
+
"terminalSession.createInstance": {
|
|
33424
|
+
capName: "terminal-session",
|
|
33425
|
+
capScope: "system",
|
|
33426
|
+
addonId: null,
|
|
33427
|
+
access: "create"
|
|
33428
|
+
},
|
|
33429
|
+
"terminalSession.deleteInstance": {
|
|
33430
|
+
capName: "terminal-session",
|
|
33431
|
+
capScope: "system",
|
|
33432
|
+
addonId: null,
|
|
33433
|
+
access: "delete"
|
|
33434
|
+
},
|
|
33435
|
+
"terminalSession.listInstances": {
|
|
33436
|
+
capName: "terminal-session",
|
|
33437
|
+
capScope: "system",
|
|
33438
|
+
addonId: null,
|
|
33439
|
+
access: "view"
|
|
33440
|
+
},
|
|
33441
|
+
"terminalSession.listLegacyCameras": {
|
|
33442
|
+
capName: "terminal-session",
|
|
33443
|
+
capScope: "system",
|
|
33444
|
+
addonId: null,
|
|
33445
|
+
access: "view"
|
|
33446
|
+
},
|
|
32703
33447
|
"terminalSession.listProfiles": {
|
|
32704
33448
|
capName: "terminal-session",
|
|
32705
33449
|
capScope: "system",
|
|
@@ -32730,6 +33474,12 @@ Object.freeze({
|
|
|
32730
33474
|
addonId: null,
|
|
32731
33475
|
access: "create"
|
|
32732
33476
|
},
|
|
33477
|
+
"terminalSession.setInstanceEnabled": {
|
|
33478
|
+
capName: "terminal-session",
|
|
33479
|
+
capScope: "system",
|
|
33480
|
+
addonId: null,
|
|
33481
|
+
access: "create"
|
|
33482
|
+
},
|
|
32733
33483
|
"terminalSession.writeInput": {
|
|
32734
33484
|
capName: "terminal-session",
|
|
32735
33485
|
capScope: "system",
|
|
@@ -33274,6 +34024,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33274
34024
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33275
34025
|
var PriorityField = number().int().min(1).max(5);
|
|
33276
34026
|
/**
|
|
34027
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
34028
|
+
*
|
|
34029
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
34030
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
34031
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
34032
|
+
*
|
|
34033
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
34034
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
34035
|
+
*
|
|
34036
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
34037
|
+
*
|
|
34038
|
+
* 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.
|
|
34039
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
34040
|
+
* and therefore the length of a quiet night, does not move.
|
|
34041
|
+
*
|
|
34042
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
34043
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
34044
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
34045
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
34046
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
34047
|
+
*/
|
|
34048
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
34049
|
+
/**
|
|
34050
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
34051
|
+
*
|
|
34052
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
34053
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
34054
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
34055
|
+
* that range every ~583 ms.
|
|
34056
|
+
*
|
|
34057
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
34058
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
34059
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
34060
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
34061
|
+
* schema change and are the tracked follow-up.
|
|
34062
|
+
*
|
|
34063
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
34064
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
34065
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
34066
|
+
* happened.
|
|
34067
|
+
*/
|
|
34068
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
34069
|
+
/**
|
|
34070
|
+
* Caption burned into the notification's preview frame.
|
|
34071
|
+
*
|
|
34072
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
34073
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
34074
|
+
* templating dialect for one field would be a second thing to explain.
|
|
34075
|
+
*
|
|
34076
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
34077
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
34078
|
+
* the reason this is not `.min(1)`.
|
|
34079
|
+
*/
|
|
34080
|
+
var PreviewTextField = string().max(200);
|
|
34081
|
+
/**
|
|
34082
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
34083
|
+
*
|
|
34084
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
34085
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
34086
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
34087
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
34088
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
34089
|
+
* them.
|
|
34090
|
+
*
|
|
34091
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
34092
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
34093
|
+
* paying that on the deploy that shipped it.
|
|
34094
|
+
*
|
|
34095
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
34096
|
+
*/
|
|
34097
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
34098
|
+
/**
|
|
34099
|
+
* Which detection classes the notification reports counts for.
|
|
34100
|
+
*
|
|
34101
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
34102
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
34103
|
+
* class the window actually contained", which is what an operator who never
|
|
34104
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
34105
|
+
* counts cars all night).
|
|
34106
|
+
*
|
|
34107
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
34108
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
34109
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
34110
|
+
* not emit.
|
|
34111
|
+
*
|
|
34112
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
34113
|
+
* - `{{detections}}` — total over the reported classes
|
|
34114
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
34115
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
34116
|
+
* one per class, `count_` + the class name
|
|
34117
|
+
*
|
|
34118
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
34119
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
34120
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
34121
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
34122
|
+
*/
|
|
34123
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
34124
|
+
/**
|
|
33277
34125
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33278
34126
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33279
34127
|
* here (see the ownership note above).
|
|
@@ -33293,9 +34141,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33293
34141
|
cadenceSec: CadenceSecField.default(15),
|
|
33294
34142
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33295
34143
|
framerate: FramerateField.default(10),
|
|
34144
|
+
/**
|
|
34145
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
34146
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
34147
|
+
* field gets.
|
|
34148
|
+
*/
|
|
34149
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34150
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
34151
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33296
34152
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33297
34153
|
targets: TargetsField,
|
|
33298
34154
|
template: TimelapseTemplateSchema.optional(),
|
|
34155
|
+
/**
|
|
34156
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
34157
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
34158
|
+
*
|
|
34159
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
34160
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
34161
|
+
* silently clear the caption too.
|
|
34162
|
+
*/
|
|
34163
|
+
previewText: PreviewTextField.optional(),
|
|
34164
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
34165
|
+
previewMode: PreviewModeField.default("image"),
|
|
34166
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
34167
|
+
reportClasses: ReportClassesField.optional(),
|
|
33299
34168
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33300
34169
|
priority: PriorityField.default(3)
|
|
33301
34170
|
});
|
|
@@ -33306,8 +34175,13 @@ object({
|
|
|
33306
34175
|
schedule: NcScheduleSchema.optional(),
|
|
33307
34176
|
cadenceSec: CadenceSecField.optional(),
|
|
33308
34177
|
framerate: FramerateField.optional(),
|
|
34178
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34179
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33309
34180
|
targets: TargetsField.optional(),
|
|
33310
34181
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
34182
|
+
previewText: PreviewTextField.optional(),
|
|
34183
|
+
previewMode: PreviewModeField.optional(),
|
|
34184
|
+
reportClasses: ReportClassesField.optional(),
|
|
33311
34185
|
priority: PriorityField.optional()
|
|
33312
34186
|
});
|
|
33313
34187
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33319,10 +34193,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33319
34193
|
*/
|
|
33320
34194
|
ownerUserId: string().optional(),
|
|
33321
34195
|
/**
|
|
33322
|
-
* Epoch-ms of the
|
|
33323
|
-
*
|
|
34196
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
34197
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
34198
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33324
34199
|
*/
|
|
33325
34200
|
lastGeneratedAt: number().optional(),
|
|
34201
|
+
/**
|
|
34202
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
34203
|
+
* re-generation guard's real durable state.
|
|
34204
|
+
*
|
|
34205
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
34206
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
34207
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
34208
|
+
* already done — and B's night is gone for good, because the window will not
|
|
34209
|
+
* come back.
|
|
34210
|
+
*
|
|
34211
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
34212
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
34213
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
34214
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
34215
|
+
* once, on the deploy that shipped the map.
|
|
34216
|
+
*/
|
|
34217
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33326
34218
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33327
34219
|
createdBy: string(),
|
|
33328
34220
|
createdAt: number(),
|