@camstack/addon-provider-dreo 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.mjs
CHANGED
|
@@ -7242,8 +7242,31 @@ var AdoptionJobSchema = object({
|
|
|
7242
7242
|
error: string().nullable()
|
|
7243
7243
|
});
|
|
7244
7244
|
/**
|
|
7245
|
-
* Per-camera FUNCTION SWITCHES
|
|
7246
|
-
*
|
|
7245
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7246
|
+
*
|
|
7247
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7248
|
+
*
|
|
7249
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7250
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7251
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7252
|
+
* every function already had a settings page of its own, and a second place to
|
|
7253
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7254
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7255
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7256
|
+
* (which was always first-class; the switch was a veneer over
|
|
7257
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7258
|
+
* per-device setting, the two camera planes to their own components.
|
|
7259
|
+
*
|
|
7260
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7261
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7262
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7263
|
+
* never about a control panel.
|
|
7264
|
+
*
|
|
7265
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7266
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7267
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7268
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7269
|
+
* stop; nothing new may be built on it.
|
|
7247
7270
|
*
|
|
7248
7271
|
* ## This file adds no state
|
|
7249
7272
|
*
|
|
@@ -7588,14 +7611,21 @@ var RecordingConfigSchema = object({
|
|
|
7588
7611
|
/**
|
|
7589
7612
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7590
7613
|
*
|
|
7591
|
-
* One shape shared by the recorder
|
|
7592
|
-
*
|
|
7593
|
-
*
|
|
7594
|
-
*
|
|
7595
|
-
*
|
|
7596
|
-
|
|
7614
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7615
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7616
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7617
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7618
|
+
* addon surface.
|
|
7619
|
+
*/
|
|
7620
|
+
/**
|
|
7621
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7622
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7623
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7624
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7625
|
+
* runs at all.
|
|
7597
7626
|
*/
|
|
7598
7627
|
var RelocateJobStateSchema = _enum([
|
|
7628
|
+
"queued",
|
|
7599
7629
|
"running",
|
|
7600
7630
|
"done",
|
|
7601
7631
|
"failed",
|
|
@@ -7620,19 +7650,109 @@ var RelocateJobSchema = object({
|
|
|
7620
7650
|
finishedAt: number().nullable(),
|
|
7621
7651
|
error: string().nullable()
|
|
7622
7652
|
});
|
|
7653
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7654
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7655
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7623
7656
|
var RelocateFootageInputSchema = object({
|
|
7624
|
-
deviceId: number().optional(),
|
|
7625
7657
|
fromLocationId: string(),
|
|
7626
7658
|
toLocationId: string(),
|
|
7627
7659
|
entities: array(_enum(["segments"])).optional(),
|
|
7660
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7661
|
+
* pre-orchestration compatibility path. */
|
|
7662
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7663
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7664
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7665
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7666
|
+
deviceId: number().int().optional(),
|
|
7667
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7668
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7669
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7670
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7671
|
+
profiles: array(string()).optional(),
|
|
7628
7672
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7629
7673
|
* never allowed to starve live writers. */
|
|
7630
7674
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7631
7675
|
});
|
|
7632
|
-
|
|
7633
|
-
|
|
7676
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7677
|
+
* from persistent recording settings: a migration never changes
|
|
7678
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7679
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7680
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7681
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7634
7682
|
toLocationId: string(),
|
|
7635
7683
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7684
|
+
}).extend({ leaseId: string().min(1) });
|
|
7685
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7686
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7687
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7688
|
+
var StorageMigrationClassSchema = _enum([
|
|
7689
|
+
"recordings",
|
|
7690
|
+
"recordingsLow",
|
|
7691
|
+
"eventMedia"
|
|
7692
|
+
]);
|
|
7693
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7694
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7695
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7696
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7697
|
+
recordings: string().min(1).optional(),
|
|
7698
|
+
recordingsLow: string().min(1).optional(),
|
|
7699
|
+
eventMedia: string().min(1).optional()
|
|
7700
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7701
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7702
|
+
var StorageMigrationInputSchema = object({
|
|
7703
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7704
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7705
|
+
});
|
|
7706
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7707
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7708
|
+
* verified. */
|
|
7709
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7710
|
+
"planning",
|
|
7711
|
+
"pausing",
|
|
7712
|
+
"moving",
|
|
7713
|
+
"verifying",
|
|
7714
|
+
"repointing",
|
|
7715
|
+
"refreshing",
|
|
7716
|
+
"resuming",
|
|
7717
|
+
"done",
|
|
7718
|
+
"failed",
|
|
7719
|
+
"cancelled"
|
|
7720
|
+
]);
|
|
7721
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7722
|
+
"pipeline",
|
|
7723
|
+
"recorder",
|
|
7724
|
+
"analytics"
|
|
7725
|
+
]);
|
|
7726
|
+
var StorageMigrationMoveSchema = object({
|
|
7727
|
+
storageClass: StorageMigrationClassSchema,
|
|
7728
|
+
fromLocationId: string(),
|
|
7729
|
+
toLocationId: string(),
|
|
7730
|
+
moverJobId: string().nullable(),
|
|
7731
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7732
|
+
error: string().nullable()
|
|
7733
|
+
});
|
|
7734
|
+
var StorageMigrationJobSchema = object({
|
|
7735
|
+
jobId: string(),
|
|
7736
|
+
phase: StorageMigrationPhaseSchema,
|
|
7737
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7738
|
+
throttleMbps: number(),
|
|
7739
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7740
|
+
pauseLeaseId: string().nullable(),
|
|
7741
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7742
|
+
repointed: boolean(),
|
|
7743
|
+
cancelRequested: boolean(),
|
|
7744
|
+
startedAt: number(),
|
|
7745
|
+
updatedAt: number(),
|
|
7746
|
+
finishedAt: number().nullable(),
|
|
7747
|
+
error: string().nullable()
|
|
7748
|
+
});
|
|
7749
|
+
var StorageMigrationPlanSchema = object({
|
|
7750
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7751
|
+
moves: array(object({
|
|
7752
|
+
storageClass: StorageMigrationClassSchema,
|
|
7753
|
+
fromLocationId: string(),
|
|
7754
|
+
toLocationId: string()
|
|
7755
|
+
}))
|
|
7636
7756
|
});
|
|
7637
7757
|
/**
|
|
7638
7758
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7684,6 +7804,21 @@ var StorageLocationSchema = object({
|
|
|
7684
7804
|
nodeId: string().optional(),
|
|
7685
7805
|
isDefault: boolean().default(false),
|
|
7686
7806
|
isSystem: boolean().default(false),
|
|
7807
|
+
/**
|
|
7808
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7809
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7810
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7811
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7812
|
+
* extended to add the next consumer.
|
|
7813
|
+
*
|
|
7814
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7815
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7816
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7817
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7818
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7819
|
+
* always stamped `true`.
|
|
7820
|
+
*/
|
|
7821
|
+
enabled: boolean().optional(),
|
|
7687
7822
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7688
7823
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7689
7824
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12253,7 +12388,8 @@ method(object({
|
|
|
12253
12388
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12254
12389
|
/**
|
|
12255
12390
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12256
|
-
* filesystem
|
|
12391
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12392
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12257
12393
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12258
12394
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12259
12395
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14094,6 +14230,13 @@ var MaskGridDimsSchema = object({
|
|
|
14094
14230
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14095
14231
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14096
14232
|
* one trigger.
|
|
14233
|
+
*
|
|
14234
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14235
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14236
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14237
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14238
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14239
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14097
14240
|
*/
|
|
14098
14241
|
var NcDeliverySchema = _enum([
|
|
14099
14242
|
"immediate",
|
|
@@ -14108,15 +14251,32 @@ var NcDeliverySchema = _enum([
|
|
|
14108
14251
|
* depend on a provider's raw event name or payload shape.
|
|
14109
14252
|
*/
|
|
14110
14253
|
var NcSystemEventKindSchema = _enum([
|
|
14111
|
-
"
|
|
14112
|
-
"
|
|
14254
|
+
"device-online",
|
|
14255
|
+
"device-offline",
|
|
14256
|
+
"device-disabled",
|
|
14257
|
+
"device-enabled",
|
|
14113
14258
|
"stream-online",
|
|
14114
14259
|
"stream-offline",
|
|
14115
14260
|
"node-online",
|
|
14116
14261
|
"node-offline",
|
|
14117
14262
|
"addon-update-available",
|
|
14118
|
-
"server-update-available"
|
|
14263
|
+
"server-update-available",
|
|
14264
|
+
"alarm-triggered",
|
|
14265
|
+
"alarm-armed",
|
|
14266
|
+
"alarm-disarmed",
|
|
14267
|
+
"camera-online",
|
|
14268
|
+
"camera-offline",
|
|
14269
|
+
"camera-disabled",
|
|
14270
|
+
"camera-enabled"
|
|
14271
|
+
]);
|
|
14272
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14273
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14274
|
+
"camera-online",
|
|
14275
|
+
"camera-offline",
|
|
14276
|
+
"camera-disabled",
|
|
14277
|
+
"camera-enabled"
|
|
14119
14278
|
]);
|
|
14279
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14120
14280
|
/**
|
|
14121
14281
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14122
14282
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14125,6 +14285,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14125
14285
|
var NcSystemEventConditionSchema = object({
|
|
14126
14286
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14127
14287
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14288
|
+
/**
|
|
14289
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14290
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14291
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14292
|
+
*
|
|
14293
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14294
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14295
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14296
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14297
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14298
|
+
*/
|
|
14299
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14128
14300
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14129
14301
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14130
14302
|
});
|
|
@@ -14175,6 +14347,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14175
14347
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14176
14348
|
});
|
|
14177
14349
|
/**
|
|
14350
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14351
|
+
*
|
|
14352
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14353
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14354
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14355
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14356
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14357
|
+
*
|
|
14358
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14359
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14360
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14361
|
+
*
|
|
14362
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14363
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14364
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14365
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14366
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14367
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14368
|
+
* ZodEffects the cap path would have to special-case).
|
|
14369
|
+
*
|
|
14370
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14371
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14372
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14373
|
+
* `samplingSeconds` decorative.
|
|
14374
|
+
*
|
|
14375
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14376
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14377
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14378
|
+
* an operator who typed `dog` mean the same thing.
|
|
14379
|
+
*/
|
|
14380
|
+
var NcAudioConditionSchema = object({
|
|
14381
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14382
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14383
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14384
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14385
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14386
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14387
|
+
/** Length of the sampling window in seconds. */
|
|
14388
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14389
|
+
});
|
|
14390
|
+
/**
|
|
14178
14391
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14179
14392
|
*
|
|
14180
14393
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14447,7 +14660,33 @@ var NcConditionsSchema = object({
|
|
|
14447
14660
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14448
14661
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14449
14662
|
*/
|
|
14450
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14663
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14664
|
+
/**
|
|
14665
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14666
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14667
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14668
|
+
* a window that is not full yet, neither filter given). See
|
|
14669
|
+
* {@link NcAudioCondition}.
|
|
14670
|
+
*
|
|
14671
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14672
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14673
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14674
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14675
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14676
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14677
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14678
|
+
*
|
|
14679
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14680
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14681
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14682
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14683
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14684
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14685
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14686
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14687
|
+
* does an audio rule become authorable.
|
|
14688
|
+
*/
|
|
14689
|
+
audio: NcAudioConditionSchema.optional()
|
|
14451
14690
|
});
|
|
14452
14691
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14453
14692
|
var NcRuleTargetSchema = object({
|
|
@@ -14561,6 +14800,73 @@ var NcThrottleSchema = object({
|
|
|
14561
14800
|
*/
|
|
14562
14801
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14563
14802
|
});
|
|
14803
|
+
/**
|
|
14804
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14805
|
+
* it judges may be.
|
|
14806
|
+
*
|
|
14807
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14808
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14809
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14810
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14811
|
+
* tokens for pixels the model pools away.
|
|
14812
|
+
*/
|
|
14813
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14814
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14815
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14816
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14817
|
+
var NcConfirmExpectSchema = object({
|
|
14818
|
+
op: _enum([
|
|
14819
|
+
">=",
|
|
14820
|
+
">",
|
|
14821
|
+
"<=",
|
|
14822
|
+
"<",
|
|
14823
|
+
"=="
|
|
14824
|
+
]),
|
|
14825
|
+
count: number().int().min(0).max(1e3)
|
|
14826
|
+
});
|
|
14827
|
+
/**
|
|
14828
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14829
|
+
* to ship and says whether it agrees with the rule.
|
|
14830
|
+
*
|
|
14831
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14832
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14833
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14834
|
+
*
|
|
14835
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14836
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14837
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14838
|
+
* open looks in the log exactly like a gate that works.
|
|
14839
|
+
*
|
|
14840
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14841
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14842
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14843
|
+
* above rather than trusting a parse it may never have seen.
|
|
14844
|
+
*/
|
|
14845
|
+
var NcConfirmSchema = object({
|
|
14846
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14847
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14848
|
+
enabled: boolean().default(false),
|
|
14849
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14850
|
+
profileId: string().optional(),
|
|
14851
|
+
/**
|
|
14852
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14853
|
+
* from the rule (its class and its expectation).
|
|
14854
|
+
*
|
|
14855
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14856
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14857
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14858
|
+
* turn and only rule-authored words land here.
|
|
14859
|
+
*/
|
|
14860
|
+
prompt: string().max(1e3).optional(),
|
|
14861
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14862
|
+
* own boolean verdict decides. */
|
|
14863
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14864
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14865
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14866
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14867
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14868
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14869
|
+
});
|
|
14564
14870
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14565
14871
|
var NcRuleInputSchema = object({
|
|
14566
14872
|
name: string().min(1).max(200),
|
|
@@ -14621,7 +14927,13 @@ var NcRuleInputSchema = object({
|
|
|
14621
14927
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14622
14928
|
* shape as every other actuation.
|
|
14623
14929
|
*/
|
|
14624
|
-
actions: NcRuleActionsSchema.optional()
|
|
14930
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14931
|
+
/**
|
|
14932
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14933
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14934
|
+
* did, and absent is the only way to say that without a migration.
|
|
14935
|
+
*/
|
|
14936
|
+
confirm: NcConfirmSchema.optional()
|
|
14625
14937
|
});
|
|
14626
14938
|
/**
|
|
14627
14939
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14632,7 +14944,37 @@ var NcRuleInputSchema = object({
|
|
|
14632
14944
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14633
14945
|
* `updateRule` patch.
|
|
14634
14946
|
*/
|
|
14635
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14947
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14948
|
+
disabledTargetIds: array(string()).optional(),
|
|
14949
|
+
/**
|
|
14950
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14951
|
+
*
|
|
14952
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14953
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14954
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14955
|
+
* one — which made every partial edit destructive:
|
|
14956
|
+
*
|
|
14957
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14958
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14959
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14960
|
+
*
|
|
14961
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14962
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14963
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14964
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14965
|
+
* within a minute of a two-field patch.
|
|
14966
|
+
*
|
|
14967
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14968
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14969
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14970
|
+
* absent key is now genuinely absent.
|
|
14971
|
+
*/
|
|
14972
|
+
enabled: boolean().optional(),
|
|
14973
|
+
conditions: NcConditionsSchema.optional(),
|
|
14974
|
+
media: NcMediaPolicySchema.optional(),
|
|
14975
|
+
throttle: NcThrottleSchema.optional(),
|
|
14976
|
+
priority: number().int().min(1).max(5).optional()
|
|
14977
|
+
});
|
|
14636
14978
|
/** A persisted rule. */
|
|
14637
14979
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14638
14980
|
id: string(),
|
|
@@ -14933,6 +15275,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14933
15275
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14934
15276
|
* copy would lie the first time a rule is disabled.
|
|
14935
15277
|
*/
|
|
15278
|
+
/**
|
|
15279
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15280
|
+
*
|
|
15281
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15282
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15283
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15284
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15285
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15286
|
+
* with the switches the operator actually used.
|
|
15287
|
+
*/
|
|
15288
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15289
|
+
"muted",
|
|
15290
|
+
"detection-off",
|
|
15291
|
+
"offline"
|
|
15292
|
+
]);
|
|
15293
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15294
|
+
deviceId: number().int(),
|
|
15295
|
+
reason: NcAlarmSkipReasonSchema
|
|
15296
|
+
});
|
|
14936
15297
|
var NcAlarmModeCoverageSchema = object({
|
|
14937
15298
|
mode: AlarmArmModeSchema,
|
|
14938
15299
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14940,7 +15301,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14940
15301
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14941
15302
|
allDevices: boolean(),
|
|
14942
15303
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14943
|
-
deviceIds: array(number().int())
|
|
15304
|
+
deviceIds: array(number().int()),
|
|
15305
|
+
/**
|
|
15306
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15307
|
+
* excludes it.
|
|
15308
|
+
*
|
|
15309
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15310
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15311
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15312
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15313
|
+
* alarm tab.
|
|
15314
|
+
*/
|
|
15315
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14944
15316
|
});
|
|
14945
15317
|
var NcAlarmConfigSchema = object({
|
|
14946
15318
|
/**
|
|
@@ -16303,13 +16675,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16303
16675
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16304
16676
|
kind: "mutation",
|
|
16305
16677
|
auth: "admin"
|
|
16306
|
-
}), method(
|
|
16678
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16307
16679
|
kind: "mutation",
|
|
16308
16680
|
auth: "admin"
|
|
16309
|
-
}), method(object({
|
|
16310
|
-
kind: "
|
|
16681
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16682
|
+
kind: "mutation",
|
|
16311
16683
|
auth: "admin"
|
|
16312
|
-
}), method(
|
|
16684
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16685
|
+
kind: "mutation",
|
|
16686
|
+
auth: "admin"
|
|
16687
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16688
|
+
kind: "mutation",
|
|
16689
|
+
auth: "admin"
|
|
16690
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16313
16691
|
kind: "mutation",
|
|
16314
16692
|
auth: "admin"
|
|
16315
16693
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17766,9 +18144,16 @@ var CameraStatusSchema = object({
|
|
|
17766
18144
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17767
18145
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17768
18146
|
/**
|
|
17769
|
-
* Per-camera
|
|
18147
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17770
18148
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17771
18149
|
*
|
|
18150
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18151
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18152
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18153
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18154
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18155
|
+
* the difference between a camera being off and a camera being dead.
|
|
18156
|
+
*
|
|
17772
18157
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17773
18158
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17774
18159
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17839,7 +18224,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17839
18224
|
reachable: boolean(),
|
|
17840
18225
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17841
18226
|
});
|
|
17842
|
-
method(object({
|
|
18227
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18228
|
+
kind: "mutation",
|
|
18229
|
+
auth: "admin"
|
|
18230
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18231
|
+
kind: "mutation",
|
|
18232
|
+
auth: "admin"
|
|
18233
|
+
}), method(object({
|
|
17843
18234
|
deviceId: number(),
|
|
17844
18235
|
agentNodeId: string()
|
|
17845
18236
|
}), object({ success: literal(true) }), {
|
|
@@ -18513,6 +18904,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18513
18904
|
locationId: string(),
|
|
18514
18905
|
targetBytes: number().int().positive()
|
|
18515
18906
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18907
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18908
|
+
kind: "mutation",
|
|
18909
|
+
auth: "admin"
|
|
18910
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18911
|
+
kind: "mutation",
|
|
18912
|
+
auth: "admin"
|
|
18913
|
+
});
|
|
18516
18914
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18517
18915
|
providerId: string().min(1),
|
|
18518
18916
|
displayName: string().min(1),
|
|
@@ -18616,6 +19014,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18616
19014
|
label: string(),
|
|
18617
19015
|
description: string().optional()
|
|
18618
19016
|
});
|
|
19017
|
+
/**
|
|
19018
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19019
|
+
* an instance declares a camera.
|
|
19020
|
+
*/
|
|
19021
|
+
var TerminalInstanceInfoSchema = object({
|
|
19022
|
+
instanceId: string(),
|
|
19023
|
+
cameraStableId: string(),
|
|
19024
|
+
nodeId: string(),
|
|
19025
|
+
profileId: string(),
|
|
19026
|
+
profileLabel: string(),
|
|
19027
|
+
name: string(),
|
|
19028
|
+
enabled: boolean()
|
|
19029
|
+
});
|
|
19030
|
+
var TerminalLegacyCameraSchema = object({
|
|
19031
|
+
stableId: string(),
|
|
19032
|
+
nodeId: string(),
|
|
19033
|
+
profileId: string(),
|
|
19034
|
+
profileLabel: string(),
|
|
19035
|
+
name: string(),
|
|
19036
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19037
|
+
adoptable: boolean()
|
|
19038
|
+
});
|
|
18619
19039
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18620
19040
|
seq: number().int().positive(),
|
|
18621
19041
|
kind: literal("data"),
|
|
@@ -18632,7 +19052,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18632
19052
|
snapshot: string().optional(),
|
|
18633
19053
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18634
19054
|
});
|
|
18635
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19055
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19056
|
+
targetNodeId: string().min(1),
|
|
19057
|
+
profileId: string().min(1),
|
|
19058
|
+
name: string().trim().min(1).max(160).optional()
|
|
19059
|
+
}), TerminalInstanceInfoSchema, {
|
|
19060
|
+
kind: "mutation",
|
|
19061
|
+
auth: "admin"
|
|
19062
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19063
|
+
kind: "mutation",
|
|
19064
|
+
auth: "admin"
|
|
19065
|
+
}), method(object({
|
|
19066
|
+
instanceId: string().min(1),
|
|
19067
|
+
enabled: boolean()
|
|
19068
|
+
}), TerminalInstanceInfoSchema, {
|
|
19069
|
+
kind: "mutation",
|
|
19070
|
+
auth: "admin"
|
|
19071
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19072
|
+
stableId: string().min(1),
|
|
19073
|
+
name: string().trim().min(1).max(160).optional()
|
|
19074
|
+
}), TerminalInstanceInfoSchema, {
|
|
19075
|
+
kind: "mutation",
|
|
19076
|
+
auth: "admin"
|
|
19077
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18636
19078
|
profileId: string(),
|
|
18637
19079
|
cols: number().int().positive(),
|
|
18638
19080
|
rows: number().int().positive()
|
|
@@ -18649,7 +19091,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18649
19091
|
}), method(object({
|
|
18650
19092
|
sessionId: string(),
|
|
18651
19093
|
afterSeq: number().int().nonnegative(),
|
|
18652
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19094
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19095
|
+
/**
|
|
19096
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19097
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19098
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19099
|
+
*/
|
|
19100
|
+
waitForOutput: boolean().optional()
|
|
18653
19101
|
}), TerminalOutputBatchSchema, {
|
|
18654
19102
|
kind: "mutation",
|
|
18655
19103
|
auth: "admin",
|
|
@@ -21155,6 +21603,7 @@ var FaceInfoSchema = object({
|
|
|
21155
21603
|
var FaceFilterEnum = _enum([
|
|
21156
21604
|
"unassigned",
|
|
21157
21605
|
"recognized",
|
|
21606
|
+
"identified",
|
|
21158
21607
|
"all"
|
|
21159
21608
|
]);
|
|
21160
21609
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21183,6 +21632,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21183
21632
|
kind: "mutation",
|
|
21184
21633
|
auth: "admin"
|
|
21185
21634
|
}), method(object({
|
|
21635
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21636
|
+
deviceId: number().int().optional(),
|
|
21186
21637
|
limit: number().int().positive().optional(),
|
|
21187
21638
|
filter: FaceFilterEnum.optional(),
|
|
21188
21639
|
/**
|
|
@@ -23412,6 +23863,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23412
23863
|
capName: string().min(1).max(64),
|
|
23413
23864
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23414
23865
|
valuePath: string().min(1).max(64)
|
|
23866
|
+
}),
|
|
23867
|
+
object({
|
|
23868
|
+
kind: literal("latest-recognition"),
|
|
23869
|
+
recognition: _enum(["person", "plate"])
|
|
23415
23870
|
})
|
|
23416
23871
|
]);
|
|
23417
23872
|
var OsdSlotBindingSchema = object({
|
|
@@ -23517,6 +23972,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23517
23972
|
}), object({ success: literal(true) }), {
|
|
23518
23973
|
kind: "mutation",
|
|
23519
23974
|
auth: "admin"
|
|
23975
|
+
}), method(object({
|
|
23976
|
+
sourceDeviceId: number().int(),
|
|
23977
|
+
targetDeviceId: number().int()
|
|
23978
|
+
}), object({
|
|
23979
|
+
copied: number().int().nonnegative(),
|
|
23980
|
+
skipped: number().int().nonnegative()
|
|
23981
|
+
}), {
|
|
23982
|
+
kind: "mutation",
|
|
23983
|
+
auth: "admin"
|
|
23520
23984
|
}), method(object({
|
|
23521
23985
|
deviceId: number().int(),
|
|
23522
23986
|
slotId: string().min(1),
|
|
@@ -24439,7 +24903,19 @@ var RecordingManifestSchema = object({
|
|
|
24439
24903
|
* profiles/subtrees/locations on this node). */
|
|
24440
24904
|
var RecordingDeviceUsageSchema = object({
|
|
24441
24905
|
deviceId: number(),
|
|
24442
|
-
usedBytes: number()
|
|
24906
|
+
usedBytes: number(),
|
|
24907
|
+
/**
|
|
24908
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
24909
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
24910
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
24911
|
+
*
|
|
24912
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
24913
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
24914
|
+
* field must keep validating that older provider's payload: the framework
|
|
24915
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
24916
|
+
* the later of the two.
|
|
24917
|
+
*/
|
|
24918
|
+
oldestMs: number().nullable().optional()
|
|
24443
24919
|
});
|
|
24444
24920
|
/** Recording storage usage + capacity for one storage location. */
|
|
24445
24921
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24467,6 +24943,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24467
24943
|
locations: array(RecordingLocationUsageSchema)
|
|
24468
24944
|
});
|
|
24469
24945
|
/**
|
|
24946
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
24947
|
+
*
|
|
24948
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
24949
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
24950
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
24951
|
+
* location, run FIFO behind the single-flight mover.
|
|
24952
|
+
*
|
|
24953
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
24954
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
24955
|
+
* (empty on the plan).
|
|
24956
|
+
*/
|
|
24957
|
+
var RecordingRebalanceMoveSchema = object({
|
|
24958
|
+
deviceId: number(),
|
|
24959
|
+
profile: string(),
|
|
24960
|
+
fromLocationId: string(),
|
|
24961
|
+
toLocationId: string(),
|
|
24962
|
+
bytes: number(),
|
|
24963
|
+
files: number().int()
|
|
24964
|
+
});
|
|
24965
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
24966
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
24967
|
+
* that had nothing to do. */
|
|
24968
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
24969
|
+
"unassigned",
|
|
24970
|
+
"target-not-writable",
|
|
24971
|
+
"below-threshold",
|
|
24972
|
+
"no-headroom"
|
|
24973
|
+
]);
|
|
24974
|
+
var RecordingRebalanceSkipSchema = object({
|
|
24975
|
+
deviceId: number(),
|
|
24976
|
+
profile: string(),
|
|
24977
|
+
fromLocationId: string(),
|
|
24978
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
24979
|
+
toLocationId: string().nullable(),
|
|
24980
|
+
bytes: number(),
|
|
24981
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
24982
|
+
});
|
|
24983
|
+
var RecordingRebalancePlanSchema = object({
|
|
24984
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
24985
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
24986
|
+
bytesToMove: number(),
|
|
24987
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
24988
|
+
jobIds: array(string())
|
|
24989
|
+
});
|
|
24990
|
+
var RecordingRebalanceInputSchema = object({
|
|
24991
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
24992
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
24993
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
24994
|
+
minMoveGb: number().min(0).optional()
|
|
24995
|
+
});
|
|
24996
|
+
/**
|
|
24470
24997
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24471
24998
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24472
24999
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24614,6 +25141,21 @@ method(object({
|
|
|
24614
25141
|
}), {
|
|
24615
25142
|
kind: "mutation",
|
|
24616
25143
|
auth: "admin"
|
|
25144
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25145
|
+
kind: "mutation",
|
|
25146
|
+
auth: "admin"
|
|
25147
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25148
|
+
kind: "mutation",
|
|
25149
|
+
auth: "admin"
|
|
25150
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25151
|
+
kind: "mutation",
|
|
25152
|
+
auth: "admin"
|
|
25153
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25154
|
+
kind: "mutation",
|
|
25155
|
+
auth: "admin"
|
|
25156
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25157
|
+
kind: "mutation",
|
|
25158
|
+
auth: "admin"
|
|
24617
25159
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24618
25160
|
kind: "mutation",
|
|
24619
25161
|
auth: "admin"
|
|
@@ -24623,9 +25165,15 @@ method(object({
|
|
|
24623
25165
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24624
25166
|
kind: "mutation",
|
|
24625
25167
|
auth: "admin"
|
|
25168
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25169
|
+
kind: "query",
|
|
25170
|
+
auth: "admin"
|
|
25171
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25172
|
+
kind: "mutation",
|
|
25173
|
+
auth: "admin"
|
|
24626
25174
|
});
|
|
24627
25175
|
/**
|
|
24628
|
-
* `
|
|
25176
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24629
25177
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24630
25178
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24631
25179
|
* delete-after-download.
|
|
@@ -24640,10 +25188,42 @@ method(object({
|
|
|
24640
25188
|
*/
|
|
24641
25189
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24642
25190
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25191
|
+
/**
|
|
25192
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25193
|
+
*
|
|
25194
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25195
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25196
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25197
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25198
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25199
|
+
*/
|
|
25200
|
+
var ExportDenseRangeSchema = object({
|
|
25201
|
+
fromSec: number().nonnegative(),
|
|
25202
|
+
toSec: number().nonnegative()
|
|
25203
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25204
|
+
/**
|
|
25205
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25206
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25207
|
+
*
|
|
25208
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25209
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25210
|
+
*/
|
|
25211
|
+
var ExportDenseSchema = object({
|
|
25212
|
+
everyMs: number().int().positive(),
|
|
25213
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25214
|
+
});
|
|
24643
25215
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24644
25216
|
var ExportTimelapseSchema = object({
|
|
24645
25217
|
everyMs: number().int().positive(),
|
|
24646
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25218
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25219
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25220
|
+
dense: ExportDenseSchema.optional()
|
|
25221
|
+
}).superRefine((v, ctx) => {
|
|
25222
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25223
|
+
code: ZodIssueCode.custom,
|
|
25224
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25225
|
+
path: ["dense", "everyMs"]
|
|
25226
|
+
});
|
|
24647
25227
|
});
|
|
24648
25228
|
/**
|
|
24649
25229
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -24701,6 +25281,19 @@ var ExportDownloadSchema = object({
|
|
|
24701
25281
|
url: string(),
|
|
24702
25282
|
endpoints: array(string())
|
|
24703
25283
|
});
|
|
25284
|
+
/**
|
|
25285
|
+
* A finished export's bytes, inline.
|
|
25286
|
+
*
|
|
25287
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25288
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25289
|
+
*/
|
|
25290
|
+
var ExportBytesSchema = object({
|
|
25291
|
+
base64: string(),
|
|
25292
|
+
contentType: string(),
|
|
25293
|
+
/** Suggested filename, extension included. */
|
|
25294
|
+
name: string(),
|
|
25295
|
+
bytes: number().int().nonnegative()
|
|
25296
|
+
});
|
|
24704
25297
|
method(object({
|
|
24705
25298
|
deviceId: number(),
|
|
24706
25299
|
profile: string(),
|
|
@@ -24725,6 +25318,9 @@ method(object({
|
|
|
24725
25318
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
24726
25319
|
kind: "query",
|
|
24727
25320
|
auth: "protected"
|
|
25321
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25322
|
+
kind: "query",
|
|
25323
|
+
auth: "protected"
|
|
24728
25324
|
});
|
|
24729
25325
|
/**
|
|
24730
25326
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30226,6 +30822,12 @@ Object.freeze({
|
|
|
30226
30822
|
addonId: null,
|
|
30227
30823
|
access: "delete"
|
|
30228
30824
|
},
|
|
30825
|
+
"osdManager.copyDeviceConfiguration": {
|
|
30826
|
+
capName: "osd-manager",
|
|
30827
|
+
capScope: "system",
|
|
30828
|
+
addonId: null,
|
|
30829
|
+
access: "create"
|
|
30830
|
+
},
|
|
30229
30831
|
"osdManager.getConditionSupport": {
|
|
30230
30832
|
capName: "osd-manager",
|
|
30231
30833
|
capScope: "system",
|
|
@@ -30322,7 +30924,7 @@ Object.freeze({
|
|
|
30322
30924
|
addonId: null,
|
|
30323
30925
|
access: "create"
|
|
30324
30926
|
},
|
|
30325
|
-
"pipelineAnalytics.
|
|
30927
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30326
30928
|
capName: "pipeline-analytics",
|
|
30327
30929
|
capScope: "device",
|
|
30328
30930
|
addonId: null,
|
|
@@ -30394,12 +30996,6 @@ Object.freeze({
|
|
|
30394
30996
|
addonId: null,
|
|
30395
30997
|
access: "view"
|
|
30396
30998
|
},
|
|
30397
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30398
|
-
capName: "pipeline-analytics",
|
|
30399
|
-
capScope: "device",
|
|
30400
|
-
addonId: null,
|
|
30401
|
-
access: "view"
|
|
30402
|
-
},
|
|
30403
30999
|
"pipelineAnalytics.getMotionEvents": {
|
|
30404
31000
|
capName: "pipeline-analytics",
|
|
30405
31001
|
capScope: "device",
|
|
@@ -30436,6 +31032,12 @@ Object.freeze({
|
|
|
30436
31032
|
addonId: null,
|
|
30437
31033
|
access: "view"
|
|
30438
31034
|
},
|
|
31035
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31036
|
+
capName: "pipeline-analytics",
|
|
31037
|
+
capScope: "device",
|
|
31038
|
+
addonId: null,
|
|
31039
|
+
access: "view"
|
|
31040
|
+
},
|
|
30439
31041
|
"pipelineAnalytics.getTrack": {
|
|
30440
31042
|
capName: "pipeline-analytics",
|
|
30441
31043
|
capScope: "device",
|
|
@@ -30514,6 +31116,12 @@ Object.freeze({
|
|
|
30514
31116
|
addonId: null,
|
|
30515
31117
|
access: "view"
|
|
30516
31118
|
},
|
|
31119
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31120
|
+
capName: "pipeline-analytics",
|
|
31121
|
+
capScope: "device",
|
|
31122
|
+
addonId: null,
|
|
31123
|
+
access: "create"
|
|
31124
|
+
},
|
|
30517
31125
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30518
31126
|
capName: "pipeline-analytics",
|
|
30519
31127
|
capScope: "device",
|
|
@@ -30544,7 +31152,7 @@ Object.freeze({
|
|
|
30544
31152
|
addonId: null,
|
|
30545
31153
|
access: "create"
|
|
30546
31154
|
},
|
|
30547
|
-
"pipelineAnalytics.
|
|
31155
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30548
31156
|
capName: "pipeline-analytics",
|
|
30549
31157
|
capScope: "device",
|
|
30550
31158
|
addonId: null,
|
|
@@ -30556,6 +31164,12 @@ Object.freeze({
|
|
|
30556
31164
|
addonId: null,
|
|
30557
31165
|
access: "create"
|
|
30558
31166
|
},
|
|
31167
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31168
|
+
capName: "pipeline-analytics",
|
|
31169
|
+
capScope: "device",
|
|
31170
|
+
addonId: null,
|
|
31171
|
+
access: "create"
|
|
31172
|
+
},
|
|
30559
31173
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30560
31174
|
capName: "pipeline-analytics",
|
|
30561
31175
|
capScope: "device",
|
|
@@ -30580,6 +31194,12 @@ Object.freeze({
|
|
|
30580
31194
|
addonId: null,
|
|
30581
31195
|
access: "create"
|
|
30582
31196
|
},
|
|
31197
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31198
|
+
capName: "pipeline-analytics",
|
|
31199
|
+
capScope: "device",
|
|
31200
|
+
addonId: null,
|
|
31201
|
+
access: "create"
|
|
31202
|
+
},
|
|
30583
31203
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30584
31204
|
capName: "pipeline-analytics",
|
|
30585
31205
|
capScope: "device",
|
|
@@ -30946,6 +31566,12 @@ Object.freeze({
|
|
|
30946
31566
|
addonId: null,
|
|
30947
31567
|
access: "view"
|
|
30948
31568
|
},
|
|
31569
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31570
|
+
capName: "pipeline-orchestrator",
|
|
31571
|
+
capScope: "system",
|
|
31572
|
+
addonId: null,
|
|
31573
|
+
access: "create"
|
|
31574
|
+
},
|
|
30949
31575
|
"pipelineOrchestrator.rebalance": {
|
|
30950
31576
|
capName: "pipeline-orchestrator",
|
|
30951
31577
|
capScope: "system",
|
|
@@ -30970,6 +31596,12 @@ Object.freeze({
|
|
|
30970
31596
|
addonId: null,
|
|
30971
31597
|
access: "view"
|
|
30972
31598
|
},
|
|
31599
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31600
|
+
capName: "pipeline-orchestrator",
|
|
31601
|
+
capScope: "system",
|
|
31602
|
+
addonId: null,
|
|
31603
|
+
access: "create"
|
|
31604
|
+
},
|
|
30973
31605
|
"pipelineOrchestrator.saveTemplate": {
|
|
30974
31606
|
capName: "pipeline-orchestrator",
|
|
30975
31607
|
capScope: "system",
|
|
@@ -31366,7 +31998,13 @@ Object.freeze({
|
|
|
31366
31998
|
addonId: null,
|
|
31367
31999
|
access: "create"
|
|
31368
32000
|
},
|
|
31369
|
-
"recording.
|
|
32001
|
+
"recording.cancelRelocateJob": {
|
|
32002
|
+
capName: "recording",
|
|
32003
|
+
capScope: "system",
|
|
32004
|
+
addonId: null,
|
|
32005
|
+
access: "create"
|
|
32006
|
+
},
|
|
32007
|
+
"recording.cancelStorageMigrationMove": {
|
|
31370
32008
|
capName: "recording",
|
|
31371
32009
|
capScope: "system",
|
|
31372
32010
|
addonId: null,
|
|
@@ -31402,7 +32040,7 @@ Object.freeze({
|
|
|
31402
32040
|
addonId: null,
|
|
31403
32041
|
access: "view"
|
|
31404
32042
|
},
|
|
31405
|
-
"recording.
|
|
32043
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31406
32044
|
capName: "recording",
|
|
31407
32045
|
capScope: "system",
|
|
31408
32046
|
addonId: null,
|
|
@@ -31420,12 +32058,30 @@ Object.freeze({
|
|
|
31420
32058
|
addonId: null,
|
|
31421
32059
|
access: "view"
|
|
31422
32060
|
},
|
|
32061
|
+
"recording.listRelocateJobs": {
|
|
32062
|
+
capName: "recording",
|
|
32063
|
+
capScope: "system",
|
|
32064
|
+
addonId: null,
|
|
32065
|
+
access: "view"
|
|
32066
|
+
},
|
|
31423
32067
|
"recording.locateSegment": {
|
|
31424
32068
|
capName: "recording",
|
|
31425
32069
|
capScope: "system",
|
|
31426
32070
|
addonId: null,
|
|
31427
32071
|
access: "view"
|
|
31428
32072
|
},
|
|
32073
|
+
"recording.pauseForStorageMigration": {
|
|
32074
|
+
capName: "recording",
|
|
32075
|
+
capScope: "system",
|
|
32076
|
+
addonId: null,
|
|
32077
|
+
access: "create"
|
|
32078
|
+
},
|
|
32079
|
+
"recording.planStorageRebalance": {
|
|
32080
|
+
capName: "recording",
|
|
32081
|
+
capScope: "system",
|
|
32082
|
+
addonId: null,
|
|
32083
|
+
access: "view"
|
|
32084
|
+
},
|
|
31429
32085
|
"recording.pruneFootage": {
|
|
31430
32086
|
capName: "recording",
|
|
31431
32087
|
capScope: "system",
|
|
@@ -31444,6 +32100,12 @@ Object.freeze({
|
|
|
31444
32100
|
addonId: null,
|
|
31445
32101
|
access: "view"
|
|
31446
32102
|
},
|
|
32103
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32104
|
+
capName: "recording",
|
|
32105
|
+
capScope: "system",
|
|
32106
|
+
addonId: null,
|
|
32107
|
+
access: "create"
|
|
32108
|
+
},
|
|
31447
32109
|
"recording.relocateFootage": {
|
|
31448
32110
|
capName: "recording",
|
|
31449
32111
|
capScope: "system",
|
|
@@ -31468,44 +32130,68 @@ Object.freeze({
|
|
|
31468
32130
|
addonId: null,
|
|
31469
32131
|
access: "create"
|
|
31470
32132
|
},
|
|
32133
|
+
"recording.resumeForStorageMigration": {
|
|
32134
|
+
capName: "recording",
|
|
32135
|
+
capScope: "system",
|
|
32136
|
+
addonId: null,
|
|
32137
|
+
access: "create"
|
|
32138
|
+
},
|
|
31471
32139
|
"recording.setDeviceConfig": {
|
|
31472
32140
|
capName: "recording",
|
|
31473
32141
|
capScope: "system",
|
|
31474
32142
|
addonId: null,
|
|
31475
32143
|
access: "create"
|
|
31476
32144
|
},
|
|
32145
|
+
"recording.startStorageMigrationMove": {
|
|
32146
|
+
capName: "recording",
|
|
32147
|
+
capScope: "system",
|
|
32148
|
+
addonId: null,
|
|
32149
|
+
access: "create"
|
|
32150
|
+
},
|
|
32151
|
+
"recording.startStorageRebalance": {
|
|
32152
|
+
capName: "recording",
|
|
32153
|
+
capScope: "system",
|
|
32154
|
+
addonId: null,
|
|
32155
|
+
access: "create"
|
|
32156
|
+
},
|
|
31477
32157
|
"recordingExport.cancelExport": {
|
|
31478
|
-
capName: "
|
|
32158
|
+
capName: "recording-export",
|
|
31479
32159
|
capScope: "system",
|
|
31480
32160
|
addonId: null,
|
|
31481
32161
|
access: "create"
|
|
31482
32162
|
},
|
|
31483
32163
|
"recordingExport.createExport": {
|
|
31484
|
-
capName: "
|
|
32164
|
+
capName: "recording-export",
|
|
31485
32165
|
capScope: "system",
|
|
31486
32166
|
addonId: null,
|
|
31487
32167
|
access: "create"
|
|
31488
32168
|
},
|
|
31489
32169
|
"recordingExport.deleteExport": {
|
|
31490
|
-
capName: "
|
|
32170
|
+
capName: "recording-export",
|
|
31491
32171
|
capScope: "system",
|
|
31492
32172
|
addonId: null,
|
|
31493
32173
|
access: "delete"
|
|
31494
32174
|
},
|
|
31495
32175
|
"recordingExport.getDownloadUrl": {
|
|
31496
|
-
capName: "
|
|
32176
|
+
capName: "recording-export",
|
|
31497
32177
|
capScope: "system",
|
|
31498
32178
|
addonId: null,
|
|
31499
32179
|
access: "view"
|
|
31500
32180
|
},
|
|
31501
32181
|
"recordingExport.getExport": {
|
|
31502
|
-
capName: "
|
|
32182
|
+
capName: "recording-export",
|
|
31503
32183
|
capScope: "system",
|
|
31504
32184
|
addonId: null,
|
|
31505
32185
|
access: "view"
|
|
31506
32186
|
},
|
|
31507
32187
|
"recordingExport.listExports": {
|
|
31508
|
-
capName: "
|
|
32188
|
+
capName: "recording-export",
|
|
32189
|
+
capScope: "system",
|
|
32190
|
+
addonId: null,
|
|
32191
|
+
access: "view"
|
|
32192
|
+
},
|
|
32193
|
+
"recordingExport.readExportBytes": {
|
|
32194
|
+
capName: "recording-export",
|
|
31509
32195
|
capScope: "system",
|
|
31510
32196
|
addonId: null,
|
|
31511
32197
|
access: "view"
|
|
@@ -31864,6 +32550,30 @@ Object.freeze({
|
|
|
31864
32550
|
addonId: null,
|
|
31865
32551
|
access: "view"
|
|
31866
32552
|
},
|
|
32553
|
+
"storageMigration.cancel": {
|
|
32554
|
+
capName: "storage-migration",
|
|
32555
|
+
capScope: "system",
|
|
32556
|
+
addonId: null,
|
|
32557
|
+
access: "create"
|
|
32558
|
+
},
|
|
32559
|
+
"storageMigration.plan": {
|
|
32560
|
+
capName: "storage-migration",
|
|
32561
|
+
capScope: "system",
|
|
32562
|
+
addonId: null,
|
|
32563
|
+
access: "view"
|
|
32564
|
+
},
|
|
32565
|
+
"storageMigration.start": {
|
|
32566
|
+
capName: "storage-migration",
|
|
32567
|
+
capScope: "system",
|
|
32568
|
+
addonId: null,
|
|
32569
|
+
access: "create"
|
|
32570
|
+
},
|
|
32571
|
+
"storageMigration.status": {
|
|
32572
|
+
capName: "storage-migration",
|
|
32573
|
+
capScope: "system",
|
|
32574
|
+
addonId: null,
|
|
32575
|
+
access: "view"
|
|
32576
|
+
},
|
|
31867
32577
|
"storageProvider.abortUpload": {
|
|
31868
32578
|
capName: "storage-provider",
|
|
31869
32579
|
capScope: "system",
|
|
@@ -32242,12 +32952,42 @@ Object.freeze({
|
|
|
32242
32952
|
addonId: null,
|
|
32243
32953
|
access: "create"
|
|
32244
32954
|
},
|
|
32955
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
32956
|
+
capName: "terminal-session",
|
|
32957
|
+
capScope: "system",
|
|
32958
|
+
addonId: null,
|
|
32959
|
+
access: "create"
|
|
32960
|
+
},
|
|
32245
32961
|
"terminalSession.close": {
|
|
32246
32962
|
capName: "terminal-session",
|
|
32247
32963
|
capScope: "system",
|
|
32248
32964
|
addonId: null,
|
|
32249
32965
|
access: "create"
|
|
32250
32966
|
},
|
|
32967
|
+
"terminalSession.createInstance": {
|
|
32968
|
+
capName: "terminal-session",
|
|
32969
|
+
capScope: "system",
|
|
32970
|
+
addonId: null,
|
|
32971
|
+
access: "create"
|
|
32972
|
+
},
|
|
32973
|
+
"terminalSession.deleteInstance": {
|
|
32974
|
+
capName: "terminal-session",
|
|
32975
|
+
capScope: "system",
|
|
32976
|
+
addonId: null,
|
|
32977
|
+
access: "delete"
|
|
32978
|
+
},
|
|
32979
|
+
"terminalSession.listInstances": {
|
|
32980
|
+
capName: "terminal-session",
|
|
32981
|
+
capScope: "system",
|
|
32982
|
+
addonId: null,
|
|
32983
|
+
access: "view"
|
|
32984
|
+
},
|
|
32985
|
+
"terminalSession.listLegacyCameras": {
|
|
32986
|
+
capName: "terminal-session",
|
|
32987
|
+
capScope: "system",
|
|
32988
|
+
addonId: null,
|
|
32989
|
+
access: "view"
|
|
32990
|
+
},
|
|
32251
32991
|
"terminalSession.listProfiles": {
|
|
32252
32992
|
capName: "terminal-session",
|
|
32253
32993
|
capScope: "system",
|
|
@@ -32278,6 +33018,12 @@ Object.freeze({
|
|
|
32278
33018
|
addonId: null,
|
|
32279
33019
|
access: "create"
|
|
32280
33020
|
},
|
|
33021
|
+
"terminalSession.setInstanceEnabled": {
|
|
33022
|
+
capName: "terminal-session",
|
|
33023
|
+
capScope: "system",
|
|
33024
|
+
addonId: null,
|
|
33025
|
+
access: "create"
|
|
33026
|
+
},
|
|
32281
33027
|
"terminalSession.writeInput": {
|
|
32282
33028
|
capName: "terminal-session",
|
|
32283
33029
|
capScope: "system",
|
|
@@ -32822,6 +33568,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
32822
33568
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
32823
33569
|
var PriorityField = number().int().min(1).max(5);
|
|
32824
33570
|
/**
|
|
33571
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
33572
|
+
*
|
|
33573
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
33574
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
33575
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
33576
|
+
*
|
|
33577
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
33578
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
33579
|
+
*
|
|
33580
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
33581
|
+
*
|
|
33582
|
+
* 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.
|
|
33583
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
33584
|
+
* and therefore the length of a quiet night, does not move.
|
|
33585
|
+
*
|
|
33586
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
33587
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
33588
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
33589
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
33590
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
33591
|
+
*/
|
|
33592
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
33593
|
+
/**
|
|
33594
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
33595
|
+
*
|
|
33596
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
33597
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
33598
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
33599
|
+
* that range every ~583 ms.
|
|
33600
|
+
*
|
|
33601
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
33602
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
33603
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
33604
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
33605
|
+
* schema change and are the tracked follow-up.
|
|
33606
|
+
*
|
|
33607
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
33608
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
33609
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
33610
|
+
* happened.
|
|
33611
|
+
*/
|
|
33612
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
33613
|
+
/**
|
|
33614
|
+
* Caption burned into the notification's preview frame.
|
|
33615
|
+
*
|
|
33616
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
33617
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
33618
|
+
* templating dialect for one field would be a second thing to explain.
|
|
33619
|
+
*
|
|
33620
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
33621
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
33622
|
+
* the reason this is not `.min(1)`.
|
|
33623
|
+
*/
|
|
33624
|
+
var PreviewTextField = string().max(200);
|
|
33625
|
+
/**
|
|
33626
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
33627
|
+
*
|
|
33628
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
33629
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
33630
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
33631
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
33632
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
33633
|
+
* them.
|
|
33634
|
+
*
|
|
33635
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
33636
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
33637
|
+
* paying that on the deploy that shipped it.
|
|
33638
|
+
*
|
|
33639
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
33640
|
+
*/
|
|
33641
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
33642
|
+
/**
|
|
33643
|
+
* Which detection classes the notification reports counts for.
|
|
33644
|
+
*
|
|
33645
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
33646
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
33647
|
+
* class the window actually contained", which is what an operator who never
|
|
33648
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
33649
|
+
* counts cars all night).
|
|
33650
|
+
*
|
|
33651
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
33652
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
33653
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
33654
|
+
* not emit.
|
|
33655
|
+
*
|
|
33656
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
33657
|
+
* - `{{detections}}` — total over the reported classes
|
|
33658
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
33659
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
33660
|
+
* one per class, `count_` + the class name
|
|
33661
|
+
*
|
|
33662
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
33663
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
33664
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
33665
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
33666
|
+
*/
|
|
33667
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
33668
|
+
/**
|
|
32825
33669
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
32826
33670
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
32827
33671
|
* here (see the ownership note above).
|
|
@@ -32841,9 +33685,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
32841
33685
|
cadenceSec: CadenceSecField.default(15),
|
|
32842
33686
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
32843
33687
|
framerate: FramerateField.default(10),
|
|
33688
|
+
/**
|
|
33689
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
33690
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
33691
|
+
* field gets.
|
|
33692
|
+
*/
|
|
33693
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33694
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
33695
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32844
33696
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
32845
33697
|
targets: TargetsField,
|
|
32846
33698
|
template: TimelapseTemplateSchema.optional(),
|
|
33699
|
+
/**
|
|
33700
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
33701
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
33702
|
+
*
|
|
33703
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
33704
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
33705
|
+
* silently clear the caption too.
|
|
33706
|
+
*/
|
|
33707
|
+
previewText: PreviewTextField.optional(),
|
|
33708
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
33709
|
+
previewMode: PreviewModeField.default("image"),
|
|
33710
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
33711
|
+
reportClasses: ReportClassesField.optional(),
|
|
32847
33712
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32848
33713
|
priority: PriorityField.default(3)
|
|
32849
33714
|
});
|
|
@@ -32854,8 +33719,13 @@ object({
|
|
|
32854
33719
|
schedule: NcScheduleSchema.optional(),
|
|
32855
33720
|
cadenceSec: CadenceSecField.optional(),
|
|
32856
33721
|
framerate: FramerateField.optional(),
|
|
33722
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
33723
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
32857
33724
|
targets: TargetsField.optional(),
|
|
32858
33725
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
33726
|
+
previewText: PreviewTextField.optional(),
|
|
33727
|
+
previewMode: PreviewModeField.optional(),
|
|
33728
|
+
reportClasses: ReportClassesField.optional(),
|
|
32859
33729
|
priority: PriorityField.optional()
|
|
32860
33730
|
});
|
|
32861
33731
|
TimelapseRuleInputSchema.extend({
|
|
@@ -32867,10 +33737,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
32867
33737
|
*/
|
|
32868
33738
|
ownerUserId: string().optional(),
|
|
32869
33739
|
/**
|
|
32870
|
-
* Epoch-ms of the
|
|
32871
|
-
*
|
|
33740
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
33741
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
33742
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
32872
33743
|
*/
|
|
32873
33744
|
lastGeneratedAt: number().optional(),
|
|
33745
|
+
/**
|
|
33746
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
33747
|
+
* re-generation guard's real durable state.
|
|
33748
|
+
*
|
|
33749
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
33750
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
33751
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
33752
|
+
* already done — and B's night is gone for good, because the window will not
|
|
33753
|
+
* come back.
|
|
33754
|
+
*
|
|
33755
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
33756
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
33757
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
33758
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
33759
|
+
* once, on the deploy that shipped the map.
|
|
33760
|
+
*/
|
|
33761
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
32874
33762
|
/** userId of the caller who created the rule (server-stamped). */
|
|
32875
33763
|
createdBy: string(),
|
|
32876
33764
|
createdAt: number(),
|