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