@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
|
@@ -7346,8 +7346,31 @@ var AdoptionJobSchema = object({
|
|
|
7346
7346
|
error: string().nullable()
|
|
7347
7347
|
});
|
|
7348
7348
|
/**
|
|
7349
|
-
* Per-camera FUNCTION SWITCHES
|
|
7350
|
-
*
|
|
7349
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7350
|
+
*
|
|
7351
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7352
|
+
*
|
|
7353
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7354
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7355
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7356
|
+
* every function already had a settings page of its own, and a second place to
|
|
7357
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7358
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7359
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7360
|
+
* (which was always first-class; the switch was a veneer over
|
|
7361
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7362
|
+
* per-device setting, the two camera planes to their own components.
|
|
7363
|
+
*
|
|
7364
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7365
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7366
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7367
|
+
* never about a control panel.
|
|
7368
|
+
*
|
|
7369
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7370
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7371
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7372
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7373
|
+
* stop; nothing new may be built on it.
|
|
7351
7374
|
*
|
|
7352
7375
|
* ## This file adds no state
|
|
7353
7376
|
*
|
|
@@ -7692,14 +7715,21 @@ var RecordingConfigSchema = object({
|
|
|
7692
7715
|
/**
|
|
7693
7716
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7694
7717
|
*
|
|
7695
|
-
* One shape shared by the recorder
|
|
7696
|
-
*
|
|
7697
|
-
*
|
|
7698
|
-
*
|
|
7699
|
-
*
|
|
7700
|
-
|
|
7718
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7719
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7720
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7721
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7722
|
+
* addon surface.
|
|
7723
|
+
*/
|
|
7724
|
+
/**
|
|
7725
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7726
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7727
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7728
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7729
|
+
* runs at all.
|
|
7701
7730
|
*/
|
|
7702
7731
|
var RelocateJobStateSchema = _enum([
|
|
7732
|
+
"queued",
|
|
7703
7733
|
"running",
|
|
7704
7734
|
"done",
|
|
7705
7735
|
"failed",
|
|
@@ -7724,19 +7754,109 @@ var RelocateJobSchema = object({
|
|
|
7724
7754
|
finishedAt: number().nullable(),
|
|
7725
7755
|
error: string().nullable()
|
|
7726
7756
|
});
|
|
7757
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7758
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7759
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7727
7760
|
var RelocateFootageInputSchema = object({
|
|
7728
|
-
deviceId: number().optional(),
|
|
7729
7761
|
fromLocationId: string(),
|
|
7730
7762
|
toLocationId: string(),
|
|
7731
7763
|
entities: array(_enum(["segments"])).optional(),
|
|
7764
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7765
|
+
* pre-orchestration compatibility path. */
|
|
7766
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7767
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7768
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7769
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7770
|
+
deviceId: number().int().optional(),
|
|
7771
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7772
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7773
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7774
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7775
|
+
profiles: array(string()).optional(),
|
|
7732
7776
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7733
7777
|
* never allowed to starve live writers. */
|
|
7734
7778
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7735
7779
|
});
|
|
7736
|
-
|
|
7737
|
-
|
|
7780
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7781
|
+
* from persistent recording settings: a migration never changes
|
|
7782
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7783
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7784
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7785
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7738
7786
|
toLocationId: string(),
|
|
7739
7787
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7788
|
+
}).extend({ leaseId: string().min(1) });
|
|
7789
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7790
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7791
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7792
|
+
var StorageMigrationClassSchema = _enum([
|
|
7793
|
+
"recordings",
|
|
7794
|
+
"recordingsLow",
|
|
7795
|
+
"eventMedia"
|
|
7796
|
+
]);
|
|
7797
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7798
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7799
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7800
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7801
|
+
recordings: string().min(1).optional(),
|
|
7802
|
+
recordingsLow: string().min(1).optional(),
|
|
7803
|
+
eventMedia: string().min(1).optional()
|
|
7804
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7805
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7806
|
+
var StorageMigrationInputSchema = object({
|
|
7807
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7808
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7809
|
+
});
|
|
7810
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7811
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7812
|
+
* verified. */
|
|
7813
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7814
|
+
"planning",
|
|
7815
|
+
"pausing",
|
|
7816
|
+
"moving",
|
|
7817
|
+
"verifying",
|
|
7818
|
+
"repointing",
|
|
7819
|
+
"refreshing",
|
|
7820
|
+
"resuming",
|
|
7821
|
+
"done",
|
|
7822
|
+
"failed",
|
|
7823
|
+
"cancelled"
|
|
7824
|
+
]);
|
|
7825
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7826
|
+
"pipeline",
|
|
7827
|
+
"recorder",
|
|
7828
|
+
"analytics"
|
|
7829
|
+
]);
|
|
7830
|
+
var StorageMigrationMoveSchema = object({
|
|
7831
|
+
storageClass: StorageMigrationClassSchema,
|
|
7832
|
+
fromLocationId: string(),
|
|
7833
|
+
toLocationId: string(),
|
|
7834
|
+
moverJobId: string().nullable(),
|
|
7835
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7836
|
+
error: string().nullable()
|
|
7837
|
+
});
|
|
7838
|
+
var StorageMigrationJobSchema = object({
|
|
7839
|
+
jobId: string(),
|
|
7840
|
+
phase: StorageMigrationPhaseSchema,
|
|
7841
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7842
|
+
throttleMbps: number(),
|
|
7843
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7844
|
+
pauseLeaseId: string().nullable(),
|
|
7845
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7846
|
+
repointed: boolean(),
|
|
7847
|
+
cancelRequested: boolean(),
|
|
7848
|
+
startedAt: number(),
|
|
7849
|
+
updatedAt: number(),
|
|
7850
|
+
finishedAt: number().nullable(),
|
|
7851
|
+
error: string().nullable()
|
|
7852
|
+
});
|
|
7853
|
+
var StorageMigrationPlanSchema = object({
|
|
7854
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7855
|
+
moves: array(object({
|
|
7856
|
+
storageClass: StorageMigrationClassSchema,
|
|
7857
|
+
fromLocationId: string(),
|
|
7858
|
+
toLocationId: string()
|
|
7859
|
+
}))
|
|
7740
7860
|
});
|
|
7741
7861
|
/**
|
|
7742
7862
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7788,6 +7908,21 @@ var StorageLocationSchema = object({
|
|
|
7788
7908
|
nodeId: string().optional(),
|
|
7789
7909
|
isDefault: boolean().default(false),
|
|
7790
7910
|
isSystem: boolean().default(false),
|
|
7911
|
+
/**
|
|
7912
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7913
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7914
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7915
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7916
|
+
* extended to add the next consumer.
|
|
7917
|
+
*
|
|
7918
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7919
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7920
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7921
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7922
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7923
|
+
* always stamped `true`.
|
|
7924
|
+
*/
|
|
7925
|
+
enabled: boolean().optional(),
|
|
7791
7926
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7792
7927
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7793
7928
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12217,7 +12352,8 @@ method(object({
|
|
|
12217
12352
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12218
12353
|
/**
|
|
12219
12354
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12220
|
-
* filesystem
|
|
12355
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12356
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12221
12357
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12222
12358
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12223
12359
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14030,6 +14166,13 @@ var MaskGridDimsSchema = object({
|
|
|
14030
14166
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14031
14167
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14032
14168
|
* one trigger.
|
|
14169
|
+
*
|
|
14170
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14171
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14172
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14173
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14174
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14175
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14033
14176
|
*/
|
|
14034
14177
|
var NcDeliverySchema = _enum([
|
|
14035
14178
|
"immediate",
|
|
@@ -14044,15 +14187,32 @@ var NcDeliverySchema = _enum([
|
|
|
14044
14187
|
* depend on a provider's raw event name or payload shape.
|
|
14045
14188
|
*/
|
|
14046
14189
|
var NcSystemEventKindSchema = _enum([
|
|
14047
|
-
"
|
|
14048
|
-
"
|
|
14190
|
+
"device-online",
|
|
14191
|
+
"device-offline",
|
|
14192
|
+
"device-disabled",
|
|
14193
|
+
"device-enabled",
|
|
14049
14194
|
"stream-online",
|
|
14050
14195
|
"stream-offline",
|
|
14051
14196
|
"node-online",
|
|
14052
14197
|
"node-offline",
|
|
14053
14198
|
"addon-update-available",
|
|
14054
|
-
"server-update-available"
|
|
14199
|
+
"server-update-available",
|
|
14200
|
+
"alarm-triggered",
|
|
14201
|
+
"alarm-armed",
|
|
14202
|
+
"alarm-disarmed",
|
|
14203
|
+
"camera-online",
|
|
14204
|
+
"camera-offline",
|
|
14205
|
+
"camera-disabled",
|
|
14206
|
+
"camera-enabled"
|
|
14207
|
+
]);
|
|
14208
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14209
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14210
|
+
"camera-online",
|
|
14211
|
+
"camera-offline",
|
|
14212
|
+
"camera-disabled",
|
|
14213
|
+
"camera-enabled"
|
|
14055
14214
|
]);
|
|
14215
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14056
14216
|
/**
|
|
14057
14217
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14058
14218
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14061,6 +14221,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14061
14221
|
var NcSystemEventConditionSchema = object({
|
|
14062
14222
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14063
14223
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14224
|
+
/**
|
|
14225
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14226
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14227
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14228
|
+
*
|
|
14229
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14230
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14231
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14232
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14233
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14234
|
+
*/
|
|
14235
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14064
14236
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14065
14237
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14066
14238
|
});
|
|
@@ -14111,6 +14283,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14111
14283
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14112
14284
|
});
|
|
14113
14285
|
/**
|
|
14286
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14287
|
+
*
|
|
14288
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14289
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14290
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14291
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14292
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14293
|
+
*
|
|
14294
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14295
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14296
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14297
|
+
*
|
|
14298
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14299
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14300
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14301
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14302
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14303
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14304
|
+
* ZodEffects the cap path would have to special-case).
|
|
14305
|
+
*
|
|
14306
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14307
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14308
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14309
|
+
* `samplingSeconds` decorative.
|
|
14310
|
+
*
|
|
14311
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14312
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14313
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14314
|
+
* an operator who typed `dog` mean the same thing.
|
|
14315
|
+
*/
|
|
14316
|
+
var NcAudioConditionSchema = object({
|
|
14317
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14318
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14319
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14320
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14321
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14322
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14323
|
+
/** Length of the sampling window in seconds. */
|
|
14324
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14325
|
+
});
|
|
14326
|
+
/**
|
|
14114
14327
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14115
14328
|
*
|
|
14116
14329
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14383,7 +14596,33 @@ var NcConditionsSchema = object({
|
|
|
14383
14596
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14384
14597
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14385
14598
|
*/
|
|
14386
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14599
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14600
|
+
/**
|
|
14601
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14602
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14603
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14604
|
+
* a window that is not full yet, neither filter given). See
|
|
14605
|
+
* {@link NcAudioCondition}.
|
|
14606
|
+
*
|
|
14607
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14608
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14609
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14610
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14611
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14612
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14613
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14614
|
+
*
|
|
14615
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14616
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14617
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14618
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14619
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14620
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14621
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14622
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14623
|
+
* does an audio rule become authorable.
|
|
14624
|
+
*/
|
|
14625
|
+
audio: NcAudioConditionSchema.optional()
|
|
14387
14626
|
});
|
|
14388
14627
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14389
14628
|
var NcRuleTargetSchema = object({
|
|
@@ -14497,6 +14736,73 @@ var NcThrottleSchema = object({
|
|
|
14497
14736
|
*/
|
|
14498
14737
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14499
14738
|
});
|
|
14739
|
+
/**
|
|
14740
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14741
|
+
* it judges may be.
|
|
14742
|
+
*
|
|
14743
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14744
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14745
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14746
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14747
|
+
* tokens for pixels the model pools away.
|
|
14748
|
+
*/
|
|
14749
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14750
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14751
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14752
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14753
|
+
var NcConfirmExpectSchema = object({
|
|
14754
|
+
op: _enum([
|
|
14755
|
+
">=",
|
|
14756
|
+
">",
|
|
14757
|
+
"<=",
|
|
14758
|
+
"<",
|
|
14759
|
+
"=="
|
|
14760
|
+
]),
|
|
14761
|
+
count: number().int().min(0).max(1e3)
|
|
14762
|
+
});
|
|
14763
|
+
/**
|
|
14764
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14765
|
+
* to ship and says whether it agrees with the rule.
|
|
14766
|
+
*
|
|
14767
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14768
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14769
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14770
|
+
*
|
|
14771
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14772
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14773
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14774
|
+
* open looks in the log exactly like a gate that works.
|
|
14775
|
+
*
|
|
14776
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14777
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14778
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14779
|
+
* above rather than trusting a parse it may never have seen.
|
|
14780
|
+
*/
|
|
14781
|
+
var NcConfirmSchema = object({
|
|
14782
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14783
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14784
|
+
enabled: boolean().default(false),
|
|
14785
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14786
|
+
profileId: string().optional(),
|
|
14787
|
+
/**
|
|
14788
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14789
|
+
* from the rule (its class and its expectation).
|
|
14790
|
+
*
|
|
14791
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14792
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14793
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14794
|
+
* turn and only rule-authored words land here.
|
|
14795
|
+
*/
|
|
14796
|
+
prompt: string().max(1e3).optional(),
|
|
14797
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14798
|
+
* own boolean verdict decides. */
|
|
14799
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14800
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14801
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14802
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14803
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14804
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14805
|
+
});
|
|
14500
14806
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14501
14807
|
var NcRuleInputSchema = object({
|
|
14502
14808
|
name: string().min(1).max(200),
|
|
@@ -14557,7 +14863,13 @@ var NcRuleInputSchema = object({
|
|
|
14557
14863
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14558
14864
|
* shape as every other actuation.
|
|
14559
14865
|
*/
|
|
14560
|
-
actions: NcRuleActionsSchema.optional()
|
|
14866
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14867
|
+
/**
|
|
14868
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14869
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14870
|
+
* did, and absent is the only way to say that without a migration.
|
|
14871
|
+
*/
|
|
14872
|
+
confirm: NcConfirmSchema.optional()
|
|
14561
14873
|
});
|
|
14562
14874
|
/**
|
|
14563
14875
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14568,7 +14880,37 @@ var NcRuleInputSchema = object({
|
|
|
14568
14880
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14569
14881
|
* `updateRule` patch.
|
|
14570
14882
|
*/
|
|
14571
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14883
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14884
|
+
disabledTargetIds: array(string()).optional(),
|
|
14885
|
+
/**
|
|
14886
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14887
|
+
*
|
|
14888
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14889
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14890
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14891
|
+
* one — which made every partial edit destructive:
|
|
14892
|
+
*
|
|
14893
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14894
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14895
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14896
|
+
*
|
|
14897
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14898
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14899
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14900
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14901
|
+
* within a minute of a two-field patch.
|
|
14902
|
+
*
|
|
14903
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14904
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14905
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14906
|
+
* absent key is now genuinely absent.
|
|
14907
|
+
*/
|
|
14908
|
+
enabled: boolean().optional(),
|
|
14909
|
+
conditions: NcConditionsSchema.optional(),
|
|
14910
|
+
media: NcMediaPolicySchema.optional(),
|
|
14911
|
+
throttle: NcThrottleSchema.optional(),
|
|
14912
|
+
priority: number().int().min(1).max(5).optional()
|
|
14913
|
+
});
|
|
14572
14914
|
/** A persisted rule. */
|
|
14573
14915
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14574
14916
|
id: string(),
|
|
@@ -14869,6 +15211,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14869
15211
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14870
15212
|
* copy would lie the first time a rule is disabled.
|
|
14871
15213
|
*/
|
|
15214
|
+
/**
|
|
15215
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15216
|
+
*
|
|
15217
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15218
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15219
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15220
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15221
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15222
|
+
* with the switches the operator actually used.
|
|
15223
|
+
*/
|
|
15224
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15225
|
+
"muted",
|
|
15226
|
+
"detection-off",
|
|
15227
|
+
"offline"
|
|
15228
|
+
]);
|
|
15229
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15230
|
+
deviceId: number().int(),
|
|
15231
|
+
reason: NcAlarmSkipReasonSchema
|
|
15232
|
+
});
|
|
14872
15233
|
var NcAlarmModeCoverageSchema = object({
|
|
14873
15234
|
mode: AlarmArmModeSchema,
|
|
14874
15235
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14876,7 +15237,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14876
15237
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14877
15238
|
allDevices: boolean(),
|
|
14878
15239
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14879
|
-
deviceIds: array(number().int())
|
|
15240
|
+
deviceIds: array(number().int()),
|
|
15241
|
+
/**
|
|
15242
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15243
|
+
* excludes it.
|
|
15244
|
+
*
|
|
15245
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15246
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15247
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15248
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15249
|
+
* alarm tab.
|
|
15250
|
+
*/
|
|
15251
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14880
15252
|
});
|
|
14881
15253
|
var NcAlarmConfigSchema = object({
|
|
14882
15254
|
/**
|
|
@@ -16245,13 +16617,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16245
16617
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16246
16618
|
kind: "mutation",
|
|
16247
16619
|
auth: "admin"
|
|
16248
|
-
}), method(
|
|
16620
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16249
16621
|
kind: "mutation",
|
|
16250
16622
|
auth: "admin"
|
|
16251
|
-
}), method(object({
|
|
16252
|
-
kind: "
|
|
16623
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16624
|
+
kind: "mutation",
|
|
16253
16625
|
auth: "admin"
|
|
16254
|
-
}), method(
|
|
16626
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16627
|
+
kind: "mutation",
|
|
16628
|
+
auth: "admin"
|
|
16629
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16630
|
+
kind: "mutation",
|
|
16631
|
+
auth: "admin"
|
|
16632
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16255
16633
|
kind: "mutation",
|
|
16256
16634
|
auth: "admin"
|
|
16257
16635
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17675,9 +18053,16 @@ var CameraStatusSchema = object({
|
|
|
17675
18053
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17676
18054
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17677
18055
|
/**
|
|
17678
|
-
* Per-camera
|
|
18056
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17679
18057
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17680
18058
|
*
|
|
18059
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18060
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18061
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18062
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18063
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18064
|
+
* the difference between a camera being off and a camera being dead.
|
|
18065
|
+
*
|
|
17681
18066
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17682
18067
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17683
18068
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17748,7 +18133,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17748
18133
|
reachable: boolean(),
|
|
17749
18134
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17750
18135
|
});
|
|
17751
|
-
method(object({
|
|
18136
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18137
|
+
kind: "mutation",
|
|
18138
|
+
auth: "admin"
|
|
18139
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18140
|
+
kind: "mutation",
|
|
18141
|
+
auth: "admin"
|
|
18142
|
+
}), method(object({
|
|
17752
18143
|
deviceId: number(),
|
|
17753
18144
|
agentNodeId: string()
|
|
17754
18145
|
}), object({ success: literal(true) }), {
|
|
@@ -18422,6 +18813,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18422
18813
|
locationId: string(),
|
|
18423
18814
|
targetBytes: number().int().positive()
|
|
18424
18815
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18816
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18817
|
+
kind: "mutation",
|
|
18818
|
+
auth: "admin"
|
|
18819
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18820
|
+
kind: "mutation",
|
|
18821
|
+
auth: "admin"
|
|
18822
|
+
});
|
|
18425
18823
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18426
18824
|
providerId: string().min(1),
|
|
18427
18825
|
displayName: string().min(1),
|
|
@@ -18525,6 +18923,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18525
18923
|
label: string(),
|
|
18526
18924
|
description: string().optional()
|
|
18527
18925
|
});
|
|
18926
|
+
/**
|
|
18927
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18928
|
+
* an instance declares a camera.
|
|
18929
|
+
*/
|
|
18930
|
+
var TerminalInstanceInfoSchema = object({
|
|
18931
|
+
instanceId: string(),
|
|
18932
|
+
cameraStableId: string(),
|
|
18933
|
+
nodeId: string(),
|
|
18934
|
+
profileId: string(),
|
|
18935
|
+
profileLabel: string(),
|
|
18936
|
+
name: string(),
|
|
18937
|
+
enabled: boolean()
|
|
18938
|
+
});
|
|
18939
|
+
var TerminalLegacyCameraSchema = object({
|
|
18940
|
+
stableId: string(),
|
|
18941
|
+
nodeId: string(),
|
|
18942
|
+
profileId: string(),
|
|
18943
|
+
profileLabel: string(),
|
|
18944
|
+
name: string(),
|
|
18945
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18946
|
+
adoptable: boolean()
|
|
18947
|
+
});
|
|
18528
18948
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18529
18949
|
seq: number().int().positive(),
|
|
18530
18950
|
kind: literal("data"),
|
|
@@ -18541,7 +18961,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18541
18961
|
snapshot: string().optional(),
|
|
18542
18962
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18543
18963
|
});
|
|
18544
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18964
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18965
|
+
targetNodeId: string().min(1),
|
|
18966
|
+
profileId: string().min(1),
|
|
18967
|
+
name: string().trim().min(1).max(160).optional()
|
|
18968
|
+
}), TerminalInstanceInfoSchema, {
|
|
18969
|
+
kind: "mutation",
|
|
18970
|
+
auth: "admin"
|
|
18971
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18972
|
+
kind: "mutation",
|
|
18973
|
+
auth: "admin"
|
|
18974
|
+
}), method(object({
|
|
18975
|
+
instanceId: string().min(1),
|
|
18976
|
+
enabled: boolean()
|
|
18977
|
+
}), TerminalInstanceInfoSchema, {
|
|
18978
|
+
kind: "mutation",
|
|
18979
|
+
auth: "admin"
|
|
18980
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18981
|
+
stableId: string().min(1),
|
|
18982
|
+
name: string().trim().min(1).max(160).optional()
|
|
18983
|
+
}), TerminalInstanceInfoSchema, {
|
|
18984
|
+
kind: "mutation",
|
|
18985
|
+
auth: "admin"
|
|
18986
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18545
18987
|
profileId: string(),
|
|
18546
18988
|
cols: number().int().positive(),
|
|
18547
18989
|
rows: number().int().positive()
|
|
@@ -18558,7 +19000,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18558
19000
|
}), method(object({
|
|
18559
19001
|
sessionId: string(),
|
|
18560
19002
|
afterSeq: number().int().nonnegative(),
|
|
18561
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19003
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19004
|
+
/**
|
|
19005
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19006
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19007
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19008
|
+
*/
|
|
19009
|
+
waitForOutput: boolean().optional()
|
|
18562
19010
|
}), TerminalOutputBatchSchema, {
|
|
18563
19011
|
kind: "mutation",
|
|
18564
19012
|
auth: "admin",
|
|
@@ -20499,6 +20947,7 @@ var FaceInfoSchema = object({
|
|
|
20499
20947
|
var FaceFilterEnum = _enum([
|
|
20500
20948
|
"unassigned",
|
|
20501
20949
|
"recognized",
|
|
20950
|
+
"identified",
|
|
20502
20951
|
"all"
|
|
20503
20952
|
]);
|
|
20504
20953
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20527,6 +20976,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20527
20976
|
kind: "mutation",
|
|
20528
20977
|
auth: "admin"
|
|
20529
20978
|
}), method(object({
|
|
20979
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20980
|
+
deviceId: number().int().optional(),
|
|
20530
20981
|
limit: number().int().positive().optional(),
|
|
20531
20982
|
filter: FaceFilterEnum.optional(),
|
|
20532
20983
|
/**
|
|
@@ -22292,6 +22743,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22292
22743
|
capName: string().min(1).max(64),
|
|
22293
22744
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22294
22745
|
valuePath: string().min(1).max(64)
|
|
22746
|
+
}),
|
|
22747
|
+
object({
|
|
22748
|
+
kind: literal("latest-recognition"),
|
|
22749
|
+
recognition: _enum(["person", "plate"])
|
|
22295
22750
|
})
|
|
22296
22751
|
]);
|
|
22297
22752
|
var OsdSlotBindingSchema = object({
|
|
@@ -22397,6 +22852,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22397
22852
|
}), object({ success: literal(true) }), {
|
|
22398
22853
|
kind: "mutation",
|
|
22399
22854
|
auth: "admin"
|
|
22855
|
+
}), method(object({
|
|
22856
|
+
sourceDeviceId: number().int(),
|
|
22857
|
+
targetDeviceId: number().int()
|
|
22858
|
+
}), object({
|
|
22859
|
+
copied: number().int().nonnegative(),
|
|
22860
|
+
skipped: number().int().nonnegative()
|
|
22861
|
+
}), {
|
|
22862
|
+
kind: "mutation",
|
|
22863
|
+
auth: "admin"
|
|
22400
22864
|
}), method(object({
|
|
22401
22865
|
deviceId: number().int(),
|
|
22402
22866
|
slotId: string().min(1),
|
|
@@ -23107,7 +23571,19 @@ var RecordingManifestSchema = object({
|
|
|
23107
23571
|
* profiles/subtrees/locations on this node). */
|
|
23108
23572
|
var RecordingDeviceUsageSchema = object({
|
|
23109
23573
|
deviceId: number(),
|
|
23110
|
-
usedBytes: number()
|
|
23574
|
+
usedBytes: number(),
|
|
23575
|
+
/**
|
|
23576
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23577
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23578
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23579
|
+
*
|
|
23580
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23581
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23582
|
+
* field must keep validating that older provider's payload: the framework
|
|
23583
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23584
|
+
* the later of the two.
|
|
23585
|
+
*/
|
|
23586
|
+
oldestMs: number().nullable().optional()
|
|
23111
23587
|
});
|
|
23112
23588
|
/** Recording storage usage + capacity for one storage location. */
|
|
23113
23589
|
var RecordingLocationUsageSchema = object({
|
|
@@ -23135,6 +23611,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
23135
23611
|
locations: array(RecordingLocationUsageSchema)
|
|
23136
23612
|
});
|
|
23137
23613
|
/**
|
|
23614
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23615
|
+
*
|
|
23616
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23617
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23618
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23619
|
+
* location, run FIFO behind the single-flight mover.
|
|
23620
|
+
*
|
|
23621
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23622
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23623
|
+
* (empty on the plan).
|
|
23624
|
+
*/
|
|
23625
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23626
|
+
deviceId: number(),
|
|
23627
|
+
profile: string(),
|
|
23628
|
+
fromLocationId: string(),
|
|
23629
|
+
toLocationId: string(),
|
|
23630
|
+
bytes: number(),
|
|
23631
|
+
files: number().int()
|
|
23632
|
+
});
|
|
23633
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23634
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23635
|
+
* that had nothing to do. */
|
|
23636
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23637
|
+
"unassigned",
|
|
23638
|
+
"target-not-writable",
|
|
23639
|
+
"below-threshold",
|
|
23640
|
+
"no-headroom"
|
|
23641
|
+
]);
|
|
23642
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23643
|
+
deviceId: number(),
|
|
23644
|
+
profile: string(),
|
|
23645
|
+
fromLocationId: string(),
|
|
23646
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23647
|
+
toLocationId: string().nullable(),
|
|
23648
|
+
bytes: number(),
|
|
23649
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23650
|
+
});
|
|
23651
|
+
var RecordingRebalancePlanSchema = object({
|
|
23652
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23653
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23654
|
+
bytesToMove: number(),
|
|
23655
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23656
|
+
jobIds: array(string())
|
|
23657
|
+
});
|
|
23658
|
+
var RecordingRebalanceInputSchema = object({
|
|
23659
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23660
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23661
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23662
|
+
minMoveGb: number().min(0).optional()
|
|
23663
|
+
});
|
|
23664
|
+
/**
|
|
23138
23665
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
23139
23666
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
23140
23667
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23282,6 +23809,21 @@ method(object({
|
|
|
23282
23809
|
}), {
|
|
23283
23810
|
kind: "mutation",
|
|
23284
23811
|
auth: "admin"
|
|
23812
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23813
|
+
kind: "mutation",
|
|
23814
|
+
auth: "admin"
|
|
23815
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23816
|
+
kind: "mutation",
|
|
23817
|
+
auth: "admin"
|
|
23818
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23819
|
+
kind: "mutation",
|
|
23820
|
+
auth: "admin"
|
|
23821
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23822
|
+
kind: "mutation",
|
|
23823
|
+
auth: "admin"
|
|
23824
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23825
|
+
kind: "mutation",
|
|
23826
|
+
auth: "admin"
|
|
23285
23827
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23286
23828
|
kind: "mutation",
|
|
23287
23829
|
auth: "admin"
|
|
@@ -23291,9 +23833,15 @@ method(object({
|
|
|
23291
23833
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23292
23834
|
kind: "mutation",
|
|
23293
23835
|
auth: "admin"
|
|
23836
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23837
|
+
kind: "query",
|
|
23838
|
+
auth: "admin"
|
|
23839
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23840
|
+
kind: "mutation",
|
|
23841
|
+
auth: "admin"
|
|
23294
23842
|
});
|
|
23295
23843
|
/**
|
|
23296
|
-
* `
|
|
23844
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23297
23845
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23298
23846
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23299
23847
|
* delete-after-download.
|
|
@@ -23308,10 +23856,42 @@ method(object({
|
|
|
23308
23856
|
*/
|
|
23309
23857
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23310
23858
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23859
|
+
/**
|
|
23860
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23861
|
+
*
|
|
23862
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23863
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23864
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23865
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23866
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23867
|
+
*/
|
|
23868
|
+
var ExportDenseRangeSchema = object({
|
|
23869
|
+
fromSec: number().nonnegative(),
|
|
23870
|
+
toSec: number().nonnegative()
|
|
23871
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23872
|
+
/**
|
|
23873
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23874
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23875
|
+
*
|
|
23876
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23877
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23878
|
+
*/
|
|
23879
|
+
var ExportDenseSchema = object({
|
|
23880
|
+
everyMs: number().int().positive(),
|
|
23881
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23882
|
+
});
|
|
23311
23883
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23312
23884
|
var ExportTimelapseSchema = object({
|
|
23313
23885
|
everyMs: number().int().positive(),
|
|
23314
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23886
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23887
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23888
|
+
dense: ExportDenseSchema.optional()
|
|
23889
|
+
}).superRefine((v, ctx) => {
|
|
23890
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23891
|
+
code: ZodIssueCode.custom,
|
|
23892
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23893
|
+
path: ["dense", "everyMs"]
|
|
23894
|
+
});
|
|
23315
23895
|
});
|
|
23316
23896
|
/**
|
|
23317
23897
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23369,6 +23949,19 @@ var ExportDownloadSchema = object({
|
|
|
23369
23949
|
url: string(),
|
|
23370
23950
|
endpoints: array(string())
|
|
23371
23951
|
});
|
|
23952
|
+
/**
|
|
23953
|
+
* A finished export's bytes, inline.
|
|
23954
|
+
*
|
|
23955
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23956
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23957
|
+
*/
|
|
23958
|
+
var ExportBytesSchema = object({
|
|
23959
|
+
base64: string(),
|
|
23960
|
+
contentType: string(),
|
|
23961
|
+
/** Suggested filename, extension included. */
|
|
23962
|
+
name: string(),
|
|
23963
|
+
bytes: number().int().nonnegative()
|
|
23964
|
+
});
|
|
23372
23965
|
method(object({
|
|
23373
23966
|
deviceId: number(),
|
|
23374
23967
|
profile: string(),
|
|
@@ -23393,6 +23986,9 @@ method(object({
|
|
|
23393
23986
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23394
23987
|
kind: "query",
|
|
23395
23988
|
auth: "protected"
|
|
23989
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23990
|
+
kind: "query",
|
|
23991
|
+
auth: "protected"
|
|
23396
23992
|
});
|
|
23397
23993
|
/**
|
|
23398
23994
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27410,6 +28006,12 @@ Object.freeze({
|
|
|
27410
28006
|
addonId: null,
|
|
27411
28007
|
access: "delete"
|
|
27412
28008
|
},
|
|
28009
|
+
"osdManager.copyDeviceConfiguration": {
|
|
28010
|
+
capName: "osd-manager",
|
|
28011
|
+
capScope: "system",
|
|
28012
|
+
addonId: null,
|
|
28013
|
+
access: "create"
|
|
28014
|
+
},
|
|
27413
28015
|
"osdManager.getConditionSupport": {
|
|
27414
28016
|
capName: "osd-manager",
|
|
27415
28017
|
capScope: "system",
|
|
@@ -27506,7 +28108,7 @@ Object.freeze({
|
|
|
27506
28108
|
addonId: null,
|
|
27507
28109
|
access: "create"
|
|
27508
28110
|
},
|
|
27509
|
-
"pipelineAnalytics.
|
|
28111
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27510
28112
|
capName: "pipeline-analytics",
|
|
27511
28113
|
capScope: "device",
|
|
27512
28114
|
addonId: null,
|
|
@@ -27578,12 +28180,6 @@ Object.freeze({
|
|
|
27578
28180
|
addonId: null,
|
|
27579
28181
|
access: "view"
|
|
27580
28182
|
},
|
|
27581
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27582
|
-
capName: "pipeline-analytics",
|
|
27583
|
-
capScope: "device",
|
|
27584
|
-
addonId: null,
|
|
27585
|
-
access: "view"
|
|
27586
|
-
},
|
|
27587
28183
|
"pipelineAnalytics.getMotionEvents": {
|
|
27588
28184
|
capName: "pipeline-analytics",
|
|
27589
28185
|
capScope: "device",
|
|
@@ -27620,6 +28216,12 @@ Object.freeze({
|
|
|
27620
28216
|
addonId: null,
|
|
27621
28217
|
access: "view"
|
|
27622
28218
|
},
|
|
28219
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
28220
|
+
capName: "pipeline-analytics",
|
|
28221
|
+
capScope: "device",
|
|
28222
|
+
addonId: null,
|
|
28223
|
+
access: "view"
|
|
28224
|
+
},
|
|
27623
28225
|
"pipelineAnalytics.getTrack": {
|
|
27624
28226
|
capName: "pipeline-analytics",
|
|
27625
28227
|
capScope: "device",
|
|
@@ -27698,6 +28300,12 @@ Object.freeze({
|
|
|
27698
28300
|
addonId: null,
|
|
27699
28301
|
access: "view"
|
|
27700
28302
|
},
|
|
28303
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28304
|
+
capName: "pipeline-analytics",
|
|
28305
|
+
capScope: "device",
|
|
28306
|
+
addonId: null,
|
|
28307
|
+
access: "create"
|
|
28308
|
+
},
|
|
27701
28309
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27702
28310
|
capName: "pipeline-analytics",
|
|
27703
28311
|
capScope: "device",
|
|
@@ -27728,7 +28336,7 @@ Object.freeze({
|
|
|
27728
28336
|
addonId: null,
|
|
27729
28337
|
access: "create"
|
|
27730
28338
|
},
|
|
27731
|
-
"pipelineAnalytics.
|
|
28339
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27732
28340
|
capName: "pipeline-analytics",
|
|
27733
28341
|
capScope: "device",
|
|
27734
28342
|
addonId: null,
|
|
@@ -27740,6 +28348,12 @@ Object.freeze({
|
|
|
27740
28348
|
addonId: null,
|
|
27741
28349
|
access: "create"
|
|
27742
28350
|
},
|
|
28351
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28352
|
+
capName: "pipeline-analytics",
|
|
28353
|
+
capScope: "device",
|
|
28354
|
+
addonId: null,
|
|
28355
|
+
access: "create"
|
|
28356
|
+
},
|
|
27743
28357
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27744
28358
|
capName: "pipeline-analytics",
|
|
27745
28359
|
capScope: "device",
|
|
@@ -27764,6 +28378,12 @@ Object.freeze({
|
|
|
27764
28378
|
addonId: null,
|
|
27765
28379
|
access: "create"
|
|
27766
28380
|
},
|
|
28381
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28382
|
+
capName: "pipeline-analytics",
|
|
28383
|
+
capScope: "device",
|
|
28384
|
+
addonId: null,
|
|
28385
|
+
access: "create"
|
|
28386
|
+
},
|
|
27767
28387
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27768
28388
|
capName: "pipeline-analytics",
|
|
27769
28389
|
capScope: "device",
|
|
@@ -28130,6 +28750,12 @@ Object.freeze({
|
|
|
28130
28750
|
addonId: null,
|
|
28131
28751
|
access: "view"
|
|
28132
28752
|
},
|
|
28753
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28754
|
+
capName: "pipeline-orchestrator",
|
|
28755
|
+
capScope: "system",
|
|
28756
|
+
addonId: null,
|
|
28757
|
+
access: "create"
|
|
28758
|
+
},
|
|
28133
28759
|
"pipelineOrchestrator.rebalance": {
|
|
28134
28760
|
capName: "pipeline-orchestrator",
|
|
28135
28761
|
capScope: "system",
|
|
@@ -28154,6 +28780,12 @@ Object.freeze({
|
|
|
28154
28780
|
addonId: null,
|
|
28155
28781
|
access: "view"
|
|
28156
28782
|
},
|
|
28783
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28784
|
+
capName: "pipeline-orchestrator",
|
|
28785
|
+
capScope: "system",
|
|
28786
|
+
addonId: null,
|
|
28787
|
+
access: "create"
|
|
28788
|
+
},
|
|
28157
28789
|
"pipelineOrchestrator.saveTemplate": {
|
|
28158
28790
|
capName: "pipeline-orchestrator",
|
|
28159
28791
|
capScope: "system",
|
|
@@ -28550,7 +29182,13 @@ Object.freeze({
|
|
|
28550
29182
|
addonId: null,
|
|
28551
29183
|
access: "create"
|
|
28552
29184
|
},
|
|
28553
|
-
"recording.
|
|
29185
|
+
"recording.cancelRelocateJob": {
|
|
29186
|
+
capName: "recording",
|
|
29187
|
+
capScope: "system",
|
|
29188
|
+
addonId: null,
|
|
29189
|
+
access: "create"
|
|
29190
|
+
},
|
|
29191
|
+
"recording.cancelStorageMigrationMove": {
|
|
28554
29192
|
capName: "recording",
|
|
28555
29193
|
capScope: "system",
|
|
28556
29194
|
addonId: null,
|
|
@@ -28586,7 +29224,7 @@ Object.freeze({
|
|
|
28586
29224
|
addonId: null,
|
|
28587
29225
|
access: "view"
|
|
28588
29226
|
},
|
|
28589
|
-
"recording.
|
|
29227
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28590
29228
|
capName: "recording",
|
|
28591
29229
|
capScope: "system",
|
|
28592
29230
|
addonId: null,
|
|
@@ -28604,12 +29242,30 @@ Object.freeze({
|
|
|
28604
29242
|
addonId: null,
|
|
28605
29243
|
access: "view"
|
|
28606
29244
|
},
|
|
29245
|
+
"recording.listRelocateJobs": {
|
|
29246
|
+
capName: "recording",
|
|
29247
|
+
capScope: "system",
|
|
29248
|
+
addonId: null,
|
|
29249
|
+
access: "view"
|
|
29250
|
+
},
|
|
28607
29251
|
"recording.locateSegment": {
|
|
28608
29252
|
capName: "recording",
|
|
28609
29253
|
capScope: "system",
|
|
28610
29254
|
addonId: null,
|
|
28611
29255
|
access: "view"
|
|
28612
29256
|
},
|
|
29257
|
+
"recording.pauseForStorageMigration": {
|
|
29258
|
+
capName: "recording",
|
|
29259
|
+
capScope: "system",
|
|
29260
|
+
addonId: null,
|
|
29261
|
+
access: "create"
|
|
29262
|
+
},
|
|
29263
|
+
"recording.planStorageRebalance": {
|
|
29264
|
+
capName: "recording",
|
|
29265
|
+
capScope: "system",
|
|
29266
|
+
addonId: null,
|
|
29267
|
+
access: "view"
|
|
29268
|
+
},
|
|
28613
29269
|
"recording.pruneFootage": {
|
|
28614
29270
|
capName: "recording",
|
|
28615
29271
|
capScope: "system",
|
|
@@ -28628,6 +29284,12 @@ Object.freeze({
|
|
|
28628
29284
|
addonId: null,
|
|
28629
29285
|
access: "view"
|
|
28630
29286
|
},
|
|
29287
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29288
|
+
capName: "recording",
|
|
29289
|
+
capScope: "system",
|
|
29290
|
+
addonId: null,
|
|
29291
|
+
access: "create"
|
|
29292
|
+
},
|
|
28631
29293
|
"recording.relocateFootage": {
|
|
28632
29294
|
capName: "recording",
|
|
28633
29295
|
capScope: "system",
|
|
@@ -28652,44 +29314,68 @@ Object.freeze({
|
|
|
28652
29314
|
addonId: null,
|
|
28653
29315
|
access: "create"
|
|
28654
29316
|
},
|
|
29317
|
+
"recording.resumeForStorageMigration": {
|
|
29318
|
+
capName: "recording",
|
|
29319
|
+
capScope: "system",
|
|
29320
|
+
addonId: null,
|
|
29321
|
+
access: "create"
|
|
29322
|
+
},
|
|
28655
29323
|
"recording.setDeviceConfig": {
|
|
28656
29324
|
capName: "recording",
|
|
28657
29325
|
capScope: "system",
|
|
28658
29326
|
addonId: null,
|
|
28659
29327
|
access: "create"
|
|
28660
29328
|
},
|
|
29329
|
+
"recording.startStorageMigrationMove": {
|
|
29330
|
+
capName: "recording",
|
|
29331
|
+
capScope: "system",
|
|
29332
|
+
addonId: null,
|
|
29333
|
+
access: "create"
|
|
29334
|
+
},
|
|
29335
|
+
"recording.startStorageRebalance": {
|
|
29336
|
+
capName: "recording",
|
|
29337
|
+
capScope: "system",
|
|
29338
|
+
addonId: null,
|
|
29339
|
+
access: "create"
|
|
29340
|
+
},
|
|
28661
29341
|
"recordingExport.cancelExport": {
|
|
28662
|
-
capName: "
|
|
29342
|
+
capName: "recording-export",
|
|
28663
29343
|
capScope: "system",
|
|
28664
29344
|
addonId: null,
|
|
28665
29345
|
access: "create"
|
|
28666
29346
|
},
|
|
28667
29347
|
"recordingExport.createExport": {
|
|
28668
|
-
capName: "
|
|
29348
|
+
capName: "recording-export",
|
|
28669
29349
|
capScope: "system",
|
|
28670
29350
|
addonId: null,
|
|
28671
29351
|
access: "create"
|
|
28672
29352
|
},
|
|
28673
29353
|
"recordingExport.deleteExport": {
|
|
28674
|
-
capName: "
|
|
29354
|
+
capName: "recording-export",
|
|
28675
29355
|
capScope: "system",
|
|
28676
29356
|
addonId: null,
|
|
28677
29357
|
access: "delete"
|
|
28678
29358
|
},
|
|
28679
29359
|
"recordingExport.getDownloadUrl": {
|
|
28680
|
-
capName: "
|
|
29360
|
+
capName: "recording-export",
|
|
28681
29361
|
capScope: "system",
|
|
28682
29362
|
addonId: null,
|
|
28683
29363
|
access: "view"
|
|
28684
29364
|
},
|
|
28685
29365
|
"recordingExport.getExport": {
|
|
28686
|
-
capName: "
|
|
29366
|
+
capName: "recording-export",
|
|
28687
29367
|
capScope: "system",
|
|
28688
29368
|
addonId: null,
|
|
28689
29369
|
access: "view"
|
|
28690
29370
|
},
|
|
28691
29371
|
"recordingExport.listExports": {
|
|
28692
|
-
capName: "
|
|
29372
|
+
capName: "recording-export",
|
|
29373
|
+
capScope: "system",
|
|
29374
|
+
addonId: null,
|
|
29375
|
+
access: "view"
|
|
29376
|
+
},
|
|
29377
|
+
"recordingExport.readExportBytes": {
|
|
29378
|
+
capName: "recording-export",
|
|
28693
29379
|
capScope: "system",
|
|
28694
29380
|
addonId: null,
|
|
28695
29381
|
access: "view"
|
|
@@ -29048,6 +29734,30 @@ Object.freeze({
|
|
|
29048
29734
|
addonId: null,
|
|
29049
29735
|
access: "view"
|
|
29050
29736
|
},
|
|
29737
|
+
"storageMigration.cancel": {
|
|
29738
|
+
capName: "storage-migration",
|
|
29739
|
+
capScope: "system",
|
|
29740
|
+
addonId: null,
|
|
29741
|
+
access: "create"
|
|
29742
|
+
},
|
|
29743
|
+
"storageMigration.plan": {
|
|
29744
|
+
capName: "storage-migration",
|
|
29745
|
+
capScope: "system",
|
|
29746
|
+
addonId: null,
|
|
29747
|
+
access: "view"
|
|
29748
|
+
},
|
|
29749
|
+
"storageMigration.start": {
|
|
29750
|
+
capName: "storage-migration",
|
|
29751
|
+
capScope: "system",
|
|
29752
|
+
addonId: null,
|
|
29753
|
+
access: "create"
|
|
29754
|
+
},
|
|
29755
|
+
"storageMigration.status": {
|
|
29756
|
+
capName: "storage-migration",
|
|
29757
|
+
capScope: "system",
|
|
29758
|
+
addonId: null,
|
|
29759
|
+
access: "view"
|
|
29760
|
+
},
|
|
29051
29761
|
"storageProvider.abortUpload": {
|
|
29052
29762
|
capName: "storage-provider",
|
|
29053
29763
|
capScope: "system",
|
|
@@ -29426,12 +30136,42 @@ Object.freeze({
|
|
|
29426
30136
|
addonId: null,
|
|
29427
30137
|
access: "create"
|
|
29428
30138
|
},
|
|
30139
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
30140
|
+
capName: "terminal-session",
|
|
30141
|
+
capScope: "system",
|
|
30142
|
+
addonId: null,
|
|
30143
|
+
access: "create"
|
|
30144
|
+
},
|
|
29429
30145
|
"terminalSession.close": {
|
|
29430
30146
|
capName: "terminal-session",
|
|
29431
30147
|
capScope: "system",
|
|
29432
30148
|
addonId: null,
|
|
29433
30149
|
access: "create"
|
|
29434
30150
|
},
|
|
30151
|
+
"terminalSession.createInstance": {
|
|
30152
|
+
capName: "terminal-session",
|
|
30153
|
+
capScope: "system",
|
|
30154
|
+
addonId: null,
|
|
30155
|
+
access: "create"
|
|
30156
|
+
},
|
|
30157
|
+
"terminalSession.deleteInstance": {
|
|
30158
|
+
capName: "terminal-session",
|
|
30159
|
+
capScope: "system",
|
|
30160
|
+
addonId: null,
|
|
30161
|
+
access: "delete"
|
|
30162
|
+
},
|
|
30163
|
+
"terminalSession.listInstances": {
|
|
30164
|
+
capName: "terminal-session",
|
|
30165
|
+
capScope: "system",
|
|
30166
|
+
addonId: null,
|
|
30167
|
+
access: "view"
|
|
30168
|
+
},
|
|
30169
|
+
"terminalSession.listLegacyCameras": {
|
|
30170
|
+
capName: "terminal-session",
|
|
30171
|
+
capScope: "system",
|
|
30172
|
+
addonId: null,
|
|
30173
|
+
access: "view"
|
|
30174
|
+
},
|
|
29435
30175
|
"terminalSession.listProfiles": {
|
|
29436
30176
|
capName: "terminal-session",
|
|
29437
30177
|
capScope: "system",
|
|
@@ -29462,6 +30202,12 @@ Object.freeze({
|
|
|
29462
30202
|
addonId: null,
|
|
29463
30203
|
access: "create"
|
|
29464
30204
|
},
|
|
30205
|
+
"terminalSession.setInstanceEnabled": {
|
|
30206
|
+
capName: "terminal-session",
|
|
30207
|
+
capScope: "system",
|
|
30208
|
+
addonId: null,
|
|
30209
|
+
access: "create"
|
|
30210
|
+
},
|
|
29465
30211
|
"terminalSession.writeInput": {
|
|
29466
30212
|
capName: "terminal-session",
|
|
29467
30213
|
capScope: "system",
|
|
@@ -30006,6 +30752,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
30006
30752
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
30007
30753
|
var PriorityField = number().int().min(1).max(5);
|
|
30008
30754
|
/**
|
|
30755
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30756
|
+
*
|
|
30757
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30758
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30759
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30760
|
+
*
|
|
30761
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30762
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30763
|
+
*
|
|
30764
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30765
|
+
*
|
|
30766
|
+
* 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.
|
|
30767
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30768
|
+
* and therefore the length of a quiet night, does not move.
|
|
30769
|
+
*
|
|
30770
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30771
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30772
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30773
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30774
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30775
|
+
*/
|
|
30776
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30777
|
+
/**
|
|
30778
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30779
|
+
*
|
|
30780
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30781
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30782
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30783
|
+
* that range every ~583 ms.
|
|
30784
|
+
*
|
|
30785
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30786
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30787
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30788
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30789
|
+
* schema change and are the tracked follow-up.
|
|
30790
|
+
*
|
|
30791
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30792
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30793
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30794
|
+
* happened.
|
|
30795
|
+
*/
|
|
30796
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30797
|
+
/**
|
|
30798
|
+
* Caption burned into the notification's preview frame.
|
|
30799
|
+
*
|
|
30800
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30801
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30802
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30803
|
+
*
|
|
30804
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30805
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30806
|
+
* the reason this is not `.min(1)`.
|
|
30807
|
+
*/
|
|
30808
|
+
var PreviewTextField = string().max(200);
|
|
30809
|
+
/**
|
|
30810
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30811
|
+
*
|
|
30812
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30813
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30814
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30815
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30816
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30817
|
+
* them.
|
|
30818
|
+
*
|
|
30819
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30820
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30821
|
+
* paying that on the deploy that shipped it.
|
|
30822
|
+
*
|
|
30823
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30824
|
+
*/
|
|
30825
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30826
|
+
/**
|
|
30827
|
+
* Which detection classes the notification reports counts for.
|
|
30828
|
+
*
|
|
30829
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30830
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30831
|
+
* class the window actually contained", which is what an operator who never
|
|
30832
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30833
|
+
* counts cars all night).
|
|
30834
|
+
*
|
|
30835
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30836
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30837
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30838
|
+
* not emit.
|
|
30839
|
+
*
|
|
30840
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30841
|
+
* - `{{detections}}` — total over the reported classes
|
|
30842
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30843
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30844
|
+
* one per class, `count_` + the class name
|
|
30845
|
+
*
|
|
30846
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30847
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30848
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30849
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30850
|
+
*/
|
|
30851
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30852
|
+
/**
|
|
30009
30853
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
30010
30854
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
30011
30855
|
* here (see the ownership note above).
|
|
@@ -30025,9 +30869,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
30025
30869
|
cadenceSec: CadenceSecField.default(15),
|
|
30026
30870
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
30027
30871
|
framerate: FramerateField.default(10),
|
|
30872
|
+
/**
|
|
30873
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30874
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30875
|
+
* field gets.
|
|
30876
|
+
*/
|
|
30877
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30878
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30879
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30028
30880
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
30029
30881
|
targets: TargetsField,
|
|
30030
30882
|
template: TimelapseTemplateSchema.optional(),
|
|
30883
|
+
/**
|
|
30884
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30885
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30886
|
+
*
|
|
30887
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30888
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30889
|
+
* silently clear the caption too.
|
|
30890
|
+
*/
|
|
30891
|
+
previewText: PreviewTextField.optional(),
|
|
30892
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30893
|
+
previewMode: PreviewModeField.default("image"),
|
|
30894
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30895
|
+
reportClasses: ReportClassesField.optional(),
|
|
30031
30896
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
30032
30897
|
priority: PriorityField.default(3)
|
|
30033
30898
|
});
|
|
@@ -30038,8 +30903,13 @@ object({
|
|
|
30038
30903
|
schedule: NcScheduleSchema.optional(),
|
|
30039
30904
|
cadenceSec: CadenceSecField.optional(),
|
|
30040
30905
|
framerate: FramerateField.optional(),
|
|
30906
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30907
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
30041
30908
|
targets: TargetsField.optional(),
|
|
30042
30909
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30910
|
+
previewText: PreviewTextField.optional(),
|
|
30911
|
+
previewMode: PreviewModeField.optional(),
|
|
30912
|
+
reportClasses: ReportClassesField.optional(),
|
|
30043
30913
|
priority: PriorityField.optional()
|
|
30044
30914
|
});
|
|
30045
30915
|
TimelapseRuleInputSchema.extend({
|
|
@@ -30051,10 +30921,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
30051
30921
|
*/
|
|
30052
30922
|
ownerUserId: string().optional(),
|
|
30053
30923
|
/**
|
|
30054
|
-
* Epoch-ms of the
|
|
30055
|
-
*
|
|
30924
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30925
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30926
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
30056
30927
|
*/
|
|
30057
30928
|
lastGeneratedAt: number().optional(),
|
|
30929
|
+
/**
|
|
30930
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30931
|
+
* re-generation guard's real durable state.
|
|
30932
|
+
*
|
|
30933
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30934
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30935
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30936
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30937
|
+
* come back.
|
|
30938
|
+
*
|
|
30939
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30940
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30941
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30942
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30943
|
+
* once, on the deploy that shipped the map.
|
|
30944
|
+
*/
|
|
30945
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
30058
30946
|
/** userId of the caller who created the rule (server-stamped). */
|
|
30059
30947
|
createdBy: string(),
|
|
30060
30948
|
createdAt: number(),
|