@camstack/addon-static-turn 1.2.11 → 1.2.13
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/static-turn.addon.js +936 -48
- package/dist/static-turn.addon.mjs +936 -48
- package/package.json +1 -1
|
@@ -7188,8 +7188,31 @@ var AdoptionJobSchema = object({
|
|
|
7188
7188
|
error: string().nullable()
|
|
7189
7189
|
});
|
|
7190
7190
|
/**
|
|
7191
|
-
* Per-camera FUNCTION SWITCHES
|
|
7192
|
-
*
|
|
7191
|
+
* Per-camera FUNCTION SWITCHES.
|
|
7192
|
+
*
|
|
7193
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
7194
|
+
*
|
|
7195
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
7196
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
7197
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
7198
|
+
* every function already had a settings page of its own, and a second place to
|
|
7199
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
7200
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
7201
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7202
|
+
* (which was always first-class; the switch was a veneer over
|
|
7203
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
7204
|
+
* per-device setting, the two camera planes to their own components.
|
|
7205
|
+
*
|
|
7206
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
7207
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
7208
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
7209
|
+
* never about a control panel.
|
|
7210
|
+
*
|
|
7211
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
7212
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
7213
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
7214
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
7215
|
+
* stop; nothing new may be built on it.
|
|
7193
7216
|
*
|
|
7194
7217
|
* ## This file adds no state
|
|
7195
7218
|
*
|
|
@@ -7534,14 +7557,21 @@ var RecordingConfigSchema = object({
|
|
|
7534
7557
|
/**
|
|
7535
7558
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7536
7559
|
*
|
|
7537
|
-
* One shape shared by the recorder
|
|
7538
|
-
*
|
|
7539
|
-
*
|
|
7540
|
-
*
|
|
7541
|
-
*
|
|
7542
|
-
|
|
7560
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7561
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7562
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7563
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7564
|
+
* addon surface.
|
|
7565
|
+
*/
|
|
7566
|
+
/**
|
|
7567
|
+
* `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
|
|
7568
|
+
* rebalance enqueues one job per (camera, profile). Refusing the second job —
|
|
7569
|
+
* what the engine did before — turned a fifteen-camera rebalance into fifteen
|
|
7570
|
+
* manual retries. Queued jobs run FIFO; a queued job that is cancelled never
|
|
7571
|
+
* runs at all.
|
|
7543
7572
|
*/
|
|
7544
7573
|
var RelocateJobStateSchema = _enum([
|
|
7574
|
+
"queued",
|
|
7545
7575
|
"running",
|
|
7546
7576
|
"done",
|
|
7547
7577
|
"failed",
|
|
@@ -7566,19 +7596,109 @@ var RelocateJobSchema = object({
|
|
|
7566
7596
|
finishedAt: number().nullable(),
|
|
7567
7597
|
error: string().nullable()
|
|
7568
7598
|
});
|
|
7599
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7600
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7601
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7569
7602
|
var RelocateFootageInputSchema = object({
|
|
7570
|
-
deviceId: number().optional(),
|
|
7571
7603
|
fromLocationId: string(),
|
|
7572
7604
|
toLocationId: string(),
|
|
7573
7605
|
entities: array(_enum(["segments"])).optional(),
|
|
7606
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7607
|
+
* pre-orchestration compatibility path. */
|
|
7608
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7609
|
+
/** Scope the move to ONE camera. Absent = every camera on the source, which
|
|
7610
|
+
* is what a whole-disk drain means. The rebalance path always sets it: its
|
|
7611
|
+
* unit is a (camera, profile) pile, not a disk. */
|
|
7612
|
+
deviceId: number().int().optional(),
|
|
7613
|
+
/** Scope the move to specific segment profiles (`high` / `mid` / `low`).
|
|
7614
|
+
* Finer than `footageClass`, which cannot separate high from mid — and the
|
|
7615
|
+
* placement plan assigns those two independently, so a rebalance that could
|
|
7616
|
+
* only say "recordings" would move footage the plan never asked to move. */
|
|
7617
|
+
profiles: array(string()).optional(),
|
|
7574
7618
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7575
7619
|
* never allowed to starve live writers. */
|
|
7576
7620
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7577
7621
|
});
|
|
7578
|
-
|
|
7579
|
-
|
|
7622
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7623
|
+
* from persistent recording settings: a migration never changes
|
|
7624
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7625
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7626
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7627
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7580
7628
|
toLocationId: string(),
|
|
7581
7629
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7630
|
+
}).extend({ leaseId: string().min(1) });
|
|
7631
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7632
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7633
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7634
|
+
var StorageMigrationClassSchema = _enum([
|
|
7635
|
+
"recordings",
|
|
7636
|
+
"recordingsLow",
|
|
7637
|
+
"eventMedia"
|
|
7638
|
+
]);
|
|
7639
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7640
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7641
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7642
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7643
|
+
recordings: string().min(1).optional(),
|
|
7644
|
+
recordingsLow: string().min(1).optional(),
|
|
7645
|
+
eventMedia: string().min(1).optional()
|
|
7646
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7647
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7648
|
+
var StorageMigrationInputSchema = object({
|
|
7649
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7650
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7651
|
+
});
|
|
7652
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7653
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7654
|
+
* verified. */
|
|
7655
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7656
|
+
"planning",
|
|
7657
|
+
"pausing",
|
|
7658
|
+
"moving",
|
|
7659
|
+
"verifying",
|
|
7660
|
+
"repointing",
|
|
7661
|
+
"refreshing",
|
|
7662
|
+
"resuming",
|
|
7663
|
+
"done",
|
|
7664
|
+
"failed",
|
|
7665
|
+
"cancelled"
|
|
7666
|
+
]);
|
|
7667
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7668
|
+
"pipeline",
|
|
7669
|
+
"recorder",
|
|
7670
|
+
"analytics"
|
|
7671
|
+
]);
|
|
7672
|
+
var StorageMigrationMoveSchema = object({
|
|
7673
|
+
storageClass: StorageMigrationClassSchema,
|
|
7674
|
+
fromLocationId: string(),
|
|
7675
|
+
toLocationId: string(),
|
|
7676
|
+
moverJobId: string().nullable(),
|
|
7677
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7678
|
+
error: string().nullable()
|
|
7679
|
+
});
|
|
7680
|
+
var StorageMigrationJobSchema = object({
|
|
7681
|
+
jobId: string(),
|
|
7682
|
+
phase: StorageMigrationPhaseSchema,
|
|
7683
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7684
|
+
throttleMbps: number(),
|
|
7685
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7686
|
+
pauseLeaseId: string().nullable(),
|
|
7687
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7688
|
+
repointed: boolean(),
|
|
7689
|
+
cancelRequested: boolean(),
|
|
7690
|
+
startedAt: number(),
|
|
7691
|
+
updatedAt: number(),
|
|
7692
|
+
finishedAt: number().nullable(),
|
|
7693
|
+
error: string().nullable()
|
|
7694
|
+
});
|
|
7695
|
+
var StorageMigrationPlanSchema = object({
|
|
7696
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7697
|
+
moves: array(object({
|
|
7698
|
+
storageClass: StorageMigrationClassSchema,
|
|
7699
|
+
fromLocationId: string(),
|
|
7700
|
+
toLocationId: string()
|
|
7701
|
+
}))
|
|
7582
7702
|
});
|
|
7583
7703
|
/**
|
|
7584
7704
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -7630,6 +7750,21 @@ var StorageLocationSchema = object({
|
|
|
7630
7750
|
nodeId: string().optional(),
|
|
7631
7751
|
isDefault: boolean().default(false),
|
|
7632
7752
|
isSystem: boolean().default(false),
|
|
7753
|
+
/**
|
|
7754
|
+
* Operator opt-in: whether consumers that BALANCE across several locations
|
|
7755
|
+
* of a type may write here. Recordings reads it today; event media and
|
|
7756
|
+
* backups are the next consumers, which is why the flag lives on the
|
|
7757
|
+
* location rather than in any one addon's store — nothing has to be
|
|
7758
|
+
* extended to add the next consumer.
|
|
7759
|
+
*
|
|
7760
|
+
* OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
|
|
7761
|
+
* flag existed reads back with no flag and keeps working exactly as before;
|
|
7762
|
+
* that is the whole compat story, and it is why no migration ships with it.
|
|
7763
|
+
* A newly CREATED sibling is stamped `false` by the orchestrator (creating a
|
|
7764
|
+
* disk must not silently start writing to it); the default of a type is
|
|
7765
|
+
* always stamped `true`.
|
|
7766
|
+
*/
|
|
7767
|
+
enabled: boolean().optional(),
|
|
7633
7768
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7634
7769
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
7635
7770
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -11932,7 +12067,8 @@ method(object({
|
|
|
11932
12067
|
}), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
|
|
11933
12068
|
/**
|
|
11934
12069
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
11935
|
-
* filesystem
|
|
12070
|
+
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12071
|
+
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
11936
12072
|
* admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
|
|
11937
12073
|
* (one provider per node); the hub calls it with `{nodeId}` so the codegen
|
|
11938
12074
|
* routes to that exact node (default `nodeIdMode:'routing'`).
|
|
@@ -13745,6 +13881,13 @@ var MaskGridDimsSchema = object({
|
|
|
13745
13881
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13746
13882
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13747
13883
|
* one trigger.
|
|
13884
|
+
*
|
|
13885
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13886
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13887
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13888
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13889
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13890
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13748
13891
|
*/
|
|
13749
13892
|
var NcDeliverySchema = _enum([
|
|
13750
13893
|
"immediate",
|
|
@@ -13759,15 +13902,32 @@ var NcDeliverySchema = _enum([
|
|
|
13759
13902
|
* depend on a provider's raw event name or payload shape.
|
|
13760
13903
|
*/
|
|
13761
13904
|
var NcSystemEventKindSchema = _enum([
|
|
13762
|
-
"
|
|
13763
|
-
"
|
|
13905
|
+
"device-online",
|
|
13906
|
+
"device-offline",
|
|
13907
|
+
"device-disabled",
|
|
13908
|
+
"device-enabled",
|
|
13764
13909
|
"stream-online",
|
|
13765
13910
|
"stream-offline",
|
|
13766
13911
|
"node-online",
|
|
13767
13912
|
"node-offline",
|
|
13768
13913
|
"addon-update-available",
|
|
13769
|
-
"server-update-available"
|
|
13914
|
+
"server-update-available",
|
|
13915
|
+
"alarm-triggered",
|
|
13916
|
+
"alarm-armed",
|
|
13917
|
+
"alarm-disarmed",
|
|
13918
|
+
"camera-online",
|
|
13919
|
+
"camera-offline",
|
|
13920
|
+
"camera-disabled",
|
|
13921
|
+
"camera-enabled"
|
|
13922
|
+
]);
|
|
13923
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13924
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13925
|
+
"camera-online",
|
|
13926
|
+
"camera-offline",
|
|
13927
|
+
"camera-disabled",
|
|
13928
|
+
"camera-enabled"
|
|
13770
13929
|
]);
|
|
13930
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13771
13931
|
/**
|
|
13772
13932
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13773
13933
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13776,6 +13936,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13776
13936
|
var NcSystemEventConditionSchema = object({
|
|
13777
13937
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13778
13938
|
deviceIds: array(number().int()).min(1).optional(),
|
|
13939
|
+
/**
|
|
13940
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
13941
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
13942
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
13943
|
+
*
|
|
13944
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
13945
|
+
* one reason: the intake cannot know which devices this household cares
|
|
13946
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
13947
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
13948
|
+
* does not carry) matches no `deviceTypes` list.
|
|
13949
|
+
*/
|
|
13950
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13779
13951
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13780
13952
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13781
13953
|
});
|
|
@@ -13826,6 +13998,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13826
13998
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13827
13999
|
});
|
|
13828
14000
|
/**
|
|
14001
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14002
|
+
*
|
|
14003
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14004
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14005
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14006
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14007
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14008
|
+
*
|
|
14009
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14010
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14011
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14012
|
+
*
|
|
14013
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14014
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14015
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14016
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14017
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14018
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14019
|
+
* ZodEffects the cap path would have to special-case).
|
|
14020
|
+
*
|
|
14021
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14022
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14023
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14024
|
+
* `samplingSeconds` decorative.
|
|
14025
|
+
*
|
|
14026
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14027
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14028
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14029
|
+
* an operator who typed `dog` mean the same thing.
|
|
14030
|
+
*/
|
|
14031
|
+
var NcAudioConditionSchema = object({
|
|
14032
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14033
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14034
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14035
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14036
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14037
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14038
|
+
/** Length of the sampling window in seconds. */
|
|
14039
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14040
|
+
});
|
|
14041
|
+
/**
|
|
13829
14042
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13830
14043
|
*
|
|
13831
14044
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14098,7 +14311,33 @@ var NcConditionsSchema = object({
|
|
|
14098
14311
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14099
14312
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14100
14313
|
*/
|
|
14101
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14314
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14315
|
+
/**
|
|
14316
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14317
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14318
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14319
|
+
* a window that is not full yet, neither filter given). See
|
|
14320
|
+
* {@link NcAudioCondition}.
|
|
14321
|
+
*
|
|
14322
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14323
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14324
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14325
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14326
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14327
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14328
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14329
|
+
*
|
|
14330
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14331
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14332
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14333
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14334
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14335
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14336
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14337
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14338
|
+
* does an audio rule become authorable.
|
|
14339
|
+
*/
|
|
14340
|
+
audio: NcAudioConditionSchema.optional()
|
|
14102
14341
|
});
|
|
14103
14342
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14104
14343
|
var NcRuleTargetSchema = object({
|
|
@@ -14212,6 +14451,73 @@ var NcThrottleSchema = object({
|
|
|
14212
14451
|
*/
|
|
14213
14452
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14214
14453
|
});
|
|
14454
|
+
/**
|
|
14455
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14456
|
+
* it judges may be.
|
|
14457
|
+
*
|
|
14458
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14459
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14460
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14461
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14462
|
+
* tokens for pixels the model pools away.
|
|
14463
|
+
*/
|
|
14464
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14465
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14466
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14467
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14468
|
+
var NcConfirmExpectSchema = object({
|
|
14469
|
+
op: _enum([
|
|
14470
|
+
">=",
|
|
14471
|
+
">",
|
|
14472
|
+
"<=",
|
|
14473
|
+
"<",
|
|
14474
|
+
"=="
|
|
14475
|
+
]),
|
|
14476
|
+
count: number().int().min(0).max(1e3)
|
|
14477
|
+
});
|
|
14478
|
+
/**
|
|
14479
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14480
|
+
* to ship and says whether it agrees with the rule.
|
|
14481
|
+
*
|
|
14482
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14483
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14484
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14485
|
+
*
|
|
14486
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14487
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14488
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14489
|
+
* open looks in the log exactly like a gate that works.
|
|
14490
|
+
*
|
|
14491
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14492
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14493
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14494
|
+
* above rather than trusting a parse it may never have seen.
|
|
14495
|
+
*/
|
|
14496
|
+
var NcConfirmSchema = object({
|
|
14497
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14498
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14499
|
+
enabled: boolean().default(false),
|
|
14500
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14501
|
+
profileId: string().optional(),
|
|
14502
|
+
/**
|
|
14503
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14504
|
+
* from the rule (its class and its expectation).
|
|
14505
|
+
*
|
|
14506
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14507
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14508
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14509
|
+
* turn and only rule-authored words land here.
|
|
14510
|
+
*/
|
|
14511
|
+
prompt: string().max(1e3).optional(),
|
|
14512
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14513
|
+
* own boolean verdict decides. */
|
|
14514
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14515
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14516
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14517
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14518
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14519
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14520
|
+
});
|
|
14215
14521
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14216
14522
|
var NcRuleInputSchema = object({
|
|
14217
14523
|
name: string().min(1).max(200),
|
|
@@ -14272,7 +14578,13 @@ var NcRuleInputSchema = object({
|
|
|
14272
14578
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14273
14579
|
* shape as every other actuation.
|
|
14274
14580
|
*/
|
|
14275
|
-
actions: NcRuleActionsSchema.optional()
|
|
14581
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14582
|
+
/**
|
|
14583
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14584
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14585
|
+
* did, and absent is the only way to say that without a migration.
|
|
14586
|
+
*/
|
|
14587
|
+
confirm: NcConfirmSchema.optional()
|
|
14276
14588
|
});
|
|
14277
14589
|
/**
|
|
14278
14590
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14283,7 +14595,37 @@ var NcRuleInputSchema = object({
|
|
|
14283
14595
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14284
14596
|
* `updateRule` patch.
|
|
14285
14597
|
*/
|
|
14286
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14598
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14599
|
+
disabledTargetIds: array(string()).optional(),
|
|
14600
|
+
/**
|
|
14601
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14602
|
+
*
|
|
14603
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14604
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14605
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14606
|
+
* one — which made every partial edit destructive:
|
|
14607
|
+
*
|
|
14608
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14609
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14610
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14611
|
+
*
|
|
14612
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14613
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14614
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14615
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14616
|
+
* within a minute of a two-field patch.
|
|
14617
|
+
*
|
|
14618
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14619
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14620
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14621
|
+
* absent key is now genuinely absent.
|
|
14622
|
+
*/
|
|
14623
|
+
enabled: boolean().optional(),
|
|
14624
|
+
conditions: NcConditionsSchema.optional(),
|
|
14625
|
+
media: NcMediaPolicySchema.optional(),
|
|
14626
|
+
throttle: NcThrottleSchema.optional(),
|
|
14627
|
+
priority: number().int().min(1).max(5).optional()
|
|
14628
|
+
});
|
|
14287
14629
|
/** A persisted rule. */
|
|
14288
14630
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14289
14631
|
id: string(),
|
|
@@ -14584,6 +14926,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14584
14926
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14585
14927
|
* copy would lie the first time a rule is disabled.
|
|
14586
14928
|
*/
|
|
14929
|
+
/**
|
|
14930
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
14931
|
+
*
|
|
14932
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
14933
|
+
* per-camera notification switch the Notification Center already owns,
|
|
14934
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
14935
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
14936
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
14937
|
+
* with the switches the operator actually used.
|
|
14938
|
+
*/
|
|
14939
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
14940
|
+
"muted",
|
|
14941
|
+
"detection-off",
|
|
14942
|
+
"offline"
|
|
14943
|
+
]);
|
|
14944
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
14945
|
+
deviceId: number().int(),
|
|
14946
|
+
reason: NcAlarmSkipReasonSchema
|
|
14947
|
+
});
|
|
14587
14948
|
var NcAlarmModeCoverageSchema = object({
|
|
14588
14949
|
mode: AlarmArmModeSchema,
|
|
14589
14950
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14591,7 +14952,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14591
14952
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14592
14953
|
allDevices: boolean(),
|
|
14593
14954
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14594
|
-
deviceIds: array(number().int())
|
|
14955
|
+
deviceIds: array(number().int()),
|
|
14956
|
+
/**
|
|
14957
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
14958
|
+
* excludes it.
|
|
14959
|
+
*
|
|
14960
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
14961
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
14962
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
14963
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
14964
|
+
* alarm tab.
|
|
14965
|
+
*/
|
|
14966
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14595
14967
|
});
|
|
14596
14968
|
var NcAlarmConfigSchema = object({
|
|
14597
14969
|
/**
|
|
@@ -15954,13 +16326,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15954
16326
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
15955
16327
|
kind: "mutation",
|
|
15956
16328
|
auth: "admin"
|
|
15957
|
-
}), method(
|
|
16329
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
15958
16330
|
kind: "mutation",
|
|
15959
16331
|
auth: "admin"
|
|
15960
|
-
}), method(object({
|
|
15961
|
-
kind: "
|
|
16332
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16333
|
+
kind: "mutation",
|
|
15962
16334
|
auth: "admin"
|
|
15963
|
-
}), method(
|
|
16335
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16336
|
+
kind: "mutation",
|
|
16337
|
+
auth: "admin"
|
|
16338
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16339
|
+
kind: "mutation",
|
|
16340
|
+
auth: "admin"
|
|
16341
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
15964
16342
|
kind: "mutation",
|
|
15965
16343
|
auth: "admin"
|
|
15966
16344
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17384,9 +17762,16 @@ var CameraStatusSchema = object({
|
|
|
17384
17762
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17385
17763
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17386
17764
|
/**
|
|
17387
|
-
* Per-camera
|
|
17765
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17388
17766
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17389
17767
|
*
|
|
17768
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17769
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17770
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17771
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17772
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17773
|
+
* the difference between a camera being off and a camera being dead.
|
|
17774
|
+
*
|
|
17390
17775
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17391
17776
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17392
17777
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17457,7 +17842,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17457
17842
|
reachable: boolean(),
|
|
17458
17843
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17459
17844
|
});
|
|
17460
|
-
method(object({
|
|
17845
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17846
|
+
kind: "mutation",
|
|
17847
|
+
auth: "admin"
|
|
17848
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17849
|
+
kind: "mutation",
|
|
17850
|
+
auth: "admin"
|
|
17851
|
+
}), method(object({
|
|
17461
17852
|
deviceId: number(),
|
|
17462
17853
|
agentNodeId: string()
|
|
17463
17854
|
}), object({ success: literal(true) }), {
|
|
@@ -18131,6 +18522,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18131
18522
|
locationId: string(),
|
|
18132
18523
|
targetBytes: number().int().positive()
|
|
18133
18524
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18525
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18526
|
+
kind: "mutation",
|
|
18527
|
+
auth: "admin"
|
|
18528
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18529
|
+
kind: "mutation",
|
|
18530
|
+
auth: "admin"
|
|
18531
|
+
});
|
|
18134
18532
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18135
18533
|
providerId: string().min(1),
|
|
18136
18534
|
displayName: string().min(1),
|
|
@@ -18234,6 +18632,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18234
18632
|
label: string(),
|
|
18235
18633
|
description: string().optional()
|
|
18236
18634
|
});
|
|
18635
|
+
/**
|
|
18636
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18637
|
+
* an instance declares a camera.
|
|
18638
|
+
*/
|
|
18639
|
+
var TerminalInstanceInfoSchema = object({
|
|
18640
|
+
instanceId: string(),
|
|
18641
|
+
cameraStableId: string(),
|
|
18642
|
+
nodeId: string(),
|
|
18643
|
+
profileId: string(),
|
|
18644
|
+
profileLabel: string(),
|
|
18645
|
+
name: string(),
|
|
18646
|
+
enabled: boolean()
|
|
18647
|
+
});
|
|
18648
|
+
var TerminalLegacyCameraSchema = object({
|
|
18649
|
+
stableId: string(),
|
|
18650
|
+
nodeId: string(),
|
|
18651
|
+
profileId: string(),
|
|
18652
|
+
profileLabel: string(),
|
|
18653
|
+
name: string(),
|
|
18654
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18655
|
+
adoptable: boolean()
|
|
18656
|
+
});
|
|
18237
18657
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18238
18658
|
seq: number().int().positive(),
|
|
18239
18659
|
kind: literal("data"),
|
|
@@ -18250,7 +18670,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18250
18670
|
snapshot: string().optional(),
|
|
18251
18671
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18252
18672
|
});
|
|
18253
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18673
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18674
|
+
targetNodeId: string().min(1),
|
|
18675
|
+
profileId: string().min(1),
|
|
18676
|
+
name: string().trim().min(1).max(160).optional()
|
|
18677
|
+
}), TerminalInstanceInfoSchema, {
|
|
18678
|
+
kind: "mutation",
|
|
18679
|
+
auth: "admin"
|
|
18680
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18681
|
+
kind: "mutation",
|
|
18682
|
+
auth: "admin"
|
|
18683
|
+
}), method(object({
|
|
18684
|
+
instanceId: string().min(1),
|
|
18685
|
+
enabled: boolean()
|
|
18686
|
+
}), TerminalInstanceInfoSchema, {
|
|
18687
|
+
kind: "mutation",
|
|
18688
|
+
auth: "admin"
|
|
18689
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18690
|
+
stableId: string().min(1),
|
|
18691
|
+
name: string().trim().min(1).max(160).optional()
|
|
18692
|
+
}), TerminalInstanceInfoSchema, {
|
|
18693
|
+
kind: "mutation",
|
|
18694
|
+
auth: "admin"
|
|
18695
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18254
18696
|
profileId: string(),
|
|
18255
18697
|
cols: number().int().positive(),
|
|
18256
18698
|
rows: number().int().positive()
|
|
@@ -18267,7 +18709,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18267
18709
|
}), method(object({
|
|
18268
18710
|
sessionId: string(),
|
|
18269
18711
|
afterSeq: number().int().nonnegative(),
|
|
18270
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18712
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18713
|
+
/**
|
|
18714
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18715
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18716
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18717
|
+
*/
|
|
18718
|
+
waitForOutput: boolean().optional()
|
|
18271
18719
|
}), TerminalOutputBatchSchema, {
|
|
18272
18720
|
kind: "mutation",
|
|
18273
18721
|
auth: "admin",
|
|
@@ -20231,6 +20679,7 @@ var FaceInfoSchema = object({
|
|
|
20231
20679
|
var FaceFilterEnum = _enum([
|
|
20232
20680
|
"unassigned",
|
|
20233
20681
|
"recognized",
|
|
20682
|
+
"identified",
|
|
20234
20683
|
"all"
|
|
20235
20684
|
]);
|
|
20236
20685
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20259,6 +20708,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20259
20708
|
kind: "mutation",
|
|
20260
20709
|
auth: "admin"
|
|
20261
20710
|
}), method(object({
|
|
20711
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20712
|
+
deviceId: number().int().optional(),
|
|
20262
20713
|
limit: number().int().positive().optional(),
|
|
20263
20714
|
filter: FaceFilterEnum.optional(),
|
|
20264
20715
|
/**
|
|
@@ -22024,6 +22475,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22024
22475
|
capName: string().min(1).max(64),
|
|
22025
22476
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22026
22477
|
valuePath: string().min(1).max(64)
|
|
22478
|
+
}),
|
|
22479
|
+
object({
|
|
22480
|
+
kind: literal("latest-recognition"),
|
|
22481
|
+
recognition: _enum(["person", "plate"])
|
|
22027
22482
|
})
|
|
22028
22483
|
]);
|
|
22029
22484
|
var OsdSlotBindingSchema = object({
|
|
@@ -22129,6 +22584,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22129
22584
|
}), object({ success: literal(true) }), {
|
|
22130
22585
|
kind: "mutation",
|
|
22131
22586
|
auth: "admin"
|
|
22587
|
+
}), method(object({
|
|
22588
|
+
sourceDeviceId: number().int(),
|
|
22589
|
+
targetDeviceId: number().int()
|
|
22590
|
+
}), object({
|
|
22591
|
+
copied: number().int().nonnegative(),
|
|
22592
|
+
skipped: number().int().nonnegative()
|
|
22593
|
+
}), {
|
|
22594
|
+
kind: "mutation",
|
|
22595
|
+
auth: "admin"
|
|
22132
22596
|
}), method(object({
|
|
22133
22597
|
deviceId: number().int(),
|
|
22134
22598
|
slotId: string().min(1),
|
|
@@ -22839,7 +23303,19 @@ var RecordingManifestSchema = object({
|
|
|
22839
23303
|
* profiles/subtrees/locations on this node). */
|
|
22840
23304
|
var RecordingDeviceUsageSchema = object({
|
|
22841
23305
|
deviceId: number(),
|
|
22842
|
-
usedBytes: number()
|
|
23306
|
+
usedBytes: number(),
|
|
23307
|
+
/**
|
|
23308
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23309
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23310
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23311
|
+
*
|
|
23312
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23313
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23314
|
+
* field must keep validating that older provider's payload: the framework
|
|
23315
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23316
|
+
* the later of the two.
|
|
23317
|
+
*/
|
|
23318
|
+
oldestMs: number().nullable().optional()
|
|
22843
23319
|
});
|
|
22844
23320
|
/** Recording storage usage + capacity for one storage location. */
|
|
22845
23321
|
var RecordingLocationUsageSchema = object({
|
|
@@ -22867,6 +23343,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
22867
23343
|
locations: array(RecordingLocationUsageSchema)
|
|
22868
23344
|
});
|
|
22869
23345
|
/**
|
|
23346
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23347
|
+
*
|
|
23348
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23349
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23350
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23351
|
+
* location, run FIFO behind the single-flight mover.
|
|
23352
|
+
*
|
|
23353
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23354
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23355
|
+
* (empty on the plan).
|
|
23356
|
+
*/
|
|
23357
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23358
|
+
deviceId: number(),
|
|
23359
|
+
profile: string(),
|
|
23360
|
+
fromLocationId: string(),
|
|
23361
|
+
toLocationId: string(),
|
|
23362
|
+
bytes: number(),
|
|
23363
|
+
files: number().int()
|
|
23364
|
+
});
|
|
23365
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23366
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23367
|
+
* that had nothing to do. */
|
|
23368
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23369
|
+
"unassigned",
|
|
23370
|
+
"target-not-writable",
|
|
23371
|
+
"below-threshold",
|
|
23372
|
+
"no-headroom"
|
|
23373
|
+
]);
|
|
23374
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23375
|
+
deviceId: number(),
|
|
23376
|
+
profile: string(),
|
|
23377
|
+
fromLocationId: string(),
|
|
23378
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23379
|
+
toLocationId: string().nullable(),
|
|
23380
|
+
bytes: number(),
|
|
23381
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23382
|
+
});
|
|
23383
|
+
var RecordingRebalancePlanSchema = object({
|
|
23384
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23385
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23386
|
+
bytesToMove: number(),
|
|
23387
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23388
|
+
jobIds: array(string())
|
|
23389
|
+
});
|
|
23390
|
+
var RecordingRebalanceInputSchema = object({
|
|
23391
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23392
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23393
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23394
|
+
minMoveGb: number().min(0).optional()
|
|
23395
|
+
});
|
|
23396
|
+
/**
|
|
22870
23397
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22871
23398
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22872
23399
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23014,6 +23541,21 @@ method(object({
|
|
|
23014
23541
|
}), {
|
|
23015
23542
|
kind: "mutation",
|
|
23016
23543
|
auth: "admin"
|
|
23544
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23545
|
+
kind: "mutation",
|
|
23546
|
+
auth: "admin"
|
|
23547
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23548
|
+
kind: "mutation",
|
|
23549
|
+
auth: "admin"
|
|
23550
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23551
|
+
kind: "mutation",
|
|
23552
|
+
auth: "admin"
|
|
23553
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23554
|
+
kind: "mutation",
|
|
23555
|
+
auth: "admin"
|
|
23556
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23557
|
+
kind: "mutation",
|
|
23558
|
+
auth: "admin"
|
|
23017
23559
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23018
23560
|
kind: "mutation",
|
|
23019
23561
|
auth: "admin"
|
|
@@ -23023,9 +23565,15 @@ method(object({
|
|
|
23023
23565
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23024
23566
|
kind: "mutation",
|
|
23025
23567
|
auth: "admin"
|
|
23568
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23569
|
+
kind: "query",
|
|
23570
|
+
auth: "admin"
|
|
23571
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23572
|
+
kind: "mutation",
|
|
23573
|
+
auth: "admin"
|
|
23026
23574
|
});
|
|
23027
23575
|
/**
|
|
23028
|
-
* `
|
|
23576
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23029
23577
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23030
23578
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23031
23579
|
* delete-after-download.
|
|
@@ -23040,10 +23588,42 @@ method(object({
|
|
|
23040
23588
|
*/
|
|
23041
23589
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23042
23590
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23591
|
+
/**
|
|
23592
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23593
|
+
*
|
|
23594
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23595
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23596
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23597
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23598
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23599
|
+
*/
|
|
23600
|
+
var ExportDenseRangeSchema = object({
|
|
23601
|
+
fromSec: number().nonnegative(),
|
|
23602
|
+
toSec: number().nonnegative()
|
|
23603
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23604
|
+
/**
|
|
23605
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23606
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23607
|
+
*
|
|
23608
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23609
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23610
|
+
*/
|
|
23611
|
+
var ExportDenseSchema = object({
|
|
23612
|
+
everyMs: number().int().positive(),
|
|
23613
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23614
|
+
});
|
|
23043
23615
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23044
23616
|
var ExportTimelapseSchema = object({
|
|
23045
23617
|
everyMs: number().int().positive(),
|
|
23046
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23618
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23619
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23620
|
+
dense: ExportDenseSchema.optional()
|
|
23621
|
+
}).superRefine((v, ctx) => {
|
|
23622
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23623
|
+
code: ZodIssueCode.custom,
|
|
23624
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23625
|
+
path: ["dense", "everyMs"]
|
|
23626
|
+
});
|
|
23047
23627
|
});
|
|
23048
23628
|
/**
|
|
23049
23629
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23101,6 +23681,19 @@ var ExportDownloadSchema = object({
|
|
|
23101
23681
|
url: string(),
|
|
23102
23682
|
endpoints: array(string())
|
|
23103
23683
|
});
|
|
23684
|
+
/**
|
|
23685
|
+
* A finished export's bytes, inline.
|
|
23686
|
+
*
|
|
23687
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23688
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23689
|
+
*/
|
|
23690
|
+
var ExportBytesSchema = object({
|
|
23691
|
+
base64: string(),
|
|
23692
|
+
contentType: string(),
|
|
23693
|
+
/** Suggested filename, extension included. */
|
|
23694
|
+
name: string(),
|
|
23695
|
+
bytes: number().int().nonnegative()
|
|
23696
|
+
});
|
|
23104
23697
|
method(object({
|
|
23105
23698
|
deviceId: number(),
|
|
23106
23699
|
profile: string(),
|
|
@@ -23125,6 +23718,9 @@ method(object({
|
|
|
23125
23718
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23126
23719
|
kind: "query",
|
|
23127
23720
|
auth: "protected"
|
|
23721
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23722
|
+
kind: "query",
|
|
23723
|
+
auth: "protected"
|
|
23128
23724
|
});
|
|
23129
23725
|
/**
|
|
23130
23726
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27142,6 +27738,12 @@ Object.freeze({
|
|
|
27142
27738
|
addonId: null,
|
|
27143
27739
|
access: "delete"
|
|
27144
27740
|
},
|
|
27741
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27742
|
+
capName: "osd-manager",
|
|
27743
|
+
capScope: "system",
|
|
27744
|
+
addonId: null,
|
|
27745
|
+
access: "create"
|
|
27746
|
+
},
|
|
27145
27747
|
"osdManager.getConditionSupport": {
|
|
27146
27748
|
capName: "osd-manager",
|
|
27147
27749
|
capScope: "system",
|
|
@@ -27238,7 +27840,7 @@ Object.freeze({
|
|
|
27238
27840
|
addonId: null,
|
|
27239
27841
|
access: "create"
|
|
27240
27842
|
},
|
|
27241
|
-
"pipelineAnalytics.
|
|
27843
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27242
27844
|
capName: "pipeline-analytics",
|
|
27243
27845
|
capScope: "device",
|
|
27244
27846
|
addonId: null,
|
|
@@ -27310,12 +27912,6 @@ Object.freeze({
|
|
|
27310
27912
|
addonId: null,
|
|
27311
27913
|
access: "view"
|
|
27312
27914
|
},
|
|
27313
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27314
|
-
capName: "pipeline-analytics",
|
|
27315
|
-
capScope: "device",
|
|
27316
|
-
addonId: null,
|
|
27317
|
-
access: "view"
|
|
27318
|
-
},
|
|
27319
27915
|
"pipelineAnalytics.getMotionEvents": {
|
|
27320
27916
|
capName: "pipeline-analytics",
|
|
27321
27917
|
capScope: "device",
|
|
@@ -27352,6 +27948,12 @@ Object.freeze({
|
|
|
27352
27948
|
addonId: null,
|
|
27353
27949
|
access: "view"
|
|
27354
27950
|
},
|
|
27951
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
27952
|
+
capName: "pipeline-analytics",
|
|
27953
|
+
capScope: "device",
|
|
27954
|
+
addonId: null,
|
|
27955
|
+
access: "view"
|
|
27956
|
+
},
|
|
27355
27957
|
"pipelineAnalytics.getTrack": {
|
|
27356
27958
|
capName: "pipeline-analytics",
|
|
27357
27959
|
capScope: "device",
|
|
@@ -27430,6 +28032,12 @@ Object.freeze({
|
|
|
27430
28032
|
addonId: null,
|
|
27431
28033
|
access: "view"
|
|
27432
28034
|
},
|
|
28035
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28036
|
+
capName: "pipeline-analytics",
|
|
28037
|
+
capScope: "device",
|
|
28038
|
+
addonId: null,
|
|
28039
|
+
access: "create"
|
|
28040
|
+
},
|
|
27433
28041
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27434
28042
|
capName: "pipeline-analytics",
|
|
27435
28043
|
capScope: "device",
|
|
@@ -27460,7 +28068,7 @@ Object.freeze({
|
|
|
27460
28068
|
addonId: null,
|
|
27461
28069
|
access: "create"
|
|
27462
28070
|
},
|
|
27463
|
-
"pipelineAnalytics.
|
|
28071
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27464
28072
|
capName: "pipeline-analytics",
|
|
27465
28073
|
capScope: "device",
|
|
27466
28074
|
addonId: null,
|
|
@@ -27472,6 +28080,12 @@ Object.freeze({
|
|
|
27472
28080
|
addonId: null,
|
|
27473
28081
|
access: "create"
|
|
27474
28082
|
},
|
|
28083
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28084
|
+
capName: "pipeline-analytics",
|
|
28085
|
+
capScope: "device",
|
|
28086
|
+
addonId: null,
|
|
28087
|
+
access: "create"
|
|
28088
|
+
},
|
|
27475
28089
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27476
28090
|
capName: "pipeline-analytics",
|
|
27477
28091
|
capScope: "device",
|
|
@@ -27496,6 +28110,12 @@ Object.freeze({
|
|
|
27496
28110
|
addonId: null,
|
|
27497
28111
|
access: "create"
|
|
27498
28112
|
},
|
|
28113
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28114
|
+
capName: "pipeline-analytics",
|
|
28115
|
+
capScope: "device",
|
|
28116
|
+
addonId: null,
|
|
28117
|
+
access: "create"
|
|
28118
|
+
},
|
|
27499
28119
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27500
28120
|
capName: "pipeline-analytics",
|
|
27501
28121
|
capScope: "device",
|
|
@@ -27862,6 +28482,12 @@ Object.freeze({
|
|
|
27862
28482
|
addonId: null,
|
|
27863
28483
|
access: "view"
|
|
27864
28484
|
},
|
|
28485
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28486
|
+
capName: "pipeline-orchestrator",
|
|
28487
|
+
capScope: "system",
|
|
28488
|
+
addonId: null,
|
|
28489
|
+
access: "create"
|
|
28490
|
+
},
|
|
27865
28491
|
"pipelineOrchestrator.rebalance": {
|
|
27866
28492
|
capName: "pipeline-orchestrator",
|
|
27867
28493
|
capScope: "system",
|
|
@@ -27886,6 +28512,12 @@ Object.freeze({
|
|
|
27886
28512
|
addonId: null,
|
|
27887
28513
|
access: "view"
|
|
27888
28514
|
},
|
|
28515
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28516
|
+
capName: "pipeline-orchestrator",
|
|
28517
|
+
capScope: "system",
|
|
28518
|
+
addonId: null,
|
|
28519
|
+
access: "create"
|
|
28520
|
+
},
|
|
27889
28521
|
"pipelineOrchestrator.saveTemplate": {
|
|
27890
28522
|
capName: "pipeline-orchestrator",
|
|
27891
28523
|
capScope: "system",
|
|
@@ -28282,7 +28914,13 @@ Object.freeze({
|
|
|
28282
28914
|
addonId: null,
|
|
28283
28915
|
access: "create"
|
|
28284
28916
|
},
|
|
28285
|
-
"recording.
|
|
28917
|
+
"recording.cancelRelocateJob": {
|
|
28918
|
+
capName: "recording",
|
|
28919
|
+
capScope: "system",
|
|
28920
|
+
addonId: null,
|
|
28921
|
+
access: "create"
|
|
28922
|
+
},
|
|
28923
|
+
"recording.cancelStorageMigrationMove": {
|
|
28286
28924
|
capName: "recording",
|
|
28287
28925
|
capScope: "system",
|
|
28288
28926
|
addonId: null,
|
|
@@ -28318,7 +28956,7 @@ Object.freeze({
|
|
|
28318
28956
|
addonId: null,
|
|
28319
28957
|
access: "view"
|
|
28320
28958
|
},
|
|
28321
|
-
"recording.
|
|
28959
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28322
28960
|
capName: "recording",
|
|
28323
28961
|
capScope: "system",
|
|
28324
28962
|
addonId: null,
|
|
@@ -28336,12 +28974,30 @@ Object.freeze({
|
|
|
28336
28974
|
addonId: null,
|
|
28337
28975
|
access: "view"
|
|
28338
28976
|
},
|
|
28977
|
+
"recording.listRelocateJobs": {
|
|
28978
|
+
capName: "recording",
|
|
28979
|
+
capScope: "system",
|
|
28980
|
+
addonId: null,
|
|
28981
|
+
access: "view"
|
|
28982
|
+
},
|
|
28339
28983
|
"recording.locateSegment": {
|
|
28340
28984
|
capName: "recording",
|
|
28341
28985
|
capScope: "system",
|
|
28342
28986
|
addonId: null,
|
|
28343
28987
|
access: "view"
|
|
28344
28988
|
},
|
|
28989
|
+
"recording.pauseForStorageMigration": {
|
|
28990
|
+
capName: "recording",
|
|
28991
|
+
capScope: "system",
|
|
28992
|
+
addonId: null,
|
|
28993
|
+
access: "create"
|
|
28994
|
+
},
|
|
28995
|
+
"recording.planStorageRebalance": {
|
|
28996
|
+
capName: "recording",
|
|
28997
|
+
capScope: "system",
|
|
28998
|
+
addonId: null,
|
|
28999
|
+
access: "view"
|
|
29000
|
+
},
|
|
28345
29001
|
"recording.pruneFootage": {
|
|
28346
29002
|
capName: "recording",
|
|
28347
29003
|
capScope: "system",
|
|
@@ -28360,6 +29016,12 @@ Object.freeze({
|
|
|
28360
29016
|
addonId: null,
|
|
28361
29017
|
access: "view"
|
|
28362
29018
|
},
|
|
29019
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29020
|
+
capName: "recording",
|
|
29021
|
+
capScope: "system",
|
|
29022
|
+
addonId: null,
|
|
29023
|
+
access: "create"
|
|
29024
|
+
},
|
|
28363
29025
|
"recording.relocateFootage": {
|
|
28364
29026
|
capName: "recording",
|
|
28365
29027
|
capScope: "system",
|
|
@@ -28384,44 +29046,68 @@ Object.freeze({
|
|
|
28384
29046
|
addonId: null,
|
|
28385
29047
|
access: "create"
|
|
28386
29048
|
},
|
|
29049
|
+
"recording.resumeForStorageMigration": {
|
|
29050
|
+
capName: "recording",
|
|
29051
|
+
capScope: "system",
|
|
29052
|
+
addonId: null,
|
|
29053
|
+
access: "create"
|
|
29054
|
+
},
|
|
28387
29055
|
"recording.setDeviceConfig": {
|
|
28388
29056
|
capName: "recording",
|
|
28389
29057
|
capScope: "system",
|
|
28390
29058
|
addonId: null,
|
|
28391
29059
|
access: "create"
|
|
28392
29060
|
},
|
|
29061
|
+
"recording.startStorageMigrationMove": {
|
|
29062
|
+
capName: "recording",
|
|
29063
|
+
capScope: "system",
|
|
29064
|
+
addonId: null,
|
|
29065
|
+
access: "create"
|
|
29066
|
+
},
|
|
29067
|
+
"recording.startStorageRebalance": {
|
|
29068
|
+
capName: "recording",
|
|
29069
|
+
capScope: "system",
|
|
29070
|
+
addonId: null,
|
|
29071
|
+
access: "create"
|
|
29072
|
+
},
|
|
28393
29073
|
"recordingExport.cancelExport": {
|
|
28394
|
-
capName: "
|
|
29074
|
+
capName: "recording-export",
|
|
28395
29075
|
capScope: "system",
|
|
28396
29076
|
addonId: null,
|
|
28397
29077
|
access: "create"
|
|
28398
29078
|
},
|
|
28399
29079
|
"recordingExport.createExport": {
|
|
28400
|
-
capName: "
|
|
29080
|
+
capName: "recording-export",
|
|
28401
29081
|
capScope: "system",
|
|
28402
29082
|
addonId: null,
|
|
28403
29083
|
access: "create"
|
|
28404
29084
|
},
|
|
28405
29085
|
"recordingExport.deleteExport": {
|
|
28406
|
-
capName: "
|
|
29086
|
+
capName: "recording-export",
|
|
28407
29087
|
capScope: "system",
|
|
28408
29088
|
addonId: null,
|
|
28409
29089
|
access: "delete"
|
|
28410
29090
|
},
|
|
28411
29091
|
"recordingExport.getDownloadUrl": {
|
|
28412
|
-
capName: "
|
|
29092
|
+
capName: "recording-export",
|
|
28413
29093
|
capScope: "system",
|
|
28414
29094
|
addonId: null,
|
|
28415
29095
|
access: "view"
|
|
28416
29096
|
},
|
|
28417
29097
|
"recordingExport.getExport": {
|
|
28418
|
-
capName: "
|
|
29098
|
+
capName: "recording-export",
|
|
28419
29099
|
capScope: "system",
|
|
28420
29100
|
addonId: null,
|
|
28421
29101
|
access: "view"
|
|
28422
29102
|
},
|
|
28423
29103
|
"recordingExport.listExports": {
|
|
28424
|
-
capName: "
|
|
29104
|
+
capName: "recording-export",
|
|
29105
|
+
capScope: "system",
|
|
29106
|
+
addonId: null,
|
|
29107
|
+
access: "view"
|
|
29108
|
+
},
|
|
29109
|
+
"recordingExport.readExportBytes": {
|
|
29110
|
+
capName: "recording-export",
|
|
28425
29111
|
capScope: "system",
|
|
28426
29112
|
addonId: null,
|
|
28427
29113
|
access: "view"
|
|
@@ -28780,6 +29466,30 @@ Object.freeze({
|
|
|
28780
29466
|
addonId: null,
|
|
28781
29467
|
access: "view"
|
|
28782
29468
|
},
|
|
29469
|
+
"storageMigration.cancel": {
|
|
29470
|
+
capName: "storage-migration",
|
|
29471
|
+
capScope: "system",
|
|
29472
|
+
addonId: null,
|
|
29473
|
+
access: "create"
|
|
29474
|
+
},
|
|
29475
|
+
"storageMigration.plan": {
|
|
29476
|
+
capName: "storage-migration",
|
|
29477
|
+
capScope: "system",
|
|
29478
|
+
addonId: null,
|
|
29479
|
+
access: "view"
|
|
29480
|
+
},
|
|
29481
|
+
"storageMigration.start": {
|
|
29482
|
+
capName: "storage-migration",
|
|
29483
|
+
capScope: "system",
|
|
29484
|
+
addonId: null,
|
|
29485
|
+
access: "create"
|
|
29486
|
+
},
|
|
29487
|
+
"storageMigration.status": {
|
|
29488
|
+
capName: "storage-migration",
|
|
29489
|
+
capScope: "system",
|
|
29490
|
+
addonId: null,
|
|
29491
|
+
access: "view"
|
|
29492
|
+
},
|
|
28783
29493
|
"storageProvider.abortUpload": {
|
|
28784
29494
|
capName: "storage-provider",
|
|
28785
29495
|
capScope: "system",
|
|
@@ -29158,12 +29868,42 @@ Object.freeze({
|
|
|
29158
29868
|
addonId: null,
|
|
29159
29869
|
access: "create"
|
|
29160
29870
|
},
|
|
29871
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29872
|
+
capName: "terminal-session",
|
|
29873
|
+
capScope: "system",
|
|
29874
|
+
addonId: null,
|
|
29875
|
+
access: "create"
|
|
29876
|
+
},
|
|
29161
29877
|
"terminalSession.close": {
|
|
29162
29878
|
capName: "terminal-session",
|
|
29163
29879
|
capScope: "system",
|
|
29164
29880
|
addonId: null,
|
|
29165
29881
|
access: "create"
|
|
29166
29882
|
},
|
|
29883
|
+
"terminalSession.createInstance": {
|
|
29884
|
+
capName: "terminal-session",
|
|
29885
|
+
capScope: "system",
|
|
29886
|
+
addonId: null,
|
|
29887
|
+
access: "create"
|
|
29888
|
+
},
|
|
29889
|
+
"terminalSession.deleteInstance": {
|
|
29890
|
+
capName: "terminal-session",
|
|
29891
|
+
capScope: "system",
|
|
29892
|
+
addonId: null,
|
|
29893
|
+
access: "delete"
|
|
29894
|
+
},
|
|
29895
|
+
"terminalSession.listInstances": {
|
|
29896
|
+
capName: "terminal-session",
|
|
29897
|
+
capScope: "system",
|
|
29898
|
+
addonId: null,
|
|
29899
|
+
access: "view"
|
|
29900
|
+
},
|
|
29901
|
+
"terminalSession.listLegacyCameras": {
|
|
29902
|
+
capName: "terminal-session",
|
|
29903
|
+
capScope: "system",
|
|
29904
|
+
addonId: null,
|
|
29905
|
+
access: "view"
|
|
29906
|
+
},
|
|
29167
29907
|
"terminalSession.listProfiles": {
|
|
29168
29908
|
capName: "terminal-session",
|
|
29169
29909
|
capScope: "system",
|
|
@@ -29194,6 +29934,12 @@ Object.freeze({
|
|
|
29194
29934
|
addonId: null,
|
|
29195
29935
|
access: "create"
|
|
29196
29936
|
},
|
|
29937
|
+
"terminalSession.setInstanceEnabled": {
|
|
29938
|
+
capName: "terminal-session",
|
|
29939
|
+
capScope: "system",
|
|
29940
|
+
addonId: null,
|
|
29941
|
+
access: "create"
|
|
29942
|
+
},
|
|
29197
29943
|
"terminalSession.writeInput": {
|
|
29198
29944
|
capName: "terminal-session",
|
|
29199
29945
|
capScope: "system",
|
|
@@ -29738,6 +30484,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29738
30484
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29739
30485
|
var PriorityField = number().int().min(1).max(5);
|
|
29740
30486
|
/**
|
|
30487
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30488
|
+
*
|
|
30489
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30490
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30491
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30492
|
+
*
|
|
30493
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30494
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30495
|
+
*
|
|
30496
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30497
|
+
*
|
|
30498
|
+
* 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.
|
|
30499
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30500
|
+
* and therefore the length of a quiet night, does not move.
|
|
30501
|
+
*
|
|
30502
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30503
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30504
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30505
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30506
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30507
|
+
*/
|
|
30508
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30509
|
+
/**
|
|
30510
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30511
|
+
*
|
|
30512
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30513
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30514
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30515
|
+
* that range every ~583 ms.
|
|
30516
|
+
*
|
|
30517
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30518
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30519
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30520
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30521
|
+
* schema change and are the tracked follow-up.
|
|
30522
|
+
*
|
|
30523
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30524
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30525
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30526
|
+
* happened.
|
|
30527
|
+
*/
|
|
30528
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30529
|
+
/**
|
|
30530
|
+
* Caption burned into the notification's preview frame.
|
|
30531
|
+
*
|
|
30532
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30533
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30534
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30535
|
+
*
|
|
30536
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30537
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30538
|
+
* the reason this is not `.min(1)`.
|
|
30539
|
+
*/
|
|
30540
|
+
var PreviewTextField = string().max(200);
|
|
30541
|
+
/**
|
|
30542
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30543
|
+
*
|
|
30544
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30545
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30546
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30547
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30548
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30549
|
+
* them.
|
|
30550
|
+
*
|
|
30551
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30552
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30553
|
+
* paying that on the deploy that shipped it.
|
|
30554
|
+
*
|
|
30555
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30556
|
+
*/
|
|
30557
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30558
|
+
/**
|
|
30559
|
+
* Which detection classes the notification reports counts for.
|
|
30560
|
+
*
|
|
30561
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30562
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30563
|
+
* class the window actually contained", which is what an operator who never
|
|
30564
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30565
|
+
* counts cars all night).
|
|
30566
|
+
*
|
|
30567
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30568
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30569
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30570
|
+
* not emit.
|
|
30571
|
+
*
|
|
30572
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30573
|
+
* - `{{detections}}` — total over the reported classes
|
|
30574
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30575
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30576
|
+
* one per class, `count_` + the class name
|
|
30577
|
+
*
|
|
30578
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30579
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30580
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30581
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30582
|
+
*/
|
|
30583
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30584
|
+
/**
|
|
29741
30585
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29742
30586
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29743
30587
|
* here (see the ownership note above).
|
|
@@ -29757,9 +30601,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29757
30601
|
cadenceSec: CadenceSecField.default(15),
|
|
29758
30602
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29759
30603
|
framerate: FramerateField.default(10),
|
|
30604
|
+
/**
|
|
30605
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30606
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30607
|
+
* field gets.
|
|
30608
|
+
*/
|
|
30609
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30610
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30611
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29760
30612
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29761
30613
|
targets: TargetsField,
|
|
29762
30614
|
template: TimelapseTemplateSchema.optional(),
|
|
30615
|
+
/**
|
|
30616
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30617
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30618
|
+
*
|
|
30619
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30620
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30621
|
+
* silently clear the caption too.
|
|
30622
|
+
*/
|
|
30623
|
+
previewText: PreviewTextField.optional(),
|
|
30624
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30625
|
+
previewMode: PreviewModeField.default("image"),
|
|
30626
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30627
|
+
reportClasses: ReportClassesField.optional(),
|
|
29763
30628
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29764
30629
|
priority: PriorityField.default(3)
|
|
29765
30630
|
});
|
|
@@ -29770,8 +30635,13 @@ object({
|
|
|
29770
30635
|
schedule: NcScheduleSchema.optional(),
|
|
29771
30636
|
cadenceSec: CadenceSecField.optional(),
|
|
29772
30637
|
framerate: FramerateField.optional(),
|
|
30638
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30639
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29773
30640
|
targets: TargetsField.optional(),
|
|
29774
30641
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30642
|
+
previewText: PreviewTextField.optional(),
|
|
30643
|
+
previewMode: PreviewModeField.optional(),
|
|
30644
|
+
reportClasses: ReportClassesField.optional(),
|
|
29775
30645
|
priority: PriorityField.optional()
|
|
29776
30646
|
});
|
|
29777
30647
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29783,10 +30653,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29783
30653
|
*/
|
|
29784
30654
|
ownerUserId: string().optional(),
|
|
29785
30655
|
/**
|
|
29786
|
-
* Epoch-ms of the
|
|
29787
|
-
*
|
|
30656
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30657
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30658
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29788
30659
|
*/
|
|
29789
30660
|
lastGeneratedAt: number().optional(),
|
|
30661
|
+
/**
|
|
30662
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30663
|
+
* re-generation guard's real durable state.
|
|
30664
|
+
*
|
|
30665
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30666
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30667
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30668
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30669
|
+
* come back.
|
|
30670
|
+
*
|
|
30671
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30672
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30673
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30674
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30675
|
+
* once, on the deploy that shipped the map.
|
|
30676
|
+
*/
|
|
30677
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29790
30678
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29791
30679
|
createdBy: string(),
|
|
29792
30680
|
createdAt: number(),
|