@camstack/addon-tailscale 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/client/tailscale.addon.js +1 -1
- package/dist/client/tailscale.addon.mjs +1 -1
- package/dist/{dist-BRf5w7H0.mjs → dist-BSHt2t-G.mjs} +936 -48
- package/dist/{dist-CSc3X4AE.js → dist-DBqlCVJV.js} +936 -48
- package/dist/ingress/tailscale-ingress.addon.js +1 -1
- package/dist/ingress/tailscale-ingress.addon.mjs +1 -1
- 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'`).
|
|
@@ -13762,6 +13898,13 @@ var MaskGridDimsSchema = object({
|
|
|
13762
13898
|
* `package-event` are pure trigger kinds (no urgency dimension). Extending
|
|
13763
13899
|
* this one field keeps the schema additive — a rule still declares exactly
|
|
13764
13900
|
* one trigger.
|
|
13901
|
+
*
|
|
13902
|
+
* AUDIO rules add no member here, for the reason occupancy added none: the
|
|
13903
|
+
* enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
|
|
13904
|
+
* mirror.ts` fails the build on a member the app cannot render) and every
|
|
13905
|
+
* member costs a release train. A sustained-sound rule is therefore an
|
|
13906
|
+
* `immediate` rule carrying {@link NcConditions.audio} — the condition is the
|
|
13907
|
+
* trigger discriminator, exactly as `occupancy` is on `device-event`.
|
|
13765
13908
|
*/
|
|
13766
13909
|
var NcDeliverySchema = _enum([
|
|
13767
13910
|
"immediate",
|
|
@@ -13776,15 +13919,32 @@ var NcDeliverySchema = _enum([
|
|
|
13776
13919
|
* depend on a provider's raw event name or payload shape.
|
|
13777
13920
|
*/
|
|
13778
13921
|
var NcSystemEventKindSchema = _enum([
|
|
13779
|
-
"
|
|
13780
|
-
"
|
|
13922
|
+
"device-online",
|
|
13923
|
+
"device-offline",
|
|
13924
|
+
"device-disabled",
|
|
13925
|
+
"device-enabled",
|
|
13781
13926
|
"stream-online",
|
|
13782
13927
|
"stream-offline",
|
|
13783
13928
|
"node-online",
|
|
13784
13929
|
"node-offline",
|
|
13785
13930
|
"addon-update-available",
|
|
13786
|
-
"server-update-available"
|
|
13931
|
+
"server-update-available",
|
|
13932
|
+
"alarm-triggered",
|
|
13933
|
+
"alarm-armed",
|
|
13934
|
+
"alarm-disarmed",
|
|
13935
|
+
"camera-online",
|
|
13936
|
+
"camera-offline",
|
|
13937
|
+
"camera-disabled",
|
|
13938
|
+
"camera-enabled"
|
|
13939
|
+
]);
|
|
13940
|
+
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
13941
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
13942
|
+
"camera-online",
|
|
13943
|
+
"camera-offline",
|
|
13944
|
+
"camera-disabled",
|
|
13945
|
+
"camera-enabled"
|
|
13787
13946
|
]);
|
|
13947
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
13788
13948
|
/**
|
|
13789
13949
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
13790
13950
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
@@ -13793,6 +13953,18 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13793
13953
|
var NcSystemEventConditionSchema = object({
|
|
13794
13954
|
kinds: array(NcSystemEventKindSchema).min(1),
|
|
13795
13955
|
deviceIds: array(number().int()).min(1).optional(),
|
|
13956
|
+
/**
|
|
13957
|
+
* Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
|
|
13958
|
+
* `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
|
|
13959
|
+
* is what a liveness rule means when nobody said otherwise.
|
|
13960
|
+
*
|
|
13961
|
+
* This is where "only my cameras" is expressed, and it lives on the rule for
|
|
13962
|
+
* one reason: the intake cannot know which devices this household cares
|
|
13963
|
+
* about, and a producer-side filter is one no operator can change. Fails
|
|
13964
|
+
* CLOSED — a subject whose device type is unknown (an id the device mirror
|
|
13965
|
+
* does not carry) matches no `deviceTypes` list.
|
|
13966
|
+
*/
|
|
13967
|
+
deviceTypes: array(string().min(1)).min(1).optional(),
|
|
13796
13968
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13797
13969
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13798
13970
|
});
|
|
@@ -13843,6 +14015,47 @@ var NcOccupancyConditionSchema = object({
|
|
|
13843
14015
|
sustainSeconds: number().int().min(0).max(3600).default(15)
|
|
13844
14016
|
});
|
|
13845
14017
|
/**
|
|
14018
|
+
* Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
|
|
14019
|
+
*
|
|
14020
|
+
* Operator-approved vocabulary (2026-08-12, option A — the same one the
|
|
14021
|
+
* reference notifier uses, so an operator moving between them re-uses what
|
|
14022
|
+
* they already know): a rule matches when, over a sampling window of
|
|
14023
|
+
* `samplingSeconds`, at least `hitPercent`% of the audio samples in that
|
|
14024
|
+
* window are HITS. A sample is a hit when it satisfies BOTH present filters:
|
|
14025
|
+
*
|
|
14026
|
+
* - `dbThreshold` — its level is at or above this many dBFS (see
|
|
14027
|
+
* {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
|
|
14028
|
+
* - `labels` — the classifier put at least one of these labels on it.
|
|
14029
|
+
*
|
|
14030
|
+
* Both are OPTIONAL and independent, which is the point of the shape: a
|
|
14031
|
+
* loudness rule ("something loud at 3am") needs no model to be right, and a
|
|
14032
|
+
* label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
|
|
14033
|
+
* is given** — a window in which every sample is trivially a hit would fire on
|
|
14034
|
+
* silence, so the engine refuses such a condition rather than notifying on
|
|
14035
|
+
* nothing (the schema cannot express "at least one of" without becoming a
|
|
14036
|
+
* ZodEffects the cap path would have to special-case).
|
|
14037
|
+
*
|
|
14038
|
+
* `hitPercent` is over the samples the window actually HOLDS, and the window
|
|
14039
|
+
* must be FULL before it can match — a window that has been open for two
|
|
14040
|
+
* seconds of its ten is 100% of nothing, and firing on it would make
|
|
14041
|
+
* `samplingSeconds` decorative.
|
|
14042
|
+
*
|
|
14043
|
+
* Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
|
|
14044
|
+
* `audio-*` ids). Both spellings are accepted — the matcher normalizes the
|
|
14045
|
+
* `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
|
|
14046
|
+
* an operator who typed `dog` mean the same thing.
|
|
14047
|
+
*/
|
|
14048
|
+
var NcAudioConditionSchema = object({
|
|
14049
|
+
/** Audio macro labels; absent = any sound (level-only rule). */
|
|
14050
|
+
labels: array(string().min(1)).min(1).optional(),
|
|
14051
|
+
/** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
|
|
14052
|
+
dbThreshold: number().min(-96).max(0).optional(),
|
|
14053
|
+
/** Percentage of the window's samples that must be hits (1–100). */
|
|
14054
|
+
hitPercent: number().int().min(1).max(100).default(60),
|
|
14055
|
+
/** Length of the sampling window in seconds. */
|
|
14056
|
+
samplingSeconds: number().int().min(1).max(300).default(10)
|
|
14057
|
+
});
|
|
14058
|
+
/**
|
|
13846
14059
|
* Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
|
|
13847
14060
|
*
|
|
13848
14061
|
* The values are not symmetric, and deliberately so — the absent value has to
|
|
@@ -14115,7 +14328,33 @@ var NcConditionsSchema = object({
|
|
|
14115
14328
|
* threshold and holds for `sustainSeconds`. Fail-closed on missing
|
|
14116
14329
|
* substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
|
|
14117
14330
|
*/
|
|
14118
|
-
occupancy: NcOccupancyConditionSchema.optional()
|
|
14331
|
+
occupancy: NcOccupancyConditionSchema.optional(),
|
|
14332
|
+
/**
|
|
14333
|
+
* IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
|
|
14334
|
+
* `samplingSeconds` window clear the optional `dbThreshold` and carry one of
|
|
14335
|
+
* the optional `labels`. Fail-closed on missing substrate (no audio samples,
|
|
14336
|
+
* a window that is not full yet, neither filter given). See
|
|
14337
|
+
* {@link NcAudioCondition}.
|
|
14338
|
+
*
|
|
14339
|
+
* Presence of this key is what makes a rule an AUDIO rule: the engine fires
|
|
14340
|
+
* it ONLY on a confirmed audio window, and a rule carrying it never fires on
|
|
14341
|
+
* a detection, a track or a device event (the same fail-closed pairing
|
|
14342
|
+
* `occupancy` has with the `device-event` trigger). That is how audio labels
|
|
14343
|
+
* leave `classes`: an audio rule names its sounds HERE, and the legacy path
|
|
14344
|
+
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14345
|
+
* classified sample) stays exactly as it was for rules that already use it.
|
|
14346
|
+
*
|
|
14347
|
+
* NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
|
|
14348
|
+
* rather than an oversight: the viewer mirrors the descriptor enums BY HAND
|
|
14349
|
+
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14350
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
|
|
14351
|
+
* condition fields it does not know when a rule is saved from the phone.
|
|
14352
|
+
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14353
|
+
* operator loses a rule's conditions by opening it — so the descriptor, the
|
|
14354
|
+
* admin widget and the viewer mirror land together (P2 + P3), and only then
|
|
14355
|
+
* does an audio rule become authorable.
|
|
14356
|
+
*/
|
|
14357
|
+
audio: NcAudioConditionSchema.optional()
|
|
14119
14358
|
});
|
|
14120
14359
|
/** One delivery target: a `notification-output` Target ref + passthrough params. */
|
|
14121
14360
|
var NcRuleTargetSchema = object({
|
|
@@ -14229,6 +14468,73 @@ var NcThrottleSchema = object({
|
|
|
14229
14468
|
*/
|
|
14230
14469
|
granularity: NcThrottleGranularitySchema.optional()
|
|
14231
14470
|
});
|
|
14471
|
+
/**
|
|
14472
|
+
* How long the confirm gate may hold ONE notification, and how big the picture
|
|
14473
|
+
* it judges may be.
|
|
14474
|
+
*
|
|
14475
|
+
* The clamp is the product decision, not a coincidence of the model: p50 was
|
|
14476
|
+
* 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
|
|
14477
|
+
* arrives after the visitor has gone is not a notification. 448 px was enough
|
|
14478
|
+
* to score 16/16 on the operator's parking scenario — bigger costs latency and
|
|
14479
|
+
* tokens for pixels the model pools away.
|
|
14480
|
+
*/
|
|
14481
|
+
var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
|
|
14482
|
+
var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
|
|
14483
|
+
var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
|
|
14484
|
+
/** Comparison the model's COUNT must satisfy for the notification to fire. */
|
|
14485
|
+
var NcConfirmExpectSchema = object({
|
|
14486
|
+
op: _enum([
|
|
14487
|
+
">=",
|
|
14488
|
+
">",
|
|
14489
|
+
"<=",
|
|
14490
|
+
"<",
|
|
14491
|
+
"=="
|
|
14492
|
+
]),
|
|
14493
|
+
count: number().int().min(0).max(1e3)
|
|
14494
|
+
});
|
|
14495
|
+
/**
|
|
14496
|
+
* AI CONFIRM — a vision model looks at the picture this notification is about
|
|
14497
|
+
* to ship and says whether it agrees with the rule.
|
|
14498
|
+
*
|
|
14499
|
+
* It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
|
|
14500
|
+
* crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
|
|
14501
|
+
* on the operator's phone is not a verdict about this notification.
|
|
14502
|
+
*
|
|
14503
|
+
* FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
|
|
14504
|
+
* whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
|
|
14505
|
+
* the default and every fail-open is COUNTED, because a gate that always fails
|
|
14506
|
+
* open looks in the log exactly like a gate that works.
|
|
14507
|
+
*
|
|
14508
|
+
* Every field is `.optional()` rather than relied on as a Zod default at the
|
|
14509
|
+
* runtime seam: a Zod default does NOT run on the addon→addon cap path (three
|
|
14510
|
+
* production failures in one day), so the gate reads absent as the constant
|
|
14511
|
+
* above rather than trusting a parse it may never have seen.
|
|
14512
|
+
*/
|
|
14513
|
+
var NcConfirmSchema = object({
|
|
14514
|
+
/** Off unless asked for. An absent `confirm` and `enabled:false` are the
|
|
14515
|
+
* same thing, and both mean "deliver exactly as before". */
|
|
14516
|
+
enabled: boolean().default(false),
|
|
14517
|
+
/** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
|
|
14518
|
+
profileId: string().optional(),
|
|
14519
|
+
/**
|
|
14520
|
+
* The operator's question, in his own words. Absent = a question derived
|
|
14521
|
+
* from the rule (its class and its expectation).
|
|
14522
|
+
*
|
|
14523
|
+
* NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
|
|
14524
|
+
* banners, signage and plates as instructions if you let them reach the
|
|
14525
|
+
* prompt — proven live — so the authoritative contract stays in the system
|
|
14526
|
+
* turn and only rule-authored words land here.
|
|
14527
|
+
*/
|
|
14528
|
+
prompt: string().max(1e3).optional(),
|
|
14529
|
+
/** Fire only when the model's count satisfies this. Absent = the model's
|
|
14530
|
+
* own boolean verdict decides. */
|
|
14531
|
+
expect: NcConfirmExpectSchema.optional(),
|
|
14532
|
+
timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
|
|
14533
|
+
/** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
|
|
14534
|
+
onTimeout: _enum(["fire", "suppress"]).default("fire"),
|
|
14535
|
+
/** Longest edge the judged image is downscaled to before it is sent. */
|
|
14536
|
+
maxImagePx: number().int().min(64).max(2048).default(448)
|
|
14537
|
+
});
|
|
14232
14538
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
14233
14539
|
var NcRuleInputSchema = object({
|
|
14234
14540
|
name: string().min(1).max(200),
|
|
@@ -14289,7 +14595,13 @@ var NcRuleInputSchema = object({
|
|
|
14289
14595
|
* `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
|
|
14290
14596
|
* shape as every other actuation.
|
|
14291
14597
|
*/
|
|
14292
|
-
actions: NcRuleActionsSchema.optional()
|
|
14598
|
+
actions: NcRuleActionsSchema.optional(),
|
|
14599
|
+
/**
|
|
14600
|
+
* AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
|
|
14601
|
+
* a rule that predates the gate must keep delivering byte-for-byte as it
|
|
14602
|
+
* did, and absent is the only way to say that without a migration.
|
|
14603
|
+
*/
|
|
14604
|
+
confirm: NcConfirmSchema.optional()
|
|
14293
14605
|
});
|
|
14294
14606
|
/**
|
|
14295
14607
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -14300,7 +14612,37 @@ var NcRuleInputSchema = object({
|
|
|
14300
14612
|
* still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
|
|
14301
14613
|
* `updateRule` patch.
|
|
14302
14614
|
*/
|
|
14303
|
-
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14615
|
+
var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
14616
|
+
disabledTargetIds: array(string()).optional(),
|
|
14617
|
+
/**
|
|
14618
|
+
* `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
|
|
14619
|
+
*
|
|
14620
|
+
* It makes the key optional to SUPPLY; the parse still materialises the
|
|
14621
|
+
* default when the key is absent. And `NcRuleStore.update` merges with
|
|
14622
|
+
* `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
|
|
14623
|
+
* one — which made every partial edit destructive:
|
|
14624
|
+
*
|
|
14625
|
+
* nc.updateRule({ throttle }) → conditions reset to `{}`
|
|
14626
|
+
* nc.setRuleTargetEnabled(...) → conditions reset to `{}`
|
|
14627
|
+
* setEnabled(ruleId, false) → conditions reset to `{}`
|
|
14628
|
+
*
|
|
14629
|
+
* A rule scoped to one camera and one zone silently became a rule that
|
|
14630
|
+
* matches EVERY event on EVERY camera, and lost its `media` policy
|
|
14631
|
+
* (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
|
|
14632
|
+
* live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
|
|
14633
|
+
* within a minute of a two-field patch.
|
|
14634
|
+
*
|
|
14635
|
+
* So every defaulted field is re-declared here WITHOUT its default. The
|
|
14636
|
+
* inner defaults still apply when the caller DOES send the key — `{}` for
|
|
14637
|
+
* conditions remains a real instruction ("clear them") — and only the
|
|
14638
|
+
* absent key is now genuinely absent.
|
|
14639
|
+
*/
|
|
14640
|
+
enabled: boolean().optional(),
|
|
14641
|
+
conditions: NcConditionsSchema.optional(),
|
|
14642
|
+
media: NcMediaPolicySchema.optional(),
|
|
14643
|
+
throttle: NcThrottleSchema.optional(),
|
|
14644
|
+
priority: number().int().min(1).max(5).optional()
|
|
14645
|
+
});
|
|
14304
14646
|
/** A persisted rule. */
|
|
14305
14647
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
14306
14648
|
id: string(),
|
|
@@ -14601,6 +14943,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
|
|
|
14601
14943
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
14602
14944
|
* copy would lie the first time a rule is disabled.
|
|
14603
14945
|
*/
|
|
14946
|
+
/**
|
|
14947
|
+
* Why a device a mode NAMES is nonetheless not armed by it.
|
|
14948
|
+
*
|
|
14949
|
+
* Each value is an existing authority, never a new flag (D62): `muted` is the
|
|
14950
|
+
* per-camera notification switch the Notification Center already owns,
|
|
14951
|
+
* `detection-off` is the device's own detection binding being inactive, and
|
|
14952
|
+
* `offline` is the device manager's liveness. A fourth reason would mean a
|
|
14953
|
+
* fourth authority, and inventing one here is how a panel starts disagreeing
|
|
14954
|
+
* with the switches the operator actually used.
|
|
14955
|
+
*/
|
|
14956
|
+
var NcAlarmSkipReasonSchema = _enum([
|
|
14957
|
+
"muted",
|
|
14958
|
+
"detection-off",
|
|
14959
|
+
"offline"
|
|
14960
|
+
]);
|
|
14961
|
+
var NcAlarmSkippedDeviceSchema = object({
|
|
14962
|
+
deviceId: number().int(),
|
|
14963
|
+
reason: NcAlarmSkipReasonSchema
|
|
14964
|
+
});
|
|
14604
14965
|
var NcAlarmModeCoverageSchema = object({
|
|
14605
14966
|
mode: AlarmArmModeSchema,
|
|
14606
14967
|
/** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
|
|
@@ -14608,7 +14969,18 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
14608
14969
|
/** At least one covering rule has no device scope, so the mode covers all. */
|
|
14609
14970
|
allDevices: boolean(),
|
|
14610
14971
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
14611
|
-
deviceIds: array(number().int())
|
|
14972
|
+
deviceIds: array(number().int()),
|
|
14973
|
+
/**
|
|
14974
|
+
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
14975
|
+
* excludes it.
|
|
14976
|
+
*
|
|
14977
|
+
* "Away armed — 12 cameras" is a promise, and a muted camera among those
|
|
14978
|
+
* twelve makes it false in exactly the way nobody notices until an incident.
|
|
14979
|
+
* Defaulted to `[]` so a coverage answer computed before this field existed
|
|
14980
|
+
* still parses as "nothing known to be skipped" rather than failing the whole
|
|
14981
|
+
* alarm tab.
|
|
14982
|
+
*/
|
|
14983
|
+
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
14612
14984
|
});
|
|
14613
14985
|
var NcAlarmConfigSchema = object({
|
|
14614
14986
|
/**
|
|
@@ -15971,13 +16343,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15971
16343
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
15972
16344
|
kind: "mutation",
|
|
15973
16345
|
auth: "admin"
|
|
15974
|
-
}), method(
|
|
16346
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
15975
16347
|
kind: "mutation",
|
|
15976
16348
|
auth: "admin"
|
|
15977
|
-
}), method(object({
|
|
15978
|
-
kind: "
|
|
16349
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16350
|
+
kind: "mutation",
|
|
15979
16351
|
auth: "admin"
|
|
15980
|
-
}), method(
|
|
16352
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16353
|
+
kind: "mutation",
|
|
16354
|
+
auth: "admin"
|
|
16355
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16356
|
+
kind: "mutation",
|
|
16357
|
+
auth: "admin"
|
|
16358
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
15981
16359
|
kind: "mutation",
|
|
15982
16360
|
auth: "admin"
|
|
15983
16361
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17401,9 +17779,16 @@ var CameraStatusSchema = object({
|
|
|
17401
17779
|
audio: CameraAudioStatusSchema.nullable(),
|
|
17402
17780
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
17403
17781
|
/**
|
|
17404
|
-
* Per-camera
|
|
17782
|
+
* Per-camera functions an OPERATOR has turned off
|
|
17405
17783
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17406
17784
|
*
|
|
17785
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
17786
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
17787
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
17788
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17789
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
17790
|
+
* the difference between a camera being off and a camera being dead.
|
|
17791
|
+
*
|
|
17407
17792
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
17408
17793
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
17409
17794
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17474,7 +17859,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17474
17859
|
reachable: boolean(),
|
|
17475
17860
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17476
17861
|
});
|
|
17477
|
-
method(object({
|
|
17862
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17863
|
+
kind: "mutation",
|
|
17864
|
+
auth: "admin"
|
|
17865
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17866
|
+
kind: "mutation",
|
|
17867
|
+
auth: "admin"
|
|
17868
|
+
}), method(object({
|
|
17478
17869
|
deviceId: number(),
|
|
17479
17870
|
agentNodeId: string()
|
|
17480
17871
|
}), object({ success: literal(true) }), {
|
|
@@ -18148,6 +18539,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18148
18539
|
locationId: string(),
|
|
18149
18540
|
targetBytes: number().int().positive()
|
|
18150
18541
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18542
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18543
|
+
kind: "mutation",
|
|
18544
|
+
auth: "admin"
|
|
18545
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18546
|
+
kind: "mutation",
|
|
18547
|
+
auth: "admin"
|
|
18548
|
+
});
|
|
18151
18549
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18152
18550
|
providerId: string().min(1),
|
|
18153
18551
|
displayName: string().min(1),
|
|
@@ -18251,6 +18649,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18251
18649
|
label: string(),
|
|
18252
18650
|
description: string().optional()
|
|
18253
18651
|
});
|
|
18652
|
+
/**
|
|
18653
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18654
|
+
* an instance declares a camera.
|
|
18655
|
+
*/
|
|
18656
|
+
var TerminalInstanceInfoSchema = object({
|
|
18657
|
+
instanceId: string(),
|
|
18658
|
+
cameraStableId: string(),
|
|
18659
|
+
nodeId: string(),
|
|
18660
|
+
profileId: string(),
|
|
18661
|
+
profileLabel: string(),
|
|
18662
|
+
name: string(),
|
|
18663
|
+
enabled: boolean()
|
|
18664
|
+
});
|
|
18665
|
+
var TerminalLegacyCameraSchema = object({
|
|
18666
|
+
stableId: string(),
|
|
18667
|
+
nodeId: string(),
|
|
18668
|
+
profileId: string(),
|
|
18669
|
+
profileLabel: string(),
|
|
18670
|
+
name: string(),
|
|
18671
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18672
|
+
adoptable: boolean()
|
|
18673
|
+
});
|
|
18254
18674
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18255
18675
|
seq: number().int().positive(),
|
|
18256
18676
|
kind: literal("data"),
|
|
@@ -18267,7 +18687,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18267
18687
|
snapshot: string().optional(),
|
|
18268
18688
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18269
18689
|
});
|
|
18270
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18690
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18691
|
+
targetNodeId: string().min(1),
|
|
18692
|
+
profileId: string().min(1),
|
|
18693
|
+
name: string().trim().min(1).max(160).optional()
|
|
18694
|
+
}), TerminalInstanceInfoSchema, {
|
|
18695
|
+
kind: "mutation",
|
|
18696
|
+
auth: "admin"
|
|
18697
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18698
|
+
kind: "mutation",
|
|
18699
|
+
auth: "admin"
|
|
18700
|
+
}), method(object({
|
|
18701
|
+
instanceId: string().min(1),
|
|
18702
|
+
enabled: boolean()
|
|
18703
|
+
}), TerminalInstanceInfoSchema, {
|
|
18704
|
+
kind: "mutation",
|
|
18705
|
+
auth: "admin"
|
|
18706
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18707
|
+
stableId: string().min(1),
|
|
18708
|
+
name: string().trim().min(1).max(160).optional()
|
|
18709
|
+
}), TerminalInstanceInfoSchema, {
|
|
18710
|
+
kind: "mutation",
|
|
18711
|
+
auth: "admin"
|
|
18712
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18271
18713
|
profileId: string(),
|
|
18272
18714
|
cols: number().int().positive(),
|
|
18273
18715
|
rows: number().int().positive()
|
|
@@ -18284,7 +18726,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18284
18726
|
}), method(object({
|
|
18285
18727
|
sessionId: string(),
|
|
18286
18728
|
afterSeq: number().int().nonnegative(),
|
|
18287
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18729
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18730
|
+
/**
|
|
18731
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18732
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18733
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18734
|
+
*/
|
|
18735
|
+
waitForOutput: boolean().optional()
|
|
18288
18736
|
}), TerminalOutputBatchSchema, {
|
|
18289
18737
|
kind: "mutation",
|
|
18290
18738
|
auth: "admin",
|
|
@@ -20225,6 +20673,7 @@ var FaceInfoSchema = object({
|
|
|
20225
20673
|
var FaceFilterEnum = _enum([
|
|
20226
20674
|
"unassigned",
|
|
20227
20675
|
"recognized",
|
|
20676
|
+
"identified",
|
|
20228
20677
|
"all"
|
|
20229
20678
|
]);
|
|
20230
20679
|
var MediaFileLiteSchema$1 = object({
|
|
@@ -20253,6 +20702,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
|
|
|
20253
20702
|
kind: "mutation",
|
|
20254
20703
|
auth: "admin"
|
|
20255
20704
|
}), method(object({
|
|
20705
|
+
/** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
|
|
20706
|
+
deviceId: number().int().optional(),
|
|
20256
20707
|
limit: number().int().positive().optional(),
|
|
20257
20708
|
filter: FaceFilterEnum.optional(),
|
|
20258
20709
|
/**
|
|
@@ -22079,6 +22530,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
22079
22530
|
capName: string().min(1).max(64),
|
|
22080
22531
|
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
22081
22532
|
valuePath: string().min(1).max(64)
|
|
22533
|
+
}),
|
|
22534
|
+
object({
|
|
22535
|
+
kind: literal("latest-recognition"),
|
|
22536
|
+
recognition: _enum(["person", "plate"])
|
|
22082
22537
|
})
|
|
22083
22538
|
]);
|
|
22084
22539
|
var OsdSlotBindingSchema = object({
|
|
@@ -22184,6 +22639,15 @@ method(object({ deviceId: number().int() }), object({
|
|
|
22184
22639
|
}), object({ success: literal(true) }), {
|
|
22185
22640
|
kind: "mutation",
|
|
22186
22641
|
auth: "admin"
|
|
22642
|
+
}), method(object({
|
|
22643
|
+
sourceDeviceId: number().int(),
|
|
22644
|
+
targetDeviceId: number().int()
|
|
22645
|
+
}), object({
|
|
22646
|
+
copied: number().int().nonnegative(),
|
|
22647
|
+
skipped: number().int().nonnegative()
|
|
22648
|
+
}), {
|
|
22649
|
+
kind: "mutation",
|
|
22650
|
+
auth: "admin"
|
|
22187
22651
|
}), method(object({
|
|
22188
22652
|
deviceId: number().int(),
|
|
22189
22653
|
slotId: string().min(1),
|
|
@@ -22894,7 +23358,19 @@ var RecordingManifestSchema = object({
|
|
|
22894
23358
|
* profiles/subtrees/locations on this node). */
|
|
22895
23359
|
var RecordingDeviceUsageSchema = object({
|
|
22896
23360
|
deviceId: number(),
|
|
22897
|
-
usedBytes: number()
|
|
23361
|
+
usedBytes: number(),
|
|
23362
|
+
/**
|
|
23363
|
+
* Start of this camera's OLDEST indexed segment, across every profile and
|
|
23364
|
+
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
23365
|
+
* only honest answer to "is retention actually holding?" per camera.
|
|
23366
|
+
*
|
|
23367
|
+
* `null` = the camera has no footage. OPTIONAL because a recorder that
|
|
23368
|
+
* predates this field omits it entirely, and a hub whose types carry the
|
|
23369
|
+
* field must keep validating that older provider's payload: the framework
|
|
23370
|
+
* (types) and the addon ship on different trains, and the addon is usually
|
|
23371
|
+
* the later of the two.
|
|
23372
|
+
*/
|
|
23373
|
+
oldestMs: number().nullable().optional()
|
|
22898
23374
|
});
|
|
22899
23375
|
/** Recording storage usage + capacity for one storage location. */
|
|
22900
23376
|
var RecordingLocationUsageSchema = object({
|
|
@@ -22922,6 +23398,57 @@ var RecordingStorageUsageSchema = object({
|
|
|
22922
23398
|
locations: array(RecordingLocationUsageSchema)
|
|
22923
23399
|
});
|
|
22924
23400
|
/**
|
|
23401
|
+
* The OPERATOR-ARMED half of multi-location recordings (D116).
|
|
23402
|
+
*
|
|
23403
|
+
* The placement plan decides where NEW writes go and moves nothing. A rebalance
|
|
23404
|
+
* is the operator asking for the EXISTING archive to be brought into line with
|
|
23405
|
+
* that plan: one relocate job per (camera, profile) pile that sits on the wrong
|
|
23406
|
+
* location, run FIFO behind the single-flight mover.
|
|
23407
|
+
*
|
|
23408
|
+
* `plan…` and `start…` return the SAME shape deliberately — what the operator
|
|
23409
|
+
* confirms is exactly what gets enqueued, and `jobIds` is the only difference
|
|
23410
|
+
* (empty on the plan).
|
|
23411
|
+
*/
|
|
23412
|
+
var RecordingRebalanceMoveSchema = object({
|
|
23413
|
+
deviceId: number(),
|
|
23414
|
+
profile: string(),
|
|
23415
|
+
fromLocationId: string(),
|
|
23416
|
+
toLocationId: string(),
|
|
23417
|
+
bytes: number(),
|
|
23418
|
+
files: number().int()
|
|
23419
|
+
});
|
|
23420
|
+
/** Why a pile that is out of place is staying there. Every refusal is
|
|
23421
|
+
* reported: a rebalance that silently drops a camera reads exactly like one
|
|
23422
|
+
* that had nothing to do. */
|
|
23423
|
+
var RecordingRebalanceSkipReasonSchema = _enum([
|
|
23424
|
+
"unassigned",
|
|
23425
|
+
"target-not-writable",
|
|
23426
|
+
"below-threshold",
|
|
23427
|
+
"no-headroom"
|
|
23428
|
+
]);
|
|
23429
|
+
var RecordingRebalanceSkipSchema = object({
|
|
23430
|
+
deviceId: number(),
|
|
23431
|
+
profile: string(),
|
|
23432
|
+
fromLocationId: string(),
|
|
23433
|
+
/** The location the plan wants; null when the camera has no assignment. */
|
|
23434
|
+
toLocationId: string().nullable(),
|
|
23435
|
+
bytes: number(),
|
|
23436
|
+
reason: RecordingRebalanceSkipReasonSchema
|
|
23437
|
+
});
|
|
23438
|
+
var RecordingRebalancePlanSchema = object({
|
|
23439
|
+
moves: array(RecordingRebalanceMoveSchema),
|
|
23440
|
+
skipped: array(RecordingRebalanceSkipSchema),
|
|
23441
|
+
bytesToMove: number(),
|
|
23442
|
+
/** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
|
|
23443
|
+
jobIds: array(string())
|
|
23444
|
+
});
|
|
23445
|
+
var RecordingRebalanceInputSchema = object({
|
|
23446
|
+
/** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
|
|
23447
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
23448
|
+
/** Ignore piles smaller than this (default 1 GB). */
|
|
23449
|
+
minMoveGb: number().min(0).optional()
|
|
23450
|
+
});
|
|
23451
|
+
/**
|
|
22925
23452
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22926
23453
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22927
23454
|
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
@@ -23069,6 +23596,21 @@ method(object({
|
|
|
23069
23596
|
}), {
|
|
23070
23597
|
kind: "mutation",
|
|
23071
23598
|
auth: "admin"
|
|
23599
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23600
|
+
kind: "mutation",
|
|
23601
|
+
auth: "admin"
|
|
23602
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23603
|
+
kind: "mutation",
|
|
23604
|
+
auth: "admin"
|
|
23605
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23606
|
+
kind: "mutation",
|
|
23607
|
+
auth: "admin"
|
|
23608
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23609
|
+
kind: "mutation",
|
|
23610
|
+
auth: "admin"
|
|
23611
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23612
|
+
kind: "mutation",
|
|
23613
|
+
auth: "admin"
|
|
23072
23614
|
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
23073
23615
|
kind: "mutation",
|
|
23074
23616
|
auth: "admin"
|
|
@@ -23078,9 +23620,15 @@ method(object({
|
|
|
23078
23620
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23079
23621
|
kind: "mutation",
|
|
23080
23622
|
auth: "admin"
|
|
23623
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23624
|
+
kind: "query",
|
|
23625
|
+
auth: "admin"
|
|
23626
|
+
}), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
|
|
23627
|
+
kind: "mutation",
|
|
23628
|
+
auth: "admin"
|
|
23081
23629
|
});
|
|
23082
23630
|
/**
|
|
23083
|
-
* `
|
|
23631
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
23084
23632
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
23085
23633
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
23086
23634
|
* delete-after-download.
|
|
@@ -23095,10 +23643,42 @@ method(object({
|
|
|
23095
23643
|
*/
|
|
23096
23644
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23097
23645
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23646
|
+
/**
|
|
23647
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23648
|
+
*
|
|
23649
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
23650
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
23651
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
23652
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
23653
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
23654
|
+
*/
|
|
23655
|
+
var ExportDenseRangeSchema = object({
|
|
23656
|
+
fromSec: number().nonnegative(),
|
|
23657
|
+
toSec: number().nonnegative()
|
|
23658
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
23659
|
+
/**
|
|
23660
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
23661
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
23662
|
+
*
|
|
23663
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
23664
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
23665
|
+
*/
|
|
23666
|
+
var ExportDenseSchema = object({
|
|
23667
|
+
everyMs: number().int().positive(),
|
|
23668
|
+
ranges: array(ExportDenseRangeSchema).min(1).max(200)
|
|
23669
|
+
});
|
|
23098
23670
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
23099
23671
|
var ExportTimelapseSchema = object({
|
|
23100
23672
|
everyMs: number().int().positive(),
|
|
23101
|
-
outputFps: number().int().min(1).max(60).optional()
|
|
23673
|
+
outputFps: number().int().min(1).max(60).optional(),
|
|
23674
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
23675
|
+
dense: ExportDenseSchema.optional()
|
|
23676
|
+
}).superRefine((v, ctx) => {
|
|
23677
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
23678
|
+
code: ZodIssueCode.custom,
|
|
23679
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
23680
|
+
path: ["dense", "everyMs"]
|
|
23681
|
+
});
|
|
23102
23682
|
});
|
|
23103
23683
|
/**
|
|
23104
23684
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -23156,6 +23736,19 @@ var ExportDownloadSchema = object({
|
|
|
23156
23736
|
url: string(),
|
|
23157
23737
|
endpoints: array(string())
|
|
23158
23738
|
});
|
|
23739
|
+
/**
|
|
23740
|
+
* A finished export's bytes, inline.
|
|
23741
|
+
*
|
|
23742
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
23743
|
+
* against, so nobody has to infer it from the base64 length.
|
|
23744
|
+
*/
|
|
23745
|
+
var ExportBytesSchema = object({
|
|
23746
|
+
base64: string(),
|
|
23747
|
+
contentType: string(),
|
|
23748
|
+
/** Suggested filename, extension included. */
|
|
23749
|
+
name: string(),
|
|
23750
|
+
bytes: number().int().nonnegative()
|
|
23751
|
+
});
|
|
23159
23752
|
method(object({
|
|
23160
23753
|
deviceId: number(),
|
|
23161
23754
|
profile: string(),
|
|
@@ -23180,6 +23773,9 @@ method(object({
|
|
|
23180
23773
|
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23181
23774
|
kind: "query",
|
|
23182
23775
|
auth: "protected"
|
|
23776
|
+
}), method(object({ exportId: string() }), ExportBytesSchema, {
|
|
23777
|
+
kind: "query",
|
|
23778
|
+
auth: "protected"
|
|
23183
23779
|
});
|
|
23184
23780
|
/**
|
|
23185
23781
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
@@ -27197,6 +27793,12 @@ Object.freeze({
|
|
|
27197
27793
|
addonId: null,
|
|
27198
27794
|
access: "delete"
|
|
27199
27795
|
},
|
|
27796
|
+
"osdManager.copyDeviceConfiguration": {
|
|
27797
|
+
capName: "osd-manager",
|
|
27798
|
+
capScope: "system",
|
|
27799
|
+
addonId: null,
|
|
27800
|
+
access: "create"
|
|
27801
|
+
},
|
|
27200
27802
|
"osdManager.getConditionSupport": {
|
|
27201
27803
|
capName: "osd-manager",
|
|
27202
27804
|
capScope: "system",
|
|
@@ -27293,7 +27895,7 @@ Object.freeze({
|
|
|
27293
27895
|
addonId: null,
|
|
27294
27896
|
access: "create"
|
|
27295
27897
|
},
|
|
27296
|
-
"pipelineAnalytics.
|
|
27898
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27297
27899
|
capName: "pipeline-analytics",
|
|
27298
27900
|
capScope: "device",
|
|
27299
27901
|
addonId: null,
|
|
@@ -27365,12 +27967,6 @@ Object.freeze({
|
|
|
27365
27967
|
addonId: null,
|
|
27366
27968
|
access: "view"
|
|
27367
27969
|
},
|
|
27368
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27369
|
-
capName: "pipeline-analytics",
|
|
27370
|
-
capScope: "device",
|
|
27371
|
-
addonId: null,
|
|
27372
|
-
access: "view"
|
|
27373
|
-
},
|
|
27374
27970
|
"pipelineAnalytics.getMotionEvents": {
|
|
27375
27971
|
capName: "pipeline-analytics",
|
|
27376
27972
|
capScope: "device",
|
|
@@ -27407,6 +28003,12 @@ Object.freeze({
|
|
|
27407
28003
|
addonId: null,
|
|
27408
28004
|
access: "view"
|
|
27409
28005
|
},
|
|
28006
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
28007
|
+
capName: "pipeline-analytics",
|
|
28008
|
+
capScope: "device",
|
|
28009
|
+
addonId: null,
|
|
28010
|
+
access: "view"
|
|
28011
|
+
},
|
|
27410
28012
|
"pipelineAnalytics.getTrack": {
|
|
27411
28013
|
capName: "pipeline-analytics",
|
|
27412
28014
|
capScope: "device",
|
|
@@ -27485,6 +28087,12 @@ Object.freeze({
|
|
|
27485
28087
|
addonId: null,
|
|
27486
28088
|
access: "view"
|
|
27487
28089
|
},
|
|
28090
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
28091
|
+
capName: "pipeline-analytics",
|
|
28092
|
+
capScope: "device",
|
|
28093
|
+
addonId: null,
|
|
28094
|
+
access: "create"
|
|
28095
|
+
},
|
|
27488
28096
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27489
28097
|
capName: "pipeline-analytics",
|
|
27490
28098
|
capScope: "device",
|
|
@@ -27515,7 +28123,7 @@ Object.freeze({
|
|
|
27515
28123
|
addonId: null,
|
|
27516
28124
|
access: "create"
|
|
27517
28125
|
},
|
|
27518
|
-
"pipelineAnalytics.
|
|
28126
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27519
28127
|
capName: "pipeline-analytics",
|
|
27520
28128
|
capScope: "device",
|
|
27521
28129
|
addonId: null,
|
|
@@ -27527,6 +28135,12 @@ Object.freeze({
|
|
|
27527
28135
|
addonId: null,
|
|
27528
28136
|
access: "create"
|
|
27529
28137
|
},
|
|
28138
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
28139
|
+
capName: "pipeline-analytics",
|
|
28140
|
+
capScope: "device",
|
|
28141
|
+
addonId: null,
|
|
28142
|
+
access: "create"
|
|
28143
|
+
},
|
|
27530
28144
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27531
28145
|
capName: "pipeline-analytics",
|
|
27532
28146
|
capScope: "device",
|
|
@@ -27551,6 +28165,12 @@ Object.freeze({
|
|
|
27551
28165
|
addonId: null,
|
|
27552
28166
|
access: "create"
|
|
27553
28167
|
},
|
|
28168
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
28169
|
+
capName: "pipeline-analytics",
|
|
28170
|
+
capScope: "device",
|
|
28171
|
+
addonId: null,
|
|
28172
|
+
access: "create"
|
|
28173
|
+
},
|
|
27554
28174
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27555
28175
|
capName: "pipeline-analytics",
|
|
27556
28176
|
capScope: "device",
|
|
@@ -27917,6 +28537,12 @@ Object.freeze({
|
|
|
27917
28537
|
addonId: null,
|
|
27918
28538
|
access: "view"
|
|
27919
28539
|
},
|
|
28540
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28541
|
+
capName: "pipeline-orchestrator",
|
|
28542
|
+
capScope: "system",
|
|
28543
|
+
addonId: null,
|
|
28544
|
+
access: "create"
|
|
28545
|
+
},
|
|
27920
28546
|
"pipelineOrchestrator.rebalance": {
|
|
27921
28547
|
capName: "pipeline-orchestrator",
|
|
27922
28548
|
capScope: "system",
|
|
@@ -27941,6 +28567,12 @@ Object.freeze({
|
|
|
27941
28567
|
addonId: null,
|
|
27942
28568
|
access: "view"
|
|
27943
28569
|
},
|
|
28570
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28571
|
+
capName: "pipeline-orchestrator",
|
|
28572
|
+
capScope: "system",
|
|
28573
|
+
addonId: null,
|
|
28574
|
+
access: "create"
|
|
28575
|
+
},
|
|
27944
28576
|
"pipelineOrchestrator.saveTemplate": {
|
|
27945
28577
|
capName: "pipeline-orchestrator",
|
|
27946
28578
|
capScope: "system",
|
|
@@ -28337,7 +28969,13 @@ Object.freeze({
|
|
|
28337
28969
|
addonId: null,
|
|
28338
28970
|
access: "create"
|
|
28339
28971
|
},
|
|
28340
|
-
"recording.
|
|
28972
|
+
"recording.cancelRelocateJob": {
|
|
28973
|
+
capName: "recording",
|
|
28974
|
+
capScope: "system",
|
|
28975
|
+
addonId: null,
|
|
28976
|
+
access: "create"
|
|
28977
|
+
},
|
|
28978
|
+
"recording.cancelStorageMigrationMove": {
|
|
28341
28979
|
capName: "recording",
|
|
28342
28980
|
capScope: "system",
|
|
28343
28981
|
addonId: null,
|
|
@@ -28373,7 +29011,7 @@ Object.freeze({
|
|
|
28373
29011
|
addonId: null,
|
|
28374
29012
|
access: "view"
|
|
28375
29013
|
},
|
|
28376
|
-
"recording.
|
|
29014
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28377
29015
|
capName: "recording",
|
|
28378
29016
|
capScope: "system",
|
|
28379
29017
|
addonId: null,
|
|
@@ -28391,12 +29029,30 @@ Object.freeze({
|
|
|
28391
29029
|
addonId: null,
|
|
28392
29030
|
access: "view"
|
|
28393
29031
|
},
|
|
29032
|
+
"recording.listRelocateJobs": {
|
|
29033
|
+
capName: "recording",
|
|
29034
|
+
capScope: "system",
|
|
29035
|
+
addonId: null,
|
|
29036
|
+
access: "view"
|
|
29037
|
+
},
|
|
28394
29038
|
"recording.locateSegment": {
|
|
28395
29039
|
capName: "recording",
|
|
28396
29040
|
capScope: "system",
|
|
28397
29041
|
addonId: null,
|
|
28398
29042
|
access: "view"
|
|
28399
29043
|
},
|
|
29044
|
+
"recording.pauseForStorageMigration": {
|
|
29045
|
+
capName: "recording",
|
|
29046
|
+
capScope: "system",
|
|
29047
|
+
addonId: null,
|
|
29048
|
+
access: "create"
|
|
29049
|
+
},
|
|
29050
|
+
"recording.planStorageRebalance": {
|
|
29051
|
+
capName: "recording",
|
|
29052
|
+
capScope: "system",
|
|
29053
|
+
addonId: null,
|
|
29054
|
+
access: "view"
|
|
29055
|
+
},
|
|
28400
29056
|
"recording.pruneFootage": {
|
|
28401
29057
|
capName: "recording",
|
|
28402
29058
|
capScope: "system",
|
|
@@ -28415,6 +29071,12 @@ Object.freeze({
|
|
|
28415
29071
|
addonId: null,
|
|
28416
29072
|
access: "view"
|
|
28417
29073
|
},
|
|
29074
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
29075
|
+
capName: "recording",
|
|
29076
|
+
capScope: "system",
|
|
29077
|
+
addonId: null,
|
|
29078
|
+
access: "create"
|
|
29079
|
+
},
|
|
28418
29080
|
"recording.relocateFootage": {
|
|
28419
29081
|
capName: "recording",
|
|
28420
29082
|
capScope: "system",
|
|
@@ -28439,44 +29101,68 @@ Object.freeze({
|
|
|
28439
29101
|
addonId: null,
|
|
28440
29102
|
access: "create"
|
|
28441
29103
|
},
|
|
29104
|
+
"recording.resumeForStorageMigration": {
|
|
29105
|
+
capName: "recording",
|
|
29106
|
+
capScope: "system",
|
|
29107
|
+
addonId: null,
|
|
29108
|
+
access: "create"
|
|
29109
|
+
},
|
|
28442
29110
|
"recording.setDeviceConfig": {
|
|
28443
29111
|
capName: "recording",
|
|
28444
29112
|
capScope: "system",
|
|
28445
29113
|
addonId: null,
|
|
28446
29114
|
access: "create"
|
|
28447
29115
|
},
|
|
29116
|
+
"recording.startStorageMigrationMove": {
|
|
29117
|
+
capName: "recording",
|
|
29118
|
+
capScope: "system",
|
|
29119
|
+
addonId: null,
|
|
29120
|
+
access: "create"
|
|
29121
|
+
},
|
|
29122
|
+
"recording.startStorageRebalance": {
|
|
29123
|
+
capName: "recording",
|
|
29124
|
+
capScope: "system",
|
|
29125
|
+
addonId: null,
|
|
29126
|
+
access: "create"
|
|
29127
|
+
},
|
|
28448
29128
|
"recordingExport.cancelExport": {
|
|
28449
|
-
capName: "
|
|
29129
|
+
capName: "recording-export",
|
|
28450
29130
|
capScope: "system",
|
|
28451
29131
|
addonId: null,
|
|
28452
29132
|
access: "create"
|
|
28453
29133
|
},
|
|
28454
29134
|
"recordingExport.createExport": {
|
|
28455
|
-
capName: "
|
|
29135
|
+
capName: "recording-export",
|
|
28456
29136
|
capScope: "system",
|
|
28457
29137
|
addonId: null,
|
|
28458
29138
|
access: "create"
|
|
28459
29139
|
},
|
|
28460
29140
|
"recordingExport.deleteExport": {
|
|
28461
|
-
capName: "
|
|
29141
|
+
capName: "recording-export",
|
|
28462
29142
|
capScope: "system",
|
|
28463
29143
|
addonId: null,
|
|
28464
29144
|
access: "delete"
|
|
28465
29145
|
},
|
|
28466
29146
|
"recordingExport.getDownloadUrl": {
|
|
28467
|
-
capName: "
|
|
29147
|
+
capName: "recording-export",
|
|
28468
29148
|
capScope: "system",
|
|
28469
29149
|
addonId: null,
|
|
28470
29150
|
access: "view"
|
|
28471
29151
|
},
|
|
28472
29152
|
"recordingExport.getExport": {
|
|
28473
|
-
capName: "
|
|
29153
|
+
capName: "recording-export",
|
|
28474
29154
|
capScope: "system",
|
|
28475
29155
|
addonId: null,
|
|
28476
29156
|
access: "view"
|
|
28477
29157
|
},
|
|
28478
29158
|
"recordingExport.listExports": {
|
|
28479
|
-
capName: "
|
|
29159
|
+
capName: "recording-export",
|
|
29160
|
+
capScope: "system",
|
|
29161
|
+
addonId: null,
|
|
29162
|
+
access: "view"
|
|
29163
|
+
},
|
|
29164
|
+
"recordingExport.readExportBytes": {
|
|
29165
|
+
capName: "recording-export",
|
|
28480
29166
|
capScope: "system",
|
|
28481
29167
|
addonId: null,
|
|
28482
29168
|
access: "view"
|
|
@@ -28835,6 +29521,30 @@ Object.freeze({
|
|
|
28835
29521
|
addonId: null,
|
|
28836
29522
|
access: "view"
|
|
28837
29523
|
},
|
|
29524
|
+
"storageMigration.cancel": {
|
|
29525
|
+
capName: "storage-migration",
|
|
29526
|
+
capScope: "system",
|
|
29527
|
+
addonId: null,
|
|
29528
|
+
access: "create"
|
|
29529
|
+
},
|
|
29530
|
+
"storageMigration.plan": {
|
|
29531
|
+
capName: "storage-migration",
|
|
29532
|
+
capScope: "system",
|
|
29533
|
+
addonId: null,
|
|
29534
|
+
access: "view"
|
|
29535
|
+
},
|
|
29536
|
+
"storageMigration.start": {
|
|
29537
|
+
capName: "storage-migration",
|
|
29538
|
+
capScope: "system",
|
|
29539
|
+
addonId: null,
|
|
29540
|
+
access: "create"
|
|
29541
|
+
},
|
|
29542
|
+
"storageMigration.status": {
|
|
29543
|
+
capName: "storage-migration",
|
|
29544
|
+
capScope: "system",
|
|
29545
|
+
addonId: null,
|
|
29546
|
+
access: "view"
|
|
29547
|
+
},
|
|
28838
29548
|
"storageProvider.abortUpload": {
|
|
28839
29549
|
capName: "storage-provider",
|
|
28840
29550
|
capScope: "system",
|
|
@@ -29213,12 +29923,42 @@ Object.freeze({
|
|
|
29213
29923
|
addonId: null,
|
|
29214
29924
|
access: "create"
|
|
29215
29925
|
},
|
|
29926
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29927
|
+
capName: "terminal-session",
|
|
29928
|
+
capScope: "system",
|
|
29929
|
+
addonId: null,
|
|
29930
|
+
access: "create"
|
|
29931
|
+
},
|
|
29216
29932
|
"terminalSession.close": {
|
|
29217
29933
|
capName: "terminal-session",
|
|
29218
29934
|
capScope: "system",
|
|
29219
29935
|
addonId: null,
|
|
29220
29936
|
access: "create"
|
|
29221
29937
|
},
|
|
29938
|
+
"terminalSession.createInstance": {
|
|
29939
|
+
capName: "terminal-session",
|
|
29940
|
+
capScope: "system",
|
|
29941
|
+
addonId: null,
|
|
29942
|
+
access: "create"
|
|
29943
|
+
},
|
|
29944
|
+
"terminalSession.deleteInstance": {
|
|
29945
|
+
capName: "terminal-session",
|
|
29946
|
+
capScope: "system",
|
|
29947
|
+
addonId: null,
|
|
29948
|
+
access: "delete"
|
|
29949
|
+
},
|
|
29950
|
+
"terminalSession.listInstances": {
|
|
29951
|
+
capName: "terminal-session",
|
|
29952
|
+
capScope: "system",
|
|
29953
|
+
addonId: null,
|
|
29954
|
+
access: "view"
|
|
29955
|
+
},
|
|
29956
|
+
"terminalSession.listLegacyCameras": {
|
|
29957
|
+
capName: "terminal-session",
|
|
29958
|
+
capScope: "system",
|
|
29959
|
+
addonId: null,
|
|
29960
|
+
access: "view"
|
|
29961
|
+
},
|
|
29222
29962
|
"terminalSession.listProfiles": {
|
|
29223
29963
|
capName: "terminal-session",
|
|
29224
29964
|
capScope: "system",
|
|
@@ -29249,6 +29989,12 @@ Object.freeze({
|
|
|
29249
29989
|
addonId: null,
|
|
29250
29990
|
access: "create"
|
|
29251
29991
|
},
|
|
29992
|
+
"terminalSession.setInstanceEnabled": {
|
|
29993
|
+
capName: "terminal-session",
|
|
29994
|
+
capScope: "system",
|
|
29995
|
+
addonId: null,
|
|
29996
|
+
access: "create"
|
|
29997
|
+
},
|
|
29252
29998
|
"terminalSession.writeInput": {
|
|
29253
29999
|
capName: "terminal-session",
|
|
29254
30000
|
capScope: "system",
|
|
@@ -29793,6 +30539,104 @@ var FramerateField = number().int().min(1).max(60);
|
|
|
29793
30539
|
var TargetsField = array(NcRuleTargetSchema).min(1);
|
|
29794
30540
|
var PriorityField = number().int().min(1).max(5);
|
|
29795
30541
|
/**
|
|
30542
|
+
* Explicit override of the DENSE sampling cadence, seconds.
|
|
30543
|
+
*
|
|
30544
|
+
* Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
|
|
30545
|
+
* 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
|
|
30546
|
+
* made that same base 3 s and rendered a person pass as two frames.)
|
|
30547
|
+
*
|
|
30548
|
+
* THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
|
|
30549
|
+
* `denseCadenceSec` and played at `framerate` occupies
|
|
30550
|
+
*
|
|
30551
|
+
* outputSeconds = (rangeSec / denseCadenceSec) / framerate
|
|
30552
|
+
*
|
|
30553
|
+
* 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.
|
|
30554
|
+
* Halving this field doubles the frames INSIDE ranges only — the base cadence,
|
|
30555
|
+
* and therefore the length of a quiet night, does not move.
|
|
30556
|
+
*
|
|
30557
|
+
* Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
|
|
30558
|
+
* the recording has them returns the same frames, requested twice. Must be
|
|
30559
|
+
* STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
|
|
30560
|
+
* a uniform video the operator believes is two-rate — and upsert refuses it
|
|
30561
|
+
* rather than letting the export cap reject the render hours after the window.
|
|
30562
|
+
*/
|
|
30563
|
+
var DenseCadenceSecField = number().min(.1).max(3600);
|
|
30564
|
+
/**
|
|
30565
|
+
* Minimum seconds of OUTPUT video each detection range must occupy.
|
|
30566
|
+
*
|
|
30567
|
+
* The operator-facing form of the arithmetic above: instead of solving for a
|
|
30568
|
+
* cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
|
|
30569
|
+
* 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
|
|
30570
|
+
* that range every ~583 ms.
|
|
30571
|
+
*
|
|
30572
|
+
* ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
|
|
30573
|
+
* ranges are terms of a single ffmpeg `select` expression that cannot vary rate
|
|
30574
|
+
* per term — so the MOST DEMANDING (shortest) range sets the rate and longer
|
|
30575
|
+
* ranges are sampled denser than they need. Per-range cadences require a cap
|
|
30576
|
+
* schema change and are the tracked follow-up.
|
|
30577
|
+
*
|
|
30578
|
+
* A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
|
|
30579
|
+
* is rendered with every frame that EXISTS and no more: the guarantee is capped
|
|
30580
|
+
* by real footage, never met by duplicating frames into motion that never
|
|
30581
|
+
* happened.
|
|
30582
|
+
*/
|
|
30583
|
+
var MinDwellSecField = number().min(0).max(60);
|
|
30584
|
+
/**
|
|
30585
|
+
* Caption burned into the notification's preview frame.
|
|
30586
|
+
*
|
|
30587
|
+
* Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
|
|
30588
|
+
* `rule`, `from`, `to`) and rendered by the SAME renderer — a second
|
|
30589
|
+
* templating dialect for one field would be a second thing to explain.
|
|
30590
|
+
*
|
|
30591
|
+
* Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
|
|
30592
|
+
* operator saying "the frame, no caption" — a distinct, reachable answer, and
|
|
30593
|
+
* the reason this is not `.min(1)`.
|
|
30594
|
+
*/
|
|
30595
|
+
var PreviewTextField = string().max(200);
|
|
30596
|
+
/**
|
|
30597
|
+
* Whether the notification's preview is a STILL or a short animation.
|
|
30598
|
+
*
|
|
30599
|
+
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
30600
|
+
* rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
|
|
30601
|
+
* night reads better as three seconds of motion than as one frame of it. Both
|
|
30602
|
+
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
30603
|
+
* simply applies it to a dozen frames sampled across the render and assembles
|
|
30604
|
+
* them.
|
|
30605
|
+
*
|
|
30606
|
+
* `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
|
|
30607
|
+
* seeks and a palette pass, and no rule that never asked for one should start
|
|
30608
|
+
* paying that on the deploy that shipped it.
|
|
30609
|
+
*
|
|
30610
|
+
* A GIF that cannot be assembled DEGRADES to the still — never to nothing.
|
|
30611
|
+
*/
|
|
30612
|
+
var PreviewModeField = _enum(["image", "gif"]);
|
|
30613
|
+
/**
|
|
30614
|
+
* Which detection classes the notification reports counts for.
|
|
30615
|
+
*
|
|
30616
|
+
* The counts come from the tracks the render ALREADY fetched for its dense-range
|
|
30617
|
+
* plan — no second query — aggregated per class. Absent or empty means "every
|
|
30618
|
+
* class the window actually contained", which is what an operator who never
|
|
30619
|
+
* opened the field wants; a list narrows it (`['person']` on a driveway that
|
|
30620
|
+
* counts cars all night).
|
|
30621
|
+
*
|
|
30622
|
+
* Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
|
|
30623
|
+
* …). An unknown name simply never matches and reports nothing — it is not an
|
|
30624
|
+
* error, because a rule may legitimately name a class this camera's model does
|
|
30625
|
+
* not emit.
|
|
30626
|
+
*
|
|
30627
|
+
* The counts are exposed to {@link TimelapseTemplateSchema} as:
|
|
30628
|
+
* - `{{detections}}` — total over the reported classes
|
|
30629
|
+
* - `{{detectionSummary}}` — `2 persone, 1 veicolo`
|
|
30630
|
+
* - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
|
|
30631
|
+
* one per class, `count_` + the class name
|
|
30632
|
+
*
|
|
30633
|
+
* With NO custom body template the summary is appended to the derived body, and
|
|
30634
|
+
* only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
|
|
30635
|
+
* reads. With a custom template the operator owns every word — nothing is
|
|
30636
|
+
* appended, so `{{detectionSummary}}` is how he asks for it.
|
|
30637
|
+
*/
|
|
30638
|
+
var ReportClassesField = array(string().min(1).max(40)).max(20);
|
|
30639
|
+
/**
|
|
29796
30640
|
* Client-supplied timelapse-rule fields. The server stamps id / createdBy /
|
|
29797
30641
|
* createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
|
|
29798
30642
|
* here (see the ownership note above).
|
|
@@ -29812,9 +30656,30 @@ var TimelapseRuleInputSchema = object({
|
|
|
29812
30656
|
cadenceSec: CadenceSecField.default(15),
|
|
29813
30657
|
/** Output frames per second of the assembled mp4 (predecessor parity). */
|
|
29814
30658
|
framerate: FramerateField.default(10),
|
|
30659
|
+
/**
|
|
30660
|
+
* Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
|
|
30661
|
+
* as `max(1s, cadenceSec / 30)`, which is what every rule written before this
|
|
30662
|
+
* field gets.
|
|
30663
|
+
*/
|
|
30664
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30665
|
+
/** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
|
|
30666
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29815
30667
|
/** `notification-output` targets the finished video/thumbnail is sent to. */
|
|
29816
30668
|
targets: TargetsField,
|
|
29817
30669
|
template: TimelapseTemplateSchema.optional(),
|
|
30670
|
+
/**
|
|
30671
|
+
* Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
|
|
30672
|
+
* and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
|
|
30673
|
+
*
|
|
30674
|
+
* Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
|
|
30675
|
+
* the notification's title/body, and clearing it (`template: null`) must not
|
|
30676
|
+
* silently clear the caption too.
|
|
30677
|
+
*/
|
|
30678
|
+
previewText: PreviewTextField.optional(),
|
|
30679
|
+
/** Still or animation — see {@link PreviewModeField}. */
|
|
30680
|
+
previewMode: PreviewModeField.default("image"),
|
|
30681
|
+
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
30682
|
+
reportClasses: ReportClassesField.optional(),
|
|
29818
30683
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
29819
30684
|
priority: PriorityField.default(3)
|
|
29820
30685
|
});
|
|
@@ -29825,8 +30690,13 @@ object({
|
|
|
29825
30690
|
schedule: NcScheduleSchema.optional(),
|
|
29826
30691
|
cadenceSec: CadenceSecField.optional(),
|
|
29827
30692
|
framerate: FramerateField.optional(),
|
|
30693
|
+
denseCadenceSec: DenseCadenceSecField.optional(),
|
|
30694
|
+
minDwellSec: MinDwellSecField.optional(),
|
|
29828
30695
|
targets: TargetsField.optional(),
|
|
29829
30696
|
template: TimelapseTemplateSchema.nullable().optional(),
|
|
30697
|
+
previewText: PreviewTextField.optional(),
|
|
30698
|
+
previewMode: PreviewModeField.optional(),
|
|
30699
|
+
reportClasses: ReportClassesField.optional(),
|
|
29830
30700
|
priority: PriorityField.optional()
|
|
29831
30701
|
});
|
|
29832
30702
|
TimelapseRuleInputSchema.extend({
|
|
@@ -29838,10 +30708,28 @@ TimelapseRuleInputSchema.extend({
|
|
|
29838
30708
|
*/
|
|
29839
30709
|
ownerUserId: string().optional(),
|
|
29840
30710
|
/**
|
|
29841
|
-
* Epoch-ms of the
|
|
29842
|
-
*
|
|
30711
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
30712
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
30713
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
29843
30714
|
*/
|
|
29844
30715
|
lastGeneratedAt: number().optional(),
|
|
30716
|
+
/**
|
|
30717
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
30718
|
+
* re-generation guard's real durable state.
|
|
30719
|
+
*
|
|
30720
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
30721
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
30722
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
30723
|
+
* already done — and B's night is gone for good, because the window will not
|
|
30724
|
+
* come back.
|
|
30725
|
+
*
|
|
30726
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
30727
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
30728
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
30729
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
30730
|
+
* once, on the deploy that shipped the map.
|
|
30731
|
+
*/
|
|
30732
|
+
generatedByDevice: record(string(), number()).optional(),
|
|
29845
30733
|
/** userId of the caller who created the rule (server-stamped). */
|
|
29846
30734
|
createdBy: string(),
|
|
29847
30735
|
createdAt: number(),
|