@camstack/addon-provider-homeassistant 1.2.23 → 1.2.25
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-CM18Ztr0.js → dist-20wP9knC.js} +936 -48
- package/dist/{dist-D4ZQ698x.mjs → dist-CKvJQg2D.mjs} +936 -48
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -7323,8 +7323,31 @@ var AdoptionJobSchema = object({
|
|
|
7323
7323
|
error: string().nullable()
|
|
7324
7324
|
});
|
|
7325
7325
|
/**
|
|
7326
|
-
* Per-camera FUNCTION SWITCHES
|
|
7327
|
-
*
|
|
7326
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7327
|
+
*
|
|
7328
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7329
|
+
*
|
|
7330
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7331
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7332
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7333
|
+
* every function already had a settings page of its own, and a second place to
|
|
7334
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7335
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7336
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7337
|
+
* (which was always first-class; the switch was a veneer over
|
|
7338
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7339
|
+
* per-device setting, the two camera planes to their own components.
|
|
7340
|
+
*
|
|
7341
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7342
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7343
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7344
|
+
* never about a control panel.
|
|
7345
|
+
*
|
|
7346
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7347
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7348
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7349
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7350
|
+
* stop; nothing new may be built on it.
|
|
7328
7351
|
*
|
|
7329
7352
|
* ## This file adds no state
|
|
7330
7353
|
*
|
|
@@ -7669,14 +7692,21 @@ var RecordingConfigSchema = object({
|
|
|
7669
7692
|
/**
|
|
7670
7693
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7671
7694
|
*
|
|
7672
|
-
* One shape shared by the recorder
|
|
7673
|
-
*
|
|
7674
|
-
*
|
|
7675
|
-
*
|
|
7676
|
-
*
|
|
7677
|
-
|
|
7695
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7696
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7697
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7698
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7699
|
+
* addon surface.
|
|
7700
|
+
*/
|
|
7701
|
+
/**
|
|
7702
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7703
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7704
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7705
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7706
|
+
* runs at all.
|
|
7678
7707
|
*/
|
|
7679
7708
|
var RelocateJobStateSchema = _enum([
|
|
7709
|
+
"queued",
|
|
7680
7710
|
"running",
|
|
7681
7711
|
"done",
|
|
7682
7712
|
"failed",
|
|
@@ -7701,19 +7731,109 @@ var RelocateJobSchema = object({
|
|
|
7701
7731
|
finishedAt: number().nullable(),
|
|
7702
7732
|
error: string().nullable()
|
|
7703
7733
|
});
|
|
7734
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7735
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7736
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7704
7737
|
var RelocateFootageInputSchema = object({
|
|
7705
|
-
deviceId: number().optional(),
|
|
7706
7738
|
fromLocationId: string(),
|
|
7707
7739
|
toLocationId: string(),
|
|
7708
7740
|
entities: array(_enum(["segments"])).optional(),
|
|
7741
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7742
|
+
* pre-orchestration compatibility path. */
|
|
7743
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7744
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7745
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7746
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7747
|
+
deviceId: number().int().optional(),
|
|
7748
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7749
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7750
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7751
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7752
|
+
profiles: array(string()).optional(),
|
|
7709
7753
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7710
7754
|
* never allowed to starve live writers. */
|
|
7711
7755
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7712
7756
|
});
|
|
7713
|
-
|
|
7714
|
-
|
|
7757
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7758
|
+
* from persistent recording settings: a migration never changes
|
|
7759
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7760
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7761
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7762
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7715
7763
|
toLocationId: string(),
|
|
7716
7764
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7765
|
+
}).extend({ leaseId: string().min(1) });
|
|
7766
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7767
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7768
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7769
|
+
var StorageMigrationClassSchema = _enum([
|
|
7770
|
+
"recordings",
|
|
7771
|
+
"recordingsLow",
|
|
7772
|
+
"eventMedia"
|
|
7773
|
+
]);
|
|
7774
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7775
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7776
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7777
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7778
|
+
recordings: string().min(1).optional(),
|
|
7779
|
+
recordingsLow: string().min(1).optional(),
|
|
7780
|
+
eventMedia: string().min(1).optional()
|
|
7781
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7782
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7783
|
+
var StorageMigrationInputSchema = object({
|
|
7784
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7785
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7786
|
+
});
|
|
7787
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7788
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7789
|
+
* verified. */
|
|
7790
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7791
|
+
"planning",
|
|
7792
|
+
"pausing",
|
|
7793
|
+
"moving",
|
|
7794
|
+
"verifying",
|
|
7795
|
+
"repointing",
|
|
7796
|
+
"refreshing",
|
|
7797
|
+
"resuming",
|
|
7798
|
+
"done",
|
|
7799
|
+
"failed",
|
|
7800
|
+
"cancelled"
|
|
7801
|
+
]);
|
|
7802
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7803
|
+
"pipeline",
|
|
7804
|
+
"recorder",
|
|
7805
|
+
"analytics"
|
|
7806
|
+
]);
|
|
7807
|
+
var StorageMigrationMoveSchema = object({
|
|
7808
|
+
storageClass: StorageMigrationClassSchema,
|
|
7809
|
+
fromLocationId: string(),
|
|
7810
|
+
toLocationId: string(),
|
|
7811
|
+
moverJobId: string().nullable(),
|
|
7812
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7813
|
+
error: string().nullable()
|
|
7814
|
+
});
|
|
7815
|
+
var StorageMigrationJobSchema = object({
|
|
7816
|
+
jobId: string(),
|
|
7817
|
+
phase: StorageMigrationPhaseSchema,
|
|
7818
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7819
|
+
throttleMbps: number(),
|
|
7820
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7821
|
+
pauseLeaseId: string().nullable(),
|
|
7822
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7823
|
+
repointed: boolean(),
|
|
7824
|
+
cancelRequested: boolean(),
|
|
7825
|
+
startedAt: number(),
|
|
7826
|
+
updatedAt: number(),
|
|
7827
|
+
finishedAt: number().nullable(),
|
|
7828
|
+
error: string().nullable()
|
|
7829
|
+
});
|
|
7830
|
+
var StorageMigrationPlanSchema = object({
|
|
7831
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7832
|
+
moves: array(object({
|
|
7833
|
+
storageClass: StorageMigrationClassSchema,
|
|
7834
|
+
fromLocationId: string(),
|
|
7835
|
+
toLocationId: string()
|
|
7836
|
+
}))
|
|
7717
7837
|
});
|
|
7718
7838
|
/**
|
|
7719
7839
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7765,6 +7885,21 @@ var StorageLocationSchema = object({
|
|
|
7765
7885
|
nodeId: string().optional(),
|
|
7766
7886
|
isDefault: boolean().default(false),
|
|
7767
7887
|
isSystem: boolean().default(false),
|
|
7888
|
+
/**
|
|
7889
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7890
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7891
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7892
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7893
|
+
* extended to add the next consumer.
|
|
7894
|
+
*
|
|
7895
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7896
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7897
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7898
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7899
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7900
|
+
* always stamped `true`.
|
|
7901
|
+
*/
|
|
7902
|
+
enabled: boolean().optional(),
|
|
7768
7903
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7769
7904
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7770
7905
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -12472,7 +12607,8 @@ method(object({
|
|
|
12472
12607
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
12473
12608
|
/**
|
|
12474
12609
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12475
|
-
* filesystem
|
|
12610
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12611
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
12476
12612
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
12477
12613
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
12478
12614
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -14327,6 +14463,13 @@ var MaskGridDimsSchema = object({
|
|
|
14327
14463
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
14328
14464
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
14329
14465
|
* one trigger.
|
|
14466
|
+
*
|
|
14467
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
14468
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
14469
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
14470
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
14471
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
14472
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
14330
14473
|
*/
|
|
14331
14474
|
var NcDeliverySchema = _enum([
|
|
14332
14475
|
"immediate",
|
|
@@ -14341,15 +14484,32 @@ var NcDeliverySchema = _enum([
|
|
|
14341
14484
|
* depend on a provider's raw event name or payload shape.
|
|
14342
14485
|
*/
|
|
14343
14486
|
var NcSystemEventKindSchema = _enum([
|
|
14344
|
-
"
|
|
14345
|
-
"
|
|
14487
|
+
"device-online",
|
|
14488
|
+
"device-offline",
|
|
14489
|
+
"device-disabled",
|
|
14490
|
+
"device-enabled",
|
|
14346
14491
|
"stream-online",
|
|
14347
14492
|
"stream-offline",
|
|
14348
14493
|
"node-online",
|
|
14349
14494
|
"node-offline",
|
|
14350
14495
|
"addon-update-available",
|
|
14351
|
-
"server-update-available"
|
|
14496
|
+
"server-update-available",
|
|
14497
|
+
"alarm-triggered",
|
|
14498
|
+
"alarm-armed",
|
|
14499
|
+
"alarm-disarmed",
|
|
14500
|
+
"camera-online",
|
|
14501
|
+
"camera-offline",
|
|
14502
|
+
"camera-disabled",
|
|
14503
|
+
"camera-enabled"
|
|
14504
|
+
]);
|
|
14505
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
14506
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
14507
|
+
"camera-online",
|
|
14508
|
+
"camera-offline",
|
|
14509
|
+
"camera-disabled",
|
|
14510
|
+
"camera-enabled"
|
|
14352
14511
|
]);
|
|
14512
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
14353
14513
|
/**
|
|
14354
14514
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
14355
14515
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -14358,6 +14518,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14358
14518
|
var NcSystemEventConditionSchema = object({
|
|
14359
14519
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
14360
14520
|
deviceIds: array(number().int()).min(1).optional(),
|
|
14521
|
+
/**
|
|
14522
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
14523
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
14524
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
14525
|
+
*
|
|
14526
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
14527
|
+
* one reason: the intake cannot know which devices this household cares
|
|
14528
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
14529
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
14530
|
+
* does not carry) matches no `deviceTypes` list.
|
|
14531
|
+
*/
|
|
14532
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
14361
14533
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14362
14534
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14363
14535
|
});
|
|
@@ -14408,6 +14580,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
14408
14580
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
14409
14581
|
});
|
|
14410
14582
|
/**
|
|
14583
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14584
|
+
*
|
|
14585
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14586
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14587
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14588
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14589
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14590
|
+
*
|
|
14591
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14592
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14593
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14594
|
+
*
|
|
14595
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14596
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14597
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14598
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14599
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14600
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14601
|
+
* ZodEffects the cap path would have to special-case).
|
|
14602
|
+
*
|
|
14603
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14604
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14605
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14606
|
+
* `samplingSeconds` decorative.
|
|
14607
|
+
*
|
|
14608
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14609
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14610
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14611
|
+
* an operator who typed `dog` mean the same thing.
|
|
14612
|
+
*/
|
|
14613
|
+
var NcAudioConditionSchema = object({
|
|
14614
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14615
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14616
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14617
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14618
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14619
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14620
|
+
/** Length of the sampling window in seconds. */
|
|
14621
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14622
|
+
});
|
|
14623
|
+
/**
|
|
14411
14624
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
14412
14625
|
*
|
|
14413
14626
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14680,7 +14893,33 @@ var NcConditionsSchema = object({
|
|
|
14680
14893
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14681
14894
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14682
14895
|
*/
|
|
14683
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14896
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14897
|
+
/**
|
|
14898
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14899
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14900
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14901
|
+
* a window that is not full yet, neither filter given). See
|
|
14902
|
+
* {@link NcAudioCondition}.
|
|
14903
|
+
*
|
|
14904
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14905
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14906
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14907
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14908
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14909
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14910
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14911
|
+
*
|
|
14912
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14913
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14914
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14915
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14916
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14917
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14918
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14919
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14920
|
+
* does an audio rule become authorable.
|
|
14921
|
+
*/
|
|
14922
|
+
audio: NcAudioConditionSchema.optional()
|
|
14684
14923
|
});
|
|
14685
14924
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14686
14925
|
var NcRuleTargetSchema = object({
|
|
@@ -14794,6 +15033,73 @@ var NcThrottleSchema = object({
|
|
|
14794
15033
|
*/
|
|
14795
15034
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14796
15035
|
});
|
|
15036
|
+
/**
|
|
15037
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
15038
|
+
* it judges may be.
|
|
15039
|
+
*
|
|
15040
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
15041
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
15042
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
15043
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
15044
|
+
* tokens for pixels the model pools away.
|
|
15045
|
+
*/
|
|
15046
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
15047
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
15048
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
15049
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
15050
|
+
var NcConfirmExpectSchema = object({
|
|
15051
|
+
op: _enum([
|
|
15052
|
+
">=",
|
|
15053
|
+
">",
|
|
15054
|
+
"<=",
|
|
15055
|
+
"<",
|
|
15056
|
+
"=="
|
|
15057
|
+
]),
|
|
15058
|
+
count: number().int().min(0).max(1e3)
|
|
15059
|
+
});
|
|
15060
|
+
/**
|
|
15061
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
15062
|
+
* to ship and says whether it agrees with the rule.
|
|
15063
|
+
*
|
|
15064
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
15065
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
15066
|
+
* on the operator's phone is not a verdict about this notification.
|
|
15067
|
+
*
|
|
15068
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
15069
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
15070
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
15071
|
+
* open looks in the log exactly like a gate that works.
|
|
15072
|
+
*
|
|
15073
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
15074
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
15075
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
15076
|
+
* above rather than trusting a parse it may never have seen.
|
|
15077
|
+
*/
|
|
15078
|
+
var NcConfirmSchema = object({
|
|
15079
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
15080
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
15081
|
+
enabled: boolean().default(false),
|
|
15082
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
15083
|
+
profileId: string().optional(),
|
|
15084
|
+
/**
|
|
15085
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
15086
|
+
* from the rule (its class and its expectation).
|
|
15087
|
+
*
|
|
15088
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
15089
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
15090
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
15091
|
+
* turn and only rule-authored words land here.
|
|
15092
|
+
*/
|
|
15093
|
+
prompt: string().max(1e3).optional(),
|
|
15094
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
15095
|
+
* own boolean verdict decides. */
|
|
15096
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
15097
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
15098
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
15099
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
15100
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
15101
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
15102
|
+
});
|
|
14797
15103
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14798
15104
|
var NcRuleInputSchema = object({
|
|
14799
15105
|
name: string().min(1).max(200),
|
|
@@ -14854,7 +15160,13 @@ var NcRuleInputSchema = object({
|
|
|
14854
15160
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14855
15161
|
* shape as every other actuation.
|
|
14856
15162
|
*/
|
|
14857
|
-
actions: NcRuleActionsSchema.optional()
|
|
15163
|
+
actions: NcRuleActionsSchema.optional(),
|
|
15164
|
+
/**
|
|
15165
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
15166
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
15167
|
+
* did, and absent is the only way to say that without a migration.
|
|
15168
|
+
*/
|
|
15169
|
+
confirm: NcConfirmSchema.optional()
|
|
14858
15170
|
});
|
|
14859
15171
|
/**
|
|
14860
15172
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14865,7 +15177,37 @@ var NcRuleInputSchema = object({
|
|
|
14865
15177
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14866
15178
|
* `updateRule` patch.
|
|
14867
15179
|
*/
|
|
14868
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15180
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
15181
|
+
disabledTargetIds: array(string()).optional(),
|
|
15182
|
+
/**
|
|
15183
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
15184
|
+
*
|
|
15185
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
15186
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
15187
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
15188
|
+
* one — which made every partial edit destructive:
|
|
15189
|
+
*
|
|
15190
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
15191
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
15192
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
15193
|
+
*
|
|
15194
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
15195
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
15196
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
15197
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
15198
|
+
* within a minute of a two-field patch.
|
|
15199
|
+
*
|
|
15200
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
15201
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
15202
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
15203
|
+
* absent key is now genuinely absent.
|
|
15204
|
+
*/
|
|
15205
|
+
enabled: boolean().optional(),
|
|
15206
|
+
conditions: NcConditionsSchema.optional(),
|
|
15207
|
+
media: NcMediaPolicySchema.optional(),
|
|
15208
|
+
throttle: NcThrottleSchema.optional(),
|
|
15209
|
+
priority: number().int().min(1).max(5).optional()
|
|
15210
|
+
});
|
|
14869
15211
|
/** A persisted rule. */
|
|
14870
15212
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14871
15213
|
id: string(),
|
|
@@ -15166,6 +15508,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
15166
15508
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
15167
15509
|
* copy would lie the first time a rule is disabled.
|
|
15168
15510
|
*/
|
|
15511
|
+
/**
|
|
15512
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
15513
|
+
*
|
|
15514
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
15515
|
+
* per-camera notification switch the Notification Center already owns,
|
|
15516
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
15517
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
15518
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
15519
|
+
* with the switches the operator actually used.
|
|
15520
|
+
*/
|
|
15521
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
15522
|
+
"muted",
|
|
15523
|
+
"detection-off",
|
|
15524
|
+
"offline"
|
|
15525
|
+
]);
|
|
15526
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
15527
|
+
deviceId: number().int(),
|
|
15528
|
+
reason: NcAlarmSkipReasonSchema
|
|
15529
|
+
});
|
|
15169
15530
|
var NcAlarmModeCoverageSchema = object({
|
|
15170
15531
|
mode: AlarmArmModeSchema,
|
|
15171
15532
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -15173,7 +15534,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
15173
15534
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
15174
15535
|
allDevices: boolean(),
|
|
15175
15536
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
15176
|
-
deviceIds: array(number().int())
|
|
15537
|
+
deviceIds: array(number().int()),
|
|
15538
|
+
/**
|
|
15539
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
15540
|
+
* excludes it.
|
|
15541
|
+
*
|
|
15542
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
15543
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
15544
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
15545
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
15546
|
+
* alarm tab.
|
|
15547
|
+
*/
|
|
15548
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
15177
15549
|
});
|
|
15178
15550
|
var NcAlarmConfigSchema = object({
|
|
15179
15551
|
/**
|
|
@@ -16542,13 +16914,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16542
16914
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16543
16915
|
kind: "mutation",
|
|
16544
16916
|
auth: "admin"
|
|
16545
|
-
}), method(
|
|
16917
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
16546
16918
|
kind: "mutation",
|
|
16547
16919
|
auth: "admin"
|
|
16548
|
-
}), method(object({
|
|
16549
|
-
kind: "
|
|
16920
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16921
|
+
kind: "mutation",
|
|
16550
16922
|
auth: "admin"
|
|
16551
|
-
}), method(
|
|
16923
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16924
|
+
kind: "mutation",
|
|
16925
|
+
auth: "admin"
|
|
16926
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16927
|
+
kind: "mutation",
|
|
16928
|
+
auth: "admin"
|
|
16929
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
16552
16930
|
kind: "mutation",
|
|
16553
16931
|
auth: "admin"
|
|
16554
16932
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -18005,9 +18383,16 @@ var CameraStatusSchema = object({
|
|
|
18005
18383
|
audio: CameraAudioStatusSchema.nullable(),
|
|
18006
18384
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
18007
18385
|
/**
|
|
18008
|
-
* Per-camera
|
|
18386
|
+
* Per-camera functions an OPERATOR has turned off
|
|
18009
18387
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
18010
18388
|
*
|
|
18389
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
18390
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
18391
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
18392
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
18393
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
18394
|
+
* the difference between a camera being off and a camera being dead.
|
|
18395
|
+
*
|
|
18011
18396
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
18012
18397
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
18013
18398
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -18078,7 +18463,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
18078
18463
|
reachable: boolean(),
|
|
18079
18464
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
18080
18465
|
});
|
|
18081
|
-
method(object({
|
|
18466
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
18467
|
+
kind: "mutation",
|
|
18468
|
+
auth: "admin"
|
|
18469
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
18470
|
+
kind: "mutation",
|
|
18471
|
+
auth: "admin"
|
|
18472
|
+
}), method(object({
|
|
18082
18473
|
deviceId: number(),
|
|
18083
18474
|
agentNodeId: string()
|
|
18084
18475
|
}), object({ success: literal(true) }), {
|
|
@@ -18752,6 +19143,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18752
19143
|
locationId: string(),
|
|
18753
19144
|
targetBytes: number().int().positive()
|
|
18754
19145
|
}), EvictResultSchema, { kind: "mutation" });
|
|
19146
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
19147
|
+
kind: "mutation",
|
|
19148
|
+
auth: "admin"
|
|
19149
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
19150
|
+
kind: "mutation",
|
|
19151
|
+
auth: "admin"
|
|
19152
|
+
});
|
|
18755
19153
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18756
19154
|
providerId: string().min(1),
|
|
18757
19155
|
displayName: string().min(1),
|
|
@@ -18855,6 +19253,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18855
19253
|
label: string(),
|
|
18856
19254
|
description: string().optional()
|
|
18857
19255
|
});
|
|
19256
|
+
/**
|
|
19257
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
19258
|
+
* an instance declares a camera.
|
|
19259
|
+
*/
|
|
19260
|
+
var TerminalInstanceInfoSchema = object({
|
|
19261
|
+
instanceId: string(),
|
|
19262
|
+
cameraStableId: string(),
|
|
19263
|
+
nodeId: string(),
|
|
19264
|
+
profileId: string(),
|
|
19265
|
+
profileLabel: string(),
|
|
19266
|
+
name: string(),
|
|
19267
|
+
enabled: boolean()
|
|
19268
|
+
});
|
|
19269
|
+
var TerminalLegacyCameraSchema = object({
|
|
19270
|
+
stableId: string(),
|
|
19271
|
+
nodeId: string(),
|
|
19272
|
+
profileId: string(),
|
|
19273
|
+
profileLabel: string(),
|
|
19274
|
+
name: string(),
|
|
19275
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
19276
|
+
adoptable: boolean()
|
|
19277
|
+
});
|
|
18858
19278
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18859
19279
|
seq: number().int().positive(),
|
|
18860
19280
|
kind: literal("data"),
|
|
@@ -18871,7 +19291,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18871
19291
|
snapshot: string().optional(),
|
|
18872
19292
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18873
19293
|
});
|
|
18874
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
19294
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
19295
|
+
targetNodeId: string().min(1),
|
|
19296
|
+
profileId: string().min(1),
|
|
19297
|
+
name: string().trim().min(1).max(160).optional()
|
|
19298
|
+
}), TerminalInstanceInfoSchema, {
|
|
19299
|
+
kind: "mutation",
|
|
19300
|
+
auth: "admin"
|
|
19301
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
19302
|
+
kind: "mutation",
|
|
19303
|
+
auth: "admin"
|
|
19304
|
+
}), method(object({
|
|
19305
|
+
instanceId: string().min(1),
|
|
19306
|
+
enabled: boolean()
|
|
19307
|
+
}), TerminalInstanceInfoSchema, {
|
|
19308
|
+
kind: "mutation",
|
|
19309
|
+
auth: "admin"
|
|
19310
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
19311
|
+
stableId: string().min(1),
|
|
19312
|
+
name: string().trim().min(1).max(160).optional()
|
|
19313
|
+
}), TerminalInstanceInfoSchema, {
|
|
19314
|
+
kind: "mutation",
|
|
19315
|
+
auth: "admin"
|
|
19316
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18875
19317
|
profileId: string(),
|
|
18876
19318
|
cols: number().int().positive(),
|
|
18877
19319
|
rows: number().int().positive()
|
|
@@ -18888,7 +19330,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18888
19330
|
}), method(object({
|
|
18889
19331
|
sessionId: string(),
|
|
18890
19332
|
afterSeq: number().int().nonnegative(),
|
|
18891
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
19333
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
19334
|
+
/**
|
|
19335
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
19336
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
19337
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
19338
|
+
*/
|
|
19339
|
+
waitForOutput: boolean().optional()
|
|
18892
19340
|
}), TerminalOutputBatchSchema, {
|
|
18893
19341
|
kind: "mutation",
|
|
18894
19342
|
auth: "admin",
|
|
@@ -21475,6 +21923,7 @@ var FaceInfoSchema = object({
|
|
|
21475
21923
|
var FaceFilterEnum = _enum([
|
|
21476
21924
|
"unassigned",
|
|
21477
21925
|
"recognized",
|
|
21926
|
+
"identified",
|
|
21478
21927
|
"all"
|
|
21479
21928
|
]);
|
|
21480
21929
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -21503,6 +21952,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
21503
21952
|
kind: "mutation",
|
|
21504
21953
|
auth: "admin"
|
|
21505
21954
|
}), method(object({
|
|
21955
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
21956
|
+
deviceId: number().int().optional(),
|
|
21506
21957
|
limit: number().int().positive().optional(),
|
|
21507
21958
|
filter: FaceFilterEnum.optional(),
|
|
21508
21959
|
/**
|
|
@@ -23732,6 +24183,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
23732
24183
|
capName: string().min(1).max(64),
|
|
23733
24184
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
23734
24185
|
valuePath: string().min(1).max(64)
|
|
24186
|
+
}),
|
|
24187
|
+
object({
|
|
24188
|
+
kind: literal("latest-recognition"),
|
|
24189
|
+
recognition: _enum(["person", "plate"])
|
|
23735
24190
|
})
|
|
23736
24191
|
]);
|
|
23737
24192
|
var OsdSlotBindingSchema = object({
|
|
@@ -23837,6 +24292,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
23837
24292
|
}), object({ success: literal(true) }), {
|
|
23838
24293
|
kind: "mutation",
|
|
23839
24294
|
auth: "admin"
|
|
24295
|
+
}), method(object({
|
|
24296
|
+
sourceDeviceId: number().int(),
|
|
24297
|
+
targetDeviceId: number().int()
|
|
24298
|
+
}), object({
|
|
24299
|
+
copied: number().int().nonnegative(),
|
|
24300
|
+
skipped: number().int().nonnegative()
|
|
24301
|
+
}), {
|
|
24302
|
+
kind: "mutation",
|
|
24303
|
+
auth: "admin"
|
|
23840
24304
|
}), method(object({
|
|
23841
24305
|
deviceId: number().int(),
|
|
23842
24306
|
slotId: string().min(1),
|
|
@@ -24759,7 +25223,19 @@ var RecordingManifestSchema = object({
|
|
|
24759
25223
|
* profiles/subtrees/locations on this node). */
|
|
24760
25224
|
var RecordingDeviceUsageSchema = object({
|
|
24761
25225
|
deviceId: number(),
|
|
24762
|
-
usedBytes: number()
|
|
25226
|
+
usedBytes: number(),
|
|
25227
|
+
/**
|
|
25228
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
25229
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
25230
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
25231
|
+
*
|
|
25232
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
25233
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
25234
|
+
* field must keep validating that older provider's payload: the framework
|
|
25235
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
25236
|
+
* the later of the two.
|
|
25237
|
+
*/
|
|
25238
|
+
oldestMs: number().nullable().optional()
|
|
24763
25239
|
});
|
|
24764
25240
|
/** Recording storage usage + capacity for one storage location. */
|
|
24765
25241
|
var RecordingLocationUsageSchema = object({
|
|
@@ -24787,6 +25263,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
24787
25263
|
locations: array(RecordingLocationUsageSchema)
|
|
24788
25264
|
});
|
|
24789
25265
|
/**
|
|
25266
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
25267
|
+
*
|
|
25268
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
25269
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
25270
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
25271
|
+
* location, run FIFO behind the single-flight mover.
|
|
25272
|
+
*
|
|
25273
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
25274
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
25275
|
+
* (empty on the plan).
|
|
25276
|
+
*/
|
|
25277
|
+
var RecordingRebalanceMoveSchema = object({
|
|
25278
|
+
deviceId: number(),
|
|
25279
|
+
profile: string(),
|
|
25280
|
+
fromLocationId: string(),
|
|
25281
|
+
toLocationId: string(),
|
|
25282
|
+
bytes: number(),
|
|
25283
|
+
files: number().int()
|
|
25284
|
+
});
|
|
25285
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
25286
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
25287
|
+
* that had nothing to do. */
|
|
25288
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
25289
|
+
"unassigned",
|
|
25290
|
+
"target-not-writable",
|
|
25291
|
+
"below-threshold",
|
|
25292
|
+
"no-headroom"
|
|
25293
|
+
]);
|
|
25294
|
+
var RecordingRebalanceSkipSchema = object({
|
|
25295
|
+
deviceId: number(),
|
|
25296
|
+
profile: string(),
|
|
25297
|
+
fromLocationId: string(),
|
|
25298
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
25299
|
+
toLocationId: string().nullable(),
|
|
25300
|
+
bytes: number(),
|
|
25301
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
25302
|
+
});
|
|
25303
|
+
var RecordingRebalancePlanSchema = object({
|
|
25304
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
25305
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
25306
|
+
bytesToMove: number(),
|
|
25307
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
25308
|
+
jobIds: array(string())
|
|
25309
|
+
});
|
|
25310
|
+
var RecordingRebalanceInputSchema = object({
|
|
25311
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
25312
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
25313
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
25314
|
+
minMoveGb: number().min(0).optional()
|
|
25315
|
+
});
|
|
25316
|
+
/**
|
|
24790
25317
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
24791
25318
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
24792
25319
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -24934,6 +25461,21 @@ method(object({
|
|
|
24934
25461
|
}), {
|
|
24935
25462
|
kind: "mutation",
|
|
24936
25463
|
auth: "admin"
|
|
25464
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
25465
|
+
kind: "mutation",
|
|
25466
|
+
auth: "admin"
|
|
25467
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
25468
|
+
kind: "mutation",
|
|
25469
|
+
auth: "admin"
|
|
25470
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
25471
|
+
kind: "mutation",
|
|
25472
|
+
auth: "admin"
|
|
25473
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
25474
|
+
kind: "mutation",
|
|
25475
|
+
auth: "admin"
|
|
25476
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
25477
|
+
kind: "mutation",
|
|
25478
|
+
auth: "admin"
|
|
24937
25479
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24938
25480
|
kind: "mutation",
|
|
24939
25481
|
auth: "admin"
|
|
@@ -24943,9 +25485,15 @@ method(object({
|
|
|
24943
25485
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24944
25486
|
kind: "mutation",
|
|
24945
25487
|
auth: "admin"
|
|
25488
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25489
|
+
kind: "query",
|
|
25490
|
+
auth: "admin"
|
|
25491
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
25492
|
+
kind: "mutation",
|
|
25493
|
+
auth: "admin"
|
|
24946
25494
|
});
|
|
24947
25495
|
/**
|
|
24948
|
-
* `
|
|
25496
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
24949
25497
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
24950
25498
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
24951
25499
|
* delete-after-download.
|
|
@@ -24960,10 +25508,42 @@ method(object({
|
|
|
24960
25508
|
*/
|
|
24961
25509
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
24962
25510
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25511
|
+
/**
|
|
25512
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25513
|
+
*
|
|
25514
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25515
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25516
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25517
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25518
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25519
|
+
*/
|
|
25520
|
+
var ExportDenseRangeSchema = object({
|
|
25521
|
+
fromSec: number().nonnegative(),
|
|
25522
|
+
toSec: number().nonnegative()
|
|
25523
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25524
|
+
/**
|
|
25525
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25526
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25527
|
+
*
|
|
25528
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25529
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25530
|
+
*/
|
|
25531
|
+
var ExportDenseSchema = object({
|
|
25532
|
+
everyMs: number().int().positive(),
|
|
25533
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
25534
|
+
});
|
|
24963
25535
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
24964
25536
|
var ExportTimelapseSchema = object({
|
|
24965
25537
|
everyMs: number().int().positive(),
|
|
24966
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
25538
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
25539
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25540
|
+
dense: ExportDenseSchema.optional()
|
|
25541
|
+
}).superRefine((v, ctx) => {
|
|
25542
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25543
|
+
code: ZodIssueCode.custom,
|
|
25544
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25545
|
+
path: ["dense", "everyMs"]
|
|
25546
|
+
});
|
|
24967
25547
|
});
|
|
24968
25548
|
/**
|
|
24969
25549
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -25021,6 +25601,19 @@ var ExportDownloadSchema = object({
|
|
|
25021
25601
|
url: string(),
|
|
25022
25602
|
endpoints: array(string())
|
|
25023
25603
|
});
|
|
25604
|
+
/**
|
|
25605
|
+
* A finished export's bytes, inline.
|
|
25606
|
+
*
|
|
25607
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
25608
|
+
* against, so nobody has to infer it from the base64 length.
|
|
25609
|
+
*/
|
|
25610
|
+
var ExportBytesSchema = object({
|
|
25611
|
+
base64: string(),
|
|
25612
|
+
contentType: string(),
|
|
25613
|
+
/** Suggested filename, extension included. */
|
|
25614
|
+
name: string(),
|
|
25615
|
+
bytes: number().int().nonnegative()
|
|
25616
|
+
});
|
|
25024
25617
|
method(object({
|
|
25025
25618
|
deviceId: number(),
|
|
25026
25619
|
profile: string(),
|
|
@@ -25045,6 +25638,9 @@ method(object({
|
|
|
25045
25638
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
25046
25639
|
kind: "query",
|
|
25047
25640
|
auth: "protected"
|
|
25641
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
25642
|
+
kind: "query",
|
|
25643
|
+
auth: "protected"
|
|
25048
25644
|
});
|
|
25049
25645
|
/**
|
|
25050
25646
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -30546,6 +31142,12 @@ Object.freeze({
|
|
|
30546
31142
|
addonId: null,
|
|
30547
31143
|
access: "delete"
|
|
30548
31144
|
},
|
|
31145
|
+
"osdManager.copyDeviceConfiguration": {
|
|
31146
|
+
capName: "osd-manager",
|
|
31147
|
+
capScope: "system",
|
|
31148
|
+
addonId: null,
|
|
31149
|
+
access: "create"
|
|
31150
|
+
},
|
|
30549
31151
|
"osdManager.getConditionSupport": {
|
|
30550
31152
|
capName: "osd-manager",
|
|
30551
31153
|
capScope: "system",
|
|
@@ -30642,7 +31244,7 @@ Object.freeze({
|
|
|
30642
31244
|
addonId: null,
|
|
30643
31245
|
access: "create"
|
|
30644
31246
|
},
|
|
30645
|
-
"pipelineAnalytics.
|
|
31247
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
30646
31248
|
capName: "pipeline-analytics",
|
|
30647
31249
|
capScope: "device",
|
|
30648
31250
|
addonId: null,
|
|
@@ -30714,12 +31316,6 @@ Object.freeze({
|
|
|
30714
31316
|
addonId: null,
|
|
30715
31317
|
access: "view"
|
|
30716
31318
|
},
|
|
30717
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
30718
|
-
capName: "pipeline-analytics",
|
|
30719
|
-
capScope: "device",
|
|
30720
|
-
addonId: null,
|
|
30721
|
-
access: "view"
|
|
30722
|
-
},
|
|
30723
31319
|
"pipelineAnalytics.getMotionEvents": {
|
|
30724
31320
|
capName: "pipeline-analytics",
|
|
30725
31321
|
capScope: "device",
|
|
@@ -30756,6 +31352,12 @@ Object.freeze({
|
|
|
30756
31352
|
addonId: null,
|
|
30757
31353
|
access: "view"
|
|
30758
31354
|
},
|
|
31355
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
31356
|
+
capName: "pipeline-analytics",
|
|
31357
|
+
capScope: "device",
|
|
31358
|
+
addonId: null,
|
|
31359
|
+
access: "view"
|
|
31360
|
+
},
|
|
30759
31361
|
"pipelineAnalytics.getTrack": {
|
|
30760
31362
|
capName: "pipeline-analytics",
|
|
30761
31363
|
capScope: "device",
|
|
@@ -30834,6 +31436,12 @@ Object.freeze({
|
|
|
30834
31436
|
addonId: null,
|
|
30835
31437
|
access: "view"
|
|
30836
31438
|
},
|
|
31439
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
31440
|
+
capName: "pipeline-analytics",
|
|
31441
|
+
capScope: "device",
|
|
31442
|
+
addonId: null,
|
|
31443
|
+
access: "create"
|
|
31444
|
+
},
|
|
30837
31445
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
30838
31446
|
capName: "pipeline-analytics",
|
|
30839
31447
|
capScope: "device",
|
|
@@ -30864,7 +31472,7 @@ Object.freeze({
|
|
|
30864
31472
|
addonId: null,
|
|
30865
31473
|
access: "create"
|
|
30866
31474
|
},
|
|
30867
|
-
"pipelineAnalytics.
|
|
31475
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
30868
31476
|
capName: "pipeline-analytics",
|
|
30869
31477
|
capScope: "device",
|
|
30870
31478
|
addonId: null,
|
|
@@ -30876,6 +31484,12 @@ Object.freeze({
|
|
|
30876
31484
|
addonId: null,
|
|
30877
31485
|
access: "create"
|
|
30878
31486
|
},
|
|
31487
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
31488
|
+
capName: "pipeline-analytics",
|
|
31489
|
+
capScope: "device",
|
|
31490
|
+
addonId: null,
|
|
31491
|
+
access: "create"
|
|
31492
|
+
},
|
|
30879
31493
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
30880
31494
|
capName: "pipeline-analytics",
|
|
30881
31495
|
capScope: "device",
|
|
@@ -30900,6 +31514,12 @@ Object.freeze({
|
|
|
30900
31514
|
addonId: null,
|
|
30901
31515
|
access: "create"
|
|
30902
31516
|
},
|
|
31517
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
31518
|
+
capName: "pipeline-analytics",
|
|
31519
|
+
capScope: "device",
|
|
31520
|
+
addonId: null,
|
|
31521
|
+
access: "create"
|
|
31522
|
+
},
|
|
30903
31523
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
30904
31524
|
capName: "pipeline-analytics",
|
|
30905
31525
|
capScope: "device",
|
|
@@ -31266,6 +31886,12 @@ Object.freeze({
|
|
|
31266
31886
|
addonId: null,
|
|
31267
31887
|
access: "view"
|
|
31268
31888
|
},
|
|
31889
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
31890
|
+
capName: "pipeline-orchestrator",
|
|
31891
|
+
capScope: "system",
|
|
31892
|
+
addonId: null,
|
|
31893
|
+
access: "create"
|
|
31894
|
+
},
|
|
31269
31895
|
"pipelineOrchestrator.rebalance": {
|
|
31270
31896
|
capName: "pipeline-orchestrator",
|
|
31271
31897
|
capScope: "system",
|
|
@@ -31290,6 +31916,12 @@ Object.freeze({
|
|
|
31290
31916
|
addonId: null,
|
|
31291
31917
|
access: "view"
|
|
31292
31918
|
},
|
|
31919
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
31920
|
+
capName: "pipeline-orchestrator",
|
|
31921
|
+
capScope: "system",
|
|
31922
|
+
addonId: null,
|
|
31923
|
+
access: "create"
|
|
31924
|
+
},
|
|
31293
31925
|
"pipelineOrchestrator.saveTemplate": {
|
|
31294
31926
|
capName: "pipeline-orchestrator",
|
|
31295
31927
|
capScope: "system",
|
|
@@ -31686,7 +32318,13 @@ Object.freeze({
|
|
|
31686
32318
|
addonId: null,
|
|
31687
32319
|
access: "create"
|
|
31688
32320
|
},
|
|
31689
|
-
"recording.
|
|
32321
|
+
"recording.cancelRelocateJob": {
|
|
32322
|
+
capName: "recording",
|
|
32323
|
+
capScope: "system",
|
|
32324
|
+
addonId: null,
|
|
32325
|
+
access: "create"
|
|
32326
|
+
},
|
|
32327
|
+
"recording.cancelStorageMigrationMove": {
|
|
31690
32328
|
capName: "recording",
|
|
31691
32329
|
capScope: "system",
|
|
31692
32330
|
addonId: null,
|
|
@@ -31722,7 +32360,7 @@ Object.freeze({
|
|
|
31722
32360
|
addonId: null,
|
|
31723
32361
|
access: "view"
|
|
31724
32362
|
},
|
|
31725
|
-
"recording.
|
|
32363
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
31726
32364
|
capName: "recording",
|
|
31727
32365
|
capScope: "system",
|
|
31728
32366
|
addonId: null,
|
|
@@ -31740,12 +32378,30 @@ Object.freeze({
|
|
|
31740
32378
|
addonId: null,
|
|
31741
32379
|
access: "view"
|
|
31742
32380
|
},
|
|
32381
|
+
"recording.listRelocateJobs": {
|
|
32382
|
+
capName: "recording",
|
|
32383
|
+
capScope: "system",
|
|
32384
|
+
addonId: null,
|
|
32385
|
+
access: "view"
|
|
32386
|
+
},
|
|
31743
32387
|
"recording.locateSegment": {
|
|
31744
32388
|
capName: "recording",
|
|
31745
32389
|
capScope: "system",
|
|
31746
32390
|
addonId: null,
|
|
31747
32391
|
access: "view"
|
|
31748
32392
|
},
|
|
32393
|
+
"recording.pauseForStorageMigration": {
|
|
32394
|
+
capName: "recording",
|
|
32395
|
+
capScope: "system",
|
|
32396
|
+
addonId: null,
|
|
32397
|
+
access: "create"
|
|
32398
|
+
},
|
|
32399
|
+
"recording.planStorageRebalance": {
|
|
32400
|
+
capName: "recording",
|
|
32401
|
+
capScope: "system",
|
|
32402
|
+
addonId: null,
|
|
32403
|
+
access: "view"
|
|
32404
|
+
},
|
|
31749
32405
|
"recording.pruneFootage": {
|
|
31750
32406
|
capName: "recording",
|
|
31751
32407
|
capScope: "system",
|
|
@@ -31764,6 +32420,12 @@ Object.freeze({
|
|
|
31764
32420
|
addonId: null,
|
|
31765
32421
|
access: "view"
|
|
31766
32422
|
},
|
|
32423
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
32424
|
+
capName: "recording",
|
|
32425
|
+
capScope: "system",
|
|
32426
|
+
addonId: null,
|
|
32427
|
+
access: "create"
|
|
32428
|
+
},
|
|
31767
32429
|
"recording.relocateFootage": {
|
|
31768
32430
|
capName: "recording",
|
|
31769
32431
|
capScope: "system",
|
|
@@ -31788,44 +32450,68 @@ Object.freeze({
|
|
|
31788
32450
|
addonId: null,
|
|
31789
32451
|
access: "create"
|
|
31790
32452
|
},
|
|
32453
|
+
"recording.resumeForStorageMigration": {
|
|
32454
|
+
capName: "recording",
|
|
32455
|
+
capScope: "system",
|
|
32456
|
+
addonId: null,
|
|
32457
|
+
access: "create"
|
|
32458
|
+
},
|
|
31791
32459
|
"recording.setDeviceConfig": {
|
|
31792
32460
|
capName: "recording",
|
|
31793
32461
|
capScope: "system",
|
|
31794
32462
|
addonId: null,
|
|
31795
32463
|
access: "create"
|
|
31796
32464
|
},
|
|
32465
|
+
"recording.startStorageMigrationMove": {
|
|
32466
|
+
capName: "recording",
|
|
32467
|
+
capScope: "system",
|
|
32468
|
+
addonId: null,
|
|
32469
|
+
access: "create"
|
|
32470
|
+
},
|
|
32471
|
+
"recording.startStorageRebalance": {
|
|
32472
|
+
capName: "recording",
|
|
32473
|
+
capScope: "system",
|
|
32474
|
+
addonId: null,
|
|
32475
|
+
access: "create"
|
|
32476
|
+
},
|
|
31797
32477
|
"recordingExport.cancelExport": {
|
|
31798
|
-
capName: "
|
|
32478
|
+
capName: "recording-export",
|
|
31799
32479
|
capScope: "system",
|
|
31800
32480
|
addonId: null,
|
|
31801
32481
|
access: "create"
|
|
31802
32482
|
},
|
|
31803
32483
|
"recordingExport.createExport": {
|
|
31804
|
-
capName: "
|
|
32484
|
+
capName: "recording-export",
|
|
31805
32485
|
capScope: "system",
|
|
31806
32486
|
addonId: null,
|
|
31807
32487
|
access: "create"
|
|
31808
32488
|
},
|
|
31809
32489
|
"recordingExport.deleteExport": {
|
|
31810
|
-
capName: "
|
|
32490
|
+
capName: "recording-export",
|
|
31811
32491
|
capScope: "system",
|
|
31812
32492
|
addonId: null,
|
|
31813
32493
|
access: "delete"
|
|
31814
32494
|
},
|
|
31815
32495
|
"recordingExport.getDownloadUrl": {
|
|
31816
|
-
capName: "
|
|
32496
|
+
capName: "recording-export",
|
|
31817
32497
|
capScope: "system",
|
|
31818
32498
|
addonId: null,
|
|
31819
32499
|
access: "view"
|
|
31820
32500
|
},
|
|
31821
32501
|
"recordingExport.getExport": {
|
|
31822
|
-
capName: "
|
|
32502
|
+
capName: "recording-export",
|
|
31823
32503
|
capScope: "system",
|
|
31824
32504
|
addonId: null,
|
|
31825
32505
|
access: "view"
|
|
31826
32506
|
},
|
|
31827
32507
|
"recordingExport.listExports": {
|
|
31828
|
-
capName: "
|
|
32508
|
+
capName: "recording-export",
|
|
32509
|
+
capScope: "system",
|
|
32510
|
+
addonId: null,
|
|
32511
|
+
access: "view"
|
|
32512
|
+
},
|
|
32513
|
+
"recordingExport.readExportBytes": {
|
|
32514
|
+
capName: "recording-export",
|
|
31829
32515
|
capScope: "system",
|
|
31830
32516
|
addonId: null,
|
|
31831
32517
|
access: "view"
|
|
@@ -32184,6 +32870,30 @@ Object.freeze({
|
|
|
32184
32870
|
addonId: null,
|
|
32185
32871
|
access: "view"
|
|
32186
32872
|
},
|
|
32873
|
+
"storageMigration.cancel": {
|
|
32874
|
+
capName: "storage-migration",
|
|
32875
|
+
capScope: "system",
|
|
32876
|
+
addonId: null,
|
|
32877
|
+
access: "create"
|
|
32878
|
+
},
|
|
32879
|
+
"storageMigration.plan": {
|
|
32880
|
+
capName: "storage-migration",
|
|
32881
|
+
capScope: "system",
|
|
32882
|
+
addonId: null,
|
|
32883
|
+
access: "view"
|
|
32884
|
+
},
|
|
32885
|
+
"storageMigration.start": {
|
|
32886
|
+
capName: "storage-migration",
|
|
32887
|
+
capScope: "system",
|
|
32888
|
+
addonId: null,
|
|
32889
|
+
access: "create"
|
|
32890
|
+
},
|
|
32891
|
+
"storageMigration.status": {
|
|
32892
|
+
capName: "storage-migration",
|
|
32893
|
+
capScope: "system",
|
|
32894
|
+
addonId: null,
|
|
32895
|
+
access: "view"
|
|
32896
|
+
},
|
|
32187
32897
|
"storageProvider.abortUpload": {
|
|
32188
32898
|
capName: "storage-provider",
|
|
32189
32899
|
capScope: "system",
|
|
@@ -32562,12 +33272,42 @@ Object.freeze({
|
|
|
32562
33272
|
addonId: null,
|
|
32563
33273
|
access: "create"
|
|
32564
33274
|
},
|
|
33275
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
33276
|
+
capName: "terminal-session",
|
|
33277
|
+
capScope: "system",
|
|
33278
|
+
addonId: null,
|
|
33279
|
+
access: "create"
|
|
33280
|
+
},
|
|
32565
33281
|
"terminalSession.close": {
|
|
32566
33282
|
capName: "terminal-session",
|
|
32567
33283
|
capScope: "system",
|
|
32568
33284
|
addonId: null,
|
|
32569
33285
|
access: "create"
|
|
32570
33286
|
},
|
|
33287
|
+
"terminalSession.createInstance": {
|
|
33288
|
+
capName: "terminal-session",
|
|
33289
|
+
capScope: "system",
|
|
33290
|
+
addonId: null,
|
|
33291
|
+
access: "create"
|
|
33292
|
+
},
|
|
33293
|
+
"terminalSession.deleteInstance": {
|
|
33294
|
+
capName: "terminal-session",
|
|
33295
|
+
capScope: "system",
|
|
33296
|
+
addonId: null,
|
|
33297
|
+
access: "delete"
|
|
33298
|
+
},
|
|
33299
|
+
"terminalSession.listInstances": {
|
|
33300
|
+
capName: "terminal-session",
|
|
33301
|
+
capScope: "system",
|
|
33302
|
+
addonId: null,
|
|
33303
|
+
access: "view"
|
|
33304
|
+
},
|
|
33305
|
+
"terminalSession.listLegacyCameras": {
|
|
33306
|
+
capName: "terminal-session",
|
|
33307
|
+
capScope: "system",
|
|
33308
|
+
addonId: null,
|
|
33309
|
+
access: "view"
|
|
33310
|
+
},
|
|
32571
33311
|
"terminalSession.listProfiles": {
|
|
32572
33312
|
capName: "terminal-session",
|
|
32573
33313
|
capScope: "system",
|
|
@@ -32598,6 +33338,12 @@ Object.freeze({
|
|
|
32598
33338
|
addonId: null,
|
|
32599
33339
|
access: "create"
|
|
32600
33340
|
},
|
|
33341
|
+
"terminalSession.setInstanceEnabled": {
|
|
33342
|
+
capName: "terminal-session",
|
|
33343
|
+
capScope: "system",
|
|
33344
|
+
addonId: null,
|
|
33345
|
+
access: "create"
|
|
33346
|
+
},
|
|
32601
33347
|
"terminalSession.writeInput": {
|
|
32602
33348
|
capName: "terminal-session",
|
|
32603
33349
|
capScope: "system",
|
|
@@ -33349,6 +34095,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
33349
34095
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
33350
34096
|
var PriorityField = number().int().min(1).max(5);
|
|
33351
34097
|
/**
|
|
34098
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
34099
|
+
*
|
|
34100
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
34101
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
34102
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
34103
|
+
*
|
|
34104
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
34105
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
34106
|
+
*
|
|
34107
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
34108
|
+
*
|
|
34109
|
+
* 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.
|
|
34110
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
34111
|
+
* and therefore the length of a quiet night, does not move.
|
|
34112
|
+
*
|
|
34113
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
34114
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
34115
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
34116
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
34117
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
34118
|
+
*/
|
|
34119
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
34120
|
+
/**
|
|
34121
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
34122
|
+
*
|
|
34123
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
34124
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
34125
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
34126
|
+
* that range every ~583 ms.
|
|
34127
|
+
*
|
|
34128
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
34129
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
34130
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
34131
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
34132
|
+
* schema change and are the tracked follow-up.
|
|
34133
|
+
*
|
|
34134
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
34135
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
34136
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
34137
|
+
* happened.
|
|
34138
|
+
*/
|
|
34139
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
34140
|
+
/**
|
|
34141
|
+
* Caption burned into the notification's preview frame.
|
|
34142
|
+
*
|
|
34143
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
34144
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
34145
|
+
* templating dialect for one field would be a second thing to explain.
|
|
34146
|
+
*
|
|
34147
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
34148
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
34149
|
+
* the reason this is not `.min(1)`.
|
|
34150
|
+
*/
|
|
34151
|
+
var PreviewTextField = string().max(200);
|
|
34152
|
+
/**
|
|
34153
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
34154
|
+
*
|
|
34155
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
34156
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
34157
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
34158
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
34159
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
34160
|
+
* them.
|
|
34161
|
+
*
|
|
34162
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
34163
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
34164
|
+
* paying that on the deploy that shipped it.
|
|
34165
|
+
*
|
|
34166
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
34167
|
+
*/
|
|
34168
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
34169
|
+
/**
|
|
34170
|
+
* Which detection classes the notification reports counts for.
|
|
34171
|
+
*
|
|
34172
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
34173
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
34174
|
+
* class the window actually contained", which is what an operator who never
|
|
34175
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
34176
|
+
* counts cars all night).
|
|
34177
|
+
*
|
|
34178
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
34179
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
34180
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
34181
|
+
* not emit.
|
|
34182
|
+
*
|
|
34183
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
34184
|
+
* - `{{detections}}` — total over the reported classes
|
|
34185
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
34186
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
34187
|
+
* one per class, `count_` + the class name
|
|
34188
|
+
*
|
|
34189
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
34190
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
34191
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
34192
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
34193
|
+
*/
|
|
34194
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
34195
|
+
/**
|
|
33352
34196
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
33353
34197
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
33354
34198
|
* here (see the ownership note above).
|
|
@@ -33368,9 +34212,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
33368
34212
|
cadenceSec: CadenceSecField.default(15),
|
|
33369
34213
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
33370
34214
|
framerate: FramerateField.default(10),
|
|
34215
|
+
/**
|
|
34216
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
34217
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
34218
|
+
* field gets.
|
|
34219
|
+
*/
|
|
34220
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34221
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
34222
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33371
34223
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
33372
34224
|
targets: TargetsField,
|
|
33373
34225
|
template: TimelapseTemplateSchema.optional(),
|
|
34226
|
+
/**
|
|
34227
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
34228
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
34229
|
+
*
|
|
34230
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
34231
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
34232
|
+
* silently clear the caption too.
|
|
34233
|
+
*/
|
|
34234
|
+
previewText: PreviewTextField.optional(),
|
|
34235
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
34236
|
+
previewMode: PreviewModeField.default("image"),
|
|
34237
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
34238
|
+
reportClasses: ReportClassesField.optional(),
|
|
33374
34239
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
33375
34240
|
priority: PriorityField.default(3)
|
|
33376
34241
|
});
|
|
@@ -33381,8 +34246,13 @@ object({
|
|
|
33381
34246
|
schedule: NcScheduleSchema.optional(),
|
|
33382
34247
|
cadenceSec: CadenceSecField.optional(),
|
|
33383
34248
|
framerate: FramerateField.optional(),
|
|
34249
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
34250
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
33384
34251
|
targets: TargetsField.optional(),
|
|
33385
34252
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
34253
|
+
previewText: PreviewTextField.optional(),
|
|
34254
|
+
previewMode: PreviewModeField.optional(),
|
|
34255
|
+
reportClasses: ReportClassesField.optional(),
|
|
33386
34256
|
priority: PriorityField.optional()
|
|
33387
34257
|
});
|
|
33388
34258
|
TimelapseRuleInputSchema.extend({
|
|
@@ -33394,10 +34264,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
33394
34264
|
*/
|
|
33395
34265
|
ownerUserId: string().optional(),
|
|
33396
34266
|
/**
|
|
33397
|
-
* Epoch-ms of the
|
|
33398
|
-
*
|
|
34267
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
34268
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
34269
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
33399
34270
|
*/
|
|
33400
34271
|
lastGeneratedAt: number().optional(),
|
|
34272
|
+
/**
|
|
34273
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
34274
|
+
* re-generation guard's real durable state.
|
|
34275
|
+
*
|
|
34276
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
34277
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
34278
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
34279
|
+
* already done — and B's night is gone for good, because the window will not
|
|
34280
|
+
* come back.
|
|
34281
|
+
*
|
|
34282
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
34283
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
34284
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
34285
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
34286
|
+
* once, on the deploy that shipped the map.
|
|
34287
|
+
*/
|
|
34288
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
33401
34289
|
/** userId of the caller who created the rule (server-stamped). */
|
|
33402
34290
|
createdBy: string(),
|
|
33403
34291
|
createdAt: number(),
|