@camstack/addon-provider-ecowitt 0.2.19 → 0.2.20
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 +179 -44
- package/dist/addon.mjs +179 -44
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let http = require("http");
|
|
3
3
|
let events = require("events");
|
|
4
4
|
let dgram = require("dgram");
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-XfKNtfCc.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -19,9 +19,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
19
19
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
20
20
|
/**
|
|
21
21
|
* A newer addon or server-root package version was found by the
|
|
22
|
-
* authoritative registry check. Emitted once
|
|
23
|
-
* `(
|
|
24
|
-
*
|
|
22
|
+
* authoritative registry check. Emitted once when any observed
|
|
23
|
+
* `latestVersion` changes (or a package/node first appears behind);
|
|
24
|
+
* the payload carries the full currently-available list. Repeated
|
|
25
|
+
* polling of the same latests is silent.
|
|
25
26
|
*/
|
|
26
27
|
EventCategory["UpdateAvailable"] = "update.available";
|
|
27
28
|
/**
|
|
@@ -40,6 +41,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
40
41
|
EventCategory["AddonInstalled"] = "addon.installed";
|
|
41
42
|
EventCategory["AddonUninstalled"] = "addon.uninstalled";
|
|
42
43
|
EventCategory["AddonCrashed"] = "addon.crashed";
|
|
44
|
+
/**
|
|
45
|
+
* A RUNNER the D6 crash circuit-breaker gave up on — terminal.
|
|
46
|
+
*
|
|
47
|
+
* `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
|
|
48
|
+
* respawned"); this is the one that never resolves itself. Emitted exactly
|
|
49
|
+
* once per trip, by `process-service.ts`, carrying the node, the runner, the
|
|
50
|
+
* addons it hosted and the crash count that tripped the breaker.
|
|
51
|
+
*
|
|
52
|
+
* It exists because a runner marked terminally `failed` used to be SILENT:
|
|
53
|
+
* on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
|
|
54
|
+
* errors, the breaker stopped respawning it (correctly), `/health` kept
|
|
55
|
+
* returning 200, and fleet-wide recording was gone for 3h15 before the
|
|
56
|
+
* operator's phone told him. The Notification Center's system-event intake
|
|
57
|
+
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
58
|
+
*/
|
|
59
|
+
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
43
60
|
EventCategory["AddonError"] = "addon.error";
|
|
44
61
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
45
62
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -7551,6 +7568,10 @@ var RecordingBandSchema = object({
|
|
|
7551
7568
|
preBufferSec: number().min(0).optional(),
|
|
7552
7569
|
postBufferSec: number().min(0).optional()
|
|
7553
7570
|
});
|
|
7571
|
+
({
|
|
7572
|
+
preBufferSec: 10,
|
|
7573
|
+
postBufferSec: 30
|
|
7574
|
+
}).postBufferSec * 1e3;
|
|
7554
7575
|
/**
|
|
7555
7576
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7556
7577
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -7598,6 +7619,12 @@ var RecordingConfigSchema = object({
|
|
|
7598
7619
|
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
7599
7620
|
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
7600
7621
|
mode: RecordingStorageModeSchema.optional(),
|
|
7622
|
+
/**
|
|
7623
|
+
* Which assigned broker slots to record. Absent / empty = {@link
|
|
7624
|
+
* DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
|
|
7625
|
+
* camera's currently assigned slots — never `mid` unless the operator
|
|
7626
|
+
* picks it, and never a slot the broker has not assigned.
|
|
7627
|
+
*/
|
|
7601
7628
|
profiles: array(CamProfileSchema).optional(),
|
|
7602
7629
|
segmentSeconds: number().int().positive().optional(),
|
|
7603
7630
|
/**
|
|
@@ -7678,7 +7705,11 @@ var RelocateFootageInputSchema = object({
|
|
|
7678
7705
|
profiles: array(string()).optional(),
|
|
7679
7706
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7680
7707
|
* never allowed to starve live writers. */
|
|
7681
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
7708
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
7709
|
+
/** Move only segments whose startMs is >= this. Absent = the whole source
|
|
7710
|
+
* pile. Used when a full drain is too expensive and the operator only
|
|
7711
|
+
* wants the recent window on the new disk. */
|
|
7712
|
+
sinceMs: number().int().optional()
|
|
7682
7713
|
});
|
|
7683
7714
|
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7684
7715
|
* from persistent recording settings: a migration never changes
|
|
@@ -14543,6 +14574,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14543
14574
|
"node-offline",
|
|
14544
14575
|
"node-inference-unavailable",
|
|
14545
14576
|
"detection-blind",
|
|
14577
|
+
"addon-crash-loop",
|
|
14546
14578
|
"addon-update-available",
|
|
14547
14579
|
"server-update-available",
|
|
14548
14580
|
"alarm-triggered",
|
|
@@ -14550,6 +14582,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14550
14582
|
"alarm-disarmed",
|
|
14551
14583
|
"alarm-arming",
|
|
14552
14584
|
"alarm-arm-refused",
|
|
14585
|
+
"addon-updated",
|
|
14586
|
+
"server-updated",
|
|
14587
|
+
"export-completed",
|
|
14553
14588
|
"camera-online",
|
|
14554
14589
|
"camera-offline",
|
|
14555
14590
|
"camera-disabled",
|
|
@@ -16443,13 +16478,19 @@ var RetrainStatusSchema = _enum([
|
|
|
16443
16478
|
* "never marked" from "already trained" must read `retrainStatus`.
|
|
16444
16479
|
*
|
|
16445
16480
|
* `debug` does NOT pin; it is attention, not durability.
|
|
16481
|
+
*
|
|
16482
|
+
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
16483
|
+
* A favourited track is skipped by retention the same way `staging` is, but
|
|
16484
|
+
* it does not enter `none|staging|trained` and has no staging budget.
|
|
16446
16485
|
*/
|
|
16447
16486
|
var TrackFlagFields = {
|
|
16448
16487
|
/** Operator marked this track as training material — i.e. `retrainStatus` is
|
|
16449
16488
|
* `'staging'`. */
|
|
16450
16489
|
markForTrain: boolean().optional(),
|
|
16451
16490
|
/** Operator marked this track for diagnostic attention. */
|
|
16452
|
-
debug: boolean().optional()
|
|
16491
|
+
debug: boolean().optional(),
|
|
16492
|
+
/** Operator favourited this track. Pins it against pruning. */
|
|
16493
|
+
favourited: boolean().optional()
|
|
16453
16494
|
};
|
|
16454
16495
|
/**
|
|
16455
16496
|
* The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
|
|
@@ -16474,6 +16515,7 @@ var TrackFlagsSchema = object({
|
|
|
16474
16515
|
trackId: string(),
|
|
16475
16516
|
markForTrain: boolean(),
|
|
16476
16517
|
debug: boolean(),
|
|
16518
|
+
favourited: boolean(),
|
|
16477
16519
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
16478
16520
|
* a track row) because this shape is only ever produced by the write body,
|
|
16479
16521
|
* which always knows it — and a surface that has just written needs to render
|
|
@@ -17106,6 +17148,12 @@ var TrackCascadeCountsSchema = object({
|
|
|
17106
17148
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
17107
17149
|
embeddings: number().int()
|
|
17108
17150
|
});
|
|
17151
|
+
/** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
|
|
17152
|
+
var DiskReconcileCountsSchema = object({
|
|
17153
|
+
mediaDropped: number().int(),
|
|
17154
|
+
tracks: number().int(),
|
|
17155
|
+
events: number().int()
|
|
17156
|
+
});
|
|
17109
17157
|
/** Event-store footprint for one camera. */
|
|
17110
17158
|
var EventStoreDeviceFootprintSchema = object({
|
|
17111
17159
|
deviceId: number(),
|
|
@@ -17282,6 +17330,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17282
17330
|
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
17283
17331
|
kind: "mutation",
|
|
17284
17332
|
auth: "admin"
|
|
17333
|
+
}), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
|
|
17334
|
+
kind: "mutation",
|
|
17335
|
+
auth: "admin"
|
|
17285
17336
|
}), method(object({
|
|
17286
17337
|
deviceId: number(),
|
|
17287
17338
|
trackIds: array(string()).min(1)
|
|
@@ -18832,6 +18883,24 @@ var CameraStatusDegradationSchema = object({
|
|
|
18832
18883
|
*
|
|
18833
18884
|
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
18834
18885
|
*/
|
|
18886
|
+
var DiskReconcileJobSchema = object({
|
|
18887
|
+
state: _enum([
|
|
18888
|
+
"idle",
|
|
18889
|
+
"running",
|
|
18890
|
+
"done",
|
|
18891
|
+
"error"
|
|
18892
|
+
]),
|
|
18893
|
+
total: number().int().nonnegative(),
|
|
18894
|
+
completed: number().int().nonnegative(),
|
|
18895
|
+
currentDeviceId: number().int().nullable(),
|
|
18896
|
+
failed: array(number().int()).readonly(),
|
|
18897
|
+
mediaDropped: number().int().nonnegative(),
|
|
18898
|
+
tracks: number().int().nonnegative(),
|
|
18899
|
+
events: number().int().nonnegative(),
|
|
18900
|
+
startedAtMs: number().int().nullable(),
|
|
18901
|
+
finishedAtMs: number().int().nullable(),
|
|
18902
|
+
error: string().nullable()
|
|
18903
|
+
});
|
|
18835
18904
|
var CameraStatusSchema = object({
|
|
18836
18905
|
deviceId: number(),
|
|
18837
18906
|
assignment: CameraAssignmentStatusSchema,
|
|
@@ -19063,7 +19132,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
19063
19132
|
}), CameraSwitchGroupSchema, {
|
|
19064
19133
|
kind: "mutation",
|
|
19065
19134
|
auth: "admin"
|
|
19066
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(),
|
|
19135
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
|
|
19136
|
+
kind: "mutation",
|
|
19137
|
+
auth: "admin"
|
|
19138
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
19067
19139
|
name: string(),
|
|
19068
19140
|
description: string().optional(),
|
|
19069
19141
|
config: CameraPipelineConfigSchema
|
|
@@ -20136,20 +20208,6 @@ var VectorStatsResultSchema = object({
|
|
|
20136
20208
|
exact: boolean()
|
|
20137
20209
|
});
|
|
20138
20210
|
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);
|
|
20139
|
-
/**
|
|
20140
|
-
* `videoclips` — the unified, navigable-clip surface for a camera.
|
|
20141
|
-
*
|
|
20142
|
-
* A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
|
|
20143
|
-
* provider per device, substitutable. The DEFAULT provider (registered by
|
|
20144
|
-
* `addon-post-analysis`, `defaultActive: true`) composes the analytics event
|
|
20145
|
-
* log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
|
|
20146
|
-
* is a time-WINDOW over existing footage, never a separate file. A camera that
|
|
20147
|
-
* exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
|
|
20148
|
-
* wrapper provider for its device and serve its own clip catalog + URLs.
|
|
20149
|
-
*
|
|
20150
|
-
* A `Clip` is purely time-based (subtree-blind): playback resolves segments by
|
|
20151
|
-
* temporal overlap, so the API never decides `continuous` vs `events`.
|
|
20152
|
-
*/
|
|
20153
20211
|
var ClipSchema = object({
|
|
20154
20212
|
/** Opaque, provider-namespaced id. The default provider encodes the time
|
|
20155
20213
|
* window so `getClipPlayback` is self-contained (no event re-query). */
|
|
@@ -20166,8 +20224,57 @@ var ClipSchema = object({
|
|
|
20166
20224
|
startMs: number(),
|
|
20167
20225
|
endMs: number()
|
|
20168
20226
|
}),
|
|
20169
|
-
/**
|
|
20170
|
-
thumbnail
|
|
20227
|
+
/**
|
|
20228
|
+
* Lazy thumbnail URL, never inlined.
|
|
20229
|
+
*
|
|
20230
|
+
* Recording-derived clips (events-mode keep-window, and the prepared
|
|
20231
|
+
* continuous event+fragment visit) MUST use the snapshot of the **main
|
|
20232
|
+
* event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
|
|
20233
|
+
* of the event that owns `kind` (object > motion > audio). Do not extract
|
|
20234
|
+
* a keyframe from the recorded segments. Other providers (onboard, HKSV)
|
|
20235
|
+
* mint their own stills.
|
|
20236
|
+
*
|
|
20237
|
+
* **VOUCHED, never fabricated.** A provider emits this only for an event it
|
|
20238
|
+
* has CONFIRMED owns at least one media row (its own, or its owning track's).
|
|
20239
|
+
* Absent is meaningful — "this visit has no event still" — never "we did not
|
|
20240
|
+
* look". Stamping it from a URL template made 35% of one camera's clips point
|
|
20241
|
+
* at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
|
|
20242
|
+
* A read that FAILS drops the claim; it never invents it.
|
|
20243
|
+
*/
|
|
20244
|
+
thumbnail: string().optional(),
|
|
20245
|
+
/**
|
|
20246
|
+
* An instant INSIDE this visit's footage, hole-safe, where a recorded still
|
|
20247
|
+
* can be decoded. Present whenever the visit came from recorded availability;
|
|
20248
|
+
* absent on a per-event padded window (there is no footage to promise).
|
|
20249
|
+
*
|
|
20250
|
+
* This is not a thumbnail and not a second byte path: it is the argument to
|
|
20251
|
+
* the recorder's existing still route. The surface — never the provider —
|
|
20252
|
+
* decides whether to use it. It is the midpoint of the visit's LONGEST
|
|
20253
|
+
* contiguous range, not of the visit: a visit spans its holes by
|
|
20254
|
+
* construction, so a naive midpoint lands in dead air.
|
|
20255
|
+
*/
|
|
20256
|
+
stillAtMs: number().optional(),
|
|
20257
|
+
/**
|
|
20258
|
+
* Analytics event ids that overlap this visit — a BOUNDED sample, newest
|
|
20259
|
+
* first within kind (object → motion → audio), capped at
|
|
20260
|
+
* {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
|
|
20261
|
+
*
|
|
20262
|
+
* Bounded because it is not a payload the surface pages through: one visit on
|
|
20263
|
+
* device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
|
|
20264
|
+
* camera-day. Read {@link eventCount} for the true total.
|
|
20265
|
+
*/
|
|
20266
|
+
eventIds: array(string()).optional(),
|
|
20267
|
+
/** How many analytics events actually overlap this visit. Differs from
|
|
20268
|
+
* `eventIds.length` exactly when the sample was capped — so a truncated
|
|
20269
|
+
* list is never mistaken for a quiet visit. */
|
|
20270
|
+
eventCount: number().int().nonnegative().optional(),
|
|
20271
|
+
/** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
|
|
20272
|
+
* than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
|
|
20273
|
+
* bar keeps showing them via `recording.getAvailability`. */
|
|
20274
|
+
holes: array(object({
|
|
20275
|
+
startMs: number(),
|
|
20276
|
+
endMs: number()
|
|
20277
|
+
})).optional()
|
|
20171
20278
|
});
|
|
20172
20279
|
var ClipPlaybackSchema = object({
|
|
20173
20280
|
/** HLS master URL through the hub data-plane (Range + token in path). */
|
|
@@ -20631,7 +20738,14 @@ var SearchResultSchema = object({
|
|
|
20631
20738
|
});
|
|
20632
20739
|
var AutoUpdateSettingsSchema = object({
|
|
20633
20740
|
channel: ChannelSchema,
|
|
20634
|
-
intervalSeconds: number()
|
|
20741
|
+
intervalSeconds: number(),
|
|
20742
|
+
/**
|
|
20743
|
+
* Cadence of the "an update exists" POLLER, in seconds. Independent of
|
|
20744
|
+
* `channel`: the poller runs while auto-apply is `off`, because being told
|
|
20745
|
+
* about a publish and installing it are different decisions. Clamped
|
|
20746
|
+
* server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
|
|
20747
|
+
*/
|
|
20748
|
+
updateCheckIntervalSeconds: number()
|
|
20635
20749
|
});
|
|
20636
20750
|
var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
20637
20751
|
var RestartAddonResultSchema = unknown();
|
|
@@ -20772,7 +20886,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
20772
20886
|
auth: "admin"
|
|
20773
20887
|
}), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
|
|
20774
20888
|
channel: ChannelSchema,
|
|
20775
|
-
intervalSeconds: number().min(300).max(86400).optional()
|
|
20889
|
+
intervalSeconds: number().min(300).max(86400).optional(),
|
|
20890
|
+
/** Availability-poll cadence; see AutoUpdateSettingsSchema. */
|
|
20891
|
+
updateCheckIntervalSeconds: number().min(900).max(604800).optional()
|
|
20776
20892
|
}), unknown(), {
|
|
20777
20893
|
kind: "mutation",
|
|
20778
20894
|
auth: "admin"
|
|
@@ -26453,7 +26569,9 @@ var ExportOptionsSchema = object({
|
|
|
26453
26569
|
includeAudio: boolean(),
|
|
26454
26570
|
maxLifeMs: number().int().positive(),
|
|
26455
26571
|
deleteAfterDownload: boolean(),
|
|
26456
|
-
title: string().max(200).optional()
|
|
26572
|
+
title: string().max(200).optional(),
|
|
26573
|
+
/** Notification-output target ids to ping when this export becomes ready. */
|
|
26574
|
+
notifyTargetIds: array(string().min(1)).max(20).optional()
|
|
26457
26575
|
}).superRefine((v, ctx) => {
|
|
26458
26576
|
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
26459
26577
|
code: ZodIssueCode$1.custom,
|
|
@@ -26512,10 +26630,18 @@ var ExportBytesSchema = object({
|
|
|
26512
26630
|
});
|
|
26513
26631
|
method(object({
|
|
26514
26632
|
deviceId: number(),
|
|
26515
|
-
|
|
26633
|
+
/** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
|
|
26634
|
+
profile: string().optional(),
|
|
26635
|
+
profiles: array(string()).min(1).optional(),
|
|
26516
26636
|
fromMs: number(),
|
|
26517
26637
|
toMs: number(),
|
|
26518
26638
|
options: ExportOptionsSchema
|
|
26639
|
+
}).superRefine((v, ctx) => {
|
|
26640
|
+
if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
|
|
26641
|
+
code: ZodIssueCode$1.custom,
|
|
26642
|
+
message: "pass profiles[] (min 1) or legacy profile",
|
|
26643
|
+
path: ["profiles"]
|
|
26644
|
+
});
|
|
26519
26645
|
}), ExportRecordSchema, {
|
|
26520
26646
|
kind: "mutation",
|
|
26521
26647
|
auth: "protected"
|
|
@@ -29457,15 +29583,6 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
29457
29583
|
labels: ["probe not implemented"]
|
|
29458
29584
|
};
|
|
29459
29585
|
}
|
|
29460
|
-
/**
|
|
29461
|
-
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
29462
|
-
*
|
|
29463
|
-
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
29464
|
-
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
29465
|
-
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
29466
|
-
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
29467
|
-
*/
|
|
29468
|
-
restoreConcurrency = 4;
|
|
29469
29586
|
async restoreDevices(savedDevices) {
|
|
29470
29587
|
await this.onRestoreDevices(savedDevices);
|
|
29471
29588
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -29520,14 +29637,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
29520
29637
|
});
|
|
29521
29638
|
}
|
|
29522
29639
|
};
|
|
29523
|
-
|
|
29524
|
-
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
29525
|
-
for (;;) {
|
|
29526
|
-
const saved = topLevel[nextTopLevel++];
|
|
29527
|
-
if (saved === void 0) return;
|
|
29528
|
-
await restoreOne(saved);
|
|
29529
|
-
}
|
|
29530
|
-
}));
|
|
29640
|
+
await Promise.all(topLevel.map((saved) => restoreOne(saved)));
|
|
29531
29641
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
29532
29642
|
for (const saved of childRows) {
|
|
29533
29643
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -32800,6 +32910,12 @@ Object.freeze({
|
|
|
32800
32910
|
addonId: null,
|
|
32801
32911
|
access: "create"
|
|
32802
32912
|
},
|
|
32913
|
+
"pipelineAnalytics.reconcileFromDisk": {
|
|
32914
|
+
capName: "pipeline-analytics",
|
|
32915
|
+
capScope: "device",
|
|
32916
|
+
addonId: null,
|
|
32917
|
+
access: "create"
|
|
32918
|
+
},
|
|
32803
32919
|
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
32804
32920
|
capName: "pipeline-analytics",
|
|
32805
32921
|
capScope: "device",
|
|
@@ -33202,6 +33318,12 @@ Object.freeze({
|
|
|
33202
33318
|
addonId: null,
|
|
33203
33319
|
access: "view"
|
|
33204
33320
|
},
|
|
33321
|
+
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
33322
|
+
capName: "pipeline-orchestrator",
|
|
33323
|
+
capScope: "system",
|
|
33324
|
+
addonId: null,
|
|
33325
|
+
access: "view"
|
|
33326
|
+
},
|
|
33205
33327
|
"pipelineOrchestrator.listAgentSettings": {
|
|
33206
33328
|
capName: "pipeline-orchestrator",
|
|
33207
33329
|
capScope: "system",
|
|
@@ -33226,6 +33348,12 @@ Object.freeze({
|
|
|
33226
33348
|
addonId: null,
|
|
33227
33349
|
access: "create"
|
|
33228
33350
|
},
|
|
33351
|
+
"pipelineOrchestrator.reconcileFromDisk": {
|
|
33352
|
+
capName: "pipeline-orchestrator",
|
|
33353
|
+
capScope: "system",
|
|
33354
|
+
addonId: null,
|
|
33355
|
+
access: "create"
|
|
33356
|
+
},
|
|
33229
33357
|
"pipelineOrchestrator.removeAgentSettings": {
|
|
33230
33358
|
capName: "pipeline-orchestrator",
|
|
33231
33359
|
capScope: "system",
|
|
@@ -36217,6 +36345,11 @@ Object.freeze({
|
|
|
36217
36345
|
form: "single",
|
|
36218
36346
|
optional: true
|
|
36219
36347
|
}],
|
|
36348
|
+
"pipelineAnalytics.reconcileFromDisk": [{
|
|
36349
|
+
name: "deviceId",
|
|
36350
|
+
form: "single",
|
|
36351
|
+
optional: false
|
|
36352
|
+
}],
|
|
36220
36353
|
"pipelineAnalytics.restageRetrainTrack": [{
|
|
36221
36354
|
name: "deviceId",
|
|
36222
36355
|
form: "single",
|
|
@@ -37282,6 +37415,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
|
37282
37415
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
37283
37416
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
37284
37417
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
37418
|
+
var MB = 1024 * 1024;
|
|
37419
|
+
1024 * MB, 3072 * MB;
|
|
37285
37420
|
//#endregion
|
|
37286
37421
|
//#region node_modules/@apocaliss92/nodewitt/node_modules/zod/v3/helpers/util.js
|
|
37287
37422
|
var util;
|
package/dist/addon.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServer } from "http";
|
|
2
2
|
import { EventEmitter } from "events";
|
|
3
3
|
import { createSocket } from "dgram";
|
|
4
|
-
//#region ../types/dist/event-category-
|
|
4
|
+
//#region ../types/dist/event-category-XfKNtfCc.mjs
|
|
5
5
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
6
6
|
EventCategory["SystemBoot"] = "system.boot";
|
|
7
7
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -18,9 +18,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
18
18
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
19
19
|
/**
|
|
20
20
|
* A newer addon or server-root package version was found by the
|
|
21
|
-
* authoritative registry check. Emitted once
|
|
22
|
-
* `(
|
|
23
|
-
*
|
|
21
|
+
* authoritative registry check. Emitted once when any observed
|
|
22
|
+
* `latestVersion` changes (or a package/node first appears behind);
|
|
23
|
+
* the payload carries the full currently-available list. Repeated
|
|
24
|
+
* polling of the same latests is silent.
|
|
24
25
|
*/
|
|
25
26
|
EventCategory["UpdateAvailable"] = "update.available";
|
|
26
27
|
/**
|
|
@@ -39,6 +40,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
39
40
|
EventCategory["AddonInstalled"] = "addon.installed";
|
|
40
41
|
EventCategory["AddonUninstalled"] = "addon.uninstalled";
|
|
41
42
|
EventCategory["AddonCrashed"] = "addon.crashed";
|
|
43
|
+
/**
|
|
44
|
+
* A RUNNER the D6 crash circuit-breaker gave up on — terminal.
|
|
45
|
+
*
|
|
46
|
+
* `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
|
|
47
|
+
* respawned"); this is the one that never resolves itself. Emitted exactly
|
|
48
|
+
* once per trip, by `process-service.ts`, carrying the node, the runner, the
|
|
49
|
+
* addons it hosted and the crash count that tripped the breaker.
|
|
50
|
+
*
|
|
51
|
+
* It exists because a runner marked terminally `failed` used to be SILENT:
|
|
52
|
+
* on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
|
|
53
|
+
* errors, the breaker stopped respawning it (correctly), `/health` kept
|
|
54
|
+
* returning 200, and fleet-wide recording was gone for 3h15 before the
|
|
55
|
+
* operator's phone told him. The Notification Center's system-event intake
|
|
56
|
+
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
57
|
+
*/
|
|
58
|
+
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
42
59
|
EventCategory["AddonError"] = "addon.error";
|
|
43
60
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
44
61
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -7550,6 +7567,10 @@ var RecordingBandSchema = object({
|
|
|
7550
7567
|
preBufferSec: number().min(0).optional(),
|
|
7551
7568
|
postBufferSec: number().min(0).optional()
|
|
7552
7569
|
});
|
|
7570
|
+
({
|
|
7571
|
+
preBufferSec: 10,
|
|
7572
|
+
postBufferSec: 30
|
|
7573
|
+
}).postBufferSec * 1e3;
|
|
7553
7574
|
/**
|
|
7554
7575
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7555
7576
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -7597,6 +7618,12 @@ var RecordingConfigSchema = object({
|
|
|
7597
7618
|
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
7598
7619
|
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
7599
7620
|
mode: RecordingStorageModeSchema.optional(),
|
|
7621
|
+
/**
|
|
7622
|
+
* Which assigned broker slots to record. Absent / empty = {@link
|
|
7623
|
+
* DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
|
|
7624
|
+
* camera's currently assigned slots — never `mid` unless the operator
|
|
7625
|
+
* picks it, and never a slot the broker has not assigned.
|
|
7626
|
+
*/
|
|
7600
7627
|
profiles: array(CamProfileSchema).optional(),
|
|
7601
7628
|
segmentSeconds: number().int().positive().optional(),
|
|
7602
7629
|
/**
|
|
@@ -7677,7 +7704,11 @@ var RelocateFootageInputSchema = object({
|
|
|
7677
7704
|
profiles: array(string()).optional(),
|
|
7678
7705
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7679
7706
|
* never allowed to starve live writers. */
|
|
7680
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
7707
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
7708
|
+
/** Move only segments whose startMs is >= this. Absent = the whole source
|
|
7709
|
+
* pile. Used when a full drain is too expensive and the operator only
|
|
7710
|
+
* wants the recent window on the new disk. */
|
|
7711
|
+
sinceMs: number().int().optional()
|
|
7681
7712
|
});
|
|
7682
7713
|
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7683
7714
|
* from persistent recording settings: a migration never changes
|
|
@@ -14542,6 +14573,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14542
14573
|
"node-offline",
|
|
14543
14574
|
"node-inference-unavailable",
|
|
14544
14575
|
"detection-blind",
|
|
14576
|
+
"addon-crash-loop",
|
|
14545
14577
|
"addon-update-available",
|
|
14546
14578
|
"server-update-available",
|
|
14547
14579
|
"alarm-triggered",
|
|
@@ -14549,6 +14581,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14549
14581
|
"alarm-disarmed",
|
|
14550
14582
|
"alarm-arming",
|
|
14551
14583
|
"alarm-arm-refused",
|
|
14584
|
+
"addon-updated",
|
|
14585
|
+
"server-updated",
|
|
14586
|
+
"export-completed",
|
|
14552
14587
|
"camera-online",
|
|
14553
14588
|
"camera-offline",
|
|
14554
14589
|
"camera-disabled",
|
|
@@ -16442,13 +16477,19 @@ var RetrainStatusSchema = _enum([
|
|
|
16442
16477
|
* "never marked" from "already trained" must read `retrainStatus`.
|
|
16443
16478
|
*
|
|
16444
16479
|
* `debug` does NOT pin; it is attention, not durability.
|
|
16480
|
+
*
|
|
16481
|
+
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
16482
|
+
* A favourited track is skipped by retention the same way `staging` is, but
|
|
16483
|
+
* it does not enter `none|staging|trained` and has no staging budget.
|
|
16445
16484
|
*/
|
|
16446
16485
|
var TrackFlagFields = {
|
|
16447
16486
|
/** Operator marked this track as training material — i.e. `retrainStatus` is
|
|
16448
16487
|
* `'staging'`. */
|
|
16449
16488
|
markForTrain: boolean().optional(),
|
|
16450
16489
|
/** Operator marked this track for diagnostic attention. */
|
|
16451
|
-
debug: boolean().optional()
|
|
16490
|
+
debug: boolean().optional(),
|
|
16491
|
+
/** Operator favourited this track. Pins it against pruning. */
|
|
16492
|
+
favourited: boolean().optional()
|
|
16452
16493
|
};
|
|
16453
16494
|
/**
|
|
16454
16495
|
* The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
|
|
@@ -16473,6 +16514,7 @@ var TrackFlagsSchema = object({
|
|
|
16473
16514
|
trackId: string(),
|
|
16474
16515
|
markForTrain: boolean(),
|
|
16475
16516
|
debug: boolean(),
|
|
16517
|
+
favourited: boolean(),
|
|
16476
16518
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
16477
16519
|
* a track row) because this shape is only ever produced by the write body,
|
|
16478
16520
|
* which always knows it — and a surface that has just written needs to render
|
|
@@ -17105,6 +17147,12 @@ var TrackCascadeCountsSchema = object({
|
|
|
17105
17147
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
17106
17148
|
embeddings: number().int()
|
|
17107
17149
|
});
|
|
17150
|
+
/** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
|
|
17151
|
+
var DiskReconcileCountsSchema = object({
|
|
17152
|
+
mediaDropped: number().int(),
|
|
17153
|
+
tracks: number().int(),
|
|
17154
|
+
events: number().int()
|
|
17155
|
+
});
|
|
17108
17156
|
/** Event-store footprint for one camera. */
|
|
17109
17157
|
var EventStoreDeviceFootprintSchema = object({
|
|
17110
17158
|
deviceId: number(),
|
|
@@ -17281,6 +17329,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17281
17329
|
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
17282
17330
|
kind: "mutation",
|
|
17283
17331
|
auth: "admin"
|
|
17332
|
+
}), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
|
|
17333
|
+
kind: "mutation",
|
|
17334
|
+
auth: "admin"
|
|
17284
17335
|
}), method(object({
|
|
17285
17336
|
deviceId: number(),
|
|
17286
17337
|
trackIds: array(string()).min(1)
|
|
@@ -18831,6 +18882,24 @@ var CameraStatusDegradationSchema = object({
|
|
|
18831
18882
|
*
|
|
18832
18883
|
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
18833
18884
|
*/
|
|
18885
|
+
var DiskReconcileJobSchema = object({
|
|
18886
|
+
state: _enum([
|
|
18887
|
+
"idle",
|
|
18888
|
+
"running",
|
|
18889
|
+
"done",
|
|
18890
|
+
"error"
|
|
18891
|
+
]),
|
|
18892
|
+
total: number().int().nonnegative(),
|
|
18893
|
+
completed: number().int().nonnegative(),
|
|
18894
|
+
currentDeviceId: number().int().nullable(),
|
|
18895
|
+
failed: array(number().int()).readonly(),
|
|
18896
|
+
mediaDropped: number().int().nonnegative(),
|
|
18897
|
+
tracks: number().int().nonnegative(),
|
|
18898
|
+
events: number().int().nonnegative(),
|
|
18899
|
+
startedAtMs: number().int().nullable(),
|
|
18900
|
+
finishedAtMs: number().int().nullable(),
|
|
18901
|
+
error: string().nullable()
|
|
18902
|
+
});
|
|
18834
18903
|
var CameraStatusSchema = object({
|
|
18835
18904
|
deviceId: number(),
|
|
18836
18905
|
assignment: CameraAssignmentStatusSchema,
|
|
@@ -19062,7 +19131,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
19062
19131
|
}), CameraSwitchGroupSchema, {
|
|
19063
19132
|
kind: "mutation",
|
|
19064
19133
|
auth: "admin"
|
|
19065
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(),
|
|
19134
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
|
|
19135
|
+
kind: "mutation",
|
|
19136
|
+
auth: "admin"
|
|
19137
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
19066
19138
|
name: string(),
|
|
19067
19139
|
description: string().optional(),
|
|
19068
19140
|
config: CameraPipelineConfigSchema
|
|
@@ -20135,20 +20207,6 @@ var VectorStatsResultSchema = object({
|
|
|
20135
20207
|
exact: boolean()
|
|
20136
20208
|
});
|
|
20137
20209
|
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);
|
|
20138
|
-
/**
|
|
20139
|
-
* `videoclips` — the unified, navigable-clip surface for a camera.
|
|
20140
|
-
*
|
|
20141
|
-
* A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
|
|
20142
|
-
* provider per device, substitutable. The DEFAULT provider (registered by
|
|
20143
|
-
* `addon-post-analysis`, `defaultActive: true`) composes the analytics event
|
|
20144
|
-
* log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
|
|
20145
|
-
* is a time-WINDOW over existing footage, never a separate file. A camera that
|
|
20146
|
-
* exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
|
|
20147
|
-
* wrapper provider for its device and serve its own clip catalog + URLs.
|
|
20148
|
-
*
|
|
20149
|
-
* A `Clip` is purely time-based (subtree-blind): playback resolves segments by
|
|
20150
|
-
* temporal overlap, so the API never decides `continuous` vs `events`.
|
|
20151
|
-
*/
|
|
20152
20210
|
var ClipSchema = object({
|
|
20153
20211
|
/** Opaque, provider-namespaced id. The default provider encodes the time
|
|
20154
20212
|
* window so `getClipPlayback` is self-contained (no event re-query). */
|
|
@@ -20165,8 +20223,57 @@ var ClipSchema = object({
|
|
|
20165
20223
|
startMs: number(),
|
|
20166
20224
|
endMs: number()
|
|
20167
20225
|
}),
|
|
20168
|
-
/**
|
|
20169
|
-
thumbnail
|
|
20226
|
+
/**
|
|
20227
|
+
* Lazy thumbnail URL, never inlined.
|
|
20228
|
+
*
|
|
20229
|
+
* Recording-derived clips (events-mode keep-window, and the prepared
|
|
20230
|
+
* continuous event+fragment visit) MUST use the snapshot of the **main
|
|
20231
|
+
* event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
|
|
20232
|
+
* of the event that owns `kind` (object > motion > audio). Do not extract
|
|
20233
|
+
* a keyframe from the recorded segments. Other providers (onboard, HKSV)
|
|
20234
|
+
* mint their own stills.
|
|
20235
|
+
*
|
|
20236
|
+
* **VOUCHED, never fabricated.** A provider emits this only for an event it
|
|
20237
|
+
* has CONFIRMED owns at least one media row (its own, or its owning track's).
|
|
20238
|
+
* Absent is meaningful — "this visit has no event still" — never "we did not
|
|
20239
|
+
* look". Stamping it from a URL template made 35% of one camera's clips point
|
|
20240
|
+
* at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
|
|
20241
|
+
* A read that FAILS drops the claim; it never invents it.
|
|
20242
|
+
*/
|
|
20243
|
+
thumbnail: string().optional(),
|
|
20244
|
+
/**
|
|
20245
|
+
* An instant INSIDE this visit's footage, hole-safe, where a recorded still
|
|
20246
|
+
* can be decoded. Present whenever the visit came from recorded availability;
|
|
20247
|
+
* absent on a per-event padded window (there is no footage to promise).
|
|
20248
|
+
*
|
|
20249
|
+
* This is not a thumbnail and not a second byte path: it is the argument to
|
|
20250
|
+
* the recorder's existing still route. The surface — never the provider —
|
|
20251
|
+
* decides whether to use it. It is the midpoint of the visit's LONGEST
|
|
20252
|
+
* contiguous range, not of the visit: a visit spans its holes by
|
|
20253
|
+
* construction, so a naive midpoint lands in dead air.
|
|
20254
|
+
*/
|
|
20255
|
+
stillAtMs: number().optional(),
|
|
20256
|
+
/**
|
|
20257
|
+
* Analytics event ids that overlap this visit — a BOUNDED sample, newest
|
|
20258
|
+
* first within kind (object → motion → audio), capped at
|
|
20259
|
+
* {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
|
|
20260
|
+
*
|
|
20261
|
+
* Bounded because it is not a payload the surface pages through: one visit on
|
|
20262
|
+
* device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
|
|
20263
|
+
* camera-day. Read {@link eventCount} for the true total.
|
|
20264
|
+
*/
|
|
20265
|
+
eventIds: array(string()).optional(),
|
|
20266
|
+
/** How many analytics events actually overlap this visit. Differs from
|
|
20267
|
+
* `eventIds.length` exactly when the sample was capped — so a truncated
|
|
20268
|
+
* list is never mistaken for a quiet visit. */
|
|
20269
|
+
eventCount: number().int().nonnegative().optional(),
|
|
20270
|
+
/** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
|
|
20271
|
+
* than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
|
|
20272
|
+
* bar keeps showing them via `recording.getAvailability`. */
|
|
20273
|
+
holes: array(object({
|
|
20274
|
+
startMs: number(),
|
|
20275
|
+
endMs: number()
|
|
20276
|
+
})).optional()
|
|
20170
20277
|
});
|
|
20171
20278
|
var ClipPlaybackSchema = object({
|
|
20172
20279
|
/** HLS master URL through the hub data-plane (Range + token in path). */
|
|
@@ -20630,7 +20737,14 @@ var SearchResultSchema = object({
|
|
|
20630
20737
|
});
|
|
20631
20738
|
var AutoUpdateSettingsSchema = object({
|
|
20632
20739
|
channel: ChannelSchema,
|
|
20633
|
-
intervalSeconds: number()
|
|
20740
|
+
intervalSeconds: number(),
|
|
20741
|
+
/**
|
|
20742
|
+
* Cadence of the "an update exists" POLLER, in seconds. Independent of
|
|
20743
|
+
* `channel`: the poller runs while auto-apply is `off`, because being told
|
|
20744
|
+
* about a publish and installing it are different decisions. Clamped
|
|
20745
|
+
* server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
|
|
20746
|
+
*/
|
|
20747
|
+
updateCheckIntervalSeconds: number()
|
|
20634
20748
|
});
|
|
20635
20749
|
var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
20636
20750
|
var RestartAddonResultSchema = unknown();
|
|
@@ -20771,7 +20885,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
20771
20885
|
auth: "admin"
|
|
20772
20886
|
}), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
|
|
20773
20887
|
channel: ChannelSchema,
|
|
20774
|
-
intervalSeconds: number().min(300).max(86400).optional()
|
|
20888
|
+
intervalSeconds: number().min(300).max(86400).optional(),
|
|
20889
|
+
/** Availability-poll cadence; see AutoUpdateSettingsSchema. */
|
|
20890
|
+
updateCheckIntervalSeconds: number().min(900).max(604800).optional()
|
|
20775
20891
|
}), unknown(), {
|
|
20776
20892
|
kind: "mutation",
|
|
20777
20893
|
auth: "admin"
|
|
@@ -26452,7 +26568,9 @@ var ExportOptionsSchema = object({
|
|
|
26452
26568
|
includeAudio: boolean(),
|
|
26453
26569
|
maxLifeMs: number().int().positive(),
|
|
26454
26570
|
deleteAfterDownload: boolean(),
|
|
26455
|
-
title: string().max(200).optional()
|
|
26571
|
+
title: string().max(200).optional(),
|
|
26572
|
+
/** Notification-output target ids to ping when this export becomes ready. */
|
|
26573
|
+
notifyTargetIds: array(string().min(1)).max(20).optional()
|
|
26456
26574
|
}).superRefine((v, ctx) => {
|
|
26457
26575
|
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
26458
26576
|
code: ZodIssueCode$1.custom,
|
|
@@ -26511,10 +26629,18 @@ var ExportBytesSchema = object({
|
|
|
26511
26629
|
});
|
|
26512
26630
|
method(object({
|
|
26513
26631
|
deviceId: number(),
|
|
26514
|
-
|
|
26632
|
+
/** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
|
|
26633
|
+
profile: string().optional(),
|
|
26634
|
+
profiles: array(string()).min(1).optional(),
|
|
26515
26635
|
fromMs: number(),
|
|
26516
26636
|
toMs: number(),
|
|
26517
26637
|
options: ExportOptionsSchema
|
|
26638
|
+
}).superRefine((v, ctx) => {
|
|
26639
|
+
if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
|
|
26640
|
+
code: ZodIssueCode$1.custom,
|
|
26641
|
+
message: "pass profiles[] (min 1) or legacy profile",
|
|
26642
|
+
path: ["profiles"]
|
|
26643
|
+
});
|
|
26518
26644
|
}), ExportRecordSchema, {
|
|
26519
26645
|
kind: "mutation",
|
|
26520
26646
|
auth: "protected"
|
|
@@ -29456,15 +29582,6 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
29456
29582
|
labels: ["probe not implemented"]
|
|
29457
29583
|
};
|
|
29458
29584
|
}
|
|
29459
|
-
/**
|
|
29460
|
-
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
29461
|
-
*
|
|
29462
|
-
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
29463
|
-
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
29464
|
-
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
29465
|
-
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
29466
|
-
*/
|
|
29467
|
-
restoreConcurrency = 4;
|
|
29468
29585
|
async restoreDevices(savedDevices) {
|
|
29469
29586
|
await this.onRestoreDevices(savedDevices);
|
|
29470
29587
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -29519,14 +29636,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
29519
29636
|
});
|
|
29520
29637
|
}
|
|
29521
29638
|
};
|
|
29522
|
-
|
|
29523
|
-
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
29524
|
-
for (;;) {
|
|
29525
|
-
const saved = topLevel[nextTopLevel++];
|
|
29526
|
-
if (saved === void 0) return;
|
|
29527
|
-
await restoreOne(saved);
|
|
29528
|
-
}
|
|
29529
|
-
}));
|
|
29639
|
+
await Promise.all(topLevel.map((saved) => restoreOne(saved)));
|
|
29530
29640
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
29531
29641
|
for (const saved of childRows) {
|
|
29532
29642
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -32799,6 +32909,12 @@ Object.freeze({
|
|
|
32799
32909
|
addonId: null,
|
|
32800
32910
|
access: "create"
|
|
32801
32911
|
},
|
|
32912
|
+
"pipelineAnalytics.reconcileFromDisk": {
|
|
32913
|
+
capName: "pipeline-analytics",
|
|
32914
|
+
capScope: "device",
|
|
32915
|
+
addonId: null,
|
|
32916
|
+
access: "create"
|
|
32917
|
+
},
|
|
32802
32918
|
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
32803
32919
|
capName: "pipeline-analytics",
|
|
32804
32920
|
capScope: "device",
|
|
@@ -33201,6 +33317,12 @@ Object.freeze({
|
|
|
33201
33317
|
addonId: null,
|
|
33202
33318
|
access: "view"
|
|
33203
33319
|
},
|
|
33320
|
+
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
33321
|
+
capName: "pipeline-orchestrator",
|
|
33322
|
+
capScope: "system",
|
|
33323
|
+
addonId: null,
|
|
33324
|
+
access: "view"
|
|
33325
|
+
},
|
|
33204
33326
|
"pipelineOrchestrator.listAgentSettings": {
|
|
33205
33327
|
capName: "pipeline-orchestrator",
|
|
33206
33328
|
capScope: "system",
|
|
@@ -33225,6 +33347,12 @@ Object.freeze({
|
|
|
33225
33347
|
addonId: null,
|
|
33226
33348
|
access: "create"
|
|
33227
33349
|
},
|
|
33350
|
+
"pipelineOrchestrator.reconcileFromDisk": {
|
|
33351
|
+
capName: "pipeline-orchestrator",
|
|
33352
|
+
capScope: "system",
|
|
33353
|
+
addonId: null,
|
|
33354
|
+
access: "create"
|
|
33355
|
+
},
|
|
33228
33356
|
"pipelineOrchestrator.removeAgentSettings": {
|
|
33229
33357
|
capName: "pipeline-orchestrator",
|
|
33230
33358
|
capScope: "system",
|
|
@@ -36216,6 +36344,11 @@ Object.freeze({
|
|
|
36216
36344
|
form: "single",
|
|
36217
36345
|
optional: true
|
|
36218
36346
|
}],
|
|
36347
|
+
"pipelineAnalytics.reconcileFromDisk": [{
|
|
36348
|
+
name: "deviceId",
|
|
36349
|
+
form: "single",
|
|
36350
|
+
optional: false
|
|
36351
|
+
}],
|
|
36219
36352
|
"pipelineAnalytics.restageRetrainTrack": [{
|
|
36220
36353
|
name: "deviceId",
|
|
36221
36354
|
form: "single",
|
|
@@ -37281,6 +37414,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
|
37281
37414
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
37282
37415
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
37283
37416
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
37417
|
+
var MB = 1024 * 1024;
|
|
37418
|
+
1024 * MB, 3072 * MB;
|
|
37284
37419
|
//#endregion
|
|
37285
37420
|
//#region node_modules/@apocaliss92/nodewitt/node_modules/zod/v3/helpers/util.js
|
|
37286
37421
|
var util;
|
package/package.json
CHANGED