@camstack/addon-export-alexa 1.2.16 → 1.2.18
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/export-alexa.addon.js +936 -48
- package/dist/export-alexa.addon.mjs +936 -48
- package/package.json +1 -1
|
@@ -7373,8 +7373,31 @@ var AdoptionJobSchema = object({
|
|
|
7373
7373
|
error: string().nullable()
|
|
7374
7374
|
});
|
|
7375
7375
|
/**
|
|
7376
|
-
* Per-camera FUNCTION SWITCHES
|
|
7377
|
-
*
|
|
7376
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7377
|
+
*
|
|
7378
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7379
|
+
*
|
|
7380
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7381
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7382
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7383
|
+
* every function already had a settings page of its own, and a second place to
|
|
7384
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7385
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7386
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7387
|
+
* (which was always first-class; the switch was a veneer over
|
|
7388
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7389
|
+
* per-device setting, the two camera planes to their own components.
|
|
7390
|
+
*
|
|
7391
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7392
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7393
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7394
|
+
* never about a control panel.
|
|
7395
|
+
*
|
|
7396
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7397
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7398
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7399
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7400
|
+
* stop; nothing new may be built on it.
|
|
7378
7401
|
*
|
|
7379
7402
|
* ## This file adds no state
|
|
7380
7403
|
*
|
|
@@ -7719,14 +7742,21 @@ var RecordingConfigSchema = object({
|
|
|
7719
7742
|
/**
|
|
7720
7743
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7721
7744
|
*
|
|
7722
|
-
* One shape shared by the recorder
|
|
7723
|
-
*
|
|
7724
|
-
*
|
|
7725
|
-
*
|
|
7726
|
-
*
|
|
7727
|
-
|
|
7745
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7746
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7747
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7748
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7749
|
+
* addon surface.
|
|
7750
|
+
*/
|
|
7751
|
+
/**
|
|
7752
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7753
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7754
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7755
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7756
|
+
* runs at all.
|
|
7728
7757
|
*/
|
|
7729
7758
|
var RelocateJobStateSchema = _enum([
|
|
7759
|
+
"queued",
|
|
7730
7760
|
"running",
|
|
7731
7761
|
"done",
|
|
7732
7762
|
"failed",
|
|
@@ -7751,19 +7781,109 @@ var RelocateJobSchema = object({
|
|
|
7751
7781
|
finishedAt: number().nullable(),
|
|
7752
7782
|
error: string().nullable()
|
|
7753
7783
|
});
|
|
7784
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7785
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7786
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7754
7787
|
var RelocateFootageInputSchema = object({
|
|
7755
|
-
deviceId: number().optional(),
|
|
7756
7788
|
fromLocationId: string(),
|
|
7757
7789
|
toLocationId: string(),
|
|
7758
7790
|
entities: array(_enum(["segments"])).optional(),
|
|
7791
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7792
|
+
* pre-orchestration compatibility path. */
|
|
7793
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7794
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7795
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7796
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7797
|
+
deviceId: number().int().optional(),
|
|
7798
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7799
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7800
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7801
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7802
|
+
profiles: array(string()).optional(),
|
|
7759
7803
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7760
7804
|
* never allowed to starve live writers. */
|
|
7761
7805
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7762
7806
|
});
|
|
7763
|
-
|
|
7764
|
-
|
|
7807
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7808
|
+
* from persistent recording settings: a migration never changes
|
|
7809
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7810
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7811
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7812
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7765
7813
|
toLocationId: string(),
|
|
7766
7814
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7815
|
+
}).extend({ leaseId: string().min(1) });
|
|
7816
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7817
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7818
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7819
|
+
var StorageMigrationClassSchema = _enum([
|
|
7820
|
+
"recordings",
|
|
7821
|
+
"recordingsLow",
|
|
7822
|
+
"eventMedia"
|
|
7823
|
+
]);
|
|
7824
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7825
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7826
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7827
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7828
|
+
recordings: string().min(1).optional(),
|
|
7829
|
+
recordingsLow: string().min(1).optional(),
|
|
7830
|
+
eventMedia: string().min(1).optional()
|
|
7831
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7832
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7833
|
+
var StorageMigrationInputSchema = object({
|
|
7834
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7835
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7836
|
+
});
|
|
7837
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7838
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7839
|
+
* verified. */
|
|
7840
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7841
|
+
"planning",
|
|
7842
|
+
"pausing",
|
|
7843
|
+
"moving",
|
|
7844
|
+
"verifying",
|
|
7845
|
+
"repointing",
|
|
7846
|
+
"refreshing",
|
|
7847
|
+
"resuming",
|
|
7848
|
+
"done",
|
|
7849
|
+
"failed",
|
|
7850
|
+
"cancelled"
|
|
7851
|
+
]);
|
|
7852
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7853
|
+
"pipeline",
|
|
7854
|
+
"recorder",
|
|
7855
|
+
"analytics"
|
|
7856
|
+
]);
|
|
7857
|
+
var StorageMigrationMoveSchema = object({
|
|
7858
|
+
storageClass: StorageMigrationClassSchema,
|
|
7859
|
+
fromLocationId: string(),
|
|
7860
|
+
toLocationId: string(),
|
|
7861
|
+
moverJobId: string().nullable(),
|
|
7862
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7863
|
+
error: string().nullable()
|
|
7864
|
+
});
|
|
7865
|
+
var StorageMigrationJobSchema = object({
|
|
7866
|
+
jobId: string(),
|
|
7867
|
+
phase: StorageMigrationPhaseSchema,
|
|
7868
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7869
|
+
throttleMbps: number(),
|
|
7870
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7871
|
+
pauseLeaseId: string().nullable(),
|
|
7872
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7873
|
+
repointed: boolean(),
|
|
7874
|
+
cancelRequested: boolean(),
|
|
7875
|
+
startedAt: number(),
|
|
7876
|
+
updatedAt: number(),
|
|
7877
|
+
finishedAt: number().nullable(),
|
|
7878
|
+
error: string().nullable()
|
|
7879
|
+
});
|
|
7880
|
+
var StorageMigrationPlanSchema = object({
|
|
7881
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7882
|
+
moves: array(object({
|
|
7883
|
+
storageClass: StorageMigrationClassSchema,
|
|
7884
|
+
fromLocationId: string(),
|
|
7885
|
+
toLocationId: string()
|
|
7886
|
+
}))
|
|
7767
7887
|
});
|
|
7768
7888
|
/**
|
|
7769
7889
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7815,6 +7935,21 @@ var StorageLocationSchema = object({
|
|
|
7815
7935
|
nodeId: string().optional(),
|
|
7816
7936
|
isDefault: boolean().default(false),
|
|
7817
7937
|
isSystem: boolean().default(false),
|
|
7938
|
+
/**
|
|
7939
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7940
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7941
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7942
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7943
|
+
* extended to add the next consumer.
|
|
7944
|
+
*
|
|
7945
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7946
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7947
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7948
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7949
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7950
|
+
* always stamped `true`.
|
|
7951
|
+
*/
|
|
7952
|
+
enabled: boolean().optional(),
|
|
7818
7953
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7819
7954
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7820
7955
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12244,7 +12379,8 @@ method(object({
|
|
|
12244
12379
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12245
12380
|
/**
|
|
12246
12381
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12247
|
-
* filesystem
|
|
12382
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12383
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12248
12384
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12249
12385
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12250
12386
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14057,6 +14193,13 @@ var MaskGridDimsSchema = object({
|
|
|
14057
14193
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14058
14194
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14059
14195
|
* one trigger.
|
|
14196
|
+
*
|
|
14197
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14198
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14199
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14200
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14201
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14202
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14060
14203
|
*/
|
|
14061
14204
|
var NcDeliverySchema = _enum([
|
|
14062
14205
|
"immediate",
|
|
@@ -14071,15 +14214,32 @@ var NcDeliverySchema = _enum([
|
|
|
14071
14214
|
* depend on a provider's raw event name or payload shape.
|
|
14072
14215
|
*/
|
|
14073
14216
|
var NcSystemEventKindSchema = _enum([
|
|
14074
|
-
"
|
|
14075
|
-
"
|
|
14217
|
+
"device-online",
|
|
14218
|
+
"device-offline",
|
|
14219
|
+
"device-disabled",
|
|
14220
|
+
"device-enabled",
|
|
14076
14221
|
"stream-online",
|
|
14077
14222
|
"stream-offline",
|
|
14078
14223
|
"node-online",
|
|
14079
14224
|
"node-offline",
|
|
14080
14225
|
"addon-update-available",
|
|
14081
|
-
"server-update-available"
|
|
14226
|
+
"server-update-available",
|
|
14227
|
+
"alarm-triggered",
|
|
14228
|
+
"alarm-armed",
|
|
14229
|
+
"alarm-disarmed",
|
|
14230
|
+
"camera-online",
|
|
14231
|
+
"camera-offline",
|
|
14232
|
+
"camera-disabled",
|
|
14233
|
+
"camera-enabled"
|
|
14234
|
+
]);
|
|
14235
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14236
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14237
|
+
"camera-online",
|
|
14238
|
+
"camera-offline",
|
|
14239
|
+
"camera-disabled",
|
|
14240
|
+
"camera-enabled"
|
|
14082
14241
|
]);
|
|
14242
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14083
14243
|
/**
|
|
14084
14244
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14085
14245
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14088,6 +14248,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14088
14248
|
var NcSystemEventConditionSchema = object({
|
|
14089
14249
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14090
14250
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14251
|
+
/**
|
|
14252
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14253
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14254
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14255
|
+
*
|
|
14256
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14257
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14258
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14259
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14260
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14261
|
+
*/
|
|
14262
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14091
14263
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14092
14264
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14093
14265
|
});
|
|
@@ -14138,6 +14310,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14138
14310
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14139
14311
|
});
|
|
14140
14312
|
/**
|
|
14313
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14314
|
+
*
|
|
14315
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14316
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14317
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14318
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14319
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14320
|
+
*
|
|
14321
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14322
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14323
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14324
|
+
*
|
|
14325
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14326
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14327
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14328
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14329
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14330
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14331
|
+
* ZodEffects the cap path would have to special-case).
|
|
14332
|
+
*
|
|
14333
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14334
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14335
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14336
|
+
* `samplingSeconds` decorative.
|
|
14337
|
+
*
|
|
14338
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14339
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14340
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14341
|
+
* an operator who typed `dog` mean the same thing.
|
|
14342
|
+
*/
|
|
14343
|
+
var NcAudioConditionSchema = object({
|
|
14344
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14345
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14346
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14347
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14348
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14349
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14350
|
+
/** Length of the sampling window in seconds. */
|
|
14351
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14352
|
+
});
|
|
14353
|
+
/**
|
|
14141
14354
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14142
14355
|
*
|
|
14143
14356
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14410,7 +14623,33 @@ var NcConditionsSchema = object({
|
|
|
14410
14623
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14411
14624
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14412
14625
|
*/
|
|
14413
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14626
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14627
|
+
/**
|
|
14628
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14629
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14630
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14631
|
+
* a window that is not full yet, neither filter given). See
|
|
14632
|
+
* {@link NcAudioCondition}.
|
|
14633
|
+
*
|
|
14634
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14635
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14636
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14637
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14638
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14639
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14640
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14641
|
+
*
|
|
14642
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14643
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14644
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14645
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14646
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14647
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14648
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14649
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14650
|
+
* does an audio rule become authorable.
|
|
14651
|
+
*/
|
|
14652
|
+
audio: NcAudioConditionSchema.optional()
|
|
14414
14653
|
});
|
|
14415
14654
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14416
14655
|
var NcRuleTargetSchema = object({
|
|
@@ -14524,6 +14763,73 @@ var NcThrottleSchema = object({
|
|
|
14524
14763
|
*/
|
|
14525
14764
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14526
14765
|
});
|
|
14766
|
+
/**
|
|
14767
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14768
|
+
* it judges may be.
|
|
14769
|
+
*
|
|
14770
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14771
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14772
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14773
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14774
|
+
* tokens for pixels the model pools away.
|
|
14775
|
+
*/
|
|
14776
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14777
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14778
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14779
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14780
|
+
var NcConfirmExpectSchema = object({
|
|
14781
|
+
op: _enum([
|
|
14782
|
+
">=",
|
|
14783
|
+
">",
|
|
14784
|
+
"<=",
|
|
14785
|
+
"<",
|
|
14786
|
+
"=="
|
|
14787
|
+
]),
|
|
14788
|
+
count: number().int().min(0).max(1e3)
|
|
14789
|
+
});
|
|
14790
|
+
/**
|
|
14791
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14792
|
+
* to ship and says whether it agrees with the rule.
|
|
14793
|
+
*
|
|
14794
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14795
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14796
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14797
|
+
*
|
|
14798
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14799
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14800
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14801
|
+
* open looks in the log exactly like a gate that works.
|
|
14802
|
+
*
|
|
14803
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14804
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14805
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14806
|
+
* above rather than trusting a parse it may never have seen.
|
|
14807
|
+
*/
|
|
14808
|
+
var NcConfirmSchema = object({
|
|
14809
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14810
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14811
|
+
enabled: boolean().default(false),
|
|
14812
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14813
|
+
profileId: string().optional(),
|
|
14814
|
+
/**
|
|
14815
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14816
|
+
* from the rule (its class and its expectation).
|
|
14817
|
+
*
|
|
14818
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14819
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14820
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14821
|
+
* turn and only rule-authored words land here.
|
|
14822
|
+
*/
|
|
14823
|
+
prompt: string().max(1e3).optional(),
|
|
14824
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14825
|
+
* own boolean verdict decides. */
|
|
14826
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14827
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14828
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14829
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14830
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14831
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14832
|
+
});
|
|
14527
14833
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14528
14834
|
var NcRuleInputSchema = object({
|
|
14529
14835
|
name: string().min(1).max(200),
|
|
@@ -14584,7 +14890,13 @@ var NcRuleInputSchema = object({
|
|
|
14584
14890
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14585
14891
|
* shape as every other actuation.
|
|
14586
14892
|
*/
|
|
14587
|
-
actions: NcRuleActionsSchema.optional()
|
|
14893
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14894
|
+
/**
|
|
14895
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14896
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14897
|
+
* did, and absent is the only way to say that without a migration.
|
|
14898
|
+
*/
|
|
14899
|
+
confirm: NcConfirmSchema.optional()
|
|
14588
14900
|
});
|
|
14589
14901
|
/**
|
|
14590
14902
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14595,7 +14907,37 @@ var NcRuleInputSchema = object({
|
|
|
14595
14907
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14596
14908
|
* `updateRule` patch.
|
|
14597
14909
|
*/
|
|
14598
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14910
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14911
|
+
disabledTargetIds: array(string()).optional(),
|
|
14912
|
+
/**
|
|
14913
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14914
|
+
*
|
|
14915
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14916
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14917
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14918
|
+
* one — which made every partial edit destructive:
|
|
14919
|
+
*
|
|
14920
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14921
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14922
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14923
|
+
*
|
|
14924
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14925
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14926
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14927
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14928
|
+
* within a minute of a two-field patch.
|
|
14929
|
+
*
|
|
14930
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14931
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14932
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14933
|
+
* absent key is now genuinely absent.
|
|
14934
|
+
*/
|
|
14935
|
+
enabled: boolean().optional(),
|
|
14936
|
+
conditions: NcConditionsSchema.optional(),
|
|
14937
|
+
media: NcMediaPolicySchema.optional(),
|
|
14938
|
+
throttle: NcThrottleSchema.optional(),
|
|
14939
|
+
priority: number().int().min(1).max(5).optional()
|
|
14940
|
+
});
|
|
14599
14941
|
/** A persisted rule. */
|
|
14600
14942
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14601
14943
|
id: string(),
|
|
@@ -14896,6 +15238,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14896
15238
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14897
15239
|
* copy would lie the first time a rule is disabled.
|
|
14898
15240
|
*/
|
|
15241
|
+
/**
|
|
15242
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15243
|
+
*
|
|
15244
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15245
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15246
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15247
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15248
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15249
|
+
* with the switches the operator actually used.
|
|
15250
|
+
*/
|
|
15251
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15252
|
+
"muted",
|
|
15253
|
+
"detection-off",
|
|
15254
|
+
"offline"
|
|
15255
|
+
]);
|
|
15256
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15257
|
+
deviceId: number().int(),
|
|
15258
|
+
reason: NcAlarmSkipReasonSchema
|
|
15259
|
+
});
|
|
14899
15260
|
var NcAlarmModeCoverageSchema = object({
|
|
14900
15261
|
mode: AlarmArmModeSchema,
|
|
14901
15262
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14903,7 +15264,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14903
15264
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14904
15265
|
allDevices: boolean(),
|
|
14905
15266
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14906
|
-
deviceIds: array(number().int())
|
|
15267
|
+
deviceIds: array(number().int()),
|
|
15268
|
+
/**
|
|
15269
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15270
|
+
* excludes it.
|
|
15271
|
+
*
|
|
15272
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15273
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15274
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15275
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15276
|
+
* alarm tab.
|
|
15277
|
+
*/
|
|
15278
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14907
15279
|
});
|
|
14908
15280
|
var NcAlarmConfigSchema = object({
|
|
14909
15281
|
/**
|
|
@@ -16272,13 +16644,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16272
16644
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16273
16645
|
kind: "mutation",
|
|
16274
16646
|
auth: "admin"
|
|
16275
|
-
}), method(
|
|
16647
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16276
16648
|
kind: "mutation",
|
|
16277
16649
|
auth: "admin"
|
|
16278
|
-
}), method(object({
|
|
16279
|
-
kind: "
|
|
16650
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16651
|
+
kind: "mutation",
|
|
16280
16652
|
auth: "admin"
|
|
16281
|
-
}), method(
|
|
16653
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16654
|
+
kind: "mutation",
|
|
16655
|
+
auth: "admin"
|
|
16656
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16657
|
+
kind: "mutation",
|
|
16658
|
+
auth: "admin"
|
|
16659
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16282
16660
|
kind: "mutation",
|
|
16283
16661
|
auth: "admin"
|
|
16284
16662
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17702,9 +18080,16 @@ var CameraStatusSchema = object({
|
|
|
17702
18080
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17703
18081
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17704
18082
|
/**
|
|
17705
|
-
* Per-camera
|
|
18083
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17706
18084
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17707
18085
|
*
|
|
18086
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18087
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18088
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18089
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18090
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18091
|
+
* the difference between a camera being off and a camera being dead.
|
|
18092
|
+
*
|
|
17708
18093
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17709
18094
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17710
18095
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17775,7 +18160,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17775
18160
|
reachable: boolean(),
|
|
17776
18161
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17777
18162
|
});
|
|
17778
|
-
method(object({
|
|
18163
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18164
|
+
kind: "mutation",
|
|
18165
|
+
auth: "admin"
|
|
18166
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18167
|
+
kind: "mutation",
|
|
18168
|
+
auth: "admin"
|
|
18169
|
+
}), method(object({
|
|
17779
18170
|
deviceId: number(),
|
|
17780
18171
|
agentNodeId: string()
|
|
17781
18172
|
}), object({ success: literal(true) }), {
|
|
@@ -18449,6 +18840,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18449
18840
|
locationId: string(),
|
|
18450
18841
|
targetBytes: number().int().positive()
|
|
18451
18842
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18843
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18844
|
+
kind: "mutation",
|
|
18845
|
+
auth: "admin"
|
|
18846
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18847
|
+
kind: "mutation",
|
|
18848
|
+
auth: "admin"
|
|
18849
|
+
});
|
|
18452
18850
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18453
18851
|
providerId: string().min(1),
|
|
18454
18852
|
displayName: string().min(1),
|
|
@@ -18552,6 +18950,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18552
18950
|
label: string(),
|
|
18553
18951
|
description: string().optional()
|
|
18554
18952
|
});
|
|
18953
|
+
/**
|
|
18954
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18955
|
+
* an instance declares a camera.
|
|
18956
|
+
*/
|
|
18957
|
+
var TerminalInstanceInfoSchema = object({
|
|
18958
|
+
instanceId: string(),
|
|
18959
|
+
cameraStableId: string(),
|
|
18960
|
+
nodeId: string(),
|
|
18961
|
+
profileId: string(),
|
|
18962
|
+
profileLabel: string(),
|
|
18963
|
+
name: string(),
|
|
18964
|
+
enabled: boolean()
|
|
18965
|
+
});
|
|
18966
|
+
var TerminalLegacyCameraSchema = object({
|
|
18967
|
+
stableId: string(),
|
|
18968
|
+
nodeId: string(),
|
|
18969
|
+
profileId: string(),
|
|
18970
|
+
profileLabel: string(),
|
|
18971
|
+
name: string(),
|
|
18972
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18973
|
+
adoptable: boolean()
|
|
18974
|
+
});
|
|
18555
18975
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18556
18976
|
seq: number().int().positive(),
|
|
18557
18977
|
kind: literal("data"),
|
|
@@ -18568,7 +18988,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18568
18988
|
snapshot: string().optional(),
|
|
18569
18989
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18570
18990
|
});
|
|
18571
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18991
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18992
|
+
targetNodeId: string().min(1),
|
|
18993
|
+
profileId: string().min(1),
|
|
18994
|
+
name: string().trim().min(1).max(160).optional()
|
|
18995
|
+
}), TerminalInstanceInfoSchema, {
|
|
18996
|
+
kind: "mutation",
|
|
18997
|
+
auth: "admin"
|
|
18998
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18999
|
+
kind: "mutation",
|
|
19000
|
+
auth: "admin"
|
|
19001
|
+
}), method(object({
|
|
19002
|
+
instanceId: string().min(1),
|
|
19003
|
+
enabled: boolean()
|
|
19004
|
+
}), TerminalInstanceInfoSchema, {
|
|
19005
|
+
kind: "mutation",
|
|
19006
|
+
auth: "admin"
|
|
19007
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19008
|
+
stableId: string().min(1),
|
|
19009
|
+
name: string().trim().min(1).max(160).optional()
|
|
19010
|
+
}), TerminalInstanceInfoSchema, {
|
|
19011
|
+
kind: "mutation",
|
|
19012
|
+
auth: "admin"
|
|
19013
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18572
19014
|
profileId: string(),
|
|
18573
19015
|
cols: number().int().positive(),
|
|
18574
19016
|
rows: number().int().positive()
|
|
@@ -18585,7 +19027,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18585
19027
|
}), method(object({
|
|
18586
19028
|
sessionId: string(),
|
|
18587
19029
|
afterSeq: number().int().nonnegative(),
|
|
18588
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19030
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19031
|
+
/**
|
|
19032
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19033
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19034
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19035
|
+
*/
|
|
19036
|
+
waitForOutput: boolean().optional()
|
|
18589
19037
|
}), TerminalOutputBatchSchema, {
|
|
18590
19038
|
kind: "mutation",
|
|
18591
19039
|
auth: "admin",
|
|
@@ -20526,6 +20974,7 @@ var FaceInfoSchema = object({
|
|
|
20526
20974
|
var FaceFilterEnum = _enum([
|
|
20527
20975
|
"unassigned",
|
|
20528
20976
|
"recognized",
|
|
20977
|
+
"identified",
|
|
20529
20978
|
"all"
|
|
20530
20979
|
]);
|
|
20531
20980
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20554,6 +21003,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20554
21003
|
kind: "mutation",
|
|
20555
21004
|
auth: "admin"
|
|
20556
21005
|
}), method(object({
|
|
21006
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21007
|
+
deviceId: number().int().optional(),
|
|
20557
21008
|
limit: number().int().positive().optional(),
|
|
20558
21009
|
filter: FaceFilterEnum.optional(),
|
|
20559
21010
|
/**
|
|
@@ -22319,6 +22770,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22319
22770
|
capName: string().min(1).max(64),
|
|
22320
22771
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22321
22772
|
valuePath: string().min(1).max(64)
|
|
22773
|
+
}),
|
|
22774
|
+
object({
|
|
22775
|
+
kind: literal("latest-recognition"),
|
|
22776
|
+
recognition: _enum(["person", "plate"])
|
|
22322
22777
|
})
|
|
22323
22778
|
]);
|
|
22324
22779
|
var OsdSlotBindingSchema = object({
|
|
@@ -22424,6 +22879,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22424
22879
|
}), object({ success: literal(true) }), {
|
|
22425
22880
|
kind: "mutation",
|
|
22426
22881
|
auth: "admin"
|
|
22882
|
+
}), method(object({
|
|
22883
|
+
sourceDeviceId: number().int(),
|
|
22884
|
+
targetDeviceId: number().int()
|
|
22885
|
+
}), object({
|
|
22886
|
+
copied: number().int().nonnegative(),
|
|
22887
|
+
skipped: number().int().nonnegative()
|
|
22888
|
+
}), {
|
|
22889
|
+
kind: "mutation",
|
|
22890
|
+
auth: "admin"
|
|
22427
22891
|
}), method(object({
|
|
22428
22892
|
deviceId: number().int(),
|
|
22429
22893
|
slotId: string().min(1),
|
|
@@ -23134,7 +23598,19 @@ var RecordingManifestSchema = object({
|
|
|
23134
23598
|
* profiles/subtrees/locations on this node). */
|
|
23135
23599
|
var RecordingDeviceUsageSchema = object({
|
|
23136
23600
|
deviceId: number(),
|
|
23137
|
-
usedBytes: number()
|
|
23601
|
+
usedBytes: number(),
|
|
23602
|
+
/**
|
|
23603
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23604
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23605
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23606
|
+
*
|
|
23607
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23608
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23609
|
+
* field must keep validating that older provider's payload: the framework
|
|
23610
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23611
|
+
* the later of the two.
|
|
23612
|
+
*/
|
|
23613
|
+
oldestMs: number().nullable().optional()
|
|
23138
23614
|
});
|
|
23139
23615
|
/** Recording storage usage + capacity for one storage location. */
|
|
23140
23616
|
var RecordingLocationUsageSchema = object({
|
|
@@ -23162,6 +23638,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
23162
23638
|
locations: array(RecordingLocationUsageSchema)
|
|
23163
23639
|
});
|
|
23164
23640
|
/**
|
|
23641
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23642
|
+
*
|
|
23643
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23644
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23645
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23646
|
+
* location, run FIFO behind the single-flight mover.
|
|
23647
|
+
*
|
|
23648
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23649
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23650
|
+
* (empty on the plan).
|
|
23651
|
+
*/
|
|
23652
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23653
|
+
deviceId: number(),
|
|
23654
|
+
profile: string(),
|
|
23655
|
+
fromLocationId: string(),
|
|
23656
|
+
toLocationId: string(),
|
|
23657
|
+
bytes: number(),
|
|
23658
|
+
files: number().int()
|
|
23659
|
+
});
|
|
23660
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23661
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23662
|
+
* that had nothing to do. */
|
|
23663
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23664
|
+
"unassigned",
|
|
23665
|
+
"target-not-writable",
|
|
23666
|
+
"below-threshold",
|
|
23667
|
+
"no-headroom"
|
|
23668
|
+
]);
|
|
23669
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23670
|
+
deviceId: number(),
|
|
23671
|
+
profile: string(),
|
|
23672
|
+
fromLocationId: string(),
|
|
23673
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23674
|
+
toLocationId: string().nullable(),
|
|
23675
|
+
bytes: number(),
|
|
23676
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23677
|
+
});
|
|
23678
|
+
var RecordingRebalancePlanSchema = object({
|
|
23679
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23680
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23681
|
+
bytesToMove: number(),
|
|
23682
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23683
|
+
jobIds: array(string())
|
|
23684
|
+
});
|
|
23685
|
+
var RecordingRebalanceInputSchema = object({
|
|
23686
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23687
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23688
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23689
|
+
minMoveGb: number().min(0).optional()
|
|
23690
|
+
});
|
|
23691
|
+
/**
|
|
23165
23692
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
23166
23693
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
23167
23694
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23309,6 +23836,21 @@ method(object({
|
|
|
23309
23836
|
}), {
|
|
23310
23837
|
kind: "mutation",
|
|
23311
23838
|
auth: "admin"
|
|
23839
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23840
|
+
kind: "mutation",
|
|
23841
|
+
auth: "admin"
|
|
23842
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23843
|
+
kind: "mutation",
|
|
23844
|
+
auth: "admin"
|
|
23845
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23846
|
+
kind: "mutation",
|
|
23847
|
+
auth: "admin"
|
|
23848
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23849
|
+
kind: "mutation",
|
|
23850
|
+
auth: "admin"
|
|
23851
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23852
|
+
kind: "mutation",
|
|
23853
|
+
auth: "admin"
|
|
23312
23854
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23313
23855
|
kind: "mutation",
|
|
23314
23856
|
auth: "admin"
|
|
@@ -23318,9 +23860,15 @@ method(object({
|
|
|
23318
23860
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23319
23861
|
kind: "mutation",
|
|
23320
23862
|
auth: "admin"
|
|
23863
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23864
|
+
kind: "query",
|
|
23865
|
+
auth: "admin"
|
|
23866
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23867
|
+
kind: "mutation",
|
|
23868
|
+
auth: "admin"
|
|
23321
23869
|
});
|
|
23322
23870
|
/**
|
|
23323
|
-
* `
|
|
23871
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23324
23872
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23325
23873
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23326
23874
|
* delete-after-download.
|
|
@@ -23335,10 +23883,42 @@ method(object({
|
|
|
23335
23883
|
*/
|
|
23336
23884
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23337
23885
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23886
|
+
/**
|
|
23887
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23888
|
+
*
|
|
23889
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23890
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23891
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23892
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23893
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23894
|
+
*/
|
|
23895
|
+
var ExportDenseRangeSchema = object({
|
|
23896
|
+
fromSec: number().nonnegative(),
|
|
23897
|
+
toSec: number().nonnegative()
|
|
23898
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23899
|
+
/**
|
|
23900
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23901
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23902
|
+
*
|
|
23903
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23904
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23905
|
+
*/
|
|
23906
|
+
var ExportDenseSchema = object({
|
|
23907
|
+
everyMs: number().int().positive(),
|
|
23908
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23909
|
+
});
|
|
23338
23910
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23339
23911
|
var ExportTimelapseSchema = object({
|
|
23340
23912
|
everyMs: number().int().positive(),
|
|
23341
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23913
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23914
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23915
|
+
dense: ExportDenseSchema.optional()
|
|
23916
|
+
}).superRefine((v, ctx) => {
|
|
23917
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23918
|
+
code: ZodIssueCode.custom,
|
|
23919
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23920
|
+
path: ["dense", "everyMs"]
|
|
23921
|
+
});
|
|
23342
23922
|
});
|
|
23343
23923
|
/**
|
|
23344
23924
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23396,6 +23976,19 @@ var ExportDownloadSchema = object({
|
|
|
23396
23976
|
url: string(),
|
|
23397
23977
|
endpoints: array(string())
|
|
23398
23978
|
});
|
|
23979
|
+
/**
|
|
23980
|
+
* A finished export's bytes, inline.
|
|
23981
|
+
*
|
|
23982
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23983
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23984
|
+
*/
|
|
23985
|
+
var ExportBytesSchema = object({
|
|
23986
|
+
base64: string(),
|
|
23987
|
+
contentType: string(),
|
|
23988
|
+
/** Suggested filename, extension included. */
|
|
23989
|
+
name: string(),
|
|
23990
|
+
bytes: number().int().nonnegative()
|
|
23991
|
+
});
|
|
23399
23992
|
method(object({
|
|
23400
23993
|
deviceId: number(),
|
|
23401
23994
|
profile: string(),
|
|
@@ -23420,6 +24013,9 @@ method(object({
|
|
|
23420
24013
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23421
24014
|
kind: "query",
|
|
23422
24015
|
auth: "protected"
|
|
24016
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
24017
|
+
kind: "query",
|
|
24018
|
+
auth: "protected"
|
|
23423
24019
|
});
|
|
23424
24020
|
/**
|
|
23425
24021
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27437,6 +28033,12 @@ Object.freeze({
|
|
|
27437
28033
|
addonId: null,
|
|
27438
28034
|
access: "delete"
|
|
27439
28035
|
},
|
|
28036
|
+
"osdManager.copyDeviceConfiguration": {
|
|
28037
|
+
capName: "osd-manager",
|
|
28038
|
+
capScope: "system",
|
|
28039
|
+
addonId: null,
|
|
28040
|
+
access: "create"
|
|
28041
|
+
},
|
|
27440
28042
|
"osdManager.getConditionSupport": {
|
|
27441
28043
|
capName: "osd-manager",
|
|
27442
28044
|
capScope: "system",
|
|
@@ -27533,7 +28135,7 @@ Object.freeze({
|
|
|
27533
28135
|
addonId: null,
|
|
27534
28136
|
access: "create"
|
|
27535
28137
|
},
|
|
27536
|
-
"pipelineAnalytics.
|
|
28138
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27537
28139
|
capName: "pipeline-analytics",
|
|
27538
28140
|
capScope: "device",
|
|
27539
28141
|
addonId: null,
|
|
@@ -27605,12 +28207,6 @@ Object.freeze({
|
|
|
27605
28207
|
addonId: null,
|
|
27606
28208
|
access: "view"
|
|
27607
28209
|
},
|
|
27608
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27609
|
-
capName: "pipeline-analytics",
|
|
27610
|
-
capScope: "device",
|
|
27611
|
-
addonId: null,
|
|
27612
|
-
access: "view"
|
|
27613
|
-
},
|
|
27614
28210
|
"pipelineAnalytics.getMotionEvents": {
|
|
27615
28211
|
capName: "pipeline-analytics",
|
|
27616
28212
|
capScope: "device",
|
|
@@ -27647,6 +28243,12 @@ Object.freeze({
|
|
|
27647
28243
|
addonId: null,
|
|
27648
28244
|
access: "view"
|
|
27649
28245
|
},
|
|
28246
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
28247
|
+
capName: "pipeline-analytics",
|
|
28248
|
+
capScope: "device",
|
|
28249
|
+
addonId: null,
|
|
28250
|
+
access: "view"
|
|
28251
|
+
},
|
|
27650
28252
|
"pipelineAnalytics.getTrack": {
|
|
27651
28253
|
capName: "pipeline-analytics",
|
|
27652
28254
|
capScope: "device",
|
|
@@ -27725,6 +28327,12 @@ Object.freeze({
|
|
|
27725
28327
|
addonId: null,
|
|
27726
28328
|
access: "view"
|
|
27727
28329
|
},
|
|
28330
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28331
|
+
capName: "pipeline-analytics",
|
|
28332
|
+
capScope: "device",
|
|
28333
|
+
addonId: null,
|
|
28334
|
+
access: "create"
|
|
28335
|
+
},
|
|
27728
28336
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27729
28337
|
capName: "pipeline-analytics",
|
|
27730
28338
|
capScope: "device",
|
|
@@ -27755,7 +28363,7 @@ Object.freeze({
|
|
|
27755
28363
|
addonId: null,
|
|
27756
28364
|
access: "create"
|
|
27757
28365
|
},
|
|
27758
|
-
"pipelineAnalytics.
|
|
28366
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27759
28367
|
capName: "pipeline-analytics",
|
|
27760
28368
|
capScope: "device",
|
|
27761
28369
|
addonId: null,
|
|
@@ -27767,6 +28375,12 @@ Object.freeze({
|
|
|
27767
28375
|
addonId: null,
|
|
27768
28376
|
access: "create"
|
|
27769
28377
|
},
|
|
28378
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28379
|
+
capName: "pipeline-analytics",
|
|
28380
|
+
capScope: "device",
|
|
28381
|
+
addonId: null,
|
|
28382
|
+
access: "create"
|
|
28383
|
+
},
|
|
27770
28384
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27771
28385
|
capName: "pipeline-analytics",
|
|
27772
28386
|
capScope: "device",
|
|
@@ -27791,6 +28405,12 @@ Object.freeze({
|
|
|
27791
28405
|
addonId: null,
|
|
27792
28406
|
access: "create"
|
|
27793
28407
|
},
|
|
28408
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28409
|
+
capName: "pipeline-analytics",
|
|
28410
|
+
capScope: "device",
|
|
28411
|
+
addonId: null,
|
|
28412
|
+
access: "create"
|
|
28413
|
+
},
|
|
27794
28414
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27795
28415
|
capName: "pipeline-analytics",
|
|
27796
28416
|
capScope: "device",
|
|
@@ -28157,6 +28777,12 @@ Object.freeze({
|
|
|
28157
28777
|
addonId: null,
|
|
28158
28778
|
access: "view"
|
|
28159
28779
|
},
|
|
28780
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28781
|
+
capName: "pipeline-orchestrator",
|
|
28782
|
+
capScope: "system",
|
|
28783
|
+
addonId: null,
|
|
28784
|
+
access: "create"
|
|
28785
|
+
},
|
|
28160
28786
|
"pipelineOrchestrator.rebalance": {
|
|
28161
28787
|
capName: "pipeline-orchestrator",
|
|
28162
28788
|
capScope: "system",
|
|
@@ -28181,6 +28807,12 @@ Object.freeze({
|
|
|
28181
28807
|
addonId: null,
|
|
28182
28808
|
access: "view"
|
|
28183
28809
|
},
|
|
28810
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28811
|
+
capName: "pipeline-orchestrator",
|
|
28812
|
+
capScope: "system",
|
|
28813
|
+
addonId: null,
|
|
28814
|
+
access: "create"
|
|
28815
|
+
},
|
|
28184
28816
|
"pipelineOrchestrator.saveTemplate": {
|
|
28185
28817
|
capName: "pipeline-orchestrator",
|
|
28186
28818
|
capScope: "system",
|
|
@@ -28577,7 +29209,13 @@ Object.freeze({
|
|
|
28577
29209
|
addonId: null,
|
|
28578
29210
|
access: "create"
|
|
28579
29211
|
},
|
|
28580
|
-
"recording.
|
|
29212
|
+
"recording.cancelRelocateJob": {
|
|
29213
|
+
capName: "recording",
|
|
29214
|
+
capScope: "system",
|
|
29215
|
+
addonId: null,
|
|
29216
|
+
access: "create"
|
|
29217
|
+
},
|
|
29218
|
+
"recording.cancelStorageMigrationMove": {
|
|
28581
29219
|
capName: "recording",
|
|
28582
29220
|
capScope: "system",
|
|
28583
29221
|
addonId: null,
|
|
@@ -28613,7 +29251,7 @@ Object.freeze({
|
|
|
28613
29251
|
addonId: null,
|
|
28614
29252
|
access: "view"
|
|
28615
29253
|
},
|
|
28616
|
-
"recording.
|
|
29254
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28617
29255
|
capName: "recording",
|
|
28618
29256
|
capScope: "system",
|
|
28619
29257
|
addonId: null,
|
|
@@ -28631,12 +29269,30 @@ Object.freeze({
|
|
|
28631
29269
|
addonId: null,
|
|
28632
29270
|
access: "view"
|
|
28633
29271
|
},
|
|
29272
|
+
"recording.listRelocateJobs": {
|
|
29273
|
+
capName: "recording",
|
|
29274
|
+
capScope: "system",
|
|
29275
|
+
addonId: null,
|
|
29276
|
+
access: "view"
|
|
29277
|
+
},
|
|
28634
29278
|
"recording.locateSegment": {
|
|
28635
29279
|
capName: "recording",
|
|
28636
29280
|
capScope: "system",
|
|
28637
29281
|
addonId: null,
|
|
28638
29282
|
access: "view"
|
|
28639
29283
|
},
|
|
29284
|
+
"recording.pauseForStorageMigration": {
|
|
29285
|
+
capName: "recording",
|
|
29286
|
+
capScope: "system",
|
|
29287
|
+
addonId: null,
|
|
29288
|
+
access: "create"
|
|
29289
|
+
},
|
|
29290
|
+
"recording.planStorageRebalance": {
|
|
29291
|
+
capName: "recording",
|
|
29292
|
+
capScope: "system",
|
|
29293
|
+
addonId: null,
|
|
29294
|
+
access: "view"
|
|
29295
|
+
},
|
|
28640
29296
|
"recording.pruneFootage": {
|
|
28641
29297
|
capName: "recording",
|
|
28642
29298
|
capScope: "system",
|
|
@@ -28655,6 +29311,12 @@ Object.freeze({
|
|
|
28655
29311
|
addonId: null,
|
|
28656
29312
|
access: "view"
|
|
28657
29313
|
},
|
|
29314
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29315
|
+
capName: "recording",
|
|
29316
|
+
capScope: "system",
|
|
29317
|
+
addonId: null,
|
|
29318
|
+
access: "create"
|
|
29319
|
+
},
|
|
28658
29320
|
"recording.relocateFootage": {
|
|
28659
29321
|
capName: "recording",
|
|
28660
29322
|
capScope: "system",
|
|
@@ -28679,44 +29341,68 @@ Object.freeze({
|
|
|
28679
29341
|
addonId: null,
|
|
28680
29342
|
access: "create"
|
|
28681
29343
|
},
|
|
29344
|
+
"recording.resumeForStorageMigration": {
|
|
29345
|
+
capName: "recording",
|
|
29346
|
+
capScope: "system",
|
|
29347
|
+
addonId: null,
|
|
29348
|
+
access: "create"
|
|
29349
|
+
},
|
|
28682
29350
|
"recording.setDeviceConfig": {
|
|
28683
29351
|
capName: "recording",
|
|
28684
29352
|
capScope: "system",
|
|
28685
29353
|
addonId: null,
|
|
28686
29354
|
access: "create"
|
|
28687
29355
|
},
|
|
29356
|
+
"recording.startStorageMigrationMove": {
|
|
29357
|
+
capName: "recording",
|
|
29358
|
+
capScope: "system",
|
|
29359
|
+
addonId: null,
|
|
29360
|
+
access: "create"
|
|
29361
|
+
},
|
|
29362
|
+
"recording.startStorageRebalance": {
|
|
29363
|
+
capName: "recording",
|
|
29364
|
+
capScope: "system",
|
|
29365
|
+
addonId: null,
|
|
29366
|
+
access: "create"
|
|
29367
|
+
},
|
|
28688
29368
|
"recordingExport.cancelExport": {
|
|
28689
|
-
capName: "
|
|
29369
|
+
capName: "recording-export",
|
|
28690
29370
|
capScope: "system",
|
|
28691
29371
|
addonId: null,
|
|
28692
29372
|
access: "create"
|
|
28693
29373
|
},
|
|
28694
29374
|
"recordingExport.createExport": {
|
|
28695
|
-
capName: "
|
|
29375
|
+
capName: "recording-export",
|
|
28696
29376
|
capScope: "system",
|
|
28697
29377
|
addonId: null,
|
|
28698
29378
|
access: "create"
|
|
28699
29379
|
},
|
|
28700
29380
|
"recordingExport.deleteExport": {
|
|
28701
|
-
capName: "
|
|
29381
|
+
capName: "recording-export",
|
|
28702
29382
|
capScope: "system",
|
|
28703
29383
|
addonId: null,
|
|
28704
29384
|
access: "delete"
|
|
28705
29385
|
},
|
|
28706
29386
|
"recordingExport.getDownloadUrl": {
|
|
28707
|
-
capName: "
|
|
29387
|
+
capName: "recording-export",
|
|
28708
29388
|
capScope: "system",
|
|
28709
29389
|
addonId: null,
|
|
28710
29390
|
access: "view"
|
|
28711
29391
|
},
|
|
28712
29392
|
"recordingExport.getExport": {
|
|
28713
|
-
capName: "
|
|
29393
|
+
capName: "recording-export",
|
|
28714
29394
|
capScope: "system",
|
|
28715
29395
|
addonId: null,
|
|
28716
29396
|
access: "view"
|
|
28717
29397
|
},
|
|
28718
29398
|
"recordingExport.listExports": {
|
|
28719
|
-
capName: "
|
|
29399
|
+
capName: "recording-export",
|
|
29400
|
+
capScope: "system",
|
|
29401
|
+
addonId: null,
|
|
29402
|
+
access: "view"
|
|
29403
|
+
},
|
|
29404
|
+
"recordingExport.readExportBytes": {
|
|
29405
|
+
capName: "recording-export",
|
|
28720
29406
|
capScope: "system",
|
|
28721
29407
|
addonId: null,
|
|
28722
29408
|
access: "view"
|
|
@@ -29075,6 +29761,30 @@ Object.freeze({
|
|
|
29075
29761
|
addonId: null,
|
|
29076
29762
|
access: "view"
|
|
29077
29763
|
},
|
|
29764
|
+
"storageMigration.cancel": {
|
|
29765
|
+
capName: "storage-migration",
|
|
29766
|
+
capScope: "system",
|
|
29767
|
+
addonId: null,
|
|
29768
|
+
access: "create"
|
|
29769
|
+
},
|
|
29770
|
+
"storageMigration.plan": {
|
|
29771
|
+
capName: "storage-migration",
|
|
29772
|
+
capScope: "system",
|
|
29773
|
+
addonId: null,
|
|
29774
|
+
access: "view"
|
|
29775
|
+
},
|
|
29776
|
+
"storageMigration.start": {
|
|
29777
|
+
capName: "storage-migration",
|
|
29778
|
+
capScope: "system",
|
|
29779
|
+
addonId: null,
|
|
29780
|
+
access: "create"
|
|
29781
|
+
},
|
|
29782
|
+
"storageMigration.status": {
|
|
29783
|
+
capName: "storage-migration",
|
|
29784
|
+
capScope: "system",
|
|
29785
|
+
addonId: null,
|
|
29786
|
+
access: "view"
|
|
29787
|
+
},
|
|
29078
29788
|
"storageProvider.abortUpload": {
|
|
29079
29789
|
capName: "storage-provider",
|
|
29080
29790
|
capScope: "system",
|
|
@@ -29453,12 +30163,42 @@ Object.freeze({
|
|
|
29453
30163
|
addonId: null,
|
|
29454
30164
|
access: "create"
|
|
29455
30165
|
},
|
|
30166
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
30167
|
+
capName: "terminal-session",
|
|
30168
|
+
capScope: "system",
|
|
30169
|
+
addonId: null,
|
|
30170
|
+
access: "create"
|
|
30171
|
+
},
|
|
29456
30172
|
"terminalSession.close": {
|
|
29457
30173
|
capName: "terminal-session",
|
|
29458
30174
|
capScope: "system",
|
|
29459
30175
|
addonId: null,
|
|
29460
30176
|
access: "create"
|
|
29461
30177
|
},
|
|
30178
|
+
"terminalSession.createInstance": {
|
|
30179
|
+
capName: "terminal-session",
|
|
30180
|
+
capScope: "system",
|
|
30181
|
+
addonId: null,
|
|
30182
|
+
access: "create"
|
|
30183
|
+
},
|
|
30184
|
+
"terminalSession.deleteInstance": {
|
|
30185
|
+
capName: "terminal-session",
|
|
30186
|
+
capScope: "system",
|
|
30187
|
+
addonId: null,
|
|
30188
|
+
access: "delete"
|
|
30189
|
+
},
|
|
30190
|
+
"terminalSession.listInstances": {
|
|
30191
|
+
capName: "terminal-session",
|
|
30192
|
+
capScope: "system",
|
|
30193
|
+
addonId: null,
|
|
30194
|
+
access: "view"
|
|
30195
|
+
},
|
|
30196
|
+
"terminalSession.listLegacyCameras": {
|
|
30197
|
+
capName: "terminal-session",
|
|
30198
|
+
capScope: "system",
|
|
30199
|
+
addonId: null,
|
|
30200
|
+
access: "view"
|
|
30201
|
+
},
|
|
29462
30202
|
"terminalSession.listProfiles": {
|
|
29463
30203
|
capName: "terminal-session",
|
|
29464
30204
|
capScope: "system",
|
|
@@ -29489,6 +30229,12 @@ Object.freeze({
|
|
|
29489
30229
|
addonId: null,
|
|
29490
30230
|
access: "create"
|
|
29491
30231
|
},
|
|
30232
|
+
"terminalSession.setInstanceEnabled": {
|
|
30233
|
+
capName: "terminal-session",
|
|
30234
|
+
capScope: "system",
|
|
30235
|
+
addonId: null,
|
|
30236
|
+
access: "create"
|
|
30237
|
+
},
|
|
29492
30238
|
"terminalSession.writeInput": {
|
|
29493
30239
|
capName: "terminal-session",
|
|
29494
30240
|
capScope: "system",
|
|
@@ -30033,6 +30779,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
30033
30779
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
30034
30780
|
var PriorityField = number().int().min(1).max(5);
|
|
30035
30781
|
/**
|
|
30782
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30783
|
+
*
|
|
30784
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30785
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30786
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30787
|
+
*
|
|
30788
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30789
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30790
|
+
*
|
|
30791
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30792
|
+
*
|
|
30793
|
+
* 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.
|
|
30794
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30795
|
+
* and therefore the length of a quiet night, does not move.
|
|
30796
|
+
*
|
|
30797
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30798
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30799
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30800
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30801
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30802
|
+
*/
|
|
30803
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30804
|
+
/**
|
|
30805
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30806
|
+
*
|
|
30807
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30808
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30809
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30810
|
+
* that range every ~583 ms.
|
|
30811
|
+
*
|
|
30812
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30813
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30814
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30815
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30816
|
+
* schema change and are the tracked follow-up.
|
|
30817
|
+
*
|
|
30818
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30819
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30820
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30821
|
+
* happened.
|
|
30822
|
+
*/
|
|
30823
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30824
|
+
/**
|
|
30825
|
+
* Caption burned into the notification's preview frame.
|
|
30826
|
+
*
|
|
30827
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30828
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30829
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30830
|
+
*
|
|
30831
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30832
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30833
|
+
* the reason this is not `.min(1)`.
|
|
30834
|
+
*/
|
|
30835
|
+
var PreviewTextField = string().max(200);
|
|
30836
|
+
/**
|
|
30837
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30838
|
+
*
|
|
30839
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30840
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30841
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30842
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30843
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30844
|
+
* them.
|
|
30845
|
+
*
|
|
30846
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30847
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30848
|
+
* paying that on the deploy that shipped it.
|
|
30849
|
+
*
|
|
30850
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30851
|
+
*/
|
|
30852
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30853
|
+
/**
|
|
30854
|
+
* Which detection classes the notification reports counts for.
|
|
30855
|
+
*
|
|
30856
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30857
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30858
|
+
* class the window actually contained", which is what an operator who never
|
|
30859
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30860
|
+
* counts cars all night).
|
|
30861
|
+
*
|
|
30862
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30863
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30864
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30865
|
+
* not emit.
|
|
30866
|
+
*
|
|
30867
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30868
|
+
* - `{{detections}}` — total over the reported classes
|
|
30869
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30870
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30871
|
+
* one per class, `count_` + the class name
|
|
30872
|
+
*
|
|
30873
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30874
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30875
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30876
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30877
|
+
*/
|
|
30878
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30879
|
+
/**
|
|
30036
30880
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
30037
30881
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
30038
30882
|
* here (see the ownership note above).
|
|
@@ -30052,9 +30896,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
30052
30896
|
cadenceSec: CadenceSecField.default(15),
|
|
30053
30897
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
30054
30898
|
framerate: FramerateField.default(10),
|
|
30899
|
+
/**
|
|
30900
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30901
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30902
|
+
* field gets.
|
|
30903
|
+
*/
|
|
30904
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30905
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30906
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30055
30907
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
30056
30908
|
targets: TargetsField,
|
|
30057
30909
|
template: TimelapseTemplateSchema.optional(),
|
|
30910
|
+
/**
|
|
30911
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30912
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30913
|
+
*
|
|
30914
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30915
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30916
|
+
* silently clear the caption too.
|
|
30917
|
+
*/
|
|
30918
|
+
previewText: PreviewTextField.optional(),
|
|
30919
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30920
|
+
previewMode: PreviewModeField.default("image"),
|
|
30921
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30922
|
+
reportClasses: ReportClassesField.optional(),
|
|
30058
30923
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
30059
30924
|
priority: PriorityField.default(3)
|
|
30060
30925
|
});
|
|
@@ -30065,8 +30930,13 @@ object({
|
|
|
30065
30930
|
schedule: NcScheduleSchema.optional(),
|
|
30066
30931
|
cadenceSec: CadenceSecField.optional(),
|
|
30067
30932
|
framerate: FramerateField.optional(),
|
|
30933
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30934
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30068
30935
|
targets: TargetsField.optional(),
|
|
30069
30936
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30937
|
+
previewText: PreviewTextField.optional(),
|
|
30938
|
+
previewMode: PreviewModeField.optional(),
|
|
30939
|
+
reportClasses: ReportClassesField.optional(),
|
|
30070
30940
|
priority: PriorityField.optional()
|
|
30071
30941
|
});
|
|
30072
30942
|
TimelapseRuleInputSchema.extend({
|
|
@@ -30078,10 +30948,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
30078
30948
|
*/
|
|
30079
30949
|
ownerUserId: string().optional(),
|
|
30080
30950
|
/**
|
|
30081
|
-
* Epoch-ms of the
|
|
30082
|
-
*
|
|
30951
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30952
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30953
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
30083
30954
|
*/
|
|
30084
30955
|
lastGeneratedAt: number().optional(),
|
|
30956
|
+
/**
|
|
30957
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30958
|
+
* re-generation guard's real durable state.
|
|
30959
|
+
*
|
|
30960
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30961
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30962
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30963
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30964
|
+
* come back.
|
|
30965
|
+
*
|
|
30966
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30967
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30968
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30969
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30970
|
+
* once, on the deploy that shipped the map.
|
|
30971
|
+
*/
|
|
30972
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
30085
30973
|
/** userId of the caller who created the rule (server-stamped). */
|
|
30086
30974
|
createdBy: string(),
|
|
30087
30975
|
createdAt: number(),
|