@camstack/addon-pipeline 1.2.84 → 1.2.86
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-utils-WtpcVuzP.js → addon-utils-BcyqLEHJ.js} +1 -1
- package/dist/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +2 -2
- package/dist/{dist-CYxusT1M.js → dist-C6y6ibGv.js} +42 -6
- package/dist/{dist-CJI_8GVY.mjs → dist-Do2bBzeb.mjs} +42 -6
- package/dist/{event-loop-stall-monitor-D3FjNBpW.mjs → event-loop-stall-monitor-Cpk8lSe1.mjs} +1 -1
- package/dist/{event-loop-stall-monitor-CHvvXkQS.js → event-loop-stall-monitor-DshPQArU.js} +1 -1
- package/dist/{lazy-sharp-CTNP_35A.js → lazy-sharp-CW8FBAD8.js} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +4 -4
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/recorder/index.js +96 -36
- package/dist/recorder/index.mjs +95 -35
- package/dist/session-decode/decode-worker-child.js +2 -2
- package/dist/session-decode/decode-worker-child.mjs +1 -1
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DKf1PFZt.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DKuapveI.mjs} +3 -3
- package/dist/stream-broker/{hostInit-CP9inP-0.mjs → hostInit-tEKHJmbO.mjs} +3 -3
- package/dist/stream-broker/index.js +1 -1
- package/dist/stream-broker/index.mjs +1 -1
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-ZYA4xGRg.mjs → worker-protocol-7hWrtJgd.mjs} +1 -1
- package/dist/{worker-protocol-34kViYAj.js → worker-protocol-DlNOmN5d.js} +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-C6y6ibGv.js");
|
|
6
6
|
const require_node_topology_platform = require("../node-topology-platform-CFZ7F4xW.js");
|
|
7
|
-
const require_addon_utils = require("../addon-utils-
|
|
7
|
+
const require_addon_utils = require("../addon-utils-BcyqLEHJ.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_dist.__toESM(node_path);
|
|
10
10
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { D as audioAnalyzerCapability, E as audioAnalysisCapability, U as mapAudioLabelToMacro, h as HF_BASE_URL, ht as hydrateSchema, it as errMsg, n as AUDIO_BACKEND_CHOICES, s as DEFAULT_AUDIO_ANALYZER_CONFIG, ut as BaseAddon } from "../dist-
|
|
2
|
+
import { D as audioAnalyzerCapability, E as audioAnalysisCapability, U as mapAudioLabelToMacro, h as HF_BASE_URL, ht as hydrateSchema, it as errMsg, n as AUDIO_BACKEND_CHOICES, s as DEFAULT_AUDIO_ANALYZER_CONFIG, ut as BaseAddon } from "../dist-Do2bBzeb.mjs";
|
|
3
3
|
import { t as pickNodePlatformArch } from "../node-topology-platform-BkR_k6WT.mjs";
|
|
4
4
|
import { i as downloadFile } from "../addon-utils-A2S9D7pu.mjs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -2,11 +2,11 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-
|
|
7
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
5
|
+
const require_dist = require("../dist-C6y6ibGv.js");
|
|
6
|
+
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DshPQArU.js");
|
|
7
|
+
const require_lazy_sharp = require("../lazy-sharp-CW8FBAD8.js");
|
|
8
8
|
const require_node_topology_platform = require("../node-topology-platform-CFZ7F4xW.js");
|
|
9
|
-
const require_addon_utils = require("../addon-utils-
|
|
9
|
+
const require_addon_utils = require("../addon-utils-BcyqLEHJ.js");
|
|
10
10
|
let sharp = require("sharp");
|
|
11
11
|
sharp = require_dist.__toESM(sharp);
|
|
12
12
|
let node_child_process = require("node:child_process");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $ as runtimeDevices$1, B as enumerateInferenceDevices, Ct as sleep, Ft as EventCategory, J as pipelineExecutorCapability, L as detectionPipelineCapability, M as defaultDeviceFor$1, Nt as string, Pt as union, Tt as array, V as evaluateZoneRules, bt as parseJsonUnknown, d as DEVICE_BACKEND_TO_FORMAT, ht as hydrateSchema, it as errMsg, jt as object, mt as createEvent, nt as supportedRuntimes$1, t as APPLE_SA_TO_MACRO, ut as BaseAddon, w as YAMNET_TO_MACRO, yt as nodePin } from "../dist-
|
|
3
|
-
import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, n as startEventLoopStallMonitor, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep } from "../event-loop-stall-monitor-
|
|
2
|
+
import { $ as runtimeDevices$1, B as enumerateInferenceDevices, Ct as sleep, Ft as EventCategory, J as pipelineExecutorCapability, L as detectionPipelineCapability, M as defaultDeviceFor$1, Nt as string, Pt as union, Tt as array, V as evaluateZoneRules, bt as parseJsonUnknown, d as DEVICE_BACKEND_TO_FORMAT, ht as hydrateSchema, it as errMsg, jt as object, mt as createEvent, nt as supportedRuntimes$1, t as APPLE_SA_TO_MACRO, ut as BaseAddon, w as YAMNET_TO_MACRO, yt as nodePin } from "../dist-Do2bBzeb.mjs";
|
|
3
|
+
import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, n as startEventLoopStallMonitor, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep } from "../event-loop-stall-monitor-Cpk8lSe1.mjs";
|
|
4
4
|
import { t as getSharp } from "../lazy-sharp-6oymT_yf.mjs";
|
|
5
5
|
import { t as pickNodePlatformArch } from "../node-topology-platform-BkR_k6WT.mjs";
|
|
6
6
|
import { a as ensureModel, o as isModelDownloaded, r as deleteModelFromDisk } from "../addon-utils-A2S9D7pu.mjs";
|
|
@@ -12261,6 +12261,8 @@ var QueryFilterSchema = object({
|
|
|
12261
12261
|
where: record(string(), unknown()).optional(),
|
|
12262
12262
|
whereIn: record(string(), array(unknown())).optional(),
|
|
12263
12263
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12264
|
+
/** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
|
|
12265
|
+
whereNot: record(string(), unknown()).optional(),
|
|
12264
12266
|
orderBy: object({
|
|
12265
12267
|
field: string(),
|
|
12266
12268
|
direction: _enum(["asc", "desc"])
|
|
@@ -12280,7 +12282,8 @@ var QueryFilterSchema = object({
|
|
|
12280
12282
|
var MutationFilterSchema = object({
|
|
12281
12283
|
where: record(string(), unknown()).optional(),
|
|
12282
12284
|
whereIn: record(string(), array(unknown())).optional(),
|
|
12283
|
-
whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
|
|
12285
|
+
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12286
|
+
whereNot: record(string(), unknown()).optional()
|
|
12284
12287
|
});
|
|
12285
12288
|
/** A single stored record: `{ id, data }`. */
|
|
12286
12289
|
var SettingsRecordSchema = object({
|
|
@@ -18530,7 +18533,10 @@ var RecentTracksQueryInput = object({
|
|
|
18530
18533
|
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
18531
18534
|
cursor: string().optional(),
|
|
18532
18535
|
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
18533
|
-
projection: TrackProjectionSchema.optional()
|
|
18536
|
+
projection: TrackProjectionSchema.optional(),
|
|
18537
|
+
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
18538
|
+
* feed lists passages; parking records live on the stationary registry. */
|
|
18539
|
+
includeStationary: boolean().optional()
|
|
18534
18540
|
});
|
|
18535
18541
|
var RecentTracksPageSchema = object({
|
|
18536
18542
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -18748,7 +18754,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18748
18754
|
zone: TrackZoneFilterSchema.optional(),
|
|
18749
18755
|
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
18750
18756
|
* compatible — omitting the field keeps today's exact behaviour). */
|
|
18751
|
-
projection: TrackProjectionSchema.optional()
|
|
18757
|
+
projection: TrackProjectionSchema.optional(),
|
|
18758
|
+
/** Include stationary-promoted rows (parked objects handed to the
|
|
18759
|
+
* stationary registry). Default false: the timeline lists passages,
|
|
18760
|
+
* not parking records (operator decision, 2026-08-15). */
|
|
18761
|
+
includeStationary: boolean().optional()
|
|
18752
18762
|
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
18753
18763
|
kind: "mutation",
|
|
18754
18764
|
auth: "admin"
|
|
@@ -18912,11 +18922,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18912
18922
|
auth: "admin"
|
|
18913
18923
|
}), method(object({
|
|
18914
18924
|
eventId: string(),
|
|
18915
|
-
kind: MediaFileKindEnum.optional()
|
|
18925
|
+
kind: MediaFileKindEnum.optional(),
|
|
18926
|
+
deviceId: number()
|
|
18927
|
+
}), array(MediaFileSchema).readonly()), method(object({
|
|
18928
|
+
trackId: string(),
|
|
18929
|
+
kinds: array(MediaFileKindEnum).optional(),
|
|
18930
|
+
deviceId: number()
|
|
18916
18931
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
18917
18932
|
trackId: string(),
|
|
18918
|
-
|
|
18919
|
-
}), array(
|
|
18933
|
+
deviceId: number()
|
|
18934
|
+
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
18920
18935
|
kind: "mutation",
|
|
18921
18936
|
auth: "admin"
|
|
18922
18937
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -34789,6 +34804,11 @@ Object.freeze({
|
|
|
34789
34804
|
form: "single",
|
|
34790
34805
|
optional: false
|
|
34791
34806
|
}],
|
|
34807
|
+
"pipelineAnalytics.getEventMedia": [{
|
|
34808
|
+
name: "deviceId",
|
|
34809
|
+
form: "single",
|
|
34810
|
+
optional: false
|
|
34811
|
+
}],
|
|
34792
34812
|
"pipelineAnalytics.getKeyEvents": [{
|
|
34793
34813
|
name: "deviceId",
|
|
34794
34814
|
form: "single",
|
|
@@ -34819,6 +34839,11 @@ Object.freeze({
|
|
|
34819
34839
|
form: "single",
|
|
34820
34840
|
optional: false
|
|
34821
34841
|
}],
|
|
34842
|
+
"pipelineAnalytics.getTrackMedia": [{
|
|
34843
|
+
name: "deviceId",
|
|
34844
|
+
form: "single",
|
|
34845
|
+
optional: false
|
|
34846
|
+
}],
|
|
34822
34847
|
"pipelineAnalytics.getTrainingExportSummary": [{
|
|
34823
34848
|
name: "deviceIds",
|
|
34824
34849
|
form: "array",
|
|
@@ -34854,6 +34879,11 @@ Object.freeze({
|
|
|
34854
34879
|
form: "array",
|
|
34855
34880
|
optional: true
|
|
34856
34881
|
}],
|
|
34882
|
+
"pipelineAnalytics.listTrackMedia": [{
|
|
34883
|
+
name: "deviceId",
|
|
34884
|
+
form: "single",
|
|
34885
|
+
optional: false
|
|
34886
|
+
}],
|
|
34857
34887
|
"pipelineAnalytics.listTracks": [{
|
|
34858
34888
|
name: "deviceId",
|
|
34859
34889
|
form: "single",
|
|
@@ -35294,6 +35324,12 @@ Object.freeze({
|
|
|
35294
35324
|
form: "single",
|
|
35295
35325
|
optional: false
|
|
35296
35326
|
}],
|
|
35327
|
+
"snapshot.getSnapshotLinks": [{
|
|
35328
|
+
name: "targets",
|
|
35329
|
+
form: "object-array",
|
|
35330
|
+
optional: false,
|
|
35331
|
+
itemField: "deviceId"
|
|
35332
|
+
}],
|
|
35297
35333
|
"snapshot.getSnapshotOverview": [{
|
|
35298
35334
|
name: "deviceIds",
|
|
35299
35335
|
form: "array",
|
|
@@ -12238,6 +12238,8 @@ var QueryFilterSchema = object({
|
|
|
12238
12238
|
where: record(string(), unknown()).optional(),
|
|
12239
12239
|
whereIn: record(string(), array(unknown())).optional(),
|
|
12240
12240
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12241
|
+
/** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
|
|
12242
|
+
whereNot: record(string(), unknown()).optional(),
|
|
12241
12243
|
orderBy: object({
|
|
12242
12244
|
field: string(),
|
|
12243
12245
|
direction: _enum(["asc", "desc"])
|
|
@@ -12257,7 +12259,8 @@ var QueryFilterSchema = object({
|
|
|
12257
12259
|
var MutationFilterSchema = object({
|
|
12258
12260
|
where: record(string(), unknown()).optional(),
|
|
12259
12261
|
whereIn: record(string(), array(unknown())).optional(),
|
|
12260
|
-
whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
|
|
12262
|
+
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12263
|
+
whereNot: record(string(), unknown()).optional()
|
|
12261
12264
|
});
|
|
12262
12265
|
/** A single stored record: `{ id, data }`. */
|
|
12263
12266
|
var SettingsRecordSchema = object({
|
|
@@ -18507,7 +18510,10 @@ var RecentTracksQueryInput = object({
|
|
|
18507
18510
|
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
18508
18511
|
cursor: string().optional(),
|
|
18509
18512
|
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
18510
|
-
projection: TrackProjectionSchema.optional()
|
|
18513
|
+
projection: TrackProjectionSchema.optional(),
|
|
18514
|
+
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
18515
|
+
* feed lists passages; parking records live on the stationary registry. */
|
|
18516
|
+
includeStationary: boolean().optional()
|
|
18511
18517
|
});
|
|
18512
18518
|
var RecentTracksPageSchema = object({
|
|
18513
18519
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -18725,7 +18731,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18725
18731
|
zone: TrackZoneFilterSchema.optional(),
|
|
18726
18732
|
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
18727
18733
|
* compatible — omitting the field keeps today's exact behaviour). */
|
|
18728
|
-
projection: TrackProjectionSchema.optional()
|
|
18734
|
+
projection: TrackProjectionSchema.optional(),
|
|
18735
|
+
/** Include stationary-promoted rows (parked objects handed to the
|
|
18736
|
+
* stationary registry). Default false: the timeline lists passages,
|
|
18737
|
+
* not parking records (operator decision, 2026-08-15). */
|
|
18738
|
+
includeStationary: boolean().optional()
|
|
18729
18739
|
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
18730
18740
|
kind: "mutation",
|
|
18731
18741
|
auth: "admin"
|
|
@@ -18889,11 +18899,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18889
18899
|
auth: "admin"
|
|
18890
18900
|
}), method(object({
|
|
18891
18901
|
eventId: string(),
|
|
18892
|
-
kind: MediaFileKindEnum.optional()
|
|
18902
|
+
kind: MediaFileKindEnum.optional(),
|
|
18903
|
+
deviceId: number()
|
|
18904
|
+
}), array(MediaFileSchema).readonly()), method(object({
|
|
18905
|
+
trackId: string(),
|
|
18906
|
+
kinds: array(MediaFileKindEnum).optional(),
|
|
18907
|
+
deviceId: number()
|
|
18893
18908
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
18894
18909
|
trackId: string(),
|
|
18895
|
-
|
|
18896
|
-
}), array(
|
|
18910
|
+
deviceId: number()
|
|
18911
|
+
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
18897
18912
|
kind: "mutation",
|
|
18898
18913
|
auth: "admin"
|
|
18899
18914
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -34766,6 +34781,11 @@ Object.freeze({
|
|
|
34766
34781
|
form: "single",
|
|
34767
34782
|
optional: false
|
|
34768
34783
|
}],
|
|
34784
|
+
"pipelineAnalytics.getEventMedia": [{
|
|
34785
|
+
name: "deviceId",
|
|
34786
|
+
form: "single",
|
|
34787
|
+
optional: false
|
|
34788
|
+
}],
|
|
34769
34789
|
"pipelineAnalytics.getKeyEvents": [{
|
|
34770
34790
|
name: "deviceId",
|
|
34771
34791
|
form: "single",
|
|
@@ -34796,6 +34816,11 @@ Object.freeze({
|
|
|
34796
34816
|
form: "single",
|
|
34797
34817
|
optional: false
|
|
34798
34818
|
}],
|
|
34819
|
+
"pipelineAnalytics.getTrackMedia": [{
|
|
34820
|
+
name: "deviceId",
|
|
34821
|
+
form: "single",
|
|
34822
|
+
optional: false
|
|
34823
|
+
}],
|
|
34799
34824
|
"pipelineAnalytics.getTrainingExportSummary": [{
|
|
34800
34825
|
name: "deviceIds",
|
|
34801
34826
|
form: "array",
|
|
@@ -34831,6 +34856,11 @@ Object.freeze({
|
|
|
34831
34856
|
form: "array",
|
|
34832
34857
|
optional: true
|
|
34833
34858
|
}],
|
|
34859
|
+
"pipelineAnalytics.listTrackMedia": [{
|
|
34860
|
+
name: "deviceId",
|
|
34861
|
+
form: "single",
|
|
34862
|
+
optional: false
|
|
34863
|
+
}],
|
|
34834
34864
|
"pipelineAnalytics.listTracks": [{
|
|
34835
34865
|
name: "deviceId",
|
|
34836
34866
|
form: "single",
|
|
@@ -35271,6 +35301,12 @@ Object.freeze({
|
|
|
35271
35301
|
form: "single",
|
|
35272
35302
|
optional: false
|
|
35273
35303
|
}],
|
|
35304
|
+
"snapshot.getSnapshotLinks": [{
|
|
35305
|
+
name: "targets",
|
|
35306
|
+
form: "object-array",
|
|
35307
|
+
optional: false,
|
|
35308
|
+
itemField: "deviceId"
|
|
35309
|
+
}],
|
|
35274
35310
|
"snapshot.getSnapshotOverview": [{
|
|
35275
35311
|
name: "deviceIds",
|
|
35276
35312
|
form: "array",
|
package/dist/{event-loop-stall-monitor-D3FjNBpW.mjs → event-loop-stall-monitor-Cpk8lSe1.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-
|
|
1
|
+
import { H as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-Do2bBzeb.mjs";
|
|
2
2
|
import { PerformanceObserver } from "node:perf_hooks";
|
|
3
3
|
//#region src/detection-pipeline/registry/model-catalogs.ts
|
|
4
4
|
var HF_REPO = "camstack/camstack-models";
|
|
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
5
|
+
const require_dist = require("../dist-C6y6ibGv.js");
|
|
6
|
+
const require_lazy_sharp = require("../lazy-sharp-CW8FBAD8.js");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as motionDetectionCapability, V as evaluateZoneRules, ht as hydrateSchema, pt as DeviceType, ut as BaseAddon } from "../dist-
|
|
1
|
+
import { G as motionDetectionCapability, V as evaluateZoneRules, ht as hydrateSchema, pt as DeviceType, ut as BaseAddon } from "../dist-Do2bBzeb.mjs";
|
|
2
2
|
import { t as getSharp } from "../lazy-sharp-6oymT_yf.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
@@ -2,11 +2,11 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-
|
|
7
|
-
const require_worker_protocol = require("../worker-protocol-
|
|
5
|
+
const require_dist = require("../dist-C6y6ibGv.js");
|
|
6
|
+
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DshPQArU.js");
|
|
7
|
+
const require_worker_protocol = require("../worker-protocol-DlNOmN5d.js");
|
|
8
8
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
9
|
+
const require_lazy_sharp = require("../lazy-sharp-CW8FBAD8.js");
|
|
10
10
|
const require_remote_restream = require("../remote-restream-BYbAsgUf.js");
|
|
11
11
|
let sharp = require("sharp");
|
|
12
12
|
sharp = require_dist.__toESM(sharp);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { At as number, Et as boolean, F as deriveDetailCropRect, Ft as EventCategory, K as pickDetailCropConvention, N as defineCustomActions, Nt as string, Ot as lazy, Tt as array, Y as pipelineRunnerCapability, c as DEFAULT_DETAIL_CROP_CONVENTION, d as DEVICE_BACKEND_TO_FORMAT, it as errMsg, j as customAction, jt as object, kt as literal, mt as createEvent, q as pickNativeLeaseOverride, ut as BaseAddon, wt as _enum, yt as nodePin } from "../dist-
|
|
2
|
-
import { c as getStepDefinition, t as attributeStall } from "../event-loop-stall-monitor-
|
|
3
|
-
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-
|
|
1
|
+
import { At as number, Et as boolean, F as deriveDetailCropRect, Ft as EventCategory, K as pickDetailCropConvention, N as defineCustomActions, Nt as string, Ot as lazy, Tt as array, Y as pipelineRunnerCapability, c as DEFAULT_DETAIL_CROP_CONVENTION, d as DEVICE_BACKEND_TO_FORMAT, it as errMsg, j as customAction, jt as object, kt as literal, mt as createEvent, q as pickNativeLeaseOverride, ut as BaseAddon, wt as _enum, yt as nodePin } from "../dist-Do2bBzeb.mjs";
|
|
2
|
+
import { c as getStepDefinition, t as attributeStall } from "../event-loop-stall-monitor-Cpk8lSe1.mjs";
|
|
3
|
+
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-7hWrtJgd.mjs";
|
|
4
4
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-6oymT_yf.mjs";
|
|
6
6
|
import { i as withDetectionIntent, n as profileForStreamId, t as isRemoteRestream } from "../remote-restream-Ci7RXNGb.mjs";
|
package/dist/recorder/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_dist = require("../dist-
|
|
1
|
+
const require_dist = require("../dist-C6y6ibGv.js");
|
|
2
2
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
3
|
-
const require_addon_utils = require("../addon-utils-
|
|
3
|
+
const require_addon_utils = require("../addon-utils-BcyqLEHJ.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
let node_child_process = require("node:child_process");
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -7684,6 +7684,22 @@ var EXPORT_SWEEP_INTERVAL_MS = 5 * 6e4;
|
|
|
7684
7684
|
* hourly cadence keeps the storage.list/evict cost negligible while honouring
|
|
7685
7685
|
* the recording-spec §6 periodic retention. */
|
|
7686
7686
|
var RETENTION_SWEEP_INTERVAL_MS = 60 * 6e4;
|
|
7687
|
+
/**
|
|
7688
|
+
* How long after boot the FULL-archive index walk starts.
|
|
7689
|
+
*
|
|
7690
|
+
* The walk is a recursive `readdir` per device over the whole recordings
|
|
7691
|
+
* subtree — minutes of network-FS latency on a real archive (measured: 240 s
|
|
7692
|
+
* for ONE 43 017-entry device, 2026-08-15) and it is the read model for
|
|
7693
|
+
* playback/retention/footprint, NOT the write path. Every read self-hydrates
|
|
7694
|
+
* the window it is asked about, and the whole-archive consumers
|
|
7695
|
+
* (retention sweep, redundancy janitor, disk-pressure eviction) only ever
|
|
7696
|
+
* under-report while the index is partial — so the walk waits out the boot
|
|
7697
|
+
* storm (writers attaching, staging reconcile relocating, first viewer paint)
|
|
7698
|
+
* instead of competing with it. Five minutes because the storm is measured in
|
|
7699
|
+
* seconds-to-a-minute and the consumers re-run on their own cadences anyway
|
|
7700
|
+
* (retention hourly, eviction on pressure).
|
|
7701
|
+
*/
|
|
7702
|
+
var FULL_WALK_DEFER_MS = 5 * 6e4;
|
|
7687
7703
|
/** Grace after a completed download before a `deleteAfterDownload` file is removed. */
|
|
7688
7704
|
var EXPORT_DELETE_GRACE_MS = 6e4;
|
|
7689
7705
|
/** Only `.mp4` export ids matching this shape are servable (traversal guard). */
|
|
@@ -7749,6 +7765,11 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
7749
7765
|
exportEngine = null;
|
|
7750
7766
|
/** Periodic export-expiry sweep timer. Cleared on shutdown. */
|
|
7751
7767
|
exportSweepTimer = null;
|
|
7768
|
+
/** Timer arming the deferred full-archive index walk. Null once fired. */
|
|
7769
|
+
fullWalkTimer = null;
|
|
7770
|
+
/** Single-flight guard for the full-archive walk (onHubReachable can re-enter
|
|
7771
|
+
* on a hub reconnect while a deferred walk is still running). */
|
|
7772
|
+
fullWalkInFlight = false;
|
|
7752
7773
|
/** The `recording` cap provider — retained so the periodic retention sweep can
|
|
7753
7774
|
* call its `pruneFootage`. Null until built in `onInitialize`. */
|
|
7754
7775
|
recordingProvider = null;
|
|
@@ -8121,6 +8142,10 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
8121
8142
|
}
|
|
8122
8143
|
this.retentionSweeper?.stop();
|
|
8123
8144
|
this.retentionSweeper = null;
|
|
8145
|
+
if (this.fullWalkTimer !== null) {
|
|
8146
|
+
clearTimeout(this.fullWalkTimer);
|
|
8147
|
+
this.fullWalkTimer = null;
|
|
8148
|
+
}
|
|
8124
8149
|
this.exportEngine = null;
|
|
8125
8150
|
this.recordingProvider = null;
|
|
8126
8151
|
}
|
|
@@ -8190,41 +8215,8 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
8190
8215
|
return;
|
|
8191
8216
|
}
|
|
8192
8217
|
this.warmToday([...configs.keys()]);
|
|
8193
|
-
|
|
8194
|
-
await hydrateDevicesFromStorage(this.ctx.api, this.index, [...configs.keys()], this.resolvedLocations, this.ctx.logger);
|
|
8195
|
-
this.ctx.logger.info("recorder: hydrated index from storage", { meta: {
|
|
8196
|
-
deviceCount: configs.size,
|
|
8197
|
-
locationCount: this.resolvedLocations.length,
|
|
8198
|
-
ms: Date.now() - hydrateStartedMs
|
|
8199
|
-
} });
|
|
8200
|
-
const loggedDomains = /* @__PURE__ */ new Set();
|
|
8201
|
-
for (const loc of this.resolvedLocations) {
|
|
8202
|
-
const domain = this.locationDomain(loc.id);
|
|
8203
|
-
const domainKey = [...domain].toSorted().join("+");
|
|
8204
|
-
if (loggedDomains.has(domainKey)) continue;
|
|
8205
|
-
loggedDomains.add(domainKey);
|
|
8206
|
-
const acct = this.index.accountingForLocations(domain);
|
|
8207
|
-
this.ctx.logger.info("recorder: eviction domain footage span at hydrate", { meta: {
|
|
8208
|
-
locationIds: [...domain].toSorted(),
|
|
8209
|
-
root: loc.root,
|
|
8210
|
-
count: acct.count,
|
|
8211
|
-
bytes: acct.bytes,
|
|
8212
|
-
oldestMs: acct.oldestMs,
|
|
8213
|
-
newestMs: acct.newestMs
|
|
8214
|
-
} });
|
|
8215
|
-
}
|
|
8218
|
+
this.scheduleDeferredFullWalk([...configs.keys()]);
|
|
8216
8219
|
this.cleanupLegacyThumbsDirs();
|
|
8217
|
-
const store = this.segmentStore;
|
|
8218
|
-
if (store) try {
|
|
8219
|
-
await runRedundancyJanitor({
|
|
8220
|
-
deviceIds: [...configs.keys()],
|
|
8221
|
-
segmentsFor: (deviceId, profile) => this.index.segments(deviceId, profile),
|
|
8222
|
-
evict: (location, rows) => store.evict(location, rows),
|
|
8223
|
-
logger: this.ctx.logger
|
|
8224
|
-
});
|
|
8225
|
-
} catch (err) {
|
|
8226
|
-
this.ctx.logger.warn("recorder: redundancy janitor failed", { meta: { error: require_dist.errMsg(err) } });
|
|
8227
|
-
}
|
|
8228
8220
|
await this.bootstrapExports();
|
|
8229
8221
|
const provider = this.recordingProvider;
|
|
8230
8222
|
if (provider && this.retentionSweeper === null) this.retentionSweeper = new RetentionSweeper({
|
|
@@ -8667,6 +8659,74 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
8667
8659
|
ms: Date.now() - started
|
|
8668
8660
|
} });
|
|
8669
8661
|
}
|
|
8662
|
+
/**
|
|
8663
|
+
* Arm the deferred full-archive index walk (see {@link FULL_WALK_DEFER_MS}).
|
|
8664
|
+
* Idempotent across `onHubReachable` re-entries: an armed timer is not
|
|
8665
|
+
* re-armed, and a walk already running is not duplicated.
|
|
8666
|
+
*/
|
|
8667
|
+
scheduleDeferredFullWalk(deviceIds) {
|
|
8668
|
+
if (this.fullWalkTimer !== null || this.fullWalkInFlight) return;
|
|
8669
|
+
this.fullWalkTimer = setTimeout(() => {
|
|
8670
|
+
this.fullWalkTimer = null;
|
|
8671
|
+
this.runFullArchiveWalk(deviceIds);
|
|
8672
|
+
}, FULL_WALK_DEFER_MS);
|
|
8673
|
+
this.fullWalkTimer.unref?.();
|
|
8674
|
+
this.ctx.logger.info("recorder: full-archive index walk deferred", { meta: {
|
|
8675
|
+
deferMs: FULL_WALK_DEFER_MS,
|
|
8676
|
+
deviceCount: deviceIds.length
|
|
8677
|
+
} });
|
|
8678
|
+
}
|
|
8679
|
+
/**
|
|
8680
|
+
* The deferred boot walk itself: hydrate every configured device from the
|
|
8681
|
+
* recordings roots, then run the two consumers that need the COMPLETE index
|
|
8682
|
+
* (the eviction-domain span log and the redundancy janitor). Bounded-parallel
|
|
8683
|
+
* per device, and each camera is marked hydrated at ITS OWN completion — not
|
|
8684
|
+
* after the fleet (D167). Never overlaps itself.
|
|
8685
|
+
*/
|
|
8686
|
+
async runFullArchiveWalk(deviceIds) {
|
|
8687
|
+
if (this.fullWalkInFlight) return;
|
|
8688
|
+
this.fullWalkInFlight = true;
|
|
8689
|
+
const hydrateStartedMs = Date.now();
|
|
8690
|
+
try {
|
|
8691
|
+
await hydrateDevicesFromStorage(this.ctx.api, this.index, deviceIds, this.resolvedLocations, this.ctx.logger);
|
|
8692
|
+
this.ctx.logger.info("recorder: hydrated index from storage", { meta: {
|
|
8693
|
+
deviceCount: deviceIds.length,
|
|
8694
|
+
locationCount: this.resolvedLocations.length,
|
|
8695
|
+
ms: Date.now() - hydrateStartedMs
|
|
8696
|
+
} });
|
|
8697
|
+
const loggedDomains = /* @__PURE__ */ new Set();
|
|
8698
|
+
for (const loc of this.resolvedLocations) {
|
|
8699
|
+
const domain = this.locationDomain(loc.id);
|
|
8700
|
+
const domainKey = [...domain].toSorted().join("+");
|
|
8701
|
+
if (loggedDomains.has(domainKey)) continue;
|
|
8702
|
+
loggedDomains.add(domainKey);
|
|
8703
|
+
const acct = this.index.accountingForLocations(domain);
|
|
8704
|
+
this.ctx.logger.info("recorder: eviction domain footage span at hydrate", { meta: {
|
|
8705
|
+
locationIds: [...domain].toSorted(),
|
|
8706
|
+
root: loc.root,
|
|
8707
|
+
count: acct.count,
|
|
8708
|
+
bytes: acct.bytes,
|
|
8709
|
+
oldestMs: acct.oldestMs,
|
|
8710
|
+
newestMs: acct.newestMs
|
|
8711
|
+
} });
|
|
8712
|
+
}
|
|
8713
|
+
const store = this.segmentStore;
|
|
8714
|
+
if (store) try {
|
|
8715
|
+
await runRedundancyJanitor({
|
|
8716
|
+
deviceIds,
|
|
8717
|
+
segmentsFor: (deviceId, profile) => this.index.segments(deviceId, profile),
|
|
8718
|
+
evict: (location, rows) => store.evict(location, rows),
|
|
8719
|
+
logger: this.ctx.logger
|
|
8720
|
+
});
|
|
8721
|
+
} catch (err) {
|
|
8722
|
+
this.ctx.logger.warn("recorder: redundancy janitor failed", { meta: { error: require_dist.errMsg(err) } });
|
|
8723
|
+
}
|
|
8724
|
+
} catch (err) {
|
|
8725
|
+
this.ctx.logger.warn("recorder: full-archive walk failed", { meta: { error: require_dist.errMsg(err) } });
|
|
8726
|
+
} finally {
|
|
8727
|
+
this.fullWalkInFlight = false;
|
|
8728
|
+
}
|
|
8729
|
+
}
|
|
8670
8730
|
configStore() {
|
|
8671
8731
|
return this.state(RECORDING_CONFIGS_KEY, RecordingConfigsBlobSchema, {});
|
|
8672
8732
|
}
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as number, Ft as EventCategory, I as deriveRecordingMode, Mt as record, Nt as string, S as RecordingConfigSchema, St as selectAssignedProfileSlots, Tt as array, X as recordingCapability, Z as recordingExportCapability, et as storageEvictableCapability, f as EVENT_PAD_MS, ht as hydrateSchema, it as errMsg, jt as object, l as DEFAULT_EVENTS_BAND_BUFFER_SEC, m as ExportRecordSchema, pt as DeviceType, ut as BaseAddon, v as OpsLogEntrySchema, x as RECORDING_EXPORT_MAX_READ_BYTES, yt as nodePin } from "../dist-
|
|
1
|
+
import { At as number, Ft as EventCategory, I as deriveRecordingMode, Mt as record, Nt as string, S as RecordingConfigSchema, St as selectAssignedProfileSlots, Tt as array, X as recordingCapability, Z as recordingExportCapability, et as storageEvictableCapability, f as EVENT_PAD_MS, ht as hydrateSchema, it as errMsg, jt as object, l as DEFAULT_EVENTS_BAND_BUFFER_SEC, m as ExportRecordSchema, pt as DeviceType, ut as BaseAddon, v as OpsLogEntrySchema, x as RECORDING_EXPORT_MAX_READ_BYTES, yt as nodePin } from "../dist-Do2bBzeb.mjs";
|
|
2
2
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
3
3
|
import { n as createFileDataPlaneHandler, s as parseRangeHeader, t as contentTypeFor } from "../addon-utils-A2S9D7pu.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -7683,6 +7683,22 @@ var EXPORT_SWEEP_INTERVAL_MS = 5 * 6e4;
|
|
|
7683
7683
|
* hourly cadence keeps the storage.list/evict cost negligible while honouring
|
|
7684
7684
|
* the recording-spec §6 periodic retention. */
|
|
7685
7685
|
var RETENTION_SWEEP_INTERVAL_MS = 60 * 6e4;
|
|
7686
|
+
/**
|
|
7687
|
+
* How long after boot the FULL-archive index walk starts.
|
|
7688
|
+
*
|
|
7689
|
+
* The walk is a recursive `readdir` per device over the whole recordings
|
|
7690
|
+
* subtree — minutes of network-FS latency on a real archive (measured: 240 s
|
|
7691
|
+
* for ONE 43 017-entry device, 2026-08-15) and it is the read model for
|
|
7692
|
+
* playback/retention/footprint, NOT the write path. Every read self-hydrates
|
|
7693
|
+
* the window it is asked about, and the whole-archive consumers
|
|
7694
|
+
* (retention sweep, redundancy janitor, disk-pressure eviction) only ever
|
|
7695
|
+
* under-report while the index is partial — so the walk waits out the boot
|
|
7696
|
+
* storm (writers attaching, staging reconcile relocating, first viewer paint)
|
|
7697
|
+
* instead of competing with it. Five minutes because the storm is measured in
|
|
7698
|
+
* seconds-to-a-minute and the consumers re-run on their own cadences anyway
|
|
7699
|
+
* (retention hourly, eviction on pressure).
|
|
7700
|
+
*/
|
|
7701
|
+
var FULL_WALK_DEFER_MS = 5 * 6e4;
|
|
7686
7702
|
/** Grace after a completed download before a `deleteAfterDownload` file is removed. */
|
|
7687
7703
|
var EXPORT_DELETE_GRACE_MS = 6e4;
|
|
7688
7704
|
/** Only `.mp4` export ids matching this shape are servable (traversal guard). */
|
|
@@ -7748,6 +7764,11 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
7748
7764
|
exportEngine = null;
|
|
7749
7765
|
/** Periodic export-expiry sweep timer. Cleared on shutdown. */
|
|
7750
7766
|
exportSweepTimer = null;
|
|
7767
|
+
/** Timer arming the deferred full-archive index walk. Null once fired. */
|
|
7768
|
+
fullWalkTimer = null;
|
|
7769
|
+
/** Single-flight guard for the full-archive walk (onHubReachable can re-enter
|
|
7770
|
+
* on a hub reconnect while a deferred walk is still running). */
|
|
7771
|
+
fullWalkInFlight = false;
|
|
7751
7772
|
/** The `recording` cap provider — retained so the periodic retention sweep can
|
|
7752
7773
|
* call its `pruneFootage`. Null until built in `onInitialize`. */
|
|
7753
7774
|
recordingProvider = null;
|
|
@@ -8120,6 +8141,10 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
8120
8141
|
}
|
|
8121
8142
|
this.retentionSweeper?.stop();
|
|
8122
8143
|
this.retentionSweeper = null;
|
|
8144
|
+
if (this.fullWalkTimer !== null) {
|
|
8145
|
+
clearTimeout(this.fullWalkTimer);
|
|
8146
|
+
this.fullWalkTimer = null;
|
|
8147
|
+
}
|
|
8123
8148
|
this.exportEngine = null;
|
|
8124
8149
|
this.recordingProvider = null;
|
|
8125
8150
|
}
|
|
@@ -8189,41 +8214,8 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
8189
8214
|
return;
|
|
8190
8215
|
}
|
|
8191
8216
|
this.warmToday([...configs.keys()]);
|
|
8192
|
-
|
|
8193
|
-
await hydrateDevicesFromStorage(this.ctx.api, this.index, [...configs.keys()], this.resolvedLocations, this.ctx.logger);
|
|
8194
|
-
this.ctx.logger.info("recorder: hydrated index from storage", { meta: {
|
|
8195
|
-
deviceCount: configs.size,
|
|
8196
|
-
locationCount: this.resolvedLocations.length,
|
|
8197
|
-
ms: Date.now() - hydrateStartedMs
|
|
8198
|
-
} });
|
|
8199
|
-
const loggedDomains = /* @__PURE__ */ new Set();
|
|
8200
|
-
for (const loc of this.resolvedLocations) {
|
|
8201
|
-
const domain = this.locationDomain(loc.id);
|
|
8202
|
-
const domainKey = [...domain].toSorted().join("+");
|
|
8203
|
-
if (loggedDomains.has(domainKey)) continue;
|
|
8204
|
-
loggedDomains.add(domainKey);
|
|
8205
|
-
const acct = this.index.accountingForLocations(domain);
|
|
8206
|
-
this.ctx.logger.info("recorder: eviction domain footage span at hydrate", { meta: {
|
|
8207
|
-
locationIds: [...domain].toSorted(),
|
|
8208
|
-
root: loc.root,
|
|
8209
|
-
count: acct.count,
|
|
8210
|
-
bytes: acct.bytes,
|
|
8211
|
-
oldestMs: acct.oldestMs,
|
|
8212
|
-
newestMs: acct.newestMs
|
|
8213
|
-
} });
|
|
8214
|
-
}
|
|
8217
|
+
this.scheduleDeferredFullWalk([...configs.keys()]);
|
|
8215
8218
|
this.cleanupLegacyThumbsDirs();
|
|
8216
|
-
const store = this.segmentStore;
|
|
8217
|
-
if (store) try {
|
|
8218
|
-
await runRedundancyJanitor({
|
|
8219
|
-
deviceIds: [...configs.keys()],
|
|
8220
|
-
segmentsFor: (deviceId, profile) => this.index.segments(deviceId, profile),
|
|
8221
|
-
evict: (location, rows) => store.evict(location, rows),
|
|
8222
|
-
logger: this.ctx.logger
|
|
8223
|
-
});
|
|
8224
|
-
} catch (err) {
|
|
8225
|
-
this.ctx.logger.warn("recorder: redundancy janitor failed", { meta: { error: errMsg(err) } });
|
|
8226
|
-
}
|
|
8227
8219
|
await this.bootstrapExports();
|
|
8228
8220
|
const provider = this.recordingProvider;
|
|
8229
8221
|
if (provider && this.retentionSweeper === null) this.retentionSweeper = new RetentionSweeper({
|
|
@@ -8666,6 +8658,74 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
8666
8658
|
ms: Date.now() - started
|
|
8667
8659
|
} });
|
|
8668
8660
|
}
|
|
8661
|
+
/**
|
|
8662
|
+
* Arm the deferred full-archive index walk (see {@link FULL_WALK_DEFER_MS}).
|
|
8663
|
+
* Idempotent across `onHubReachable` re-entries: an armed timer is not
|
|
8664
|
+
* re-armed, and a walk already running is not duplicated.
|
|
8665
|
+
*/
|
|
8666
|
+
scheduleDeferredFullWalk(deviceIds) {
|
|
8667
|
+
if (this.fullWalkTimer !== null || this.fullWalkInFlight) return;
|
|
8668
|
+
this.fullWalkTimer = setTimeout(() => {
|
|
8669
|
+
this.fullWalkTimer = null;
|
|
8670
|
+
this.runFullArchiveWalk(deviceIds);
|
|
8671
|
+
}, FULL_WALK_DEFER_MS);
|
|
8672
|
+
this.fullWalkTimer.unref?.();
|
|
8673
|
+
this.ctx.logger.info("recorder: full-archive index walk deferred", { meta: {
|
|
8674
|
+
deferMs: FULL_WALK_DEFER_MS,
|
|
8675
|
+
deviceCount: deviceIds.length
|
|
8676
|
+
} });
|
|
8677
|
+
}
|
|
8678
|
+
/**
|
|
8679
|
+
* The deferred boot walk itself: hydrate every configured device from the
|
|
8680
|
+
* recordings roots, then run the two consumers that need the COMPLETE index
|
|
8681
|
+
* (the eviction-domain span log and the redundancy janitor). Bounded-parallel
|
|
8682
|
+
* per device, and each camera is marked hydrated at ITS OWN completion — not
|
|
8683
|
+
* after the fleet (D167). Never overlaps itself.
|
|
8684
|
+
*/
|
|
8685
|
+
async runFullArchiveWalk(deviceIds) {
|
|
8686
|
+
if (this.fullWalkInFlight) return;
|
|
8687
|
+
this.fullWalkInFlight = true;
|
|
8688
|
+
const hydrateStartedMs = Date.now();
|
|
8689
|
+
try {
|
|
8690
|
+
await hydrateDevicesFromStorage(this.ctx.api, this.index, deviceIds, this.resolvedLocations, this.ctx.logger);
|
|
8691
|
+
this.ctx.logger.info("recorder: hydrated index from storage", { meta: {
|
|
8692
|
+
deviceCount: deviceIds.length,
|
|
8693
|
+
locationCount: this.resolvedLocations.length,
|
|
8694
|
+
ms: Date.now() - hydrateStartedMs
|
|
8695
|
+
} });
|
|
8696
|
+
const loggedDomains = /* @__PURE__ */ new Set();
|
|
8697
|
+
for (const loc of this.resolvedLocations) {
|
|
8698
|
+
const domain = this.locationDomain(loc.id);
|
|
8699
|
+
const domainKey = [...domain].toSorted().join("+");
|
|
8700
|
+
if (loggedDomains.has(domainKey)) continue;
|
|
8701
|
+
loggedDomains.add(domainKey);
|
|
8702
|
+
const acct = this.index.accountingForLocations(domain);
|
|
8703
|
+
this.ctx.logger.info("recorder: eviction domain footage span at hydrate", { meta: {
|
|
8704
|
+
locationIds: [...domain].toSorted(),
|
|
8705
|
+
root: loc.root,
|
|
8706
|
+
count: acct.count,
|
|
8707
|
+
bytes: acct.bytes,
|
|
8708
|
+
oldestMs: acct.oldestMs,
|
|
8709
|
+
newestMs: acct.newestMs
|
|
8710
|
+
} });
|
|
8711
|
+
}
|
|
8712
|
+
const store = this.segmentStore;
|
|
8713
|
+
if (store) try {
|
|
8714
|
+
await runRedundancyJanitor({
|
|
8715
|
+
deviceIds,
|
|
8716
|
+
segmentsFor: (deviceId, profile) => this.index.segments(deviceId, profile),
|
|
8717
|
+
evict: (location, rows) => store.evict(location, rows),
|
|
8718
|
+
logger: this.ctx.logger
|
|
8719
|
+
});
|
|
8720
|
+
} catch (err) {
|
|
8721
|
+
this.ctx.logger.warn("recorder: redundancy janitor failed", { meta: { error: errMsg(err) } });
|
|
8722
|
+
}
|
|
8723
|
+
} catch (err) {
|
|
8724
|
+
this.ctx.logger.warn("recorder: full-archive walk failed", { meta: { error: errMsg(err) } });
|
|
8725
|
+
} finally {
|
|
8726
|
+
this.fullWalkInFlight = false;
|
|
8727
|
+
}
|
|
8728
|
+
}
|
|
8669
8729
|
configStore() {
|
|
8670
8730
|
return this.state(RECORDING_CONFIGS_KEY, RecordingConfigsBlobSchema, {});
|
|
8671
8731
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_worker_protocol = require("../worker-protocol-
|
|
3
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
2
|
+
const require_worker_protocol = require("../worker-protocol-DlNOmN5d.js");
|
|
3
|
+
const require_lazy_sharp = require("../lazy-sharp-CW8FBAD8.js");
|
|
4
4
|
//#region src/session-decode/color-conversion.ts
|
|
5
5
|
/**
|
|
6
6
|
* Explicit YUV→RGB colorspace/range resolution for the session-decode worker.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as formatNativeLeaseKnobs, n as isWorkerRequest, o as resolveNativeLeaseKnobs, r as logLevelForLine } from "../worker-protocol-
|
|
1
|
+
import { i as formatNativeLeaseKnobs, n as isWorkerRequest, o as resolveNativeLeaseKnobs, r as logLevelForLine } from "../worker-protocol-7hWrtJgd.mjs";
|
|
2
2
|
import { n as setSharpWarnSink, r as hostExternalEntryUrls, t as getSharp } from "../lazy-sharp-6oymT_yf.mjs";
|
|
3
3
|
//#region src/session-decode/color-conversion.ts
|
|
4
4
|
/**
|
|
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
|
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.2.
|
|
6
|
+
version: "1.2.20",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_stream_broker_widgets",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.80",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_stream_broker_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.55",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.80",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/sdk": {
|
|
48
|
-
version: "1.2.
|
|
48
|
+
version: "1.2.20",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.55",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-C6y6ibGv.js");
|
|
6
6
|
const require_remote_restream = require("../remote-restream-BYbAsgUf.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
node_crypto = require_dist.__toESM(node_crypto, 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { A as createHwAccelCache, At as number, C as RingBuffer, Dt as discriminatedUnion, Et as boolean, Ft as EventCategory, Mt as record, Nt as string, O as batteryCapability, P as deriveBatteryPresence, Pt as union, Q as resolveEgressDecodeHwAccel, R as egressTranscodeSharingKey, T as addonWidgetsSourceCapability, Tt as array, W as maskUrlCredentials, _t as makeProfileBrokerId, at as AUDIO_PRESETS, b as RATE_CONTROL_TIGHT, ct as invocationFromEncodeProfile, dt as CAM_PROFILE_ORDER, ft as DeviceFeature, gt as isEvent, i as BatteryStatusSchema, it as errMsg, jt as object, k as cameraStreamsCapability, kt as literal, lt as isSoftwareDecode, mt as createEvent, ot as Fmp4BoxSplitter, p as EncodeProfileSchema, pt as DeviceType, rt as webrtcSessionCapability, st as buildFfmpegArgs$1, tt as streamBrokerCapability, ut as BaseAddon, vt as makeSourceBrokerId, wt as _enum, xt as parseProfileBrokerId, y as RATE_CONTROL_RELAXED, yt as nodePin, z as egressTransportFromRequest } from "../dist-
|
|
2
|
+
import { A as createHwAccelCache, At as number, C as RingBuffer, Dt as discriminatedUnion, Et as boolean, Ft as EventCategory, Mt as record, Nt as string, O as batteryCapability, P as deriveBatteryPresence, Pt as union, Q as resolveEgressDecodeHwAccel, R as egressTranscodeSharingKey, T as addonWidgetsSourceCapability, Tt as array, W as maskUrlCredentials, _t as makeProfileBrokerId, at as AUDIO_PRESETS, b as RATE_CONTROL_TIGHT, ct as invocationFromEncodeProfile, dt as CAM_PROFILE_ORDER, ft as DeviceFeature, gt as isEvent, i as BatteryStatusSchema, it as errMsg, jt as object, k as cameraStreamsCapability, kt as literal, lt as isSoftwareDecode, mt as createEvent, ot as Fmp4BoxSplitter, p as EncodeProfileSchema, pt as DeviceType, rt as webrtcSessionCapability, st as buildFfmpegArgs$1, tt as streamBrokerCapability, ut as BaseAddon, vt as makeSourceBrokerId, wt as _enum, xt as parseProfileBrokerId, y as RATE_CONTROL_RELAXED, yt as nodePin, z as egressTransportFromRequest } from "../dist-Do2bBzeb.mjs";
|
|
3
3
|
import { n as profileForStreamId, r as parseRestreamPath } from "../remote-restream-Ci7RXNGb.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as crypto$1 from "node:crypto";
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DKuapveI.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as NativeLeaseSettingsSchema, g as NativeLeaseAdmissionSchema, u as DEFAULT_NATIVE_LEASE_SETTINGS } from "./dist-
|
|
1
|
+
import { _ as NativeLeaseSettingsSchema, g as NativeLeaseAdmissionSchema, u as DEFAULT_NATIVE_LEASE_SETTINGS } from "./dist-Do2bBzeb.mjs";
|
|
2
2
|
//#region src/session-decode/native-lease-config.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolution of the native-frame hold / tile knobs for one decode worker.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-pipeline",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.86",
|
|
4
4
|
"description": "Pipeline bundle — runner, detection, motion, audio + stream broker. Multi-entry npm package shipping pipeline addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|