@camstack/addon-pipeline 1.2.314 → 1.2.316
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/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/{default-detection-model-Es1-dvFU.mjs → default-detection-model-Ct7dlbBe.mjs} +1 -1
- package/dist/{default-detection-model-BvxtQEcb.js → default-detection-model-DD9hOZ4u.js} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-Jvi2SOxI.js → dist-BB9ZzZuv.js} +321 -200
- package/dist/{dist-E1Z_K22_.mjs → dist-D1CYfnNk.mjs} +316 -195
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-DHe-9_tm.mjs → node-CQWOX--t.mjs} +1 -1
- package/dist/{node-EjcZQh8D.js → node-bfUE4LH0.js} +1 -1
- package/dist/pipeline-runner/index.js +19 -58
- package/dist/pipeline-runner/index.mjs +17 -56
- package/dist/{process-memory-IQcwHauP.mjs → process-memory-Dh7ICwL3.mjs} +1 -1
- package/dist/{process-memory-BUtnSPYK.js → process-memory-MNz63KR5.js} +1 -1
- package/dist/recorder/index.js +108 -108
- package/dist/recorder/index.mjs +108 -108
- package/dist/{segment-demux-js-CR58wpzs.mjs → segment-demux-js-Be5IUrly.mjs} +1 -1
- package/dist/{segment-demux-js-Il0EkSOb.js → segment-demux-js-CFIkvV42.js} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CBvGGDX_.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cjam0v1J.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D6PDbSB9.mjs +26 -0
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DddXyc17.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DHNf76xj.mjs} +1 -1
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-CjvrBwfh.mjs → hostInit-CEJvMnrH.mjs} +2 -2
- package/dist/stream-broker/index.js +6 -6
- package/dist/stream-broker/index.mjs +6 -6
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D0BR9vFO.mjs +0 -26
|
@@ -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-BB9ZzZuv.js");
|
|
6
6
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sn as hydrateSchema, ct as evaluateZoneRules, dn as DeviceType, kt as motionDetectionCapability, mn as BaseAddon } from "../dist-
|
|
1
|
+
import { Sn as hydrateSchema, ct as evaluateZoneRules, dn as DeviceType, kt as motionDetectionCapability, mn as BaseAddon } from "../dist-D1CYfnNk.mjs";
|
|
2
2
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as Fmp4BoxSplitter, fn as errMsg, ln as isSoftwareDecode, on as buildFfmpegArgs } from "./dist-
|
|
1
|
+
import { an as Fmp4BoxSplitter, fn as errMsg, ln as isSoftwareDecode, on as buildFfmpegArgs } from "./dist-D1CYfnNk.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BB9ZzZuv.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs, 1);
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
6
|
+
const require_dist = require("../dist-BB9ZzZuv.js");
|
|
7
|
+
const require_node = require("../node-bfUE4LH0.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-DD9hOZ4u.js");
|
|
9
9
|
const require_worker_protocol = require("../worker-protocol-C-G8qmye.js");
|
|
10
10
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
11
11
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
@@ -7994,29 +7994,6 @@ function shouldStartOnboardAnalyzer(config) {
|
|
|
7994
7994
|
if (config.motionSources.includes("analyzer")) return false;
|
|
7995
7995
|
return true;
|
|
7996
7996
|
}
|
|
7997
|
-
/**
|
|
7998
|
-
* Pure decision helper (D475): does this camera OWN its motion state through
|
|
7999
|
-
* a sensor — firmware (`onboard`) or the device reporting its own activity
|
|
8000
|
-
* (`device-activity`) — rather than the analyzer?
|
|
8001
|
-
*
|
|
8002
|
-
* `motionSources` is an array and both can be present at once (a camera with
|
|
8003
|
-
* a firmware sensor that ALSO runs the analyzer, e.g. for object-detection
|
|
8004
|
-
* triggering via the shared decode `handleOnboardMotionAnalyzer` opens). On
|
|
8005
|
-
* such a camera the analyzer's `MotionOnMotionChanged` transitions must NOT
|
|
8006
|
-
* reach `reportMotion` — the operator's rule is "the pipeline must never
|
|
8007
|
-
* overwrite what the sensors do", and `reportMotion` drives the phase
|
|
8008
|
-
* machine that is the SOLE writer of the device's `motion` cap-state slice
|
|
8009
|
-
* (`handlePhaseChanged`). Letting the analyzer's noise re-describe a
|
|
8010
|
-
* sensor-owned camera's motion state would silently re-open or overwrite
|
|
8011
|
-
* what the sensor already decided.
|
|
8012
|
-
*
|
|
8013
|
-
* A camera with `motionSources: ['analyzer']` only (no sensor) is
|
|
8014
|
-
* UNAFFECTED — this returns `false` and the analyzer drives the phase
|
|
8015
|
-
* machine exactly as before D475.
|
|
8016
|
-
*/
|
|
8017
|
-
function cameraOwnsMotionViaSensor(motionSources) {
|
|
8018
|
-
return motionSources.some((s) => s !== "analyzer");
|
|
8019
|
-
}
|
|
8020
7997
|
/** Recursively collects the `addonId` of every ENABLED step in the tree. */
|
|
8021
7998
|
function collectEnabledStepIds(steps, acc) {
|
|
8022
7999
|
if (!steps) return;
|
|
@@ -8678,7 +8655,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
8678
8655
|
const source = data.source;
|
|
8679
8656
|
if (source === "onboard") this.handleOnboardMotionAnalyzer(deviceId, data.detected);
|
|
8680
8657
|
if (!attachment.config.motionSources.includes(source)) return;
|
|
8681
|
-
if (source === "analyzer" && cameraOwnsMotionViaSensor(attachment.config.motionSources)) return;
|
|
8658
|
+
if (source === "analyzer" && require_dist.cameraOwnsMotionViaSensor(attachment.config.motionSources)) return;
|
|
8682
8659
|
this.runner?.reportMotion(deviceId, data.detected, source, data.regions ? [...data.regions] : void 0);
|
|
8683
8660
|
});
|
|
8684
8661
|
if (this.ctx.eventBus) {
|
|
@@ -10897,7 +10874,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
10897
10874
|
avgInferenceTimeMs: metrics.avgInferenceTimeMs,
|
|
10898
10875
|
queueDepthTotal: metrics.queueDepth,
|
|
10899
10876
|
devices,
|
|
10900
|
-
hardware: summarizeRunnerHardware(await this.resolveLocalHardware())
|
|
10877
|
+
hardware: summarizeRunnerHardware(await this.resolveLocalHardware()),
|
|
10878
|
+
motionSliceWriter: "orchestrator"
|
|
10901
10879
|
};
|
|
10902
10880
|
}
|
|
10903
10881
|
/**
|
|
@@ -11435,40 +11413,23 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
11435
11413
|
}
|
|
11436
11414
|
}
|
|
11437
11415
|
/**
|
|
11438
|
-
*
|
|
11439
|
-
*
|
|
11440
|
-
*
|
|
11441
|
-
* phase machine and lands here.
|
|
11416
|
+
* Publish a runner phase transition as `DetectionPhaseTransition` (WATCHING
|
|
11417
|
+
* ↔ ACTIVE, after the cooldown debounce), for the UI events panel, analytics
|
|
11418
|
+
* and the alert center.
|
|
11442
11419
|
*
|
|
11443
|
-
*
|
|
11444
|
-
*
|
|
11445
|
-
*
|
|
11446
|
-
*
|
|
11447
|
-
*
|
|
11448
|
-
*
|
|
11449
|
-
*
|
|
11450
|
-
*
|
|
11451
|
-
*
|
|
11420
|
+
* The phase is NOT the camera's motion and writes no `motion` runtime slice
|
|
11421
|
+
* (D696). Every on-motion detection session attaches `always-on`, so the
|
|
11422
|
+
* phase reads `active` for a whole session, and an always-on camera is
|
|
11423
|
+
* `active` for as long as it is attached; a detach writes nothing at all.
|
|
11424
|
+
* The slice it used to write was therefore "a session is attached", and was
|
|
11425
|
+
* left `detected: true` after every session. The orchestrator is the only
|
|
11426
|
+
* writer of that slice, with the EFFECTIVE motion, and this runner says so
|
|
11427
|
+
* on `getLocalLoad().motionSliceWriter` so that it never writes the slice
|
|
11428
|
+
* while a runner older than D696 still does.
|
|
11452
11429
|
*/
|
|
11453
11430
|
handlePhaseChanged(deviceId, phase, meta) {
|
|
11454
11431
|
const detected = phase === "active";
|
|
11455
11432
|
if (detected) this.lastMotionAt.set(deviceId, meta.timestamp);
|
|
11456
|
-
const slice = {
|
|
11457
|
-
detected,
|
|
11458
|
-
lastDetectedAt: this.lastMotionAt.get(deviceId) ?? null,
|
|
11459
|
-
autoClearAfterMs: detected ? require_dist.MOTION_CLOSE_AFTER_MS : null
|
|
11460
|
-
};
|
|
11461
|
-
(async () => {
|
|
11462
|
-
await (await this.ctx.fetchDevice(deviceId)).deviceState.setCapSlice({
|
|
11463
|
-
capName: "motion",
|
|
11464
|
-
slice
|
|
11465
|
-
});
|
|
11466
|
-
})().catch((err) => {
|
|
11467
|
-
this.ctx.logger.debug("motion cap-state write failed", {
|
|
11468
|
-
tags: { deviceId },
|
|
11469
|
-
meta: { error: require_dist.errMsg(err) }
|
|
11470
|
-
});
|
|
11471
|
-
});
|
|
11472
11433
|
if (this.ctx.eventBus) {
|
|
11473
11434
|
const payload = {
|
|
11474
11435
|
deviceId,
|
|
@@ -12483,7 +12444,7 @@ exports.PipelineRunner = PipelineRunner;
|
|
|
12483
12444
|
exports.PipelineTimingSampler = PipelineTimingSampler;
|
|
12484
12445
|
exports.Semaphore = Semaphore;
|
|
12485
12446
|
exports.acquireSessionDecodeRestreamFrom = acquireSessionDecodeRestreamFrom;
|
|
12486
|
-
exports.cameraOwnsMotionViaSensor = cameraOwnsMotionViaSensor;
|
|
12447
|
+
exports.cameraOwnsMotionViaSensor = require_dist.cameraOwnsMotionViaSensor;
|
|
12487
12448
|
exports.customActions = pipelineRunnerBenchActions;
|
|
12488
12449
|
exports.default = PipelineRunnerAddon;
|
|
12489
12450
|
exports.deriveDetailSteps = deriveDetailSteps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
3
|
-
import { c as macroGateVerdict, d as resolveFrameViewGeometry, g as getStepDefinition, l as rootObjectGate, o as placeDetailStep, r as CustomModelCatalog, s as stepsForElectedPool, u as localFrameRegistry, v as RETIRED_MODEL_IDS } from "../default-detection-model-
|
|
1
|
+
import { D as NativeLeaseAdmissionSchema, En as nodePin, Fn as lazy, In as literal, It as pipelineRunnerCapability, Ln as number, Mn as array, Nn as boolean, Nt as pickDetailCropConvention, O as NativeLeaseSettingsSchema, Pt as pickNativeLeaseOverride, Rn as object, Un as EventCategory, Vn as string, a as BackgroundRunRegistry, bn as defineCustomActions, bt as loadContributionCapability, fn as errMsg, ft as failureContributionCapability, g as DEFAULT_DETAIL_CROP_CONVENTION, jn as _enum, mn as BaseAddon, nt as deriveDetailCropRect, q as cameraOwnsMotionViaSensor, v as DEFAULT_NATIVE_LEASE_SETTINGS, vn as createEvent, w as FailureCounters, yn as customAction } from "../dist-D1CYfnNk.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-CQWOX--t.mjs";
|
|
3
|
+
import { c as macroGateVerdict, d as resolveFrameViewGeometry, g as getStepDefinition, l as rootObjectGate, o as placeDetailStep, r as CustomModelCatalog, s as stepsForElectedPool, u as localFrameRegistry, v as RETIRED_MODEL_IDS } from "../default-detection-model-Ct7dlbBe.mjs";
|
|
4
4
|
import { t as isWorkerReply } from "../worker-protocol-D_NzPcnh.mjs";
|
|
5
5
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
6
6
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
@@ -7986,29 +7986,6 @@ function shouldStartOnboardAnalyzer(config) {
|
|
|
7986
7986
|
if (config.motionSources.includes("analyzer")) return false;
|
|
7987
7987
|
return true;
|
|
7988
7988
|
}
|
|
7989
|
-
/**
|
|
7990
|
-
* Pure decision helper (D475): does this camera OWN its motion state through
|
|
7991
|
-
* a sensor — firmware (`onboard`) or the device reporting its own activity
|
|
7992
|
-
* (`device-activity`) — rather than the analyzer?
|
|
7993
|
-
*
|
|
7994
|
-
* `motionSources` is an array and both can be present at once (a camera with
|
|
7995
|
-
* a firmware sensor that ALSO runs the analyzer, e.g. for object-detection
|
|
7996
|
-
* triggering via the shared decode `handleOnboardMotionAnalyzer` opens). On
|
|
7997
|
-
* such a camera the analyzer's `MotionOnMotionChanged` transitions must NOT
|
|
7998
|
-
* reach `reportMotion` — the operator's rule is "the pipeline must never
|
|
7999
|
-
* overwrite what the sensors do", and `reportMotion` drives the phase
|
|
8000
|
-
* machine that is the SOLE writer of the device's `motion` cap-state slice
|
|
8001
|
-
* (`handlePhaseChanged`). Letting the analyzer's noise re-describe a
|
|
8002
|
-
* sensor-owned camera's motion state would silently re-open or overwrite
|
|
8003
|
-
* what the sensor already decided.
|
|
8004
|
-
*
|
|
8005
|
-
* A camera with `motionSources: ['analyzer']` only (no sensor) is
|
|
8006
|
-
* UNAFFECTED — this returns `false` and the analyzer drives the phase
|
|
8007
|
-
* machine exactly as before D475.
|
|
8008
|
-
*/
|
|
8009
|
-
function cameraOwnsMotionViaSensor(motionSources) {
|
|
8010
|
-
return motionSources.some((s) => s !== "analyzer");
|
|
8011
|
-
}
|
|
8012
7989
|
/** Recursively collects the `addonId` of every ENABLED step in the tree. */
|
|
8013
7990
|
function collectEnabledStepIds(steps, acc) {
|
|
8014
7991
|
if (!steps) return;
|
|
@@ -10889,7 +10866,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
10889
10866
|
avgInferenceTimeMs: metrics.avgInferenceTimeMs,
|
|
10890
10867
|
queueDepthTotal: metrics.queueDepth,
|
|
10891
10868
|
devices,
|
|
10892
|
-
hardware: summarizeRunnerHardware(await this.resolveLocalHardware())
|
|
10869
|
+
hardware: summarizeRunnerHardware(await this.resolveLocalHardware()),
|
|
10870
|
+
motionSliceWriter: "orchestrator"
|
|
10893
10871
|
};
|
|
10894
10872
|
}
|
|
10895
10873
|
/**
|
|
@@ -11427,40 +11405,23 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
11427
11405
|
}
|
|
11428
11406
|
}
|
|
11429
11407
|
/**
|
|
11430
|
-
*
|
|
11431
|
-
*
|
|
11432
|
-
*
|
|
11433
|
-
* phase machine and lands here.
|
|
11408
|
+
* Publish a runner phase transition as `DetectionPhaseTransition` (WATCHING
|
|
11409
|
+
* ↔ ACTIVE, after the cooldown debounce), for the UI events panel, analytics
|
|
11410
|
+
* and the alert center.
|
|
11434
11411
|
*
|
|
11435
|
-
*
|
|
11436
|
-
*
|
|
11437
|
-
*
|
|
11438
|
-
*
|
|
11439
|
-
*
|
|
11440
|
-
*
|
|
11441
|
-
*
|
|
11442
|
-
*
|
|
11443
|
-
*
|
|
11412
|
+
* The phase is NOT the camera's motion and writes no `motion` runtime slice
|
|
11413
|
+
* (D696). Every on-motion detection session attaches `always-on`, so the
|
|
11414
|
+
* phase reads `active` for a whole session, and an always-on camera is
|
|
11415
|
+
* `active` for as long as it is attached; a detach writes nothing at all.
|
|
11416
|
+
* The slice it used to write was therefore "a session is attached", and was
|
|
11417
|
+
* left `detected: true` after every session. The orchestrator is the only
|
|
11418
|
+
* writer of that slice, with the EFFECTIVE motion, and this runner says so
|
|
11419
|
+
* on `getLocalLoad().motionSliceWriter` so that it never writes the slice
|
|
11420
|
+
* while a runner older than D696 still does.
|
|
11444
11421
|
*/
|
|
11445
11422
|
handlePhaseChanged(deviceId, phase, meta) {
|
|
11446
11423
|
const detected = phase === "active";
|
|
11447
11424
|
if (detected) this.lastMotionAt.set(deviceId, meta.timestamp);
|
|
11448
|
-
const slice = {
|
|
11449
|
-
detected,
|
|
11450
|
-
lastDetectedAt: this.lastMotionAt.get(deviceId) ?? null,
|
|
11451
|
-
autoClearAfterMs: detected ? MOTION_CLOSE_AFTER_MS : null
|
|
11452
|
-
};
|
|
11453
|
-
(async () => {
|
|
11454
|
-
await (await this.ctx.fetchDevice(deviceId)).deviceState.setCapSlice({
|
|
11455
|
-
capName: "motion",
|
|
11456
|
-
slice
|
|
11457
|
-
});
|
|
11458
|
-
})().catch((err) => {
|
|
11459
|
-
this.ctx.logger.debug("motion cap-state write failed", {
|
|
11460
|
-
tags: { deviceId },
|
|
11461
|
-
meta: { error: errMsg(err) }
|
|
11462
|
-
});
|
|
11463
|
-
});
|
|
11464
11425
|
if (this.ctx.eventBus) {
|
|
11465
11426
|
const payload = {
|
|
11466
11427
|
deviceId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BB9ZzZuv.js");
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
4
|
node_fs = require_chunk.__toESM(node_fs);
|
|
5
5
|
let node_child_process = require("node:child_process");
|