@camstack/addon-provider-petkit 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
|
@@ -1101,7 +1101,7 @@ var Nodepetkit = class {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
//#endregion
|
|
1104
|
-
//#region ../types/dist/event-category-
|
|
1104
|
+
//#region ../types/dist/event-category-XfKNtfCc.mjs
|
|
1105
1105
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
1106
1106
|
EventCategory["SystemBoot"] = "system.boot";
|
|
1107
1107
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1118,9 +1118,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1118
1118
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
1119
1119
|
/**
|
|
1120
1120
|
* A newer addon or server-root package version was found by the
|
|
1121
|
-
* authoritative registry check. Emitted once
|
|
1122
|
-
* `(
|
|
1123
|
-
*
|
|
1121
|
+
* authoritative registry check. Emitted once when any observed
|
|
1122
|
+
* `latestVersion` changes (or a package/node first appears behind);
|
|
1123
|
+
* the payload carries the full currently-available list. Repeated
|
|
1124
|
+
* polling of the same latests is silent.
|
|
1124
1125
|
*/
|
|
1125
1126
|
EventCategory["UpdateAvailable"] = "update.available";
|
|
1126
1127
|
/**
|
|
@@ -1139,6 +1140,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1139
1140
|
EventCategory["AddonInstalled"] = "addon.installed";
|
|
1140
1141
|
EventCategory["AddonUninstalled"] = "addon.uninstalled";
|
|
1141
1142
|
EventCategory["AddonCrashed"] = "addon.crashed";
|
|
1143
|
+
/**
|
|
1144
|
+
* A RUNNER the D6 crash circuit-breaker gave up on — terminal.
|
|
1145
|
+
*
|
|
1146
|
+
* `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
|
|
1147
|
+
* respawned"); this is the one that never resolves itself. Emitted exactly
|
|
1148
|
+
* once per trip, by `process-service.ts`, carrying the node, the runner, the
|
|
1149
|
+
* addons it hosted and the crash count that tripped the breaker.
|
|
1150
|
+
*
|
|
1151
|
+
* It exists because a runner marked terminally `failed` used to be SILENT:
|
|
1152
|
+
* on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
|
|
1153
|
+
* errors, the breaker stopped respawning it (correctly), `/health` kept
|
|
1154
|
+
* returning 200, and fleet-wide recording was gone for 3h15 before the
|
|
1155
|
+
* operator's phone told him. The Notification Center's system-event intake
|
|
1156
|
+
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
1157
|
+
*/
|
|
1158
|
+
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
1142
1159
|
EventCategory["AddonError"] = "addon.error";
|
|
1143
1160
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
1144
1161
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -8650,6 +8667,10 @@ var RecordingBandSchema = object({
|
|
|
8650
8667
|
preBufferSec: number().min(0).optional(),
|
|
8651
8668
|
postBufferSec: number().min(0).optional()
|
|
8652
8669
|
});
|
|
8670
|
+
({
|
|
8671
|
+
preBufferSec: 10,
|
|
8672
|
+
postBufferSec: 30
|
|
8673
|
+
}).postBufferSec * 1e3;
|
|
8653
8674
|
/**
|
|
8654
8675
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8655
8676
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8697,6 +8718,12 @@ var RecordingConfigSchema = object({
|
|
|
8697
8718
|
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
8698
8719
|
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
8699
8720
|
mode: RecordingStorageModeSchema.optional(),
|
|
8721
|
+
/**
|
|
8722
|
+
* Which assigned broker slots to record. Absent / empty = {@link
|
|
8723
|
+
* DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
|
|
8724
|
+
* camera's currently assigned slots — never `mid` unless the operator
|
|
8725
|
+
* picks it, and never a slot the broker has not assigned.
|
|
8726
|
+
*/
|
|
8700
8727
|
profiles: array(CamProfileSchema).optional(),
|
|
8701
8728
|
segmentSeconds: number().int().positive().optional(),
|
|
8702
8729
|
/**
|
|
@@ -8777,7 +8804,11 @@ var RelocateFootageInputSchema = object({
|
|
|
8777
8804
|
profiles: array(string()).optional(),
|
|
8778
8805
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
8779
8806
|
* never allowed to starve live writers. */
|
|
8780
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
8807
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
8808
|
+
/** Move only segments whose startMs is >= this. Absent = the whole source
|
|
8809
|
+
* pile. Used when a full drain is too expensive and the operator only
|
|
8810
|
+
* wants the recent window on the new disk. */
|
|
8811
|
+
sinceMs: number().int().optional()
|
|
8781
8812
|
});
|
|
8782
8813
|
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
8783
8814
|
* from persistent recording settings: a migration never changes
|
|
@@ -15659,6 +15690,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
15659
15690
|
"node-offline",
|
|
15660
15691
|
"node-inference-unavailable",
|
|
15661
15692
|
"detection-blind",
|
|
15693
|
+
"addon-crash-loop",
|
|
15662
15694
|
"addon-update-available",
|
|
15663
15695
|
"server-update-available",
|
|
15664
15696
|
"alarm-triggered",
|
|
@@ -15666,6 +15698,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
15666
15698
|
"alarm-disarmed",
|
|
15667
15699
|
"alarm-arming",
|
|
15668
15700
|
"alarm-arm-refused",
|
|
15701
|
+
"addon-updated",
|
|
15702
|
+
"server-updated",
|
|
15703
|
+
"export-completed",
|
|
15669
15704
|
"camera-online",
|
|
15670
15705
|
"camera-offline",
|
|
15671
15706
|
"camera-disabled",
|
|
@@ -17559,13 +17594,19 @@ var RetrainStatusSchema = _enum([
|
|
|
17559
17594
|
* "never marked" from "already trained" must read `retrainStatus`.
|
|
17560
17595
|
*
|
|
17561
17596
|
* `debug` does NOT pin; it is attention, not durability.
|
|
17597
|
+
*
|
|
17598
|
+
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
17599
|
+
* A favourited track is skipped by retention the same way `staging` is, but
|
|
17600
|
+
* it does not enter `none|staging|trained` and has no staging budget.
|
|
17562
17601
|
*/
|
|
17563
17602
|
var TrackFlagFields = {
|
|
17564
17603
|
/** Operator marked this track as training material — i.e. `retrainStatus` is
|
|
17565
17604
|
* `'staging'`. */
|
|
17566
17605
|
markForTrain: boolean().optional(),
|
|
17567
17606
|
/** Operator marked this track for diagnostic attention. */
|
|
17568
|
-
debug: boolean().optional()
|
|
17607
|
+
debug: boolean().optional(),
|
|
17608
|
+
/** Operator favourited this track. Pins it against pruning. */
|
|
17609
|
+
favourited: boolean().optional()
|
|
17569
17610
|
};
|
|
17570
17611
|
/**
|
|
17571
17612
|
* The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
|
|
@@ -17590,6 +17631,7 @@ var TrackFlagsSchema = object({
|
|
|
17590
17631
|
trackId: string(),
|
|
17591
17632
|
markForTrain: boolean(),
|
|
17592
17633
|
debug: boolean(),
|
|
17634
|
+
favourited: boolean(),
|
|
17593
17635
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
17594
17636
|
* a track row) because this shape is only ever produced by the write body,
|
|
17595
17637
|
* which always knows it — and a surface that has just written needs to render
|
|
@@ -18222,6 +18264,12 @@ var TrackCascadeCountsSchema = object({
|
|
|
18222
18264
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
18223
18265
|
embeddings: number().int()
|
|
18224
18266
|
});
|
|
18267
|
+
/** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
|
|
18268
|
+
var DiskReconcileCountsSchema = object({
|
|
18269
|
+
mediaDropped: number().int(),
|
|
18270
|
+
tracks: number().int(),
|
|
18271
|
+
events: number().int()
|
|
18272
|
+
});
|
|
18225
18273
|
/** Event-store footprint for one camera. */
|
|
18226
18274
|
var EventStoreDeviceFootprintSchema = object({
|
|
18227
18275
|
deviceId: number(),
|
|
@@ -18398,6 +18446,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18398
18446
|
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
18399
18447
|
kind: "mutation",
|
|
18400
18448
|
auth: "admin"
|
|
18449
|
+
}), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
|
|
18450
|
+
kind: "mutation",
|
|
18451
|
+
auth: "admin"
|
|
18401
18452
|
}), method(object({
|
|
18402
18453
|
deviceId: number(),
|
|
18403
18454
|
trackIds: array(string()).min(1)
|
|
@@ -19948,6 +19999,24 @@ var CameraStatusDegradationSchema = object({
|
|
|
19948
19999
|
*
|
|
19949
20000
|
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
19950
20001
|
*/
|
|
20002
|
+
var DiskReconcileJobSchema = object({
|
|
20003
|
+
state: _enum([
|
|
20004
|
+
"idle",
|
|
20005
|
+
"running",
|
|
20006
|
+
"done",
|
|
20007
|
+
"error"
|
|
20008
|
+
]),
|
|
20009
|
+
total: number().int().nonnegative(),
|
|
20010
|
+
completed: number().int().nonnegative(),
|
|
20011
|
+
currentDeviceId: number().int().nullable(),
|
|
20012
|
+
failed: array(number().int()).readonly(),
|
|
20013
|
+
mediaDropped: number().int().nonnegative(),
|
|
20014
|
+
tracks: number().int().nonnegative(),
|
|
20015
|
+
events: number().int().nonnegative(),
|
|
20016
|
+
startedAtMs: number().int().nullable(),
|
|
20017
|
+
finishedAtMs: number().int().nullable(),
|
|
20018
|
+
error: string().nullable()
|
|
20019
|
+
});
|
|
19951
20020
|
var CameraStatusSchema = object({
|
|
19952
20021
|
deviceId: number(),
|
|
19953
20022
|
assignment: CameraAssignmentStatusSchema,
|
|
@@ -20179,7 +20248,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
20179
20248
|
}), CameraSwitchGroupSchema, {
|
|
20180
20249
|
kind: "mutation",
|
|
20181
20250
|
auth: "admin"
|
|
20182
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(),
|
|
20251
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
|
|
20252
|
+
kind: "mutation",
|
|
20253
|
+
auth: "admin"
|
|
20254
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
20183
20255
|
name: string(),
|
|
20184
20256
|
description: string().optional(),
|
|
20185
20257
|
config: CameraPipelineConfigSchema
|
|
@@ -20584,7 +20656,14 @@ targets: array(object({
|
|
|
20584
20656
|
"sleeping",
|
|
20585
20657
|
"unreachable",
|
|
20586
20658
|
"waking"
|
|
20587
|
-
]).nullable()
|
|
20659
|
+
]).nullable(),
|
|
20660
|
+
/** A battery camera (whatever its current state). An AWAKE battery
|
|
20661
|
+
* camera is deliberately NOT recaptured on the poll cadence — every
|
|
20662
|
+
* capture is a camera hit that would keep it out of sleep — so its
|
|
20663
|
+
* cached frame legitimately ages past the currency ceiling while
|
|
20664
|
+
* nothing is streaming. A surface must keep painting it (a fresh
|
|
20665
|
+
* frame is captured at each wake), not blank to "unavailable". */
|
|
20666
|
+
battery: boolean()
|
|
20588
20667
|
})));
|
|
20589
20668
|
/**
|
|
20590
20669
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
@@ -21245,20 +21324,6 @@ var VectorStatsResultSchema = object({
|
|
|
21245
21324
|
exact: boolean()
|
|
21246
21325
|
});
|
|
21247
21326
|
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);
|
|
21248
|
-
/**
|
|
21249
|
-
* `videoclips` — the unified, navigable-clip surface for a camera.
|
|
21250
|
-
*
|
|
21251
|
-
* A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
|
|
21252
|
-
* provider per device, substitutable. The DEFAULT provider (registered by
|
|
21253
|
-
* `addon-post-analysis`, `defaultActive: true`) composes the analytics event
|
|
21254
|
-
* log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
|
|
21255
|
-
* is a time-WINDOW over existing footage, never a separate file. A camera that
|
|
21256
|
-
* exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
|
|
21257
|
-
* wrapper provider for its device and serve its own clip catalog + URLs.
|
|
21258
|
-
*
|
|
21259
|
-
* A `Clip` is purely time-based (subtree-blind): playback resolves segments by
|
|
21260
|
-
* temporal overlap, so the API never decides `continuous` vs `events`.
|
|
21261
|
-
*/
|
|
21262
21327
|
var ClipSchema = object({
|
|
21263
21328
|
/** Opaque, provider-namespaced id. The default provider encodes the time
|
|
21264
21329
|
* window so `getClipPlayback` is self-contained (no event re-query). */
|
|
@@ -21275,8 +21340,57 @@ var ClipSchema = object({
|
|
|
21275
21340
|
startMs: number(),
|
|
21276
21341
|
endMs: number()
|
|
21277
21342
|
}),
|
|
21278
|
-
/**
|
|
21279
|
-
thumbnail
|
|
21343
|
+
/**
|
|
21344
|
+
* Lazy thumbnail URL, never inlined.
|
|
21345
|
+
*
|
|
21346
|
+
* Recording-derived clips (events-mode keep-window, and the prepared
|
|
21347
|
+
* continuous event+fragment visit) MUST use the snapshot of the **main
|
|
21348
|
+
* event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
|
|
21349
|
+
* of the event that owns `kind` (object > motion > audio). Do not extract
|
|
21350
|
+
* a keyframe from the recorded segments. Other providers (onboard, HKSV)
|
|
21351
|
+
* mint their own stills.
|
|
21352
|
+
*
|
|
21353
|
+
* **VOUCHED, never fabricated.** A provider emits this only for an event it
|
|
21354
|
+
* has CONFIRMED owns at least one media row (its own, or its owning track's).
|
|
21355
|
+
* Absent is meaningful — "this visit has no event still" — never "we did not
|
|
21356
|
+
* look". Stamping it from a URL template made 35% of one camera's clips point
|
|
21357
|
+
* at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
|
|
21358
|
+
* A read that FAILS drops the claim; it never invents it.
|
|
21359
|
+
*/
|
|
21360
|
+
thumbnail: string().optional(),
|
|
21361
|
+
/**
|
|
21362
|
+
* An instant INSIDE this visit's footage, hole-safe, where a recorded still
|
|
21363
|
+
* can be decoded. Present whenever the visit came from recorded availability;
|
|
21364
|
+
* absent on a per-event padded window (there is no footage to promise).
|
|
21365
|
+
*
|
|
21366
|
+
* This is not a thumbnail and not a second byte path: it is the argument to
|
|
21367
|
+
* the recorder's existing still route. The surface — never the provider —
|
|
21368
|
+
* decides whether to use it. It is the midpoint of the visit's LONGEST
|
|
21369
|
+
* contiguous range, not of the visit: a visit spans its holes by
|
|
21370
|
+
* construction, so a naive midpoint lands in dead air.
|
|
21371
|
+
*/
|
|
21372
|
+
stillAtMs: number().optional(),
|
|
21373
|
+
/**
|
|
21374
|
+
* Analytics event ids that overlap this visit — a BOUNDED sample, newest
|
|
21375
|
+
* first within kind (object → motion → audio), capped at
|
|
21376
|
+
* {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
|
|
21377
|
+
*
|
|
21378
|
+
* Bounded because it is not a payload the surface pages through: one visit on
|
|
21379
|
+
* device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
|
|
21380
|
+
* camera-day. Read {@link eventCount} for the true total.
|
|
21381
|
+
*/
|
|
21382
|
+
eventIds: array(string()).optional(),
|
|
21383
|
+
/** How many analytics events actually overlap this visit. Differs from
|
|
21384
|
+
* `eventIds.length` exactly when the sample was capped — so a truncated
|
|
21385
|
+
* list is never mistaken for a quiet visit. */
|
|
21386
|
+
eventCount: number().int().nonnegative().optional(),
|
|
21387
|
+
/** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
|
|
21388
|
+
* than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
|
|
21389
|
+
* bar keeps showing them via `recording.getAvailability`. */
|
|
21390
|
+
holes: array(object({
|
|
21391
|
+
startMs: number(),
|
|
21392
|
+
endMs: number()
|
|
21393
|
+
})).optional()
|
|
21280
21394
|
});
|
|
21281
21395
|
var ClipPlaybackSchema = object({
|
|
21282
21396
|
/** HLS master URL through the hub data-plane (Range + token in path). */
|
|
@@ -21740,7 +21854,14 @@ var SearchResultSchema = object({
|
|
|
21740
21854
|
});
|
|
21741
21855
|
var AutoUpdateSettingsSchema = object({
|
|
21742
21856
|
channel: ChannelSchema,
|
|
21743
|
-
intervalSeconds: number()
|
|
21857
|
+
intervalSeconds: number(),
|
|
21858
|
+
/**
|
|
21859
|
+
* Cadence of the "an update exists" POLLER, in seconds. Independent of
|
|
21860
|
+
* `channel`: the poller runs while auto-apply is `off`, because being told
|
|
21861
|
+
* about a publish and installing it are different decisions. Clamped
|
|
21862
|
+
* server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
|
|
21863
|
+
*/
|
|
21864
|
+
updateCheckIntervalSeconds: number()
|
|
21744
21865
|
});
|
|
21745
21866
|
var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
21746
21867
|
var RestartAddonResultSchema = unknown();
|
|
@@ -21881,7 +22002,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21881
22002
|
auth: "admin"
|
|
21882
22003
|
}), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
|
|
21883
22004
|
channel: ChannelSchema,
|
|
21884
|
-
intervalSeconds: number().min(300).max(86400).optional()
|
|
22005
|
+
intervalSeconds: number().min(300).max(86400).optional(),
|
|
22006
|
+
/** Availability-poll cadence; see AutoUpdateSettingsSchema. */
|
|
22007
|
+
updateCheckIntervalSeconds: number().min(900).max(604800).optional()
|
|
21885
22008
|
}), unknown(), {
|
|
21886
22009
|
kind: "mutation",
|
|
21887
22010
|
auth: "admin"
|
|
@@ -27570,7 +27693,9 @@ var ExportOptionsSchema = object({
|
|
|
27570
27693
|
includeAudio: boolean(),
|
|
27571
27694
|
maxLifeMs: number().int().positive(),
|
|
27572
27695
|
deleteAfterDownload: boolean(),
|
|
27573
|
-
title: string().max(200).optional()
|
|
27696
|
+
title: string().max(200).optional(),
|
|
27697
|
+
/** Notification-output target ids to ping when this export becomes ready. */
|
|
27698
|
+
notifyTargetIds: array(string().min(1)).max(20).optional()
|
|
27574
27699
|
}).superRefine((v, ctx) => {
|
|
27575
27700
|
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
27576
27701
|
code: ZodIssueCode.custom,
|
|
@@ -27629,10 +27754,18 @@ var ExportBytesSchema = object({
|
|
|
27629
27754
|
});
|
|
27630
27755
|
method(object({
|
|
27631
27756
|
deviceId: number(),
|
|
27632
|
-
|
|
27757
|
+
/** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
|
|
27758
|
+
profile: string().optional(),
|
|
27759
|
+
profiles: array(string()).min(1).optional(),
|
|
27633
27760
|
fromMs: number(),
|
|
27634
27761
|
toMs: number(),
|
|
27635
27762
|
options: ExportOptionsSchema
|
|
27763
|
+
}).superRefine((v, ctx) => {
|
|
27764
|
+
if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
|
|
27765
|
+
code: ZodIssueCode.custom,
|
|
27766
|
+
message: "pass profiles[] (min 1) or legacy profile",
|
|
27767
|
+
path: ["profiles"]
|
|
27768
|
+
});
|
|
27636
27769
|
}), ExportRecordSchema, {
|
|
27637
27770
|
kind: "mutation",
|
|
27638
27771
|
auth: "protected"
|
|
@@ -30574,15 +30707,6 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
30574
30707
|
labels: ["probe not implemented"]
|
|
30575
30708
|
};
|
|
30576
30709
|
}
|
|
30577
|
-
/**
|
|
30578
|
-
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
30579
|
-
*
|
|
30580
|
-
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
30581
|
-
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
30582
|
-
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
30583
|
-
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
30584
|
-
*/
|
|
30585
|
-
restoreConcurrency = 4;
|
|
30586
30710
|
async restoreDevices(savedDevices) {
|
|
30587
30711
|
await this.onRestoreDevices(savedDevices);
|
|
30588
30712
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -30637,14 +30761,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
30637
30761
|
});
|
|
30638
30762
|
}
|
|
30639
30763
|
};
|
|
30640
|
-
|
|
30641
|
-
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
30642
|
-
for (;;) {
|
|
30643
|
-
const saved = topLevel[nextTopLevel++];
|
|
30644
|
-
if (saved === void 0) return;
|
|
30645
|
-
await restoreOne(saved);
|
|
30646
|
-
}
|
|
30647
|
-
}));
|
|
30764
|
+
await Promise.all(topLevel.map((saved) => restoreOne(saved)));
|
|
30648
30765
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
30649
30766
|
for (const saved of childRows) {
|
|
30650
30767
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -33917,6 +34034,12 @@ Object.freeze({
|
|
|
33917
34034
|
addonId: null,
|
|
33918
34035
|
access: "create"
|
|
33919
34036
|
},
|
|
34037
|
+
"pipelineAnalytics.reconcileFromDisk": {
|
|
34038
|
+
capName: "pipeline-analytics",
|
|
34039
|
+
capScope: "device",
|
|
34040
|
+
addonId: null,
|
|
34041
|
+
access: "create"
|
|
34042
|
+
},
|
|
33920
34043
|
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
33921
34044
|
capName: "pipeline-analytics",
|
|
33922
34045
|
capScope: "device",
|
|
@@ -34319,6 +34442,12 @@ Object.freeze({
|
|
|
34319
34442
|
addonId: null,
|
|
34320
34443
|
access: "view"
|
|
34321
34444
|
},
|
|
34445
|
+
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
34446
|
+
capName: "pipeline-orchestrator",
|
|
34447
|
+
capScope: "system",
|
|
34448
|
+
addonId: null,
|
|
34449
|
+
access: "view"
|
|
34450
|
+
},
|
|
34322
34451
|
"pipelineOrchestrator.listAgentSettings": {
|
|
34323
34452
|
capName: "pipeline-orchestrator",
|
|
34324
34453
|
capScope: "system",
|
|
@@ -34343,6 +34472,12 @@ Object.freeze({
|
|
|
34343
34472
|
addonId: null,
|
|
34344
34473
|
access: "create"
|
|
34345
34474
|
},
|
|
34475
|
+
"pipelineOrchestrator.reconcileFromDisk": {
|
|
34476
|
+
capName: "pipeline-orchestrator",
|
|
34477
|
+
capScope: "system",
|
|
34478
|
+
addonId: null,
|
|
34479
|
+
access: "create"
|
|
34480
|
+
},
|
|
34346
34481
|
"pipelineOrchestrator.removeAgentSettings": {
|
|
34347
34482
|
capName: "pipeline-orchestrator",
|
|
34348
34483
|
capScope: "system",
|
|
@@ -37334,6 +37469,11 @@ Object.freeze({
|
|
|
37334
37469
|
form: "single",
|
|
37335
37470
|
optional: true
|
|
37336
37471
|
}],
|
|
37472
|
+
"pipelineAnalytics.reconcileFromDisk": [{
|
|
37473
|
+
name: "deviceId",
|
|
37474
|
+
form: "single",
|
|
37475
|
+
optional: false
|
|
37476
|
+
}],
|
|
37337
37477
|
"pipelineAnalytics.restageRetrainTrack": [{
|
|
37338
37478
|
name: "deviceId",
|
|
37339
37479
|
form: "single",
|
|
@@ -38399,6 +38539,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
|
38399
38539
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
38400
38540
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
38401
38541
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
38542
|
+
var MB = 1024 * 1024;
|
|
38543
|
+
1024 * MB, 3072 * MB;
|
|
38402
38544
|
//#endregion
|
|
38403
38545
|
//#region src/config.ts
|
|
38404
38546
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1100,7 +1100,7 @@ var Nodepetkit = class {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
};
|
|
1102
1102
|
//#endregion
|
|
1103
|
-
//#region ../types/dist/event-category-
|
|
1103
|
+
//#region ../types/dist/event-category-XfKNtfCc.mjs
|
|
1104
1104
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
1105
1105
|
EventCategory["SystemBoot"] = "system.boot";
|
|
1106
1106
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1117,9 +1117,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1117
1117
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
1118
1118
|
/**
|
|
1119
1119
|
* A newer addon or server-root package version was found by the
|
|
1120
|
-
* authoritative registry check. Emitted once
|
|
1121
|
-
* `(
|
|
1122
|
-
*
|
|
1120
|
+
* authoritative registry check. Emitted once when any observed
|
|
1121
|
+
* `latestVersion` changes (or a package/node first appears behind);
|
|
1122
|
+
* the payload carries the full currently-available list. Repeated
|
|
1123
|
+
* polling of the same latests is silent.
|
|
1123
1124
|
*/
|
|
1124
1125
|
EventCategory["UpdateAvailable"] = "update.available";
|
|
1125
1126
|
/**
|
|
@@ -1138,6 +1139,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1138
1139
|
EventCategory["AddonInstalled"] = "addon.installed";
|
|
1139
1140
|
EventCategory["AddonUninstalled"] = "addon.uninstalled";
|
|
1140
1141
|
EventCategory["AddonCrashed"] = "addon.crashed";
|
|
1142
|
+
/**
|
|
1143
|
+
* A RUNNER the D6 crash circuit-breaker gave up on — terminal.
|
|
1144
|
+
*
|
|
1145
|
+
* `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
|
|
1146
|
+
* respawned"); this is the one that never resolves itself. Emitted exactly
|
|
1147
|
+
* once per trip, by `process-service.ts`, carrying the node, the runner, the
|
|
1148
|
+
* addons it hosted and the crash count that tripped the breaker.
|
|
1149
|
+
*
|
|
1150
|
+
* It exists because a runner marked terminally `failed` used to be SILENT:
|
|
1151
|
+
* on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
|
|
1152
|
+
* errors, the breaker stopped respawning it (correctly), `/health` kept
|
|
1153
|
+
* returning 200, and fleet-wide recording was gone for 3h15 before the
|
|
1154
|
+
* operator's phone told him. The Notification Center's system-event intake
|
|
1155
|
+
* consumes this category and maps it to the `addon-crash-loop` kind.
|
|
1156
|
+
*/
|
|
1157
|
+
EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
|
|
1141
1158
|
EventCategory["AddonError"] = "addon.error";
|
|
1142
1159
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
1143
1160
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -8649,6 +8666,10 @@ var RecordingBandSchema = object({
|
|
|
8649
8666
|
preBufferSec: number().min(0).optional(),
|
|
8650
8667
|
postBufferSec: number().min(0).optional()
|
|
8651
8668
|
});
|
|
8669
|
+
({
|
|
8670
|
+
preBufferSec: 10,
|
|
8671
|
+
postBufferSec: 30
|
|
8672
|
+
}).postBufferSec * 1e3;
|
|
8652
8673
|
/**
|
|
8653
8674
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8654
8675
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8696,6 +8717,12 @@ var RecordingConfigSchema = object({
|
|
|
8696
8717
|
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
8697
8718
|
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
8698
8719
|
mode: RecordingStorageModeSchema.optional(),
|
|
8720
|
+
/**
|
|
8721
|
+
* Which assigned broker slots to record. Absent / empty = {@link
|
|
8722
|
+
* DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
|
|
8723
|
+
* camera's currently assigned slots — never `mid` unless the operator
|
|
8724
|
+
* picks it, and never a slot the broker has not assigned.
|
|
8725
|
+
*/
|
|
8699
8726
|
profiles: array(CamProfileSchema).optional(),
|
|
8700
8727
|
segmentSeconds: number().int().positive().optional(),
|
|
8701
8728
|
/**
|
|
@@ -8776,7 +8803,11 @@ var RelocateFootageInputSchema = object({
|
|
|
8776
8803
|
profiles: array(string()).optional(),
|
|
8777
8804
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
8778
8805
|
* never allowed to starve live writers. */
|
|
8779
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
8806
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
8807
|
+
/** Move only segments whose startMs is >= this. Absent = the whole source
|
|
8808
|
+
* pile. Used when a full drain is too expensive and the operator only
|
|
8809
|
+
* wants the recent window on the new disk. */
|
|
8810
|
+
sinceMs: number().int().optional()
|
|
8780
8811
|
});
|
|
8781
8812
|
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
8782
8813
|
* from persistent recording settings: a migration never changes
|
|
@@ -15658,6 +15689,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
15658
15689
|
"node-offline",
|
|
15659
15690
|
"node-inference-unavailable",
|
|
15660
15691
|
"detection-blind",
|
|
15692
|
+
"addon-crash-loop",
|
|
15661
15693
|
"addon-update-available",
|
|
15662
15694
|
"server-update-available",
|
|
15663
15695
|
"alarm-triggered",
|
|
@@ -15665,6 +15697,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
15665
15697
|
"alarm-disarmed",
|
|
15666
15698
|
"alarm-arming",
|
|
15667
15699
|
"alarm-arm-refused",
|
|
15700
|
+
"addon-updated",
|
|
15701
|
+
"server-updated",
|
|
15702
|
+
"export-completed",
|
|
15668
15703
|
"camera-online",
|
|
15669
15704
|
"camera-offline",
|
|
15670
15705
|
"camera-disabled",
|
|
@@ -17558,13 +17593,19 @@ var RetrainStatusSchema = _enum([
|
|
|
17558
17593
|
* "never marked" from "already trained" must read `retrainStatus`.
|
|
17559
17594
|
*
|
|
17560
17595
|
* `debug` does NOT pin; it is attention, not durability.
|
|
17596
|
+
*
|
|
17597
|
+
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
17598
|
+
* A favourited track is skipped by retention the same way `staging` is, but
|
|
17599
|
+
* it does not enter `none|staging|trained` and has no staging budget.
|
|
17561
17600
|
*/
|
|
17562
17601
|
var TrackFlagFields = {
|
|
17563
17602
|
/** Operator marked this track as training material — i.e. `retrainStatus` is
|
|
17564
17603
|
* `'staging'`. */
|
|
17565
17604
|
markForTrain: boolean().optional(),
|
|
17566
17605
|
/** Operator marked this track for diagnostic attention. */
|
|
17567
|
-
debug: boolean().optional()
|
|
17606
|
+
debug: boolean().optional(),
|
|
17607
|
+
/** Operator favourited this track. Pins it against pruning. */
|
|
17608
|
+
favourited: boolean().optional()
|
|
17568
17609
|
};
|
|
17569
17610
|
/**
|
|
17570
17611
|
* The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
|
|
@@ -17589,6 +17630,7 @@ var TrackFlagsSchema = object({
|
|
|
17589
17630
|
trackId: string(),
|
|
17590
17631
|
markForTrain: boolean(),
|
|
17591
17632
|
debug: boolean(),
|
|
17633
|
+
favourited: boolean(),
|
|
17592
17634
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
17593
17635
|
* a track row) because this shape is only ever produced by the write body,
|
|
17594
17636
|
* which always knows it — and a surface that has just written needs to render
|
|
@@ -18221,6 +18263,12 @@ var TrackCascadeCountsSchema = object({
|
|
|
18221
18263
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
18222
18264
|
embeddings: number().int()
|
|
18223
18265
|
});
|
|
18266
|
+
/** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
|
|
18267
|
+
var DiskReconcileCountsSchema = object({
|
|
18268
|
+
mediaDropped: number().int(),
|
|
18269
|
+
tracks: number().int(),
|
|
18270
|
+
events: number().int()
|
|
18271
|
+
});
|
|
18224
18272
|
/** Event-store footprint for one camera. */
|
|
18225
18273
|
var EventStoreDeviceFootprintSchema = object({
|
|
18226
18274
|
deviceId: number(),
|
|
@@ -18397,6 +18445,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18397
18445
|
}), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
|
|
18398
18446
|
kind: "mutation",
|
|
18399
18447
|
auth: "admin"
|
|
18448
|
+
}), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
|
|
18449
|
+
kind: "mutation",
|
|
18450
|
+
auth: "admin"
|
|
18400
18451
|
}), method(object({
|
|
18401
18452
|
deviceId: number(),
|
|
18402
18453
|
trackIds: array(string()).min(1)
|
|
@@ -19947,6 +19998,24 @@ var CameraStatusDegradationSchema = object({
|
|
|
19947
19998
|
*
|
|
19948
19999
|
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
19949
20000
|
*/
|
|
20001
|
+
var DiskReconcileJobSchema = object({
|
|
20002
|
+
state: _enum([
|
|
20003
|
+
"idle",
|
|
20004
|
+
"running",
|
|
20005
|
+
"done",
|
|
20006
|
+
"error"
|
|
20007
|
+
]),
|
|
20008
|
+
total: number().int().nonnegative(),
|
|
20009
|
+
completed: number().int().nonnegative(),
|
|
20010
|
+
currentDeviceId: number().int().nullable(),
|
|
20011
|
+
failed: array(number().int()).readonly(),
|
|
20012
|
+
mediaDropped: number().int().nonnegative(),
|
|
20013
|
+
tracks: number().int().nonnegative(),
|
|
20014
|
+
events: number().int().nonnegative(),
|
|
20015
|
+
startedAtMs: number().int().nullable(),
|
|
20016
|
+
finishedAtMs: number().int().nullable(),
|
|
20017
|
+
error: string().nullable()
|
|
20018
|
+
});
|
|
19950
20019
|
var CameraStatusSchema = object({
|
|
19951
20020
|
deviceId: number(),
|
|
19952
20021
|
assignment: CameraAssignmentStatusSchema,
|
|
@@ -20178,7 +20247,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
20178
20247
|
}), CameraSwitchGroupSchema, {
|
|
20179
20248
|
kind: "mutation",
|
|
20180
20249
|
auth: "admin"
|
|
20181
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(),
|
|
20250
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
|
|
20251
|
+
kind: "mutation",
|
|
20252
|
+
auth: "admin"
|
|
20253
|
+
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
20182
20254
|
name: string(),
|
|
20183
20255
|
description: string().optional(),
|
|
20184
20256
|
config: CameraPipelineConfigSchema
|
|
@@ -20583,7 +20655,14 @@ targets: array(object({
|
|
|
20583
20655
|
"sleeping",
|
|
20584
20656
|
"unreachable",
|
|
20585
20657
|
"waking"
|
|
20586
|
-
]).nullable()
|
|
20658
|
+
]).nullable(),
|
|
20659
|
+
/** A battery camera (whatever its current state). An AWAKE battery
|
|
20660
|
+
* camera is deliberately NOT recaptured on the poll cadence — every
|
|
20661
|
+
* capture is a camera hit that would keep it out of sleep — so its
|
|
20662
|
+
* cached frame legitimately ages past the currency ceiling while
|
|
20663
|
+
* nothing is streaming. A surface must keep painting it (a fresh
|
|
20664
|
+
* frame is captured at each wake), not blank to "unavailable". */
|
|
20665
|
+
battery: boolean()
|
|
20587
20666
|
})));
|
|
20588
20667
|
/**
|
|
20589
20668
|
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
@@ -21244,20 +21323,6 @@ var VectorStatsResultSchema = object({
|
|
|
21244
21323
|
exact: boolean()
|
|
21245
21324
|
});
|
|
21246
21325
|
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);
|
|
21247
|
-
/**
|
|
21248
|
-
* `videoclips` — the unified, navigable-clip surface for a camera.
|
|
21249
|
-
*
|
|
21250
|
-
* A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
|
|
21251
|
-
* provider per device, substitutable. The DEFAULT provider (registered by
|
|
21252
|
-
* `addon-post-analysis`, `defaultActive: true`) composes the analytics event
|
|
21253
|
-
* log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
|
|
21254
|
-
* is a time-WINDOW over existing footage, never a separate file. A camera that
|
|
21255
|
-
* exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
|
|
21256
|
-
* wrapper provider for its device and serve its own clip catalog + URLs.
|
|
21257
|
-
*
|
|
21258
|
-
* A `Clip` is purely time-based (subtree-blind): playback resolves segments by
|
|
21259
|
-
* temporal overlap, so the API never decides `continuous` vs `events`.
|
|
21260
|
-
*/
|
|
21261
21326
|
var ClipSchema = object({
|
|
21262
21327
|
/** Opaque, provider-namespaced id. The default provider encodes the time
|
|
21263
21328
|
* window so `getClipPlayback` is self-contained (no event re-query). */
|
|
@@ -21274,8 +21339,57 @@ var ClipSchema = object({
|
|
|
21274
21339
|
startMs: number(),
|
|
21275
21340
|
endMs: number()
|
|
21276
21341
|
}),
|
|
21277
|
-
/**
|
|
21278
|
-
thumbnail
|
|
21342
|
+
/**
|
|
21343
|
+
* Lazy thumbnail URL, never inlined.
|
|
21344
|
+
*
|
|
21345
|
+
* Recording-derived clips (events-mode keep-window, and the prepared
|
|
21346
|
+
* continuous event+fragment visit) MUST use the snapshot of the **main
|
|
21347
|
+
* event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
|
|
21348
|
+
* of the event that owns `kind` (object > motion > audio). Do not extract
|
|
21349
|
+
* a keyframe from the recorded segments. Other providers (onboard, HKSV)
|
|
21350
|
+
* mint their own stills.
|
|
21351
|
+
*
|
|
21352
|
+
* **VOUCHED, never fabricated.** A provider emits this only for an event it
|
|
21353
|
+
* has CONFIRMED owns at least one media row (its own, or its owning track's).
|
|
21354
|
+
* Absent is meaningful — "this visit has no event still" — never "we did not
|
|
21355
|
+
* look". Stamping it from a URL template made 35% of one camera's clips point
|
|
21356
|
+
* at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
|
|
21357
|
+
* A read that FAILS drops the claim; it never invents it.
|
|
21358
|
+
*/
|
|
21359
|
+
thumbnail: string().optional(),
|
|
21360
|
+
/**
|
|
21361
|
+
* An instant INSIDE this visit's footage, hole-safe, where a recorded still
|
|
21362
|
+
* can be decoded. Present whenever the visit came from recorded availability;
|
|
21363
|
+
* absent on a per-event padded window (there is no footage to promise).
|
|
21364
|
+
*
|
|
21365
|
+
* This is not a thumbnail and not a second byte path: it is the argument to
|
|
21366
|
+
* the recorder's existing still route. The surface — never the provider —
|
|
21367
|
+
* decides whether to use it. It is the midpoint of the visit's LONGEST
|
|
21368
|
+
* contiguous range, not of the visit: a visit spans its holes by
|
|
21369
|
+
* construction, so a naive midpoint lands in dead air.
|
|
21370
|
+
*/
|
|
21371
|
+
stillAtMs: number().optional(),
|
|
21372
|
+
/**
|
|
21373
|
+
* Analytics event ids that overlap this visit — a BOUNDED sample, newest
|
|
21374
|
+
* first within kind (object → motion → audio), capped at
|
|
21375
|
+
* {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
|
|
21376
|
+
*
|
|
21377
|
+
* Bounded because it is not a payload the surface pages through: one visit on
|
|
21378
|
+
* device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
|
|
21379
|
+
* camera-day. Read {@link eventCount} for the true total.
|
|
21380
|
+
*/
|
|
21381
|
+
eventIds: array(string()).optional(),
|
|
21382
|
+
/** How many analytics events actually overlap this visit. Differs from
|
|
21383
|
+
* `eventIds.length` exactly when the sample was capped — so a truncated
|
|
21384
|
+
* list is never mistaken for a quiet visit. */
|
|
21385
|
+
eventCount: number().int().nonnegative().optional(),
|
|
21386
|
+
/** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
|
|
21387
|
+
* than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
|
|
21388
|
+
* bar keeps showing them via `recording.getAvailability`. */
|
|
21389
|
+
holes: array(object({
|
|
21390
|
+
startMs: number(),
|
|
21391
|
+
endMs: number()
|
|
21392
|
+
})).optional()
|
|
21279
21393
|
});
|
|
21280
21394
|
var ClipPlaybackSchema = object({
|
|
21281
21395
|
/** HLS master URL through the hub data-plane (Range + token in path). */
|
|
@@ -21739,7 +21853,14 @@ var SearchResultSchema = object({
|
|
|
21739
21853
|
});
|
|
21740
21854
|
var AutoUpdateSettingsSchema = object({
|
|
21741
21855
|
channel: ChannelSchema,
|
|
21742
|
-
intervalSeconds: number()
|
|
21856
|
+
intervalSeconds: number(),
|
|
21857
|
+
/**
|
|
21858
|
+
* Cadence of the "an update exists" POLLER, in seconds. Independent of
|
|
21859
|
+
* `channel`: the poller runs while auto-apply is `off`, because being told
|
|
21860
|
+
* about a publish and installing it are different decisions. Clamped
|
|
21861
|
+
* server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
|
|
21862
|
+
*/
|
|
21863
|
+
updateCheckIntervalSeconds: number()
|
|
21743
21864
|
});
|
|
21744
21865
|
var AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
21745
21866
|
var RestartAddonResultSchema = unknown();
|
|
@@ -21880,7 +22001,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21880
22001
|
auth: "admin"
|
|
21881
22002
|
}), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
|
|
21882
22003
|
channel: ChannelSchema,
|
|
21883
|
-
intervalSeconds: number().min(300).max(86400).optional()
|
|
22004
|
+
intervalSeconds: number().min(300).max(86400).optional(),
|
|
22005
|
+
/** Availability-poll cadence; see AutoUpdateSettingsSchema. */
|
|
22006
|
+
updateCheckIntervalSeconds: number().min(900).max(604800).optional()
|
|
21884
22007
|
}), unknown(), {
|
|
21885
22008
|
kind: "mutation",
|
|
21886
22009
|
auth: "admin"
|
|
@@ -27569,7 +27692,9 @@ var ExportOptionsSchema = object({
|
|
|
27569
27692
|
includeAudio: boolean(),
|
|
27570
27693
|
maxLifeMs: number().int().positive(),
|
|
27571
27694
|
deleteAfterDownload: boolean(),
|
|
27572
|
-
title: string().max(200).optional()
|
|
27695
|
+
title: string().max(200).optional(),
|
|
27696
|
+
/** Notification-output target ids to ping when this export becomes ready. */
|
|
27697
|
+
notifyTargetIds: array(string().min(1)).max(20).optional()
|
|
27573
27698
|
}).superRefine((v, ctx) => {
|
|
27574
27699
|
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
27575
27700
|
code: ZodIssueCode.custom,
|
|
@@ -27628,10 +27753,18 @@ var ExportBytesSchema = object({
|
|
|
27628
27753
|
});
|
|
27629
27754
|
method(object({
|
|
27630
27755
|
deviceId: number(),
|
|
27631
|
-
|
|
27756
|
+
/** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
|
|
27757
|
+
profile: string().optional(),
|
|
27758
|
+
profiles: array(string()).min(1).optional(),
|
|
27632
27759
|
fromMs: number(),
|
|
27633
27760
|
toMs: number(),
|
|
27634
27761
|
options: ExportOptionsSchema
|
|
27762
|
+
}).superRefine((v, ctx) => {
|
|
27763
|
+
if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
|
|
27764
|
+
code: ZodIssueCode.custom,
|
|
27765
|
+
message: "pass profiles[] (min 1) or legacy profile",
|
|
27766
|
+
path: ["profiles"]
|
|
27767
|
+
});
|
|
27635
27768
|
}), ExportRecordSchema, {
|
|
27636
27769
|
kind: "mutation",
|
|
27637
27770
|
auth: "protected"
|
|
@@ -30573,15 +30706,6 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
30573
30706
|
labels: ["probe not implemented"]
|
|
30574
30707
|
};
|
|
30575
30708
|
}
|
|
30576
|
-
/**
|
|
30577
|
-
* Top-level devices restored at once in {@link onRestoreDevices}.
|
|
30578
|
-
*
|
|
30579
|
-
* Four covers the fleets this ships to without turning a boot into a burst a
|
|
30580
|
-
* camera NVR answers with a refusal. A provider whose upstream is a single
|
|
30581
|
-
* session with a serial command channel (a Baichuan hub, an NVR that
|
|
30582
|
-
* serialises ISAPI) should lower it; nothing needs to raise it.
|
|
30583
|
-
*/
|
|
30584
|
-
restoreConcurrency = 4;
|
|
30585
30709
|
async restoreDevices(savedDevices) {
|
|
30586
30710
|
await this.onRestoreDevices(savedDevices);
|
|
30587
30711
|
if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
|
|
@@ -30636,14 +30760,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
30636
30760
|
});
|
|
30637
30761
|
}
|
|
30638
30762
|
};
|
|
30639
|
-
|
|
30640
|
-
await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
|
|
30641
|
-
for (;;) {
|
|
30642
|
-
const saved = topLevel[nextTopLevel++];
|
|
30643
|
-
if (saved === void 0) return;
|
|
30644
|
-
await restoreOne(saved);
|
|
30645
|
-
}
|
|
30646
|
-
}));
|
|
30763
|
+
await Promise.all(topLevel.map((saved) => restoreOne(saved)));
|
|
30647
30764
|
const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
|
|
30648
30765
|
for (const saved of childRows) {
|
|
30649
30766
|
const Class = this.deviceClasses[saved.type];
|
|
@@ -33916,6 +34033,12 @@ Object.freeze({
|
|
|
33916
34033
|
addonId: null,
|
|
33917
34034
|
access: "create"
|
|
33918
34035
|
},
|
|
34036
|
+
"pipelineAnalytics.reconcileFromDisk": {
|
|
34037
|
+
capName: "pipeline-analytics",
|
|
34038
|
+
capScope: "device",
|
|
34039
|
+
addonId: null,
|
|
34040
|
+
access: "create"
|
|
34041
|
+
},
|
|
33919
34042
|
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
33920
34043
|
capName: "pipeline-analytics",
|
|
33921
34044
|
capScope: "device",
|
|
@@ -34318,6 +34441,12 @@ Object.freeze({
|
|
|
34318
34441
|
addonId: null,
|
|
34319
34442
|
access: "view"
|
|
34320
34443
|
},
|
|
34444
|
+
"pipelineOrchestrator.getReconcileFromDiskStatus": {
|
|
34445
|
+
capName: "pipeline-orchestrator",
|
|
34446
|
+
capScope: "system",
|
|
34447
|
+
addonId: null,
|
|
34448
|
+
access: "view"
|
|
34449
|
+
},
|
|
34321
34450
|
"pipelineOrchestrator.listAgentSettings": {
|
|
34322
34451
|
capName: "pipeline-orchestrator",
|
|
34323
34452
|
capScope: "system",
|
|
@@ -34342,6 +34471,12 @@ Object.freeze({
|
|
|
34342
34471
|
addonId: null,
|
|
34343
34472
|
access: "create"
|
|
34344
34473
|
},
|
|
34474
|
+
"pipelineOrchestrator.reconcileFromDisk": {
|
|
34475
|
+
capName: "pipeline-orchestrator",
|
|
34476
|
+
capScope: "system",
|
|
34477
|
+
addonId: null,
|
|
34478
|
+
access: "create"
|
|
34479
|
+
},
|
|
34345
34480
|
"pipelineOrchestrator.removeAgentSettings": {
|
|
34346
34481
|
capName: "pipeline-orchestrator",
|
|
34347
34482
|
capScope: "system",
|
|
@@ -37333,6 +37468,11 @@ Object.freeze({
|
|
|
37333
37468
|
form: "single",
|
|
37334
37469
|
optional: true
|
|
37335
37470
|
}],
|
|
37471
|
+
"pipelineAnalytics.reconcileFromDisk": [{
|
|
37472
|
+
name: "deviceId",
|
|
37473
|
+
form: "single",
|
|
37474
|
+
optional: false
|
|
37475
|
+
}],
|
|
37336
37476
|
"pipelineAnalytics.restageRetrainTrack": [{
|
|
37337
37477
|
name: "deviceId",
|
|
37338
37478
|
form: "single",
|
|
@@ -38398,6 +38538,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
|
38398
38538
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
38399
38539
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
38400
38540
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
38541
|
+
var MB = 1024 * 1024;
|
|
38542
|
+
1024 * MB, 3072 * MB;
|
|
38401
38543
|
//#endregion
|
|
38402
38544
|
//#region src/config.ts
|
|
38403
38545
|
/**
|
package/package.json
CHANGED