@camstack/addon-provider-petkit 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +936 -48
- package/dist/addon.mjs +936 -48
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -8320,8 +8320,31 @@ var AdoptionJobSchema = object({
|
|
|
8320
8320
|
error: string().nullable()
|
|
8321
8321
|
});
|
|
8322
8322
|
/**
|
|
8323
|
-
* Per-camera FUNCTION SWITCHES
|
|
8324
|
-
*
|
|
8323
|
+
* Per-camera FUNCTION SWITCHES.
|
|
8324
|
+
*
|
|
8325
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
8326
|
+
*
|
|
8327
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
8328
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
8329
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
8330
|
+
* every function already had a settings page of its own, and a second place to
|
|
8331
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
8332
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
8333
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
8334
|
+
* (which was always first-class; the switch was a veneer over
|
|
8335
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
8336
|
+
* per-device setting, the two camera planes to their own components.
|
|
8337
|
+
*
|
|
8338
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
8339
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
8340
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
8341
|
+
* never about a control panel.
|
|
8342
|
+
*
|
|
8343
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
8344
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
8345
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
8346
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
8347
|
+
* stop; nothing new may be built on it.
|
|
8325
8348
|
*
|
|
8326
8349
|
* ## This file adds no state
|
|
8327
8350
|
*
|
|
@@ -8666,14 +8689,21 @@ var RecordingConfigSchema = object({
|
|
|
8666
8689
|
/**
|
|
8667
8690
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8668
8691
|
*
|
|
8669
|
-
* One shape shared by the recorder
|
|
8670
|
-
*
|
|
8671
|
-
*
|
|
8672
|
-
*
|
|
8673
|
-
*
|
|
8674
|
-
|
|
8692
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
8693
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
8694
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
8695
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
8696
|
+
* addon surface.
|
|
8697
|
+
*/
|
|
8698
|
+
/**
|
|
8699
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
8700
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
8701
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
8702
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
8703
|
+
* runs at all.
|
|
8675
8704
|
*/
|
|
8676
8705
|
var RelocateJobStateSchema = _enum([
|
|
8706
|
+
"queued",
|
|
8677
8707
|
"running",
|
|
8678
8708
|
"done",
|
|
8679
8709
|
"failed",
|
|
@@ -8698,19 +8728,109 @@ var RelocateJobSchema = object({
|
|
|
8698
8728
|
finishedAt: number().nullable(),
|
|
8699
8729
|
error: string().nullable()
|
|
8700
8730
|
});
|
|
8731
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
8732
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
8733
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
8701
8734
|
var RelocateFootageInputSchema = object({
|
|
8702
|
-
deviceId: number().optional(),
|
|
8703
8735
|
fromLocationId: string(),
|
|
8704
8736
|
toLocationId: string(),
|
|
8705
8737
|
entities: array(_enum(["segments"])).optional(),
|
|
8738
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
8739
|
+
* pre-orchestration compatibility path. */
|
|
8740
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
8741
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
8742
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
8743
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
8744
|
+
deviceId: number().int().optional(),
|
|
8745
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
8746
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
8747
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
8748
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
8749
|
+
profiles: array(string()).optional(),
|
|
8706
8750
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
8707
8751
|
* never allowed to starve live writers. */
|
|
8708
8752
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
8709
8753
|
});
|
|
8710
|
-
|
|
8711
|
-
|
|
8754
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
8755
|
+
* from persistent recording settings: a migration never changes
|
|
8756
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
8757
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
8758
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
8759
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
8712
8760
|
toLocationId: string(),
|
|
8713
8761
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
8762
|
+
}).extend({ leaseId: string().min(1) });
|
|
8763
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
8764
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
8765
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
8766
|
+
var StorageMigrationClassSchema = _enum([
|
|
8767
|
+
"recordings",
|
|
8768
|
+
"recordingsLow",
|
|
8769
|
+
"eventMedia"
|
|
8770
|
+
]);
|
|
8771
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
8772
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
8773
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
8774
|
+
var StorageMigrationDestinationsSchema = object({
|
|
8775
|
+
recordings: string().min(1).optional(),
|
|
8776
|
+
recordingsLow: string().min(1).optional(),
|
|
8777
|
+
eventMedia: string().min(1).optional()
|
|
8778
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
8779
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
8780
|
+
var StorageMigrationInputSchema = object({
|
|
8781
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
8782
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8783
|
+
});
|
|
8784
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
8785
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
8786
|
+
* verified. */
|
|
8787
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
8788
|
+
"planning",
|
|
8789
|
+
"pausing",
|
|
8790
|
+
"moving",
|
|
8791
|
+
"verifying",
|
|
8792
|
+
"repointing",
|
|
8793
|
+
"refreshing",
|
|
8794
|
+
"resuming",
|
|
8795
|
+
"done",
|
|
8796
|
+
"failed",
|
|
8797
|
+
"cancelled"
|
|
8798
|
+
]);
|
|
8799
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
8800
|
+
"pipeline",
|
|
8801
|
+
"recorder",
|
|
8802
|
+
"analytics"
|
|
8803
|
+
]);
|
|
8804
|
+
var StorageMigrationMoveSchema = object({
|
|
8805
|
+
storageClass: StorageMigrationClassSchema,
|
|
8806
|
+
fromLocationId: string(),
|
|
8807
|
+
toLocationId: string(),
|
|
8808
|
+
moverJobId: string().nullable(),
|
|
8809
|
+
state: RelocateJobStateSchema.nullable(),
|
|
8810
|
+
error: string().nullable()
|
|
8811
|
+
});
|
|
8812
|
+
var StorageMigrationJobSchema = object({
|
|
8813
|
+
jobId: string(),
|
|
8814
|
+
phase: StorageMigrationPhaseSchema,
|
|
8815
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
8816
|
+
throttleMbps: number(),
|
|
8817
|
+
moves: array(StorageMigrationMoveSchema),
|
|
8818
|
+
pauseLeaseId: string().nullable(),
|
|
8819
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
8820
|
+
repointed: boolean(),
|
|
8821
|
+
cancelRequested: boolean(),
|
|
8822
|
+
startedAt: number(),
|
|
8823
|
+
updatedAt: number(),
|
|
8824
|
+
finishedAt: number().nullable(),
|
|
8825
|
+
error: string().nullable()
|
|
8826
|
+
});
|
|
8827
|
+
var StorageMigrationPlanSchema = object({
|
|
8828
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
8829
|
+
moves: array(object({
|
|
8830
|
+
storageClass: StorageMigrationClassSchema,
|
|
8831
|
+
fromLocationId: string(),
|
|
8832
|
+
toLocationId: string()
|
|
8833
|
+
}))
|
|
8714
8834
|
});
|
|
8715
8835
|
/**
|
|
8716
8836
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -8762,6 +8882,21 @@ var StorageLocationSchema = object({
|
|
|
8762
8882
|
nodeId: string().optional(),
|
|
8763
8883
|
isDefault: boolean().default(false),
|
|
8764
8884
|
isSystem: boolean().default(false),
|
|
8885
|
+
/**
|
|
8886
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
8887
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
8888
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
8889
|
+
* location rather than in any one addon's store — nothing has to be
|
|
8890
|
+
* extended to add the next consumer.
|
|
8891
|
+
*
|
|
8892
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
8893
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
8894
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
8895
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
8896
|
+
* disk must not silently start writing to it); the default of a type is
|
|
8897
|
+
* always stamped `true`.
|
|
8898
|
+
*/
|
|
8899
|
+
enabled: boolean().optional(),
|
|
8765
8900
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8766
8901
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8767
8902
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -13331,7 +13466,8 @@ method(object({
|
|
|
13331
13466
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
13332
13467
|
/**
|
|
13333
13468
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13334
|
-
* filesystem
|
|
13469
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13470
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
13335
13471
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
13336
13472
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
13337
13473
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -15172,6 +15308,13 @@ var MaskGridDimsSchema = object({
|
|
|
15172
15308
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
15173
15309
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
15174
15310
|
* one trigger.
|
|
15311
|
+
*
|
|
15312
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
15313
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
15314
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
15315
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
15316
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
15317
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
15175
15318
|
*/
|
|
15176
15319
|
var NcDeliverySchema = _enum([
|
|
15177
15320
|
"immediate",
|
|
@@ -15186,15 +15329,32 @@ var NcDeliverySchema = _enum([
|
|
|
15186
15329
|
* depend on a provider's raw event name or payload shape.
|
|
15187
15330
|
*/
|
|
15188
15331
|
var NcSystemEventKindSchema = _enum([
|
|
15189
|
-
"
|
|
15190
|
-
"
|
|
15332
|
+
"device-online",
|
|
15333
|
+
"device-offline",
|
|
15334
|
+
"device-disabled",
|
|
15335
|
+
"device-enabled",
|
|
15191
15336
|
"stream-online",
|
|
15192
15337
|
"stream-offline",
|
|
15193
15338
|
"node-online",
|
|
15194
15339
|
"node-offline",
|
|
15195
15340
|
"addon-update-available",
|
|
15196
|
-
"server-update-available"
|
|
15341
|
+
"server-update-available",
|
|
15342
|
+
"alarm-triggered",
|
|
15343
|
+
"alarm-armed",
|
|
15344
|
+
"alarm-disarmed",
|
|
15345
|
+
"camera-online",
|
|
15346
|
+
"camera-offline",
|
|
15347
|
+
"camera-disabled",
|
|
15348
|
+
"camera-enabled"
|
|
15349
|
+
]);
|
|
15350
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
15351
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
15352
|
+
"camera-online",
|
|
15353
|
+
"camera-offline",
|
|
15354
|
+
"camera-disabled",
|
|
15355
|
+
"camera-enabled"
|
|
15197
15356
|
]);
|
|
15357
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
15198
15358
|
/**
|
|
15199
15359
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
15200
15360
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -15203,6 +15363,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
15203
15363
|
var NcSystemEventConditionSchema = object({
|
|
15204
15364
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
15205
15365
|
deviceIds: array(number().int()).min(1).optional(),
|
|
15366
|
+
/**
|
|
15367
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
15368
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
15369
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
15370
|
+
*
|
|
15371
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
15372
|
+
* one reason: the intake cannot know which devices this household cares
|
|
15373
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
15374
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
15375
|
+
* does not carry) matches no `deviceTypes` list.
|
|
15376
|
+
*/
|
|
15377
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
15206
15378
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
15207
15379
|
packageNames: array(string().min(1)).min(1).optional()
|
|
15208
15380
|
});
|
|
@@ -15253,6 +15425,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
15253
15425
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
15254
15426
|
});
|
|
15255
15427
|
/**
|
|
15428
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
15429
|
+
*
|
|
15430
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
15431
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
15432
|
+
* they already know): a rule matches when, over a sampling window of
|
|
15433
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
15434
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
15435
|
+
*
|
|
15436
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
15437
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
15438
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
15439
|
+
*
|
|
15440
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
15441
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
15442
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
15443
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
15444
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
15445
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
15446
|
+
* ZodEffects the cap path would have to special-case).
|
|
15447
|
+
*
|
|
15448
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
15449
|
+
* must be FULL before it can match — a window that has been open for two
|
|
15450
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
15451
|
+
* `samplingSeconds` decorative.
|
|
15452
|
+
*
|
|
15453
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
15454
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
15455
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
15456
|
+
* an operator who typed `dog` mean the same thing.
|
|
15457
|
+
*/
|
|
15458
|
+
var NcAudioConditionSchema = object({
|
|
15459
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
15460
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
15461
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
15462
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
15463
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
15464
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
15465
|
+
/** Length of the sampling window in seconds. */
|
|
15466
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
15467
|
+
});
|
|
15468
|
+
/**
|
|
15256
15469
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
15257
15470
|
*
|
|
15258
15471
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -15525,7 +15738,33 @@ var NcConditionsSchema = object({
|
|
|
15525
15738
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
15526
15739
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
15527
15740
|
*/
|
|
15528
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
15741
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
15742
|
+
/**
|
|
15743
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
15744
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
15745
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
15746
|
+
* a window that is not full yet, neither filter given). See
|
|
15747
|
+
* {@link NcAudioCondition}.
|
|
15748
|
+
*
|
|
15749
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
15750
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
15751
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
15752
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
15753
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
15754
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
15755
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
15756
|
+
*
|
|
15757
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
15758
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
15759
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
15760
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
15761
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
15762
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
15763
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
15764
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
15765
|
+
* does an audio rule become authorable.
|
|
15766
|
+
*/
|
|
15767
|
+
audio: NcAudioConditionSchema.optional()
|
|
15529
15768
|
});
|
|
15530
15769
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
15531
15770
|
var NcRuleTargetSchema = object({
|
|
@@ -15639,6 +15878,73 @@ var NcThrottleSchema = object({
|
|
|
15639
15878
|
*/
|
|
15640
15879
|
granularity: NcThrottleGranularitySchema.optional()
|
|
15641
15880
|
});
|
|
15881
|
+
/**
|
|
15882
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
15883
|
+
* it judges may be.
|
|
15884
|
+
*
|
|
15885
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
15886
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
15887
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
15888
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
15889
|
+
* tokens for pixels the model pools away.
|
|
15890
|
+
*/
|
|
15891
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
15892
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
15893
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
15894
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
15895
|
+
var NcConfirmExpectSchema = object({
|
|
15896
|
+
op: _enum([
|
|
15897
|
+
">=",
|
|
15898
|
+
">",
|
|
15899
|
+
"<=",
|
|
15900
|
+
"<",
|
|
15901
|
+
"=="
|
|
15902
|
+
]),
|
|
15903
|
+
count: number().int().min(0).max(1e3)
|
|
15904
|
+
});
|
|
15905
|
+
/**
|
|
15906
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
15907
|
+
* to ship and says whether it agrees with the rule.
|
|
15908
|
+
*
|
|
15909
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
15910
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
15911
|
+
* on the operator's phone is not a verdict about this notification.
|
|
15912
|
+
*
|
|
15913
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
15914
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
15915
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
15916
|
+
* open looks in the log exactly like a gate that works.
|
|
15917
|
+
*
|
|
15918
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
15919
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
15920
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
15921
|
+
* above rather than trusting a parse it may never have seen.
|
|
15922
|
+
*/
|
|
15923
|
+
var NcConfirmSchema = object({
|
|
15924
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
15925
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
15926
|
+
enabled: boolean().default(false),
|
|
15927
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
15928
|
+
profileId: string().optional(),
|
|
15929
|
+
/**
|
|
15930
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
15931
|
+
* from the rule (its class and its expectation).
|
|
15932
|
+
*
|
|
15933
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
15934
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
15935
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
15936
|
+
* turn and only rule-authored words land here.
|
|
15937
|
+
*/
|
|
15938
|
+
prompt: string().max(1e3).optional(),
|
|
15939
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
15940
|
+
* own boolean verdict decides. */
|
|
15941
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
15942
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
15943
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
15944
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
15945
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
15946
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
15947
|
+
});
|
|
15642
15948
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
15643
15949
|
var NcRuleInputSchema = object({
|
|
15644
15950
|
name: string().min(1).max(200),
|
|
@@ -15699,7 +16005,13 @@ var NcRuleInputSchema = object({
|
|
|
15699
16005
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
15700
16006
|
* shape as every other actuation.
|
|
15701
16007
|
*/
|
|
15702
|
-
actions: NcRuleActionsSchema.optional()
|
|
16008
|
+
actions: NcRuleActionsSchema.optional(),
|
|
16009
|
+
/**
|
|
16010
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
16011
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
16012
|
+
* did, and absent is the only way to say that without a migration.
|
|
16013
|
+
*/
|
|
16014
|
+
confirm: NcConfirmSchema.optional()
|
|
15703
16015
|
});
|
|
15704
16016
|
/**
|
|
15705
16017
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -15710,7 +16022,37 @@ var NcRuleInputSchema = object({
|
|
|
15710
16022
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
15711
16023
|
* `updateRule` patch.
|
|
15712
16024
|
*/
|
|
15713
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
16025
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
16026
|
+
disabledTargetIds: array(string()).optional(),
|
|
16027
|
+
/**
|
|
16028
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
16029
|
+
*
|
|
16030
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
16031
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
16032
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
16033
|
+
* one — which made every partial edit destructive:
|
|
16034
|
+
*
|
|
16035
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
16036
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
16037
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
16038
|
+
*
|
|
16039
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
16040
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
16041
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
16042
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
16043
|
+
* within a minute of a two-field patch.
|
|
16044
|
+
*
|
|
16045
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
16046
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
16047
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
16048
|
+
* absent key is now genuinely absent.
|
|
16049
|
+
*/
|
|
16050
|
+
enabled: boolean().optional(),
|
|
16051
|
+
conditions: NcConditionsSchema.optional(),
|
|
16052
|
+
media: NcMediaPolicySchema.optional(),
|
|
16053
|
+
throttle: NcThrottleSchema.optional(),
|
|
16054
|
+
priority: number().int().min(1).max(5).optional()
|
|
16055
|
+
});
|
|
15714
16056
|
/** A persisted rule. */
|
|
15715
16057
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
15716
16058
|
id: string(),
|
|
@@ -16011,6 +16353,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
16011
16353
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
16012
16354
|
* copy would lie the first time a rule is disabled.
|
|
16013
16355
|
*/
|
|
16356
|
+
/**
|
|
16357
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
16358
|
+
*
|
|
16359
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
16360
|
+
* per-camera notification switch the Notification Center already owns,
|
|
16361
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
16362
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
16363
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
16364
|
+
* with the switches the operator actually used.
|
|
16365
|
+
*/
|
|
16366
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
16367
|
+
"muted",
|
|
16368
|
+
"detection-off",
|
|
16369
|
+
"offline"
|
|
16370
|
+
]);
|
|
16371
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
16372
|
+
deviceId: number().int(),
|
|
16373
|
+
reason: NcAlarmSkipReasonSchema
|
|
16374
|
+
});
|
|
16014
16375
|
var NcAlarmModeCoverageSchema = object({
|
|
16015
16376
|
mode: AlarmArmModeSchema,
|
|
16016
16377
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -16018,7 +16379,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
16018
16379
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
16019
16380
|
allDevices: boolean(),
|
|
16020
16381
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
16021
|
-
deviceIds: array(number().int())
|
|
16382
|
+
deviceIds: array(number().int()),
|
|
16383
|
+
/**
|
|
16384
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
16385
|
+
* excludes it.
|
|
16386
|
+
*
|
|
16387
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
16388
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
16389
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
16390
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
16391
|
+
* alarm tab.
|
|
16392
|
+
*/
|
|
16393
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
16022
16394
|
});
|
|
16023
16395
|
var NcAlarmConfigSchema = object({
|
|
16024
16396
|
/**
|
|
@@ -17381,13 +17753,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17381
17753
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
17382
17754
|
kind: "mutation",
|
|
17383
17755
|
auth: "admin"
|
|
17384
|
-
}), method(
|
|
17756
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17385
17757
|
kind: "mutation",
|
|
17386
17758
|
auth: "admin"
|
|
17387
|
-
}), method(object({
|
|
17388
|
-
kind: "
|
|
17759
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17760
|
+
kind: "mutation",
|
|
17389
17761
|
auth: "admin"
|
|
17390
|
-
}), method(
|
|
17762
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
17763
|
+
kind: "mutation",
|
|
17764
|
+
auth: "admin"
|
|
17765
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
17766
|
+
kind: "mutation",
|
|
17767
|
+
auth: "admin"
|
|
17768
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
17391
17769
|
kind: "mutation",
|
|
17392
17770
|
auth: "admin"
|
|
17393
17771
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -18844,9 +19222,16 @@ var CameraStatusSchema = object({
|
|
|
18844
19222
|
audio: CameraAudioStatusSchema.nullable(),
|
|
18845
19223
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
18846
19224
|
/**
|
|
18847
|
-
* Per-camera
|
|
19225
|
+
* Per-camera functions an OPERATOR has turned off
|
|
18848
19226
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
18849
19227
|
*
|
|
19228
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
19229
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
19230
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
19231
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
19232
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
19233
|
+
* the difference between a camera being off and a camera being dead.
|
|
19234
|
+
*
|
|
18850
19235
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
18851
19236
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
18852
19237
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -18917,7 +19302,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
18917
19302
|
reachable: boolean(),
|
|
18918
19303
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
18919
19304
|
});
|
|
18920
|
-
method(object({
|
|
19305
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
19306
|
+
kind: "mutation",
|
|
19307
|
+
auth: "admin"
|
|
19308
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
19309
|
+
kind: "mutation",
|
|
19310
|
+
auth: "admin"
|
|
19311
|
+
}), method(object({
|
|
18921
19312
|
deviceId: number(),
|
|
18922
19313
|
agentNodeId: string()
|
|
18923
19314
|
}), object({ success: literal(true) }), {
|
|
@@ -19591,6 +19982,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
19591
19982
|
locationId: string(),
|
|
19592
19983
|
targetBytes: number().int().positive()
|
|
19593
19984
|
}), EvictResultSchema, { kind: "mutation" });
|
|
19985
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
19986
|
+
kind: "mutation",
|
|
19987
|
+
auth: "admin"
|
|
19988
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
19989
|
+
kind: "mutation",
|
|
19990
|
+
auth: "admin"
|
|
19991
|
+
});
|
|
19594
19992
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
19595
19993
|
providerId: string().min(1),
|
|
19596
19994
|
displayName: string().min(1),
|
|
@@ -19694,6 +20092,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
19694
20092
|
label: string(),
|
|
19695
20093
|
description: string().optional()
|
|
19696
20094
|
});
|
|
20095
|
+
/**
|
|
20096
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
20097
|
+
* an instance declares a camera.
|
|
20098
|
+
*/
|
|
20099
|
+
var TerminalInstanceInfoSchema = object({
|
|
20100
|
+
instanceId: string(),
|
|
20101
|
+
cameraStableId: string(),
|
|
20102
|
+
nodeId: string(),
|
|
20103
|
+
profileId: string(),
|
|
20104
|
+
profileLabel: string(),
|
|
20105
|
+
name: string(),
|
|
20106
|
+
enabled: boolean()
|
|
20107
|
+
});
|
|
20108
|
+
var TerminalLegacyCameraSchema = object({
|
|
20109
|
+
stableId: string(),
|
|
20110
|
+
nodeId: string(),
|
|
20111
|
+
profileId: string(),
|
|
20112
|
+
profileLabel: string(),
|
|
20113
|
+
name: string(),
|
|
20114
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
20115
|
+
adoptable: boolean()
|
|
20116
|
+
});
|
|
19697
20117
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
19698
20118
|
seq: number().int().positive(),
|
|
19699
20119
|
kind: literal("data"),
|
|
@@ -19710,7 +20130,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
19710
20130
|
snapshot: string().optional(),
|
|
19711
20131
|
events: array(TerminalOutputEventSchema).readonly()
|
|
19712
20132
|
});
|
|
19713
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
20133
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
20134
|
+
targetNodeId: string().min(1),
|
|
20135
|
+
profileId: string().min(1),
|
|
20136
|
+
name: string().trim().min(1).max(160).optional()
|
|
20137
|
+
}), TerminalInstanceInfoSchema, {
|
|
20138
|
+
kind: "mutation",
|
|
20139
|
+
auth: "admin"
|
|
20140
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
20141
|
+
kind: "mutation",
|
|
20142
|
+
auth: "admin"
|
|
20143
|
+
}), method(object({
|
|
20144
|
+
instanceId: string().min(1),
|
|
20145
|
+
enabled: boolean()
|
|
20146
|
+
}), TerminalInstanceInfoSchema, {
|
|
20147
|
+
kind: "mutation",
|
|
20148
|
+
auth: "admin"
|
|
20149
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
20150
|
+
stableId: string().min(1),
|
|
20151
|
+
name: string().trim().min(1).max(160).optional()
|
|
20152
|
+
}), TerminalInstanceInfoSchema, {
|
|
20153
|
+
kind: "mutation",
|
|
20154
|
+
auth: "admin"
|
|
20155
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19714
20156
|
profileId: string(),
|
|
19715
20157
|
cols: number().int().positive(),
|
|
19716
20158
|
rows: number().int().positive()
|
|
@@ -19727,7 +20169,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
19727
20169
|
}), method(object({
|
|
19728
20170
|
sessionId: string(),
|
|
19729
20171
|
afterSeq: number().int().nonnegative(),
|
|
19730
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
20172
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
20173
|
+
/**
|
|
20174
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
20175
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
20176
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
20177
|
+
*/
|
|
20178
|
+
waitForOutput: boolean().optional()
|
|
19731
20179
|
}), TerminalOutputBatchSchema, {
|
|
19732
20180
|
kind: "mutation",
|
|
19733
20181
|
auth: "admin",
|
|
@@ -22233,6 +22681,7 @@ var FaceInfoSchema = object({
|
|
|
22233
22681
|
var FaceFilterEnum = _enum([
|
|
22234
22682
|
"unassigned",
|
|
22235
22683
|
"recognized",
|
|
22684
|
+
"identified",
|
|
22236
22685
|
"all"
|
|
22237
22686
|
]);
|
|
22238
22687
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -22261,6 +22710,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
22261
22710
|
kind: "mutation",
|
|
22262
22711
|
auth: "admin"
|
|
22263
22712
|
}), method(object({
|
|
22713
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
22714
|
+
deviceId: number().int().optional(),
|
|
22264
22715
|
limit: number().int().positive().optional(),
|
|
22265
22716
|
filter: FaceFilterEnum.optional(),
|
|
22266
22717
|
/**
|
|
@@ -24490,6 +24941,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
24490
24941
|
capName: string().min(1).max(64),
|
|
24491
24942
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
24492
24943
|
valuePath: string().min(1).max(64)
|
|
24944
|
+
}),
|
|
24945
|
+
object({
|
|
24946
|
+
kind: literal("latest-recognition"),
|
|
24947
|
+
recognition: _enum(["person", "plate"])
|
|
24493
24948
|
})
|
|
24494
24949
|
]);
|
|
24495
24950
|
var OsdSlotBindingSchema = object({
|
|
@@ -24595,6 +25050,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
24595
25050
|
}), object({ success: literal(true) }), {
|
|
24596
25051
|
kind: "mutation",
|
|
24597
25052
|
auth: "admin"
|
|
25053
|
+
}), method(object({
|
|
25054
|
+
sourceDeviceId: number().int(),
|
|
25055
|
+
targetDeviceId: number().int()
|
|
25056
|
+
}), object({
|
|
25057
|
+
copied: number().int().nonnegative(),
|
|
25058
|
+
skipped: number().int().nonnegative()
|
|
25059
|
+
}), {
|
|
25060
|
+
kind: "mutation",
|
|
25061
|
+
auth: "admin"
|
|
24598
25062
|
}), method(object({
|
|
24599
25063
|
deviceId: number().int(),
|
|
24600
25064
|
slotId: string().min(1),
|
|
@@ -25517,7 +25981,19 @@ var RecordingManifestSchema = object({
|
|
|
25517
25981
|
* profiles/subtrees/locations on this node). */
|
|
25518
25982
|
var RecordingDeviceUsageSchema = object({
|
|
25519
25983
|
deviceId: number(),
|
|
25520
|
-
usedBytes: number()
|
|
25984
|
+
usedBytes: number(),
|
|
25985
|
+
/**
|
|
25986
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25987
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25988
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25989
|
+
*
|
|
25990
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25991
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25992
|
+
* field must keep validating that older provider's payload: the framework
|
|
25993
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25994
|
+
* the later of the two.
|
|
25995
|
+
*/
|
|
25996
|
+
oldestMs: number().nullable().optional()
|
|
25521
25997
|
});
|
|
25522
25998
|
/** Recording storage usage + capacity for one storage location. */
|
|
25523
25999
|
var RecordingLocationUsageSchema = object({
|
|
@@ -25545,6 +26021,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
25545
26021
|
locations: array(RecordingLocationUsageSchema)
|
|
25546
26022
|
});
|
|
25547
26023
|
/**
|
|
26024
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
26025
|
+
*
|
|
26026
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
26027
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
26028
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
26029
|
+
* location, run FIFO behind the single-flight mover.
|
|
26030
|
+
*
|
|
26031
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
26032
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
26033
|
+
* (empty on the plan).
|
|
26034
|
+
*/
|
|
26035
|
+
var RecordingRebalanceMoveSchema = object({
|
|
26036
|
+
deviceId: number(),
|
|
26037
|
+
profile: string(),
|
|
26038
|
+
fromLocationId: string(),
|
|
26039
|
+
toLocationId: string(),
|
|
26040
|
+
bytes: number(),
|
|
26041
|
+
files: number().int()
|
|
26042
|
+
});
|
|
26043
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
26044
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
26045
|
+
* that had nothing to do. */
|
|
26046
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
26047
|
+
"unassigned",
|
|
26048
|
+
"target-not-writable",
|
|
26049
|
+
"below-threshold",
|
|
26050
|
+
"no-headroom"
|
|
26051
|
+
]);
|
|
26052
|
+
var RecordingRebalanceSkipSchema = object({
|
|
26053
|
+
deviceId: number(),
|
|
26054
|
+
profile: string(),
|
|
26055
|
+
fromLocationId: string(),
|
|
26056
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
26057
|
+
toLocationId: string().nullable(),
|
|
26058
|
+
bytes: number(),
|
|
26059
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
26060
|
+
});
|
|
26061
|
+
var RecordingRebalancePlanSchema = object({
|
|
26062
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
26063
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
26064
|
+
bytesToMove: number(),
|
|
26065
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
26066
|
+
jobIds: array(string())
|
|
26067
|
+
});
|
|
26068
|
+
var RecordingRebalanceInputSchema = object({
|
|
26069
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
26070
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
26071
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
26072
|
+
minMoveGb: number().min(0).optional()
|
|
26073
|
+
});
|
|
26074
|
+
/**
|
|
25548
26075
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
25549
26076
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
25550
26077
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -25692,6 +26219,21 @@ method(object({
|
|
|
25692
26219
|
}), {
|
|
25693
26220
|
kind: "mutation",
|
|
25694
26221
|
auth: "admin"
|
|
26222
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
26223
|
+
kind: "mutation",
|
|
26224
|
+
auth: "admin"
|
|
26225
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
26226
|
+
kind: "mutation",
|
|
26227
|
+
auth: "admin"
|
|
26228
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
26229
|
+
kind: "mutation",
|
|
26230
|
+
auth: "admin"
|
|
26231
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
26232
|
+
kind: "mutation",
|
|
26233
|
+
auth: "admin"
|
|
26234
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26235
|
+
kind: "mutation",
|
|
26236
|
+
auth: "admin"
|
|
25695
26237
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
25696
26238
|
kind: "mutation",
|
|
25697
26239
|
auth: "admin"
|
|
@@ -25701,9 +26243,15 @@ method(object({
|
|
|
25701
26243
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25702
26244
|
kind: "mutation",
|
|
25703
26245
|
auth: "admin"
|
|
26246
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
26247
|
+
kind: "query",
|
|
26248
|
+
auth: "admin"
|
|
26249
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
26250
|
+
kind: "mutation",
|
|
26251
|
+
auth: "admin"
|
|
25704
26252
|
});
|
|
25705
26253
|
/**
|
|
25706
|
-
* `
|
|
26254
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
25707
26255
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
25708
26256
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
25709
26257
|
* delete-after-download.
|
|
@@ -25718,10 +26266,42 @@ method(object({
|
|
|
25718
26266
|
*/
|
|
25719
26267
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25720
26268
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
26269
|
+
/**
|
|
26270
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
26271
|
+
*
|
|
26272
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
26273
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
26274
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
26275
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
26276
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
26277
|
+
*/
|
|
26278
|
+
var ExportDenseRangeSchema = object({
|
|
26279
|
+
fromSec: number().nonnegative(),
|
|
26280
|
+
toSec: number().nonnegative()
|
|
26281
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
26282
|
+
/**
|
|
26283
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
26284
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
26285
|
+
*
|
|
26286
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
26287
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
26288
|
+
*/
|
|
26289
|
+
var ExportDenseSchema = object({
|
|
26290
|
+
everyMs: number().int().positive(),
|
|
26291
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
26292
|
+
});
|
|
25721
26293
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
25722
26294
|
var ExportTimelapseSchema = object({
|
|
25723
26295
|
everyMs: number().int().positive(),
|
|
25724
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
26296
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
26297
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
26298
|
+
dense: ExportDenseSchema.optional()
|
|
26299
|
+
}).superRefine((v, ctx) => {
|
|
26300
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
26301
|
+
code: ZodIssueCode.custom,
|
|
26302
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
26303
|
+
path: ["dense", "everyMs"]
|
|
26304
|
+
});
|
|
25725
26305
|
});
|
|
25726
26306
|
/**
|
|
25727
26307
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -25779,6 +26359,19 @@ var ExportDownloadSchema = object({
|
|
|
25779
26359
|
url: string(),
|
|
25780
26360
|
endpoints: array(string())
|
|
25781
26361
|
});
|
|
26362
|
+
/**
|
|
26363
|
+
* A finished export's bytes, inline.
|
|
26364
|
+
*
|
|
26365
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
26366
|
+
* against, so nobody has to infer it from the base64 length.
|
|
26367
|
+
*/
|
|
26368
|
+
var ExportBytesSchema = object({
|
|
26369
|
+
base64: string(),
|
|
26370
|
+
contentType: string(),
|
|
26371
|
+
/** Suggested filename, extension included. */
|
|
26372
|
+
name: string(),
|
|
26373
|
+
bytes: number().int().nonnegative()
|
|
26374
|
+
});
|
|
25782
26375
|
method(object({
|
|
25783
26376
|
deviceId: number(),
|
|
25784
26377
|
profile: string(),
|
|
@@ -25803,6 +26396,9 @@ method(object({
|
|
|
25803
26396
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
25804
26397
|
kind: "query",
|
|
25805
26398
|
auth: "protected"
|
|
26399
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
26400
|
+
kind: "query",
|
|
26401
|
+
auth: "protected"
|
|
25806
26402
|
});
|
|
25807
26403
|
/**
|
|
25808
26404
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -31304,6 +31900,12 @@ Object.freeze({
|
|
|
31304
31900
|
addonId: null,
|
|
31305
31901
|
access: "delete"
|
|
31306
31902
|
},
|
|
31903
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31904
|
+
capName: "osd-manager",
|
|
31905
|
+
capScope: "system",
|
|
31906
|
+
addonId: null,
|
|
31907
|
+
access: "create"
|
|
31908
|
+
},
|
|
31307
31909
|
"osdManager.getConditionSupport": {
|
|
31308
31910
|
capName: "osd-manager",
|
|
31309
31911
|
capScope: "system",
|
|
@@ -31400,7 +32002,7 @@ Object.freeze({
|
|
|
31400
32002
|
addonId: null,
|
|
31401
32003
|
access: "create"
|
|
31402
32004
|
},
|
|
31403
|
-
"pipelineAnalytics.
|
|
32005
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
31404
32006
|
capName: "pipeline-analytics",
|
|
31405
32007
|
capScope: "device",
|
|
31406
32008
|
addonId: null,
|
|
@@ -31472,12 +32074,6 @@ Object.freeze({
|
|
|
31472
32074
|
addonId: null,
|
|
31473
32075
|
access: "view"
|
|
31474
32076
|
},
|
|
31475
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
31476
|
-
capName: "pipeline-analytics",
|
|
31477
|
-
capScope: "device",
|
|
31478
|
-
addonId: null,
|
|
31479
|
-
access: "view"
|
|
31480
|
-
},
|
|
31481
32077
|
"pipelineAnalytics.getMotionEvents": {
|
|
31482
32078
|
capName: "pipeline-analytics",
|
|
31483
32079
|
capScope: "device",
|
|
@@ -31514,6 +32110,12 @@ Object.freeze({
|
|
|
31514
32110
|
addonId: null,
|
|
31515
32111
|
access: "view"
|
|
31516
32112
|
},
|
|
32113
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
32114
|
+
capName: "pipeline-analytics",
|
|
32115
|
+
capScope: "device",
|
|
32116
|
+
addonId: null,
|
|
32117
|
+
access: "view"
|
|
32118
|
+
},
|
|
31517
32119
|
"pipelineAnalytics.getTrack": {
|
|
31518
32120
|
capName: "pipeline-analytics",
|
|
31519
32121
|
capScope: "device",
|
|
@@ -31592,6 +32194,12 @@ Object.freeze({
|
|
|
31592
32194
|
addonId: null,
|
|
31593
32195
|
access: "view"
|
|
31594
32196
|
},
|
|
32197
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
32198
|
+
capName: "pipeline-analytics",
|
|
32199
|
+
capScope: "device",
|
|
32200
|
+
addonId: null,
|
|
32201
|
+
access: "create"
|
|
32202
|
+
},
|
|
31595
32203
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
31596
32204
|
capName: "pipeline-analytics",
|
|
31597
32205
|
capScope: "device",
|
|
@@ -31622,7 +32230,7 @@ Object.freeze({
|
|
|
31622
32230
|
addonId: null,
|
|
31623
32231
|
access: "create"
|
|
31624
32232
|
},
|
|
31625
|
-
"pipelineAnalytics.
|
|
32233
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
31626
32234
|
capName: "pipeline-analytics",
|
|
31627
32235
|
capScope: "device",
|
|
31628
32236
|
addonId: null,
|
|
@@ -31634,6 +32242,12 @@ Object.freeze({
|
|
|
31634
32242
|
addonId: null,
|
|
31635
32243
|
access: "create"
|
|
31636
32244
|
},
|
|
32245
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
32246
|
+
capName: "pipeline-analytics",
|
|
32247
|
+
capScope: "device",
|
|
32248
|
+
addonId: null,
|
|
32249
|
+
access: "create"
|
|
32250
|
+
},
|
|
31637
32251
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
31638
32252
|
capName: "pipeline-analytics",
|
|
31639
32253
|
capScope: "device",
|
|
@@ -31658,6 +32272,12 @@ Object.freeze({
|
|
|
31658
32272
|
addonId: null,
|
|
31659
32273
|
access: "create"
|
|
31660
32274
|
},
|
|
32275
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
32276
|
+
capName: "pipeline-analytics",
|
|
32277
|
+
capScope: "device",
|
|
32278
|
+
addonId: null,
|
|
32279
|
+
access: "create"
|
|
32280
|
+
},
|
|
31661
32281
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
31662
32282
|
capName: "pipeline-analytics",
|
|
31663
32283
|
capScope: "device",
|
|
@@ -32024,6 +32644,12 @@ Object.freeze({
|
|
|
32024
32644
|
addonId: null,
|
|
32025
32645
|
access: "view"
|
|
32026
32646
|
},
|
|
32647
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
32648
|
+
capName: "pipeline-orchestrator",
|
|
32649
|
+
capScope: "system",
|
|
32650
|
+
addonId: null,
|
|
32651
|
+
access: "create"
|
|
32652
|
+
},
|
|
32027
32653
|
"pipelineOrchestrator.rebalance": {
|
|
32028
32654
|
capName: "pipeline-orchestrator",
|
|
32029
32655
|
capScope: "system",
|
|
@@ -32048,6 +32674,12 @@ Object.freeze({
|
|
|
32048
32674
|
addonId: null,
|
|
32049
32675
|
access: "view"
|
|
32050
32676
|
},
|
|
32677
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
32678
|
+
capName: "pipeline-orchestrator",
|
|
32679
|
+
capScope: "system",
|
|
32680
|
+
addonId: null,
|
|
32681
|
+
access: "create"
|
|
32682
|
+
},
|
|
32051
32683
|
"pipelineOrchestrator.saveTemplate": {
|
|
32052
32684
|
capName: "pipeline-orchestrator",
|
|
32053
32685
|
capScope: "system",
|
|
@@ -32444,7 +33076,13 @@ Object.freeze({
|
|
|
32444
33076
|
addonId: null,
|
|
32445
33077
|
access: "create"
|
|
32446
33078
|
},
|
|
32447
|
-
"recording.
|
|
33079
|
+
"recording.cancelRelocateJob": {
|
|
33080
|
+
capName: "recording",
|
|
33081
|
+
capScope: "system",
|
|
33082
|
+
addonId: null,
|
|
33083
|
+
access: "create"
|
|
33084
|
+
},
|
|
33085
|
+
"recording.cancelStorageMigrationMove": {
|
|
32448
33086
|
capName: "recording",
|
|
32449
33087
|
capScope: "system",
|
|
32450
33088
|
addonId: null,
|
|
@@ -32480,7 +33118,7 @@ Object.freeze({
|
|
|
32480
33118
|
addonId: null,
|
|
32481
33119
|
access: "view"
|
|
32482
33120
|
},
|
|
32483
|
-
"recording.
|
|
33121
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
32484
33122
|
capName: "recording",
|
|
32485
33123
|
capScope: "system",
|
|
32486
33124
|
addonId: null,
|
|
@@ -32498,12 +33136,30 @@ Object.freeze({
|
|
|
32498
33136
|
addonId: null,
|
|
32499
33137
|
access: "view"
|
|
32500
33138
|
},
|
|
33139
|
+
"recording.listRelocateJobs": {
|
|
33140
|
+
capName: "recording",
|
|
33141
|
+
capScope: "system",
|
|
33142
|
+
addonId: null,
|
|
33143
|
+
access: "view"
|
|
33144
|
+
},
|
|
32501
33145
|
"recording.locateSegment": {
|
|
32502
33146
|
capName: "recording",
|
|
32503
33147
|
capScope: "system",
|
|
32504
33148
|
addonId: null,
|
|
32505
33149
|
access: "view"
|
|
32506
33150
|
},
|
|
33151
|
+
"recording.pauseForStorageMigration": {
|
|
33152
|
+
capName: "recording",
|
|
33153
|
+
capScope: "system",
|
|
33154
|
+
addonId: null,
|
|
33155
|
+
access: "create"
|
|
33156
|
+
},
|
|
33157
|
+
"recording.planStorageRebalance": {
|
|
33158
|
+
capName: "recording",
|
|
33159
|
+
capScope: "system",
|
|
33160
|
+
addonId: null,
|
|
33161
|
+
access: "view"
|
|
33162
|
+
},
|
|
32507
33163
|
"recording.pruneFootage": {
|
|
32508
33164
|
capName: "recording",
|
|
32509
33165
|
capScope: "system",
|
|
@@ -32522,6 +33178,12 @@ Object.freeze({
|
|
|
32522
33178
|
addonId: null,
|
|
32523
33179
|
access: "view"
|
|
32524
33180
|
},
|
|
33181
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
33182
|
+
capName: "recording",
|
|
33183
|
+
capScope: "system",
|
|
33184
|
+
addonId: null,
|
|
33185
|
+
access: "create"
|
|
33186
|
+
},
|
|
32525
33187
|
"recording.relocateFootage": {
|
|
32526
33188
|
capName: "recording",
|
|
32527
33189
|
capScope: "system",
|
|
@@ -32546,44 +33208,68 @@ Object.freeze({
|
|
|
32546
33208
|
addonId: null,
|
|
32547
33209
|
access: "create"
|
|
32548
33210
|
},
|
|
33211
|
+
"recording.resumeForStorageMigration": {
|
|
33212
|
+
capName: "recording",
|
|
33213
|
+
capScope: "system",
|
|
33214
|
+
addonId: null,
|
|
33215
|
+
access: "create"
|
|
33216
|
+
},
|
|
32549
33217
|
"recording.setDeviceConfig": {
|
|
32550
33218
|
capName: "recording",
|
|
32551
33219
|
capScope: "system",
|
|
32552
33220
|
addonId: null,
|
|
32553
33221
|
access: "create"
|
|
32554
33222
|
},
|
|
33223
|
+
"recording.startStorageMigrationMove": {
|
|
33224
|
+
capName: "recording",
|
|
33225
|
+
capScope: "system",
|
|
33226
|
+
addonId: null,
|
|
33227
|
+
access: "create"
|
|
33228
|
+
},
|
|
33229
|
+
"recording.startStorageRebalance": {
|
|
33230
|
+
capName: "recording",
|
|
33231
|
+
capScope: "system",
|
|
33232
|
+
addonId: null,
|
|
33233
|
+
access: "create"
|
|
33234
|
+
},
|
|
32555
33235
|
"recordingExport.cancelExport": {
|
|
32556
|
-
capName: "
|
|
33236
|
+
capName: "recording-export",
|
|
32557
33237
|
capScope: "system",
|
|
32558
33238
|
addonId: null,
|
|
32559
33239
|
access: "create"
|
|
32560
33240
|
},
|
|
32561
33241
|
"recordingExport.createExport": {
|
|
32562
|
-
capName: "
|
|
33242
|
+
capName: "recording-export",
|
|
32563
33243
|
capScope: "system",
|
|
32564
33244
|
addonId: null,
|
|
32565
33245
|
access: "create"
|
|
32566
33246
|
},
|
|
32567
33247
|
"recordingExport.deleteExport": {
|
|
32568
|
-
capName: "
|
|
33248
|
+
capName: "recording-export",
|
|
32569
33249
|
capScope: "system",
|
|
32570
33250
|
addonId: null,
|
|
32571
33251
|
access: "delete"
|
|
32572
33252
|
},
|
|
32573
33253
|
"recordingExport.getDownloadUrl": {
|
|
32574
|
-
capName: "
|
|
33254
|
+
capName: "recording-export",
|
|
32575
33255
|
capScope: "system",
|
|
32576
33256
|
addonId: null,
|
|
32577
33257
|
access: "view"
|
|
32578
33258
|
},
|
|
32579
33259
|
"recordingExport.getExport": {
|
|
32580
|
-
capName: "
|
|
33260
|
+
capName: "recording-export",
|
|
32581
33261
|
capScope: "system",
|
|
32582
33262
|
addonId: null,
|
|
32583
33263
|
access: "view"
|
|
32584
33264
|
},
|
|
32585
33265
|
"recordingExport.listExports": {
|
|
32586
|
-
capName: "
|
|
33266
|
+
capName: "recording-export",
|
|
33267
|
+
capScope: "system",
|
|
33268
|
+
addonId: null,
|
|
33269
|
+
access: "view"
|
|
33270
|
+
},
|
|
33271
|
+
"recordingExport.readExportBytes": {
|
|
33272
|
+
capName: "recording-export",
|
|
32587
33273
|
capScope: "system",
|
|
32588
33274
|
addonId: null,
|
|
32589
33275
|
access: "view"
|
|
@@ -32942,6 +33628,30 @@ Object.freeze({
|
|
|
32942
33628
|
addonId: null,
|
|
32943
33629
|
access: "view"
|
|
32944
33630
|
},
|
|
33631
|
+
"storageMigration.cancel": {
|
|
33632
|
+
capName: "storage-migration",
|
|
33633
|
+
capScope: "system",
|
|
33634
|
+
addonId: null,
|
|
33635
|
+
access: "create"
|
|
33636
|
+
},
|
|
33637
|
+
"storageMigration.plan": {
|
|
33638
|
+
capName: "storage-migration",
|
|
33639
|
+
capScope: "system",
|
|
33640
|
+
addonId: null,
|
|
33641
|
+
access: "view"
|
|
33642
|
+
},
|
|
33643
|
+
"storageMigration.start": {
|
|
33644
|
+
capName: "storage-migration",
|
|
33645
|
+
capScope: "system",
|
|
33646
|
+
addonId: null,
|
|
33647
|
+
access: "create"
|
|
33648
|
+
},
|
|
33649
|
+
"storageMigration.status": {
|
|
33650
|
+
capName: "storage-migration",
|
|
33651
|
+
capScope: "system",
|
|
33652
|
+
addonId: null,
|
|
33653
|
+
access: "view"
|
|
33654
|
+
},
|
|
32945
33655
|
"storageProvider.abortUpload": {
|
|
32946
33656
|
capName: "storage-provider",
|
|
32947
33657
|
capScope: "system",
|
|
@@ -33320,12 +34030,42 @@ Object.freeze({
|
|
|
33320
34030
|
addonId: null,
|
|
33321
34031
|
access: "create"
|
|
33322
34032
|
},
|
|
34033
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
34034
|
+
capName: "terminal-session",
|
|
34035
|
+
capScope: "system",
|
|
34036
|
+
addonId: null,
|
|
34037
|
+
access: "create"
|
|
34038
|
+
},
|
|
33323
34039
|
"terminalSession.close": {
|
|
33324
34040
|
capName: "terminal-session",
|
|
33325
34041
|
capScope: "system",
|
|
33326
34042
|
addonId: null,
|
|
33327
34043
|
access: "create"
|
|
33328
34044
|
},
|
|
34045
|
+
"terminalSession.createInstance": {
|
|
34046
|
+
capName: "terminal-session",
|
|
34047
|
+
capScope: "system",
|
|
34048
|
+
addonId: null,
|
|
34049
|
+
access: "create"
|
|
34050
|
+
},
|
|
34051
|
+
"terminalSession.deleteInstance": {
|
|
34052
|
+
capName: "terminal-session",
|
|
34053
|
+
capScope: "system",
|
|
34054
|
+
addonId: null,
|
|
34055
|
+
access: "delete"
|
|
34056
|
+
},
|
|
34057
|
+
"terminalSession.listInstances": {
|
|
34058
|
+
capName: "terminal-session",
|
|
34059
|
+
capScope: "system",
|
|
34060
|
+
addonId: null,
|
|
34061
|
+
access: "view"
|
|
34062
|
+
},
|
|
34063
|
+
"terminalSession.listLegacyCameras": {
|
|
34064
|
+
capName: "terminal-session",
|
|
34065
|
+
capScope: "system",
|
|
34066
|
+
addonId: null,
|
|
34067
|
+
access: "view"
|
|
34068
|
+
},
|
|
33329
34069
|
"terminalSession.listProfiles": {
|
|
33330
34070
|
capName: "terminal-session",
|
|
33331
34071
|
capScope: "system",
|
|
@@ -33356,6 +34096,12 @@ Object.freeze({
|
|
|
33356
34096
|
addonId: null,
|
|
33357
34097
|
access: "create"
|
|
33358
34098
|
},
|
|
34099
|
+
"terminalSession.setInstanceEnabled": {
|
|
34100
|
+
capName: "terminal-session",
|
|
34101
|
+
capScope: "system",
|
|
34102
|
+
addonId: null,
|
|
34103
|
+
access: "create"
|
|
34104
|
+
},
|
|
33359
34105
|
"terminalSession.writeInput": {
|
|
33360
34106
|
capName: "terminal-session",
|
|
33361
34107
|
capScope: "system",
|
|
@@ -33900,6 +34646,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33900
34646
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33901
34647
|
var PriorityField = number().int().min(1).max(5);
|
|
33902
34648
|
/**
|
|
34649
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
34650
|
+
*
|
|
34651
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
34652
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
34653
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
34654
|
+
*
|
|
34655
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
34656
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
34657
|
+
*
|
|
34658
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
34659
|
+
*
|
|
34660
|
+
* 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.
|
|
34661
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
34662
|
+
* and therefore the length of a quiet night, does not move.
|
|
34663
|
+
*
|
|
34664
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
34665
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
34666
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
34667
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
34668
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
34669
|
+
*/
|
|
34670
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
34671
|
+
/**
|
|
34672
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
34673
|
+
*
|
|
34674
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
34675
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
34676
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
34677
|
+
* that range every ~583 ms.
|
|
34678
|
+
*
|
|
34679
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
34680
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
34681
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
34682
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
34683
|
+
* schema change and are the tracked follow-up.
|
|
34684
|
+
*
|
|
34685
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
34686
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
34687
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
34688
|
+
* happened.
|
|
34689
|
+
*/
|
|
34690
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
34691
|
+
/**
|
|
34692
|
+
* Caption burned into the notification's preview frame.
|
|
34693
|
+
*
|
|
34694
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
34695
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
34696
|
+
* templating dialect for one field would be a second thing to explain.
|
|
34697
|
+
*
|
|
34698
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
34699
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
34700
|
+
* the reason this is not `.min(1)`.
|
|
34701
|
+
*/
|
|
34702
|
+
var PreviewTextField = string().max(200);
|
|
34703
|
+
/**
|
|
34704
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
34705
|
+
*
|
|
34706
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
34707
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
34708
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
34709
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
34710
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
34711
|
+
* them.
|
|
34712
|
+
*
|
|
34713
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
34714
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
34715
|
+
* paying that on the deploy that shipped it.
|
|
34716
|
+
*
|
|
34717
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
34718
|
+
*/
|
|
34719
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
34720
|
+
/**
|
|
34721
|
+
* Which detection classes the notification reports counts for.
|
|
34722
|
+
*
|
|
34723
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
34724
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
34725
|
+
* class the window actually contained", which is what an operator who never
|
|
34726
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
34727
|
+
* counts cars all night).
|
|
34728
|
+
*
|
|
34729
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
34730
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
34731
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
34732
|
+
* not emit.
|
|
34733
|
+
*
|
|
34734
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
34735
|
+
* - `{{detections}}` — total over the reported classes
|
|
34736
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
34737
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
34738
|
+
* one per class, `count_` + the class name
|
|
34739
|
+
*
|
|
34740
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
34741
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
34742
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
34743
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
34744
|
+
*/
|
|
34745
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
34746
|
+
/**
|
|
33903
34747
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33904
34748
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33905
34749
|
* here (see the ownership note above).
|
|
@@ -33919,9 +34763,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33919
34763
|
cadenceSec: CadenceSecField.default(15),
|
|
33920
34764
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33921
34765
|
framerate: FramerateField.default(10),
|
|
34766
|
+
/**
|
|
34767
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
34768
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
34769
|
+
* field gets.
|
|
34770
|
+
*/
|
|
34771
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34772
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
34773
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33922
34774
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33923
34775
|
targets: TargetsField,
|
|
33924
34776
|
template: TimelapseTemplateSchema.optional(),
|
|
34777
|
+
/**
|
|
34778
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
34779
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
34780
|
+
*
|
|
34781
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
34782
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
34783
|
+
* silently clear the caption too.
|
|
34784
|
+
*/
|
|
34785
|
+
previewText: PreviewTextField.optional(),
|
|
34786
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
34787
|
+
previewMode: PreviewModeField.default("image"),
|
|
34788
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
34789
|
+
reportClasses: ReportClassesField.optional(),
|
|
33925
34790
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33926
34791
|
priority: PriorityField.default(3)
|
|
33927
34792
|
});
|
|
@@ -33932,8 +34797,13 @@ object({
|
|
|
33932
34797
|
schedule: NcScheduleSchema.optional(),
|
|
33933
34798
|
cadenceSec: CadenceSecField.optional(),
|
|
33934
34799
|
framerate: FramerateField.optional(),
|
|
34800
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34801
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33935
34802
|
targets: TargetsField.optional(),
|
|
33936
34803
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
34804
|
+
previewText: PreviewTextField.optional(),
|
|
34805
|
+
previewMode: PreviewModeField.optional(),
|
|
34806
|
+
reportClasses: ReportClassesField.optional(),
|
|
33937
34807
|
priority: PriorityField.optional()
|
|
33938
34808
|
});
|
|
33939
34809
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33945,10 +34815,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33945
34815
|
*/
|
|
33946
34816
|
ownerUserId: string().optional(),
|
|
33947
34817
|
/**
|
|
33948
|
-
* Epoch-ms of the
|
|
33949
|
-
*
|
|
34818
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
34819
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
34820
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33950
34821
|
*/
|
|
33951
34822
|
lastGeneratedAt: number().optional(),
|
|
34823
|
+
/**
|
|
34824
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
34825
|
+
* re-generation guard's real durable state.
|
|
34826
|
+
*
|
|
34827
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
34828
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
34829
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
34830
|
+
* already done — and B's night is gone for good, because the window will not
|
|
34831
|
+
* come back.
|
|
34832
|
+
*
|
|
34833
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
34834
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
34835
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
34836
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
34837
|
+
* once, on the deploy that shipped the map.
|
|
34838
|
+
*/
|
|
34839
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33952
34840
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33953
34841
|
createdBy: string(),
|
|
33954
34842
|
createdAt: number(),
|