@camstack/addon-provider-dreame 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +187 -45
- package/dist/addon.mjs +187 -45
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -50504,7 +50504,7 @@ objectType({
|
|
|
50504
50504
|
})
|
|
50505
50505
|
});
|
|
50506
50506
|
//#endregion
|
|
50507
|
-
//#region ../types/dist/event-category-
|
|
50507
|
+
//#region ../types/dist/event-category-XfKNtfCc.mjs
|
|
50508
50508
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
50509
50509
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50510
50510
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -50521,9 +50521,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
50521
50521
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
50522
50522
|
/**
|
|
50523
50523
|
* A newer addon or server-root package version was found by the
|
|
50524
|
-
* authoritative registry check. Emitted once
|
|
50525
|
-
* `(
|
|
50526
|
-
*
|
|
50524
|
+
* authoritative registry check. Emitted once when any observed
|
|
50525
|
+
* `latestVersion` changes (or a package/node first appears behind);
|
|
50526
|
+
* the payload carries the full currently-available list. Repeated
|
|
50527
|
+
* polling of the same latests is silent.
|
|
50527
50528
|
*/
|
|
50528
50529
|
EventCategory["UpdateAvailable"] = "update.available";
|
|
50529
50530
|
/**
|
|
@@ -50542,6 +50543,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
50542
50543
|
EventCategory["AddonInstalled"] = "addon.installed";
|
|
50543
50544
|
EventCategory["AddonUninstalled"] = "addon.uninstalled";
|
|
50544
50545
|
EventCategory["AddonCrashed"] = "addon.crashed";
|
|
50546
|
+
/**
|
|
50547
|
+
* A RUNNER the D6 crash circuit-breaker gave up on — terminal.
|
|
50548
|
+
*
|
|
50549
|
+
* `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
|
|
50550
|
+
* respawned"); this is the one that never resolves itself. Emitted exactly
|
|
50551
|
+
* once per trip, by `process-service.ts`, carrying the node, the runner, the
|
|
50552
|
+
* addons it hosted and the crash count that tripped the breaker.
|
|
50553
|
+
*
|
|
50554
|
+
* It exists because a runner marked terminally `failed` used to be SILENT:
|
|
50555
|
+
* on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
|
|
50556
|
+
* errors, the breaker stopped respawning it (correctly), `/health` kept
|
|
50557
|
+
* returning 200, and fleet-wide recording was gone for 3h15 before the
|
|
50558
|
+
* operator's phone told him. The Notification Center's system-event intake
|
|
50559
|
+
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
50560
|
+
*/
|
|
50561
|
+
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
50545
50562
|
EventCategory["AddonError"] = "addon.error";
|
|
50546
50563
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
50547
50564
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -58053,6 +58070,10 @@ var RecordingBandSchema = object({
|
|
|
58053
58070
|
preBufferSec: number().min(0).optional(),
|
|
58054
58071
|
postBufferSec: number().min(0).optional()
|
|
58055
58072
|
});
|
|
58073
|
+
({
|
|
58074
|
+
preBufferSec: 10,
|
|
58075
|
+
postBufferSec: 30
|
|
58076
|
+
}).postBufferSec * 1e3;
|
|
58056
58077
|
/**
|
|
58057
58078
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
58058
58079
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -58100,6 +58121,12 @@ var RecordingConfigSchema = object({
|
|
|
58100
58121
|
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
58101
58122
|
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
58102
58123
|
mode: RecordingStorageModeSchema.optional(),
|
|
58124
|
+
/**
|
|
58125
|
+
* Which assigned broker slots to record. Absent / empty = {@link
|
|
58126
|
+
* DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
|
|
58127
|
+
* camera's currently assigned slots — never `mid` unless the operator
|
|
58128
|
+
* picks it, and never a slot the broker has not assigned.
|
|
58129
|
+
*/
|
|
58103
58130
|
profiles: array(CamProfileSchema).optional(),
|
|
58104
58131
|
segmentSeconds: number().int().positive().optional(),
|
|
58105
58132
|
/**
|
|
@@ -58180,7 +58207,11 @@ var RelocateFootageInputSchema = object({
|
|
|
58180
58207
|
profiles: array(string()).optional(),
|
|
58181
58208
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
58182
58209
|
* never allowed to starve live writers. */
|
|
58183
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
58210
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
58211
|
+
/** Move only segments whose startMs is >= this. Absent = the whole source
|
|
58212
|
+
* pile. Used when a full drain is too expensive and the operator only
|
|
58213
|
+
* wants the recent window on the new disk. */
|
|
58214
|
+
sinceMs: number().int().optional()
|
|
58184
58215
|
});
|
|
58185
58216
|
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
58186
58217
|
* from persistent recording settings: a migration never changes
|
|
@@ -65062,6 +65093,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
65062
65093
|
"node-offline",
|
|
65063
65094
|
"node-inference-unavailable",
|
|
65064
65095
|
"detection-blind",
|
|
65096
|
+
"addon-crash-loop",
|
|
65065
65097
|
"addon-update-available",
|
|
65066
65098
|
"server-update-available",
|
|
65067
65099
|
"alarm-triggered",
|
|
@@ -65069,6 +65101,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
65069
65101
|
"alarm-disarmed",
|
|
65070
65102
|
"alarm-arming",
|
|
65071
65103
|
"alarm-arm-refused",
|
|
65104
|
+
"addon-updated",
|
|
65105
|
+
"server-updated",
|
|
65106
|
+
"export-completed",
|
|
65072
65107
|
"camera-online",
|
|
65073
65108
|
"camera-offline",
|
|
65074
65109
|
"camera-disabled",
|
|
@@ -66962,13 +66997,19 @@ var RetrainStatusSchema = _enum([
|
|
|
66962
66997
|
* "never marked" from "already trained" must read `retrainStatus`.
|
|
66963
66998
|
*
|
|
66964
66999
|
* `debug` does NOT pin; it is attention, not durability.
|
|
67000
|
+
*
|
|
67001
|
+
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
67002
|
+
* A favourited track is skipped by retention the same way `staging` is, but
|
|
67003
|
+
* it does not enter `none|staging|trained` and has no staging budget.
|
|
66965
67004
|
*/
|
|
66966
67005
|
var TrackFlagFields = {
|
|
66967
67006
|
/** Operator marked this track as training material — i.e. `retrainStatus` is
|
|
66968
67007
|
* `'staging'`. */
|
|
66969
67008
|
markForTrain: boolean().optional(),
|
|
66970
67009
|
/** Operator marked this track for diagnostic attention. */
|
|
66971
|
-
debug: boolean().optional()
|
|
67010
|
+
debug: boolean().optional(),
|
|
67011
|
+
/** Operator favourited this track. Pins it against pruning. */
|
|
67012
|
+
favourited: boolean().optional()
|
|
66972
67013
|
};
|
|
66973
67014
|
/**
|
|
66974
67015
|
* The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
|
|
@@ -66993,6 +67034,7 @@ var TrackFlagsSchema = object({
|
|
|
66993
67034
|
trackId: string(),
|
|
66994
67035
|
markForTrain: boolean(),
|
|
66995
67036
|
debug: boolean(),
|
|
67037
|
+
favourited: boolean(),
|
|
66996
67038
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
66997
67039
|
* a track row) because this shape is only ever produced by the write body,
|
|
66998
67040
|
* which always knows it — and a surface that has just written needs to render
|
|
@@ -67625,6 +67667,12 @@ var TrackCascadeCountsSchema = object({
|
|
|
67625
67667
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
67626
67668
|
embeddings: number().int()
|
|
67627
67669
|
});
|
|
67670
|
+
/** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
|
|
67671
|
+
var DiskReconcileCountsSchema = object({
|
|
67672
|
+
mediaDropped: number().int(),
|
|
67673
|
+
tracks: number().int(),
|
|
67674
|
+
events: number().int()
|
|
67675
|
+
});
|
|
67628
67676
|
/** Event-store footprint for one camera. */
|
|
67629
67677
|
var EventStoreDeviceFootprintSchema = object({
|
|
67630
67678
|
deviceId: number(),
|
|
@@ -67801,6 +67849,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
67801
67849
|
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
67802
67850
|
kind: "mutation",
|
|
67803
67851
|
auth: "admin"
|
|
67852
|
+
}), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
|
|
67853
|
+
kind: "mutation",
|
|
67854
|
+
auth: "admin"
|
|
67804
67855
|
}), method(object({
|
|
67805
67856
|
deviceId: number(),
|
|
67806
67857
|
trackIds: array(string()).min(1)
|
|
@@ -69351,6 +69402,24 @@ var CameraStatusDegradationSchema = object({
|
|
|
69351
69402
|
*
|
|
69352
69403
|
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
69353
69404
|
*/
|
|
69405
|
+
var DiskReconcileJobSchema = object({
|
|
69406
|
+
state: _enum([
|
|
69407
|
+
"idle",
|
|
69408
|
+
"running",
|
|
69409
|
+
"done",
|
|
69410
|
+
"error"
|
|
69411
|
+
]),
|
|
69412
|
+
total: number().int().nonnegative(),
|
|
69413
|
+
completed: number().int().nonnegative(),
|
|
69414
|
+
currentDeviceId: number().int().nullable(),
|
|
69415
|
+
failed: array(number().int()).readonly(),
|
|
69416
|
+
mediaDropped: number().int().nonnegative(),
|
|
69417
|
+
tracks: number().int().nonnegative(),
|
|
69418
|
+
events: number().int().nonnegative(),
|
|
69419
|
+
startedAtMs: number().int().nullable(),
|
|
69420
|
+
finishedAtMs: number().int().nullable(),
|
|
69421
|
+
error: string().nullable()
|
|
69422
|
+
});
|
|
69354
69423
|
var CameraStatusSchema = object({
|
|
69355
69424
|
deviceId: number(),
|
|
69356
69425
|
assignment: CameraAssignmentStatusSchema,
|
|
@@ -69582,7 +69651,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
69582
69651
|
}), CameraSwitchGroupSchema, {
|
|
69583
69652
|
kind: "mutation",
|
|
69584
69653
|
auth: "admin"
|
|
69585
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(),
|
|
69654
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
|
|
69655
|
+
kind: "mutation",
|
|
69656
|
+
auth: "admin"
|
|
69657
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
69586
69658
|
name: string(),
|
|
69587
69659
|
description: string().optional(),
|
|
69588
69660
|
config: CameraPipelineConfigSchema
|
|
@@ -69987,7 +70059,14 @@ targets: array(object({
|
|
|
69987
70059
|
"sleeping",
|
|
69988
70060
|
"unreachable",
|
|
69989
70061
|
"waking"
|
|
69990
|
-
]).nullable()
|
|
70062
|
+
]).nullable(),
|
|
70063
|
+
/** A battery camera (whatever its current state). An AWAKE battery
|
|
70064
|
+
* camera is deliberately NOT recaptured on the poll cadence — every
|
|
70065
|
+
* capture is a camera hit that would keep it out of sleep — so its
|
|
70066
|
+
* cached frame legitimately ages past the currency ceiling while
|
|
70067
|
+
* nothing is streaming. A surface must keep painting it (a fresh
|
|
70068
|
+
* frame is captured at each wake), not blank to "unavailable". */
|
|
70069
|
+
battery: boolean()
|
|
69991
70070
|
})));
|
|
69992
70071
|
/**
|
|
69993
70072
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
@@ -70648,20 +70727,6 @@ var VectorStatsResultSchema = object({
|
|
|
70648
70727
|
exact: boolean()
|
|
70649
70728
|
});
|
|
70650
70729
|
method(VectorDeclareIndexInputSchema, _void(), { kind: "mutation" }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, { kind: "mutation" }), method(VectorQueryInputSchema, VectorQueryResultSchema), method(VectorGetInputSchema, VectorGetResultSchema), method(VectorDeleteInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorStatsInputSchema, VectorStatsResultSchema);
|
|
70651
|
-
/**
|
|
70652
|
-
* `videoclips` — the unified, navigable-clip surface for a camera.
|
|
70653
|
-
*
|
|
70654
|
-
* A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
|
|
70655
|
-
* provider per device, substitutable. The DEFAULT provider (registered by
|
|
70656
|
-
* `addon-post-analysis`, `defaultActive: true`) composes the analytics event
|
|
70657
|
-
* log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
|
|
70658
|
-
* is a time-WINDOW over existing footage, never a separate file. A camera that
|
|
70659
|
-
* exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
|
|
70660
|
-
* wrapper provider for its device and serve its own clip catalog + URLs.
|
|
70661
|
-
*
|
|
70662
|
-
* A `Clip` is purely time-based (subtree-blind): playback resolves segments by
|
|
70663
|
-
* temporal overlap, so the API never decides `continuous` vs `events`.
|
|
70664
|
-
*/
|
|
70665
70730
|
var ClipSchema = object({
|
|
70666
70731
|
/** Opaque, provider-namespaced id. The default provider encodes the time
|
|
70667
70732
|
* window so `getClipPlayback` is self-contained (no event re-query). */
|
|
@@ -70678,8 +70743,57 @@ var ClipSchema = object({
|
|
|
70678
70743
|
startMs: number(),
|
|
70679
70744
|
endMs: number()
|
|
70680
70745
|
}),
|
|
70681
|
-
/**
|
|
70682
|
-
thumbnail
|
|
70746
|
+
/**
|
|
70747
|
+
* Lazy thumbnail URL, never inlined.
|
|
70748
|
+
*
|
|
70749
|
+
* Recording-derived clips (events-mode keep-window, and the prepared
|
|
70750
|
+
* continuous event+fragment visit) MUST use the snapshot of the **main
|
|
70751
|
+
* event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
|
|
70752
|
+
* of the event that owns `kind` (object > motion > audio). Do not extract
|
|
70753
|
+
* a keyframe from the recorded segments. Other providers (onboard, HKSV)
|
|
70754
|
+
* mint their own stills.
|
|
70755
|
+
*
|
|
70756
|
+
* **VOUCHED, never fabricated.** A provider emits this only for an event it
|
|
70757
|
+
* has CONFIRMED owns at least one media row (its own, or its owning track's).
|
|
70758
|
+
* Absent is meaningful — "this visit has no event still" — never "we did not
|
|
70759
|
+
* look". Stamping it from a URL template made 35% of one camera's clips point
|
|
70760
|
+
* at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
|
|
70761
|
+
* A read that FAILS drops the claim; it never invents it.
|
|
70762
|
+
*/
|
|
70763
|
+
thumbnail: string().optional(),
|
|
70764
|
+
/**
|
|
70765
|
+
* An instant INSIDE this visit's footage, hole-safe, where a recorded still
|
|
70766
|
+
* can be decoded. Present whenever the visit came from recorded availability;
|
|
70767
|
+
* absent on a per-event padded window (there is no footage to promise).
|
|
70768
|
+
*
|
|
70769
|
+
* This is not a thumbnail and not a second byte path: it is the argument to
|
|
70770
|
+
* the recorder's existing still route. The surface — never the provider —
|
|
70771
|
+
* decides whether to use it. It is the midpoint of the visit's LONGEST
|
|
70772
|
+
* contiguous range, not of the visit: a visit spans its holes by
|
|
70773
|
+
* construction, so a naive midpoint lands in dead air.
|
|
70774
|
+
*/
|
|
70775
|
+
stillAtMs: number().optional(),
|
|
70776
|
+
/**
|
|
70777
|
+
* Analytics event ids that overlap this visit — a BOUNDED sample, newest
|
|
70778
|
+
* first within kind (object → motion → audio), capped at
|
|
70779
|
+
* {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
|
|
70780
|
+
*
|
|
70781
|
+
* Bounded because it is not a payload the surface pages through: one visit on
|
|
70782
|
+
* device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
|
|
70783
|
+
* camera-day. Read {@link eventCount} for the true total.
|
|
70784
|
+
*/
|
|
70785
|
+
eventIds: array(string()).optional(),
|
|
70786
|
+
/** How many analytics events actually overlap this visit. Differs from
|
|
70787
|
+
* `eventIds.length` exactly when the sample was capped — so a truncated
|
|
70788
|
+
* list is never mistaken for a quiet visit. */
|
|
70789
|
+
eventCount: number().int().nonnegative().optional(),
|
|
70790
|
+
/** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
|
|
70791
|
+
* than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
|
|
70792
|
+
* bar keeps showing them via `recording.getAvailability`. */
|
|
70793
|
+
holes: array(object({
|
|
70794
|
+
startMs: number(),
|
|
70795
|
+
endMs: number()
|
|
70796
|
+
})).optional()
|
|
70683
70797
|
});
|
|
70684
70798
|
var ClipPlaybackSchema = object({
|
|
70685
70799
|
/** HLS master URL through the hub data-plane (Range + token in path). */
|
|
@@ -71143,7 +71257,14 @@ var SearchResultSchema = object({
|
|
|
71143
71257
|
});
|
|
71144
71258
|
var AutoUpdateSettingsSchema = object({
|
|
71145
71259
|
channel: ChannelSchema,
|
|
71146
|
-
intervalSeconds: number()
|
|
71260
|
+
intervalSeconds: number(),
|
|
71261
|
+
/**
|
|
71262
|
+
* Cadence of the "an update exists" POLLER, in seconds. Independent of
|
|
71263
|
+
* `channel`: the poller runs while auto-apply is `off`, because being told
|
|
71264
|
+
* about a publish and installing it are different decisions. Clamped
|
|
71265
|
+
* server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
|
|
71266
|
+
*/
|
|
71267
|
+
updateCheckIntervalSeconds: number()
|
|
71147
71268
|
});
|
|
71148
71269
|
var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
71149
71270
|
var RestartAddonResultSchema = unknown();
|
|
@@ -71284,7 +71405,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
71284
71405
|
auth: "admin"
|
|
71285
71406
|
}), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
|
|
71286
71407
|
channel: ChannelSchema,
|
|
71287
|
-
intervalSeconds: number().min(300).max(86400).optional()
|
|
71408
|
+
intervalSeconds: number().min(300).max(86400).optional(),
|
|
71409
|
+
/** Availability-poll cadence; see AutoUpdateSettingsSchema. */
|
|
71410
|
+
updateCheckIntervalSeconds: number().min(900).max(604800).optional()
|
|
71288
71411
|
}), unknown(), {
|
|
71289
71412
|
kind: "mutation",
|
|
71290
71413
|
auth: "admin"
|
|
@@ -76990,7 +77113,9 @@ var ExportOptionsSchema = object({
|
|
|
76990
77113
|
includeAudio: boolean(),
|
|
76991
77114
|
maxLifeMs: number().int().positive(),
|
|
76992
77115
|
deleteAfterDownload: boolean(),
|
|
76993
|
-
title: string().max(200).optional()
|
|
77116
|
+
title: string().max(200).optional(),
|
|
77117
|
+
/** Notification-output target ids to ping when this export becomes ready. */
|
|
77118
|
+
notifyTargetIds: array(string().min(1)).max(20).optional()
|
|
76994
77119
|
}).superRefine((v, ctx) => {
|
|
76995
77120
|
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
76996
77121
|
code: ZodIssueCode.custom,
|
|
@@ -77049,10 +77174,18 @@ var ExportBytesSchema = object({
|
|
|
77049
77174
|
});
|
|
77050
77175
|
method(object({
|
|
77051
77176
|
deviceId: number(),
|
|
77052
|
-
|
|
77177
|
+
/** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
|
|
77178
|
+
profile: string().optional(),
|
|
77179
|
+
profiles: array(string()).min(1).optional(),
|
|
77053
77180
|
fromMs: number(),
|
|
77054
77181
|
toMs: number(),
|
|
77055
77182
|
options: ExportOptionsSchema
|
|
77183
|
+
}).superRefine((v, ctx) => {
|
|
77184
|
+
if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
|
|
77185
|
+
code: ZodIssueCode.custom,
|
|
77186
|
+
message: "pass profiles[] (min 1) or legacy profile",
|
|
77187
|
+
path: ["profiles"]
|
|
77188
|
+
});
|
|
77056
77189
|
}), ExportRecordSchema, {
|
|
77057
77190
|
kind: "mutation",
|
|
77058
77191
|
auth: "protected"
|
|
@@ -79994,15 +80127,6 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
79994
80127
|
labels: ["probe not implemented"]
|
|
79995
80128
|
};
|
|
79996
80129
|
}
|
|
79997
|
-
/**
|
|
79998
|
-
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
79999
|
-
*
|
|
80000
|
-
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
80001
|
-
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
80002
|
-
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
80003
|
-
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
80004
|
-
*/
|
|
80005
|
-
restoreConcurrency = 4;
|
|
80006
80130
|
async restoreDevices(savedDevices) {
|
|
80007
80131
|
await this.onRestoreDevices(savedDevices);
|
|
80008
80132
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -80057,14 +80181,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
80057
80181
|
});
|
|
80058
80182
|
}
|
|
80059
80183
|
};
|
|
80060
|
-
|
|
80061
|
-
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
80062
|
-
for (;;) {
|
|
80063
|
-
const saved = topLevel[nextTopLevel++];
|
|
80064
|
-
if (saved === void 0) return;
|
|
80065
|
-
await restoreOne(saved);
|
|
80066
|
-
}
|
|
80067
|
-
}));
|
|
80184
|
+
await Promise.all(topLevel.map((saved) => restoreOne(saved)));
|
|
80068
80185
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
80069
80186
|
for (const saved of childRows) {
|
|
80070
80187
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -83337,6 +83454,12 @@ Object.freeze({
|
|
|
83337
83454
|
addonId: null,
|
|
83338
83455
|
access: "create"
|
|
83339
83456
|
},
|
|
83457
|
+
"pipelineAnalytics.reconcileFromDisk": {
|
|
83458
|
+
capName: "pipeline-analytics",
|
|
83459
|
+
capScope: "device",
|
|
83460
|
+
addonId: null,
|
|
83461
|
+
access: "create"
|
|
83462
|
+
},
|
|
83340
83463
|
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
83341
83464
|
capName: "pipeline-analytics",
|
|
83342
83465
|
capScope: "device",
|
|
@@ -83739,6 +83862,12 @@ Object.freeze({
|
|
|
83739
83862
|
addonId: null,
|
|
83740
83863
|
access: "view"
|
|
83741
83864
|
},
|
|
83865
|
+
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
83866
|
+
capName: "pipeline-orchestrator",
|
|
83867
|
+
capScope: "system",
|
|
83868
|
+
addonId: null,
|
|
83869
|
+
access: "view"
|
|
83870
|
+
},
|
|
83742
83871
|
"pipelineOrchestrator.listAgentSettings": {
|
|
83743
83872
|
capName: "pipeline-orchestrator",
|
|
83744
83873
|
capScope: "system",
|
|
@@ -83763,6 +83892,12 @@ Object.freeze({
|
|
|
83763
83892
|
addonId: null,
|
|
83764
83893
|
access: "create"
|
|
83765
83894
|
},
|
|
83895
|
+
"pipelineOrchestrator.reconcileFromDisk": {
|
|
83896
|
+
capName: "pipeline-orchestrator",
|
|
83897
|
+
capScope: "system",
|
|
83898
|
+
addonId: null,
|
|
83899
|
+
access: "create"
|
|
83900
|
+
},
|
|
83766
83901
|
"pipelineOrchestrator.removeAgentSettings": {
|
|
83767
83902
|
capName: "pipeline-orchestrator",
|
|
83768
83903
|
capScope: "system",
|
|
@@ -86754,6 +86889,11 @@ Object.freeze({
|
|
|
86754
86889
|
form: "single",
|
|
86755
86890
|
optional: true
|
|
86756
86891
|
}],
|
|
86892
|
+
"pipelineAnalytics.reconcileFromDisk": [{
|
|
86893
|
+
name: "deviceId",
|
|
86894
|
+
form: "single",
|
|
86895
|
+
optional: false
|
|
86896
|
+
}],
|
|
86757
86897
|
"pipelineAnalytics.restageRetrainTrack": [{
|
|
86758
86898
|
name: "deviceId",
|
|
86759
86899
|
form: "single",
|
|
@@ -87819,6 +87959,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
|
87819
87959
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
87820
87960
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
87821
87961
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
87962
|
+
var MB = 1024 * 1024;
|
|
87963
|
+
1024 * MB, 3072 * MB;
|
|
87822
87964
|
//#endregion
|
|
87823
87965
|
//#region src/config.ts
|
|
87824
87966
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -50504,7 +50504,7 @@ objectType({
|
|
|
50504
50504
|
})
|
|
50505
50505
|
});
|
|
50506
50506
|
//#endregion
|
|
50507
|
-
//#region ../types/dist/event-category-
|
|
50507
|
+
//#region ../types/dist/event-category-XfKNtfCc.mjs
|
|
50508
50508
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
50509
50509
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50510
50510
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -50521,9 +50521,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
50521
50521
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
50522
50522
|
/**
|
|
50523
50523
|
* A newer addon or server-root package version was found by the
|
|
50524
|
-
* authoritative registry check. Emitted once
|
|
50525
|
-
* `(
|
|
50526
|
-
*
|
|
50524
|
+
* authoritative registry check. Emitted once when any observed
|
|
50525
|
+
* `latestVersion` changes (or a package/node first appears behind);
|
|
50526
|
+
* the payload carries the full currently-available list. Repeated
|
|
50527
|
+
* polling of the same latests is silent.
|
|
50527
50528
|
*/
|
|
50528
50529
|
EventCategory["UpdateAvailable"] = "update.available";
|
|
50529
50530
|
/**
|
|
@@ -50542,6 +50543,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
50542
50543
|
EventCategory["AddonInstalled"] = "addon.installed";
|
|
50543
50544
|
EventCategory["AddonUninstalled"] = "addon.uninstalled";
|
|
50544
50545
|
EventCategory["AddonCrashed"] = "addon.crashed";
|
|
50546
|
+
/**
|
|
50547
|
+
* A RUNNER the D6 crash circuit-breaker gave up on — terminal.
|
|
50548
|
+
*
|
|
50549
|
+
* `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
|
|
50550
|
+
* respawned"); this is the one that never resolves itself. Emitted exactly
|
|
50551
|
+
* once per trip, by `process-service.ts`, carrying the node, the runner, the
|
|
50552
|
+
* addons it hosted and the crash count that tripped the breaker.
|
|
50553
|
+
*
|
|
50554
|
+
* It exists because a runner marked terminally `failed` used to be SILENT:
|
|
50555
|
+
* on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
|
|
50556
|
+
* errors, the breaker stopped respawning it (correctly), `/health` kept
|
|
50557
|
+
* returning 200, and fleet-wide recording was gone for 3h15 before the
|
|
50558
|
+
* operator's phone told him. The Notification Center's system-event intake
|
|
50559
|
+
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
50560
|
+
*/
|
|
50561
|
+
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
50545
50562
|
EventCategory["AddonError"] = "addon.error";
|
|
50546
50563
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
50547
50564
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -58053,6 +58070,10 @@ var RecordingBandSchema = object({
|
|
|
58053
58070
|
preBufferSec: number().min(0).optional(),
|
|
58054
58071
|
postBufferSec: number().min(0).optional()
|
|
58055
58072
|
});
|
|
58073
|
+
({
|
|
58074
|
+
preBufferSec: 10,
|
|
58075
|
+
postBufferSec: 30
|
|
58076
|
+
}).postBufferSec * 1e3;
|
|
58056
58077
|
/**
|
|
58057
58078
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
58058
58079
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -58100,6 +58121,12 @@ var RecordingConfigSchema = object({
|
|
|
58100
58121
|
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
58101
58122
|
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
58102
58123
|
mode: RecordingStorageModeSchema.optional(),
|
|
58124
|
+
/**
|
|
58125
|
+
* Which assigned broker slots to record. Absent / empty = {@link
|
|
58126
|
+
* DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
|
|
58127
|
+
* camera's currently assigned slots — never `mid` unless the operator
|
|
58128
|
+
* picks it, and never a slot the broker has not assigned.
|
|
58129
|
+
*/
|
|
58103
58130
|
profiles: array(CamProfileSchema).optional(),
|
|
58104
58131
|
segmentSeconds: number().int().positive().optional(),
|
|
58105
58132
|
/**
|
|
@@ -58180,7 +58207,11 @@ var RelocateFootageInputSchema = object({
|
|
|
58180
58207
|
profiles: array(string()).optional(),
|
|
58181
58208
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
58182
58209
|
* never allowed to starve live writers. */
|
|
58183
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
58210
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
58211
|
+
/** Move only segments whose startMs is >= this. Absent = the whole source
|
|
58212
|
+
* pile. Used when a full drain is too expensive and the operator only
|
|
58213
|
+
* wants the recent window on the new disk. */
|
|
58214
|
+
sinceMs: number().int().optional()
|
|
58184
58215
|
});
|
|
58185
58216
|
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
58186
58217
|
* from persistent recording settings: a migration never changes
|
|
@@ -65062,6 +65093,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
65062
65093
|
"node-offline",
|
|
65063
65094
|
"node-inference-unavailable",
|
|
65064
65095
|
"detection-blind",
|
|
65096
|
+
"addon-crash-loop",
|
|
65065
65097
|
"addon-update-available",
|
|
65066
65098
|
"server-update-available",
|
|
65067
65099
|
"alarm-triggered",
|
|
@@ -65069,6 +65101,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
65069
65101
|
"alarm-disarmed",
|
|
65070
65102
|
"alarm-arming",
|
|
65071
65103
|
"alarm-arm-refused",
|
|
65104
|
+
"addon-updated",
|
|
65105
|
+
"server-updated",
|
|
65106
|
+
"export-completed",
|
|
65072
65107
|
"camera-online",
|
|
65073
65108
|
"camera-offline",
|
|
65074
65109
|
"camera-disabled",
|
|
@@ -66962,13 +66997,19 @@ var RetrainStatusSchema = _enum([
|
|
|
66962
66997
|
* "never marked" from "already trained" must read `retrainStatus`.
|
|
66963
66998
|
*
|
|
66964
66999
|
* `debug` does NOT pin; it is attention, not durability.
|
|
67000
|
+
*
|
|
67001
|
+
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
67002
|
+
* A favourited track is skipped by retention the same way `staging` is, but
|
|
67003
|
+
* it does not enter `none|staging|trained` and has no staging budget.
|
|
66965
67004
|
*/
|
|
66966
67005
|
var TrackFlagFields = {
|
|
66967
67006
|
/** Operator marked this track as training material — i.e. `retrainStatus` is
|
|
66968
67007
|
* `'staging'`. */
|
|
66969
67008
|
markForTrain: boolean().optional(),
|
|
66970
67009
|
/** Operator marked this track for diagnostic attention. */
|
|
66971
|
-
debug: boolean().optional()
|
|
67010
|
+
debug: boolean().optional(),
|
|
67011
|
+
/** Operator favourited this track. Pins it against pruning. */
|
|
67012
|
+
favourited: boolean().optional()
|
|
66972
67013
|
};
|
|
66973
67014
|
/**
|
|
66974
67015
|
* The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
|
|
@@ -66993,6 +67034,7 @@ var TrackFlagsSchema = object({
|
|
|
66993
67034
|
trackId: string(),
|
|
66994
67035
|
markForTrain: boolean(),
|
|
66995
67036
|
debug: boolean(),
|
|
67037
|
+
favourited: boolean(),
|
|
66996
67038
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
66997
67039
|
* a track row) because this shape is only ever produced by the write body,
|
|
66998
67040
|
* which always knows it — and a surface that has just written needs to render
|
|
@@ -67625,6 +67667,12 @@ var TrackCascadeCountsSchema = object({
|
|
|
67625
67667
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
67626
67668
|
embeddings: number().int()
|
|
67627
67669
|
});
|
|
67670
|
+
/** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
|
|
67671
|
+
var DiskReconcileCountsSchema = object({
|
|
67672
|
+
mediaDropped: number().int(),
|
|
67673
|
+
tracks: number().int(),
|
|
67674
|
+
events: number().int()
|
|
67675
|
+
});
|
|
67628
67676
|
/** Event-store footprint for one camera. */
|
|
67629
67677
|
var EventStoreDeviceFootprintSchema = object({
|
|
67630
67678
|
deviceId: number(),
|
|
@@ -67801,6 +67849,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
67801
67849
|
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
67802
67850
|
kind: "mutation",
|
|
67803
67851
|
auth: "admin"
|
|
67852
|
+
}), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
|
|
67853
|
+
kind: "mutation",
|
|
67854
|
+
auth: "admin"
|
|
67804
67855
|
}), method(object({
|
|
67805
67856
|
deviceId: number(),
|
|
67806
67857
|
trackIds: array(string()).min(1)
|
|
@@ -69351,6 +69402,24 @@ var CameraStatusDegradationSchema = object({
|
|
|
69351
69402
|
*
|
|
69352
69403
|
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
69353
69404
|
*/
|
|
69405
|
+
var DiskReconcileJobSchema = object({
|
|
69406
|
+
state: _enum([
|
|
69407
|
+
"idle",
|
|
69408
|
+
"running",
|
|
69409
|
+
"done",
|
|
69410
|
+
"error"
|
|
69411
|
+
]),
|
|
69412
|
+
total: number().int().nonnegative(),
|
|
69413
|
+
completed: number().int().nonnegative(),
|
|
69414
|
+
currentDeviceId: number().int().nullable(),
|
|
69415
|
+
failed: array(number().int()).readonly(),
|
|
69416
|
+
mediaDropped: number().int().nonnegative(),
|
|
69417
|
+
tracks: number().int().nonnegative(),
|
|
69418
|
+
events: number().int().nonnegative(),
|
|
69419
|
+
startedAtMs: number().int().nullable(),
|
|
69420
|
+
finishedAtMs: number().int().nullable(),
|
|
69421
|
+
error: string().nullable()
|
|
69422
|
+
});
|
|
69354
69423
|
var CameraStatusSchema = object({
|
|
69355
69424
|
deviceId: number(),
|
|
69356
69425
|
assignment: CameraAssignmentStatusSchema,
|
|
@@ -69582,7 +69651,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
69582
69651
|
}), CameraSwitchGroupSchema, {
|
|
69583
69652
|
kind: "mutation",
|
|
69584
69653
|
auth: "admin"
|
|
69585
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(),
|
|
69654
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
|
|
69655
|
+
kind: "mutation",
|
|
69656
|
+
auth: "admin"
|
|
69657
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
69586
69658
|
name: string(),
|
|
69587
69659
|
description: string().optional(),
|
|
69588
69660
|
config: CameraPipelineConfigSchema
|
|
@@ -69987,7 +70059,14 @@ targets: array(object({
|
|
|
69987
70059
|
"sleeping",
|
|
69988
70060
|
"unreachable",
|
|
69989
70061
|
"waking"
|
|
69990
|
-
]).nullable()
|
|
70062
|
+
]).nullable(),
|
|
70063
|
+
/** A battery camera (whatever its current state). An AWAKE battery
|
|
70064
|
+
* camera is deliberately NOT recaptured on the poll cadence — every
|
|
70065
|
+
* capture is a camera hit that would keep it out of sleep — so its
|
|
70066
|
+
* cached frame legitimately ages past the currency ceiling while
|
|
70067
|
+
* nothing is streaming. A surface must keep painting it (a fresh
|
|
70068
|
+
* frame is captured at each wake), not blank to "unavailable". */
|
|
70069
|
+
battery: boolean()
|
|
69991
70070
|
})));
|
|
69992
70071
|
/**
|
|
69993
70072
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
@@ -70648,20 +70727,6 @@ var VectorStatsResultSchema = object({
|
|
|
70648
70727
|
exact: boolean()
|
|
70649
70728
|
});
|
|
70650
70729
|
method(VectorDeclareIndexInputSchema, _void(), { kind: "mutation" }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, { kind: "mutation" }), method(VectorQueryInputSchema, VectorQueryResultSchema), method(VectorGetInputSchema, VectorGetResultSchema), method(VectorDeleteInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorStatsInputSchema, VectorStatsResultSchema);
|
|
70651
|
-
/**
|
|
70652
|
-
* `videoclips` — the unified, navigable-clip surface for a camera.
|
|
70653
|
-
*
|
|
70654
|
-
* A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
|
|
70655
|
-
* provider per device, substitutable. The DEFAULT provider (registered by
|
|
70656
|
-
* `addon-post-analysis`, `defaultActive: true`) composes the analytics event
|
|
70657
|
-
* log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
|
|
70658
|
-
* is a time-WINDOW over existing footage, never a separate file. A camera that
|
|
70659
|
-
* exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
|
|
70660
|
-
* wrapper provider for its device and serve its own clip catalog + URLs.
|
|
70661
|
-
*
|
|
70662
|
-
* A `Clip` is purely time-based (subtree-blind): playback resolves segments by
|
|
70663
|
-
* temporal overlap, so the API never decides `continuous` vs `events`.
|
|
70664
|
-
*/
|
|
70665
70730
|
var ClipSchema = object({
|
|
70666
70731
|
/** Opaque, provider-namespaced id. The default provider encodes the time
|
|
70667
70732
|
* window so `getClipPlayback` is self-contained (no event re-query). */
|
|
@@ -70678,8 +70743,57 @@ var ClipSchema = object({
|
|
|
70678
70743
|
startMs: number(),
|
|
70679
70744
|
endMs: number()
|
|
70680
70745
|
}),
|
|
70681
|
-
/**
|
|
70682
|
-
thumbnail
|
|
70746
|
+
/**
|
|
70747
|
+
* Lazy thumbnail URL, never inlined.
|
|
70748
|
+
*
|
|
70749
|
+
* Recording-derived clips (events-mode keep-window, and the prepared
|
|
70750
|
+
* continuous event+fragment visit) MUST use the snapshot of the **main
|
|
70751
|
+
* event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
|
|
70752
|
+
* of the event that owns `kind` (object > motion > audio). Do not extract
|
|
70753
|
+
* a keyframe from the recorded segments. Other providers (onboard, HKSV)
|
|
70754
|
+
* mint their own stills.
|
|
70755
|
+
*
|
|
70756
|
+
* **VOUCHED, never fabricated.** A provider emits this only for an event it
|
|
70757
|
+
* has CONFIRMED owns at least one media row (its own, or its owning track's).
|
|
70758
|
+
* Absent is meaningful — "this visit has no event still" — never "we did not
|
|
70759
|
+
* look". Stamping it from a URL template made 35% of one camera's clips point
|
|
70760
|
+
* at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
|
|
70761
|
+
* A read that FAILS drops the claim; it never invents it.
|
|
70762
|
+
*/
|
|
70763
|
+
thumbnail: string().optional(),
|
|
70764
|
+
/**
|
|
70765
|
+
* An instant INSIDE this visit's footage, hole-safe, where a recorded still
|
|
70766
|
+
* can be decoded. Present whenever the visit came from recorded availability;
|
|
70767
|
+
* absent on a per-event padded window (there is no footage to promise).
|
|
70768
|
+
*
|
|
70769
|
+
* This is not a thumbnail and not a second byte path: it is the argument to
|
|
70770
|
+
* the recorder's existing still route. The surface — never the provider —
|
|
70771
|
+
* decides whether to use it. It is the midpoint of the visit's LONGEST
|
|
70772
|
+
* contiguous range, not of the visit: a visit spans its holes by
|
|
70773
|
+
* construction, so a naive midpoint lands in dead air.
|
|
70774
|
+
*/
|
|
70775
|
+
stillAtMs: number().optional(),
|
|
70776
|
+
/**
|
|
70777
|
+
* Analytics event ids that overlap this visit — a BOUNDED sample, newest
|
|
70778
|
+
* first within kind (object → motion → audio), capped at
|
|
70779
|
+
* {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
|
|
70780
|
+
*
|
|
70781
|
+
* Bounded because it is not a payload the surface pages through: one visit on
|
|
70782
|
+
* device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
|
|
70783
|
+
* camera-day. Read {@link eventCount} for the true total.
|
|
70784
|
+
*/
|
|
70785
|
+
eventIds: array(string()).optional(),
|
|
70786
|
+
/** How many analytics events actually overlap this visit. Differs from
|
|
70787
|
+
* `eventIds.length` exactly when the sample was capped — so a truncated
|
|
70788
|
+
* list is never mistaken for a quiet visit. */
|
|
70789
|
+
eventCount: number().int().nonnegative().optional(),
|
|
70790
|
+
/** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
|
|
70791
|
+
* than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
|
|
70792
|
+
* bar keeps showing them via `recording.getAvailability`. */
|
|
70793
|
+
holes: array(object({
|
|
70794
|
+
startMs: number(),
|
|
70795
|
+
endMs: number()
|
|
70796
|
+
})).optional()
|
|
70683
70797
|
});
|
|
70684
70798
|
var ClipPlaybackSchema = object({
|
|
70685
70799
|
/** HLS master URL through the hub data-plane (Range + token in path). */
|
|
@@ -71143,7 +71257,14 @@ var SearchResultSchema = object({
|
|
|
71143
71257
|
});
|
|
71144
71258
|
var AutoUpdateSettingsSchema = object({
|
|
71145
71259
|
channel: ChannelSchema,
|
|
71146
|
-
intervalSeconds: number()
|
|
71260
|
+
intervalSeconds: number(),
|
|
71261
|
+
/**
|
|
71262
|
+
* Cadence of the "an update exists" POLLER, in seconds. Independent of
|
|
71263
|
+
* `channel`: the poller runs while auto-apply is `off`, because being told
|
|
71264
|
+
* about a publish and installing it are different decisions. Clamped
|
|
71265
|
+
* server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
|
|
71266
|
+
*/
|
|
71267
|
+
updateCheckIntervalSeconds: number()
|
|
71147
71268
|
});
|
|
71148
71269
|
var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
71149
71270
|
var RestartAddonResultSchema = unknown();
|
|
@@ -71284,7 +71405,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
71284
71405
|
auth: "admin"
|
|
71285
71406
|
}), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
|
|
71286
71407
|
channel: ChannelSchema,
|
|
71287
|
-
intervalSeconds: number().min(300).max(86400).optional()
|
|
71408
|
+
intervalSeconds: number().min(300).max(86400).optional(),
|
|
71409
|
+
/** Availability-poll cadence; see AutoUpdateSettingsSchema. */
|
|
71410
|
+
updateCheckIntervalSeconds: number().min(900).max(604800).optional()
|
|
71288
71411
|
}), unknown(), {
|
|
71289
71412
|
kind: "mutation",
|
|
71290
71413
|
auth: "admin"
|
|
@@ -76990,7 +77113,9 @@ var ExportOptionsSchema = object({
|
|
|
76990
77113
|
includeAudio: boolean(),
|
|
76991
77114
|
maxLifeMs: number().int().positive(),
|
|
76992
77115
|
deleteAfterDownload: boolean(),
|
|
76993
|
-
title: string().max(200).optional()
|
|
77116
|
+
title: string().max(200).optional(),
|
|
77117
|
+
/** Notification-output target ids to ping when this export becomes ready. */
|
|
77118
|
+
notifyTargetIds: array(string().min(1)).max(20).optional()
|
|
76994
77119
|
}).superRefine((v, ctx) => {
|
|
76995
77120
|
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
76996
77121
|
code: ZodIssueCode.custom,
|
|
@@ -77049,10 +77174,18 @@ var ExportBytesSchema = object({
|
|
|
77049
77174
|
});
|
|
77050
77175
|
method(object({
|
|
77051
77176
|
deviceId: number(),
|
|
77052
|
-
|
|
77177
|
+
/** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
|
|
77178
|
+
profile: string().optional(),
|
|
77179
|
+
profiles: array(string()).min(1).optional(),
|
|
77053
77180
|
fromMs: number(),
|
|
77054
77181
|
toMs: number(),
|
|
77055
77182
|
options: ExportOptionsSchema
|
|
77183
|
+
}).superRefine((v, ctx) => {
|
|
77184
|
+
if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
|
|
77185
|
+
code: ZodIssueCode.custom,
|
|
77186
|
+
message: "pass profiles[] (min 1) or legacy profile",
|
|
77187
|
+
path: ["profiles"]
|
|
77188
|
+
});
|
|
77056
77189
|
}), ExportRecordSchema, {
|
|
77057
77190
|
kind: "mutation",
|
|
77058
77191
|
auth: "protected"
|
|
@@ -79994,15 +80127,6 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
79994
80127
|
labels: ["probe not implemented"]
|
|
79995
80128
|
};
|
|
79996
80129
|
}
|
|
79997
|
-
/**
|
|
79998
|
-
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
79999
|
-
*
|
|
80000
|
-
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
80001
|
-
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
80002
|
-
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
80003
|
-
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
80004
|
-
*/
|
|
80005
|
-
restoreConcurrency = 4;
|
|
80006
80130
|
async restoreDevices(savedDevices) {
|
|
80007
80131
|
await this.onRestoreDevices(savedDevices);
|
|
80008
80132
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -80057,14 +80181,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
80057
80181
|
});
|
|
80058
80182
|
}
|
|
80059
80183
|
};
|
|
80060
|
-
|
|
80061
|
-
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
80062
|
-
for (;;) {
|
|
80063
|
-
const saved = topLevel[nextTopLevel++];
|
|
80064
|
-
if (saved === void 0) return;
|
|
80065
|
-
await restoreOne(saved);
|
|
80066
|
-
}
|
|
80067
|
-
}));
|
|
80184
|
+
await Promise.all(topLevel.map((saved) => restoreOne(saved)));
|
|
80068
80185
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
80069
80186
|
for (const saved of childRows) {
|
|
80070
80187
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -83337,6 +83454,12 @@ Object.freeze({
|
|
|
83337
83454
|
addonId: null,
|
|
83338
83455
|
access: "create"
|
|
83339
83456
|
},
|
|
83457
|
+
"pipelineAnalytics.reconcileFromDisk": {
|
|
83458
|
+
capName: "pipeline-analytics",
|
|
83459
|
+
capScope: "device",
|
|
83460
|
+
addonId: null,
|
|
83461
|
+
access: "create"
|
|
83462
|
+
},
|
|
83340
83463
|
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
83341
83464
|
capName: "pipeline-analytics",
|
|
83342
83465
|
capScope: "device",
|
|
@@ -83739,6 +83862,12 @@ Object.freeze({
|
|
|
83739
83862
|
addonId: null,
|
|
83740
83863
|
access: "view"
|
|
83741
83864
|
},
|
|
83865
|
+
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
83866
|
+
capName: "pipeline-orchestrator",
|
|
83867
|
+
capScope: "system",
|
|
83868
|
+
addonId: null,
|
|
83869
|
+
access: "view"
|
|
83870
|
+
},
|
|
83742
83871
|
"pipelineOrchestrator.listAgentSettings": {
|
|
83743
83872
|
capName: "pipeline-orchestrator",
|
|
83744
83873
|
capScope: "system",
|
|
@@ -83763,6 +83892,12 @@ Object.freeze({
|
|
|
83763
83892
|
addonId: null,
|
|
83764
83893
|
access: "create"
|
|
83765
83894
|
},
|
|
83895
|
+
"pipelineOrchestrator.reconcileFromDisk": {
|
|
83896
|
+
capName: "pipeline-orchestrator",
|
|
83897
|
+
capScope: "system",
|
|
83898
|
+
addonId: null,
|
|
83899
|
+
access: "create"
|
|
83900
|
+
},
|
|
83766
83901
|
"pipelineOrchestrator.removeAgentSettings": {
|
|
83767
83902
|
capName: "pipeline-orchestrator",
|
|
83768
83903
|
capScope: "system",
|
|
@@ -86754,6 +86889,11 @@ Object.freeze({
|
|
|
86754
86889
|
form: "single",
|
|
86755
86890
|
optional: true
|
|
86756
86891
|
}],
|
|
86892
|
+
"pipelineAnalytics.reconcileFromDisk": [{
|
|
86893
|
+
name: "deviceId",
|
|
86894
|
+
form: "single",
|
|
86895
|
+
optional: false
|
|
86896
|
+
}],
|
|
86757
86897
|
"pipelineAnalytics.restageRetrainTrack": [{
|
|
86758
86898
|
name: "deviceId",
|
|
86759
86899
|
form: "single",
|
|
@@ -87819,6 +87959,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
|
87819
87959
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
87820
87960
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
87821
87961
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
87962
|
+
var MB = 1024 * 1024;
|
|
87963
|
+
1024 * MB, 3072 * MB;
|
|
87822
87964
|
//#endregion
|
|
87823
87965
|
//#region src/config.ts
|
|
87824
87966
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|